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EAEA,YAAa,CACX,OAAA9D,CACF,EACA,QAAS,CACP,OAAA8D,CACF,EACA,MAAO,CACL,QAAS8lG,EACT,OAAA5pG,CACF,EACA,KAAM,CACJ,MAAO,CACL,OAAAA,CACF,EACA,KAAM,CACJ,OAAA8D,CACF,EAEA,KAAM,CACJ,OAAA9D,CACF,EACA,IAAK,CACH,OAAAA,CACF,EACA,QAAS,CACP,OAAA8D,CACF,EACA,SAAU,CACR,OAAApC,EACA,OAAA1B,CACF,CACF,EACA,SAAU,CACR,MAAO,CACL,OAAAA,CACF,EACA,KAAM,CACJ,OAAA8D,CACF,EAEA,KAAM,CACJ,OAAA9D,CACF,EACA,IAAK,CACH,OAAAA,CACF,EACA,QAAS,CACP,OAAA8D,CACF,EACA,SAAU,CACR,OAAApC,EACA,OAAA1B,CACF,CACF,EACA,KAAM,CACJ,MAAO,CACL,OAAAA,CACF,EACA,KAAM,CACJ,OAAA8D,CACF,EAEA,KAAM,CACJ,OAAA9D,CACF,EACA,IAAK,CACH,OAAAA,CACF,EACA,QAAS,CACP,OAAA8D,CACF,EACA,SAAU,CACR,OAAApC,EACA,OAAA1B,CACF,CACF,EACA,KAAM,CACJ,MAAO,CACL,OAAAA,CACF,EACA,KAAM,CACJ,OAAA8D,CACF,EAEA,KAAM,CACJ,OAAA9D,CACF,EACA,IAAK,CACH,OAAAA,CACF,EACA,QAAS,CACP,OAAA8D,CACF,EACA,SAAU,CACR,OAAApC,EACA,OAAA1B,CACF,CACF,EACA,SAAU,CACR,OAAA0B,EACA,OAAA1B,CACF,CACF,EACA,MAAO,CACL,OAAAA,EACA,OAAA8D,EACA,UAAW,WACb,EACA,iBAAkB,CAChB,QAAS,CACP,OAAAA,CACF,EACA,OAAQ,CACN,OAAA9D,CACF,EACA,SAAU,CACR,OAAA0B,EACA,QAASkoG,EACT,OAAA9lG,CACF,CACF,EACA,OAAQ,CACN,QAAS8lG,CACX,EACA,KAAM,CACJ,KAAM,CACJ,OAAA5pG,CACF,EACA,KAAM,CACJ,OAAAA,CACF,EAEA,KAAM,CACJ,OAAA8D,CACF,EAEA,MAAO,CACL,OAAA9D,CACF,EACA,OAAQ,CACN,OAAAA,EACA,OAAA8D,CACF,EACA,SAAU,CACR,OAAApC,CACF,CACF,EACA,GAAI,CACF,OAAA1B,EACA,OAAA8D,CACF,EACA,MAAO,CACL,SAAU,CACR,OAAA9D,EACA,UAAW,WACb,EAEA,WAAY,CACV,OAAAA,EACA,UAAW,WACb,EAEA,SAAU,CACR,OAAA0B,EACA,OAAA1B,CACF,CACF,EACA,aAAc,CACZ,IAAK,CACH,OAAA8D,CACF,EACA,MAAO,CACL,OAAAA,CACF,EACA,OAAQ,CACN,OAAAA,CACF,EACA,KAAM,CACJ,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,EACA,OAAAoC,CACF,CACF,EACA,MAAO,CACL,OAAA9D,EACA,UAAW,WACb,EACA,mBAAoB,CAClB,QAAS4pG,CACX,EACA,MAAO,CACL,OAAA9lG,EACA,UAAW,WACb,EACA,OAAQ,CACN,IAAK,CACH,OAAAA,CACF,EACA,MAAO,CACL,OAAAA,CACF,EACA,OAAQ,CACN,OAAAA,CACF,EACA,KAAM,CACJ,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,EACA,OAAAoC,CACF,CACF,EACA,KAAM,CACJ,OAAAA,CACF,EACA,QAAS,CACP,QAAS8lG,CACX,EACA,QAAS,CACP,IAAK,CACH,OAAA9lG,CACF,EACA,IAAK,CACH,OAAAA,CACF,EACA,MAAO,CACL,QAAS,CACP,QAAS8lG,CACX,EACA,IAAK,CACH,OAAA9lG,CACF,EACA,IAAK,CACH,OAAAA,CACF,EACA,WAAY,CACV,OAAAA,CACF,EACA,cAAe,CACb,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,EACA,QAASkoG,CACX,CACF,EACA,sBAAuB,CACrB,SAAU,UACZ,EACA,SAAU,CACR,OAAAloG,CACF,CACF,EACA,OAAQ,CACN,QAAS,CACP,QAASkoG,CACX,EACA,MAAO,CACL,OAAA5pG,CACF,EACA,KAAM,CACJ,OAAA8D,CACF,EACA,EAAG,CACD,OAAAA,CACF,EACA,EAAG,CACD,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,EACA,QAASkoG,CACX,CACF,EACA,MAAO,CACL,OAAQ,CAAC,SAAU,UAAW,SAAU,WAAY,MAAO,OAAQ,QAAS,gBAAiB,UAAW,MAAO,OAAQ,WAAY,eAAgB,SAAU,OAAQ,SAAS,CAChL,EACA,YAAa,CACX,SAAU,UACZ,EACA,gBAAiB,CACf,aAAc,CACZ,QAASA,EACT,MAAAx3F,EACF,EACA,aAAc,CACZ,OAAAtO,CACF,EACA,cAAe,CACb,QAAS8lG,CACX,EACA,aAAc,CACZ,QAASA,CACX,EACA,mBAAoB,CAClB,QAASA,CACX,EACA,iBAAkB,CAChB,OAAQ,CAAC,SAAU,UAAU,CAC/B,EACA,SAAU,CACR,OAAAloG,CACF,CACF,EACA,KAAM,CACJ,OAAAoC,CACF,EACA,MAAO,CACL,OAAA9D,EACA,IAAA6pG,GACA,UAAW,WACb,EACA,MAAO,CACL,OAAA/lG,EACA,UAAW,WACb,EACA,gBAAiB,CACf,QAAS,CACP,OAAAA,CACF,EACA,QAAS,CACP,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,EACA,QAASkoG,EACT,OAAA9lG,CACF,CACF,EACA,EAAG,CACD,OAAAA,CACF,EACA,EAAG,CACD,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,CACF,CACF,EACMq+F,GAAa,CACjB,UAAW,CACT,QAAS,CACP,QAAS6J,CACX,EACA,OAAQ,CACN,QAASA,EACT,OAAA5pG,EACA,MAAAoS,GACA,SAAU,UACZ,EACA,UAAW,CACT,IAAAy3F,EACF,EACA,WAAY,CACV,QAASD,CACX,EACA,SAAU,CACR,OAAAloG,EACA,QAASkoG,EACT,OAAA5pG,EACA,MAAAoS,GACA,SAAU,UACZ,CACF,EACA,MAAO,CACL,OAAQ,CACN,GAAI,CACF,QAAS,CACP,QAASw3F,CACX,EACA,YAAa,CACX,OAAA9lG,CACF,EACA,KAAM,CACJ,OAAQimG,EACV,EACA,YAAa,CACX,OAAAjmG,CACF,EACA,WAAY,CACV,OAAAA,CACF,EACA,IAAK,CACH,OAAA9D,CACF,EACA,SAAU,CACR,OAAA0B,EACA,QAASkoG,CACX,CACF,EACA,OAAQ,CACN,QAAS,CACP,QAASA,CACX,EACA,YAAa,CACX,OAAA9lG,CACF,EACA,KAAM,CACJ,OAAQimG,EACV,EACA,WAAY,CACV,OAAAjmG,CACF,EACA,YAAa,CACX,OAAAA,CACF,EACA,IAAK,CACH,OAAA9D,CACF,EACA,SAAU,CACR,OAAA0B,EACA,QAASkoG,CACX,CACF,EACA,KAAM,CACJ,QAAS,CACP,QAASA,CACX,EACA,YAAa,CACX,OAAA9lG,CACF,EACA,KAAM,CACJ,OAAQimG,EACV,EACA,WAAY,CACV,OAAAjmG,CACF,EACA,YAAa,CACX,OAAAA,CACF,EACA,IAAK,CACH,OAAA9D,CACF,EACA,SAAU,CACR,OAAA0B,EACA,QAASkoG,CACX,CACF,EACA,SAAU,CACR,OAAQ,CAAC,OAAQ,KAAM,QAAQ,EAC/B,OAAAloG,CACF,CACF,EACA,eAAgB,CACd,KAAM,CACJ,OAAQoC,CACV,EACA,GAAI,CACF,OAAQA,CACV,EACA,SAAU,CACR,OAAQpC,EACR,OAAQoC,CACV,CACF,EACA,mBAAoB,CAClB,QAAS8lG,CACX,EACA,WAAY,CACV,QAAS,CACP,QAASA,CACX,EACA,MAAO,CACL,OAAA5pG,CACF,EACA,KAAM,CACJ,OAAA8D,CACF,EACA,OAAQ,CACN,QAAS8lG,EACT,MAAAx3F,EACF,EACA,SAAU,CACR,OAAA1Q,EACA,QAASkoG,CACX,CACF,EACA,OAAQ,CACN,MAAO,CACL,QAASA,EACT,SAAU,UACZ,EACA,KAAM,CACJ,QAASA,EACT,SAAU,UACZ,EACA,SAAU,CACR,OAAAloG,EACA,QAASkoG,CACX,CACF,EAC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MAAO,CACL,OAAAA,CACF,EACA,KAAM,CACJ,OAAA8D,CACF,EAEA,KAAM,CACJ,OAAA9D,CACF,EACA,IAAK,CACH,OAAAA,CACF,EACA,QAAS,CACP,OAAA8D,CACF,EACA,SAAU,CACR,OAAApC,EACA,OAAA1B,CACF,CACF,EACA,SAAU,CACR,OAAA0B,EACA,OAAA1B,CACF,CACF,EACA,OAAQ,CACN,QAAS4pG,CACX,EACA,WAAY,CACV,SAAU,WACV,OAAA9lG,CACF,EACA,MAAO,CACL,OAAA9D,EACA,UAAW,WACb,EACA,mBAAoB,CAClB,QAAS4pG,CACX,EACA,OAAQ,CACN,OAAA9lG,EACA,UAAW,WACb,EACA,QAAS,CACP,QAAS8lG,CACX,EACA,QAAS,CACP,IAAK,CACH,OAAA9lG,CACF,EACA,IAAK,CACH,OAAAA,CACF,EACA,MAAO,CACL,QAAS,CACP,QAAS8lG,CACX,EACA,IAAK,CACH,OAAA9lG,CACF,EACA,IAAK,CACH,OAAAA,CACF,EACA,WAAY,CACV,OAAAA,CACF,EACA,cAAe,CACb,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,EACA,QAASkoG,CACX,CACF,EACA,sBAAuB,CACrB,SAAU,UACZ,EACA,SAAU,CACR,OAAAloG,CACF,CACF,EACA,eAAgB,CACd,SAAU,WACV,OAAAoC,CACF,EACA,kBAAmB,CACjB,OAAAA,CACF,EACA,cAAe,CACb,KAAM,CACJ,OAAAA,CACF,EACA,MAAO,CACL,OAAAA,CACF,EACA,oBAAqB,CACnB,QAAS8lG,CACX,EACA,SAAU,CACR,OAAAloG,CACF,CACF,EACA,OAAQ,CACN,QAAS,CACP,QAASkoG,CACX,EACA,MAAO,CACL,OAAA5pG,CACF,EACA,KAAM,CACJ,OAAA8D,CACF,EACA,EAAG,CACD,OAAAA,CACF,EACA,EAAG,CACD,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,EACA,QAASkoG,CACX,CACF,EACA,OAAQ,CACN,QAAS,CACP,QAASA,CACX,EACA,KAAM,CACJ,OAAQ,CAAC,UAAW,aAAc,WAAY,gBAAiB,gBAAiB,aAAc,WAAY,WAAY,YAAa,aAAa,CAClJ,EACA,UAAW,CACT,OAAA9lG,CACF,EACA,eAAgB,CACd,OAAQ,CAAC,aAAc,WAAY,MAAM,EACzC,QAAS8lG,CACX,EACA,SAAU,CACR,OAAAloG,EACA,QAASkoG,CACX,CACF,EACA,MAAO,CACL,OAAA5pG,EACA,UAAW,WACb,EACA,MAAO,CACL,OAAA8D,CACF,EACA,gBAAiB,CACf,QAAS,CACP,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,EACA,QAASkoG,EACT,OAAA9lG,CACF,CACF,EACA,MAAO,CACL,OAAAA,EACA,UAAW,WACb,EACA,SAAU,CACR,OAAApC,CACF,CACF,EACA,OAAQ,CACN,iBAAkB,CAChB,QAASkoG,CACX,EACA,QAASI,GACT,SAAU,CACR,OAAAtoG,CACF,CACF,EACA,YAAa,CACX,UAAW,CACT,QAASkoG,CACX,EACA,SAAU,CACR,QAASA,CACX,EACA,gBAAiB,CACf,QAASA,CACX,EACA,gBAAiB,CACf,QAASA,CACX,EACA,gBAAiB,CACf,QAASA,CACX,EACA,MAAO,CACL,QAASA,CACX,EACA,SAAU,CACR,QAAS,CACP,QAASA,CACX,EACA,MAAO,CACL,EAAG,CACD,OAAA9lG,CACF,EACA,EAAG,CACD,OAAAA,CACF,EACA,KAAM,CACJ,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,CACF,CACF,EACA,aAAc,CACZ,QAASkoG,CACX,EACA,UAAW,CACT,QAASA,CACX,EACA,SAAU,CACR,OAAAloG,EACA,QAASkoG,CACX,CACF,EACA,YAAa,CACX,QAASA,CACX,EACA,kBAAmB,CACjB,QAASA,CACX,EACA,WAAY,CACV,QAASA,CACX,EACA,qBAAsB,CACpB,QAASA,CACX,EACA,oBAAqB,CACnB,QAASA,CACX,EACA,aAAc,CACZ,OAAA9lG,CACF,EACA,SAAU,CACR,QAAS8lG,CACX,EACA,UAAW,CACT,OAAA9lG,CACF,EACA,SAAU,CACR,OAAApC,CACF,CACF,EACA,OAAQ,CACN,WAAY,CACV,UAAW,YACX,OAAAoC,EACA,OAAA9D,CACF,EACA,eAAgB,CACd,QAAS4pG,CACX,EACA,iBAAkB,CAChB,OAAA9lG,CACF,EACA,aAAc,CACZ,QAAS,CACP,QAAS8lG,CACX,EACA,gBAAiB,CACf,OAAA9lG,CACF,EACA,YAAa,CACX,OAAAA,CACF,EACA,YAAa,CACX,OAAAA,CACF,EACA,cAAe,CACb,QAAS8lG,CACX,EACA,iBAAkB,CAChB,QAASA,CACX,EACA,qBAAsB,CACpB,QAASA,CACX,EACA,UAAW,CACT,OAAQ,CAAC,KAAM,KAAM,KAAM,IAAI,CACjC,EAEA,WAAY,CACV,OAAQ,CAAC,UAAW,UAAU,CAChC,EAEA,aAAc,CACZ,OAAQ,CAAC,SAAU,OAAO,CAC5B,EAEA,SAAU,CACR,OAAAloG,EACA,QAASkoG,CACX,CACF,EACA,SAAU,CACR,OAAAloG,CACF,CACF,EACA,aAAc,CACZ,QAAS,CACP,QAASkoG,CACX,EACA,gBAAiB,CACf,QAASA,CACX,EACA,QAAS,CACP,QAASA,EACT,SAAU,UACZ,EACA,QAAS,CACP,QAASA,EACT,SAAU,UACZ,EACA,SAAU,CACR,SAAU,UACZ,EACA,SAAU,CACR,gBAAiB,CACf,SAAU,UACZ,EACA,SAAU,CACR,OAAAloG,EACA,QAASkoG,EACT,SAAU,UACZ,CACF,EACA,WAAY,CACV,QAASA,EACT,SAAU,UACZ,EACA,WAAY,CACV,QAASA,EACT,SAAU,UACZ,EACA,iBAAkBI,GAClB,SAAU,CACR,OAAAtoG,EACA,QAASkoG,CACX,CACF,EACA,MAAOI,GACP,QAAS,CACP,QAAS,CACP,QAASJ,CACX,EACA,UAAW,CACT,MAAO,CACL,OAAA9lG,CACF,EACA,sBAAuB,CACrB,OAAAA,CACF,EACA,eAAgB,CACd,OAAAA,CACF,EACA,aAAc,CACZ,OAAAA,CACF,EACA,eAAgB,CACd,OAAAA,CACF,EACA,QAAS,CACP,OAAAA,CACF,EACA,aAAc,CACZ,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,CACF,CACF,EACA,iBAAkB,CAChB,MAAO,CACL,OAAAoC,CACF,EACA,sBAAuB,CACrB,OAAAA,CACF,EACA,eAAgB,CACd,OAAAA,CACF,EACA,aAAc,CACZ,OAAAA,CACF,EACA,eAAgB,CACd,OAAAA,CACF,EACA,QAAS,CACP,OAAAA,CACF,EACA,aAAc,CACZ,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,CACF,CACF,EACA,UAAW,CACT,eAAgB,CACd,OAAAoC,CACF,EACA,aAAc,CACZ,OAAAA,CACF,EACA,eAAgB,CACd,OAAAA,CACF,EACA,aAAc,CACZ,OAAAA,CACF,EACA,QAAS,CACP,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,CACF,CACF,EACA,sBAAuB,CACrB,eAAgB,CACd,OAAAoC,CACF,EACA,aAAc,CACZ,OAAAA,CACF,EACA,eAAgB,CACd,OAAAA,CACF,EACA,aAAc,CACZ,OAAAA,CACF,EACA,QAAS,CACP,OAAAA,CACF,EACA,aAAc,CACZ,OAAAA,CACF,EACA,SAAU,CACR,OAAApC,CACF,CACF,EACA,YAAa,CACX,OAAAoC,CACF,EACA,YAAa,CACX,OAAAA,CACF,EAEA,OAAQ,CACN,OAAQ,CAAC,YAAa,YAAa,wBAAyB,kBAAkB,CAChF,EACA,cAAe,CACb,QAAS,CACP,QAAS8lG,CACX,EACA,WAAY,CACV,OAAA9lG,CACF,EAEA,eAAgB,CACd,OAAAA,CACF,EACA,iBAAkB,CAChB,QAAS8lG,CACX,EACA,IAAK,CACH,QAASA,CACX,EACA,SAAU,CACR,OAAAloG,EACA,QAASkoG,CACX,CACF,EACA,SAAU,CACR,OAAA9lG,CACF,EACA,iBAAkB,CAChB,QAAS8lG,CACX,EACA,KAAM,CACJ,EAAG,CACD,OAAA9lG,CACF,E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AK,KAAK,YAAY,MAAM,KAAK,KAAM,SAAS,CACzD,EACAA,EAAQ,UAAU,2BAA6B,UAAY,CACzD,IAAI1qG,EAAU,CAAC,EACf,OAAI,KAAK,eACPA,EAAU,KAAK,aAAa,WAAW,MAAM,KAAK,YAAY,GAEzDA,CACT,EAEA,MAAMkrG,GAAkB3nD,E","sources":["webpack://grafana/./node_modules/vis-network/peer/esm/vis-network.mjs"],"sourcesContent":["/**\n * vis-network\n * https://visjs.github.io/vis-network/\n *\n * A dynamic, browser-based visualization library.\n *\n * @version 10.0.2\n * @date 2025-09-15T17:48:13.838Z\n *\n * @copyright (c) 2011-2017 Almende B.V, http://almende.com\n * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs\n *\n * @license\n * vis.js is dual licensed under both\n *\n * 1. The Apache 2.0 License\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * and\n *\n * 2. The MIT License\n * http://opensource.org/licenses/MIT\n *\n * vis.js may be distributed under either license.\n */\n\nimport { isDataViewLike, DataSet } from 'vis-data/peer/esm/vis-data.js';\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar es_object_assign = {};\n\nvar globalThis_1;\nvar hasRequiredGlobalThis;\n\nfunction requireGlobalThis () {\n\tif (hasRequiredGlobalThis) return globalThis_1;\n\thasRequiredGlobalThis = 1;\n\tvar check = function (it) {\n\t return it && it.Math === Math && it;\n\t};\n\n\t// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n\tglobalThis_1 =\n\t // eslint-disable-next-line es/no-global-this -- safe\n\t check(typeof globalThis == 'object' && globalThis) ||\n\t check(typeof window == 'object' && window) ||\n\t // eslint-disable-next-line no-restricted-globals -- safe\n\t check(typeof self == 'object' && self) ||\n\t check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||\n\t check(typeof globalThis_1 == 'object' && globalThis_1) ||\n\t // eslint-disable-next-line no-new-func -- fallback\n\t (function () { return this; })() || Function('return this')();\n\treturn globalThis_1;\n}\n\nvar fails;\nvar hasRequiredFails;\n\nfunction requireFails () {\n\tif (hasRequiredFails) return fails;\n\thasRequiredFails = 1;\n\tfails = function (exec) {\n\t try {\n\t return !!exec();\n\t } catch (error) {\n\t return true;\n\t }\n\t};\n\treturn fails;\n}\n\nvar functionBindNative;\nvar hasRequiredFunctionBindNative;\n\nfunction requireFunctionBindNative () {\n\tif (hasRequiredFunctionBindNative) return functionBindNative;\n\thasRequiredFunctionBindNative = 1;\n\tvar fails = /*@__PURE__*/ requireFails();\n\n\tfunctionBindNative = !fails(function () {\n\t // eslint-disable-next-line es/no-function-prototype-bind -- safe\n\t var test = (function () { /* empty */ }).bind();\n\t // eslint-disable-next-line no-prototype-builtins -- safe\n\t return typeof test != 'function' || test.hasOwnProperty('prototype');\n\t});\n\treturn functionBindNative;\n}\n\nvar functionApply;\nvar hasRequiredFunctionApply;\n\nfunction requireFunctionApply () {\n\tif (hasRequiredFunctionApply) return functionApply;\n\thasRequiredFunctionApply = 1;\n\tvar NATIVE_BIND = /*@__PURE__*/ requireFunctionBindNative();\n\n\tvar FunctionPrototype = Function.prototype;\n\tvar apply = FunctionPrototype.apply;\n\tvar call = FunctionPrototype.call;\n\n\t// eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe\n\tfunctionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {\n\t return call.apply(apply, arguments);\n\t});\n\treturn functionApply;\n}\n\nvar functionUncurryThis;\nvar hasRequiredFunctionUncurryThis;\n\nfunction requireFunctionUncurryThis () {\n\tif (hasRequiredFunctionUncurryThis) return functionUncurryThis;\n\thasRequiredFunctionUncurryThis = 1;\n\tvar NATIVE_BIND = /*@__PURE__*/ requireFunctionBindNative();\n\n\tvar FunctionPrototype = Function.prototype;\n\tvar call = FunctionPrototype.call;\n\t// eslint-disable-next-line es/no-function-prototype-bind -- safe\n\tvar uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);\n\n\tfunctionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {\n\t return function () {\n\t return call.apply(fn, arguments);\n\t };\n\t};\n\treturn functionUncurryThis;\n}\n\nvar classofRaw;\nvar hasRequiredClassofRaw;\n\nfunction requireClassofRaw () {\n\tif (hasRequiredClassofRaw) return classofRaw;\n\thasRequiredClassofRaw = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\n\tvar toString = uncurryThis({}.toString);\n\tvar stringSlice = uncurryThis(''.slice);\n\n\tclassofRaw = function (it) {\n\t return stringSlice(toString(it), 8, -1);\n\t};\n\treturn classofRaw;\n}\n\nvar functionUncurryThisClause;\nvar hasRequiredFunctionUncurryThisClause;\n\nfunction requireFunctionUncurryThisClause () {\n\tif (hasRequiredFunctionUncurryThisClause) return functionUncurryThisClause;\n\thasRequiredFunctionUncurryThisClause = 1;\n\tvar classofRaw = /*@__PURE__*/ requireClassofRaw();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\n\tfunctionUncurryThisClause = function (fn) {\n\t // Nashorn bug:\n\t // https://github.com/zloirock/core-js/issues/1128\n\t // https://github.com/zloirock/core-js/issues/1130\n\t if (classofRaw(fn) === 'Function') return uncurryThis(fn);\n\t};\n\treturn functionUncurryThisClause;\n}\n\nvar isCallable;\nvar hasRequiredIsCallable;\n\nfunction requireIsCallable () {\n\tif (hasRequiredIsCallable) return isCallable;\n\thasRequiredIsCallable = 1;\n\t// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot\n\tvar documentAll = typeof document == 'object' && document.all;\n\n\t// `IsCallable` abstract operation\n\t// https://tc39.es/ecma262/#sec-iscallable\n\t// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing\n\tisCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {\n\t return typeof argument == 'function' || argument === documentAll;\n\t} : function (argument) {\n\t return typeof argument == 'function';\n\t};\n\treturn isCallable;\n}\n\nvar objectGetOwnPropertyDescriptor = {};\n\nvar descriptors;\nvar hasRequiredDescriptors;\n\nfunction requireDescriptors () {\n\tif (hasRequiredDescriptors) return descriptors;\n\thasRequiredDescriptors = 1;\n\tvar fails = /*@__PURE__*/ requireFails();\n\n\t// Detect IE8's incomplete defineProperty implementation\n\tdescriptors = !fails(function () {\n\t // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n\t return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;\n\t});\n\treturn descriptors;\n}\n\nvar functionCall;\nvar hasRequiredFunctionCall;\n\nfunction requireFunctionCall () {\n\tif (hasRequiredFunctionCall) return functionCall;\n\thasRequiredFunctionCall = 1;\n\tvar NATIVE_BIND = /*@__PURE__*/ requireFunctionBindNative();\n\n\tvar call = Function.prototype.call;\n\t// eslint-disable-next-line es/no-function-prototype-bind -- safe\n\tfunctionCall = NATIVE_BIND ? call.bind(call) : function () {\n\t return call.apply(call, arguments);\n\t};\n\treturn functionCall;\n}\n\nvar objectPropertyIsEnumerable = {};\n\nvar hasRequiredObjectPropertyIsEnumerable;\n\nfunction requireObjectPropertyIsEnumerable () {\n\tif (hasRequiredObjectPropertyIsEnumerable) return objectPropertyIsEnumerable;\n\thasRequiredObjectPropertyIsEnumerable = 1;\n\tvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n\t// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n\tvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n\t// Nashorn ~ JDK8 bug\n\tvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n\t// `Object.prototype.propertyIsEnumerable` method implementation\n\t// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\n\tobjectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n\t var descriptor = getOwnPropertyDescriptor(this, V);\n\t return !!descriptor && descriptor.enumerable;\n\t} : $propertyIsEnumerable;\n\treturn objectPropertyIsEnumerable;\n}\n\nvar createPropertyDescriptor;\nvar hasRequiredCreatePropertyDescriptor;\n\nfunction requireCreatePropertyDescriptor () {\n\tif (hasRequiredCreatePropertyDescriptor) return createPropertyDescriptor;\n\thasRequiredCreatePropertyDescriptor = 1;\n\tcreatePropertyDescriptor = function (bitmap, value) {\n\t return {\n\t enumerable: !(bitmap & 1),\n\t configurable: !(bitmap & 2),\n\t writable: !(bitmap & 4),\n\t value: value\n\t };\n\t};\n\treturn createPropertyDescriptor;\n}\n\nvar indexedObject;\nvar hasRequiredIndexedObject;\n\nfunction requireIndexedObject () {\n\tif (hasRequiredIndexedObject) return indexedObject;\n\thasRequiredIndexedObject = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar classof = /*@__PURE__*/ requireClassofRaw();\n\n\tvar $Object = Object;\n\tvar split = uncurryThis(''.split);\n\n\t// fallback for non-array-like ES3 and non-enumerable old V8 strings\n\tindexedObject = fails(function () {\n\t // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n\t // eslint-disable-next-line no-prototype-builtins -- safe\n\t return !$Object('z').propertyIsEnumerable(0);\n\t}) ? function (it) {\n\t return classof(it) === 'String' ? split(it, '') : $Object(it);\n\t} : $Object;\n\treturn indexedObject;\n}\n\nvar isNullOrUndefined;\nvar hasRequiredIsNullOrUndefined;\n\nfunction requireIsNullOrUndefined () {\n\tif (hasRequiredIsNullOrUndefined) return isNullOrUndefined;\n\thasRequiredIsNullOrUndefined = 1;\n\t// we can't use just `it == null` since of `document.all` special case\n\t// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec\n\tisNullOrUndefined = function (it) {\n\t return it === null || it === undefined;\n\t};\n\treturn isNullOrUndefined;\n}\n\nvar requireObjectCoercible;\nvar hasRequiredRequireObjectCoercible;\n\nfunction requireRequireObjectCoercible () {\n\tif (hasRequiredRequireObjectCoercible) return requireObjectCoercible;\n\thasRequiredRequireObjectCoercible = 1;\n\tvar isNullOrUndefined = /*@__PURE__*/ requireIsNullOrUndefined();\n\n\tvar $TypeError = TypeError;\n\n\t// `RequireObjectCoercible` abstract operation\n\t// https://tc39.es/ecma262/#sec-requireobjectcoercible\n\trequireObjectCoercible = function (it) {\n\t if (isNullOrUndefined(it)) throw new $TypeError(\"Can't call method on \" + it);\n\t return it;\n\t};\n\treturn requireObjectCoercible;\n}\n\nvar toIndexedObject;\nvar hasRequiredToIndexedObject;\n\nfunction requireToIndexedObject () {\n\tif (hasRequiredToIndexedObject) return toIndexedObject;\n\thasRequiredToIndexedObject = 1;\n\t// toObject with fallback for non-array-like ES3 strings\n\tvar IndexedObject = /*@__PURE__*/ requireIndexedObject();\n\tvar requireObjectCoercible = /*@__PURE__*/ requireRequireObjectCoercible();\n\n\ttoIndexedObject = function (it) {\n\t return IndexedObject(requireObjectCoercible(it));\n\t};\n\treturn toIndexedObject;\n}\n\nvar isObject$1;\nvar hasRequiredIsObject;\n\nfunction requireIsObject () {\n\tif (hasRequiredIsObject) return isObject$1;\n\thasRequiredIsObject = 1;\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\n\tisObject$1 = function (it) {\n\t return typeof it == 'object' ? it !== null : isCallable(it);\n\t};\n\treturn isObject$1;\n}\n\nvar path;\nvar hasRequiredPath;\n\nfunction requirePath () {\n\tif (hasRequiredPath) return path;\n\thasRequiredPath = 1;\n\tpath = {};\n\treturn path;\n}\n\nvar getBuiltIn;\nvar hasRequiredGetBuiltIn;\n\nfunction requireGetBuiltIn () {\n\tif (hasRequiredGetBuiltIn) return getBuiltIn;\n\thasRequiredGetBuiltIn = 1;\n\tvar path = /*@__PURE__*/ requirePath();\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\n\tvar aFunction = function (variable) {\n\t return isCallable(variable) ? variable : undefined;\n\t};\n\n\tgetBuiltIn = function (namespace, method) {\n\t return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(globalThis[namespace])\n\t : path[namespace] && path[namespace][method] || globalThis[namespace] && globalThis[namespace][method];\n\t};\n\treturn getBuiltIn;\n}\n\nvar objectIsPrototypeOf;\nvar hasRequiredObjectIsPrototypeOf;\n\nfunction requireObjectIsPrototypeOf () {\n\tif (hasRequiredObjectIsPrototypeOf) return objectIsPrototypeOf;\n\thasRequiredObjectIsPrototypeOf = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\n\tobjectIsPrototypeOf = uncurryThis({}.isPrototypeOf);\n\treturn objectIsPrototypeOf;\n}\n\nvar environmentUserAgent;\nvar hasRequiredEnvironmentUserAgent;\n\nfunction requireEnvironmentUserAgent () {\n\tif (hasRequiredEnvironmentUserAgent) return environmentUserAgent;\n\thasRequiredEnvironmentUserAgent = 1;\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\n\tvar navigator = globalThis.navigator;\n\tvar userAgent = navigator && navigator.userAgent;\n\n\tenvironmentUserAgent = userAgent ? String(userAgent) : '';\n\treturn environmentUserAgent;\n}\n\nvar environmentV8Version;\nvar hasRequiredEnvironmentV8Version;\n\nfunction requireEnvironmentV8Version () {\n\tif (hasRequiredEnvironmentV8Version) return environmentV8Version;\n\thasRequiredEnvironmentV8Version = 1;\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar userAgent = /*@__PURE__*/ requireEnvironmentUserAgent();\n\n\tvar process = globalThis.process;\n\tvar Deno = globalThis.Deno;\n\tvar versions = process && process.versions || Deno && Deno.version;\n\tvar v8 = versions && versions.v8;\n\tvar match, version;\n\n\tif (v8) {\n\t match = v8.split('.');\n\t // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n\t // but their correct versions are not interesting for us\n\t version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n\t}\n\n\t// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n\t// so check `userAgent` even if `.v8` exists, but 0\n\tif (!version && userAgent) {\n\t match = userAgent.match(/Edge\\/(\\d+)/);\n\t if (!match || match[1] >= 74) {\n\t match = userAgent.match(/Chrome\\/(\\d+)/);\n\t if (match) version = +match[1];\n\t }\n\t}\n\n\tenvironmentV8Version = version;\n\treturn environmentV8Version;\n}\n\nvar symbolConstructorDetection;\nvar hasRequiredSymbolConstructorDetection;\n\nfunction requireSymbolConstructorDetection () {\n\tif (hasRequiredSymbolConstructorDetection) return symbolConstructorDetection;\n\thasRequiredSymbolConstructorDetection = 1;\n\t/* eslint-disable es/no-symbol -- required for testing */\n\tvar V8_VERSION = /*@__PURE__*/ requireEnvironmentV8Version();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\n\tvar $String = globalThis.String;\n\n\t// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\n\tsymbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {\n\t var symbol = Symbol('symbol detection');\n\t // Chrome 38 Symbol has incorrect toString conversion\n\t // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n\t // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,\n\t // of course, fail.\n\t return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||\n\t // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n\t !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n\t});\n\treturn symbolConstructorDetection;\n}\n\nvar useSymbolAsUid;\nvar hasRequiredUseSymbolAsUid;\n\nfunction requireUseSymbolAsUid () {\n\tif (hasRequiredUseSymbolAsUid) return useSymbolAsUid;\n\thasRequiredUseSymbolAsUid = 1;\n\t/* eslint-disable es/no-symbol -- required for testing */\n\tvar NATIVE_SYMBOL = /*@__PURE__*/ requireSymbolConstructorDetection();\n\n\tuseSymbolAsUid = NATIVE_SYMBOL &&\n\t !Symbol.sham &&\n\t typeof Symbol.iterator == 'symbol';\n\treturn useSymbolAsUid;\n}\n\nvar isSymbol;\nvar hasRequiredIsSymbol;\n\nfunction requireIsSymbol () {\n\tif (hasRequiredIsSymbol) return isSymbol;\n\thasRequiredIsSymbol = 1;\n\tvar getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar USE_SYMBOL_AS_UID = /*@__PURE__*/ requireUseSymbolAsUid();\n\n\tvar $Object = Object;\n\n\tisSymbol = USE_SYMBOL_AS_UID ? function (it) {\n\t return typeof it == 'symbol';\n\t} : function (it) {\n\t var $Symbol = getBuiltIn('Symbol');\n\t return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));\n\t};\n\treturn isSymbol;\n}\n\nvar tryToString;\nvar hasRequiredTryToString;\n\nfunction requireTryToString () {\n\tif (hasRequiredTryToString) return tryToString;\n\thasRequiredTryToString = 1;\n\tvar $String = String;\n\n\ttryToString = function (argument) {\n\t try {\n\t return $String(argument);\n\t } catch (error) {\n\t return 'Object';\n\t }\n\t};\n\treturn tryToString;\n}\n\nvar aCallable;\nvar hasRequiredACallable;\n\nfunction requireACallable () {\n\tif (hasRequiredACallable) return aCallable;\n\thasRequiredACallable = 1;\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar tryToString = /*@__PURE__*/ requireTryToString();\n\n\tvar $TypeError = TypeError;\n\n\t// `Assert: IsCallable(argument) is true`\n\taCallable = function (argument) {\n\t if (isCallable(argument)) return argument;\n\t throw new $TypeError(tryToString(argument) + ' is not a function');\n\t};\n\treturn aCallable;\n}\n\nvar getMethod;\nvar hasRequiredGetMethod;\n\nfunction requireGetMethod () {\n\tif (hasRequiredGetMethod) return getMethod;\n\thasRequiredGetMethod = 1;\n\tvar aCallable = /*@__PURE__*/ requireACallable();\n\tvar isNullOrUndefined = /*@__PURE__*/ requireIsNullOrUndefined();\n\n\t// `GetMethod` abstract operation\n\t// https://tc39.es/ecma262/#sec-getmethod\n\tgetMethod = function (V, P) {\n\t var func = V[P];\n\t return isNullOrUndefined(func) ? undefined : aCallable(func);\n\t};\n\treturn getMethod;\n}\n\nvar ordinaryToPrimitive;\nvar hasRequiredOrdinaryToPrimitive;\n\nfunction requireOrdinaryToPrimitive () {\n\tif (hasRequiredOrdinaryToPrimitive) return ordinaryToPrimitive;\n\thasRequiredOrdinaryToPrimitive = 1;\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\n\tvar $TypeError = TypeError;\n\n\t// `OrdinaryToPrimitive` abstract operation\n\t// https://tc39.es/ecma262/#sec-ordinarytoprimitive\n\tordinaryToPrimitive = function (input, pref) {\n\t var fn, val;\n\t if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n\t if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;\n\t if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n\t throw new $TypeError(\"Can't convert object to primitive value\");\n\t};\n\treturn ordinaryToPrimitive;\n}\n\nvar sharedStore = {exports: {}};\n\nvar isPure;\nvar hasRequiredIsPure;\n\nfunction requireIsPure () {\n\tif (hasRequiredIsPure) return isPure;\n\thasRequiredIsPure = 1;\n\tisPure = true;\n\treturn isPure;\n}\n\nvar defineGlobalProperty;\nvar hasRequiredDefineGlobalProperty;\n\nfunction requireDefineGlobalProperty () {\n\tif (hasRequiredDefineGlobalProperty) return defineGlobalProperty;\n\thasRequiredDefineGlobalProperty = 1;\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\n\t// eslint-disable-next-line es/no-object-defineproperty -- safe\n\tvar defineProperty = Object.defineProperty;\n\n\tdefineGlobalProperty = function (key, value) {\n\t try {\n\t defineProperty(globalThis, key, { value: value, configurable: true, writable: true });\n\t } catch (error) {\n\t globalThis[key] = value;\n\t } return value;\n\t};\n\treturn defineGlobalProperty;\n}\n\nvar hasRequiredSharedStore;\n\nfunction requireSharedStore () {\n\tif (hasRequiredSharedStore) return sharedStore.exports;\n\thasRequiredSharedStore = 1;\n\tvar IS_PURE = /*@__PURE__*/ requireIsPure();\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar defineGlobalProperty = /*@__PURE__*/ requireDefineGlobalProperty();\n\n\tvar SHARED = '__core-js_shared__';\n\tvar store = sharedStore.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});\n\n\t(store.versions || (store.versions = [])).push({\n\t version: '3.44.0',\n\t mode: IS_PURE ? 'pure' : 'global',\n\t copyright: '© 2014-2025 Denis Pushkarev (zloirock.ru)',\n\t license: 'https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE',\n\t source: 'https://github.com/zloirock/core-js'\n\t});\n\treturn sharedStore.exports;\n}\n\nvar shared;\nvar hasRequiredShared;\n\nfunction requireShared () {\n\tif (hasRequiredShared) return shared;\n\thasRequiredShared = 1;\n\tvar store = /*@__PURE__*/ requireSharedStore();\n\n\tshared = function (key, value) {\n\t return store[key] || (store[key] = value || {});\n\t};\n\treturn shared;\n}\n\nvar toObject;\nvar hasRequiredToObject;\n\nfunction requireToObject () {\n\tif (hasRequiredToObject) return toObject;\n\thasRequiredToObject = 1;\n\tvar requireObjectCoercible = /*@__PURE__*/ requireRequireObjectCoercible();\n\n\tvar $Object = Object;\n\n\t// `ToObject` abstract operation\n\t// https://tc39.es/ecma262/#sec-toobject\n\ttoObject = function (argument) {\n\t return $Object(requireObjectCoercible(argument));\n\t};\n\treturn toObject;\n}\n\nvar hasOwnProperty_1;\nvar hasRequiredHasOwnProperty;\n\nfunction requireHasOwnProperty () {\n\tif (hasRequiredHasOwnProperty) return hasOwnProperty_1;\n\thasRequiredHasOwnProperty = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar toObject = /*@__PURE__*/ requireToObject();\n\n\tvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n\t// `HasOwnProperty` abstract operation\n\t// https://tc39.es/ecma262/#sec-hasownproperty\n\t// eslint-disable-next-line es/no-object-hasown -- safe\n\thasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {\n\t return hasOwnProperty(toObject(it), key);\n\t};\n\treturn hasOwnProperty_1;\n}\n\nvar uid;\nvar hasRequiredUid;\n\nfunction requireUid () {\n\tif (hasRequiredUid) return uid;\n\thasRequiredUid = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\n\tvar id = 0;\n\tvar postfix = Math.random();\n\tvar toString = uncurryThis(1.1.toString);\n\n\tuid = function (key) {\n\t return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n\t};\n\treturn uid;\n}\n\nvar wellKnownSymbol;\nvar hasRequiredWellKnownSymbol;\n\nfunction requireWellKnownSymbol () {\n\tif (hasRequiredWellKnownSymbol) return wellKnownSymbol;\n\thasRequiredWellKnownSymbol = 1;\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar shared = /*@__PURE__*/ requireShared();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar uid = /*@__PURE__*/ requireUid();\n\tvar NATIVE_SYMBOL = /*@__PURE__*/ requireSymbolConstructorDetection();\n\tvar USE_SYMBOL_AS_UID = /*@__PURE__*/ requireUseSymbolAsUid();\n\n\tvar Symbol = globalThis.Symbol;\n\tvar WellKnownSymbolsStore = shared('wks');\n\tvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;\n\n\twellKnownSymbol = function (name) {\n\t if (!hasOwn(WellKnownSymbolsStore, name)) {\n\t WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)\n\t ? Symbol[name]\n\t : createWellKnownSymbol('Symbol.' + name);\n\t } return WellKnownSymbolsStore[name];\n\t};\n\treturn wellKnownSymbol;\n}\n\nvar toPrimitive$6;\nvar hasRequiredToPrimitive$5;\n\nfunction requireToPrimitive$5 () {\n\tif (hasRequiredToPrimitive$5) return toPrimitive$6;\n\thasRequiredToPrimitive$5 = 1;\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar isSymbol = /*@__PURE__*/ requireIsSymbol();\n\tvar getMethod = /*@__PURE__*/ requireGetMethod();\n\tvar ordinaryToPrimitive = /*@__PURE__*/ requireOrdinaryToPrimitive();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\n\tvar $TypeError = TypeError;\n\tvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n\t// `ToPrimitive` abstract operation\n\t// https://tc39.es/ecma262/#sec-toprimitive\n\ttoPrimitive$6 = function (input, pref) {\n\t if (!isObject(input) || isSymbol(input)) return input;\n\t var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n\t var result;\n\t if (exoticToPrim) {\n\t if (pref === undefined) pref = 'default';\n\t result = call(exoticToPrim, input, pref);\n\t if (!isObject(result) || isSymbol(result)) return result;\n\t throw new $TypeError(\"Can't convert object to primitive value\");\n\t }\n\t if (pref === undefined) pref = 'number';\n\t return ordinaryToPrimitive(input, pref);\n\t};\n\treturn toPrimitive$6;\n}\n\nvar toPropertyKey$1;\nvar hasRequiredToPropertyKey;\n\nfunction requireToPropertyKey () {\n\tif (hasRequiredToPropertyKey) return toPropertyKey$1;\n\thasRequiredToPropertyKey = 1;\n\tvar toPrimitive = /*@__PURE__*/ requireToPrimitive$5();\n\tvar isSymbol = /*@__PURE__*/ requireIsSymbol();\n\n\t// `ToPropertyKey` abstract operation\n\t// https://tc39.es/ecma262/#sec-topropertykey\n\ttoPropertyKey$1 = function (argument) {\n\t var key = toPrimitive(argument, 'string');\n\t return isSymbol(key) ? key : key + '';\n\t};\n\treturn toPropertyKey$1;\n}\n\nvar documentCreateElement;\nvar hasRequiredDocumentCreateElement;\n\nfunction requireDocumentCreateElement () {\n\tif (hasRequiredDocumentCreateElement) return documentCreateElement;\n\thasRequiredDocumentCreateElement = 1;\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\n\tvar document = globalThis.document;\n\t// typeof document.createElement is 'object' in old IE\n\tvar EXISTS = isObject(document) && isObject(document.createElement);\n\n\tdocumentCreateElement = function (it) {\n\t return EXISTS ? document.createElement(it) : {};\n\t};\n\treturn documentCreateElement;\n}\n\nvar ie8DomDefine;\nvar hasRequiredIe8DomDefine;\n\nfunction requireIe8DomDefine () {\n\tif (hasRequiredIe8DomDefine) return ie8DomDefine;\n\thasRequiredIe8DomDefine = 1;\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar createElement = /*@__PURE__*/ requireDocumentCreateElement();\n\n\t// Thanks to IE8 for its funny defineProperty\n\tie8DomDefine = !DESCRIPTORS && !fails(function () {\n\t // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n\t return Object.defineProperty(createElement('div'), 'a', {\n\t get: function () { return 7; }\n\t }).a !== 7;\n\t});\n\treturn ie8DomDefine;\n}\n\nvar hasRequiredObjectGetOwnPropertyDescriptor;\n\nfunction requireObjectGetOwnPropertyDescriptor () {\n\tif (hasRequiredObjectGetOwnPropertyDescriptor) return objectGetOwnPropertyDescriptor;\n\thasRequiredObjectGetOwnPropertyDescriptor = 1;\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\tvar propertyIsEnumerableModule = /*@__PURE__*/ requireObjectPropertyIsEnumerable();\n\tvar createPropertyDescriptor = /*@__PURE__*/ requireCreatePropertyDescriptor();\n\tvar toIndexedObject = /*@__PURE__*/ requireToIndexedObject();\n\tvar toPropertyKey = /*@__PURE__*/ requireToPropertyKey();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar IE8_DOM_DEFINE = /*@__PURE__*/ requireIe8DomDefine();\n\n\t// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n\tvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n\t// `Object.getOwnPropertyDescriptor` method\n\t// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\n\tobjectGetOwnPropertyDescriptor.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n\t O = toIndexedObject(O);\n\t P = toPropertyKey(P);\n\t if (IE8_DOM_DEFINE) try {\n\t return $getOwnPropertyDescriptor(O, P);\n\t } catch (error) { /* empty */ }\n\t if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n\t};\n\treturn objectGetOwnPropertyDescriptor;\n}\n\nvar isForced_1;\nvar hasRequiredIsForced;\n\nfunction requireIsForced () {\n\tif (hasRequiredIsForced) return isForced_1;\n\thasRequiredIsForced = 1;\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\n\tvar replacement = /#|\\.prototype\\./;\n\n\tvar isForced = function (feature, detection) {\n\t var value = data[normalize(feature)];\n\t return value === POLYFILL ? true\n\t : value === NATIVE ? false\n\t : isCallable(detection) ? fails(detection)\n\t : !!detection;\n\t};\n\n\tvar normalize = isForced.normalize = function (string) {\n\t return String(string).replace(replacement, '.').toLowerCase();\n\t};\n\n\tvar data = isForced.data = {};\n\tvar NATIVE = isForced.NATIVE = 'N';\n\tvar POLYFILL = isForced.POLYFILL = 'P';\n\n\tisForced_1 = isForced;\n\treturn isForced_1;\n}\n\nvar functionBindContext;\nvar hasRequiredFunctionBindContext;\n\nfunction requireFunctionBindContext () {\n\tif (hasRequiredFunctionBindContext) return functionBindContext;\n\thasRequiredFunctionBindContext = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThisClause();\n\tvar aCallable = /*@__PURE__*/ requireACallable();\n\tvar NATIVE_BIND = /*@__PURE__*/ requireFunctionBindNative();\n\n\tvar bind = uncurryThis(uncurryThis.bind);\n\n\t// optional / simple context binding\n\tfunctionBindContext = function (fn, that) {\n\t aCallable(fn);\n\t return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {\n\t return fn.apply(that, arguments);\n\t };\n\t};\n\treturn functionBindContext;\n}\n\nvar objectDefineProperty = {};\n\nvar v8PrototypeDefineBug;\nvar hasRequiredV8PrototypeDefineBug;\n\nfunction requireV8PrototypeDefineBug () {\n\tif (hasRequiredV8PrototypeDefineBug) return v8PrototypeDefineBug;\n\thasRequiredV8PrototypeDefineBug = 1;\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar fails = /*@__PURE__*/ requireFails();\n\n\t// V8 ~ Chrome 36-\n\t// https://bugs.chromium.org/p/v8/issues/detail?id=3334\n\tv8PrototypeDefineBug = DESCRIPTORS && fails(function () {\n\t // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n\t return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n\t value: 42,\n\t writable: false\n\t }).prototype !== 42;\n\t});\n\treturn v8PrototypeDefineBug;\n}\n\nvar anObject;\nvar hasRequiredAnObject;\n\nfunction requireAnObject () {\n\tif (hasRequiredAnObject) return anObject;\n\thasRequiredAnObject = 1;\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\n\tvar $String = String;\n\tvar $TypeError = TypeError;\n\n\t// `Assert: Type(argument) is Object`\n\tanObject = function (argument) {\n\t if (isObject(argument)) return argument;\n\t throw new $TypeError($String(argument) + ' is not an object');\n\t};\n\treturn anObject;\n}\n\nvar hasRequiredObjectDefineProperty;\n\nfunction requireObjectDefineProperty () {\n\tif (hasRequiredObjectDefineProperty) return objectDefineProperty;\n\thasRequiredObjectDefineProperty = 1;\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar IE8_DOM_DEFINE = /*@__PURE__*/ requireIe8DomDefine();\n\tvar V8_PROTOTYPE_DEFINE_BUG = /*@__PURE__*/ requireV8PrototypeDefineBug();\n\tvar anObject = /*@__PURE__*/ requireAnObject();\n\tvar toPropertyKey = /*@__PURE__*/ requireToPropertyKey();\n\n\tvar $TypeError = TypeError;\n\t// eslint-disable-next-line es/no-object-defineproperty -- safe\n\tvar $defineProperty = Object.defineProperty;\n\t// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n\tvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\tvar ENUMERABLE = 'enumerable';\n\tvar CONFIGURABLE = 'configurable';\n\tvar WRITABLE = 'writable';\n\n\t// `Object.defineProperty` method\n\t// https://tc39.es/ecma262/#sec-object.defineproperty\n\tobjectDefineProperty.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n\t anObject(O);\n\t P = toPropertyKey(P);\n\t anObject(Attributes);\n\t if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n\t var current = $getOwnPropertyDescriptor(O, P);\n\t if (current && current[WRITABLE]) {\n\t O[P] = Attributes.value;\n\t Attributes = {\n\t configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n\t enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n\t writable: false\n\t };\n\t }\n\t } return $defineProperty(O, P, Attributes);\n\t} : $defineProperty : function defineProperty(O, P, Attributes) {\n\t anObject(O);\n\t P = toPropertyKey(P);\n\t anObject(Attributes);\n\t if (IE8_DOM_DEFINE) try {\n\t return $defineProperty(O, P, Attributes);\n\t } catch (error) { /* empty */ }\n\t if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');\n\t if ('value' in Attributes) O[P] = Attributes.value;\n\t return O;\n\t};\n\treturn objectDefineProperty;\n}\n\nvar createNonEnumerableProperty;\nvar hasRequiredCreateNonEnumerableProperty;\n\nfunction requireCreateNonEnumerableProperty () {\n\tif (hasRequiredCreateNonEnumerableProperty) return createNonEnumerableProperty;\n\thasRequiredCreateNonEnumerableProperty = 1;\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar definePropertyModule = /*@__PURE__*/ requireObjectDefineProperty();\n\tvar createPropertyDescriptor = /*@__PURE__*/ requireCreatePropertyDescriptor();\n\n\tcreateNonEnumerableProperty = DESCRIPTORS ? function (object, key, value) {\n\t return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n\t} : function (object, key, value) {\n\t object[key] = value;\n\t return object;\n\t};\n\treturn createNonEnumerableProperty;\n}\n\nvar _export;\nvar hasRequired_export;\n\nfunction require_export () {\n\tif (hasRequired_export) return _export;\n\thasRequired_export = 1;\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar apply = /*@__PURE__*/ requireFunctionApply();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThisClause();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar getOwnPropertyDescriptor = /*@__PURE__*/ requireObjectGetOwnPropertyDescriptor().f;\n\tvar isForced = /*@__PURE__*/ requireIsForced();\n\tvar path = /*@__PURE__*/ requirePath();\n\tvar bind = /*@__PURE__*/ requireFunctionBindContext();\n\tvar createNonEnumerableProperty = /*@__PURE__*/ requireCreateNonEnumerableProperty();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\n\tvar wrapConstructor = function (NativeConstructor) {\n\t var Wrapper = function (a, b, c) {\n\t if (this instanceof Wrapper) {\n\t switch (arguments.length) {\n\t case 0: return new NativeConstructor();\n\t case 1: return new NativeConstructor(a);\n\t case 2: return new NativeConstructor(a, b);\n\t } return new NativeConstructor(a, b, c);\n\t } return apply(NativeConstructor, this, arguments);\n\t };\n\t Wrapper.prototype = NativeConstructor.prototype;\n\t return Wrapper;\n\t};\n\n\t/*\n\t options.target - name of the target object\n\t options.global - target is the global object\n\t options.stat - export as static methods of target\n\t options.proto - export as prototype methods of target\n\t options.real - real prototype method for the `pure` version\n\t options.forced - export even if the native feature is available\n\t options.bind - bind methods to the target, required for the `pure` version\n\t options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n\t options.unsafe - use the simple assignment of property instead of delete + defineProperty\n\t options.sham - add a flag to not completely full polyfills\n\t options.enumerable - export as enumerable property\n\t options.dontCallGetSet - prevent calling a getter on target\n\t options.name - the .name of the function if it does not match the key\n\t*/\n\t_export = function (options, source) {\n\t var TARGET = options.target;\n\t var GLOBAL = options.global;\n\t var STATIC = options.stat;\n\t var PROTO = options.proto;\n\n\t var nativeSource = GLOBAL ? globalThis : STATIC ? globalThis[TARGET] : globalThis[TARGET] && globalThis[TARGET].prototype;\n\n\t var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];\n\t var targetPrototype = target.prototype;\n\n\t var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;\n\t var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;\n\n\t for (key in source) {\n\t FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n\t // contains in native\n\t USE_NATIVE = !FORCED && nativeSource && hasOwn(nativeSource, key);\n\n\t targetProperty = target[key];\n\n\t if (USE_NATIVE) if (options.dontCallGetSet) {\n\t descriptor = getOwnPropertyDescriptor(nativeSource, key);\n\t nativeProperty = descriptor && descriptor.value;\n\t } else nativeProperty = nativeSource[key];\n\n\t // export native or implementation\n\t sourceProperty = (USE_NATIVE && nativeProperty) ? nativeProperty : source[key];\n\n\t if (!FORCED && !PROTO && typeof targetProperty == typeof sourceProperty) continue;\n\n\t // bind methods to global for calling from export context\n\t if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, globalThis);\n\t // wrap global constructors for prevent changes in this version\n\t else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);\n\t // make static versions for prototype methods\n\t else if (PROTO && isCallable(sourceProperty)) resultProperty = uncurryThis(sourceProperty);\n\t // default case\n\t else resultProperty = sourceProperty;\n\n\t // add a flag to not completely full polyfills\n\t if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) {\n\t createNonEnumerableProperty(resultProperty, 'sham', true);\n\t }\n\n\t createNonEnumerableProperty(target, key, resultProperty);\n\n\t if (PROTO) {\n\t VIRTUAL_PROTOTYPE = TARGET + 'Prototype';\n\t if (!hasOwn(path, VIRTUAL_PROTOTYPE)) {\n\t createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});\n\t }\n\t // export virtual prototype methods\n\t createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);\n\t // export real prototype methods\n\t if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) {\n\t createNonEnumerableProperty(targetPrototype, key, sourceProperty);\n\t }\n\t }\n\t }\n\t};\n\treturn _export;\n}\n\nvar mathTrunc;\nvar hasRequiredMathTrunc;\n\nfunction requireMathTrunc () {\n\tif (hasRequiredMathTrunc) return mathTrunc;\n\thasRequiredMathTrunc = 1;\n\tvar ceil = Math.ceil;\n\tvar floor = Math.floor;\n\n\t// `Math.trunc` method\n\t// https://tc39.es/ecma262/#sec-math.trunc\n\t// eslint-disable-next-line es/no-math-trunc -- safe\n\tmathTrunc = Math.trunc || function trunc(x) {\n\t var n = +x;\n\t return (n > 0 ? floor : ceil)(n);\n\t};\n\treturn mathTrunc;\n}\n\nvar toIntegerOrInfinity;\nvar hasRequiredToIntegerOrInfinity;\n\nfunction requireToIntegerOrInfinity () {\n\tif (hasRequiredToIntegerOrInfinity) return toIntegerOrInfinity;\n\thasRequiredToIntegerOrInfinity = 1;\n\tvar trunc = /*@__PURE__*/ requireMathTrunc();\n\n\t// `ToIntegerOrInfinity` abstract operation\n\t// https://tc39.es/ecma262/#sec-tointegerorinfinity\n\ttoIntegerOrInfinity = function (argument) {\n\t var number = +argument;\n\t // eslint-disable-next-line no-self-compare -- NaN check\n\t return number !== number || number === 0 ? 0 : trunc(number);\n\t};\n\treturn toIntegerOrInfinity;\n}\n\nvar toAbsoluteIndex;\nvar hasRequiredToAbsoluteIndex;\n\nfunction requireToAbsoluteIndex () {\n\tif (hasRequiredToAbsoluteIndex) return toAbsoluteIndex;\n\thasRequiredToAbsoluteIndex = 1;\n\tvar toIntegerOrInfinity = /*@__PURE__*/ requireToIntegerOrInfinity();\n\n\tvar max = Math.max;\n\tvar min = Math.min;\n\n\t// Helper for a popular repeating case of the spec:\n\t// Let integer be ? ToInteger(index).\n\t// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\n\ttoAbsoluteIndex = function (index, length) {\n\t var integer = toIntegerOrInfinity(index);\n\t return integer < 0 ? max(integer + length, 0) : min(integer, length);\n\t};\n\treturn toAbsoluteIndex;\n}\n\nvar toLength;\nvar hasRequiredToLength;\n\nfunction requireToLength () {\n\tif (hasRequiredToLength) return toLength;\n\thasRequiredToLength = 1;\n\tvar toIntegerOrInfinity = /*@__PURE__*/ requireToIntegerOrInfinity();\n\n\tvar min = Math.min;\n\n\t// `ToLength` abstract operation\n\t// https://tc39.es/ecma262/#sec-tolength\n\ttoLength = function (argument) {\n\t var len = toIntegerOrInfinity(argument);\n\t return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n\t};\n\treturn toLength;\n}\n\nvar lengthOfArrayLike;\nvar hasRequiredLengthOfArrayLike;\n\nfunction requireLengthOfArrayLike () {\n\tif (hasRequiredLengthOfArrayLike) return lengthOfArrayLike;\n\thasRequiredLengthOfArrayLike = 1;\n\tvar toLength = /*@__PURE__*/ requireToLength();\n\n\t// `LengthOfArrayLike` abstract operation\n\t// https://tc39.es/ecma262/#sec-lengthofarraylike\n\tlengthOfArrayLike = function (obj) {\n\t return toLength(obj.length);\n\t};\n\treturn lengthOfArrayLike;\n}\n\nvar arrayIncludes;\nvar hasRequiredArrayIncludes;\n\nfunction requireArrayIncludes () {\n\tif (hasRequiredArrayIncludes) return arrayIncludes;\n\thasRequiredArrayIncludes = 1;\n\tvar toIndexedObject = /*@__PURE__*/ requireToIndexedObject();\n\tvar toAbsoluteIndex = /*@__PURE__*/ requireToAbsoluteIndex();\n\tvar lengthOfArrayLike = /*@__PURE__*/ requireLengthOfArrayLike();\n\n\t// `Array.prototype.{ indexOf, includes }` methods implementation\n\tvar createMethod = function (IS_INCLUDES) {\n\t return function ($this, el, fromIndex) {\n\t var O = toIndexedObject($this);\n\t var length = lengthOfArrayLike(O);\n\t if (length === 0) return !IS_INCLUDES && -1;\n\t var index = toAbsoluteIndex(fromIndex, length);\n\t var value;\n\t // Array#includes uses SameValueZero equality algorithm\n\t // eslint-disable-next-line no-self-compare -- NaN check\n\t if (IS_INCLUDES && el !== el) while (length > index) {\n\t value = O[index++];\n\t // eslint-disable-next-line no-self-compare -- NaN check\n\t if (value !== value) return true;\n\t // Array#indexOf ignores holes, Array#includes - not\n\t } else for (;length > index; index++) {\n\t if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n\t } return !IS_INCLUDES && -1;\n\t };\n\t};\n\n\tarrayIncludes = {\n\t // `Array.prototype.includes` method\n\t // https://tc39.es/ecma262/#sec-array.prototype.includes\n\t includes: createMethod(true),\n\t // `Array.prototype.indexOf` method\n\t // https://tc39.es/ecma262/#sec-array.prototype.indexof\n\t indexOf: createMethod(false)\n\t};\n\treturn arrayIncludes;\n}\n\nvar hiddenKeys;\nvar hasRequiredHiddenKeys;\n\nfunction requireHiddenKeys () {\n\tif (hasRequiredHiddenKeys) return hiddenKeys;\n\thasRequiredHiddenKeys = 1;\n\thiddenKeys = {};\n\treturn hiddenKeys;\n}\n\nvar objectKeysInternal;\nvar hasRequiredObjectKeysInternal;\n\nfunction requireObjectKeysInternal () {\n\tif (hasRequiredObjectKeysInternal) return objectKeysInternal;\n\thasRequiredObjectKeysInternal = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar toIndexedObject = /*@__PURE__*/ requireToIndexedObject();\n\tvar indexOf = /*@__PURE__*/ requireArrayIncludes().indexOf;\n\tvar hiddenKeys = /*@__PURE__*/ requireHiddenKeys();\n\n\tvar push = uncurryThis([].push);\n\n\tobjectKeysInternal = function (object, names) {\n\t var O = toIndexedObject(object);\n\t var i = 0;\n\t var result = [];\n\t var key;\n\t for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n\t // Don't enum bug & hidden keys\n\t while (names.length > i) if (hasOwn(O, key = names[i++])) {\n\t ~indexOf(result, key) || push(result, key);\n\t }\n\t return result;\n\t};\n\treturn objectKeysInternal;\n}\n\nvar enumBugKeys;\nvar hasRequiredEnumBugKeys;\n\nfunction requireEnumBugKeys () {\n\tif (hasRequiredEnumBugKeys) return enumBugKeys;\n\thasRequiredEnumBugKeys = 1;\n\t// IE8- don't enum bug keys\n\tenumBugKeys = [\n\t 'constructor',\n\t 'hasOwnProperty',\n\t 'isPrototypeOf',\n\t 'propertyIsEnumerable',\n\t 'toLocaleString',\n\t 'toString',\n\t 'valueOf'\n\t];\n\treturn enumBugKeys;\n}\n\nvar objectKeys;\nvar hasRequiredObjectKeys;\n\nfunction requireObjectKeys () {\n\tif (hasRequiredObjectKeys) return objectKeys;\n\thasRequiredObjectKeys = 1;\n\tvar internalObjectKeys = /*@__PURE__*/ requireObjectKeysInternal();\n\tvar enumBugKeys = /*@__PURE__*/ requireEnumBugKeys();\n\n\t// `Object.keys` method\n\t// https://tc39.es/ecma262/#sec-object.keys\n\t// eslint-disable-next-line es/no-object-keys -- safe\n\tobjectKeys = Object.keys || function keys(O) {\n\t return internalObjectKeys(O, enumBugKeys);\n\t};\n\treturn objectKeys;\n}\n\nvar objectGetOwnPropertySymbols = {};\n\nvar hasRequiredObjectGetOwnPropertySymbols;\n\nfunction requireObjectGetOwnPropertySymbols () {\n\tif (hasRequiredObjectGetOwnPropertySymbols) return objectGetOwnPropertySymbols;\n\thasRequiredObjectGetOwnPropertySymbols = 1;\n\t// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\n\tobjectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;\n\treturn objectGetOwnPropertySymbols;\n}\n\nvar objectAssign;\nvar hasRequiredObjectAssign;\n\nfunction requireObjectAssign () {\n\tif (hasRequiredObjectAssign) return objectAssign;\n\thasRequiredObjectAssign = 1;\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar objectKeys = /*@__PURE__*/ requireObjectKeys();\n\tvar getOwnPropertySymbolsModule = /*@__PURE__*/ requireObjectGetOwnPropertySymbols();\n\tvar propertyIsEnumerableModule = /*@__PURE__*/ requireObjectPropertyIsEnumerable();\n\tvar toObject = /*@__PURE__*/ requireToObject();\n\tvar IndexedObject = /*@__PURE__*/ requireIndexedObject();\n\n\t// eslint-disable-next-line es/no-object-assign -- safe\n\tvar $assign = Object.assign;\n\t// eslint-disable-next-line es/no-object-defineproperty -- required for testing\n\tvar defineProperty = Object.defineProperty;\n\tvar concat = uncurryThis([].concat);\n\n\t// `Object.assign` method\n\t// https://tc39.es/ecma262/#sec-object.assign\n\tobjectAssign = !$assign || fails(function () {\n\t // should have correct order of operations (Edge bug)\n\t if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n\t enumerable: true,\n\t get: function () {\n\t defineProperty(this, 'b', {\n\t value: 3,\n\t enumerable: false\n\t });\n\t }\n\t }), { b: 2 })).b !== 1) return true;\n\t // should work with symbols and should have deterministic property order (V8 bug)\n\t var A = {};\n\t var B = {};\n\t // eslint-disable-next-line es/no-symbol -- safe\n\t var symbol = Symbol('assign detection');\n\t var alphabet = 'abcdefghijklmnopqrst';\n\t A[symbol] = 7;\n\t // eslint-disable-next-line es/no-array-prototype-foreach -- safe\n\t alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n\t return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;\n\t}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n\t var T = toObject(target);\n\t var argumentsLength = arguments.length;\n\t var index = 1;\n\t var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n\t var propertyIsEnumerable = propertyIsEnumerableModule.f;\n\t while (argumentsLength > index) {\n\t var S = IndexedObject(arguments[index++]);\n\t var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);\n\t var length = keys.length;\n\t var j = 0;\n\t var key;\n\t while (length > j) {\n\t key = keys[j++];\n\t if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];\n\t }\n\t } return T;\n\t} : $assign;\n\treturn objectAssign;\n}\n\nvar hasRequiredEs_object_assign;\n\nfunction requireEs_object_assign () {\n\tif (hasRequiredEs_object_assign) return es_object_assign;\n\thasRequiredEs_object_assign = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar assign = /*@__PURE__*/ requireObjectAssign();\n\n\t// `Object.assign` method\n\t// https://tc39.es/ecma262/#sec-object.assign\n\t// eslint-disable-next-line es/no-object-assign -- required for testing\n\t$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {\n\t assign: assign\n\t});\n\treturn es_object_assign;\n}\n\nvar assign$4;\nvar hasRequiredAssign$2;\n\nfunction requireAssign$2 () {\n\tif (hasRequiredAssign$2) return assign$4;\n\thasRequiredAssign$2 = 1;\n\trequireEs_object_assign();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tassign$4 = path.Object.assign;\n\treturn assign$4;\n}\n\nvar assign$3;\nvar hasRequiredAssign$1;\n\nfunction requireAssign$1 () {\n\tif (hasRequiredAssign$1) return assign$3;\n\thasRequiredAssign$1 = 1;\n\tvar parent = /*@__PURE__*/ requireAssign$2();\n\n\tassign$3 = parent;\n\treturn assign$3;\n}\n\nvar assign$2;\nvar hasRequiredAssign;\n\nfunction requireAssign () {\n\tif (hasRequiredAssign) return assign$2;\n\thasRequiredAssign = 1;\n\tassign$2 = /*@__PURE__*/ requireAssign$1();\n\treturn assign$2;\n}\n\nvar assignExports = requireAssign();\nvar _Object$assign = /*@__PURE__*/getDefaultExportFromCjs(assignExports);\n\nvar es_function_bind = {};\n\nvar arraySlice;\nvar hasRequiredArraySlice;\n\nfunction requireArraySlice () {\n\tif (hasRequiredArraySlice) return arraySlice;\n\thasRequiredArraySlice = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\n\tarraySlice = uncurryThis([].slice);\n\treturn arraySlice;\n}\n\nvar functionBind;\nvar hasRequiredFunctionBind;\n\nfunction requireFunctionBind () {\n\tif (hasRequiredFunctionBind) return functionBind;\n\thasRequiredFunctionBind = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar aCallable = /*@__PURE__*/ requireACallable();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar arraySlice = /*@__PURE__*/ requireArraySlice();\n\tvar NATIVE_BIND = /*@__PURE__*/ requireFunctionBindNative();\n\n\tvar $Function = Function;\n\tvar concat = uncurryThis([].concat);\n\tvar join = uncurryThis([].join);\n\tvar factories = {};\n\n\tvar construct = function (C, argsLength, args) {\n\t if (!hasOwn(factories, argsLength)) {\n\t var list = [];\n\t var i = 0;\n\t for (; i < argsLength; i++) list[i] = 'a[' + i + ']';\n\t factories[argsLength] = $Function('C,a', 'return new C(' + join(list, ',') + ')');\n\t } return factories[argsLength](C, args);\n\t};\n\n\t// `Function.prototype.bind` method implementation\n\t// https://tc39.es/ecma262/#sec-function.prototype.bind\n\t// eslint-disable-next-line es/no-function-prototype-bind -- detection\n\tfunctionBind = NATIVE_BIND ? $Function.bind : function bind(that /* , ...args */) {\n\t var F = aCallable(this);\n\t var Prototype = F.prototype;\n\t var partArgs = arraySlice(arguments, 1);\n\t var boundFunction = function bound(/* args... */) {\n\t var args = concat(partArgs, arraySlice(arguments));\n\t return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);\n\t };\n\t if (isObject(Prototype)) boundFunction.prototype = Prototype;\n\t return boundFunction;\n\t};\n\treturn functionBind;\n}\n\nvar hasRequiredEs_function_bind;\n\nfunction requireEs_function_bind () {\n\tif (hasRequiredEs_function_bind) return es_function_bind;\n\thasRequiredEs_function_bind = 1;\n\t// TODO: Remove from `core-js@4`\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar bind = /*@__PURE__*/ requireFunctionBind();\n\n\t// `Function.prototype.bind` method\n\t// https://tc39.es/ecma262/#sec-function.prototype.bind\n\t// eslint-disable-next-line es/no-function-prototype-bind -- detection\n\t$({ target: 'Function', proto: true, forced: Function.bind !== bind }, {\n\t bind: bind\n\t});\n\treturn es_function_bind;\n}\n\nvar getBuiltInPrototypeMethod;\nvar hasRequiredGetBuiltInPrototypeMethod;\n\nfunction requireGetBuiltInPrototypeMethod () {\n\tif (hasRequiredGetBuiltInPrototypeMethod) return getBuiltInPrototypeMethod;\n\thasRequiredGetBuiltInPrototypeMethod = 1;\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tgetBuiltInPrototypeMethod = function (CONSTRUCTOR, METHOD) {\n\t var Namespace = path[CONSTRUCTOR + 'Prototype'];\n\t var pureMethod = Namespace && Namespace[METHOD];\n\t if (pureMethod) return pureMethod;\n\t var NativeConstructor = globalThis[CONSTRUCTOR];\n\t var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n\t return NativePrototype && NativePrototype[METHOD];\n\t};\n\treturn getBuiltInPrototypeMethod;\n}\n\nvar bind$3;\nvar hasRequiredBind$3;\n\nfunction requireBind$3 () {\n\tif (hasRequiredBind$3) return bind$3;\n\thasRequiredBind$3 = 1;\n\trequireEs_function_bind();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tbind$3 = getBuiltInPrototypeMethod('Function', 'bind');\n\treturn bind$3;\n}\n\nvar bind$2;\nvar hasRequiredBind$2;\n\nfunction requireBind$2 () {\n\tif (hasRequiredBind$2) return bind$2;\n\thasRequiredBind$2 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireBind$3();\n\n\tvar FunctionPrototype = Function.prototype;\n\n\tbind$2 = function (it) {\n\t var own = it.bind;\n\t return it === FunctionPrototype || (isPrototypeOf(FunctionPrototype, it) && own === FunctionPrototype.bind) ? method : own;\n\t};\n\treturn bind$2;\n}\n\nvar bind$1;\nvar hasRequiredBind$1;\n\nfunction requireBind$1 () {\n\tif (hasRequiredBind$1) return bind$1;\n\thasRequiredBind$1 = 1;\n\tvar parent = /*@__PURE__*/ requireBind$2();\n\n\tbind$1 = parent;\n\treturn bind$1;\n}\n\nvar bind;\nvar hasRequiredBind;\n\nfunction requireBind () {\n\tif (hasRequiredBind) return bind;\n\thasRequiredBind = 1;\n\tbind = /*@__PURE__*/ requireBind$1();\n\treturn bind;\n}\n\nvar bindExports = requireBind();\nvar _bindInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(bindExports);\n\n/**\n * Draw a circle.\n * @param ctx - The context this shape will be rendered to.\n * @param x - The position of the center on the x axis.\n * @param y - The position of the center on the y axis.\n * @param r - The radius of the circle.\n */\nfunction drawCircle(ctx, x, y, r) {\n ctx.beginPath();\n ctx.arc(x, y, r, 0, 2 * Math.PI, false);\n ctx.closePath();\n}\n/**\n * Draw a square.\n * @param ctx - The context this shape will be rendered to.\n * @param x - The position of the center on the x axis.\n * @param y - The position of the center on the y axis.\n * @param r - Half of the width and height of the square.\n */\nfunction drawSquare(ctx, x, y, r) {\n ctx.beginPath();\n ctx.rect(x - r, y - r, r * 2, r * 2);\n ctx.closePath();\n}\n/**\n * Draw an equilateral triangle standing on a side.\n * @param ctx - The context this shape will be rendered to.\n * @param x - The position of the center on the x axis.\n * @param y - The position of the center on the y axis.\n * @param r - Half of the length of the sides.\n * @remarks\n * http://en.wikipedia.org/wiki/Equilateral_triangle\n */\nfunction drawTriangle(ctx, x, y, r) {\n ctx.beginPath();\n // the change in radius and the offset is here to center the shape\n r *= 1.15;\n y += 0.275 * r;\n const s = r * 2;\n const s2 = s / 2;\n const ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n const h = Math.sqrt(s * s - s2 * s2); // height\n ctx.moveTo(x, y - (h - ir));\n ctx.lineTo(x + s2, y + ir);\n ctx.lineTo(x - s2, y + ir);\n ctx.lineTo(x, y - (h - ir));\n ctx.closePath();\n}\n/**\n * Draw an equilateral triangle standing on a vertex.\n * @param ctx - The context this shape will be rendered to.\n * @param x - The position of the center on the x axis.\n * @param y - The position of the center on the y axis.\n * @param r - Half of the length of the sides.\n * @remarks\n * http://en.wikipedia.org/wiki/Equilateral_triangle\n */\nfunction drawTriangleDown(ctx, x, y, r) {\n ctx.beginPath();\n // the change in radius and the offset is here to center the shape\n r *= 1.15;\n y -= 0.275 * r;\n const s = r * 2;\n const s2 = s / 2;\n const ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n const h = Math.sqrt(s * s - s2 * s2); // height\n ctx.moveTo(x, y + (h - ir));\n ctx.lineTo(x + s2, y - ir);\n ctx.lineTo(x - s2, y - ir);\n ctx.lineTo(x, y + (h - ir));\n ctx.closePath();\n}\n/**\n * Draw a star.\n * @param ctx - The context this shape will be rendered to.\n * @param x - The position of the center on the x axis.\n * @param y - The position of the center on the y axis.\n * @param r - The outer radius of the star.\n */\nfunction drawStar(ctx, x, y, r) {\n // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\n ctx.beginPath();\n // the change in radius and the offset is here to center the shape\n r *= 0.82;\n y += 0.1 * r;\n for (let n = 0; n < 10; n++) {\n const radius = n % 2 === 0 ? r * 1.3 : r * 0.5;\n ctx.lineTo(x + radius * Math.sin(n * 2 * Math.PI / 10), y - radius * Math.cos(n * 2 * Math.PI / 10));\n }\n ctx.closePath();\n}\n/**\n * Draw a diamond.\n * @param ctx - The context this shape will be rendered to.\n * @param x - The position of the center on the x axis.\n * @param y - The position of the center on the y axis.\n * @param r - Half of the width and height of the diamond.\n * @remarks\n * http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\n */\nfunction drawDiamond(ctx, x, y, r) {\n ctx.beginPath();\n ctx.lineTo(x, y + r);\n ctx.lineTo(x + r, y);\n ctx.lineTo(x, y - r);\n ctx.lineTo(x - r, y);\n ctx.closePath();\n}\n/**\n * Draw a rectangle with rounded corners.\n * @param ctx - The context this shape will be rendered to.\n * @param x - The position of the center on the x axis.\n * @param y - The position of the center on the y axis.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @param r - The radius of the corners.\n * @remarks\n * http://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-on-html-canvas\n */\nfunction drawRoundRect(ctx, x, y, w, h, r) {\n const r2d = Math.PI / 180;\n if (w - 2 * r < 0) {\n r = w / 2;\n } //ensure that the radius isn't too large for x\n if (h - 2 * r < 0) {\n r = h / 2;\n } //ensure that the radius isn't too large for y\n ctx.beginPath();\n ctx.moveTo(x + r, y);\n ctx.lineTo(x + w - r, y);\n ctx.arc(x + w - r, y + r, r, r2d * 270, r2d * 360, false);\n ctx.lineTo(x + w, y + h - r);\n ctx.arc(x + w - r, y + h - r, r, 0, r2d * 90, false);\n ctx.lineTo(x + r, y + h);\n ctx.arc(x + r, y + h - r, r, r2d * 90, r2d * 180, false);\n ctx.lineTo(x, y + r);\n ctx.arc(x + r, y + r, r, r2d * 180, r2d * 270, false);\n ctx.closePath();\n}\n/**\n * Draw an ellipse.\n * @param ctx - The context this shape will be rendered to.\n * @param x - The position of the center on the x axis.\n * @param y - The position of the center on the y axis.\n * @param w - The width of the ellipse.\n * @param h - The height of the ellipse.\n * @remarks\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n *\n * Postfix '_vis' added to discern it from standard method ellipse().\n */\nfunction drawEllipse(ctx, x, y, w, h) {\n const kappa = 0.5522848,\n ox = w / 2 * kappa,\n // control point offset horizontal\n oy = h / 2 * kappa,\n // control point offset vertical\n xe = x + w,\n // x-end\n ye = y + h,\n // y-end\n xm = x + w / 2,\n // x-middle\n ym = y + h / 2; // y-middle\n ctx.beginPath();\n ctx.moveTo(x, ym);\n ctx.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n ctx.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n ctx.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n ctx.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n ctx.closePath();\n}\n/**\n * Draw an isometric cylinder.\n * @param ctx - The context this shape will be rendered to.\n * @param x - The position of the center on the x axis.\n * @param y - The position of the center on the y axis.\n * @param w - The width of the database.\n * @param h - The height of the database.\n * @remarks\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n */\nfunction drawDatabase(ctx, x, y, w, h) {\n const f = 1 / 3;\n const wEllipse = w;\n const hEllipse = h * f;\n const kappa = 0.5522848,\n ox = wEllipse / 2 * kappa,\n // control point offset horizontal\n oy = hEllipse / 2 * kappa,\n // control point offset vertical\n xe = x + wEllipse,\n // x-end\n ye = y + hEllipse,\n // y-end\n xm = x + wEllipse / 2,\n // x-middle\n ym = y + hEllipse / 2,\n // y-middle\n ymb = y + (h - hEllipse / 2),\n // y-midlle, bottom ellipse\n yeb = y + h; // y-end, bottom ellipse\n ctx.beginPath();\n ctx.moveTo(xe, ym);\n ctx.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n ctx.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n ctx.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n ctx.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n ctx.lineTo(xe, ymb);\n ctx.bezierCurveTo(xe, ymb + oy, xm + ox, yeb, xm, yeb);\n ctx.bezierCurveTo(xm - ox, yeb, x, ymb + oy, x, ymb);\n ctx.lineTo(x, ym);\n}\n/**\n * Draw a dashed line.\n * @param ctx - The context this shape will be rendered to.\n * @param x - The start position on the x axis.\n * @param y - The start position on the y axis.\n * @param x2 - The end position on the x axis.\n * @param y2 - The end position on the y axis.\n * @param pattern - List of lengths starting with line and then alternating between space and line.\n * @author David Jordan\n * @remarks\n * date 2012-08-08\n * http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas\n */\nfunction drawDashedLine(ctx, x, y, x2, y2, pattern) {\n ctx.beginPath();\n ctx.moveTo(x, y);\n const patternLength = pattern.length;\n const dx = x2 - x;\n const dy = y2 - y;\n const slope = dy / dx;\n let distRemaining = Math.sqrt(dx * dx + dy * dy);\n let patternIndex = 0;\n let draw = true;\n let xStep = 0;\n let dashLength = +pattern[0];\n while (distRemaining >= 0.1) {\n dashLength = +pattern[patternIndex++ % patternLength];\n if (dashLength > distRemaining) {\n dashLength = distRemaining;\n }\n xStep = Math.sqrt(dashLength * dashLength / (1 + slope * slope));\n xStep = dx < 0 ? -xStep : xStep;\n x += xStep;\n y += slope * xStep;\n if (draw === true) {\n ctx.lineTo(x, y);\n } else {\n ctx.moveTo(x, y);\n }\n distRemaining -= dashLength;\n draw = !draw;\n }\n}\n/**\n * Draw a hexagon.\n * @param ctx - The context this shape will be rendered to.\n * @param x - The position of the center on the x axis.\n * @param y - The position of the center on the y axis.\n * @param r - The radius of the hexagon.\n */\nfunction drawHexagon(ctx, x, y, r) {\n ctx.beginPath();\n const sides = 6;\n const a = Math.PI * 2 / sides;\n ctx.moveTo(x + r, y);\n for (let i = 1; i < sides; i++) {\n ctx.lineTo(x + r * Math.cos(a * i), y + r * Math.sin(a * i));\n }\n ctx.closePath();\n}\nconst shapeMap = {\n circle: drawCircle,\n dashedLine: drawDashedLine,\n database: drawDatabase,\n diamond: drawDiamond,\n ellipse: drawEllipse,\n ellipse_vis: drawEllipse,\n hexagon: drawHexagon,\n roundRect: drawRoundRect,\n square: drawSquare,\n star: drawStar,\n triangle: drawTriangle,\n triangleDown: drawTriangleDown\n};\n/**\n * Returns either custom or native drawing function base on supplied name.\n * @param name - The name of the function. Either the name of a\n * CanvasRenderingContext2D property or an export from shapes.ts without the\n * draw prefix.\n * @returns The function that can be used for rendering. In case of native\n * CanvasRenderingContext2D function the API is normalized to\n * `(ctx: CanvasRenderingContext2D, ...originalArgs) => void`.\n */\nfunction getShape(name) {\n if (Object.prototype.hasOwnProperty.call(shapeMap, name)) {\n return shapeMap[name];\n } else {\n return function (ctx) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n CanvasRenderingContext2D.prototype[name].call(ctx, args);\n };\n }\n}\n\nvar componentEmitter = {exports: {}};\n\nvar hasRequiredComponentEmitter;\n\nfunction requireComponentEmitter () {\n\tif (hasRequiredComponentEmitter) return componentEmitter.exports;\n\thasRequiredComponentEmitter = 1;\n\t(function (module) {\n\t\t/**\n\t\t * Expose `Emitter`.\n\t\t */\n\n\t\t{\n\t\t module.exports = Emitter;\n\t\t}\n\n\t\t/**\n\t\t * Initialize a new `Emitter`.\n\t\t *\n\t\t * @api public\n\t\t */\n\n\t\tfunction Emitter(obj) {\n\t\t if (obj) return mixin(obj);\n\t\t}\n\t\t/**\n\t\t * Mixin the emitter properties.\n\t\t *\n\t\t * @param {Object} obj\n\t\t * @return {Object}\n\t\t * @api private\n\t\t */\n\n\t\tfunction mixin(obj) {\n\t\t for (var key in Emitter.prototype) {\n\t\t obj[key] = Emitter.prototype[key];\n\t\t }\n\t\t return obj;\n\t\t}\n\n\t\t/**\n\t\t * Listen on the given `event` with `fn`.\n\t\t *\n\t\t * @param {String} event\n\t\t * @param {Function} fn\n\t\t * @return {Emitter}\n\t\t * @api public\n\t\t */\n\n\t\tEmitter.prototype.on =\n\t\tEmitter.prototype.addEventListener = function(event, fn){\n\t\t this._callbacks = this._callbacks || {};\n\t\t (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\n\t\t .push(fn);\n\t\t return this;\n\t\t};\n\n\t\t/**\n\t\t * Adds an `event` listener that will be invoked a single\n\t\t * time then automatically removed.\n\t\t *\n\t\t * @param {String} event\n\t\t * @param {Function} fn\n\t\t * @return {Emitter}\n\t\t * @api public\n\t\t */\n\n\t\tEmitter.prototype.once = function(event, fn){\n\t\t function on() {\n\t\t this.off(event, on);\n\t\t fn.apply(this, arguments);\n\t\t }\n\n\t\t on.fn = fn;\n\t\t this.on(event, on);\n\t\t return this;\n\t\t};\n\n\t\t/**\n\t\t * Remove the given callback for `event` or all\n\t\t * registered callbacks.\n\t\t *\n\t\t * @param {String} event\n\t\t * @param {Function} fn\n\t\t * @return {Emitter}\n\t\t * @api public\n\t\t */\n\n\t\tEmitter.prototype.off =\n\t\tEmitter.prototype.removeListener =\n\t\tEmitter.prototype.removeAllListeners =\n\t\tEmitter.prototype.removeEventListener = function(event, fn){\n\t\t this._callbacks = this._callbacks || {};\n\n\t\t // all\n\t\t if (0 == arguments.length) {\n\t\t this._callbacks = {};\n\t\t return this;\n\t\t }\n\n\t\t // specific event\n\t\t var callbacks = this._callbacks['$' + event];\n\t\t if (!callbacks) return this;\n\n\t\t // remove all handlers\n\t\t if (1 == arguments.length) {\n\t\t delete this._callbacks['$' + event];\n\t\t return this;\n\t\t }\n\n\t\t // remove specific handler\n\t\t var cb;\n\t\t for (var i = 0; i < callbacks.length; i++) {\n\t\t cb = callbacks[i];\n\t\t if (cb === fn || cb.fn === fn) {\n\t\t callbacks.splice(i, 1);\n\t\t break;\n\t\t }\n\t\t }\n\n\t\t // Remove event specific arrays for event types that no\n\t\t // one is subscribed for to avoid memory leak.\n\t\t if (callbacks.length === 0) {\n\t\t delete this._callbacks['$' + event];\n\t\t }\n\n\t\t return this;\n\t\t};\n\n\t\t/**\n\t\t * Emit `event` with the given args.\n\t\t *\n\t\t * @param {String} event\n\t\t * @param {Mixed} ...\n\t\t * @return {Emitter}\n\t\t */\n\n\t\tEmitter.prototype.emit = function(event){\n\t\t this._callbacks = this._callbacks || {};\n\n\t\t var args = new Array(arguments.length - 1)\n\t\t , callbacks = this._callbacks['$' + event];\n\n\t\t for (var i = 1; i < arguments.length; i++) {\n\t\t args[i - 1] = arguments[i];\n\t\t }\n\n\t\t if (callbacks) {\n\t\t callbacks = callbacks.slice(0);\n\t\t for (var i = 0, len = callbacks.length; i < len; ++i) {\n\t\t callbacks[i].apply(this, args);\n\t\t }\n\t\t }\n\n\t\t return this;\n\t\t};\n\n\t\t/**\n\t\t * Return array of callbacks for `event`.\n\t\t *\n\t\t * @param {String} event\n\t\t * @return {Array}\n\t\t * @api public\n\t\t */\n\n\t\tEmitter.prototype.listeners = function(event){\n\t\t this._callbacks = this._callbacks || {};\n\t\t return this._callbacks['$' + event] || [];\n\t\t};\n\n\t\t/**\n\t\t * Check if this emitter has `event` handlers.\n\t\t *\n\t\t * @param {String} event\n\t\t * @return {Boolean}\n\t\t * @api public\n\t\t */\n\n\t\tEmitter.prototype.hasListeners = function(event){\n\t\t return !! this.listeners(event).length;\n\t\t}; \n\t} (componentEmitter));\n\treturn componentEmitter.exports;\n}\n\nvar componentEmitterExports = requireComponentEmitter();\nvar Emitter = /*@__PURE__*/getDefaultExportFromCjs(componentEmitterExports);\n\nvar es_array_concat = {};\n\nvar isArray$3;\nvar hasRequiredIsArray$3;\n\nfunction requireIsArray$3 () {\n\tif (hasRequiredIsArray$3) return isArray$3;\n\thasRequiredIsArray$3 = 1;\n\tvar classof = /*@__PURE__*/ requireClassofRaw();\n\n\t// `IsArray` abstract operation\n\t// https://tc39.es/ecma262/#sec-isarray\n\t// eslint-disable-next-line es/no-array-isarray -- safe\n\tisArray$3 = Array.isArray || function isArray(argument) {\n\t return classof(argument) === 'Array';\n\t};\n\treturn isArray$3;\n}\n\nvar doesNotExceedSafeInteger;\nvar hasRequiredDoesNotExceedSafeInteger;\n\nfunction requireDoesNotExceedSafeInteger () {\n\tif (hasRequiredDoesNotExceedSafeInteger) return doesNotExceedSafeInteger;\n\thasRequiredDoesNotExceedSafeInteger = 1;\n\tvar $TypeError = TypeError;\n\tvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991\n\n\tdoesNotExceedSafeInteger = function (it) {\n\t if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');\n\t return it;\n\t};\n\treturn doesNotExceedSafeInteger;\n}\n\nvar createProperty;\nvar hasRequiredCreateProperty;\n\nfunction requireCreateProperty () {\n\tif (hasRequiredCreateProperty) return createProperty;\n\thasRequiredCreateProperty = 1;\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar definePropertyModule = /*@__PURE__*/ requireObjectDefineProperty();\n\tvar createPropertyDescriptor = /*@__PURE__*/ requireCreatePropertyDescriptor();\n\n\tcreateProperty = function (object, key, value) {\n\t if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));\n\t else object[key] = value;\n\t};\n\treturn createProperty;\n}\n\nvar toStringTagSupport;\nvar hasRequiredToStringTagSupport;\n\nfunction requireToStringTagSupport () {\n\tif (hasRequiredToStringTagSupport) return toStringTagSupport;\n\thasRequiredToStringTagSupport = 1;\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\n\tvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\tvar test = {};\n\n\ttest[TO_STRING_TAG] = 'z';\n\n\ttoStringTagSupport = String(test) === '[object z]';\n\treturn toStringTagSupport;\n}\n\nvar classof;\nvar hasRequiredClassof;\n\nfunction requireClassof () {\n\tif (hasRequiredClassof) return classof;\n\thasRequiredClassof = 1;\n\tvar TO_STRING_TAG_SUPPORT = /*@__PURE__*/ requireToStringTagSupport();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar classofRaw = /*@__PURE__*/ requireClassofRaw();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\n\tvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\tvar $Object = Object;\n\n\t// ES3 wrong here\n\tvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';\n\n\t// fallback for IE11 Script Access Denied error\n\tvar tryGet = function (it, key) {\n\t try {\n\t return it[key];\n\t } catch (error) { /* empty */ }\n\t};\n\n\t// getting tag from ES6+ `Object.prototype.toString`\n\tclassof = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n\t var O, tag, result;\n\t return it === undefined ? 'Undefined' : it === null ? 'Null'\n\t // @@toStringTag case\n\t : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag\n\t // builtinTag case\n\t : CORRECT_ARGUMENTS ? classofRaw(O)\n\t // ES3 arguments fallback\n\t : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n\t};\n\treturn classof;\n}\n\nvar inspectSource;\nvar hasRequiredInspectSource;\n\nfunction requireInspectSource () {\n\tif (hasRequiredInspectSource) return inspectSource;\n\thasRequiredInspectSource = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar store = /*@__PURE__*/ requireSharedStore();\n\n\tvar functionToString = uncurryThis(Function.toString);\n\n\t// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\n\tif (!isCallable(store.inspectSource)) {\n\t store.inspectSource = function (it) {\n\t return functionToString(it);\n\t };\n\t}\n\n\tinspectSource = store.inspectSource;\n\treturn inspectSource;\n}\n\nvar isConstructor;\nvar hasRequiredIsConstructor;\n\nfunction requireIsConstructor () {\n\tif (hasRequiredIsConstructor) return isConstructor;\n\thasRequiredIsConstructor = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar classof = /*@__PURE__*/ requireClassof();\n\tvar getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();\n\tvar inspectSource = /*@__PURE__*/ requireInspectSource();\n\n\tvar noop = function () { /* empty */ };\n\tvar construct = getBuiltIn('Reflect', 'construct');\n\tvar constructorRegExp = /^\\s*(?:class|function)\\b/;\n\tvar exec = uncurryThis(constructorRegExp.exec);\n\tvar INCORRECT_TO_STRING = !constructorRegExp.test(noop);\n\n\tvar isConstructorModern = function isConstructor(argument) {\n\t if (!isCallable(argument)) return false;\n\t try {\n\t construct(noop, [], argument);\n\t return true;\n\t } catch (error) {\n\t return false;\n\t }\n\t};\n\n\tvar isConstructorLegacy = function isConstructor(argument) {\n\t if (!isCallable(argument)) return false;\n\t switch (classof(argument)) {\n\t case 'AsyncFunction':\n\t case 'GeneratorFunction':\n\t case 'AsyncGeneratorFunction': return false;\n\t }\n\t try {\n\t // we can't check .prototype since constructors produced by .bind haven't it\n\t // `Function#toString` throws on some built-it function in some legacy engines\n\t // (for example, `DOMQuad` and similar in FF41-)\n\t return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));\n\t } catch (error) {\n\t return true;\n\t }\n\t};\n\n\tisConstructorLegacy.sham = true;\n\n\t// `IsConstructor` abstract operation\n\t// https://tc39.es/ecma262/#sec-isconstructor\n\tisConstructor = !construct || fails(function () {\n\t var called;\n\t return isConstructorModern(isConstructorModern.call)\n\t || !isConstructorModern(Object)\n\t || !isConstructorModern(function () { called = true; })\n\t || called;\n\t}) ? isConstructorLegacy : isConstructorModern;\n\treturn isConstructor;\n}\n\nvar arraySpeciesConstructor;\nvar hasRequiredArraySpeciesConstructor;\n\nfunction requireArraySpeciesConstructor () {\n\tif (hasRequiredArraySpeciesConstructor) return arraySpeciesConstructor;\n\thasRequiredArraySpeciesConstructor = 1;\n\tvar isArray = /*@__PURE__*/ requireIsArray$3();\n\tvar isConstructor = /*@__PURE__*/ requireIsConstructor();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\n\tvar SPECIES = wellKnownSymbol('species');\n\tvar $Array = Array;\n\n\t// a part of `ArraySpeciesCreate` abstract operation\n\t// https://tc39.es/ecma262/#sec-arrayspeciescreate\n\tarraySpeciesConstructor = function (originalArray) {\n\t var C;\n\t if (isArray(originalArray)) {\n\t C = originalArray.constructor;\n\t // cross-realm fallback\n\t if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;\n\t else if (isObject(C)) {\n\t C = C[SPECIES];\n\t if (C === null) C = undefined;\n\t }\n\t } return C === undefined ? $Array : C;\n\t};\n\treturn arraySpeciesConstructor;\n}\n\nvar arraySpeciesCreate;\nvar hasRequiredArraySpeciesCreate;\n\nfunction requireArraySpeciesCreate () {\n\tif (hasRequiredArraySpeciesCreate) return arraySpeciesCreate;\n\thasRequiredArraySpeciesCreate = 1;\n\tvar arraySpeciesConstructor = /*@__PURE__*/ requireArraySpeciesConstructor();\n\n\t// `ArraySpeciesCreate` abstract operation\n\t// https://tc39.es/ecma262/#sec-arrayspeciescreate\n\tarraySpeciesCreate = function (originalArray, length) {\n\t return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n\t};\n\treturn arraySpeciesCreate;\n}\n\nvar arrayMethodHasSpeciesSupport;\nvar hasRequiredArrayMethodHasSpeciesSupport;\n\nfunction requireArrayMethodHasSpeciesSupport () {\n\tif (hasRequiredArrayMethodHasSpeciesSupport) return arrayMethodHasSpeciesSupport;\n\thasRequiredArrayMethodHasSpeciesSupport = 1;\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\tvar V8_VERSION = /*@__PURE__*/ requireEnvironmentV8Version();\n\n\tvar SPECIES = wellKnownSymbol('species');\n\n\tarrayMethodHasSpeciesSupport = function (METHOD_NAME) {\n\t // We can't use this feature detection in V8 since it causes\n\t // deoptimization and serious performance degradation\n\t // https://github.com/zloirock/core-js/issues/677\n\t return V8_VERSION >= 51 || !fails(function () {\n\t var array = [];\n\t var constructor = array.constructor = {};\n\t constructor[SPECIES] = function () {\n\t return { foo: 1 };\n\t };\n\t return array[METHOD_NAME](Boolean).foo !== 1;\n\t });\n\t};\n\treturn arrayMethodHasSpeciesSupport;\n}\n\nvar hasRequiredEs_array_concat;\n\nfunction requireEs_array_concat () {\n\tif (hasRequiredEs_array_concat) return es_array_concat;\n\thasRequiredEs_array_concat = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar isArray = /*@__PURE__*/ requireIsArray$3();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar toObject = /*@__PURE__*/ requireToObject();\n\tvar lengthOfArrayLike = /*@__PURE__*/ requireLengthOfArrayLike();\n\tvar doesNotExceedSafeInteger = /*@__PURE__*/ requireDoesNotExceedSafeInteger();\n\tvar createProperty = /*@__PURE__*/ requireCreateProperty();\n\tvar arraySpeciesCreate = /*@__PURE__*/ requireArraySpeciesCreate();\n\tvar arrayMethodHasSpeciesSupport = /*@__PURE__*/ requireArrayMethodHasSpeciesSupport();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\tvar V8_VERSION = /*@__PURE__*/ requireEnvironmentV8Version();\n\n\tvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\n\n\t// We can't use this feature detection in V8 since it causes\n\t// deoptimization and serious performance degradation\n\t// https://github.com/zloirock/core-js/issues/679\n\tvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n\t var array = [];\n\t array[IS_CONCAT_SPREADABLE] = false;\n\t return array.concat()[0] !== array;\n\t});\n\n\tvar isConcatSpreadable = function (O) {\n\t if (!isObject(O)) return false;\n\t var spreadable = O[IS_CONCAT_SPREADABLE];\n\t return spreadable !== undefined ? !!spreadable : isArray(O);\n\t};\n\n\tvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat');\n\n\t// `Array.prototype.concat` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.concat\n\t// with adding support of @@isConcatSpreadable and @@species\n\t$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {\n\t // eslint-disable-next-line no-unused-vars -- required for `.length`\n\t concat: function concat(arg) {\n\t var O = toObject(this);\n\t var A = arraySpeciesCreate(O, 0);\n\t var n = 0;\n\t var i, k, length, len, E;\n\t for (i = -1, length = arguments.length; i < length; i++) {\n\t E = i === -1 ? O : arguments[i];\n\t if (isConcatSpreadable(E)) {\n\t len = lengthOfArrayLike(E);\n\t doesNotExceedSafeInteger(n + len);\n\t for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n\t } else {\n\t doesNotExceedSafeInteger(n + 1);\n\t createProperty(A, n++, E);\n\t }\n\t }\n\t A.length = n;\n\t return A;\n\t }\n\t});\n\treturn es_array_concat;\n}\n\nvar es_symbol = {};\n\nvar es_symbol_constructor = {};\n\nvar toString;\nvar hasRequiredToString;\n\nfunction requireToString () {\n\tif (hasRequiredToString) return toString;\n\thasRequiredToString = 1;\n\tvar classof = /*@__PURE__*/ requireClassof();\n\n\tvar $String = String;\n\n\ttoString = function (argument) {\n\t if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');\n\t return $String(argument);\n\t};\n\treturn toString;\n}\n\nvar objectDefineProperties = {};\n\nvar hasRequiredObjectDefineProperties;\n\nfunction requireObjectDefineProperties () {\n\tif (hasRequiredObjectDefineProperties) return objectDefineProperties;\n\thasRequiredObjectDefineProperties = 1;\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar V8_PROTOTYPE_DEFINE_BUG = /*@__PURE__*/ requireV8PrototypeDefineBug();\n\tvar definePropertyModule = /*@__PURE__*/ requireObjectDefineProperty();\n\tvar anObject = /*@__PURE__*/ requireAnObject();\n\tvar toIndexedObject = /*@__PURE__*/ requireToIndexedObject();\n\tvar objectKeys = /*@__PURE__*/ requireObjectKeys();\n\n\t// `Object.defineProperties` method\n\t// https://tc39.es/ecma262/#sec-object.defineproperties\n\t// eslint-disable-next-line es/no-object-defineproperties -- safe\n\tobjectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n\t anObject(O);\n\t var props = toIndexedObject(Properties);\n\t var keys = objectKeys(Properties);\n\t var length = keys.length;\n\t var index = 0;\n\t var key;\n\t while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n\t return O;\n\t};\n\treturn objectDefineProperties;\n}\n\nvar html;\nvar hasRequiredHtml;\n\nfunction requireHtml () {\n\tif (hasRequiredHtml) return html;\n\thasRequiredHtml = 1;\n\tvar getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();\n\n\thtml = getBuiltIn('document', 'documentElement');\n\treturn html;\n}\n\nvar sharedKey;\nvar hasRequiredSharedKey;\n\nfunction requireSharedKey () {\n\tif (hasRequiredSharedKey) return sharedKey;\n\thasRequiredSharedKey = 1;\n\tvar shared = /*@__PURE__*/ requireShared();\n\tvar uid = /*@__PURE__*/ requireUid();\n\n\tvar keys = shared('keys');\n\n\tsharedKey = function (key) {\n\t return keys[key] || (keys[key] = uid(key));\n\t};\n\treturn sharedKey;\n}\n\nvar objectCreate;\nvar hasRequiredObjectCreate;\n\nfunction requireObjectCreate () {\n\tif (hasRequiredObjectCreate) return objectCreate;\n\thasRequiredObjectCreate = 1;\n\t/* global ActiveXObject -- old IE, WSH */\n\tvar anObject = /*@__PURE__*/ requireAnObject();\n\tvar definePropertiesModule = /*@__PURE__*/ requireObjectDefineProperties();\n\tvar enumBugKeys = /*@__PURE__*/ requireEnumBugKeys();\n\tvar hiddenKeys = /*@__PURE__*/ requireHiddenKeys();\n\tvar html = /*@__PURE__*/ requireHtml();\n\tvar documentCreateElement = /*@__PURE__*/ requireDocumentCreateElement();\n\tvar sharedKey = /*@__PURE__*/ requireSharedKey();\n\n\tvar GT = '>';\n\tvar LT = '<';\n\tvar PROTOTYPE = 'prototype';\n\tvar SCRIPT = 'script';\n\tvar IE_PROTO = sharedKey('IE_PROTO');\n\n\tvar EmptyConstructor = function () { /* empty */ };\n\n\tvar scriptTag = function (content) {\n\t return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n\t};\n\n\t// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\n\tvar NullProtoObjectViaActiveX = function (activeXDocument) {\n\t activeXDocument.write(scriptTag(''));\n\t activeXDocument.close();\n\t var temp = activeXDocument.parentWindow.Object;\n\t // eslint-disable-next-line no-useless-assignment -- avoid memory leak\n\t activeXDocument = null;\n\t return temp;\n\t};\n\n\t// Create object with fake `null` prototype: use iframe Object with cleared prototype\n\tvar NullProtoObjectViaIFrame = function () {\n\t // Thrash, waste and sodomy: IE GC bug\n\t var iframe = documentCreateElement('iframe');\n\t var JS = 'java' + SCRIPT + ':';\n\t var iframeDocument;\n\t iframe.style.display = 'none';\n\t html.appendChild(iframe);\n\t // https://github.com/zloirock/core-js/issues/475\n\t iframe.src = String(JS);\n\t iframeDocument = iframe.contentWindow.document;\n\t iframeDocument.open();\n\t iframeDocument.write(scriptTag('document.F=Object'));\n\t iframeDocument.close();\n\t return iframeDocument.F;\n\t};\n\n\t// Check for document.domain and active x support\n\t// No need to use active x approach when document.domain is not set\n\t// see https://github.com/es-shims/es5-shim/issues/150\n\t// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n\t// avoid IE GC bug\n\tvar activeXDocument;\n\tvar NullProtoObject = function () {\n\t try {\n\t activeXDocument = new ActiveXObject('htmlfile');\n\t } catch (error) { /* ignore */ }\n\t NullProtoObject = typeof document != 'undefined'\n\t ? document.domain && activeXDocument\n\t ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n\t : NullProtoObjectViaIFrame()\n\t : NullProtoObjectViaActiveX(activeXDocument); // WSH\n\t var length = enumBugKeys.length;\n\t while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n\t return NullProtoObject();\n\t};\n\n\thiddenKeys[IE_PROTO] = true;\n\n\t// `Object.create` method\n\t// https://tc39.es/ecma262/#sec-object.create\n\t// eslint-disable-next-line es/no-object-create -- safe\n\tobjectCreate = Object.create || function create(O, Properties) {\n\t var result;\n\t if (O !== null) {\n\t EmptyConstructor[PROTOTYPE] = anObject(O);\n\t result = new EmptyConstructor();\n\t EmptyConstructor[PROTOTYPE] = null;\n\t // add \"__proto__\" for Object.getPrototypeOf polyfill\n\t result[IE_PROTO] = O;\n\t } else result = NullProtoObject();\n\t return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n\t};\n\treturn objectCreate;\n}\n\nvar objectGetOwnPropertyNames = {};\n\nvar hasRequiredObjectGetOwnPropertyNames;\n\nfunction requireObjectGetOwnPropertyNames () {\n\tif (hasRequiredObjectGetOwnPropertyNames) return objectGetOwnPropertyNames;\n\thasRequiredObjectGetOwnPropertyNames = 1;\n\tvar internalObjectKeys = /*@__PURE__*/ requireObjectKeysInternal();\n\tvar enumBugKeys = /*@__PURE__*/ requireEnumBugKeys();\n\n\tvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n\t// `Object.getOwnPropertyNames` method\n\t// https://tc39.es/ecma262/#sec-object.getownpropertynames\n\t// eslint-disable-next-line es/no-object-getownpropertynames -- safe\n\tobjectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n\t return internalObjectKeys(O, hiddenKeys);\n\t};\n\treturn objectGetOwnPropertyNames;\n}\n\nvar objectGetOwnPropertyNamesExternal = {};\n\nvar hasRequiredObjectGetOwnPropertyNamesExternal;\n\nfunction requireObjectGetOwnPropertyNamesExternal () {\n\tif (hasRequiredObjectGetOwnPropertyNamesExternal) return objectGetOwnPropertyNamesExternal;\n\thasRequiredObjectGetOwnPropertyNamesExternal = 1;\n\t/* eslint-disable es/no-object-getownpropertynames -- safe */\n\tvar classof = /*@__PURE__*/ requireClassofRaw();\n\tvar toIndexedObject = /*@__PURE__*/ requireToIndexedObject();\n\tvar $getOwnPropertyNames = /*@__PURE__*/ requireObjectGetOwnPropertyNames().f;\n\tvar arraySlice = /*@__PURE__*/ requireArraySlice();\n\n\tvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n\t ? Object.getOwnPropertyNames(window) : [];\n\n\tvar getWindowNames = function (it) {\n\t try {\n\t return $getOwnPropertyNames(it);\n\t } catch (error) {\n\t return arraySlice(windowNames);\n\t }\n\t};\n\n\t// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\n\tobjectGetOwnPropertyNamesExternal.f = function getOwnPropertyNames(it) {\n\t return windowNames && classof(it) === 'Window'\n\t ? getWindowNames(it)\n\t : $getOwnPropertyNames(toIndexedObject(it));\n\t};\n\treturn objectGetOwnPropertyNamesExternal;\n}\n\nvar defineBuiltIn;\nvar hasRequiredDefineBuiltIn;\n\nfunction requireDefineBuiltIn () {\n\tif (hasRequiredDefineBuiltIn) return defineBuiltIn;\n\thasRequiredDefineBuiltIn = 1;\n\tvar createNonEnumerableProperty = /*@__PURE__*/ requireCreateNonEnumerableProperty();\n\n\tdefineBuiltIn = function (target, key, value, options) {\n\t if (options && options.enumerable) target[key] = value;\n\t else createNonEnumerableProperty(target, key, value);\n\t return target;\n\t};\n\treturn defineBuiltIn;\n}\n\nvar defineBuiltInAccessor;\nvar hasRequiredDefineBuiltInAccessor;\n\nfunction requireDefineBuiltInAccessor () {\n\tif (hasRequiredDefineBuiltInAccessor) return defineBuiltInAccessor;\n\thasRequiredDefineBuiltInAccessor = 1;\n\tvar defineProperty = /*@__PURE__*/ requireObjectDefineProperty();\n\n\tdefineBuiltInAccessor = function (target, name, descriptor) {\n\t return defineProperty.f(target, name, descriptor);\n\t};\n\treturn defineBuiltInAccessor;\n}\n\nvar wellKnownSymbolWrapped = {};\n\nvar hasRequiredWellKnownSymbolWrapped;\n\nfunction requireWellKnownSymbolWrapped () {\n\tif (hasRequiredWellKnownSymbolWrapped) return wellKnownSymbolWrapped;\n\thasRequiredWellKnownSymbolWrapped = 1;\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\n\twellKnownSymbolWrapped.f = wellKnownSymbol;\n\treturn wellKnownSymbolWrapped;\n}\n\nvar wellKnownSymbolDefine;\nvar hasRequiredWellKnownSymbolDefine;\n\nfunction requireWellKnownSymbolDefine () {\n\tif (hasRequiredWellKnownSymbolDefine) return wellKnownSymbolDefine;\n\thasRequiredWellKnownSymbolDefine = 1;\n\tvar path = /*@__PURE__*/ requirePath();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar wrappedWellKnownSymbolModule = /*@__PURE__*/ requireWellKnownSymbolWrapped();\n\tvar defineProperty = /*@__PURE__*/ requireObjectDefineProperty().f;\n\n\twellKnownSymbolDefine = function (NAME) {\n\t var Symbol = path.Symbol || (path.Symbol = {});\n\t if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, {\n\t value: wrappedWellKnownSymbolModule.f(NAME)\n\t });\n\t};\n\treturn wellKnownSymbolDefine;\n}\n\nvar symbolDefineToPrimitive;\nvar hasRequiredSymbolDefineToPrimitive;\n\nfunction requireSymbolDefineToPrimitive () {\n\tif (hasRequiredSymbolDefineToPrimitive) return symbolDefineToPrimitive;\n\thasRequiredSymbolDefineToPrimitive = 1;\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\tvar getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\tvar defineBuiltIn = /*@__PURE__*/ requireDefineBuiltIn();\n\n\tsymbolDefineToPrimitive = function () {\n\t var Symbol = getBuiltIn('Symbol');\n\t var SymbolPrototype = Symbol && Symbol.prototype;\n\t var valueOf = SymbolPrototype && SymbolPrototype.valueOf;\n\t var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n\t if (SymbolPrototype && !SymbolPrototype[TO_PRIMITIVE]) {\n\t // `Symbol.prototype[@@toPrimitive]` method\n\t // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\n\t // eslint-disable-next-line no-unused-vars -- required for .length\n\t defineBuiltIn(SymbolPrototype, TO_PRIMITIVE, function (hint) {\n\t return call(valueOf, this);\n\t }, { arity: 1 });\n\t }\n\t};\n\treturn symbolDefineToPrimitive;\n}\n\nvar objectToString;\nvar hasRequiredObjectToString;\n\nfunction requireObjectToString () {\n\tif (hasRequiredObjectToString) return objectToString;\n\thasRequiredObjectToString = 1;\n\tvar TO_STRING_TAG_SUPPORT = /*@__PURE__*/ requireToStringTagSupport();\n\tvar classof = /*@__PURE__*/ requireClassof();\n\n\t// `Object.prototype.toString` method implementation\n\t// https://tc39.es/ecma262/#sec-object.prototype.tostring\n\tobjectToString = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n\t return '[object ' + classof(this) + ']';\n\t};\n\treturn objectToString;\n}\n\nvar setToStringTag;\nvar hasRequiredSetToStringTag;\n\nfunction requireSetToStringTag () {\n\tif (hasRequiredSetToStringTag) return setToStringTag;\n\thasRequiredSetToStringTag = 1;\n\tvar TO_STRING_TAG_SUPPORT = /*@__PURE__*/ requireToStringTagSupport();\n\tvar defineProperty = /*@__PURE__*/ requireObjectDefineProperty().f;\n\tvar createNonEnumerableProperty = /*@__PURE__*/ requireCreateNonEnumerableProperty();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar toString = /*@__PURE__*/ requireObjectToString();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\n\tvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\n\tsetToStringTag = function (it, TAG, STATIC, SET_METHOD) {\n\t var target = STATIC ? it : it && it.prototype;\n\t if (target) {\n\t if (!hasOwn(target, TO_STRING_TAG)) {\n\t defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });\n\t }\n\t if (SET_METHOD && !TO_STRING_TAG_SUPPORT) {\n\t createNonEnumerableProperty(target, 'toString', toString);\n\t }\n\t }\n\t};\n\treturn setToStringTag;\n}\n\nvar weakMapBasicDetection;\nvar hasRequiredWeakMapBasicDetection;\n\nfunction requireWeakMapBasicDetection () {\n\tif (hasRequiredWeakMapBasicDetection) return weakMapBasicDetection;\n\thasRequiredWeakMapBasicDetection = 1;\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\n\tvar WeakMap = globalThis.WeakMap;\n\n\tweakMapBasicDetection = isCallable(WeakMap) && /native code/.test(String(WeakMap));\n\treturn weakMapBasicDetection;\n}\n\nvar internalState;\nvar hasRequiredInternalState;\n\nfunction requireInternalState () {\n\tif (hasRequiredInternalState) return internalState;\n\thasRequiredInternalState = 1;\n\tvar NATIVE_WEAK_MAP = /*@__PURE__*/ requireWeakMapBasicDetection();\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar createNonEnumerableProperty = /*@__PURE__*/ requireCreateNonEnumerableProperty();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar shared = /*@__PURE__*/ requireSharedStore();\n\tvar sharedKey = /*@__PURE__*/ requireSharedKey();\n\tvar hiddenKeys = /*@__PURE__*/ requireHiddenKeys();\n\n\tvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\n\tvar TypeError = globalThis.TypeError;\n\tvar WeakMap = globalThis.WeakMap;\n\tvar set, get, has;\n\n\tvar enforce = function (it) {\n\t return has(it) ? get(it) : set(it, {});\n\t};\n\n\tvar getterFor = function (TYPE) {\n\t return function (it) {\n\t var state;\n\t if (!isObject(it) || (state = get(it)).type !== TYPE) {\n\t throw new TypeError('Incompatible receiver, ' + TYPE + ' required');\n\t } return state;\n\t };\n\t};\n\n\tif (NATIVE_WEAK_MAP || shared.state) {\n\t var store = shared.state || (shared.state = new WeakMap());\n\t /* eslint-disable no-self-assign -- prototype methods protection */\n\t store.get = store.get;\n\t store.has = store.has;\n\t store.set = store.set;\n\t /* eslint-enable no-self-assign -- prototype methods protection */\n\t set = function (it, metadata) {\n\t if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n\t metadata.facade = it;\n\t store.set(it, metadata);\n\t return metadata;\n\t };\n\t get = function (it) {\n\t return store.get(it) || {};\n\t };\n\t has = function (it) {\n\t return store.has(it);\n\t };\n\t} else {\n\t var STATE = sharedKey('state');\n\t hiddenKeys[STATE] = true;\n\t set = function (it, metadata) {\n\t if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n\t metadata.facade = it;\n\t createNonEnumerableProperty(it, STATE, metadata);\n\t return metadata;\n\t };\n\t get = function (it) {\n\t return hasOwn(it, STATE) ? it[STATE] : {};\n\t };\n\t has = function (it) {\n\t return hasOwn(it, STATE);\n\t };\n\t}\n\n\tinternalState = {\n\t set: set,\n\t get: get,\n\t has: has,\n\t enforce: enforce,\n\t getterFor: getterFor\n\t};\n\treturn internalState;\n}\n\nvar arrayIteration;\nvar hasRequiredArrayIteration;\n\nfunction requireArrayIteration () {\n\tif (hasRequiredArrayIteration) return arrayIteration;\n\thasRequiredArrayIteration = 1;\n\tvar bind = /*@__PURE__*/ requireFunctionBindContext();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar IndexedObject = /*@__PURE__*/ requireIndexedObject();\n\tvar toObject = /*@__PURE__*/ requireToObject();\n\tvar lengthOfArrayLike = /*@__PURE__*/ requireLengthOfArrayLike();\n\tvar arraySpeciesCreate = /*@__PURE__*/ requireArraySpeciesCreate();\n\n\tvar push = uncurryThis([].push);\n\n\t// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\n\tvar createMethod = function (TYPE) {\n\t var IS_MAP = TYPE === 1;\n\t var IS_FILTER = TYPE === 2;\n\t var IS_SOME = TYPE === 3;\n\t var IS_EVERY = TYPE === 4;\n\t var IS_FIND_INDEX = TYPE === 6;\n\t var IS_FILTER_REJECT = TYPE === 7;\n\t var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;\n\t return function ($this, callbackfn, that, specificCreate) {\n\t var O = toObject($this);\n\t var self = IndexedObject(O);\n\t var length = lengthOfArrayLike(self);\n\t var boundFunction = bind(callbackfn, that);\n\t var index = 0;\n\t var create = specificCreate || arraySpeciesCreate;\n\t var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;\n\t var value, result;\n\t for (;length > index; index++) if (NO_HOLES || index in self) {\n\t value = self[index];\n\t result = boundFunction(value, index, O);\n\t if (TYPE) {\n\t if (IS_MAP) target[index] = result; // map\n\t else if (result) switch (TYPE) {\n\t case 3: return true; // some\n\t case 5: return value; // find\n\t case 6: return index; // findIndex\n\t case 2: push(target, value); // filter\n\t } else switch (TYPE) {\n\t case 4: return false; // every\n\t case 7: push(target, value); // filterReject\n\t }\n\t }\n\t }\n\t return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n\t };\n\t};\n\n\tarrayIteration = {\n\t // `Array.prototype.forEach` method\n\t // https://tc39.es/ecma262/#sec-array.prototype.foreach\n\t forEach: createMethod(0),\n\t // `Array.prototype.map` method\n\t // https://tc39.es/ecma262/#sec-array.prototype.map\n\t map: createMethod(1),\n\t // `Array.prototype.filter` method\n\t // https://tc39.es/ecma262/#sec-array.prototype.filter\n\t filter: createMethod(2),\n\t // `Array.prototype.some` method\n\t // https://tc39.es/ecma262/#sec-array.prototype.some\n\t some: createMethod(3),\n\t // `Array.prototype.every` method\n\t // https://tc39.es/ecma262/#sec-array.prototype.every\n\t every: createMethod(4),\n\t // `Array.prototype.find` method\n\t // https://tc39.es/ecma262/#sec-array.prototype.find\n\t find: createMethod(5),\n\t // `Array.prototype.findIndex` method\n\t // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n\t findIndex: createMethod(6),\n\t // `Array.prototype.filterReject` method\n\t // https://github.com/tc39/proposal-array-filtering\n\t filterReject: createMethod(7)\n\t};\n\treturn arrayIteration;\n}\n\nvar hasRequiredEs_symbol_constructor;\n\nfunction requireEs_symbol_constructor () {\n\tif (hasRequiredEs_symbol_constructor) return es_symbol_constructor;\n\thasRequiredEs_symbol_constructor = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar IS_PURE = /*@__PURE__*/ requireIsPure();\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar NATIVE_SYMBOL = /*@__PURE__*/ requireSymbolConstructorDetection();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar anObject = /*@__PURE__*/ requireAnObject();\n\tvar toIndexedObject = /*@__PURE__*/ requireToIndexedObject();\n\tvar toPropertyKey = /*@__PURE__*/ requireToPropertyKey();\n\tvar $toString = /*@__PURE__*/ requireToString();\n\tvar createPropertyDescriptor = /*@__PURE__*/ requireCreatePropertyDescriptor();\n\tvar nativeObjectCreate = /*@__PURE__*/ requireObjectCreate();\n\tvar objectKeys = /*@__PURE__*/ requireObjectKeys();\n\tvar getOwnPropertyNamesModule = /*@__PURE__*/ requireObjectGetOwnPropertyNames();\n\tvar getOwnPropertyNamesExternal = /*@__PURE__*/ requireObjectGetOwnPropertyNamesExternal();\n\tvar getOwnPropertySymbolsModule = /*@__PURE__*/ requireObjectGetOwnPropertySymbols();\n\tvar getOwnPropertyDescriptorModule = /*@__PURE__*/ requireObjectGetOwnPropertyDescriptor();\n\tvar definePropertyModule = /*@__PURE__*/ requireObjectDefineProperty();\n\tvar definePropertiesModule = /*@__PURE__*/ requireObjectDefineProperties();\n\tvar propertyIsEnumerableModule = /*@__PURE__*/ requireObjectPropertyIsEnumerable();\n\tvar defineBuiltIn = /*@__PURE__*/ requireDefineBuiltIn();\n\tvar defineBuiltInAccessor = /*@__PURE__*/ requireDefineBuiltInAccessor();\n\tvar shared = /*@__PURE__*/ requireShared();\n\tvar sharedKey = /*@__PURE__*/ requireSharedKey();\n\tvar hiddenKeys = /*@__PURE__*/ requireHiddenKeys();\n\tvar uid = /*@__PURE__*/ requireUid();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\tvar wrappedWellKnownSymbolModule = /*@__PURE__*/ requireWellKnownSymbolWrapped();\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\tvar defineSymbolToPrimitive = /*@__PURE__*/ requireSymbolDefineToPrimitive();\n\tvar setToStringTag = /*@__PURE__*/ requireSetToStringTag();\n\tvar InternalStateModule = /*@__PURE__*/ requireInternalState();\n\tvar $forEach = /*@__PURE__*/ requireArrayIteration().forEach;\n\n\tvar HIDDEN = sharedKey('hidden');\n\tvar SYMBOL = 'Symbol';\n\tvar PROTOTYPE = 'prototype';\n\n\tvar setInternalState = InternalStateModule.set;\n\tvar getInternalState = InternalStateModule.getterFor(SYMBOL);\n\n\tvar ObjectPrototype = Object[PROTOTYPE];\n\tvar $Symbol = globalThis.Symbol;\n\tvar SymbolPrototype = $Symbol && $Symbol[PROTOTYPE];\n\tvar RangeError = globalThis.RangeError;\n\tvar TypeError = globalThis.TypeError;\n\tvar QObject = globalThis.QObject;\n\tvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n\tvar nativeDefineProperty = definePropertyModule.f;\n\tvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\n\tvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\n\tvar push = uncurryThis([].push);\n\n\tvar AllSymbols = shared('symbols');\n\tvar ObjectPrototypeSymbols = shared('op-symbols');\n\tvar WellKnownSymbolsStore = shared('wks');\n\n\t// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\n\tvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n\t// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\n\tvar fallbackDefineProperty = function (O, P, Attributes) {\n\t var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n\t if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n\t nativeDefineProperty(O, P, Attributes);\n\t if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n\t nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n\t }\n\t};\n\n\tvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n\t return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n\t get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n\t })).a !== 7;\n\t}) ? fallbackDefineProperty : nativeDefineProperty;\n\n\tvar wrap = function (tag, description) {\n\t var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype);\n\t setInternalState(symbol, {\n\t type: SYMBOL,\n\t tag: tag,\n\t description: description\n\t });\n\t if (!DESCRIPTORS) symbol.description = description;\n\t return symbol;\n\t};\n\n\tvar $defineProperty = function defineProperty(O, P, Attributes) {\n\t if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n\t anObject(O);\n\t var key = toPropertyKey(P);\n\t anObject(Attributes);\n\t if (hasOwn(AllSymbols, key)) {\n\t if (!Attributes.enumerable) {\n\t if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, nativeObjectCreate(null)));\n\t O[HIDDEN][key] = true;\n\t } else {\n\t if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n\t Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n\t } return setSymbolDescriptor(O, key, Attributes);\n\t } return nativeDefineProperty(O, key, Attributes);\n\t};\n\n\tvar $defineProperties = function defineProperties(O, Properties) {\n\t anObject(O);\n\t var properties = toIndexedObject(Properties);\n\t var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n\t $forEach(keys, function (key) {\n\t if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]);\n\t });\n\t return O;\n\t};\n\n\tvar $create = function create(O, Properties) {\n\t return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n\t};\n\n\tvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n\t var P = toPropertyKey(V);\n\t var enumerable = call(nativePropertyIsEnumerable, this, P);\n\t if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false;\n\t return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P]\n\t ? enumerable : true;\n\t};\n\n\tvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n\t var it = toIndexedObject(O);\n\t var key = toPropertyKey(P);\n\t if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return;\n\t var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n\t if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) {\n\t descriptor.enumerable = true;\n\t }\n\t return descriptor;\n\t};\n\n\tvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n\t var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n\t var result = [];\n\t $forEach(names, function (key) {\n\t if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key);\n\t });\n\t return result;\n\t};\n\n\tvar $getOwnPropertySymbols = function (O) {\n\t var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n\t var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n\t var result = [];\n\t $forEach(names, function (key) {\n\t if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) {\n\t push(result, AllSymbols[key]);\n\t }\n\t });\n\t return result;\n\t};\n\n\t// `Symbol` constructor\n\t// https://tc39.es/ecma262/#sec-symbol-constructor\n\tif (!NATIVE_SYMBOL) {\n\t $Symbol = function Symbol() {\n\t if (isPrototypeOf(SymbolPrototype, this)) throw new TypeError('Symbol is not a constructor');\n\t var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);\n\t var tag = uid(description);\n\t var setter = function (value) {\n\t var $this = this === undefined ? globalThis : this;\n\t if ($this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);\n\t if (hasOwn($this, HIDDEN) && hasOwn($this[HIDDEN], tag)) $this[HIDDEN][tag] = false;\n\t var descriptor = createPropertyDescriptor(1, value);\n\t try {\n\t setSymbolDescriptor($this, tag, descriptor);\n\t } catch (error) {\n\t if (!(error instanceof RangeError)) throw error;\n\t fallbackDefineProperty($this, tag, descriptor);\n\t }\n\t };\n\t if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n\t return wrap(tag, description);\n\t };\n\n\t SymbolPrototype = $Symbol[PROTOTYPE];\n\n\t defineBuiltIn(SymbolPrototype, 'toString', function toString() {\n\t return getInternalState(this).tag;\n\t });\n\n\t defineBuiltIn($Symbol, 'withoutSetter', function (description) {\n\t return wrap(uid(description), description);\n\t });\n\n\t propertyIsEnumerableModule.f = $propertyIsEnumerable;\n\t definePropertyModule.f = $defineProperty;\n\t definePropertiesModule.f = $defineProperties;\n\t getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n\t getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n\t getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n\t wrappedWellKnownSymbolModule.f = function (name) {\n\t return wrap(wellKnownSymbol(name), name);\n\t };\n\n\t if (DESCRIPTORS) {\n\t // https://tc39.es/ecma262/#sec-symbol.prototype.description\n\t defineBuiltInAccessor(SymbolPrototype, 'description', {\n\t configurable: true,\n\t get: function description() {\n\t return getInternalState(this).description;\n\t }\n\t });\n\t if (!IS_PURE) {\n\t defineBuiltIn(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n\t }\n\t }\n\t}\n\n\t$({ global: true, constructor: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n\t Symbol: $Symbol\n\t});\n\n\t$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n\t defineWellKnownSymbol(name);\n\t});\n\n\t$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n\t useSetter: function () { USE_SETTER = true; },\n\t useSimple: function () { USE_SETTER = false; }\n\t});\n\n\t$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n\t // `Object.create` method\n\t // https://tc39.es/ecma262/#sec-object.create\n\t create: $create,\n\t // `Object.defineProperty` method\n\t // https://tc39.es/ecma262/#sec-object.defineproperty\n\t defineProperty: $defineProperty,\n\t // `Object.defineProperties` method\n\t // https://tc39.es/ecma262/#sec-object.defineproperties\n\t defineProperties: $defineProperties,\n\t // `Object.getOwnPropertyDescriptor` method\n\t // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n\t getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n\t});\n\n\t$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n\t // `Object.getOwnPropertyNames` method\n\t // https://tc39.es/ecma262/#sec-object.getownpropertynames\n\t getOwnPropertyNames: $getOwnPropertyNames\n\t});\n\n\t// `Symbol.prototype[@@toPrimitive]` method\n\t// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\n\tdefineSymbolToPrimitive();\n\n\t// `Symbol.prototype[@@toStringTag]` property\n\t// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\n\tsetToStringTag($Symbol, SYMBOL);\n\n\thiddenKeys[HIDDEN] = true;\n\treturn es_symbol_constructor;\n}\n\nvar es_symbol_for = {};\n\nvar symbolRegistryDetection;\nvar hasRequiredSymbolRegistryDetection;\n\nfunction requireSymbolRegistryDetection () {\n\tif (hasRequiredSymbolRegistryDetection) return symbolRegistryDetection;\n\thasRequiredSymbolRegistryDetection = 1;\n\tvar NATIVE_SYMBOL = /*@__PURE__*/ requireSymbolConstructorDetection();\n\n\t/* eslint-disable es/no-symbol -- safe */\n\tsymbolRegistryDetection = NATIVE_SYMBOL && !!Symbol['for'] && !!Symbol.keyFor;\n\treturn symbolRegistryDetection;\n}\n\nvar hasRequiredEs_symbol_for;\n\nfunction requireEs_symbol_for () {\n\tif (hasRequiredEs_symbol_for) return es_symbol_for;\n\thasRequiredEs_symbol_for = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar toString = /*@__PURE__*/ requireToString();\n\tvar shared = /*@__PURE__*/ requireShared();\n\tvar NATIVE_SYMBOL_REGISTRY = /*@__PURE__*/ requireSymbolRegistryDetection();\n\n\tvar StringToSymbolRegistry = shared('string-to-symbol-registry');\n\tvar SymbolToStringRegistry = shared('symbol-to-string-registry');\n\n\t// `Symbol.for` method\n\t// https://tc39.es/ecma262/#sec-symbol.for\n\t$({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {\n\t 'for': function (key) {\n\t var string = toString(key);\n\t if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n\t var symbol = getBuiltIn('Symbol')(string);\n\t StringToSymbolRegistry[string] = symbol;\n\t SymbolToStringRegistry[symbol] = string;\n\t return symbol;\n\t }\n\t});\n\treturn es_symbol_for;\n}\n\nvar es_symbol_keyFor = {};\n\nvar hasRequiredEs_symbol_keyFor;\n\nfunction requireEs_symbol_keyFor () {\n\tif (hasRequiredEs_symbol_keyFor) return es_symbol_keyFor;\n\thasRequiredEs_symbol_keyFor = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar isSymbol = /*@__PURE__*/ requireIsSymbol();\n\tvar tryToString = /*@__PURE__*/ requireTryToString();\n\tvar shared = /*@__PURE__*/ requireShared();\n\tvar NATIVE_SYMBOL_REGISTRY = /*@__PURE__*/ requireSymbolRegistryDetection();\n\n\tvar SymbolToStringRegistry = shared('symbol-to-string-registry');\n\n\t// `Symbol.keyFor` method\n\t// https://tc39.es/ecma262/#sec-symbol.keyfor\n\t$({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {\n\t keyFor: function keyFor(sym) {\n\t if (!isSymbol(sym)) throw new TypeError(tryToString(sym) + ' is not a symbol');\n\t if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n\t }\n\t});\n\treturn es_symbol_keyFor;\n}\n\nvar es_json_stringify = {};\n\nvar getJsonReplacerFunction;\nvar hasRequiredGetJsonReplacerFunction;\n\nfunction requireGetJsonReplacerFunction () {\n\tif (hasRequiredGetJsonReplacerFunction) return getJsonReplacerFunction;\n\thasRequiredGetJsonReplacerFunction = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar isArray = /*@__PURE__*/ requireIsArray$3();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar classof = /*@__PURE__*/ requireClassofRaw();\n\tvar toString = /*@__PURE__*/ requireToString();\n\n\tvar push = uncurryThis([].push);\n\n\tgetJsonReplacerFunction = function (replacer) {\n\t if (isCallable(replacer)) return replacer;\n\t if (!isArray(replacer)) return;\n\t var rawLength = replacer.length;\n\t var keys = [];\n\t for (var i = 0; i < rawLength; i++) {\n\t var element = replacer[i];\n\t if (typeof element == 'string') push(keys, element);\n\t else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') push(keys, toString(element));\n\t }\n\t var keysLength = keys.length;\n\t var root = true;\n\t return function (key, value) {\n\t if (root) {\n\t root = false;\n\t return value;\n\t }\n\t if (isArray(this)) return value;\n\t for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;\n\t };\n\t};\n\treturn getJsonReplacerFunction;\n}\n\nvar hasRequiredEs_json_stringify;\n\nfunction requireEs_json_stringify () {\n\tif (hasRequiredEs_json_stringify) return es_json_stringify;\n\thasRequiredEs_json_stringify = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();\n\tvar apply = /*@__PURE__*/ requireFunctionApply();\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar isSymbol = /*@__PURE__*/ requireIsSymbol();\n\tvar arraySlice = /*@__PURE__*/ requireArraySlice();\n\tvar getReplacerFunction = /*@__PURE__*/ requireGetJsonReplacerFunction();\n\tvar NATIVE_SYMBOL = /*@__PURE__*/ requireSymbolConstructorDetection();\n\n\tvar $String = String;\n\tvar $stringify = getBuiltIn('JSON', 'stringify');\n\tvar exec = uncurryThis(/./.exec);\n\tvar charAt = uncurryThis(''.charAt);\n\tvar charCodeAt = uncurryThis(''.charCodeAt);\n\tvar replace = uncurryThis(''.replace);\n\tvar numberToString = uncurryThis(1.1.toString);\n\n\tvar tester = /[\\uD800-\\uDFFF]/g;\n\tvar low = /^[\\uD800-\\uDBFF]$/;\n\tvar hi = /^[\\uDC00-\\uDFFF]$/;\n\n\tvar WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () {\n\t var symbol = getBuiltIn('Symbol')('stringify detection');\n\t // MS Edge converts symbol values to JSON as {}\n\t return $stringify([symbol]) !== '[null]'\n\t // WebKit converts symbol values to JSON as null\n\t || $stringify({ a: symbol }) !== '{}'\n\t // V8 throws on boxed symbols\n\t || $stringify(Object(symbol)) !== '{}';\n\t});\n\n\t// https://github.com/tc39/proposal-well-formed-stringify\n\tvar ILL_FORMED_UNICODE = fails(function () {\n\t return $stringify('\\uDF06\\uD834') !== '\"\\\\udf06\\\\ud834\"'\n\t || $stringify('\\uDEAD') !== '\"\\\\udead\"';\n\t});\n\n\tvar stringifyWithSymbolsFix = function (it, replacer) {\n\t var args = arraySlice(arguments);\n\t var $replacer = getReplacerFunction(replacer);\n\t if (!isCallable($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined\n\t args[1] = function (key, value) {\n\t // some old implementations (like WebKit) could pass numbers as keys\n\t if (isCallable($replacer)) value = call($replacer, this, $String(key), value);\n\t if (!isSymbol(value)) return value;\n\t };\n\t return apply($stringify, null, args);\n\t};\n\n\tvar fixIllFormed = function (match, offset, string) {\n\t var prev = charAt(string, offset - 1);\n\t var next = charAt(string, offset + 1);\n\t if ((exec(low, match) && !exec(hi, next)) || (exec(hi, match) && !exec(low, prev))) {\n\t return '\\\\u' + numberToString(charCodeAt(match, 0), 16);\n\t } return match;\n\t};\n\n\tif ($stringify) {\n\t // `JSON.stringify` method\n\t // https://tc39.es/ecma262/#sec-json.stringify\n\t $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {\n\t // eslint-disable-next-line no-unused-vars -- required for `.length`\n\t stringify: function stringify(it, replacer, space) {\n\t var args = arraySlice(arguments);\n\t var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);\n\t return ILL_FORMED_UNICODE && typeof result == 'string' ? replace(result, tester, fixIllFormed) : result;\n\t }\n\t });\n\t}\n\treturn es_json_stringify;\n}\n\nvar es_object_getOwnPropertySymbols = {};\n\nvar hasRequiredEs_object_getOwnPropertySymbols;\n\nfunction requireEs_object_getOwnPropertySymbols () {\n\tif (hasRequiredEs_object_getOwnPropertySymbols) return es_object_getOwnPropertySymbols;\n\thasRequiredEs_object_getOwnPropertySymbols = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar NATIVE_SYMBOL = /*@__PURE__*/ requireSymbolConstructorDetection();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar getOwnPropertySymbolsModule = /*@__PURE__*/ requireObjectGetOwnPropertySymbols();\n\tvar toObject = /*@__PURE__*/ requireToObject();\n\n\t// V8 ~ Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n\t// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n\tvar FORCED = !NATIVE_SYMBOL || fails(function () { getOwnPropertySymbolsModule.f(1); });\n\n\t// `Object.getOwnPropertySymbols` method\n\t// https://tc39.es/ecma262/#sec-object.getownpropertysymbols\n\t$({ target: 'Object', stat: true, forced: FORCED }, {\n\t getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n\t var $getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n\t return $getOwnPropertySymbols ? $getOwnPropertySymbols(toObject(it)) : [];\n\t }\n\t});\n\treturn es_object_getOwnPropertySymbols;\n}\n\nvar hasRequiredEs_symbol;\n\nfunction requireEs_symbol () {\n\tif (hasRequiredEs_symbol) return es_symbol;\n\thasRequiredEs_symbol = 1;\n\t// TODO: Remove this module from `core-js@4` since it's split to modules listed below\n\trequireEs_symbol_constructor();\n\trequireEs_symbol_for();\n\trequireEs_symbol_keyFor();\n\trequireEs_json_stringify();\n\trequireEs_object_getOwnPropertySymbols();\n\treturn es_symbol;\n}\n\nvar es_symbol_asyncDispose = {};\n\nvar hasRequiredEs_symbol_asyncDispose;\n\nfunction requireEs_symbol_asyncDispose () {\n\tif (hasRequiredEs_symbol_asyncDispose) return es_symbol_asyncDispose;\n\thasRequiredEs_symbol_asyncDispose = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.asyncDispose` well-known symbol\n\t// https://github.com/tc39/proposal-async-explicit-resource-management\n\tdefineWellKnownSymbol('asyncDispose');\n\treturn es_symbol_asyncDispose;\n}\n\nvar es_symbol_asyncIterator = {};\n\nvar hasRequiredEs_symbol_asyncIterator;\n\nfunction requireEs_symbol_asyncIterator () {\n\tif (hasRequiredEs_symbol_asyncIterator) return es_symbol_asyncIterator;\n\thasRequiredEs_symbol_asyncIterator = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.asyncIterator` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.asynciterator\n\tdefineWellKnownSymbol('asyncIterator');\n\treturn es_symbol_asyncIterator;\n}\n\nvar es_symbol_dispose = {};\n\nvar hasRequiredEs_symbol_dispose;\n\nfunction requireEs_symbol_dispose () {\n\tif (hasRequiredEs_symbol_dispose) return es_symbol_dispose;\n\thasRequiredEs_symbol_dispose = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.dispose` well-known symbol\n\t// https://github.com/tc39/proposal-explicit-resource-management\n\tdefineWellKnownSymbol('dispose');\n\treturn es_symbol_dispose;\n}\n\nvar es_symbol_hasInstance = {};\n\nvar hasRequiredEs_symbol_hasInstance;\n\nfunction requireEs_symbol_hasInstance () {\n\tif (hasRequiredEs_symbol_hasInstance) return es_symbol_hasInstance;\n\thasRequiredEs_symbol_hasInstance = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.hasInstance` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.hasinstance\n\tdefineWellKnownSymbol('hasInstance');\n\treturn es_symbol_hasInstance;\n}\n\nvar es_symbol_isConcatSpreadable = {};\n\nvar hasRequiredEs_symbol_isConcatSpreadable;\n\nfunction requireEs_symbol_isConcatSpreadable () {\n\tif (hasRequiredEs_symbol_isConcatSpreadable) return es_symbol_isConcatSpreadable;\n\thasRequiredEs_symbol_isConcatSpreadable = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.isConcatSpreadable` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.isconcatspreadable\n\tdefineWellKnownSymbol('isConcatSpreadable');\n\treturn es_symbol_isConcatSpreadable;\n}\n\nvar es_symbol_iterator = {};\n\nvar hasRequiredEs_symbol_iterator;\n\nfunction requireEs_symbol_iterator () {\n\tif (hasRequiredEs_symbol_iterator) return es_symbol_iterator;\n\thasRequiredEs_symbol_iterator = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.iterator` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.iterator\n\tdefineWellKnownSymbol('iterator');\n\treturn es_symbol_iterator;\n}\n\nvar es_symbol_match = {};\n\nvar hasRequiredEs_symbol_match;\n\nfunction requireEs_symbol_match () {\n\tif (hasRequiredEs_symbol_match) return es_symbol_match;\n\thasRequiredEs_symbol_match = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.match` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.match\n\tdefineWellKnownSymbol('match');\n\treturn es_symbol_match;\n}\n\nvar es_symbol_matchAll = {};\n\nvar hasRequiredEs_symbol_matchAll;\n\nfunction requireEs_symbol_matchAll () {\n\tif (hasRequiredEs_symbol_matchAll) return es_symbol_matchAll;\n\thasRequiredEs_symbol_matchAll = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.matchAll` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.matchall\n\tdefineWellKnownSymbol('matchAll');\n\treturn es_symbol_matchAll;\n}\n\nvar es_symbol_replace = {};\n\nvar hasRequiredEs_symbol_replace;\n\nfunction requireEs_symbol_replace () {\n\tif (hasRequiredEs_symbol_replace) return es_symbol_replace;\n\thasRequiredEs_symbol_replace = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.replace` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.replace\n\tdefineWellKnownSymbol('replace');\n\treturn es_symbol_replace;\n}\n\nvar es_symbol_search = {};\n\nvar hasRequiredEs_symbol_search;\n\nfunction requireEs_symbol_search () {\n\tif (hasRequiredEs_symbol_search) return es_symbol_search;\n\thasRequiredEs_symbol_search = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.search` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.search\n\tdefineWellKnownSymbol('search');\n\treturn es_symbol_search;\n}\n\nvar es_symbol_species = {};\n\nvar hasRequiredEs_symbol_species;\n\nfunction requireEs_symbol_species () {\n\tif (hasRequiredEs_symbol_species) return es_symbol_species;\n\thasRequiredEs_symbol_species = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.species` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.species\n\tdefineWellKnownSymbol('species');\n\treturn es_symbol_species;\n}\n\nvar es_symbol_split = {};\n\nvar hasRequiredEs_symbol_split;\n\nfunction requireEs_symbol_split () {\n\tif (hasRequiredEs_symbol_split) return es_symbol_split;\n\thasRequiredEs_symbol_split = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.split` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.split\n\tdefineWellKnownSymbol('split');\n\treturn es_symbol_split;\n}\n\nvar es_symbol_toPrimitive = {};\n\nvar hasRequiredEs_symbol_toPrimitive;\n\nfunction requireEs_symbol_toPrimitive () {\n\tif (hasRequiredEs_symbol_toPrimitive) return es_symbol_toPrimitive;\n\thasRequiredEs_symbol_toPrimitive = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\tvar defineSymbolToPrimitive = /*@__PURE__*/ requireSymbolDefineToPrimitive();\n\n\t// `Symbol.toPrimitive` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.toprimitive\n\tdefineWellKnownSymbol('toPrimitive');\n\n\t// `Symbol.prototype[@@toPrimitive]` method\n\t// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\n\tdefineSymbolToPrimitive();\n\treturn es_symbol_toPrimitive;\n}\n\nvar es_symbol_toStringTag = {};\n\nvar hasRequiredEs_symbol_toStringTag;\n\nfunction requireEs_symbol_toStringTag () {\n\tif (hasRequiredEs_symbol_toStringTag) return es_symbol_toStringTag;\n\thasRequiredEs_symbol_toStringTag = 1;\n\tvar getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\tvar setToStringTag = /*@__PURE__*/ requireSetToStringTag();\n\n\t// `Symbol.toStringTag` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.tostringtag\n\tdefineWellKnownSymbol('toStringTag');\n\n\t// `Symbol.prototype[@@toStringTag]` property\n\t// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\n\tsetToStringTag(getBuiltIn('Symbol'), 'Symbol');\n\treturn es_symbol_toStringTag;\n}\n\nvar es_symbol_unscopables = {};\n\nvar hasRequiredEs_symbol_unscopables;\n\nfunction requireEs_symbol_unscopables () {\n\tif (hasRequiredEs_symbol_unscopables) return es_symbol_unscopables;\n\thasRequiredEs_symbol_unscopables = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.unscopables` well-known symbol\n\t// https://tc39.es/ecma262/#sec-symbol.unscopables\n\tdefineWellKnownSymbol('unscopables');\n\treturn es_symbol_unscopables;\n}\n\nvar es_json_toStringTag = {};\n\nvar hasRequiredEs_json_toStringTag;\n\nfunction requireEs_json_toStringTag () {\n\tif (hasRequiredEs_json_toStringTag) return es_json_toStringTag;\n\thasRequiredEs_json_toStringTag = 1;\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar setToStringTag = /*@__PURE__*/ requireSetToStringTag();\n\n\t// JSON[@@toStringTag] property\n\t// https://tc39.es/ecma262/#sec-json-@@tostringtag\n\tsetToStringTag(globalThis.JSON, 'JSON', true);\n\treturn es_json_toStringTag;\n}\n\nvar symbol$5;\nvar hasRequiredSymbol$5;\n\nfunction requireSymbol$5 () {\n\tif (hasRequiredSymbol$5) return symbol$5;\n\thasRequiredSymbol$5 = 1;\n\trequireEs_array_concat();\n\trequireEs_symbol();\n\trequireEs_symbol_asyncDispose();\n\trequireEs_symbol_asyncIterator();\n\trequireEs_symbol_dispose();\n\trequireEs_symbol_hasInstance();\n\trequireEs_symbol_isConcatSpreadable();\n\trequireEs_symbol_iterator();\n\trequireEs_symbol_match();\n\trequireEs_symbol_matchAll();\n\trequireEs_symbol_replace();\n\trequireEs_symbol_search();\n\trequireEs_symbol_species();\n\trequireEs_symbol_split();\n\trequireEs_symbol_toPrimitive();\n\trequireEs_symbol_toStringTag();\n\trequireEs_symbol_unscopables();\n\trequireEs_json_toStringTag();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tsymbol$5 = path.Symbol;\n\treturn symbol$5;\n}\n\nvar web_domCollections_iterator = {};\n\nvar addToUnscopables;\nvar hasRequiredAddToUnscopables;\n\nfunction requireAddToUnscopables () {\n\tif (hasRequiredAddToUnscopables) return addToUnscopables;\n\thasRequiredAddToUnscopables = 1;\n\taddToUnscopables = function () { /* empty */ };\n\treturn addToUnscopables;\n}\n\nvar iterators;\nvar hasRequiredIterators;\n\nfunction requireIterators () {\n\tif (hasRequiredIterators) return iterators;\n\thasRequiredIterators = 1;\n\titerators = {};\n\treturn iterators;\n}\n\nvar functionName;\nvar hasRequiredFunctionName;\n\nfunction requireFunctionName () {\n\tif (hasRequiredFunctionName) return functionName;\n\thasRequiredFunctionName = 1;\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\n\tvar FunctionPrototype = Function.prototype;\n\t// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n\tvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\n\tvar EXISTS = hasOwn(FunctionPrototype, 'name');\n\t// additional protection from minified / mangled / dropped function names\n\tvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\n\tvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\n\tfunctionName = {\n\t EXISTS: EXISTS,\n\t PROPER: PROPER,\n\t CONFIGURABLE: CONFIGURABLE\n\t};\n\treturn functionName;\n}\n\nvar correctPrototypeGetter;\nvar hasRequiredCorrectPrototypeGetter;\n\nfunction requireCorrectPrototypeGetter () {\n\tif (hasRequiredCorrectPrototypeGetter) return correctPrototypeGetter;\n\thasRequiredCorrectPrototypeGetter = 1;\n\tvar fails = /*@__PURE__*/ requireFails();\n\n\tcorrectPrototypeGetter = !fails(function () {\n\t function F() { /* empty */ }\n\t F.prototype.constructor = null;\n\t // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n\t return Object.getPrototypeOf(new F()) !== F.prototype;\n\t});\n\treturn correctPrototypeGetter;\n}\n\nvar objectGetPrototypeOf;\nvar hasRequiredObjectGetPrototypeOf;\n\nfunction requireObjectGetPrototypeOf () {\n\tif (hasRequiredObjectGetPrototypeOf) return objectGetPrototypeOf;\n\thasRequiredObjectGetPrototypeOf = 1;\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar toObject = /*@__PURE__*/ requireToObject();\n\tvar sharedKey = /*@__PURE__*/ requireSharedKey();\n\tvar CORRECT_PROTOTYPE_GETTER = /*@__PURE__*/ requireCorrectPrototypeGetter();\n\n\tvar IE_PROTO = sharedKey('IE_PROTO');\n\tvar $Object = Object;\n\tvar ObjectPrototype = $Object.prototype;\n\n\t// `Object.getPrototypeOf` method\n\t// https://tc39.es/ecma262/#sec-object.getprototypeof\n\t// eslint-disable-next-line es/no-object-getprototypeof -- safe\n\tobjectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {\n\t var object = toObject(O);\n\t if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];\n\t var constructor = object.constructor;\n\t if (isCallable(constructor) && object instanceof constructor) {\n\t return constructor.prototype;\n\t } return object instanceof $Object ? ObjectPrototype : null;\n\t};\n\treturn objectGetPrototypeOf;\n}\n\nvar iteratorsCore;\nvar hasRequiredIteratorsCore;\n\nfunction requireIteratorsCore () {\n\tif (hasRequiredIteratorsCore) return iteratorsCore;\n\thasRequiredIteratorsCore = 1;\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar create = /*@__PURE__*/ requireObjectCreate();\n\tvar getPrototypeOf = /*@__PURE__*/ requireObjectGetPrototypeOf();\n\tvar defineBuiltIn = /*@__PURE__*/ requireDefineBuiltIn();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\tvar IS_PURE = /*@__PURE__*/ requireIsPure();\n\n\tvar ITERATOR = wellKnownSymbol('iterator');\n\tvar BUGGY_SAFARI_ITERATORS = false;\n\n\t// `%IteratorPrototype%` object\n\t// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\n\tvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n\t/* eslint-disable es/no-array-prototype-keys -- safe */\n\tif ([].keys) {\n\t arrayIterator = [].keys();\n\t // Safari 8 has buggy iterators w/o `next`\n\t if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n\t else {\n\t PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n\t if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n\t }\n\t}\n\n\tvar NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {\n\t var test = {};\n\t // FF44- legacy iterators case\n\t return IteratorPrototype[ITERATOR].call(test) !== test;\n\t});\n\n\tif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\n\telse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n\t// `%IteratorPrototype%[@@iterator]()` method\n\t// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\n\tif (!isCallable(IteratorPrototype[ITERATOR])) {\n\t defineBuiltIn(IteratorPrototype, ITERATOR, function () {\n\t return this;\n\t });\n\t}\n\n\titeratorsCore = {\n\t IteratorPrototype: IteratorPrototype,\n\t BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n\t};\n\treturn iteratorsCore;\n}\n\nvar iteratorCreateConstructor;\nvar hasRequiredIteratorCreateConstructor;\n\nfunction requireIteratorCreateConstructor () {\n\tif (hasRequiredIteratorCreateConstructor) return iteratorCreateConstructor;\n\thasRequiredIteratorCreateConstructor = 1;\n\tvar IteratorPrototype = /*@__PURE__*/ requireIteratorsCore().IteratorPrototype;\n\tvar create = /*@__PURE__*/ requireObjectCreate();\n\tvar createPropertyDescriptor = /*@__PURE__*/ requireCreatePropertyDescriptor();\n\tvar setToStringTag = /*@__PURE__*/ requireSetToStringTag();\n\tvar Iterators = /*@__PURE__*/ requireIterators();\n\n\tvar returnThis = function () { return this; };\n\n\titeratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {\n\t var TO_STRING_TAG = NAME + ' Iterator';\n\t IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });\n\t setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n\t Iterators[TO_STRING_TAG] = returnThis;\n\t return IteratorConstructor;\n\t};\n\treturn iteratorCreateConstructor;\n}\n\nvar functionUncurryThisAccessor;\nvar hasRequiredFunctionUncurryThisAccessor;\n\nfunction requireFunctionUncurryThisAccessor () {\n\tif (hasRequiredFunctionUncurryThisAccessor) return functionUncurryThisAccessor;\n\thasRequiredFunctionUncurryThisAccessor = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar aCallable = /*@__PURE__*/ requireACallable();\n\n\tfunctionUncurryThisAccessor = function (object, key, method) {\n\t try {\n\t // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n\t return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));\n\t } catch (error) { /* empty */ }\n\t};\n\treturn functionUncurryThisAccessor;\n}\n\nvar isPossiblePrototype;\nvar hasRequiredIsPossiblePrototype;\n\nfunction requireIsPossiblePrototype () {\n\tif (hasRequiredIsPossiblePrototype) return isPossiblePrototype;\n\thasRequiredIsPossiblePrototype = 1;\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\n\tisPossiblePrototype = function (argument) {\n\t return isObject(argument) || argument === null;\n\t};\n\treturn isPossiblePrototype;\n}\n\nvar aPossiblePrototype;\nvar hasRequiredAPossiblePrototype;\n\nfunction requireAPossiblePrototype () {\n\tif (hasRequiredAPossiblePrototype) return aPossiblePrototype;\n\thasRequiredAPossiblePrototype = 1;\n\tvar isPossiblePrototype = /*@__PURE__*/ requireIsPossiblePrototype();\n\n\tvar $String = String;\n\tvar $TypeError = TypeError;\n\n\taPossiblePrototype = function (argument) {\n\t if (isPossiblePrototype(argument)) return argument;\n\t throw new $TypeError(\"Can't set \" + $String(argument) + ' as a prototype');\n\t};\n\treturn aPossiblePrototype;\n}\n\nvar objectSetPrototypeOf;\nvar hasRequiredObjectSetPrototypeOf;\n\nfunction requireObjectSetPrototypeOf () {\n\tif (hasRequiredObjectSetPrototypeOf) return objectSetPrototypeOf;\n\thasRequiredObjectSetPrototypeOf = 1;\n\t/* eslint-disable no-proto -- safe */\n\tvar uncurryThisAccessor = /*@__PURE__*/ requireFunctionUncurryThisAccessor();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar requireObjectCoercible = /*@__PURE__*/ requireRequireObjectCoercible();\n\tvar aPossiblePrototype = /*@__PURE__*/ requireAPossiblePrototype();\n\n\t// `Object.setPrototypeOf` method\n\t// https://tc39.es/ecma262/#sec-object.setprototypeof\n\t// Works with __proto__ only. Old v8 can't work with null proto objects.\n\t// eslint-disable-next-line es/no-object-setprototypeof -- safe\n\tobjectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n\t var CORRECT_SETTER = false;\n\t var test = {};\n\t var setter;\n\t try {\n\t setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');\n\t setter(test, []);\n\t CORRECT_SETTER = test instanceof Array;\n\t } catch (error) { /* empty */ }\n\t return function setPrototypeOf(O, proto) {\n\t requireObjectCoercible(O);\n\t aPossiblePrototype(proto);\n\t if (!isObject(O)) return O;\n\t if (CORRECT_SETTER) setter(O, proto);\n\t else O.__proto__ = proto;\n\t return O;\n\t };\n\t}() : undefined);\n\treturn objectSetPrototypeOf;\n}\n\nvar iteratorDefine;\nvar hasRequiredIteratorDefine;\n\nfunction requireIteratorDefine () {\n\tif (hasRequiredIteratorDefine) return iteratorDefine;\n\thasRequiredIteratorDefine = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\tvar IS_PURE = /*@__PURE__*/ requireIsPure();\n\tvar FunctionName = /*@__PURE__*/ requireFunctionName();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar createIteratorConstructor = /*@__PURE__*/ requireIteratorCreateConstructor();\n\tvar getPrototypeOf = /*@__PURE__*/ requireObjectGetPrototypeOf();\n\tvar setPrototypeOf = /*@__PURE__*/ requireObjectSetPrototypeOf();\n\tvar setToStringTag = /*@__PURE__*/ requireSetToStringTag();\n\tvar createNonEnumerableProperty = /*@__PURE__*/ requireCreateNonEnumerableProperty();\n\tvar defineBuiltIn = /*@__PURE__*/ requireDefineBuiltIn();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\tvar Iterators = /*@__PURE__*/ requireIterators();\n\tvar IteratorsCore = /*@__PURE__*/ requireIteratorsCore();\n\n\tvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\n\tvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\n\tvar IteratorPrototype = IteratorsCore.IteratorPrototype;\n\tvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\n\tvar ITERATOR = wellKnownSymbol('iterator');\n\tvar KEYS = 'keys';\n\tvar VALUES = 'values';\n\tvar ENTRIES = 'entries';\n\n\tvar returnThis = function () { return this; };\n\n\titeratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n\t createIteratorConstructor(IteratorConstructor, NAME, next);\n\n\t var getIterationMethod = function (KIND) {\n\t if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n\t if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];\n\n\t switch (KIND) {\n\t case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n\t case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n\t case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n\t }\n\n\t return function () { return new IteratorConstructor(this); };\n\t };\n\n\t var TO_STRING_TAG = NAME + ' Iterator';\n\t var INCORRECT_VALUES_NAME = false;\n\t var IterablePrototype = Iterable.prototype;\n\t var nativeIterator = IterablePrototype[ITERATOR]\n\t || IterablePrototype['@@iterator']\n\t || DEFAULT && IterablePrototype[DEFAULT];\n\t var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n\t var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n\t var CurrentIteratorPrototype, methods, KEY;\n\n\t // fix native\n\t if (anyNativeIterator) {\n\t CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n\t if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n\t if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n\t if (setPrototypeOf) {\n\t setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n\t } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n\t defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);\n\t }\n\t }\n\t // Set @@toStringTag to native iterators\n\t setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n\t if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n\t }\n\t }\n\n\t // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n\t if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n\t if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n\t createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n\t } else {\n\t INCORRECT_VALUES_NAME = true;\n\t defaultIterator = function values() { return call(nativeIterator, this); };\n\t }\n\t }\n\n\t // export additional methods\n\t if (DEFAULT) {\n\t methods = {\n\t values: getIterationMethod(VALUES),\n\t keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n\t entries: getIterationMethod(ENTRIES)\n\t };\n\t if (FORCED) for (KEY in methods) {\n\t if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n\t defineBuiltIn(IterablePrototype, KEY, methods[KEY]);\n\t }\n\t } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n\t }\n\n\t // define iterator\n\t if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n\t defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });\n\t }\n\t Iterators[NAME] = defaultIterator;\n\n\t return methods;\n\t};\n\treturn iteratorDefine;\n}\n\nvar createIterResultObject;\nvar hasRequiredCreateIterResultObject;\n\nfunction requireCreateIterResultObject () {\n\tif (hasRequiredCreateIterResultObject) return createIterResultObject;\n\thasRequiredCreateIterResultObject = 1;\n\t// `CreateIterResultObject` abstract operation\n\t// https://tc39.es/ecma262/#sec-createiterresultobject\n\tcreateIterResultObject = function (value, done) {\n\t return { value: value, done: done };\n\t};\n\treturn createIterResultObject;\n}\n\nvar es_array_iterator;\nvar hasRequiredEs_array_iterator;\n\nfunction requireEs_array_iterator () {\n\tif (hasRequiredEs_array_iterator) return es_array_iterator;\n\thasRequiredEs_array_iterator = 1;\n\tvar toIndexedObject = /*@__PURE__*/ requireToIndexedObject();\n\tvar addToUnscopables = /*@__PURE__*/ requireAddToUnscopables();\n\tvar Iterators = /*@__PURE__*/ requireIterators();\n\tvar InternalStateModule = /*@__PURE__*/ requireInternalState();\n\tvar defineProperty = /*@__PURE__*/ requireObjectDefineProperty().f;\n\tvar defineIterator = /*@__PURE__*/ requireIteratorDefine();\n\tvar createIterResultObject = /*@__PURE__*/ requireCreateIterResultObject();\n\tvar IS_PURE = /*@__PURE__*/ requireIsPure();\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\n\tvar ARRAY_ITERATOR = 'Array Iterator';\n\tvar setInternalState = InternalStateModule.set;\n\tvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n\t// `Array.prototype.entries` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.entries\n\t// `Array.prototype.keys` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.keys\n\t// `Array.prototype.values` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.values\n\t// `Array.prototype[@@iterator]` method\n\t// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n\t// `CreateArrayIterator` internal method\n\t// https://tc39.es/ecma262/#sec-createarrayiterator\n\tes_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {\n\t setInternalState(this, {\n\t type: ARRAY_ITERATOR,\n\t target: toIndexedObject(iterated), // target\n\t index: 0, // next index\n\t kind: kind // kind\n\t });\n\t// `%ArrayIteratorPrototype%.next` method\n\t// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n\t}, function () {\n\t var state = getInternalState(this);\n\t var target = state.target;\n\t var index = state.index++;\n\t if (!target || index >= target.length) {\n\t state.target = null;\n\t return createIterResultObject(undefined, true);\n\t }\n\t switch (state.kind) {\n\t case 'keys': return createIterResultObject(index, false);\n\t case 'values': return createIterResultObject(target[index], false);\n\t } return createIterResultObject([index, target[index]], false);\n\t}, 'values');\n\n\t// argumentsList[@@iterator] is %ArrayProto_values%\n\t// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n\t// https://tc39.es/ecma262/#sec-createmappedargumentsobject\n\tvar values = Iterators.Arguments = Iterators.Array;\n\n\t// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\n\taddToUnscopables('keys');\n\taddToUnscopables('values');\n\taddToUnscopables('entries');\n\n\t// V8 ~ Chrome 45- bug\n\tif (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {\n\t defineProperty(values, 'name', { value: 'values' });\n\t} catch (error) { /* empty */ }\n\treturn es_array_iterator;\n}\n\nvar domIterables;\nvar hasRequiredDomIterables;\n\nfunction requireDomIterables () {\n\tif (hasRequiredDomIterables) return domIterables;\n\thasRequiredDomIterables = 1;\n\t// iterable DOM collections\n\t// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\n\tdomIterables = {\n\t CSSRuleList: 0,\n\t CSSStyleDeclaration: 0,\n\t CSSValueList: 0,\n\t ClientRectList: 0,\n\t DOMRectList: 0,\n\t DOMStringList: 0,\n\t DOMTokenList: 1,\n\t DataTransferItemList: 0,\n\t FileList: 0,\n\t HTMLAllCollection: 0,\n\t HTMLCollection: 0,\n\t HTMLFormElement: 0,\n\t HTMLSelectElement: 0,\n\t MediaList: 0,\n\t MimeTypeArray: 0,\n\t NamedNodeMap: 0,\n\t NodeList: 1,\n\t PaintRequestList: 0,\n\t Plugin: 0,\n\t PluginArray: 0,\n\t SVGLengthList: 0,\n\t SVGNumberList: 0,\n\t SVGPathSegList: 0,\n\t SVGPointList: 0,\n\t SVGStringList: 0,\n\t SVGTransformList: 0,\n\t SourceBufferList: 0,\n\t StyleSheetList: 0,\n\t TextTrackCueList: 0,\n\t TextTrackList: 0,\n\t TouchList: 0\n\t};\n\treturn domIterables;\n}\n\nvar hasRequiredWeb_domCollections_iterator;\n\nfunction requireWeb_domCollections_iterator () {\n\tif (hasRequiredWeb_domCollections_iterator) return web_domCollections_iterator;\n\thasRequiredWeb_domCollections_iterator = 1;\n\trequireEs_array_iterator();\n\tvar DOMIterables = /*@__PURE__*/ requireDomIterables();\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar setToStringTag = /*@__PURE__*/ requireSetToStringTag();\n\tvar Iterators = /*@__PURE__*/ requireIterators();\n\n\tfor (var COLLECTION_NAME in DOMIterables) {\n\t setToStringTag(globalThis[COLLECTION_NAME], COLLECTION_NAME);\n\t Iterators[COLLECTION_NAME] = Iterators.Array;\n\t}\n\treturn web_domCollections_iterator;\n}\n\nvar symbol$4;\nvar hasRequiredSymbol$4;\n\nfunction requireSymbol$4 () {\n\tif (hasRequiredSymbol$4) return symbol$4;\n\thasRequiredSymbol$4 = 1;\n\tvar parent = /*@__PURE__*/ requireSymbol$5();\n\trequireWeb_domCollections_iterator();\n\n\tsymbol$4 = parent;\n\treturn symbol$4;\n}\n\nvar symbol$3;\nvar hasRequiredSymbol$3;\n\nfunction requireSymbol$3 () {\n\tif (hasRequiredSymbol$3) return symbol$3;\n\thasRequiredSymbol$3 = 1;\n\tsymbol$3 = /*@__PURE__*/ requireSymbol$4();\n\treturn symbol$3;\n}\n\nvar symbolExports$1 = requireSymbol$3();\nvar _Symbol$1 = /*@__PURE__*/getDefaultExportFromCjs(symbolExports$1);\n\nvar es_array_slice = {};\n\nvar hasRequiredEs_array_slice;\n\nfunction requireEs_array_slice () {\n\tif (hasRequiredEs_array_slice) return es_array_slice;\n\thasRequiredEs_array_slice = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar isArray = /*@__PURE__*/ requireIsArray$3();\n\tvar isConstructor = /*@__PURE__*/ requireIsConstructor();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar toAbsoluteIndex = /*@__PURE__*/ requireToAbsoluteIndex();\n\tvar lengthOfArrayLike = /*@__PURE__*/ requireLengthOfArrayLike();\n\tvar toIndexedObject = /*@__PURE__*/ requireToIndexedObject();\n\tvar createProperty = /*@__PURE__*/ requireCreateProperty();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\tvar arrayMethodHasSpeciesSupport = /*@__PURE__*/ requireArrayMethodHasSpeciesSupport();\n\tvar nativeSlice = /*@__PURE__*/ requireArraySlice();\n\n\tvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\n\tvar SPECIES = wellKnownSymbol('species');\n\tvar $Array = Array;\n\tvar max = Math.max;\n\n\t// `Array.prototype.slice` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.slice\n\t// fallback for not array-like ES3 strings and DOM objects\n\t$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n\t slice: function slice(start, end) {\n\t var O = toIndexedObject(this);\n\t var length = lengthOfArrayLike(O);\n\t var k = toAbsoluteIndex(start, length);\n\t var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n\t // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n\t var Constructor, result, n;\n\t if (isArray(O)) {\n\t Constructor = O.constructor;\n\t // cross-realm fallback\n\t if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) {\n\t Constructor = undefined;\n\t } else if (isObject(Constructor)) {\n\t Constructor = Constructor[SPECIES];\n\t if (Constructor === null) Constructor = undefined;\n\t }\n\t if (Constructor === $Array || Constructor === undefined) {\n\t return nativeSlice(O, k, fin);\n\t }\n\t }\n\t result = new (Constructor === undefined ? $Array : Constructor)(max(fin - k, 0));\n\t for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n\t result.length = n;\n\t return result;\n\t }\n\t});\n\treturn es_array_slice;\n}\n\nvar slice$3;\nvar hasRequiredSlice$3;\n\nfunction requireSlice$3 () {\n\tif (hasRequiredSlice$3) return slice$3;\n\thasRequiredSlice$3 = 1;\n\trequireEs_array_slice();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tslice$3 = getBuiltInPrototypeMethod('Array', 'slice');\n\treturn slice$3;\n}\n\nvar slice$2;\nvar hasRequiredSlice$2;\n\nfunction requireSlice$2 () {\n\tif (hasRequiredSlice$2) return slice$2;\n\thasRequiredSlice$2 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireSlice$3();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\tslice$2 = function (it) {\n\t var own = it.slice;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.slice) ? method : own;\n\t};\n\treturn slice$2;\n}\n\nvar slice$1;\nvar hasRequiredSlice$1;\n\nfunction requireSlice$1 () {\n\tif (hasRequiredSlice$1) return slice$1;\n\thasRequiredSlice$1 = 1;\n\tvar parent = /*@__PURE__*/ requireSlice$2();\n\n\tslice$1 = parent;\n\treturn slice$1;\n}\n\nvar slice;\nvar hasRequiredSlice;\n\nfunction requireSlice () {\n\tif (hasRequiredSlice) return slice;\n\thasRequiredSlice = 1;\n\tslice = /*@__PURE__*/ requireSlice$1();\n\treturn slice;\n}\n\nvar sliceExports = requireSlice();\nvar _sliceInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(sliceExports);\n\nvar ownKeys$4;\nvar hasRequiredOwnKeys;\n\nfunction requireOwnKeys () {\n\tif (hasRequiredOwnKeys) return ownKeys$4;\n\thasRequiredOwnKeys = 1;\n\tvar getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar getOwnPropertyNamesModule = /*@__PURE__*/ requireObjectGetOwnPropertyNames();\n\tvar getOwnPropertySymbolsModule = /*@__PURE__*/ requireObjectGetOwnPropertySymbols();\n\tvar anObject = /*@__PURE__*/ requireAnObject();\n\n\tvar concat = uncurryThis([].concat);\n\n\t// all object keys, includes non-enumerable and symbols\n\townKeys$4 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n\t var keys = getOwnPropertyNamesModule.f(anObject(it));\n\t var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n\t return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;\n\t};\n\treturn ownKeys$4;\n}\n\nvar es_array_isArray = {};\n\nvar hasRequiredEs_array_isArray;\n\nfunction requireEs_array_isArray () {\n\tif (hasRequiredEs_array_isArray) return es_array_isArray;\n\thasRequiredEs_array_isArray = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar isArray = /*@__PURE__*/ requireIsArray$3();\n\n\t// `Array.isArray` method\n\t// https://tc39.es/ecma262/#sec-array.isarray\n\t$({ target: 'Array', stat: true }, {\n\t isArray: isArray\n\t});\n\treturn es_array_isArray;\n}\n\nvar isArray$2;\nvar hasRequiredIsArray$2;\n\nfunction requireIsArray$2 () {\n\tif (hasRequiredIsArray$2) return isArray$2;\n\thasRequiredIsArray$2 = 1;\n\trequireEs_array_isArray();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tisArray$2 = path.Array.isArray;\n\treturn isArray$2;\n}\n\nvar isArray$1;\nvar hasRequiredIsArray$1;\n\nfunction requireIsArray$1 () {\n\tif (hasRequiredIsArray$1) return isArray$1;\n\thasRequiredIsArray$1 = 1;\n\tvar parent = /*@__PURE__*/ requireIsArray$2();\n\n\tisArray$1 = parent;\n\treturn isArray$1;\n}\n\nvar isArray;\nvar hasRequiredIsArray;\n\nfunction requireIsArray () {\n\tif (hasRequiredIsArray) return isArray;\n\thasRequiredIsArray = 1;\n\tisArray = /*@__PURE__*/ requireIsArray$1();\n\treturn isArray;\n}\n\nvar isArrayExports = requireIsArray();\nvar _Array$isArray = /*@__PURE__*/getDefaultExportFromCjs(isArrayExports);\n\nvar es_array_map = {};\n\nvar hasRequiredEs_array_map;\n\nfunction requireEs_array_map () {\n\tif (hasRequiredEs_array_map) return es_array_map;\n\thasRequiredEs_array_map = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar $map = /*@__PURE__*/ requireArrayIteration().map;\n\tvar arrayMethodHasSpeciesSupport = /*@__PURE__*/ requireArrayMethodHasSpeciesSupport();\n\n\tvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n\n\t// `Array.prototype.map` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.map\n\t// with adding support of @@species\n\t$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n\t map: function map(callbackfn /* , thisArg */) {\n\t return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t }\n\t});\n\treturn es_array_map;\n}\n\nvar map$6;\nvar hasRequiredMap$6;\n\nfunction requireMap$6 () {\n\tif (hasRequiredMap$6) return map$6;\n\thasRequiredMap$6 = 1;\n\trequireEs_array_map();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tmap$6 = getBuiltInPrototypeMethod('Array', 'map');\n\treturn map$6;\n}\n\nvar map$5;\nvar hasRequiredMap$5;\n\nfunction requireMap$5 () {\n\tif (hasRequiredMap$5) return map$5;\n\thasRequiredMap$5 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireMap$6();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\tmap$5 = function (it) {\n\t var own = it.map;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.map) ? method : own;\n\t};\n\treturn map$5;\n}\n\nvar map$4;\nvar hasRequiredMap$4;\n\nfunction requireMap$4 () {\n\tif (hasRequiredMap$4) return map$4;\n\thasRequiredMap$4 = 1;\n\tvar parent = /*@__PURE__*/ requireMap$5();\n\n\tmap$4 = parent;\n\treturn map$4;\n}\n\nvar map$3;\nvar hasRequiredMap$3;\n\nfunction requireMap$3 () {\n\tif (hasRequiredMap$3) return map$3;\n\thasRequiredMap$3 = 1;\n\tmap$3 = /*@__PURE__*/ requireMap$4();\n\treturn map$3;\n}\n\nvar mapExports$1 = requireMap$3();\nvar _mapInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(mapExports$1);\n\nvar es_object_keys = {};\n\nvar hasRequiredEs_object_keys;\n\nfunction requireEs_object_keys () {\n\tif (hasRequiredEs_object_keys) return es_object_keys;\n\thasRequiredEs_object_keys = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar toObject = /*@__PURE__*/ requireToObject();\n\tvar nativeKeys = /*@__PURE__*/ requireObjectKeys();\n\tvar fails = /*@__PURE__*/ requireFails();\n\n\tvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n\t// `Object.keys` method\n\t// https://tc39.es/ecma262/#sec-object.keys\n\t$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n\t keys: function keys(it) {\n\t return nativeKeys(toObject(it));\n\t }\n\t});\n\treturn es_object_keys;\n}\n\nvar keys$2;\nvar hasRequiredKeys$2;\n\nfunction requireKeys$2 () {\n\tif (hasRequiredKeys$2) return keys$2;\n\thasRequiredKeys$2 = 1;\n\trequireEs_object_keys();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tkeys$2 = path.Object.keys;\n\treturn keys$2;\n}\n\nvar keys$1;\nvar hasRequiredKeys$1;\n\nfunction requireKeys$1 () {\n\tif (hasRequiredKeys$1) return keys$1;\n\thasRequiredKeys$1 = 1;\n\tvar parent = /*@__PURE__*/ requireKeys$2();\n\n\tkeys$1 = parent;\n\treturn keys$1;\n}\n\nvar keys;\nvar hasRequiredKeys;\n\nfunction requireKeys () {\n\tif (hasRequiredKeys) return keys;\n\thasRequiredKeys = 1;\n\tkeys = /*@__PURE__*/ requireKeys$1();\n\treturn keys;\n}\n\nvar keysExports = requireKeys();\nvar _Object$keys = /*@__PURE__*/getDefaultExportFromCjs(keysExports);\n\nvar es_date_now = {};\n\nvar hasRequiredEs_date_now;\n\nfunction requireEs_date_now () {\n\tif (hasRequiredEs_date_now) return es_date_now;\n\thasRequiredEs_date_now = 1;\n\t// TODO: Remove from `core-js@4`\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\n\tvar $Date = Date;\n\tvar thisTimeValue = uncurryThis($Date.prototype.getTime);\n\n\t// `Date.now` method\n\t// https://tc39.es/ecma262/#sec-date.now\n\t$({ target: 'Date', stat: true }, {\n\t now: function now() {\n\t return thisTimeValue(new $Date());\n\t }\n\t});\n\treturn es_date_now;\n}\n\nvar now$3;\nvar hasRequiredNow$2;\n\nfunction requireNow$2 () {\n\tif (hasRequiredNow$2) return now$3;\n\thasRequiredNow$2 = 1;\n\trequireEs_date_now();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tnow$3 = path.Date.now;\n\treturn now$3;\n}\n\nvar now$2;\nvar hasRequiredNow$1;\n\nfunction requireNow$1 () {\n\tif (hasRequiredNow$1) return now$2;\n\thasRequiredNow$1 = 1;\n\tvar parent = /*@__PURE__*/ requireNow$2();\n\n\tnow$2 = parent;\n\treturn now$2;\n}\n\nvar now$1;\nvar hasRequiredNow;\n\nfunction requireNow () {\n\tif (hasRequiredNow) return now$1;\n\thasRequiredNow = 1;\n\tnow$1 = /*@__PURE__*/ requireNow$1();\n\treturn now$1;\n}\n\nvar nowExports = requireNow();\nvar _Date$now = /*@__PURE__*/getDefaultExportFromCjs(nowExports);\n\nvar es_array_forEach = {};\n\nvar arrayMethodIsStrict;\nvar hasRequiredArrayMethodIsStrict;\n\nfunction requireArrayMethodIsStrict () {\n\tif (hasRequiredArrayMethodIsStrict) return arrayMethodIsStrict;\n\thasRequiredArrayMethodIsStrict = 1;\n\tvar fails = /*@__PURE__*/ requireFails();\n\n\tarrayMethodIsStrict = function (METHOD_NAME, argument) {\n\t var method = [][METHOD_NAME];\n\t return !!method && fails(function () {\n\t // eslint-disable-next-line no-useless-call -- required for testing\n\t method.call(null, argument || function () { return 1; }, 1);\n\t });\n\t};\n\treturn arrayMethodIsStrict;\n}\n\nvar arrayForEach;\nvar hasRequiredArrayForEach;\n\nfunction requireArrayForEach () {\n\tif (hasRequiredArrayForEach) return arrayForEach;\n\thasRequiredArrayForEach = 1;\n\tvar $forEach = /*@__PURE__*/ requireArrayIteration().forEach;\n\tvar arrayMethodIsStrict = /*@__PURE__*/ requireArrayMethodIsStrict();\n\n\tvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n\t// `Array.prototype.forEach` method implementation\n\t// https://tc39.es/ecma262/#sec-array.prototype.foreach\n\tarrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n\t return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n\t} : [].forEach;\n\treturn arrayForEach;\n}\n\nvar hasRequiredEs_array_forEach;\n\nfunction requireEs_array_forEach () {\n\tif (hasRequiredEs_array_forEach) return es_array_forEach;\n\thasRequiredEs_array_forEach = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar forEach = /*@__PURE__*/ requireArrayForEach();\n\n\t// `Array.prototype.forEach` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.foreach\n\t// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n\t$({ target: 'Array', proto: true, forced: [].forEach !== forEach }, {\n\t forEach: forEach\n\t});\n\treturn es_array_forEach;\n}\n\nvar forEach$4;\nvar hasRequiredForEach$3;\n\nfunction requireForEach$3 () {\n\tif (hasRequiredForEach$3) return forEach$4;\n\thasRequiredForEach$3 = 1;\n\trequireEs_array_forEach();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tforEach$4 = getBuiltInPrototypeMethod('Array', 'forEach');\n\treturn forEach$4;\n}\n\nvar forEach$3;\nvar hasRequiredForEach$2;\n\nfunction requireForEach$2 () {\n\tif (hasRequiredForEach$2) return forEach$3;\n\thasRequiredForEach$2 = 1;\n\tvar parent = /*@__PURE__*/ requireForEach$3();\n\n\tforEach$3 = parent;\n\treturn forEach$3;\n}\n\nvar forEach$2;\nvar hasRequiredForEach$1;\n\nfunction requireForEach$1 () {\n\tif (hasRequiredForEach$1) return forEach$2;\n\thasRequiredForEach$1 = 1;\n\tvar classof = /*@__PURE__*/ requireClassof();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireForEach$2();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\tvar DOMIterables = {\n\t DOMTokenList: true,\n\t NodeList: true\n\t};\n\n\tforEach$2 = function (it) {\n\t var own = it.forEach;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.forEach)\n\t || hasOwn(DOMIterables, classof(it)) ? method : own;\n\t};\n\treturn forEach$2;\n}\n\nvar forEach$1;\nvar hasRequiredForEach;\n\nfunction requireForEach () {\n\tif (hasRequiredForEach) return forEach$1;\n\thasRequiredForEach = 1;\n\tforEach$1 = /*@__PURE__*/ requireForEach$1();\n\treturn forEach$1;\n}\n\nvar forEachExports = requireForEach();\nvar _forEachInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(forEachExports);\n\nvar es_array_reverse = {};\n\nvar hasRequiredEs_array_reverse;\n\nfunction requireEs_array_reverse () {\n\tif (hasRequiredEs_array_reverse) return es_array_reverse;\n\thasRequiredEs_array_reverse = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar isArray = /*@__PURE__*/ requireIsArray$3();\n\n\tvar nativeReverse = uncurryThis([].reverse);\n\tvar test = [1, 2];\n\n\t// `Array.prototype.reverse` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.reverse\n\t// fix for Safari 12.0 bug\n\t// https://bugs.webkit.org/show_bug.cgi?id=188794\n\t$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {\n\t reverse: function reverse() {\n\t // eslint-disable-next-line no-self-assign -- dirty hack\n\t if (isArray(this)) this.length = this.length;\n\t return nativeReverse(this);\n\t }\n\t});\n\treturn es_array_reverse;\n}\n\nvar reverse$3;\nvar hasRequiredReverse$3;\n\nfunction requireReverse$3 () {\n\tif (hasRequiredReverse$3) return reverse$3;\n\thasRequiredReverse$3 = 1;\n\trequireEs_array_reverse();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\treverse$3 = getBuiltInPrototypeMethod('Array', 'reverse');\n\treturn reverse$3;\n}\n\nvar reverse$2;\nvar hasRequiredReverse$2;\n\nfunction requireReverse$2 () {\n\tif (hasRequiredReverse$2) return reverse$2;\n\thasRequiredReverse$2 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireReverse$3();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\treverse$2 = function (it) {\n\t var own = it.reverse;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.reverse) ? method : own;\n\t};\n\treturn reverse$2;\n}\n\nvar reverse$1;\nvar hasRequiredReverse$1;\n\nfunction requireReverse$1 () {\n\tif (hasRequiredReverse$1) return reverse$1;\n\thasRequiredReverse$1 = 1;\n\tvar parent = /*@__PURE__*/ requireReverse$2();\n\n\treverse$1 = parent;\n\treturn reverse$1;\n}\n\nvar reverse;\nvar hasRequiredReverse;\n\nfunction requireReverse () {\n\tif (hasRequiredReverse) return reverse;\n\thasRequiredReverse = 1;\n\treverse = /*@__PURE__*/ requireReverse$1();\n\treturn reverse;\n}\n\nvar reverseExports = requireReverse();\nvar _reverseInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(reverseExports);\n\nvar es_array_splice = {};\n\nvar arraySetLength;\nvar hasRequiredArraySetLength;\n\nfunction requireArraySetLength () {\n\tif (hasRequiredArraySetLength) return arraySetLength;\n\thasRequiredArraySetLength = 1;\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar isArray = /*@__PURE__*/ requireIsArray$3();\n\n\tvar $TypeError = TypeError;\n\t// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n\tvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n\t// Safari < 13 does not throw an error in this case\n\tvar SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {\n\t // makes no sense without proper strict mode support\n\t if (this !== undefined) return true;\n\t try {\n\t // eslint-disable-next-line es/no-object-defineproperty -- safe\n\t Object.defineProperty([], 'length', { writable: false }).length = 1;\n\t } catch (error) {\n\t return error instanceof TypeError;\n\t }\n\t}();\n\n\tarraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {\n\t if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {\n\t throw new $TypeError('Cannot set read only .length');\n\t } return O.length = length;\n\t} : function (O, length) {\n\t return O.length = length;\n\t};\n\treturn arraySetLength;\n}\n\nvar deletePropertyOrThrow;\nvar hasRequiredDeletePropertyOrThrow;\n\nfunction requireDeletePropertyOrThrow () {\n\tif (hasRequiredDeletePropertyOrThrow) return deletePropertyOrThrow;\n\thasRequiredDeletePropertyOrThrow = 1;\n\tvar tryToString = /*@__PURE__*/ requireTryToString();\n\n\tvar $TypeError = TypeError;\n\n\tdeletePropertyOrThrow = function (O, P) {\n\t if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));\n\t};\n\treturn deletePropertyOrThrow;\n}\n\nvar hasRequiredEs_array_splice;\n\nfunction requireEs_array_splice () {\n\tif (hasRequiredEs_array_splice) return es_array_splice;\n\thasRequiredEs_array_splice = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar toObject = /*@__PURE__*/ requireToObject();\n\tvar toAbsoluteIndex = /*@__PURE__*/ requireToAbsoluteIndex();\n\tvar toIntegerOrInfinity = /*@__PURE__*/ requireToIntegerOrInfinity();\n\tvar lengthOfArrayLike = /*@__PURE__*/ requireLengthOfArrayLike();\n\tvar setArrayLength = /*@__PURE__*/ requireArraySetLength();\n\tvar doesNotExceedSafeInteger = /*@__PURE__*/ requireDoesNotExceedSafeInteger();\n\tvar arraySpeciesCreate = /*@__PURE__*/ requireArraySpeciesCreate();\n\tvar createProperty = /*@__PURE__*/ requireCreateProperty();\n\tvar deletePropertyOrThrow = /*@__PURE__*/ requireDeletePropertyOrThrow();\n\tvar arrayMethodHasSpeciesSupport = /*@__PURE__*/ requireArrayMethodHasSpeciesSupport();\n\n\tvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\n\tvar max = Math.max;\n\tvar min = Math.min;\n\n\t// `Array.prototype.splice` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.splice\n\t// with adding support of @@species\n\t$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n\t splice: function splice(start, deleteCount /* , ...items */) {\n\t var O = toObject(this);\n\t var len = lengthOfArrayLike(O);\n\t var actualStart = toAbsoluteIndex(start, len);\n\t var argumentsLength = arguments.length;\n\t var insertCount, actualDeleteCount, A, k, from, to;\n\t if (argumentsLength === 0) {\n\t insertCount = actualDeleteCount = 0;\n\t } else if (argumentsLength === 1) {\n\t insertCount = 0;\n\t actualDeleteCount = len - actualStart;\n\t } else {\n\t insertCount = argumentsLength - 2;\n\t actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);\n\t }\n\t doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);\n\t A = arraySpeciesCreate(O, actualDeleteCount);\n\t for (k = 0; k < actualDeleteCount; k++) {\n\t from = actualStart + k;\n\t if (from in O) createProperty(A, k, O[from]);\n\t }\n\t A.length = actualDeleteCount;\n\t if (insertCount < actualDeleteCount) {\n\t for (k = actualStart; k < len - actualDeleteCount; k++) {\n\t from = k + actualDeleteCount;\n\t to = k + insertCount;\n\t if (from in O) O[to] = O[from];\n\t else deletePropertyOrThrow(O, to);\n\t }\n\t for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);\n\t } else if (insertCount > actualDeleteCount) {\n\t for (k = len - actualDeleteCount; k > actualStart; k--) {\n\t from = k + actualDeleteCount - 1;\n\t to = k + insertCount - 1;\n\t if (from in O) O[to] = O[from];\n\t else deletePropertyOrThrow(O, to);\n\t }\n\t }\n\t for (k = 0; k < insertCount; k++) {\n\t O[k + actualStart] = arguments[k + 2];\n\t }\n\t setArrayLength(O, len - actualDeleteCount + insertCount);\n\t return A;\n\t }\n\t});\n\treturn es_array_splice;\n}\n\nvar splice$3;\nvar hasRequiredSplice$3;\n\nfunction requireSplice$3 () {\n\tif (hasRequiredSplice$3) return splice$3;\n\thasRequiredSplice$3 = 1;\n\trequireEs_array_splice();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tsplice$3 = getBuiltInPrototypeMethod('Array', 'splice');\n\treturn splice$3;\n}\n\nvar splice$2;\nvar hasRequiredSplice$2;\n\nfunction requireSplice$2 () {\n\tif (hasRequiredSplice$2) return splice$2;\n\thasRequiredSplice$2 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireSplice$3();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\tsplice$2 = function (it) {\n\t var own = it.splice;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.splice) ? method : own;\n\t};\n\treturn splice$2;\n}\n\nvar splice$1;\nvar hasRequiredSplice$1;\n\nfunction requireSplice$1 () {\n\tif (hasRequiredSplice$1) return splice$1;\n\thasRequiredSplice$1 = 1;\n\tvar parent = /*@__PURE__*/ requireSplice$2();\n\n\tsplice$1 = parent;\n\treturn splice$1;\n}\n\nvar splice;\nvar hasRequiredSplice;\n\nfunction requireSplice () {\n\tif (hasRequiredSplice) return splice;\n\thasRequiredSplice = 1;\n\tsplice = /*@__PURE__*/ requireSplice$1();\n\treturn splice;\n}\n\nvar spliceExports = requireSplice();\nvar _spliceInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(spliceExports);\n\nvar es_array_includes = {};\n\nvar hasRequiredEs_array_includes;\n\nfunction requireEs_array_includes () {\n\tif (hasRequiredEs_array_includes) return es_array_includes;\n\thasRequiredEs_array_includes = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar $includes = /*@__PURE__*/ requireArrayIncludes().includes;\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar addToUnscopables = /*@__PURE__*/ requireAddToUnscopables();\n\n\t// FF99+ bug\n\tvar BROKEN_ON_SPARSE = fails(function () {\n\t // eslint-disable-next-line es/no-array-prototype-includes -- detection\n\t return !Array(1).includes();\n\t});\n\n\t// `Array.prototype.includes` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.includes\n\t$({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {\n\t includes: function includes(el /* , fromIndex = 0 */) {\n\t return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n\t }\n\t});\n\n\t// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\n\taddToUnscopables('includes');\n\treturn es_array_includes;\n}\n\nvar includes$4;\nvar hasRequiredIncludes$4;\n\nfunction requireIncludes$4 () {\n\tif (hasRequiredIncludes$4) return includes$4;\n\thasRequiredIncludes$4 = 1;\n\trequireEs_array_includes();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tincludes$4 = getBuiltInPrototypeMethod('Array', 'includes');\n\treturn includes$4;\n}\n\nvar es_string_includes = {};\n\nvar isRegexp;\nvar hasRequiredIsRegexp;\n\nfunction requireIsRegexp () {\n\tif (hasRequiredIsRegexp) return isRegexp;\n\thasRequiredIsRegexp = 1;\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar classof = /*@__PURE__*/ requireClassofRaw();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\n\tvar MATCH = wellKnownSymbol('match');\n\n\t// `IsRegExp` abstract operation\n\t// https://tc39.es/ecma262/#sec-isregexp\n\tisRegexp = function (it) {\n\t var isRegExp;\n\t return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');\n\t};\n\treturn isRegexp;\n}\n\nvar notARegexp;\nvar hasRequiredNotARegexp;\n\nfunction requireNotARegexp () {\n\tif (hasRequiredNotARegexp) return notARegexp;\n\thasRequiredNotARegexp = 1;\n\tvar isRegExp = /*@__PURE__*/ requireIsRegexp();\n\n\tvar $TypeError = TypeError;\n\n\tnotARegexp = function (it) {\n\t if (isRegExp(it)) {\n\t throw new $TypeError(\"The method doesn't accept regular expressions\");\n\t } return it;\n\t};\n\treturn notARegexp;\n}\n\nvar correctIsRegexpLogic;\nvar hasRequiredCorrectIsRegexpLogic;\n\nfunction requireCorrectIsRegexpLogic () {\n\tif (hasRequiredCorrectIsRegexpLogic) return correctIsRegexpLogic;\n\thasRequiredCorrectIsRegexpLogic = 1;\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\n\tvar MATCH = wellKnownSymbol('match');\n\n\tcorrectIsRegexpLogic = function (METHOD_NAME) {\n\t var regexp = /./;\n\t try {\n\t '/./'[METHOD_NAME](regexp);\n\t } catch (error1) {\n\t try {\n\t regexp[MATCH] = false;\n\t return '/./'[METHOD_NAME](regexp);\n\t } catch (error2) { /* empty */ }\n\t } return false;\n\t};\n\treturn correctIsRegexpLogic;\n}\n\nvar hasRequiredEs_string_includes;\n\nfunction requireEs_string_includes () {\n\tif (hasRequiredEs_string_includes) return es_string_includes;\n\thasRequiredEs_string_includes = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar notARegExp = /*@__PURE__*/ requireNotARegexp();\n\tvar requireObjectCoercible = /*@__PURE__*/ requireRequireObjectCoercible();\n\tvar toString = /*@__PURE__*/ requireToString();\n\tvar correctIsRegExpLogic = /*@__PURE__*/ requireCorrectIsRegexpLogic();\n\n\tvar stringIndexOf = uncurryThis(''.indexOf);\n\n\t// `String.prototype.includes` method\n\t// https://tc39.es/ecma262/#sec-string.prototype.includes\n\t$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n\t includes: function includes(searchString /* , position = 0 */) {\n\t return !!~stringIndexOf(\n\t toString(requireObjectCoercible(this)),\n\t toString(notARegExp(searchString)),\n\t arguments.length > 1 ? arguments[1] : undefined\n\t );\n\t }\n\t});\n\treturn es_string_includes;\n}\n\nvar includes$3;\nvar hasRequiredIncludes$3;\n\nfunction requireIncludes$3 () {\n\tif (hasRequiredIncludes$3) return includes$3;\n\thasRequiredIncludes$3 = 1;\n\trequireEs_string_includes();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tincludes$3 = getBuiltInPrototypeMethod('String', 'includes');\n\treturn includes$3;\n}\n\nvar includes$2;\nvar hasRequiredIncludes$2;\n\nfunction requireIncludes$2 () {\n\tif (hasRequiredIncludes$2) return includes$2;\n\thasRequiredIncludes$2 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar arrayMethod = /*@__PURE__*/ requireIncludes$4();\n\tvar stringMethod = /*@__PURE__*/ requireIncludes$3();\n\n\tvar ArrayPrototype = Array.prototype;\n\tvar StringPrototype = String.prototype;\n\n\tincludes$2 = function (it) {\n\t var own = it.includes;\n\t if (it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.includes)) return arrayMethod;\n\t if (typeof it == 'string' || it === StringPrototype || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.includes)) {\n\t return stringMethod;\n\t } return own;\n\t};\n\treturn includes$2;\n}\n\nvar includes$1;\nvar hasRequiredIncludes$1;\n\nfunction requireIncludes$1 () {\n\tif (hasRequiredIncludes$1) return includes$1;\n\thasRequiredIncludes$1 = 1;\n\tvar parent = /*@__PURE__*/ requireIncludes$2();\n\n\tincludes$1 = parent;\n\treturn includes$1;\n}\n\nvar includes;\nvar hasRequiredIncludes;\n\nfunction requireIncludes () {\n\tif (hasRequiredIncludes) return includes;\n\thasRequiredIncludes = 1;\n\tincludes = /*@__PURE__*/ requireIncludes$1();\n\treturn includes;\n}\n\nvar includesExports = requireIncludes();\nvar _includesInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(includesExports);\n\nvar es_object_getPrototypeOf = {};\n\nvar hasRequiredEs_object_getPrototypeOf;\n\nfunction requireEs_object_getPrototypeOf () {\n\tif (hasRequiredEs_object_getPrototypeOf) return es_object_getPrototypeOf;\n\thasRequiredEs_object_getPrototypeOf = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar toObject = /*@__PURE__*/ requireToObject();\n\tvar nativeGetPrototypeOf = /*@__PURE__*/ requireObjectGetPrototypeOf();\n\tvar CORRECT_PROTOTYPE_GETTER = /*@__PURE__*/ requireCorrectPrototypeGetter();\n\n\tvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });\n\n\t// `Object.getPrototypeOf` method\n\t// https://tc39.es/ecma262/#sec-object.getprototypeof\n\t$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {\n\t getPrototypeOf: function getPrototypeOf(it) {\n\t return nativeGetPrototypeOf(toObject(it));\n\t }\n\t});\n\treturn es_object_getPrototypeOf;\n}\n\nvar getPrototypeOf$2;\nvar hasRequiredGetPrototypeOf$2;\n\nfunction requireGetPrototypeOf$2 () {\n\tif (hasRequiredGetPrototypeOf$2) return getPrototypeOf$2;\n\thasRequiredGetPrototypeOf$2 = 1;\n\trequireEs_object_getPrototypeOf();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tgetPrototypeOf$2 = path.Object.getPrototypeOf;\n\treturn getPrototypeOf$2;\n}\n\nvar getPrototypeOf$1;\nvar hasRequiredGetPrototypeOf$1;\n\nfunction requireGetPrototypeOf$1 () {\n\tif (hasRequiredGetPrototypeOf$1) return getPrototypeOf$1;\n\thasRequiredGetPrototypeOf$1 = 1;\n\tvar parent = /*@__PURE__*/ requireGetPrototypeOf$2();\n\n\tgetPrototypeOf$1 = parent;\n\treturn getPrototypeOf$1;\n}\n\nvar getPrototypeOf;\nvar hasRequiredGetPrototypeOf;\n\nfunction requireGetPrototypeOf () {\n\tif (hasRequiredGetPrototypeOf) return getPrototypeOf;\n\thasRequiredGetPrototypeOf = 1;\n\tgetPrototypeOf = /*@__PURE__*/ requireGetPrototypeOf$1();\n\treturn getPrototypeOf;\n}\n\nvar getPrototypeOfExports = requireGetPrototypeOf();\nvar _Object$getPrototypeOf = /*@__PURE__*/getDefaultExportFromCjs(getPrototypeOfExports);\n\nvar concat$3;\nvar hasRequiredConcat$3;\n\nfunction requireConcat$3 () {\n\tif (hasRequiredConcat$3) return concat$3;\n\thasRequiredConcat$3 = 1;\n\trequireEs_array_concat();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tconcat$3 = getBuiltInPrototypeMethod('Array', 'concat');\n\treturn concat$3;\n}\n\nvar concat$2;\nvar hasRequiredConcat$2;\n\nfunction requireConcat$2 () {\n\tif (hasRequiredConcat$2) return concat$2;\n\thasRequiredConcat$2 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireConcat$3();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\tconcat$2 = function (it) {\n\t var own = it.concat;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.concat) ? method : own;\n\t};\n\treturn concat$2;\n}\n\nvar concat$1;\nvar hasRequiredConcat$1;\n\nfunction requireConcat$1 () {\n\tif (hasRequiredConcat$1) return concat$1;\n\thasRequiredConcat$1 = 1;\n\tvar parent = /*@__PURE__*/ requireConcat$2();\n\n\tconcat$1 = parent;\n\treturn concat$1;\n}\n\nvar concat;\nvar hasRequiredConcat;\n\nfunction requireConcat () {\n\tif (hasRequiredConcat) return concat;\n\thasRequiredConcat = 1;\n\tconcat = /*@__PURE__*/ requireConcat$1();\n\treturn concat;\n}\n\nvar concatExports = requireConcat();\nvar _concatInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(concatExports);\n\nvar es_array_filter = {};\n\nvar hasRequiredEs_array_filter;\n\nfunction requireEs_array_filter () {\n\tif (hasRequiredEs_array_filter) return es_array_filter;\n\thasRequiredEs_array_filter = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar $filter = /*@__PURE__*/ requireArrayIteration().filter;\n\tvar arrayMethodHasSpeciesSupport = /*@__PURE__*/ requireArrayMethodHasSpeciesSupport();\n\n\tvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');\n\n\t// `Array.prototype.filter` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.filter\n\t// with adding support of @@species\n\t$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n\t filter: function filter(callbackfn /* , thisArg */) {\n\t return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t }\n\t});\n\treturn es_array_filter;\n}\n\nvar filter$3;\nvar hasRequiredFilter$3;\n\nfunction requireFilter$3 () {\n\tif (hasRequiredFilter$3) return filter$3;\n\thasRequiredFilter$3 = 1;\n\trequireEs_array_filter();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tfilter$3 = getBuiltInPrototypeMethod('Array', 'filter');\n\treturn filter$3;\n}\n\nvar filter$2;\nvar hasRequiredFilter$2;\n\nfunction requireFilter$2 () {\n\tif (hasRequiredFilter$2) return filter$2;\n\thasRequiredFilter$2 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireFilter$3();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\tfilter$2 = function (it) {\n\t var own = it.filter;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.filter) ? method : own;\n\t};\n\treturn filter$2;\n}\n\nvar filter$1;\nvar hasRequiredFilter$1;\n\nfunction requireFilter$1 () {\n\tif (hasRequiredFilter$1) return filter$1;\n\thasRequiredFilter$1 = 1;\n\tvar parent = /*@__PURE__*/ requireFilter$2();\n\n\tfilter$1 = parent;\n\treturn filter$1;\n}\n\nvar filter;\nvar hasRequiredFilter;\n\nfunction requireFilter () {\n\tif (hasRequiredFilter) return filter;\n\thasRequiredFilter = 1;\n\tfilter = /*@__PURE__*/ requireFilter$1();\n\treturn filter;\n}\n\nvar filterExports = requireFilter();\nvar _filterInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(filterExports);\n\nvar es_object_values = {};\n\nvar objectToArray;\nvar hasRequiredObjectToArray;\n\nfunction requireObjectToArray () {\n\tif (hasRequiredObjectToArray) return objectToArray;\n\thasRequiredObjectToArray = 1;\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar objectGetPrototypeOf = /*@__PURE__*/ requireObjectGetPrototypeOf();\n\tvar objectKeys = /*@__PURE__*/ requireObjectKeys();\n\tvar toIndexedObject = /*@__PURE__*/ requireToIndexedObject();\n\tvar $propertyIsEnumerable = /*@__PURE__*/ requireObjectPropertyIsEnumerable().f;\n\n\tvar propertyIsEnumerable = uncurryThis($propertyIsEnumerable);\n\tvar push = uncurryThis([].push);\n\n\t// in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys\n\t// of `null` prototype objects\n\tvar IE_BUG = DESCRIPTORS && fails(function () {\n\t // eslint-disable-next-line es/no-object-create -- safe\n\t var O = Object.create(null);\n\t O[2] = 2;\n\t return !propertyIsEnumerable(O, 2);\n\t});\n\n\t// `Object.{ entries, values }` methods implementation\n\tvar createMethod = function (TO_ENTRIES) {\n\t return function (it) {\n\t var O = toIndexedObject(it);\n\t var keys = objectKeys(O);\n\t var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null;\n\t var length = keys.length;\n\t var i = 0;\n\t var result = [];\n\t var key;\n\t while (length > i) {\n\t key = keys[i++];\n\t if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) {\n\t push(result, TO_ENTRIES ? [key, O[key]] : O[key]);\n\t }\n\t }\n\t return result;\n\t };\n\t};\n\n\tobjectToArray = {\n\t // `Object.entries` method\n\t // https://tc39.es/ecma262/#sec-object.entries\n\t entries: createMethod(true),\n\t // `Object.values` method\n\t // https://tc39.es/ecma262/#sec-object.values\n\t values: createMethod(false)\n\t};\n\treturn objectToArray;\n}\n\nvar hasRequiredEs_object_values;\n\nfunction requireEs_object_values () {\n\tif (hasRequiredEs_object_values) return es_object_values;\n\thasRequiredEs_object_values = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar $values = /*@__PURE__*/ requireObjectToArray().values;\n\n\t// `Object.values` method\n\t// https://tc39.es/ecma262/#sec-object.values\n\t$({ target: 'Object', stat: true }, {\n\t values: function values(O) {\n\t return $values(O);\n\t }\n\t});\n\treturn es_object_values;\n}\n\nvar values$6;\nvar hasRequiredValues$6;\n\nfunction requireValues$6 () {\n\tif (hasRequiredValues$6) return values$6;\n\thasRequiredValues$6 = 1;\n\trequireEs_object_values();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tvalues$6 = path.Object.values;\n\treturn values$6;\n}\n\nvar values$5;\nvar hasRequiredValues$5;\n\nfunction requireValues$5 () {\n\tif (hasRequiredValues$5) return values$5;\n\thasRequiredValues$5 = 1;\n\tvar parent = /*@__PURE__*/ requireValues$6();\n\n\tvalues$5 = parent;\n\treturn values$5;\n}\n\nvar values$4;\nvar hasRequiredValues$4;\n\nfunction requireValues$4 () {\n\tif (hasRequiredValues$4) return values$4;\n\thasRequiredValues$4 = 1;\n\tvalues$4 = /*@__PURE__*/ requireValues$5();\n\treturn values$4;\n}\n\nvar valuesExports$1 = requireValues$4();\nvar _Object$values = /*@__PURE__*/getDefaultExportFromCjs(valuesExports$1);\n\nvar es_parseInt = {};\n\nvar whitespaces;\nvar hasRequiredWhitespaces;\n\nfunction requireWhitespaces () {\n\tif (hasRequiredWhitespaces) return whitespaces;\n\thasRequiredWhitespaces = 1;\n\t// a string of all valid unicode whitespaces\n\twhitespaces = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n\t '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n\treturn whitespaces;\n}\n\nvar stringTrim;\nvar hasRequiredStringTrim;\n\nfunction requireStringTrim () {\n\tif (hasRequiredStringTrim) return stringTrim;\n\thasRequiredStringTrim = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar requireObjectCoercible = /*@__PURE__*/ requireRequireObjectCoercible();\n\tvar toString = /*@__PURE__*/ requireToString();\n\tvar whitespaces = /*@__PURE__*/ requireWhitespaces();\n\n\tvar replace = uncurryThis(''.replace);\n\tvar ltrim = RegExp('^[' + whitespaces + ']+');\n\tvar rtrim = RegExp('(^|[^' + whitespaces + '])[' + whitespaces + ']+$');\n\n\t// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\n\tvar createMethod = function (TYPE) {\n\t return function ($this) {\n\t var string = toString(requireObjectCoercible($this));\n\t if (TYPE & 1) string = replace(string, ltrim, '');\n\t if (TYPE & 2) string = replace(string, rtrim, '$1');\n\t return string;\n\t };\n\t};\n\n\tstringTrim = {\n\t // `String.prototype.{ trimLeft, trimStart }` methods\n\t // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n\t start: createMethod(1),\n\t // `String.prototype.{ trimRight, trimEnd }` methods\n\t // https://tc39.es/ecma262/#sec-string.prototype.trimend\n\t end: createMethod(2),\n\t // `String.prototype.trim` method\n\t // https://tc39.es/ecma262/#sec-string.prototype.trim\n\t trim: createMethod(3)\n\t};\n\treturn stringTrim;\n}\n\nvar numberParseInt;\nvar hasRequiredNumberParseInt;\n\nfunction requireNumberParseInt () {\n\tif (hasRequiredNumberParseInt) return numberParseInt;\n\thasRequiredNumberParseInt = 1;\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar toString = /*@__PURE__*/ requireToString();\n\tvar trim = /*@__PURE__*/ requireStringTrim().trim;\n\tvar whitespaces = /*@__PURE__*/ requireWhitespaces();\n\n\tvar $parseInt = globalThis.parseInt;\n\tvar Symbol = globalThis.Symbol;\n\tvar ITERATOR = Symbol && Symbol.iterator;\n\tvar hex = /^[+-]?0x/i;\n\tvar exec = uncurryThis(hex.exec);\n\tvar FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22\n\t // MS Edge 18- broken with boxed symbols\n\t || (ITERATOR && !fails(function () { $parseInt(Object(ITERATOR)); }));\n\n\t// `parseInt` method\n\t// https://tc39.es/ecma262/#sec-parseint-string-radix\n\tnumberParseInt = FORCED ? function parseInt(string, radix) {\n\t var S = trim(toString(string));\n\t return $parseInt(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));\n\t} : $parseInt;\n\treturn numberParseInt;\n}\n\nvar hasRequiredEs_parseInt;\n\nfunction requireEs_parseInt () {\n\tif (hasRequiredEs_parseInt) return es_parseInt;\n\thasRequiredEs_parseInt = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar $parseInt = /*@__PURE__*/ requireNumberParseInt();\n\n\t// `parseInt` method\n\t// https://tc39.es/ecma262/#sec-parseint-string-radix\n\t$({ global: true, forced: parseInt !== $parseInt }, {\n\t parseInt: $parseInt\n\t});\n\treturn es_parseInt;\n}\n\nvar _parseInt$3;\nvar hasRequired_parseInt$2;\n\nfunction require_parseInt$2 () {\n\tif (hasRequired_parseInt$2) return _parseInt$3;\n\thasRequired_parseInt$2 = 1;\n\trequireEs_parseInt();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\t_parseInt$3 = path.parseInt;\n\treturn _parseInt$3;\n}\n\nvar _parseInt$2;\nvar hasRequired_parseInt$1;\n\nfunction require_parseInt$1 () {\n\tif (hasRequired_parseInt$1) return _parseInt$2;\n\thasRequired_parseInt$1 = 1;\n\tvar parent = /*@__PURE__*/ require_parseInt$2();\n\n\t_parseInt$2 = parent;\n\treturn _parseInt$2;\n}\n\nvar _parseInt$1;\nvar hasRequired_parseInt;\n\nfunction require_parseInt () {\n\tif (hasRequired_parseInt) return _parseInt$1;\n\thasRequired_parseInt = 1;\n\t_parseInt$1 = /*@__PURE__*/ require_parseInt$1();\n\treturn _parseInt$1;\n}\n\nvar _parseIntExports = require_parseInt();\nvar _parseInt = /*@__PURE__*/getDefaultExportFromCjs(_parseIntExports);\n\nvar es_array_indexOf = {};\n\nvar hasRequiredEs_array_indexOf;\n\nfunction requireEs_array_indexOf () {\n\tif (hasRequiredEs_array_indexOf) return es_array_indexOf;\n\thasRequiredEs_array_indexOf = 1;\n\t/* eslint-disable es/no-array-prototype-indexof -- required for testing */\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThisClause();\n\tvar $indexOf = /*@__PURE__*/ requireArrayIncludes().indexOf;\n\tvar arrayMethodIsStrict = /*@__PURE__*/ requireArrayMethodIsStrict();\n\n\tvar nativeIndexOf = uncurryThis([].indexOf);\n\n\tvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;\n\tvar FORCED = NEGATIVE_ZERO || !arrayMethodIsStrict('indexOf');\n\n\t// `Array.prototype.indexOf` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.indexof\n\t$({ target: 'Array', proto: true, forced: FORCED }, {\n\t indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n\t var fromIndex = arguments.length > 1 ? arguments[1] : undefined;\n\t return NEGATIVE_ZERO\n\t // convert -0 to +0\n\t ? nativeIndexOf(this, searchElement, fromIndex) || 0\n\t : $indexOf(this, searchElement, fromIndex);\n\t }\n\t});\n\treturn es_array_indexOf;\n}\n\nvar indexOf$3;\nvar hasRequiredIndexOf$3;\n\nfunction requireIndexOf$3 () {\n\tif (hasRequiredIndexOf$3) return indexOf$3;\n\thasRequiredIndexOf$3 = 1;\n\trequireEs_array_indexOf();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tindexOf$3 = getBuiltInPrototypeMethod('Array', 'indexOf');\n\treturn indexOf$3;\n}\n\nvar indexOf$2;\nvar hasRequiredIndexOf$2;\n\nfunction requireIndexOf$2 () {\n\tif (hasRequiredIndexOf$2) return indexOf$2;\n\thasRequiredIndexOf$2 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireIndexOf$3();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\tindexOf$2 = function (it) {\n\t var own = it.indexOf;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.indexOf) ? method : own;\n\t};\n\treturn indexOf$2;\n}\n\nvar indexOf$1;\nvar hasRequiredIndexOf$1;\n\nfunction requireIndexOf$1 () {\n\tif (hasRequiredIndexOf$1) return indexOf$1;\n\thasRequiredIndexOf$1 = 1;\n\tvar parent = /*@__PURE__*/ requireIndexOf$2();\n\n\tindexOf$1 = parent;\n\treturn indexOf$1;\n}\n\nvar indexOf;\nvar hasRequiredIndexOf;\n\nfunction requireIndexOf () {\n\tif (hasRequiredIndexOf) return indexOf;\n\thasRequiredIndexOf = 1;\n\tindexOf = /*@__PURE__*/ requireIndexOf$1();\n\treturn indexOf;\n}\n\nvar indexOfExports = requireIndexOf();\nvar _indexOfInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(indexOfExports);\n\nvar es_object_create = {};\n\nvar hasRequiredEs_object_create;\n\nfunction requireEs_object_create () {\n\tif (hasRequiredEs_object_create) return es_object_create;\n\thasRequiredEs_object_create = 1;\n\t// TODO: Remove from `core-js@4`\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar create = /*@__PURE__*/ requireObjectCreate();\n\n\t// `Object.create` method\n\t// https://tc39.es/ecma262/#sec-object.create\n\t$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {\n\t create: create\n\t});\n\treturn es_object_create;\n}\n\nvar create$2;\nvar hasRequiredCreate$2;\n\nfunction requireCreate$2 () {\n\tif (hasRequiredCreate$2) return create$2;\n\thasRequiredCreate$2 = 1;\n\trequireEs_object_create();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tvar Object = path.Object;\n\n\tcreate$2 = function create(P, D) {\n\t return Object.create(P, D);\n\t};\n\treturn create$2;\n}\n\nvar create$1;\nvar hasRequiredCreate$1;\n\nfunction requireCreate$1 () {\n\tif (hasRequiredCreate$1) return create$1;\n\thasRequiredCreate$1 = 1;\n\tvar parent = /*@__PURE__*/ requireCreate$2();\n\n\tcreate$1 = parent;\n\treturn create$1;\n}\n\nvar create;\nvar hasRequiredCreate;\n\nfunction requireCreate () {\n\tif (hasRequiredCreate) return create;\n\thasRequiredCreate = 1;\n\tcreate = /*@__PURE__*/ requireCreate$1();\n\treturn create;\n}\n\nvar createExports = requireCreate();\nvar _Object$create = /*@__PURE__*/getDefaultExportFromCjs(createExports);\n\nvar es_date_toJson = {};\n\nvar stringRepeat;\nvar hasRequiredStringRepeat;\n\nfunction requireStringRepeat () {\n\tif (hasRequiredStringRepeat) return stringRepeat;\n\thasRequiredStringRepeat = 1;\n\tvar toIntegerOrInfinity = /*@__PURE__*/ requireToIntegerOrInfinity();\n\tvar toString = /*@__PURE__*/ requireToString();\n\tvar requireObjectCoercible = /*@__PURE__*/ requireRequireObjectCoercible();\n\n\tvar $RangeError = RangeError;\n\n\t// `String.prototype.repeat` method implementation\n\t// https://tc39.es/ecma262/#sec-string.prototype.repeat\n\tstringRepeat = function repeat(count) {\n\t var str = toString(requireObjectCoercible(this));\n\t var result = '';\n\t var n = toIntegerOrInfinity(count);\n\t if (n < 0 || n === Infinity) throw new $RangeError('Wrong number of repetitions');\n\t for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;\n\t return result;\n\t};\n\treturn stringRepeat;\n}\n\nvar stringPad;\nvar hasRequiredStringPad;\n\nfunction requireStringPad () {\n\tif (hasRequiredStringPad) return stringPad;\n\thasRequiredStringPad = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar toLength = /*@__PURE__*/ requireToLength();\n\tvar toString = /*@__PURE__*/ requireToString();\n\tvar $repeat = /*@__PURE__*/ requireStringRepeat();\n\tvar requireObjectCoercible = /*@__PURE__*/ requireRequireObjectCoercible();\n\n\tvar repeat = uncurryThis($repeat);\n\tvar stringSlice = uncurryThis(''.slice);\n\tvar ceil = Math.ceil;\n\n\t// `String.prototype.{ padStart, padEnd }` methods implementation\n\tvar createMethod = function (IS_END) {\n\t return function ($this, maxLength, fillString) {\n\t var S = toString(requireObjectCoercible($this));\n\t var intMaxLength = toLength(maxLength);\n\t var stringLength = S.length;\n\t var fillStr = fillString === undefined ? ' ' : toString(fillString);\n\t var fillLen, stringFiller;\n\t if (intMaxLength <= stringLength || fillStr === '') return S;\n\t fillLen = intMaxLength - stringLength;\n\t stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length));\n\t if (stringFiller.length > fillLen) stringFiller = stringSlice(stringFiller, 0, fillLen);\n\t return IS_END ? S + stringFiller : stringFiller + S;\n\t };\n\t};\n\n\tstringPad = {\n\t // `String.prototype.padStart` method\n\t // https://tc39.es/ecma262/#sec-string.prototype.padstart\n\t start: createMethod(false),\n\t // `String.prototype.padEnd` method\n\t // https://tc39.es/ecma262/#sec-string.prototype.padend\n\t end: createMethod(true)\n\t};\n\treturn stringPad;\n}\n\nvar dateToIsoString;\nvar hasRequiredDateToIsoString;\n\nfunction requireDateToIsoString () {\n\tif (hasRequiredDateToIsoString) return dateToIsoString;\n\thasRequiredDateToIsoString = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar padStart = /*@__PURE__*/ requireStringPad().start;\n\n\tvar $RangeError = RangeError;\n\tvar $isFinite = isFinite;\n\tvar abs = Math.abs;\n\tvar DatePrototype = Date.prototype;\n\tvar nativeDateToISOString = DatePrototype.toISOString;\n\tvar thisTimeValue = uncurryThis(DatePrototype.getTime);\n\tvar getUTCDate = uncurryThis(DatePrototype.getUTCDate);\n\tvar getUTCFullYear = uncurryThis(DatePrototype.getUTCFullYear);\n\tvar getUTCHours = uncurryThis(DatePrototype.getUTCHours);\n\tvar getUTCMilliseconds = uncurryThis(DatePrototype.getUTCMilliseconds);\n\tvar getUTCMinutes = uncurryThis(DatePrototype.getUTCMinutes);\n\tvar getUTCMonth = uncurryThis(DatePrototype.getUTCMonth);\n\tvar getUTCSeconds = uncurryThis(DatePrototype.getUTCSeconds);\n\n\t// `Date.prototype.toISOString` method implementation\n\t// https://tc39.es/ecma262/#sec-date.prototype.toisostring\n\t// PhantomJS / old WebKit fails here:\n\tdateToIsoString = (fails(function () {\n\t return nativeDateToISOString.call(new Date(-5e13 - 1)) !== '0385-07-25T07:06:39.999Z';\n\t}) || !fails(function () {\n\t nativeDateToISOString.call(new Date(NaN));\n\t})) ? function toISOString() {\n\t if (!$isFinite(thisTimeValue(this))) throw new $RangeError('Invalid time value');\n\t var date = this;\n\t var year = getUTCFullYear(date);\n\t var milliseconds = getUTCMilliseconds(date);\n\t var sign = year < 0 ? '-' : year > 9999 ? '+' : '';\n\t return sign + padStart(abs(year), sign ? 6 : 4, 0) +\n\t '-' + padStart(getUTCMonth(date) + 1, 2, 0) +\n\t '-' + padStart(getUTCDate(date), 2, 0) +\n\t 'T' + padStart(getUTCHours(date), 2, 0) +\n\t ':' + padStart(getUTCMinutes(date), 2, 0) +\n\t ':' + padStart(getUTCSeconds(date), 2, 0) +\n\t '.' + padStart(milliseconds, 3, 0) +\n\t 'Z';\n\t} : nativeDateToISOString;\n\treturn dateToIsoString;\n}\n\nvar hasRequiredEs_date_toJson;\n\nfunction requireEs_date_toJson () {\n\tif (hasRequiredEs_date_toJson) return es_date_toJson;\n\thasRequiredEs_date_toJson = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\tvar toObject = /*@__PURE__*/ requireToObject();\n\tvar toPrimitive = /*@__PURE__*/ requireToPrimitive$5();\n\tvar toISOString = /*@__PURE__*/ requireDateToIsoString();\n\tvar classof = /*@__PURE__*/ requireClassofRaw();\n\tvar fails = /*@__PURE__*/ requireFails();\n\n\tvar FORCED = fails(function () {\n\t return new Date(NaN).toJSON() !== null\n\t || call(Date.prototype.toJSON, { toISOString: function () { return 1; } }) !== 1;\n\t});\n\n\t// `Date.prototype.toJSON` method\n\t// https://tc39.es/ecma262/#sec-date.prototype.tojson\n\t$({ target: 'Date', proto: true, forced: FORCED }, {\n\t // eslint-disable-next-line no-unused-vars -- required for `.length`\n\t toJSON: function toJSON(key) {\n\t var O = toObject(this);\n\t var pv = toPrimitive(O, 'number');\n\t return typeof pv == 'number' && !isFinite(pv) ? null :\n\t (!('toISOString' in O) && classof(O) === 'Date') ? call(toISOString, O) : O.toISOString();\n\t }\n\t});\n\treturn es_date_toJson;\n}\n\nvar stringify$2;\nvar hasRequiredStringify$2;\n\nfunction requireStringify$2 () {\n\tif (hasRequiredStringify$2) return stringify$2;\n\thasRequiredStringify$2 = 1;\n\trequireEs_date_toJson();\n\trequireEs_json_stringify();\n\tvar path = /*@__PURE__*/ requirePath();\n\tvar apply = /*@__PURE__*/ requireFunctionApply();\n\n\t// eslint-disable-next-line es/no-json -- safe\n\tif (!path.JSON) path.JSON = { stringify: JSON.stringify };\n\n\t// eslint-disable-next-line no-unused-vars -- required for `.length`\n\tstringify$2 = function stringify(it, replacer, space) {\n\t return apply(path.JSON.stringify, null, arguments);\n\t};\n\treturn stringify$2;\n}\n\nvar stringify$1;\nvar hasRequiredStringify$1;\n\nfunction requireStringify$1 () {\n\tif (hasRequiredStringify$1) return stringify$1;\n\thasRequiredStringify$1 = 1;\n\tvar parent = /*@__PURE__*/ requireStringify$2();\n\n\tstringify$1 = parent;\n\treturn stringify$1;\n}\n\nvar stringify;\nvar hasRequiredStringify;\n\nfunction requireStringify () {\n\tif (hasRequiredStringify) return stringify;\n\thasRequiredStringify = 1;\n\tstringify = /*@__PURE__*/ requireStringify$1();\n\treturn stringify;\n}\n\nvar stringifyExports = requireStringify();\nvar _JSON$stringify = /*@__PURE__*/getDefaultExportFromCjs(stringifyExports);\n\nvar web_timers = {};\n\nvar web_setInterval = {};\n\nvar environment;\nvar hasRequiredEnvironment;\n\nfunction requireEnvironment () {\n\tif (hasRequiredEnvironment) return environment;\n\thasRequiredEnvironment = 1;\n\t/* global Bun, Deno -- detection */\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar userAgent = /*@__PURE__*/ requireEnvironmentUserAgent();\n\tvar classof = /*@__PURE__*/ requireClassofRaw();\n\n\tvar userAgentStartsWith = function (string) {\n\t return userAgent.slice(0, string.length) === string;\n\t};\n\n\tenvironment = (function () {\n\t if (userAgentStartsWith('Bun/')) return 'BUN';\n\t if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';\n\t if (userAgentStartsWith('Deno/')) return 'DENO';\n\t if (userAgentStartsWith('Node.js/')) return 'NODE';\n\t if (globalThis.Bun && typeof Bun.version == 'string') return 'BUN';\n\t if (globalThis.Deno && typeof Deno.version == 'object') return 'DENO';\n\t if (classof(globalThis.process) === 'process') return 'NODE';\n\t if (globalThis.window && globalThis.document) return 'BROWSER';\n\t return 'REST';\n\t})();\n\treturn environment;\n}\n\nvar validateArgumentsLength;\nvar hasRequiredValidateArgumentsLength;\n\nfunction requireValidateArgumentsLength () {\n\tif (hasRequiredValidateArgumentsLength) return validateArgumentsLength;\n\thasRequiredValidateArgumentsLength = 1;\n\tvar $TypeError = TypeError;\n\n\tvalidateArgumentsLength = function (passed, required) {\n\t if (passed < required) throw new $TypeError('Not enough arguments');\n\t return passed;\n\t};\n\treturn validateArgumentsLength;\n}\n\nvar schedulersFix;\nvar hasRequiredSchedulersFix;\n\nfunction requireSchedulersFix () {\n\tif (hasRequiredSchedulersFix) return schedulersFix;\n\thasRequiredSchedulersFix = 1;\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar apply = /*@__PURE__*/ requireFunctionApply();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar ENVIRONMENT = /*@__PURE__*/ requireEnvironment();\n\tvar USER_AGENT = /*@__PURE__*/ requireEnvironmentUserAgent();\n\tvar arraySlice = /*@__PURE__*/ requireArraySlice();\n\tvar validateArgumentsLength = /*@__PURE__*/ requireValidateArgumentsLength();\n\n\tvar Function = globalThis.Function;\n\t// dirty IE9- and Bun 0.3.0- checks\n\tvar WRAP = /MSIE .\\./.test(USER_AGENT) || ENVIRONMENT === 'BUN' && (function () {\n\t var version = globalThis.Bun.version.split('.');\n\t return version.length < 3 || version[0] === '0' && (version[1] < 3 || version[1] === '3' && version[2] === '0');\n\t})();\n\n\t// IE9- / Bun 0.3.0- setTimeout / setInterval / setImmediate additional parameters fix\n\t// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers\n\t// https://github.com/oven-sh/bun/issues/1633\n\tschedulersFix = function (scheduler, hasTimeArg) {\n\t var firstParamIndex = hasTimeArg ? 2 : 1;\n\t return WRAP ? function (handler, timeout /* , ...arguments */) {\n\t var boundArgs = validateArgumentsLength(arguments.length, 1) > firstParamIndex;\n\t var fn = isCallable(handler) ? handler : Function(handler);\n\t var params = boundArgs ? arraySlice(arguments, firstParamIndex) : [];\n\t var callback = boundArgs ? function () {\n\t apply(fn, this, params);\n\t } : fn;\n\t return hasTimeArg ? scheduler(callback, timeout) : scheduler(callback);\n\t } : scheduler;\n\t};\n\treturn schedulersFix;\n}\n\nvar hasRequiredWeb_setInterval;\n\nfunction requireWeb_setInterval () {\n\tif (hasRequiredWeb_setInterval) return web_setInterval;\n\thasRequiredWeb_setInterval = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar schedulersFix = /*@__PURE__*/ requireSchedulersFix();\n\n\tvar setInterval = schedulersFix(globalThis.setInterval, true);\n\n\t// Bun / IE9- setInterval additional parameters fix\n\t// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval\n\t$({ global: true, bind: true, forced: globalThis.setInterval !== setInterval }, {\n\t setInterval: setInterval\n\t});\n\treturn web_setInterval;\n}\n\nvar web_setTimeout = {};\n\nvar hasRequiredWeb_setTimeout;\n\nfunction requireWeb_setTimeout () {\n\tif (hasRequiredWeb_setTimeout) return web_setTimeout;\n\thasRequiredWeb_setTimeout = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar schedulersFix = /*@__PURE__*/ requireSchedulersFix();\n\n\tvar setTimeout = schedulersFix(globalThis.setTimeout, true);\n\n\t// Bun / IE9- setTimeout additional parameters fix\n\t// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout\n\t$({ global: true, bind: true, forced: globalThis.setTimeout !== setTimeout }, {\n\t setTimeout: setTimeout\n\t});\n\treturn web_setTimeout;\n}\n\nvar hasRequiredWeb_timers;\n\nfunction requireWeb_timers () {\n\tif (hasRequiredWeb_timers) return web_timers;\n\thasRequiredWeb_timers = 1;\n\t// TODO: Remove this module from `core-js@4` since it's split to modules listed below\n\trequireWeb_setInterval();\n\trequireWeb_setTimeout();\n\treturn web_timers;\n}\n\nvar setTimeout$2;\nvar hasRequiredSetTimeout$1;\n\nfunction requireSetTimeout$1 () {\n\tif (hasRequiredSetTimeout$1) return setTimeout$2;\n\thasRequiredSetTimeout$1 = 1;\n\trequireWeb_timers();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tsetTimeout$2 = path.setTimeout;\n\treturn setTimeout$2;\n}\n\nvar setTimeout$1;\nvar hasRequiredSetTimeout;\n\nfunction requireSetTimeout () {\n\tif (hasRequiredSetTimeout) return setTimeout$1;\n\thasRequiredSetTimeout = 1;\n\tsetTimeout$1 = /*@__PURE__*/ requireSetTimeout$1();\n\treturn setTimeout$1;\n}\n\nvar setTimeoutExports = requireSetTimeout();\nvar _setTimeout = /*@__PURE__*/getDefaultExportFromCjs(setTimeoutExports);\n\nvar es_array_fill = {};\n\nvar arrayFill;\nvar hasRequiredArrayFill;\n\nfunction requireArrayFill () {\n\tif (hasRequiredArrayFill) return arrayFill;\n\thasRequiredArrayFill = 1;\n\tvar toObject = /*@__PURE__*/ requireToObject();\n\tvar toAbsoluteIndex = /*@__PURE__*/ requireToAbsoluteIndex();\n\tvar lengthOfArrayLike = /*@__PURE__*/ requireLengthOfArrayLike();\n\n\t// `Array.prototype.fill` method implementation\n\t// https://tc39.es/ecma262/#sec-array.prototype.fill\n\tarrayFill = function fill(value /* , start = 0, end = @length */) {\n\t var O = toObject(this);\n\t var length = lengthOfArrayLike(O);\n\t var argumentsLength = arguments.length;\n\t var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n\t var end = argumentsLength > 2 ? arguments[2] : undefined;\n\t var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n\t while (endPos > index) O[index++] = value;\n\t return O;\n\t};\n\treturn arrayFill;\n}\n\nvar hasRequiredEs_array_fill;\n\nfunction requireEs_array_fill () {\n\tif (hasRequiredEs_array_fill) return es_array_fill;\n\thasRequiredEs_array_fill = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar fill = /*@__PURE__*/ requireArrayFill();\n\tvar addToUnscopables = /*@__PURE__*/ requireAddToUnscopables();\n\n\t// `Array.prototype.fill` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.fill\n\t$({ target: 'Array', proto: true }, {\n\t fill: fill\n\t});\n\n\t// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\n\taddToUnscopables('fill');\n\treturn es_array_fill;\n}\n\nvar fill$3;\nvar hasRequiredFill$3;\n\nfunction requireFill$3 () {\n\tif (hasRequiredFill$3) return fill$3;\n\thasRequiredFill$3 = 1;\n\trequireEs_array_fill();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tfill$3 = getBuiltInPrototypeMethod('Array', 'fill');\n\treturn fill$3;\n}\n\nvar fill$2;\nvar hasRequiredFill$2;\n\nfunction requireFill$2 () {\n\tif (hasRequiredFill$2) return fill$2;\n\thasRequiredFill$2 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireFill$3();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\tfill$2 = function (it) {\n\t var own = it.fill;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.fill) ? method : own;\n\t};\n\treturn fill$2;\n}\n\nvar fill$1;\nvar hasRequiredFill$1;\n\nfunction requireFill$1 () {\n\tif (hasRequiredFill$1) return fill$1;\n\thasRequiredFill$1 = 1;\n\tvar parent = /*@__PURE__*/ requireFill$2();\n\n\tfill$1 = parent;\n\treturn fill$1;\n}\n\nvar fill;\nvar hasRequiredFill;\n\nfunction requireFill () {\n\tif (hasRequiredFill) return fill;\n\thasRequiredFill = 1;\n\tfill = /*@__PURE__*/ requireFill$1();\n\treturn fill;\n}\n\nvar fillExports = requireFill();\nvar _fillInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(fillExports);\n\n/*! Hammer.JS - v2.0.17-rc - 2019-12-16\n * http://naver.github.io/egjs\n *\n * Forked By Naver egjs\n * Copyright (c) hammerjs\n * Licensed under the MIT license */\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\n\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\nvar assign$1 = assign;\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = typeof document === \"undefined\" ? {\n style: {}\n} : document.createElement('div');\nvar TYPE_FUNCTION = 'function';\nvar round = Math.round,\n abs = Math.abs;\nvar now = Date.now;\n\n/**\n * @private\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\n\nfunction prefixed(obj, property) {\n var prefix;\n var prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n var i = 0;\n\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = prefix ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n\n i++;\n }\n\n return undefined;\n}\n\n/* eslint-disable no-new-func, no-nested-ternary */\nvar win;\n\nif (typeof window === \"undefined\") {\n // window is undefined in node.js\n win = {};\n} else {\n win = window;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n\n var touchMap = {};\n var cssSupports = win.CSS && win.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) {\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n return touchMap[val] = cssSupports ? win.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\n\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\nvar SUPPORT_TOUCH = 'ontouchstart' in win;\nvar SUPPORT_POINTER_EVENTS = prefixed(win, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\nvar COMPUTE_INTERVAL = 25;\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * @private\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n\n/**\n * @private\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\n\nfunction boolOrFn(val, args) {\n if (typeof val === TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n\n return val;\n}\n\n/**\n * @private\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n\n/**\n * @private\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\n\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n } // pan-x OR pan-y\n\n\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n } // manipulation\n\n\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n\n/**\n * @private\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\n\nvar TouchAction =\n/*#__PURE__*/\nfunction () {\n function TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n }\n /**\n * @private\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n\n\n var _proto = TouchAction.prototype;\n\n _proto.set = function set(value) {\n // find out the touch-action by the event handlers\n if (value === TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n\n this.actions = value.toLowerCase().trim();\n };\n /**\n * @private\n * just re-set the touchAction value\n */\n\n\n _proto.update = function update() {\n this.set(this.manager.options.touchAction);\n };\n /**\n * @private\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n\n\n _proto.compute = function compute() {\n var actions = [];\n each(this.manager.recognizers, function (recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n };\n /**\n * @private\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n\n\n _proto.preventDefaults = function preventDefaults(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection; // if the touch action did prevented once this session\n\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n // do not prevent defaults if this is a tap gesture\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) {\n return this.preventSrc(srcEvent);\n }\n };\n /**\n * @private\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n\n\n _proto.preventSrc = function preventSrc(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n };\n\n return TouchAction;\n}();\n\n/**\n * @private\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n while (node) {\n if (node === parent) {\n return true;\n }\n\n node = node.parentNode;\n }\n\n return false;\n}\n\n/**\n * @private\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\n\nfunction getCenter(pointers) {\n var pointersLength = pointers.length; // no need to loop when only one touch\n\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0;\n var y = 0;\n var i = 0;\n\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n\n/**\n * @private\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\n\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n\n/**\n * @private\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\n\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.sqrt(x * x + y * y);\n}\n\n/**\n * @private\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\n\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * @private\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\n\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center; // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session;\n // jscs throwing error on defalut destructured values and without defaults tests fail\n\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * @private\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n\n/**\n * @private\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\n\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\n/**\n * @private\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\n\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * @private\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\n\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input;\n var deltaTime = input.timeStamp - last.timeStamp;\n var velocity;\n var velocityX;\n var velocityY;\n var direction;\n\n if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = abs(v.x) > abs(v.y) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n\n/**\n* @private\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\n\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length; // store the first input to calculate the distance and direction\n\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n } // to compute scale and rotation we need to store the multiple touches\n\n\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput,\n firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y;\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers;\n computeIntervalInputData(session, input); // find the correct target\n\n var target = manager.element;\n var srcEvent = input.srcEvent;\n var srcEventTarget;\n\n if (srcEvent.composedPath) {\n srcEventTarget = srcEvent.composedPath()[0];\n } else if (srcEvent.path) {\n srcEventTarget = srcEvent.path[0];\n } else {\n srcEventTarget = srcEvent.target;\n }\n\n if (hasParent(srcEventTarget, target)) {\n target = srcEventTarget;\n }\n\n input.target = target;\n}\n\n/**\n * @private\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\n\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0;\n var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0;\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n } // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n\n\n input.eventType = eventType; // compute scale, rotation etc\n\n computeInputData(manager, input); // emit secret event\n\n manager.emit('hammer.input', input);\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n\n/**\n * @private\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n\n/**\n * @private\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.addEventListener(type, handler, false);\n });\n}\n\n/**\n * @private\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.removeEventListener(type, handler, false);\n });\n}\n\n/**\n * @private\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return doc.defaultView || doc.parentWindow || window;\n}\n\n/**\n * @private\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\n\nvar Input =\n/*#__PURE__*/\nfunction () {\n function Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget; // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n\n this.domHandler = function (ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n }\n /**\n * @private\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n\n\n var _proto = Input.prototype;\n\n _proto.handler = function handler() {};\n /**\n * @private\n * bind the events\n */\n\n\n _proto.init = function init() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n /**\n * @private\n * unbind the events\n */\n\n\n _proto.destroy = function destroy() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n\n return Input;\n}();\n\n/**\n * @private\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n\n while (i < src.length) {\n if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) {\n // do not use === here, test fails\n return i;\n }\n\n i++;\n }\n\n return -1;\n }\n}\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n}; // in IE10 the pointer types is defined as an enum\n\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n\n};\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; // IE10 has prefixed support, and case-sensitive\n\nif (win.MSPointerEvent && !win.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n/**\n * @private\n * Pointer events input\n * @constructor\n * @extends Input\n */\n\n\nvar PointerEventInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(PointerEventInput, _Input);\n\n function PointerEventInput() {\n var _this;\n\n var proto = PointerEventInput.prototype;\n proto.evEl = POINTER_ELEMENT_EVENTS;\n proto.evWin = POINTER_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.store = _this.manager.session.pointerEvents = [];\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = PointerEventInput.prototype;\n\n _proto.handler = function handler(ev) {\n var store = this.store;\n var removePointer = false;\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n var isTouch = pointerType === INPUT_TYPE_TOUCH; // get index of the event in the store\n\n var storeIndex = inArray(store, ev.pointerId, 'pointerId'); // start and mouse must be down\n\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n } // it not found, so the pointer hasn't been down (so it's probably a hover)\n\n\n if (storeIndex < 0) {\n return;\n } // update the event in the store\n\n\n store[storeIndex] = ev;\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n };\n\n return PointerEventInput;\n}(Input);\n\n/**\n * @private\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * @private\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\n\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function (a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\n\nvar TouchInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(TouchInput, _Input);\n\n function TouchInput() {\n var _this;\n\n TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.targetIds = {}; // this.evTarget = TOUCH_TARGET_EVENTS;\n\n return _this;\n }\n\n var _proto = TouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return TouchInput;\n}(Input);\n\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds; // when there is only one touch, the process can be simplified\n\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i;\n var targetTouches;\n var changedTouches = toArray(ev.changedTouches);\n var changedTargetTouches = [];\n var target = this.target; // get target touches from touches\n\n targetTouches = allTouches.filter(function (touch) {\n return hasParent(touch.target, target);\n }); // collect touches\n\n if (type === INPUT_START) {\n i = 0;\n\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n } // filter changed touches to only contain touches that exist in the collected target ids\n\n\n i = 0;\n\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n } // cleanup removed touches\n\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches];\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n/**\n * @private\n * Mouse events input\n * @constructor\n * @extends Input\n */\n\nvar MouseInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(MouseInput, _Input);\n\n function MouseInput() {\n var _this;\n\n var proto = MouseInput.prototype;\n proto.evEl = MOUSE_ELEMENT_EVENTS;\n proto.evWin = MOUSE_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.pressed = false; // mousedown state\n\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = MouseInput.prototype;\n\n _proto.handler = function handler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type]; // on start we want to have the left mouse button down\n\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n } // mouse must be down\n\n\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n };\n\n return MouseInput;\n}(Input);\n\n/**\n * @private\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction setLastTouch(eventData) {\n var _eventData$changedPoi = eventData.changedPointers,\n touch = _eventData$changedPoi[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {\n x: touch.clientX,\n y: touch.clientY\n };\n var lts = this.lastTouches;\n this.lastTouches.push(lastTouch);\n\n var removeLastTouch = function removeLastTouch() {\n var i = lts.indexOf(lastTouch);\n\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX;\n var y = eventData.srcEvent.clientY;\n\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x);\n var dy = Math.abs(y - t.y);\n\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n\n return false;\n}\n\nvar TouchMouseInput =\n/*#__PURE__*/\nfunction () {\n var TouchMouseInput =\n /*#__PURE__*/\n function (_Input) {\n _inheritsLoose(TouchMouseInput, _Input);\n\n function TouchMouseInput(_manager, callback) {\n var _this;\n\n _this = _Input.call(this, _manager, callback) || this;\n\n _this.handler = function (manager, inputEvent, inputData) {\n var isTouch = inputData.pointerType === INPUT_TYPE_TOUCH;\n var isMouse = inputData.pointerType === INPUT_TYPE_MOUSE;\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n } // when we're in a touch event, record touches to de-dupe synthetic mouse event\n\n\n if (isTouch) {\n recordTouches.call(_assertThisInitialized(_assertThisInitialized(_this)), inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(_assertThisInitialized(_assertThisInitialized(_this)), inputData)) {\n return;\n }\n\n _this.callback(manager, inputEvent, inputData);\n };\n\n _this.touch = new TouchInput(_this.manager, _this.handler);\n _this.mouse = new MouseInput(_this.manager, _this.handler);\n _this.primaryTouch = null;\n _this.lastTouches = [];\n return _this;\n }\n /**\n * @private\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n\n\n var _proto = TouchMouseInput.prototype;\n\n /**\n * @private\n * remove the event listeners\n */\n _proto.destroy = function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n };\n\n return TouchMouseInput;\n }(Input);\n\n return TouchMouseInput;\n}();\n\n/**\n * @private\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\n\nfunction createInputInstance(manager) {\n var Type; // let inputClass = manager.options.inputClass;\n\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n\n return new Type(manager, inputHandler);\n}\n\n/**\n * @private\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\n\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n\n return false;\n}\n\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * @private\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n return _uniqueId++;\n}\n\n/**\n * @private\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n\n if (manager) {\n return manager.get(otherRecognizer);\n }\n\n return otherRecognizer;\n}\n\n/**\n * @private\n * get a usable string, used as event postfix\n * @param {constant} state\n * @returns {String} state\n */\n\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n\n return '';\n}\n\n/**\n * @private\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\n\n/**\n * @private\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\n\nvar Recognizer =\n/*#__PURE__*/\nfunction () {\n function Recognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n this.options = _extends({\n enable: true\n }, options);\n this.id = uniqueId();\n this.manager = null; // default is enable true\n\n this.state = STATE_POSSIBLE;\n this.simultaneous = {};\n this.requireFail = [];\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n\n\n var _proto = Recognizer.prototype;\n\n _proto.set = function set(options) {\n assign$1(this.options, options); // also update the touchAction, in case something changed about the directions/enabled state\n\n this.manager && this.manager.touchAction.update();\n return this;\n };\n /**\n * @private\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.recognizeWith = function recognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRecognizeWith = function dropRecognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n };\n /**\n * @private\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.requireFailure = function requireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRequireFailure = function dropRequireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n\n return this;\n };\n /**\n * @private\n * has require failures boolean\n * @returns {boolean}\n */\n\n\n _proto.hasRequireFailures = function hasRequireFailures() {\n return this.requireFail.length > 0;\n };\n /**\n * @private\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n\n\n _proto.canRecognizeWith = function canRecognizeWith(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n };\n /**\n * @private\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n\n\n _proto.emit = function emit(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n } // 'panstart' and 'panmove'\n\n\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) {\n // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n } // panend and pancancel\n\n\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n };\n /**\n * @private\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n\n\n _proto.tryEmit = function tryEmit(input) {\n if (this.canEmit()) {\n return this.emit(input);\n } // it's failing anyway\n\n\n this.state = STATE_FAILED;\n };\n /**\n * @private\n * can we emit?\n * @returns {boolean}\n */\n\n\n _proto.canEmit = function canEmit() {\n var i = 0;\n\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n\n i++;\n }\n\n return true;\n };\n /**\n * @private\n * update the recognizer\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign$1({}, inputData); // is is enabled and allow recognizing?\n\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n } // reset when we've reached the end\n\n\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone); // the recognizer has recognized a gesture\n // so trigger an event\n\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n };\n /**\n * @private\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {constant} STATE\n */\n\n /* jshint ignore:start */\n\n\n _proto.process = function process(inputData) {};\n /* jshint ignore:end */\n\n /**\n * @private\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n\n\n _proto.getTouchAction = function getTouchAction() {};\n /**\n * @private\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n\n\n _proto.reset = function reset() {};\n\n return Recognizer;\n}();\n\n/**\n * @private\n * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\n\nvar TapRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(TapRecognizer, _Recognizer);\n\n function TapRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300,\n // max time between the multi-tap taps\n time: 250,\n // max time of the pointer to be down (like finger on the screen)\n threshold: 9,\n // a minimal movement is ok, but keep it low\n posThreshold: 10\n }, options)) || this; // previous time and center,\n // used for tap counting\n\n _this.pTime = false;\n _this.pCenter = false;\n _this._timer = null;\n _this._input = null;\n _this.count = 0;\n return _this;\n }\n\n var _proto = TapRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_MANIPULATION];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n this.reset();\n\n if (input.eventType & INPUT_START && this.count === 0) {\n return this.failTimeout();\n } // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType !== INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input; // if tap count matches we have recognized it,\n // else it has began recognizing...\n\n var tapCount = this.count % options.taps;\n\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.interval);\n return STATE_BEGAN;\n }\n }\n }\n\n return STATE_FAILED;\n };\n\n _proto.failTimeout = function failTimeout() {\n var _this3 = this;\n\n this._timer = setTimeout(function () {\n _this3.state = STATE_FAILED;\n }, this.options.interval);\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit() {\n if (this.state === STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return TapRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\n\nvar AttrRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(AttrRecognizer, _Recognizer);\n\n function AttrRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _Recognizer.call(this, _extends({\n pointers: 1\n }, options)) || this;\n }\n /**\n * @private\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n\n\n var _proto = AttrRecognizer.prototype;\n\n _proto.attrTest = function attrTest(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n };\n /**\n * @private\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n\n\n _proto.process = function process(input) {\n var state = this.state;\n var eventType = input.eventType;\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input); // on cancel input and we've recognized before, return STATE_CANCELLED\n\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n\n return state | STATE_CHANGED;\n }\n\n return STATE_FAILED;\n };\n\n return AttrRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * direction cons to string\n * @param {constant} direction\n * @returns {String}\n */\n\nfunction directionStr(direction) {\n if (direction === DIRECTION_DOWN) {\n return 'down';\n } else if (direction === DIRECTION_UP) {\n return 'up';\n } else if (direction === DIRECTION_LEFT) {\n return 'left';\n } else if (direction === DIRECTION_RIGHT) {\n return 'right';\n }\n\n return '';\n}\n\n/**\n * @private\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar PanRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(PanRecognizer, _AttrRecognizer);\n\n function PanRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _AttrRecognizer.call(this, _extends({\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n }, options)) || this;\n _this.pX = null;\n _this.pY = null;\n return _this;\n }\n\n var _proto = PanRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n var direction = this.options.direction;\n var actions = [];\n\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n\n return actions;\n };\n\n _proto.directionTest = function directionTest(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY; // lock to axis?\n\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x !== this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y !== this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n };\n\n _proto.attrTest = function attrTest(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) && ( // replace with a super call\n this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input));\n };\n\n _proto.emit = function emit(input) {\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PanRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar SwipeRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(SwipeRecognizer, _AttrRecognizer);\n\n function SwipeRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n }, options)) || this;\n }\n\n var _proto = SwipeRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n };\n\n _proto.attrTest = function attrTest(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return _AttrRecognizer.prototype.attrTest.call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers === this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n };\n\n _proto.emit = function emit(input) {\n var direction = directionStr(input.offsetDirection);\n\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n };\n\n return SwipeRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar PinchRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(PinchRecognizer, _AttrRecognizer);\n\n function PinchRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'pinch',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = PinchRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n _proto.emit = function emit(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PinchRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar RotateRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(RotateRecognizer, _AttrRecognizer);\n\n function RotateRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'rotate',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = RotateRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n return RotateRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\n\nvar PressRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(PressRecognizer, _Recognizer);\n\n function PressRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'press',\n pointers: 1,\n time: 251,\n // minimal time of the pointer to be pressed\n threshold: 9\n }, options)) || this;\n _this._timer = null;\n _this._input = null;\n return _this;\n }\n\n var _proto = PressRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_AUTO];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n this._input = input; // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.time);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && input.eventType & INPUT_END) {\n this.manager.emit(this.options.event + \"up\", input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return PressRecognizer;\n}(Recognizer);\n\nvar defaults = {\n /**\n * @private\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * @private\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @private\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * @private\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * @private\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * @private\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * @private\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: \"none\",\n\n /**\n * @private\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: \"none\",\n\n /**\n * @private\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: \"none\",\n\n /**\n * @private\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: \"none\",\n\n /**\n * @private\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: \"none\",\n\n /**\n * @private\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: \"rgba(0,0,0,0)\"\n }\n};\n/**\n * @private\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * This is separated with other defaults because of tree-shaking.\n * @type {Array}\n */\n\nvar preset = [[RotateRecognizer, {\n enable: false\n}], [PinchRecognizer, {\n enable: false\n}, ['rotate']], [SwipeRecognizer, {\n direction: DIRECTION_HORIZONTAL\n}], [PanRecognizer, {\n direction: DIRECTION_HORIZONTAL\n}, ['swipe']], [TapRecognizer], [TapRecognizer, {\n event: 'doubletap',\n taps: 2\n}, ['tap']], [PressRecognizer]];\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n/**\n * @private\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\n\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n\n if (!element.style) {\n return;\n }\n\n var prop;\n each(manager.options.cssProps, function (value, name) {\n prop = prefixed(element.style, name);\n\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || \"\";\n }\n });\n\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n/**\n * @private\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\n\n\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent(\"Event\");\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n/**\n* @private\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\n\nvar Manager =\n/*#__PURE__*/\nfunction () {\n function Manager(element, options) {\n var _this = this;\n\n this.options = assign$1({}, defaults, options || {});\n this.options.inputTarget = this.options.inputTarget || element;\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n toggleCssProps(this, true);\n each(this.options.recognizers, function (item) {\n var recognizer = _this.add(new item[0](item[1]));\n\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n\n\n var _proto = Manager.prototype;\n\n _proto.set = function set(options) {\n assign$1(this.options, options); // Options that need a little more setup\n\n if (options.touchAction) {\n this.touchAction.update();\n }\n\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n\n return this;\n };\n /**\n * @private\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n\n\n _proto.stop = function stop(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n };\n /**\n * @private\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n var session = this.session;\n\n if (session.stopped) {\n return;\n } // run the touch-action polyfill\n\n\n this.touchAction.preventDefaults(inputData);\n var recognizer;\n var recognizers = this.recognizers; // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n\n var curRecognizer = session.curRecognizer; // reset when the last recognizer is recognized\n // or when we're in a new session\n\n if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) {\n session.curRecognizer = null;\n curRecognizer = null;\n }\n\n var i = 0;\n\n while (i < recognizers.length) {\n recognizer = recognizers[i]; // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer === curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) {\n // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n } // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n\n\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n session.curRecognizer = recognizer;\n curRecognizer = recognizer;\n }\n\n i++;\n }\n };\n /**\n * @private\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n\n\n _proto.get = function get(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event === recognizer) {\n return recognizers[i];\n }\n }\n\n return null;\n };\n /**\n * @private add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n\n\n _proto.add = function add(recognizer) {\n if (invokeArrayArg(recognizer, \"add\", this)) {\n return this;\n } // remove existing\n\n\n var existing = this.get(recognizer.options.event);\n\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n this.touchAction.update();\n return recognizer;\n };\n /**\n * @private\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n\n\n _proto.remove = function remove(recognizer) {\n if (invokeArrayArg(recognizer, \"remove\", this)) {\n return this;\n }\n\n var targetRecognizer = this.get(recognizer); // let's make sure this recognizer exists\n\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, targetRecognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n };\n /**\n * @private\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n\n\n _proto.on = function on(events, handler) {\n if (events === undefined || handler === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n };\n /**\n * @private unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n\n\n _proto.off = function off(events, handler) {\n if (events === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n };\n /**\n * @private emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n\n\n _proto.emit = function emit(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n } // no handlers, so skip it all\n\n\n var handlers = this.handlers[event] && this.handlers[event].slice();\n\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n\n data.preventDefault = function () {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n };\n /**\n * @private\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n\n\n _proto.destroy = function destroy() {\n this.element && toggleCssProps(this, false);\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n };\n\n return Manager;\n}();\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Touch events input\n * @constructor\n * @extends Input\n */\n\nvar SingleTouchInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(SingleTouchInput, _Input);\n\n function SingleTouchInput() {\n var _this;\n\n var proto = SingleTouchInput.prototype;\n proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.started = false;\n return _this;\n }\n\n var _proto = SingleTouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; // should we handle the touch events?\n\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type); // when done, reset the started state\n\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return SingleTouchInput;\n}(Input);\n\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n\n/**\n * @private\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n var deprecationMessage = \"DEPRECATED METHOD: \" + name + \"\\n\" + message + \" AT \\n\";\n return function () {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '').replace(/^\\s+at\\s+/gm, '').replace(/^Object.<anonymous>\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n var log = window.console && (window.console.warn || window.console.log);\n\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n\n return method.apply(this, arguments);\n };\n}\n\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\n\nvar extend = deprecate(function (dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n\n while (i < keys.length) {\n if (!merge || merge && dest[keys[i]] === undefined) {\n dest[keys[i]] = src[keys[i]];\n }\n\n i++;\n }\n\n return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * @private\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\n\nvar merge$1 = deprecate(function (dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * @private\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\n\nfunction inherit(child, base, properties) {\n var baseP = base.prototype;\n var childP;\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign$1(childP, properties);\n }\n}\n\n/**\n * @private\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n\n/**\n * @private\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\nvar Hammer$2 =\n/*#__PURE__*/\nfunction () {\n var Hammer =\n /**\n * @private\n * @const {string}\n */\n function Hammer(element, options) {\n if (options === void 0) {\n options = {};\n }\n\n return new Manager(element, _extends({\n recognizers: preset.concat()\n }, options));\n };\n\n Hammer.VERSION = \"2.0.17-rc\";\n Hammer.DIRECTION_ALL = DIRECTION_ALL;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.DIRECTION_LEFT = DIRECTION_LEFT;\n Hammer.DIRECTION_RIGHT = DIRECTION_RIGHT;\n Hammer.DIRECTION_UP = DIRECTION_UP;\n Hammer.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;\n Hammer.DIRECTION_VERTICAL = DIRECTION_VERTICAL;\n Hammer.DIRECTION_NONE = DIRECTION_NONE;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.INPUT_START = INPUT_START;\n Hammer.INPUT_MOVE = INPUT_MOVE;\n Hammer.INPUT_END = INPUT_END;\n Hammer.INPUT_CANCEL = INPUT_CANCEL;\n Hammer.STATE_POSSIBLE = STATE_POSSIBLE;\n Hammer.STATE_BEGAN = STATE_BEGAN;\n Hammer.STATE_CHANGED = STATE_CHANGED;\n Hammer.STATE_ENDED = STATE_ENDED;\n Hammer.STATE_RECOGNIZED = STATE_RECOGNIZED;\n Hammer.STATE_CANCELLED = STATE_CANCELLED;\n Hammer.STATE_FAILED = STATE_FAILED;\n Hammer.Manager = Manager;\n Hammer.Input = Input;\n Hammer.TouchAction = TouchAction;\n Hammer.TouchInput = TouchInput;\n Hammer.MouseInput = MouseInput;\n Hammer.PointerEventInput = PointerEventInput;\n Hammer.TouchMouseInput = TouchMouseInput;\n Hammer.SingleTouchInput = SingleTouchInput;\n Hammer.Recognizer = Recognizer;\n Hammer.AttrRecognizer = AttrRecognizer;\n Hammer.Tap = TapRecognizer;\n Hammer.Pan = PanRecognizer;\n Hammer.Swipe = SwipeRecognizer;\n Hammer.Pinch = PinchRecognizer;\n Hammer.Rotate = RotateRecognizer;\n Hammer.Press = PressRecognizer;\n Hammer.on = addEventListeners;\n Hammer.off = removeEventListeners;\n Hammer.each = each;\n Hammer.merge = merge$1;\n Hammer.extend = extend;\n Hammer.bindFn = bindFn;\n Hammer.assign = assign$1;\n Hammer.inherit = inherit;\n Hammer.bindFn = bindFn;\n Hammer.prefixed = prefixed;\n Hammer.toArray = toArray;\n Hammer.inArray = inArray;\n Hammer.uniqueArray = uniqueArray;\n Hammer.splitStr = splitStr;\n Hammer.boolOrFn = boolOrFn;\n Hammer.hasParent = hasParent;\n Hammer.addEventListeners = addEventListeners;\n Hammer.removeEventListeners = removeEventListeners;\n Hammer.defaults = assign$1({}, defaults, {\n preset: preset\n });\n return Hammer;\n}();\n\n// style loader but by script tag, not by the loader.\n\nHammer$2.defaults;\n\n/**\n * Use this symbol to delete properies in deepObjectAssign.\n */\n_Symbol$1(\"DELETE\");\n\n/**\n * Seedable, fast and reasonably good (not crypto but more than okay for our\n * needs) random number generator.\n * @remarks\n * Adapted from {@link https://web.archive.org/web/20110429100736/http://baagoe.com:80/en/RandomMusings/javascript}.\n * Original algorithm created by Johannes Baagøe \\<baagoe\\@baagoe.com\\> in 2010.\n */\n/**\n * Create a seeded pseudo random generator based on Alea by Johannes Baagøe.\n * @param seed - All supplied arguments will be used as a seed. In case nothing\n * is supplied the current time will be used to seed the generator.\n * @returns A ready to use seeded generator.\n */\nfunction Alea() {\n for (var _len3 = arguments.length, seed = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n seed[_key3] = arguments[_key3];\n }\n return AleaImplementation(seed.length ? seed : [_Date$now()]);\n}\n/**\n * An implementation of [[Alea]] without user input validation.\n * @param seed - The data that will be used to seed the generator.\n * @returns A ready to use seeded generator.\n */\nfunction AleaImplementation(seed) {\n let [s0, s1, s2] = mashSeed(seed);\n let c = 1;\n const random = () => {\n const t = 2091639 * s0 + c * 2.3283064365386963e-10; // 2^-32\n s0 = s1;\n s1 = s2;\n return s2 = t - (c = t | 0);\n };\n random.uint32 = () => random() * 0x100000000; // 2^32\n random.fract53 = () => random() + (random() * 0x200000 | 0) * 1.1102230246251565e-16; // 2^-53\n random.algorithm = \"Alea\";\n random.seed = seed;\n random.version = \"0.9\";\n return random;\n}\n/**\n * Turn arbitrary data into values [[AleaImplementation]] can use to generate\n * random numbers.\n * @param seed - Arbitrary data that will be used as the seed.\n * @returns Three numbers to use as initial values for [[AleaImplementation]].\n */\nfunction mashSeed() {\n const mash = Mash();\n let s0 = mash(\" \");\n let s1 = mash(\" \");\n let s2 = mash(\" \");\n for (let i = 0; i < arguments.length; i++) {\n s0 -= mash(i < 0 || arguments.length <= i ? undefined : arguments[i]);\n if (s0 < 0) {\n s0 += 1;\n }\n s1 -= mash(i < 0 || arguments.length <= i ? undefined : arguments[i]);\n if (s1 < 0) {\n s1 += 1;\n }\n s2 -= mash(i < 0 || arguments.length <= i ? undefined : arguments[i]);\n if (s2 < 0) {\n s2 += 1;\n }\n }\n return [s0, s1, s2];\n}\n/**\n * Create a new mash function.\n * @returns A nonpure function that takes arbitrary [[Mashable]] data and turns\n * them into numbers.\n */\nfunction Mash() {\n let n = 0xefc8249d;\n return function (data) {\n const string = data.toString();\n for (let i = 0; i < string.length; i++) {\n n += string.charCodeAt(i);\n let h = 0.02519603282416938 * n;\n n = h >>> 0;\n h -= n;\n h *= n;\n n = h >>> 0;\n h -= n;\n n += h * 0x100000000; // 2^32\n }\n return (n >>> 0) * 2.3283064365386963e-10; // 2^-32\n };\n}\n\n/**\n * Setup a mock hammer.js object, for unit testing.\n *\n * Inspiration: https://github.com/uber/deck.gl/pull/658\n * @returns {{on: noop, off: noop, destroy: noop, emit: noop, get: get}}\n */\nfunction hammerMock() {\n const noop = () => {};\n return {\n on: noop,\n off: noop,\n destroy: noop,\n emit: noop,\n get() {\n return {\n set: noop\n };\n }\n };\n}\nconst Hammer$1 = typeof window !== \"undefined\" ? window.Hammer || Hammer$2 : function () {\n // hammer.js is only available in a browser, not in node.js. Replacing it with a mock object.\n return hammerMock();\n};\n\n/**\n * Turn an element into an clickToUse element.\n * When not active, the element has a transparent overlay. When the overlay is\n * clicked, the mode is changed to active.\n * When active, the element is displayed with a blue border around it, and\n * the interactive contents of the element can be used. When clicked outside\n * the element, the elements mode is changed to inactive.\n * @param {Element} container\n * @class Activator\n */\nfunction Activator$1(container) {\n var _context;\n this._cleanupQueue = [];\n this.active = false;\n this._dom = {\n container,\n overlay: document.createElement(\"div\")\n };\n this._dom.overlay.classList.add(\"vis-overlay\");\n this._dom.container.appendChild(this._dom.overlay);\n this._cleanupQueue.push(() => {\n this._dom.overlay.parentNode.removeChild(this._dom.overlay);\n });\n const hammer = Hammer$1(this._dom.overlay);\n hammer.on(\"tap\", _bindInstanceProperty(_context = this._onTapOverlay).call(_context, this));\n this._cleanupQueue.push(() => {\n hammer.destroy();\n // FIXME: cleaning up hammer instances doesn't work (Timeline not removed\n // from memory)\n });\n\n // block all touch events (except tap)\n const events = [\"tap\", \"doubletap\", \"press\", \"pinch\", \"pan\", \"panstart\", \"panmove\", \"panend\"];\n _forEachInstanceProperty(events).call(events, event => {\n hammer.on(event, event => {\n event.srcEvent.stopPropagation();\n });\n });\n\n // attach a click event to the window, in order to deactivate when clicking outside the timeline\n if (document && document.body) {\n this._onClick = event => {\n if (!_hasParent(event.target, container)) {\n this.deactivate();\n }\n };\n document.body.addEventListener(\"click\", this._onClick);\n this._cleanupQueue.push(() => {\n document.body.removeEventListener(\"click\", this._onClick);\n });\n }\n\n // prepare escape key listener for deactivating when active\n this._escListener = event => {\n if (\"key\" in event ? event.key === \"Escape\" : event.keyCode === 27 /* the keyCode is for IE11 */) {\n this.deactivate();\n }\n };\n}\n\n// turn into an event emitter\nEmitter(Activator$1.prototype);\n\n// The currently active activator\nActivator$1.current = null;\n\n/**\n * Destroy the activator. Cleans up all created DOM and event listeners\n */\nActivator$1.prototype.destroy = function () {\n this.deactivate();\n for (const callback of _reverseInstanceProperty(_context2 = _spliceInstanceProperty(_context3 = this._cleanupQueue).call(_context3, 0)).call(_context2)) {\n var _context2, _context3;\n callback();\n }\n};\n\n/**\n * Activate the element\n * Overlay is hidden, element is decorated with a blue shadow border\n */\nActivator$1.prototype.activate = function () {\n // we allow only one active activator at a time\n if (Activator$1.current) {\n Activator$1.current.deactivate();\n }\n Activator$1.current = this;\n this.active = true;\n this._dom.overlay.style.display = \"none\";\n this._dom.container.classList.add(\"vis-active\");\n this.emit(\"change\");\n this.emit(\"activate\");\n\n // ugly hack: bind ESC after emitting the events, as the Network rebinds all\n // keyboard events on a 'change' event\n document.body.addEventListener(\"keydown\", this._escListener);\n};\n\n/**\n * Deactivate the element\n * Overlay is displayed on top of the element\n */\nActivator$1.prototype.deactivate = function () {\n this.active = false;\n this._dom.overlay.style.display = \"block\";\n this._dom.container.classList.remove(\"vis-active\");\n document.body.removeEventListener(\"keydown\", this._escListener);\n this.emit(\"change\");\n this.emit(\"deactivate\");\n};\n\n/**\n * Handle a tap event: activate the container\n * @param {Event} event The event\n * @private\n */\nActivator$1.prototype._onTapOverlay = function (event) {\n // activate the container\n this.activate();\n event.srcEvent.stopPropagation();\n};\n\n/**\n * Test whether the element has the requested parent element somewhere in\n * its chain of parent nodes.\n * @param {HTMLElement} element\n * @param {HTMLElement} parent\n * @returns {boolean} Returns true when the parent is found somewhere in the\n * chain of parent nodes.\n * @private\n */\nfunction _hasParent(element, parent) {\n while (element) {\n if (element === parent) {\n return true;\n }\n element = element.parentNode;\n }\n return false;\n}\n// Color REs\nconst fullHexRE = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\nconst shortHexRE = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\nconst rgbRE = /^rgb\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *\\)$/i;\nconst rgbaRE = /^rgba\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *([01]|0?\\.\\d+) *\\)$/i;\n/**\n * Remove everything in the DOM object.\n * @param DOMobject - Node whose child nodes will be recursively deleted.\n */\nfunction recursiveDOMDelete(DOMobject) {\n if (DOMobject) {\n while (DOMobject.hasChildNodes() === true) {\n const child = DOMobject.firstChild;\n if (child) {\n recursiveDOMDelete(child);\n DOMobject.removeChild(child);\n }\n }\n }\n}\n/**\n * Test whether given object is a string.\n * @param value - Input value of unknown type.\n * @returns True if string, false otherwise.\n */\nfunction isString(value) {\n return value instanceof String || typeof value === \"string\";\n}\n/**\n * Test whether given object is a object (not primitive or null).\n * @param value - Input value of unknown type.\n * @returns True if not null object, false otherwise.\n */\nfunction isObject(value) {\n return typeof value === \"object\" && value !== null;\n}\n/**\n * Copy property from b to a if property present in a.\n * If property in b explicitly set to null, delete it if `allowDeletion` set.\n *\n * Internal helper routine, should not be exported. Not added to `exports` for that reason.\n * @param a - Target object.\n * @param b - Source object.\n * @param prop - Name of property to copy from b to a.\n * @param allowDeletion - If true, delete property in a if explicitly set to null in b.\n */\nfunction copyOrDelete(a, b, prop, allowDeletion) {\n let doDeletion = false;\n if (allowDeletion === true) {\n doDeletion = b[prop] === null && a[prop] !== undefined;\n }\n if (doDeletion) {\n delete a[prop];\n } else {\n a[prop] = b[prop]; // Remember, this is a reference copy!\n }\n}\n/**\n * Fill an object with a possibly partially defined other object.\n *\n * Only copies values for the properties already present in a.\n * That means an object is not created on a property if only the b object has it.\n * @param a - The object that will have it's properties updated.\n * @param b - The object with property updates.\n * @param allowDeletion - If true, delete properties in a that are explicitly set to null in b.\n */\nfunction fillIfDefined(a, b) {\n let allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n // NOTE: iteration of properties of a\n // NOTE: prototype properties iterated over as well\n for (const prop in a) {\n if (b[prop] !== undefined) {\n if (b[prop] === null || typeof b[prop] !== \"object\") {\n // Note: typeof null === 'object'\n copyOrDelete(a, b, prop, allowDeletion);\n } else {\n const aProp = a[prop];\n const bProp = b[prop];\n if (isObject(aProp) && isObject(bProp)) {\n fillIfDefined(aProp, bProp, allowDeletion);\n }\n }\n }\n }\n}\n/**\n * Extend object a with selected properties of object b.\n * Only properties with defined values are copied.\n * @remarks\n * Previous version of this routine implied that multiple source objects could\n * be used; however, the implementation was **wrong**. Since multiple (\\>1)\n * sources weren't used anywhere in the `vis.js` code, this has been removed\n * @param props - Names of first-level properties to copy over.\n * @param a - Target object.\n * @param b - Source object.\n * @param allowDeletion - If true, delete property in a if explicitly set to null in b.\n * @returns Argument a.\n */\nfunction selectiveDeepExtend(props, a, b) {\n let allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n // TODO: add support for Arrays to deepExtend\n if (_Array$isArray(b)) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n }\n for (let p = 0; p < props.length; p++) {\n const prop = props[p];\n if (Object.prototype.hasOwnProperty.call(b, prop)) {\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n if (a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop], false, allowDeletion);\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (_Array$isArray(b[prop])) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n }\n return a;\n}\n/**\n * Extend object `a` with properties of object `b`, ignoring properties which\n * are explicitly specified to be excluded.\n * @remarks\n * The properties of `b` are considered for copying. Properties which are\n * themselves objects are are also extended. Only properties with defined\n * values are copied.\n * @param propsToExclude - Names of properties which should *not* be copied.\n * @param a - Object to extend.\n * @param b - Object to take properties from for extension.\n * @param allowDeletion - If true, delete properties in a that are explicitly\n * set to null in b.\n * @returns Argument a.\n */\nfunction selectiveNotDeepExtend(propsToExclude, a, b) {\n let allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n // TODO: add support for Arrays to deepExtend\n // NOTE: array properties have an else-below; apparently, there is a problem here.\n if (_Array$isArray(b)) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n }\n for (const prop in b) {\n if (!Object.prototype.hasOwnProperty.call(b, prop)) {\n continue;\n } // Handle local properties only\n if (_includesInstanceProperty(propsToExclude).call(propsToExclude, prop)) {\n continue;\n } // In exclusion list, skip\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n if (a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop]); // NOTE: allowDeletion not propagated!\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (_Array$isArray(b[prop])) {\n a[prop] = [];\n for (let i = 0; i < b[prop].length; i++) {\n a[prop].push(b[prop][i]);\n }\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n return a;\n}\n/**\n * Deep extend an object a with the properties of object b.\n * @param a - Target object.\n * @param b - Source object.\n * @param protoExtend - If true, the prototype values will also be extended.\n * (That is the options objects that inherit from others will also get the\n * inherited options).\n * @param allowDeletion - If true, the values of fields that are null will be deleted.\n * @returns Argument a.\n */\nfunction deepExtend(a, b) {\n let protoExtend = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n for (const prop in b) {\n if (Object.prototype.hasOwnProperty.call(b, prop) || protoExtend === true) {\n if (typeof b[prop] === \"object\" && b[prop] !== null && _Object$getPrototypeOf(b[prop]) === Object.prototype) {\n if (a[prop] === undefined) {\n a[prop] = deepExtend({}, b[prop], protoExtend); // NOTE: allowDeletion not propagated!\n } else if (typeof a[prop] === \"object\" && a[prop] !== null && _Object$getPrototypeOf(a[prop]) === Object.prototype) {\n deepExtend(a[prop], b[prop], protoExtend); // NOTE: allowDeletion not propagated!\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (_Array$isArray(b[prop])) {\n var _context4;\n a[prop] = _sliceInstanceProperty(_context4 = b[prop]).call(_context4);\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n }\n return a;\n}\n/**\n * Used to extend an array and copy it. This is used to propagate paths recursively.\n * @param arr - First part.\n * @param newValue - The value to be aadded into the array.\n * @returns A new array with all items from arr and newValue (which is last).\n */\nfunction copyAndExtendArray(arr, newValue) {\n return [...arr, newValue];\n}\n/**\n * Used to extend an array and copy it. This is used to propagate paths recursively.\n * @param arr - The array to be copied.\n * @returns Shallow copy of arr.\n */\nfunction copyArray(arr) {\n return _sliceInstanceProperty(arr).call(arr);\n}\n/**\n * Retrieve the absolute left value of a DOM element.\n * @param elem - A dom element, for example a div.\n * @returns The absolute left position of this element in the browser page.\n */\nfunction getAbsoluteLeft(elem) {\n return elem.getBoundingClientRect().left;\n}\n/**\n * Retrieve the absolute top value of a DOM element.\n * @param elem - A dom element, for example a div.\n * @returns The absolute top position of this element in the browser page.\n */\nfunction getAbsoluteTop(elem) {\n return elem.getBoundingClientRect().top;\n}\n/**\n * For each method for both arrays and objects.\n * In case of an array, the built-in Array.forEach() is applied (**No, it's not!**).\n * In case of an Object, the method loops over all properties of the object.\n * @param object - An Object or Array to be iterated over.\n * @param callback - Array.forEach-like callback.\n */\nfunction forEach(object, callback) {\n if (_Array$isArray(object)) {\n // array\n const len = object.length;\n for (let i = 0; i < len; i++) {\n callback(object[i], i, object);\n }\n } else {\n // object\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n callback(object[key], key, object);\n }\n }\n }\n}\n/**\n * Convert hex color string into RGB color object.\n * @remarks\n * {@link http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb}\n * @param hex - Hex color string (3 or 6 digits, with or without #).\n * @returns RGB color object.\n */\nfunction hexToRGB(hex) {\n let result;\n switch (hex.length) {\n case 3:\n case 4:\n result = shortHexRE.exec(hex);\n return result ? {\n r: _parseInt(result[1] + result[1], 16),\n g: _parseInt(result[2] + result[2], 16),\n b: _parseInt(result[3] + result[3], 16)\n } : null;\n case 6:\n case 7:\n result = fullHexRE.exec(hex);\n return result ? {\n r: _parseInt(result[1], 16),\n g: _parseInt(result[2], 16),\n b: _parseInt(result[3], 16)\n } : null;\n default:\n return null;\n }\n}\n/**\n * This function takes string color in hex or RGB format and adds the opacity, RGBA is passed through unchanged.\n * @param color - The color string (hex, RGB, RGBA).\n * @param opacity - The new opacity.\n * @returns RGBA string, for example 'rgba(255, 0, 127, 0.3)'.\n */\nfunction overrideOpacity(color, opacity) {\n if (_includesInstanceProperty(color).call(color, \"rgba\")) {\n return color;\n } else if (_includesInstanceProperty(color).call(color, \"rgb\")) {\n const rgb = color.substr(_indexOfInstanceProperty(color).call(color, \"(\") + 1).replace(\")\", \"\").split(\",\");\n return \"rgba(\" + rgb[0] + \",\" + rgb[1] + \",\" + rgb[2] + \",\" + opacity + \")\";\n } else {\n const rgb = hexToRGB(color);\n if (rgb == null) {\n return color;\n } else {\n return \"rgba(\" + rgb.r + \",\" + rgb.g + \",\" + rgb.b + \",\" + opacity + \")\";\n }\n }\n}\n/**\n * Convert RGB \\<0, 255\\> into hex color string.\n * @param red - Red channel.\n * @param green - Green channel.\n * @param blue - Blue channel.\n * @returns Hex color string (for example: '#0acdc0').\n */\nfunction RGBToHex(red, green, blue) {\n var _context5;\n return \"#\" + _sliceInstanceProperty(_context5 = ((1 << 24) + (red << 16) + (green << 8) + blue).toString(16)).call(_context5, 1);\n}\n/**\n * Parse a color property into an object with border, background, and highlight colors.\n * @param inputColor - Shorthand color string or input color object.\n * @param defaultColor - Full color object to fill in missing values in inputColor.\n * @returns Color object.\n */\nfunction parseColor(inputColor, defaultColor) {\n if (isString(inputColor)) {\n let colorStr = inputColor;\n if (isValidRGB(colorStr)) {\n var _context6;\n const rgb = _mapInstanceProperty(_context6 = colorStr.substr(4).substr(0, colorStr.length - 5).split(\",\")).call(_context6, function (value) {\n return _parseInt(value);\n });\n colorStr = RGBToHex(rgb[0], rgb[1], rgb[2]);\n }\n if (isValidHex(colorStr) === true) {\n const hsv = hexToHSV(colorStr);\n const lighterColorHSV = {\n h: hsv.h,\n s: hsv.s * 0.8,\n v: Math.min(1, hsv.v * 1.02)\n };\n const darkerColorHSV = {\n h: hsv.h,\n s: Math.min(1, hsv.s * 1.25),\n v: hsv.v * 0.8\n };\n const darkerColorHex = HSVToHex(darkerColorHSV.h, darkerColorHSV.s, darkerColorHSV.v);\n const lighterColorHex = HSVToHex(lighterColorHSV.h, lighterColorHSV.s, lighterColorHSV.v);\n return {\n background: colorStr,\n border: darkerColorHex,\n highlight: {\n background: lighterColorHex,\n border: darkerColorHex\n },\n hover: {\n background: lighterColorHex,\n border: darkerColorHex\n }\n };\n } else {\n return {\n background: colorStr,\n border: colorStr,\n highlight: {\n background: colorStr,\n border: colorStr\n },\n hover: {\n background: colorStr,\n border: colorStr\n }\n };\n }\n } else {\n {\n const color = {\n background: inputColor.background || undefined,\n border: inputColor.border || undefined,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || undefined,\n border: inputColor.highlight && inputColor.highlight.border || undefined\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || undefined,\n background: inputColor.hover && inputColor.hover.background || undefined\n }\n };\n return color;\n }\n }\n}\n/**\n * Convert RGB \\<0, 255\\> into HSV object.\n * @remarks\n * {@link http://www.javascripter.net/faq/rgb2hsv.htm}\n * @param red - Red channel.\n * @param green - Green channel.\n * @param blue - Blue channel.\n * @returns HSV color object.\n */\nfunction RGBToHSV(red, green, blue) {\n red = red / 255;\n green = green / 255;\n blue = blue / 255;\n const minRGB = Math.min(red, Math.min(green, blue));\n const maxRGB = Math.max(red, Math.max(green, blue));\n // Black-gray-white\n if (minRGB === maxRGB) {\n return {\n h: 0,\n s: 0,\n v: minRGB\n };\n }\n // Colors other than black-gray-white:\n const d = red === minRGB ? green - blue : blue === minRGB ? red - green : blue - red;\n const h = red === minRGB ? 3 : blue === minRGB ? 1 : 5;\n const hue = 60 * (h - d / (maxRGB - minRGB)) / 360;\n const saturation = (maxRGB - minRGB) / maxRGB;\n const value = maxRGB;\n return {\n h: hue,\n s: saturation,\n v: value\n };\n}\n/**\n * Convert HSV \\<0, 1\\> into RGB color object.\n * @remarks\n * {@link https://gist.github.com/mjijackson/5311256}\n * @param h - Hue.\n * @param s - Saturation.\n * @param v - Value.\n * @returns RGB color object.\n */\nfunction HSVToRGB(h, s, v) {\n let r;\n let g;\n let b;\n const i = Math.floor(h * 6);\n const f = h * 6 - i;\n const p = v * (1 - s);\n const q = v * (1 - f * s);\n const t = v * (1 - (1 - f) * s);\n switch (i % 6) {\n case 0:\n r = v, g = t, b = p;\n break;\n case 1:\n r = q, g = v, b = p;\n break;\n case 2:\n r = p, g = v, b = t;\n break;\n case 3:\n r = p, g = q, b = v;\n break;\n case 4:\n r = t, g = p, b = v;\n break;\n case 5:\n r = v, g = p, b = q;\n break;\n }\n return {\n r: Math.floor(r * 255),\n g: Math.floor(g * 255),\n b: Math.floor(b * 255)\n };\n}\n/**\n * Convert HSV \\<0, 1\\> into hex color string.\n * @param h - Hue.\n * @param s - Saturation.\n * @param v - Value.\n * @returns Hex color string.\n */\nfunction HSVToHex(h, s, v) {\n const rgb = HSVToRGB(h, s, v);\n return RGBToHex(rgb.r, rgb.g, rgb.b);\n}\n/**\n * Convert hex color string into HSV \\<0, 1\\>.\n * @param hex - Hex color string.\n * @returns HSV color object.\n */\nfunction hexToHSV(hex) {\n const rgb = hexToRGB(hex);\n if (!rgb) {\n throw new TypeError(\"'\".concat(hex, \"' is not a valid color.\"));\n }\n return RGBToHSV(rgb.r, rgb.g, rgb.b);\n}\n/**\n * Validate hex color string.\n * @param hex - Unknown string that may contain a color.\n * @returns True if the string is valid, false otherwise.\n */\nfunction isValidHex(hex) {\n const isOk = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex);\n return isOk;\n}\n/**\n * Validate RGB color string.\n * @param rgb - Unknown string that may contain a color.\n * @returns True if the string is valid, false otherwise.\n */\nfunction isValidRGB(rgb) {\n return rgbRE.test(rgb);\n}\n/**\n * Validate RGBA color string.\n * @param rgba - Unknown string that may contain a color.\n * @returns True if the string is valid, false otherwise.\n */\nfunction isValidRGBA(rgba) {\n return rgbaRE.test(rgba);\n}\n/**\n * This recursively redirects the prototype of JSON objects to the referenceObject.\n * This is used for default options.\n * @param referenceObject - The original object.\n * @returns The Element if the referenceObject is an Element, or a new object inheriting from the referenceObject.\n */\nfunction bridgeObject(referenceObject) {\n if (referenceObject === null || typeof referenceObject !== \"object\") {\n return null;\n }\n if (referenceObject instanceof Element) {\n // Avoid bridging DOM objects\n return referenceObject;\n }\n const objectTo = _Object$create(referenceObject);\n for (const i in referenceObject) {\n if (Object.prototype.hasOwnProperty.call(referenceObject, i)) {\n if (typeof referenceObject[i] == \"object\") {\n objectTo[i] = bridgeObject(referenceObject[i]);\n }\n }\n }\n return objectTo;\n}\n/**\n * This is used to set the options of subobjects in the options object.\n *\n * A requirement of these subobjects is that they have an 'enabled' element\n * which is optional for the user but mandatory for the program.\n *\n * The added value here of the merge is that option 'enabled' is set as required.\n * @param mergeTarget - Either this.options or the options used for the groups.\n * @param options - Options.\n * @param option - Option key in the options argument.\n * @param globalOptions - Global options, passed in to determine value of option 'enabled'.\n */\nfunction mergeOptions(mergeTarget, options, option) {\n let globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n // Local helpers\n const isPresent = function (obj) {\n return obj !== null && obj !== undefined;\n };\n const isObject = function (obj) {\n return obj !== null && typeof obj === \"object\";\n };\n // https://stackoverflow.com/a/34491287/1223531\n const isEmpty = function (obj) {\n for (const x in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, x)) {\n return false;\n }\n }\n return true;\n };\n // Guards\n if (!isObject(mergeTarget)) {\n throw new Error(\"Parameter mergeTarget must be an object\");\n }\n if (!isObject(options)) {\n throw new Error(\"Parameter options must be an object\");\n }\n if (!isPresent(option)) {\n throw new Error(\"Parameter option must have a value\");\n }\n if (!isObject(globalOptions)) {\n throw new Error(\"Parameter globalOptions must be an object\");\n }\n //\n // Actual merge routine, separated from main logic\n // Only a single level of options is merged. Deeper levels are ref'd. This may actually be an issue.\n //\n const doMerge = function (target, options, option) {\n if (!isObject(target[option])) {\n target[option] = {};\n }\n const src = options[option];\n const dst = target[option];\n for (const prop in src) {\n if (Object.prototype.hasOwnProperty.call(src, prop)) {\n dst[prop] = src[prop];\n }\n }\n };\n // Local initialization\n const srcOption = options[option];\n const globalPassed = isObject(globalOptions) && !isEmpty(globalOptions);\n const globalOption = globalPassed ? globalOptions[option] : undefined;\n const globalEnabled = globalOption ? globalOption.enabled : undefined;\n /////////////////////////////////////////\n // Main routine\n /////////////////////////////////////////\n if (srcOption === undefined) {\n return; // Nothing to do\n }\n if (typeof srcOption === \"boolean\") {\n if (!isObject(mergeTarget[option])) {\n mergeTarget[option] = {};\n }\n mergeTarget[option].enabled = srcOption;\n return;\n }\n if (srcOption === null && !isObject(mergeTarget[option])) {\n // If possible, explicit copy from globals\n if (isPresent(globalOption)) {\n mergeTarget[option] = _Object$create(globalOption);\n } else {\n return; // Nothing to do\n }\n }\n if (!isObject(srcOption)) {\n return;\n }\n //\n // Ensure that 'enabled' is properly set. It is required internally\n // Note that the value from options will always overwrite the existing value\n //\n let enabled = true; // default value\n if (srcOption.enabled !== undefined) {\n enabled = srcOption.enabled;\n } else {\n // Take from globals, if present\n if (globalEnabled !== undefined) {\n enabled = globalOption.enabled;\n }\n }\n doMerge(mergeTarget, options, option);\n mergeTarget[option].enabled = enabled;\n}\n/*\n * Easing Functions.\n * Only considering the t value for the range [0, 1] => [0, 1].\n *\n * Inspiration: from http://gizma.com/easing/\n * https://gist.github.com/gre/1650294\n */\nconst easingFunctions = {\n /**\n * Provides no easing and no acceleration.\n * @param t - Time.\n * @returns Value at time t.\n */\n linear(t) {\n return t;\n },\n /**\n * Accelerate from zero velocity.\n * @param t - Time.\n * @returns Value at time t.\n */\n easeInQuad(t) {\n return t * t;\n },\n /**\n * Decelerate to zero velocity.\n * @param t - Time.\n * @returns Value at time t.\n */\n easeOutQuad(t) {\n return t * (2 - t);\n },\n /**\n * Accelerate until halfway, then decelerate.\n * @param t - Time.\n * @returns Value at time t.\n */\n easeInOutQuad(t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n },\n /**\n * Accelerate from zero velocity.\n * @param t - Time.\n * @returns Value at time t.\n */\n easeInCubic(t) {\n return t * t * t;\n },\n /**\n * Decelerate to zero velocity.\n * @param t - Time.\n * @returns Value at time t.\n */\n easeOutCubic(t) {\n return --t * t * t + 1;\n },\n /**\n * Accelerate until halfway, then decelerate.\n * @param t - Time.\n * @returns Value at time t.\n */\n easeInOutCubic(t) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n },\n /**\n * Accelerate from zero velocity.\n * @param t - Time.\n * @returns Value at time t.\n */\n easeInQuart(t) {\n return t * t * t * t;\n },\n /**\n * Decelerate to zero velocity.\n * @param t - Time.\n * @returns Value at time t.\n */\n easeOutQuart(t) {\n return 1 - --t * t * t * t;\n },\n /**\n * Accelerate until halfway, then decelerate.\n * @param t - Time.\n * @returns Value at time t.\n */\n easeInOutQuart(t) {\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;\n },\n /**\n * Accelerate from zero velocity.\n * @param t - Time.\n * @returns Value at time t.\n */\n easeInQuint(t) {\n return t * t * t * t * t;\n },\n /**\n * Decelerate to zero velocity.\n * @param t - Time.\n * @returns Value at time t.\n */\n easeOutQuint(t) {\n return 1 + --t * t * t * t * t;\n },\n /**\n * Accelerate until halfway, then decelerate.\n * @param t - Time.\n * @returns Value at time t.\n */\n easeInOutQuint(t) {\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;\n }\n};\n// @TODO: This doesn't work properly.\n// It works only for single property objects,\n// otherwise it combines all of the types in a union.\n// export function topMost<K1 extends string, V1> (\n// pile: Record<K1, undefined | V1>[],\n// accessors: K1 | [K1]\n// ): undefined | V1\n// export function topMost<K1 extends string, K2 extends string, V1, V2> (\n// pile: Record<K1, undefined | V1 | Record<K2, undefined | V2>>[],\n// accessors: [K1, K2]\n// ): undefined | V1 | V2\n// export function topMost<K1 extends string, K2 extends string, K3 extends string, V1, V2, V3> (\n// pile: Record<K1, undefined | V1 | Record<K2, undefined | V2 | Record<K3, undefined | V3>>>[],\n// accessors: [K1, K2, K3]\n// ): undefined | V1 | V2 | V3\n/**\n * Get the top most property value from a pile of objects.\n * @param pile - Array of objects, no required format.\n * @param accessors - Array of property names.\n * For example `object['foo']['bar']` → `['foo', 'bar']`.\n * @returns Value of the property with given accessors path from the first pile item where it's not undefined.\n */\nfunction topMost(pile, accessors) {\n let candidate;\n if (!_Array$isArray(accessors)) {\n accessors = [accessors];\n }\n for (const member of pile) {\n if (member) {\n candidate = member[accessors[0]];\n for (let i = 1; i < accessors.length; i++) {\n if (candidate) {\n candidate = candidate[accessors[i]];\n }\n }\n if (typeof candidate !== \"undefined\") {\n break;\n }\n }\n }\n return candidate;\n}\nconst htmlColors = {\n black: \"#000000\",\n navy: \"#000080\",\n darkblue: \"#00008B\",\n mediumblue: \"#0000CD\",\n blue: \"#0000FF\",\n darkgreen: \"#006400\",\n green: \"#008000\",\n teal: \"#008080\",\n darkcyan: \"#008B8B\",\n deepskyblue: \"#00BFFF\",\n darkturquoise: \"#00CED1\",\n mediumspringgreen: \"#00FA9A\",\n lime: \"#00FF00\",\n springgreen: \"#00FF7F\",\n aqua: \"#00FFFF\",\n cyan: \"#00FFFF\",\n midnightblue: \"#191970\",\n dodgerblue: \"#1E90FF\",\n lightseagreen: \"#20B2AA\",\n forestgreen: \"#228B22\",\n seagreen: \"#2E8B57\",\n darkslategray: \"#2F4F4F\",\n limegreen: \"#32CD32\",\n mediumseagreen: \"#3CB371\",\n turquoise: \"#40E0D0\",\n royalblue: \"#4169E1\",\n steelblue: \"#4682B4\",\n darkslateblue: \"#483D8B\",\n mediumturquoise: \"#48D1CC\",\n indigo: \"#4B0082\",\n darkolivegreen: \"#556B2F\",\n cadetblue: \"#5F9EA0\",\n cornflowerblue: \"#6495ED\",\n mediumaquamarine: \"#66CDAA\",\n dimgray: \"#696969\",\n slateblue: \"#6A5ACD\",\n olivedrab: \"#6B8E23\",\n slategray: \"#708090\",\n lightslategray: \"#778899\",\n mediumslateblue: \"#7B68EE\",\n lawngreen: \"#7CFC00\",\n chartreuse: \"#7FFF00\",\n aquamarine: \"#7FFFD4\",\n maroon: \"#800000\",\n purple: \"#800080\",\n olive: \"#808000\",\n gray: \"#808080\",\n skyblue: \"#87CEEB\",\n lightskyblue: \"#87CEFA\",\n blueviolet: \"#8A2BE2\",\n darkred: \"#8B0000\",\n darkmagenta: \"#8B008B\",\n saddlebrown: \"#8B4513\",\n darkseagreen: \"#8FBC8F\",\n lightgreen: \"#90EE90\",\n mediumpurple: \"#9370D8\",\n darkviolet: \"#9400D3\",\n palegreen: \"#98FB98\",\n darkorchid: \"#9932CC\",\n yellowgreen: \"#9ACD32\",\n sienna: \"#A0522D\",\n brown: \"#A52A2A\",\n darkgray: \"#A9A9A9\",\n lightblue: \"#ADD8E6\",\n greenyellow: \"#ADFF2F\",\n paleturquoise: \"#AFEEEE\",\n lightsteelblue: \"#B0C4DE\",\n powderblue: \"#B0E0E6\",\n firebrick: \"#B22222\",\n darkgoldenrod: \"#B8860B\",\n mediumorchid: \"#BA55D3\",\n rosybrown: \"#BC8F8F\",\n darkkhaki: \"#BDB76B\",\n silver: \"#C0C0C0\",\n mediumvioletred: \"#C71585\",\n indianred: \"#CD5C5C\",\n peru: \"#CD853F\",\n chocolate: \"#D2691E\",\n tan: \"#D2B48C\",\n lightgrey: \"#D3D3D3\",\n palevioletred: \"#D87093\",\n thistle: \"#D8BFD8\",\n orchid: \"#DA70D6\",\n goldenrod: \"#DAA520\",\n crimson: \"#DC143C\",\n gainsboro: \"#DCDCDC\",\n plum: \"#DDA0DD\",\n burlywood: \"#DEB887\",\n lightcyan: \"#E0FFFF\",\n lavender: \"#E6E6FA\",\n darksalmon: \"#E9967A\",\n violet: \"#EE82EE\",\n palegoldenrod: \"#EEE8AA\",\n lightcoral: \"#F08080\",\n khaki: \"#F0E68C\",\n aliceblue: \"#F0F8FF\",\n honeydew: \"#F0FFF0\",\n azure: \"#F0FFFF\",\n sandybrown: \"#F4A460\",\n wheat: \"#F5DEB3\",\n beige: \"#F5F5DC\",\n whitesmoke: \"#F5F5F5\",\n mintcream: \"#F5FFFA\",\n ghostwhite: \"#F8F8FF\",\n salmon: \"#FA8072\",\n antiquewhite: \"#FAEBD7\",\n linen: \"#FAF0E6\",\n lightgoldenrodyellow: \"#FAFAD2\",\n oldlace: \"#FDF5E6\",\n red: \"#FF0000\",\n fuchsia: \"#FF00FF\",\n magenta: \"#FF00FF\",\n deeppink: \"#FF1493\",\n orangered: \"#FF4500\",\n tomato: \"#FF6347\",\n hotpink: \"#FF69B4\",\n coral: \"#FF7F50\",\n darkorange: \"#FF8C00\",\n lightsalmon: \"#FFA07A\",\n orange: \"#FFA500\",\n lightpink: \"#FFB6C1\",\n pink: \"#FFC0CB\",\n gold: \"#FFD700\",\n peachpuff: \"#FFDAB9\",\n navajowhite: \"#FFDEAD\",\n moccasin: \"#FFE4B5\",\n bisque: \"#FFE4C4\",\n mistyrose: \"#FFE4E1\",\n blanchedalmond: \"#FFEBCD\",\n papayawhip: \"#FFEFD5\",\n lavenderblush: \"#FFF0F5\",\n seashell: \"#FFF5EE\",\n cornsilk: \"#FFF8DC\",\n lemonchiffon: \"#FFFACD\",\n floralwhite: \"#FFFAF0\",\n snow: \"#FFFAFA\",\n yellow: \"#FFFF00\",\n lightyellow: \"#FFFFE0\",\n ivory: \"#FFFFF0\",\n white: \"#FFFFFF\"\n};\n\n/**\n * @param {number} [pixelRatio=1]\n */\nlet ColorPicker$1 = class ColorPicker {\n /**\n * @param {number} [pixelRatio]\n */\n constructor() {\n let pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n this.pixelRatio = pixelRatio;\n this.generated = false;\n this.centerCoordinates = {\n x: 289 / 2,\n y: 289 / 2\n };\n this.r = 289 * 0.49;\n this.color = {\n r: 255,\n g: 255,\n b: 255,\n a: 1.0\n };\n this.hueCircle = undefined;\n this.initialColor = {\n r: 255,\n g: 255,\n b: 255,\n a: 1.0\n };\n this.previousColor = undefined;\n this.applied = false;\n\n // bound by\n this.updateCallback = () => {};\n this.closeCallback = () => {};\n\n // create all DOM elements\n this._create();\n }\n\n /**\n * this inserts the colorPicker into a div from the DOM\n * @param {Element} container\n */\n insertTo(container) {\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n this.hammer = undefined;\n }\n this.container = container;\n this.container.appendChild(this.frame);\n this._bindHammer();\n this._setSize();\n }\n\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param {Function} callback\n */\n setUpdateCallback(callback) {\n if (typeof callback === \"function\") {\n this.updateCallback = callback;\n } else {\n throw new Error(\"Function attempted to set as colorPicker update callback is not a function.\");\n }\n }\n\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param {Function} callback\n */\n setCloseCallback(callback) {\n if (typeof callback === \"function\") {\n this.closeCallback = callback;\n } else {\n throw new Error(\"Function attempted to set as colorPicker closing callback is not a function.\");\n }\n }\n\n /**\n *\n * @param {string} color\n * @returns {string}\n * @private\n */\n _isColorString(color) {\n if (typeof color === \"string\") {\n return htmlColors[color];\n }\n }\n\n /**\n * Set the color of the colorPicker\n * Supported formats:\n * 'red' --> HTML color string\n * '#ffffff' --> hex string\n * 'rgb(255,255,255)' --> rgb string\n * 'rgba(255,255,255,1.0)' --> rgba string\n * {r:255,g:255,b:255} --> rgb object\n * {r:255,g:255,b:255,a:1.0} --> rgba object\n * @param {string | object} color\n * @param {boolean} [setInitial]\n */\n setColor(color) {\n let setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (color === \"none\") {\n return;\n }\n let rgba;\n\n // if a html color shorthand is used, convert to hex\n const htmlColor = this._isColorString(color);\n if (htmlColor !== undefined) {\n color = htmlColor;\n }\n\n // check format\n if (isString(color) === true) {\n if (isValidRGB(color) === true) {\n const rgbaArray = color.substr(4).substr(0, color.length - 5).split(\",\");\n rgba = {\n r: rgbaArray[0],\n g: rgbaArray[1],\n b: rgbaArray[2],\n a: 1.0\n };\n } else if (isValidRGBA(color) === true) {\n const rgbaArray = color.substr(5).substr(0, color.length - 6).split(\",\");\n rgba = {\n r: rgbaArray[0],\n g: rgbaArray[1],\n b: rgbaArray[2],\n a: rgbaArray[3]\n };\n } else if (isValidHex(color) === true) {\n const rgbObj = hexToRGB(color);\n rgba = {\n r: rgbObj.r,\n g: rgbObj.g,\n b: rgbObj.b,\n a: 1.0\n };\n }\n } else {\n if (color instanceof Object) {\n if (color.r !== undefined && color.g !== undefined && color.b !== undefined) {\n const alpha = color.a !== undefined ? color.a : \"1.0\";\n rgba = {\n r: color.r,\n g: color.g,\n b: color.b,\n a: alpha\n };\n }\n }\n }\n\n // set color\n if (rgba === undefined) {\n throw new Error(\"Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: \" + _JSON$stringify(color));\n } else {\n this._setColor(rgba, setInitial);\n }\n }\n\n /**\n * this shows the color picker.\n * The hue circle is constructed once and stored.\n */\n show() {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n this.applied = false;\n this.frame.style.display = \"block\";\n this._generateHueCircle();\n }\n\n // ------------------------------------------ PRIVATE ----------------------------- //\n\n /**\n * Hide the picker. Is called by the cancel button.\n * Optional boolean to store the previous color for easy access later on.\n * @param {boolean} [storePrevious]\n * @private\n */\n _hide() {\n let storePrevious = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n // store the previous color for next time;\n if (storePrevious === true) {\n this.previousColor = _Object$assign({}, this.color);\n }\n if (this.applied === true) {\n this.updateCallback(this.initialColor);\n }\n this.frame.style.display = \"none\";\n\n // call the closing callback, restoring the onclick method.\n // this is in a setTimeout because it will trigger the show again before the click is done.\n _setTimeout(() => {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n }, 0);\n }\n\n /**\n * bound to the save button. Saves and hides.\n * @private\n */\n _save() {\n this.updateCallback(this.color);\n this.applied = false;\n this._hide();\n }\n\n /**\n * Bound to apply button. Saves but does not close. Is undone by the cancel button.\n * @private\n */\n _apply() {\n this.applied = true;\n this.updateCallback(this.color);\n this._updatePicker(this.color);\n }\n\n /**\n * load the color from the previous session.\n * @private\n */\n _loadLast() {\n if (this.previousColor !== undefined) {\n this.setColor(this.previousColor, false);\n } else {\n alert(\"There is no last color to load...\");\n }\n }\n\n /**\n * set the color, place the picker\n * @param {object} rgba\n * @param {boolean} [setInitial]\n * @private\n */\n _setColor(rgba) {\n let setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n // store the initial color\n if (setInitial === true) {\n this.initialColor = _Object$assign({}, rgba);\n }\n this.color = rgba;\n const hsv = RGBToHSV(rgba.r, rgba.g, rgba.b);\n const angleConvert = 2 * Math.PI;\n const radius = this.r * hsv.s;\n const x = this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h);\n const y = this.centerCoordinates.y + radius * Math.cos(angleConvert * hsv.h);\n this.colorPickerSelector.style.left = x - 0.5 * this.colorPickerSelector.clientWidth + \"px\";\n this.colorPickerSelector.style.top = y - 0.5 * this.colorPickerSelector.clientHeight + \"px\";\n this._updatePicker(rgba);\n }\n\n /**\n * bound to opacity control\n * @param {number} value\n * @private\n */\n _setOpacity(value) {\n this.color.a = value / 100;\n this._updatePicker(this.color);\n }\n\n /**\n * bound to brightness control\n * @param {number} value\n * @private\n */\n _setBrightness(value) {\n const hsv = RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.v = value / 100;\n const rgba = HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba[\"a\"] = this.color.a;\n this.color = rgba;\n this._updatePicker();\n }\n\n /**\n * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing.\n * @param {object} rgba\n * @private\n */\n _updatePicker() {\n let rgba = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.color;\n const hsv = RGBToHSV(rgba.r, rgba.g, rgba.b);\n const ctx = this.colorPickerCanvas.getContext(\"2d\");\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1);\n }\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n\n // clear the canvas\n const w = this.colorPickerCanvas.clientWidth;\n const h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n ctx.putImageData(this.hueCircle, 0, 0);\n ctx.fillStyle = \"rgba(0,0,0,\" + (1 - hsv.v) + \")\";\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n _fillInstanceProperty(ctx).call(ctx);\n this.brightnessRange.value = 100 * hsv.v;\n this.opacityRange.value = 100 * rgba.a;\n this.initialColorDiv.style.backgroundColor = \"rgba(\" + this.initialColor.r + \",\" + this.initialColor.g + \",\" + this.initialColor.b + \",\" + this.initialColor.a + \")\";\n this.newColorDiv.style.backgroundColor = \"rgba(\" + this.color.r + \",\" + this.color.g + \",\" + this.color.b + \",\" + this.color.a + \")\";\n }\n\n /**\n * used by create to set the size of the canvas.\n * @private\n */\n _setSize() {\n this.colorPickerCanvas.style.width = \"100%\";\n this.colorPickerCanvas.style.height = \"100%\";\n this.colorPickerCanvas.width = 289 * this.pixelRatio;\n this.colorPickerCanvas.height = 289 * this.pixelRatio;\n }\n\n /**\n * create all dom elements\n * TODO: cleanup, lots of similar dom elements\n * @private\n */\n _create() {\n var _context7, _context8, _context9, _context0;\n this.frame = document.createElement(\"div\");\n this.frame.className = \"vis-color-picker\";\n this.colorPickerDiv = document.createElement(\"div\");\n this.colorPickerSelector = document.createElement(\"div\");\n this.colorPickerSelector.className = \"vis-selector\";\n this.colorPickerDiv.appendChild(this.colorPickerSelector);\n this.colorPickerCanvas = document.createElement(\"canvas\");\n this.colorPickerDiv.appendChild(this.colorPickerCanvas);\n if (!this.colorPickerCanvas.getContext) {\n const noCanvas = document.createElement(\"DIV\");\n noCanvas.style.color = \"red\";\n noCanvas.style.fontWeight = \"bold\";\n noCanvas.style.padding = \"10px\";\n noCanvas.innerText = \"Error: your browser does not support HTML canvas\";\n this.colorPickerCanvas.appendChild(noCanvas);\n } else {\n const ctx = this.colorPickerCanvas.getContext(\"2d\");\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1);\n this.colorPickerCanvas.getContext(\"2d\").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n this.colorPickerDiv.className = \"vis-color\";\n this.opacityDiv = document.createElement(\"div\");\n this.opacityDiv.className = \"vis-opacity\";\n this.brightnessDiv = document.createElement(\"div\");\n this.brightnessDiv.className = \"vis-brightness\";\n this.arrowDiv = document.createElement(\"div\");\n this.arrowDiv.className = \"vis-arrow\";\n this.opacityRange = document.createElement(\"input\");\n try {\n this.opacityRange.type = \"range\"; // Not supported on IE9\n this.opacityRange.min = \"0\";\n this.opacityRange.max = \"100\";\n } catch (err) {\n // TODO: Add some error handling.\n }\n this.opacityRange.value = \"100\";\n this.opacityRange.className = \"vis-range\";\n this.brightnessRange = document.createElement(\"input\");\n try {\n this.brightnessRange.type = \"range\"; // Not supported on IE9\n this.brightnessRange.min = \"0\";\n this.brightnessRange.max = \"100\";\n } catch (err) {\n // TODO: Add some error handling.\n }\n this.brightnessRange.value = \"100\";\n this.brightnessRange.className = \"vis-range\";\n this.opacityDiv.appendChild(this.opacityRange);\n this.brightnessDiv.appendChild(this.brightnessRange);\n const me = this;\n this.opacityRange.onchange = function () {\n me._setOpacity(this.value);\n };\n this.opacityRange.oninput = function () {\n me._setOpacity(this.value);\n };\n this.brightnessRange.onchange = function () {\n me._setBrightness(this.value);\n };\n this.brightnessRange.oninput = function () {\n me._setBrightness(this.value);\n };\n this.brightnessLabel = document.createElement(\"div\");\n this.brightnessLabel.className = \"vis-label vis-brightness\";\n this.brightnessLabel.innerText = \"brightness:\";\n this.opacityLabel = document.createElement(\"div\");\n this.opacityLabel.className = \"vis-label vis-opacity\";\n this.opacityLabel.innerText = \"opacity:\";\n this.newColorDiv = document.createElement(\"div\");\n this.newColorDiv.className = \"vis-new-color\";\n this.newColorDiv.innerText = \"new\";\n this.initialColorDiv = document.createElement(\"div\");\n this.initialColorDiv.className = \"vis-initial-color\";\n this.initialColorDiv.innerText = \"initial\";\n this.cancelButton = document.createElement(\"div\");\n this.cancelButton.className = \"vis-button vis-cancel\";\n this.cancelButton.innerText = \"cancel\";\n this.cancelButton.onclick = _bindInstanceProperty(_context7 = this._hide).call(_context7, this, false);\n this.applyButton = document.createElement(\"div\");\n this.applyButton.className = \"vis-button vis-apply\";\n this.applyButton.innerText = \"apply\";\n this.applyButton.onclick = _bindInstanceProperty(_context8 = this._apply).call(_context8, this);\n this.saveButton = document.createElement(\"div\");\n this.saveButton.className = \"vis-button vis-save\";\n this.saveButton.innerText = \"save\";\n this.saveButton.onclick = _bindInstanceProperty(_context9 = this._save).call(_context9, this);\n this.loadButton = document.createElement(\"div\");\n this.loadButton.className = \"vis-button vis-load\";\n this.loadButton.innerText = \"load last\";\n this.loadButton.onclick = _bindInstanceProperty(_context0 = this._loadLast).call(_context0, this);\n this.frame.appendChild(this.colorPickerDiv);\n this.frame.appendChild(this.arrowDiv);\n this.frame.appendChild(this.brightnessLabel);\n this.frame.appendChild(this.brightnessDiv);\n this.frame.appendChild(this.opacityLabel);\n this.frame.appendChild(this.opacityDiv);\n this.frame.appendChild(this.newColorDiv);\n this.frame.appendChild(this.initialColorDiv);\n this.frame.appendChild(this.cancelButton);\n this.frame.appendChild(this.applyButton);\n this.frame.appendChild(this.saveButton);\n this.frame.appendChild(this.loadButton);\n }\n\n /**\n * bind hammer to the color picker\n * @private\n */\n _bindHammer() {\n this.drag = {};\n this.pinch = {};\n this.hammer = new Hammer$1(this.colorPickerCanvas);\n this.hammer.get(\"pinch\").set({\n enable: true\n });\n this.hammer.on(\"hammer.input\", event => {\n if (event.isFirst) {\n this._moveSelector(event);\n }\n });\n this.hammer.on(\"tap\", event => {\n this._moveSelector(event);\n });\n this.hammer.on(\"panstart\", event => {\n this._moveSelector(event);\n });\n this.hammer.on(\"panmove\", event => {\n this._moveSelector(event);\n });\n this.hammer.on(\"panend\", event => {\n this._moveSelector(event);\n });\n }\n\n /**\n * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown.\n * @private\n */\n _generateHueCircle() {\n if (this.generated === false) {\n const ctx = this.colorPickerCanvas.getContext(\"2d\");\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1);\n }\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n\n // clear the canvas\n const w = this.colorPickerCanvas.clientWidth;\n const h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n // draw hue circle\n let x, y, hue, sat;\n this.centerCoordinates = {\n x: w * 0.5,\n y: h * 0.5\n };\n this.r = 0.49 * w;\n const angleConvert = 2 * Math.PI / 360;\n const hfac = 1 / 360;\n const sfac = 1 / this.r;\n let rgb;\n for (hue = 0; hue < 360; hue++) {\n for (sat = 0; sat < this.r; sat++) {\n x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue);\n y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue);\n rgb = HSVToRGB(hue * hfac, sat * sfac, 1);\n ctx.fillStyle = \"rgb(\" + rgb.r + \",\" + rgb.g + \",\" + rgb.b + \")\";\n ctx.fillRect(x - 0.5, y - 0.5, 2, 2);\n }\n }\n ctx.strokeStyle = \"rgba(0,0,0,1)\";\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.stroke();\n this.hueCircle = ctx.getImageData(0, 0, w, h);\n }\n this.generated = true;\n }\n\n /**\n * move the selector. This is called by hammer functions.\n * @param {Event} event The event\n * @private\n */\n _moveSelector(event) {\n const rect = this.colorPickerDiv.getBoundingClientRect();\n const left = event.center.x - rect.left;\n const top = event.center.y - rect.top;\n const centerY = 0.5 * this.colorPickerDiv.clientHeight;\n const centerX = 0.5 * this.colorPickerDiv.clientWidth;\n const x = left - centerX;\n const y = top - centerY;\n const angle = Math.atan2(x, y);\n const radius = 0.98 * Math.min(Math.sqrt(x * x + y * y), centerX);\n const newTop = Math.cos(angle) * radius + centerY;\n const newLeft = Math.sin(angle) * radius + centerX;\n this.colorPickerSelector.style.top = newTop - 0.5 * this.colorPickerSelector.clientHeight + \"px\";\n this.colorPickerSelector.style.left = newLeft - 0.5 * this.colorPickerSelector.clientWidth + \"px\";\n\n // set color\n let h = angle / (2 * Math.PI);\n h = h < 0 ? h + 1 : h;\n const s = radius / this.r;\n const hsv = RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.h = h;\n hsv.s = s;\n const rgba = HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba[\"a\"] = this.color.a;\n this.color = rgba;\n\n // update previews\n this.initialColorDiv.style.backgroundColor = \"rgba(\" + this.initialColor.r + \",\" + this.initialColor.g + \",\" + this.initialColor.b + \",\" + this.initialColor.a + \")\";\n this.newColorDiv.style.backgroundColor = \"rgba(\" + this.color.r + \",\" + this.color.g + \",\" + this.color.b + \",\" + this.color.a + \")\";\n }\n};\n\n/**\n * Wrap given text (last argument) in HTML elements (all preceding arguments).\n * @param {...any} rest - List of tag names followed by inner text.\n * @returns An element or a text node.\n */\nfunction wrapInTag() {\n for (var _len5 = arguments.length, rest = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n rest[_key5] = arguments[_key5];\n }\n if (rest.length < 1) {\n throw new TypeError(\"Invalid arguments.\");\n } else if (rest.length === 1) {\n return document.createTextNode(rest[0]);\n } else {\n const element = document.createElement(rest[0]);\n element.appendChild(wrapInTag(..._sliceInstanceProperty(rest).call(rest, 1)));\n return element;\n }\n}\n\n/**\n * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options.\n * Boolean options are recognised as Boolean\n * Number options should be written as array: [default value, min value, max value, stepsize]\n * Colors should be written as array: ['color', '#ffffff']\n * Strings with should be written as array: [option1, option2, option3, ..]\n *\n * The options are matched with their counterparts in each of the modules and the values used in the configuration are\n */\nlet Configurator$1 = class Configurator {\n /**\n * @param {object} parentModule | the location where parentModule.setOptions() can be called\n * @param {object} defaultContainer | the default container of the module\n * @param {object} configureOptions | the fully configured and predefined options set found in allOptions.js\n * @param {number} pixelRatio | canvas pixel ratio\n * @param {Function} hideOption | custom logic to dynamically hide options\n */\n constructor(parentModule, defaultContainer, configureOptions) {\n let pixelRatio = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n let hideOption = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : () => false;\n this.parent = parentModule;\n this.changedOptions = [];\n this.container = defaultContainer;\n this.allowCreation = false;\n this.hideOption = hideOption;\n this.options = {};\n this.initialized = false;\n this.popupCounter = 0;\n this.defaultOptions = {\n enabled: false,\n filter: true,\n container: undefined,\n showButton: true\n };\n _Object$assign(this.options, this.defaultOptions);\n this.configureOptions = configureOptions;\n this.moduleOptions = {};\n this.domElements = [];\n this.popupDiv = {};\n this.popupLimit = 5;\n this.popupHistory = {};\n this.colorPicker = new ColorPicker$1(pixelRatio);\n this.wrapper = undefined;\n }\n\n /**\n * refresh all options.\n * Because all modules parse their options by themselves, we just use their options. We copy them here.\n * @param {object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // reset the popup history because the indices may have been changed.\n this.popupHistory = {};\n this._removePopup();\n let enabled = true;\n if (typeof options === \"string\") {\n this.options.filter = options;\n } else if (_Array$isArray(options)) {\n this.options.filter = options.join();\n } else if (typeof options === \"object\") {\n if (options == null) {\n throw new TypeError(\"options cannot be null\");\n }\n if (options.container !== undefined) {\n this.options.container = options.container;\n }\n if (_filterInstanceProperty(options) !== undefined) {\n this.options.filter = _filterInstanceProperty(options);\n }\n if (options.showButton !== undefined) {\n this.options.showButton = options.showButton;\n }\n if (options.enabled !== undefined) {\n enabled = options.enabled;\n }\n } else if (typeof options === \"boolean\") {\n this.options.filter = true;\n enabled = options;\n } else if (typeof options === \"function\") {\n this.options.filter = options;\n enabled = true;\n }\n if (_filterInstanceProperty(this.options) === false) {\n enabled = false;\n }\n this.options.enabled = enabled;\n }\n this._clean();\n }\n\n /**\n *\n * @param {object} moduleOptions\n */\n setModuleOptions(moduleOptions) {\n this.moduleOptions = moduleOptions;\n if (this.options.enabled === true) {\n this._clean();\n if (this.options.container !== undefined) {\n this.container = this.options.container;\n }\n this._create();\n }\n }\n\n /**\n * Create all DOM elements\n * @private\n */\n _create() {\n this._clean();\n this.changedOptions = [];\n const filter = _filterInstanceProperty(this.options);\n let counter = 0;\n let show = false;\n for (const option in this.configureOptions) {\n if (Object.prototype.hasOwnProperty.call(this.configureOptions, option)) {\n this.allowCreation = false;\n show = false;\n if (typeof filter === \"function\") {\n show = filter(option, []);\n show = show || this._handleObject(this.configureOptions[option], [option], true);\n } else if (filter === true || _indexOfInstanceProperty(filter).call(filter, option) !== -1) {\n show = true;\n }\n if (show !== false) {\n this.allowCreation = true;\n\n // linebreak between categories\n if (counter > 0) {\n this._makeItem([]);\n }\n // a header for the category\n this._makeHeader(option);\n\n // get the sub options\n this._handleObject(this.configureOptions[option], [option]);\n }\n counter++;\n }\n }\n this._makeButton();\n this._push();\n //~ this.colorPicker.insertTo(this.container);\n }\n\n /**\n * draw all DOM elements on the screen\n * @private\n */\n _push() {\n this.wrapper = document.createElement(\"div\");\n this.wrapper.className = \"vis-configuration-wrapper\";\n this.container.appendChild(this.wrapper);\n for (let i = 0; i < this.domElements.length; i++) {\n this.wrapper.appendChild(this.domElements[i]);\n }\n this._showPopupIfNeeded();\n }\n\n /**\n * delete all DOM elements\n * @private\n */\n _clean() {\n for (let i = 0; i < this.domElements.length; i++) {\n this.wrapper.removeChild(this.domElements[i]);\n }\n if (this.wrapper !== undefined) {\n this.container.removeChild(this.wrapper);\n this.wrapper = undefined;\n }\n this.domElements = [];\n this._removePopup();\n }\n\n /**\n * get the value from the actualOptions if it exists\n * @param {Array} path | where to look for the actual option\n * @returns {*}\n * @private\n */\n _getValue(path) {\n let base = this.moduleOptions;\n for (let i = 0; i < path.length; i++) {\n if (base[path[i]] !== undefined) {\n base = base[path[i]];\n } else {\n base = undefined;\n break;\n }\n }\n return base;\n }\n\n /**\n * all option elements are wrapped in an item\n * @param {Array} path | where to look for the actual option\n * @param {Array.<Element>} domElements\n * @returns {number}\n * @private\n */\n _makeItem(path) {\n if (this.allowCreation === true) {\n const item = document.createElement(\"div\");\n item.className = \"vis-configuration vis-config-item vis-config-s\" + path.length;\n for (var _len6 = arguments.length, domElements = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {\n domElements[_key6 - 1] = arguments[_key6];\n }\n _forEachInstanceProperty(domElements).call(domElements, element => {\n item.appendChild(element);\n });\n this.domElements.push(item);\n return this.domElements.length;\n }\n return 0;\n }\n\n /**\n * header for major subjects\n * @param {string} name\n * @private\n */\n _makeHeader(name) {\n const div = document.createElement(\"div\");\n div.className = \"vis-configuration vis-config-header\";\n div.innerText = name;\n this._makeItem([], div);\n }\n\n /**\n * make a label, if it is an object label, it gets different styling.\n * @param {string} name\n * @param {Array} path | where to look for the actual option\n * @param {string} objectLabel\n * @returns {HTMLElement}\n * @private\n */\n _makeLabel(name, path) {\n let objectLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n const div = document.createElement(\"div\");\n div.className = \"vis-configuration vis-config-label vis-config-s\" + path.length;\n if (objectLabel === true) {\n while (div.firstChild) {\n div.removeChild(div.firstChild);\n }\n div.appendChild(wrapInTag(\"i\", \"b\", name));\n } else {\n div.innerText = name + \":\";\n }\n return div;\n }\n\n /**\n * make a dropdown list for multiple possible string optoins\n * @param {Array.<number>} arr\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _makeDropdown(arr, value, path) {\n const select = document.createElement(\"select\");\n select.className = \"vis-configuration vis-config-select\";\n let selectedValue = 0;\n if (value !== undefined) {\n if (_indexOfInstanceProperty(arr).call(arr, value) !== -1) {\n selectedValue = _indexOfInstanceProperty(arr).call(arr, value);\n }\n }\n for (let i = 0; i < arr.length; i++) {\n const option = document.createElement(\"option\");\n option.value = arr[i];\n if (i === selectedValue) {\n option.selected = \"selected\";\n }\n option.innerText = arr[i];\n select.appendChild(option);\n }\n const me = this;\n select.onchange = function () {\n me._update(this.value, path);\n };\n const label = this._makeLabel(path[path.length - 1], path);\n this._makeItem(path, label, select);\n }\n\n /**\n * make a range object for numeric options\n * @param {Array.<number>} arr\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _makeRange(arr, value, path) {\n const defaultValue = arr[0];\n const min = arr[1];\n const max = arr[2];\n const step = arr[3];\n const range = document.createElement(\"input\");\n range.className = \"vis-configuration vis-config-range\";\n try {\n range.type = \"range\"; // not supported on IE9\n range.min = min;\n range.max = max;\n } catch (err) {\n // TODO: Add some error handling.\n }\n range.step = step;\n\n // set up the popup settings in case they are needed.\n let popupString = \"\";\n let popupValue = 0;\n if (value !== undefined) {\n const factor = 1.2;\n if (value < 0 && value * factor < min) {\n range.min = Math.ceil(value * factor);\n popupValue = range.min;\n popupString = \"range increased\";\n } else if (value / factor < min) {\n range.min = Math.ceil(value / factor);\n popupValue = range.min;\n popupString = \"range increased\";\n }\n if (value * factor > max && max !== 1) {\n range.max = Math.ceil(value * factor);\n popupValue = range.max;\n popupString = \"range increased\";\n }\n range.value = value;\n } else {\n range.value = defaultValue;\n }\n const input = document.createElement(\"input\");\n input.className = \"vis-configuration vis-config-rangeinput\";\n input.value = range.value;\n const me = this;\n range.onchange = function () {\n input.value = this.value;\n me._update(Number(this.value), path);\n };\n range.oninput = function () {\n input.value = this.value;\n };\n const label = this._makeLabel(path[path.length - 1], path);\n const itemIndex = this._makeItem(path, label, range, input);\n\n // if a popup is needed AND it has not been shown for this value, show it.\n if (popupString !== \"\" && this.popupHistory[itemIndex] !== popupValue) {\n this.popupHistory[itemIndex] = popupValue;\n this._setupPopup(popupString, itemIndex);\n }\n }\n\n /**\n * make a button object\n * @private\n */\n _makeButton() {\n if (this.options.showButton === true) {\n const generateButton = document.createElement(\"div\");\n generateButton.className = \"vis-configuration vis-config-button\";\n generateButton.innerText = \"generate options\";\n generateButton.onclick = () => {\n this._printOptions();\n };\n generateButton.onmouseover = () => {\n generateButton.className = \"vis-configuration vis-config-button hover\";\n };\n generateButton.onmouseout = () => {\n generateButton.className = \"vis-configuration vis-config-button\";\n };\n this.optionsContainer = document.createElement(\"div\");\n this.optionsContainer.className = \"vis-configuration vis-config-option-container\";\n this.domElements.push(this.optionsContainer);\n this.domElements.push(generateButton);\n }\n }\n\n /**\n * prepare the popup\n * @param {string} string\n * @param {number} index\n * @private\n */\n _setupPopup(string, index) {\n if (this.initialized === true && this.allowCreation === true && this.popupCounter < this.popupLimit) {\n const div = document.createElement(\"div\");\n div.id = \"vis-configuration-popup\";\n div.className = \"vis-configuration-popup\";\n div.innerText = string;\n div.onclick = () => {\n this._removePopup();\n };\n this.popupCounter += 1;\n this.popupDiv = {\n html: div,\n index: index\n };\n }\n }\n\n /**\n * remove the popup from the dom\n * @private\n */\n _removePopup() {\n if (this.popupDiv.html !== undefined) {\n this.popupDiv.html.parentNode.removeChild(this.popupDiv.html);\n clearTimeout(this.popupDiv.hideTimeout);\n clearTimeout(this.popupDiv.deleteTimeout);\n this.popupDiv = {};\n }\n }\n\n /**\n * Show the popup if it is needed.\n * @private\n */\n _showPopupIfNeeded() {\n if (this.popupDiv.html !== undefined) {\n const correspondingElement = this.domElements[this.popupDiv.index];\n const rect = correspondingElement.getBoundingClientRect();\n this.popupDiv.html.style.left = rect.left + \"px\";\n this.popupDiv.html.style.top = rect.top - 30 + \"px\"; // 30 is the height;\n document.body.appendChild(this.popupDiv.html);\n this.popupDiv.hideTimeout = _setTimeout(() => {\n this.popupDiv.html.style.opacity = 0;\n }, 1500);\n this.popupDiv.deleteTimeout = _setTimeout(() => {\n this._removePopup();\n }, 1800);\n }\n }\n\n /**\n * make a checkbox for boolean options.\n * @param {number} defaultValue\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _makeCheckbox(defaultValue, value, path) {\n const checkbox = document.createElement(\"input\");\n checkbox.type = \"checkbox\";\n checkbox.className = \"vis-configuration vis-config-checkbox\";\n checkbox.checked = defaultValue;\n if (value !== undefined) {\n checkbox.checked = value;\n if (value !== defaultValue) {\n if (typeof defaultValue === \"object\") {\n if (value !== defaultValue.enabled) {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n } else {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n }\n }\n const me = this;\n checkbox.onchange = function () {\n me._update(this.checked, path);\n };\n const label = this._makeLabel(path[path.length - 1], path);\n this._makeItem(path, label, checkbox);\n }\n\n /**\n * make a text input field for string options.\n * @param {number} defaultValue\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _makeTextInput(defaultValue, value, path) {\n const checkbox = document.createElement(\"input\");\n checkbox.type = \"text\";\n checkbox.className = \"vis-configuration vis-config-text\";\n checkbox.value = value;\n if (value !== defaultValue) {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n const me = this;\n checkbox.onchange = function () {\n me._update(this.value, path);\n };\n const label = this._makeLabel(path[path.length - 1], path);\n this._makeItem(path, label, checkbox);\n }\n\n /**\n * make a color field with a color picker for color fields\n * @param {Array.<number>} arr\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _makeColorField(arr, value, path) {\n const defaultColor = arr[1];\n const div = document.createElement(\"div\");\n value = value === undefined ? defaultColor : value;\n if (value !== \"none\") {\n div.className = \"vis-configuration vis-config-colorBlock\";\n div.style.backgroundColor = value;\n } else {\n div.className = \"vis-configuration vis-config-colorBlock none\";\n }\n value = value === undefined ? defaultColor : value;\n div.onclick = () => {\n this._showColorPicker(value, div, path);\n };\n const label = this._makeLabel(path[path.length - 1], path);\n this._makeItem(path, label, div);\n }\n\n /**\n * used by the color buttons to call the color picker.\n * @param {number} value\n * @param {HTMLElement} div\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _showColorPicker(value, div, path) {\n // clear the callback from this div\n div.onclick = function () {};\n this.colorPicker.insertTo(div);\n this.colorPicker.show();\n this.colorPicker.setColor(value);\n this.colorPicker.setUpdateCallback(color => {\n const colorString = \"rgba(\" + color.r + \",\" + color.g + \",\" + color.b + \",\" + color.a + \")\";\n div.style.backgroundColor = colorString;\n this._update(colorString, path);\n });\n\n // on close of the colorpicker, restore the callback.\n this.colorPicker.setCloseCallback(() => {\n div.onclick = () => {\n this._showColorPicker(value, div, path);\n };\n });\n }\n\n /**\n * parse an object and draw the correct items\n * @param {object} obj\n * @param {Array} [path] | where to look for the actual option\n * @param {boolean} [checkOnly]\n * @returns {boolean}\n * @private\n */\n _handleObject(obj) {\n let path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n let checkOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let show = false;\n const filter = _filterInstanceProperty(this.options);\n let visibleInSet = false;\n for (const subObj in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, subObj)) {\n show = true;\n const item = obj[subObj];\n const newPath = copyAndExtendArray(path, subObj);\n if (typeof filter === \"function\") {\n show = filter(subObj, path);\n\n // if needed we must go deeper into the object.\n if (show === false) {\n if (!_Array$isArray(item) && typeof item !== \"string\" && typeof item !== \"boolean\" && item instanceof Object) {\n this.allowCreation = false;\n show = this._handleObject(item, newPath, true);\n this.allowCreation = checkOnly === false;\n }\n }\n }\n if (show !== false) {\n visibleInSet = true;\n const value = this._getValue(newPath);\n if (_Array$isArray(item)) {\n this._handleArray(item, value, newPath);\n } else if (typeof item === \"string\") {\n this._makeTextInput(item, value, newPath);\n } else if (typeof item === \"boolean\") {\n this._makeCheckbox(item, value, newPath);\n } else if (item instanceof Object) {\n // skip the options that are not enabled\n if (!this.hideOption(path, subObj, this.moduleOptions)) {\n // initially collapse options with an disabled enabled option.\n if (item.enabled !== undefined) {\n const enabledPath = copyAndExtendArray(newPath, \"enabled\");\n const enabledValue = this._getValue(enabledPath);\n if (enabledValue === true) {\n const label = this._makeLabel(subObj, newPath, true);\n this._makeItem(newPath, label);\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n } else {\n this._makeCheckbox(item, enabledValue, newPath);\n }\n } else {\n const label = this._makeLabel(subObj, newPath, true);\n this._makeItem(newPath, label);\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n }\n }\n } else {\n console.error(\"dont know how to handle\", item, subObj, newPath);\n }\n }\n }\n }\n return visibleInSet;\n }\n\n /**\n * handle the array type of option\n * @param {Array.<number>} arr\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _handleArray(arr, value, path) {\n if (typeof arr[0] === \"string\" && arr[0] === \"color\") {\n this._makeColorField(arr, value, path);\n if (arr[1] !== value) {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n } else if (typeof arr[0] === \"string\") {\n this._makeDropdown(arr, value, path);\n if (arr[0] !== value) {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n } else if (typeof arr[0] === \"number\") {\n this._makeRange(arr, value, path);\n if (arr[0] !== value) {\n this.changedOptions.push({\n path: path,\n value: Number(value)\n });\n }\n }\n }\n\n /**\n * called to update the network with the new settings.\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _update(value, path) {\n const options = this._constructOptions(value, path);\n if (this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit) {\n this.parent.body.emitter.emit(\"configChange\", options);\n }\n this.initialized = true;\n this.parent.setOptions(options);\n }\n\n /**\n *\n * @param {string | boolean} value\n * @param {Array.<string>} path\n * @param {{}} optionsObj\n * @returns {{}}\n * @private\n */\n _constructOptions(value, path) {\n let optionsObj = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n let pointer = optionsObj;\n\n // when dropdown boxes can be string or boolean, we typecast it into correct types\n value = value === \"true\" ? true : value;\n value = value === \"false\" ? false : value;\n for (let i = 0; i < path.length; i++) {\n if (path[i] !== \"global\") {\n if (pointer[path[i]] === undefined) {\n pointer[path[i]] = {};\n }\n if (i !== path.length - 1) {\n pointer = pointer[path[i]];\n } else {\n pointer[path[i]] = value;\n }\n }\n }\n return optionsObj;\n }\n\n /**\n * @private\n */\n _printOptions() {\n const options = this.getOptions();\n while (this.optionsContainer.firstChild) {\n this.optionsContainer.removeChild(this.optionsContainer.firstChild);\n }\n this.optionsContainer.appendChild(wrapInTag(\"pre\", \"const options = \" + _JSON$stringify(options, null, 2)));\n }\n\n /**\n *\n * @returns {{}} options\n */\n getOptions() {\n const options = {};\n for (let i = 0; i < this.changedOptions.length; i++) {\n this._constructOptions(this.changedOptions[i].value, this.changedOptions[i].path, options);\n }\n return options;\n }\n};\n\n/**\n * Popup is a class to create a popup window with some text\n */\nlet Popup$1 = class Popup {\n /**\n * @param {Element} container The container object.\n * @param {string} overflowMethod How the popup should act to overflowing ('flip' or 'cap')\n */\n constructor(container, overflowMethod) {\n this.container = container;\n this.overflowMethod = overflowMethod || \"cap\";\n this.x = 0;\n this.y = 0;\n this.padding = 5;\n this.hidden = false;\n\n // create the frame\n this.frame = document.createElement(\"div\");\n this.frame.className = \"vis-tooltip\";\n this.container.appendChild(this.frame);\n }\n\n /**\n * @param {number} x Horizontal position of the popup window\n * @param {number} y Vertical position of the popup window\n */\n setPosition(x, y) {\n this.x = _parseInt(x);\n this.y = _parseInt(y);\n }\n\n /**\n * Set the content for the popup window. This can be HTML code or text.\n * @param {string | Element} content\n */\n setText(content) {\n if (content instanceof Element) {\n while (this.frame.firstChild) {\n this.frame.removeChild(this.frame.firstChild);\n }\n this.frame.appendChild(content);\n } else {\n // String containing literal text, element has to be used for HTML due to\n // XSS risks associated with innerHTML (i.e. prevent XSS by accident).\n this.frame.innerText = content;\n }\n }\n\n /**\n * Show the popup window\n * @param {boolean} [doShow] Show or hide the window\n */\n show(doShow) {\n if (doShow === undefined) {\n doShow = true;\n }\n if (doShow === true) {\n const height = this.frame.clientHeight;\n const width = this.frame.clientWidth;\n const maxHeight = this.frame.parentNode.clientHeight;\n const maxWidth = this.frame.parentNode.clientWidth;\n let left = 0,\n top = 0;\n if (this.overflowMethod == \"flip\") {\n let isLeft = false,\n isTop = true; // Where around the position it's located\n\n if (this.y - height < this.padding) {\n isTop = false;\n }\n if (this.x + width > maxWidth - this.padding) {\n isLeft = true;\n }\n if (isLeft) {\n left = this.x - width;\n } else {\n left = this.x;\n }\n if (isTop) {\n top = this.y - height;\n } else {\n top = this.y;\n }\n } else {\n top = this.y - height;\n if (top + height + this.padding > maxHeight) {\n top = maxHeight - height - this.padding;\n }\n if (top < this.padding) {\n top = this.padding;\n }\n left = this.x;\n if (left + width + this.padding > maxWidth) {\n left = maxWidth - width - this.padding;\n }\n if (left < this.padding) {\n left = this.padding;\n }\n }\n this.frame.style.left = left + \"px\";\n this.frame.style.top = top + \"px\";\n this.frame.style.visibility = \"visible\";\n this.hidden = false;\n } else {\n this.hide();\n }\n }\n\n /**\n * Hide the popup window\n */\n hide() {\n this.hidden = true;\n this.frame.style.left = \"0\";\n this.frame.style.top = \"0\";\n this.frame.style.visibility = \"hidden\";\n }\n\n /**\n * Remove the popup window\n */\n destroy() {\n this.frame.parentNode.removeChild(this.frame); // Remove element from DOM\n }\n};\nlet errorFound = false;\nlet allOptions$1;\nconst VALIDATOR_PRINT_STYLE$1 = \"background: #FFeeee; color: #dd0000\";\n\n/**\n * Used to validate options.\n */\nlet Validator$1 = class Validator {\n /**\n * Main function to be called\n * @param {object} options\n * @param {object} referenceOptions\n * @param {object} subObject\n * @returns {boolean}\n * @static\n */\n static validate(options, referenceOptions, subObject) {\n errorFound = false;\n allOptions$1 = referenceOptions;\n let usedOptions = referenceOptions;\n if (subObject !== undefined) {\n usedOptions = referenceOptions[subObject];\n }\n Validator.parse(options, usedOptions, []);\n return errorFound;\n }\n\n /**\n * Will traverse an object recursively and check every value\n * @param {object} options\n * @param {object} referenceOptions\n * @param {Array} path | where to look for the actual option\n * @static\n */\n static parse(options, referenceOptions, path) {\n for (const option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option)) {\n Validator.check(option, options, referenceOptions, path);\n }\n }\n }\n\n /**\n * Check every value. If the value is an object, call the parse function on that object.\n * @param {string} option\n * @param {object} options\n * @param {object} referenceOptions\n * @param {Array} path | where to look for the actual option\n * @static\n */\n static check(option, options, referenceOptions, path) {\n if (referenceOptions[option] === undefined && referenceOptions.__any__ === undefined) {\n Validator.getSuggestion(option, referenceOptions, path);\n return;\n }\n let referenceOption = option;\n let is_object = true;\n if (referenceOptions[option] === undefined && referenceOptions.__any__ !== undefined) {\n // NOTE: This only triggers if the __any__ is in the top level of the options object.\n // THAT'S A REALLY BAD PLACE TO ALLOW IT!!!!\n // TODO: Examine if needed, remove if possible\n\n // __any__ is a wildcard. Any value is accepted and will be further analysed by reference.\n referenceOption = \"__any__\";\n\n // if the any-subgroup is not a predefined object in the configurator,\n // we do not look deeper into the object.\n is_object = Validator.getType(options[option]) === \"object\";\n }\n let refOptionObj = referenceOptions[referenceOption];\n if (is_object && refOptionObj.__type__ !== undefined) {\n refOptionObj = refOptionObj.__type__;\n }\n Validator.checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path);\n }\n\n /**\n *\n * @param {string} option | the option property\n * @param {object} options | The supplied options object\n * @param {object} referenceOptions | The reference options containing all options and their allowed formats\n * @param {string} referenceOption | Usually this is the same as option, except when handling an __any__ tag.\n * @param {string} refOptionObj | This is the type object from the reference options\n * @param {Array} path | where in the object is the option\n * @static\n */\n static checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path) {\n const log = function (message) {\n console.error(\"%c\" + message + Validator.printLocation(path, option), VALIDATOR_PRINT_STYLE$1);\n };\n const optionType = Validator.getType(options[option]);\n const refOptionType = refOptionObj[optionType];\n if (refOptionType !== undefined) {\n // if the type is correct, we check if it is supposed to be one of a few select values\n if (Validator.getType(refOptionType) === \"array\" && _indexOfInstanceProperty(refOptionType).call(refOptionType, options[option]) === -1) {\n log('Invalid option detected in \"' + option + '\".' + \" Allowed values are:\" + Validator.print(refOptionType) + ' not \"' + options[option] + '\". ');\n errorFound = true;\n } else if (optionType === \"object\" && referenceOption !== \"__any__\") {\n path = copyAndExtendArray(path, option);\n Validator.parse(options[option], referenceOptions[referenceOption], path);\n }\n } else if (refOptionObj[\"any\"] === undefined) {\n // type of the field is incorrect and the field cannot be any\n log('Invalid type received for \"' + option + '\". Expected: ' + Validator.print(_Object$keys(refOptionObj)) + \". Received [\" + optionType + '] \"' + options[option] + '\"');\n errorFound = true;\n }\n }\n\n /**\n *\n * @param {object | boolean | number | string | Array.<number> | Date | Node | Moment | undefined | null} object\n * @returns {string}\n * @static\n */\n static getType(object) {\n const type = typeof object;\n if (type === \"object\") {\n if (object === null) {\n return \"null\";\n }\n if (object instanceof Boolean) {\n return \"boolean\";\n }\n if (object instanceof Number) {\n return \"number\";\n }\n if (object instanceof String) {\n return \"string\";\n }\n if (_Array$isArray(object)) {\n return \"array\";\n }\n if (object instanceof Date) {\n return \"date\";\n }\n if (object.nodeType !== undefined) {\n return \"dom\";\n }\n if (object._isAMomentObject === true) {\n return \"moment\";\n }\n return \"object\";\n } else if (type === \"number\") {\n return \"number\";\n } else if (type === \"boolean\") {\n return \"boolean\";\n } else if (type === \"string\") {\n return \"string\";\n } else if (type === undefined) {\n return \"undefined\";\n }\n return type;\n }\n\n /**\n * @param {string} option\n * @param {object} options\n * @param {Array.<string>} path\n * @static\n */\n static getSuggestion(option, options, path) {\n const localSearch = Validator.findInOptions(option, options, path, false);\n const globalSearch = Validator.findInOptions(option, allOptions$1, [], true);\n const localSearchThreshold = 8;\n const globalSearchThreshold = 4;\n let msg;\n if (localSearch.indexMatch !== undefined) {\n msg = \" in \" + Validator.printLocation(localSearch.path, option, \"\") + 'Perhaps it was incomplete? Did you mean: \"' + localSearch.indexMatch + '\"?\\n\\n';\n } else if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) {\n msg = \" in \" + Validator.printLocation(localSearch.path, option, \"\") + \"Perhaps it was misplaced? Matching option found at: \" + Validator.printLocation(globalSearch.path, globalSearch.closestMatch, \"\");\n } else if (localSearch.distance <= localSearchThreshold) {\n msg = '. Did you mean \"' + localSearch.closestMatch + '\"?' + Validator.printLocation(localSearch.path, option);\n } else {\n msg = \". Did you mean one of these: \" + Validator.print(_Object$keys(options)) + Validator.printLocation(path, option);\n }\n console.error('%cUnknown option detected: \"' + option + '\"' + msg, VALIDATOR_PRINT_STYLE$1);\n errorFound = true;\n }\n\n /**\n * traverse the options in search for a match.\n * @param {string} option\n * @param {object} options\n * @param {Array} path | where to look for the actual option\n * @param {boolean} [recursive]\n * @returns {{closestMatch: string, path: Array, distance: number}}\n * @static\n */\n static findInOptions(option, options, path) {\n let recursive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n let min = 1e9;\n let closestMatch = \"\";\n let closestMatchPath = [];\n const lowerCaseOption = option.toLowerCase();\n let indexMatch = undefined;\n for (const op in options) {\n let distance;\n if (options[op].__type__ !== undefined && recursive === true) {\n const result = Validator.findInOptions(option, options[op], copyAndExtendArray(path, op));\n if (min > result.distance) {\n closestMatch = result.closestMatch;\n closestMatchPath = result.path;\n min = result.distance;\n indexMatch = result.indexMatch;\n }\n } else {\n var _context1;\n if (_indexOfInstanceProperty(_context1 = op.toLowerCase()).call(_context1, lowerCaseOption) !== -1) {\n indexMatch = op;\n }\n distance = Validator.levenshteinDistance(option, op);\n if (min > distance) {\n closestMatch = op;\n closestMatchPath = copyArray(path);\n min = distance;\n }\n }\n }\n return {\n closestMatch: closestMatch,\n path: closestMatchPath,\n distance: min,\n indexMatch: indexMatch\n };\n }\n\n /**\n * @param {Array.<string>} path\n * @param {object} option\n * @param {string} prefix\n * @returns {string}\n * @static\n */\n static printLocation(path, option) {\n let prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"Problem value found at: \\n\";\n let str = \"\\n\\n\" + prefix + \"options = {\\n\";\n for (let i = 0; i < path.length; i++) {\n for (let j = 0; j < i + 1; j++) {\n str += \" \";\n }\n str += path[i] + \": {\\n\";\n }\n for (let j = 0; j < path.length + 1; j++) {\n str += \" \";\n }\n str += option + \"\\n\";\n for (let i = 0; i < path.length + 1; i++) {\n for (let j = 0; j < path.length - i; j++) {\n str += \" \";\n }\n str += \"}\\n\";\n }\n return str + \"\\n\\n\";\n }\n\n /**\n * @param {object} options\n * @returns {string}\n * @static\n */\n static print(options) {\n return _JSON$stringify(options).replace(/(\")|(\\[)|(\\])|(,\"__type__\")/g, \"\").replace(/(,)/g, \", \");\n }\n\n /**\n * Compute the edit distance between the two given strings\n * http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript\n *\n * Copyright (c) 2011 Andrei Mackenzie\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @param {string} a\n * @param {string} b\n * @returns {Array.<Array.<number>>}}\n * @static\n */\n static levenshteinDistance(a, b) {\n if (a.length === 0) return b.length;\n if (b.length === 0) return a.length;\n const matrix = [];\n\n // increment along the first column of each row\n let i;\n for (i = 0; i <= b.length; i++) {\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n let j;\n for (j = 0; j <= a.length; j++) {\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for (i = 1; i <= b.length; i++) {\n for (j = 1; j <= a.length; j++) {\n if (b.charAt(i - 1) == a.charAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1,\n // substitution\n Math.min(matrix[i][j - 1] + 1,\n // insertion\n matrix[i - 1][j] + 1)); // deletion\n }\n }\n }\n return matrix[b.length][a.length];\n }\n};\nconst Activator = Activator$1;\nconst Configurator = Configurator$1;\nconst Hammer = Hammer$1;\nconst Popup = Popup$1;\nconst VALIDATOR_PRINT_STYLE = VALIDATOR_PRINT_STYLE$1;\nconst Validator = Validator$1;\n\n/* eslint-disable no-prototype-builtins */\n/* eslint-disable no-unused-vars */\n/* eslint-disable no-var */\n\n/**\n * Parse a text source containing data in DOT language into a JSON object.\n * The object contains two lists: one with nodes and one with edges.\n *\n * DOT language reference: http://www.graphviz.org/doc/info/lang.html\n *\n * DOT language attributes: http://graphviz.org/content/attrs\n * @param {string} data Text containing a graph in DOT-notation\n * @returns {object} graph An object containing two parameters:\n * {Object[]} nodes\n * {Object[]} edges\n *\n * -------------------------------------------\n * TODO\n * ====\n *\n * For label handling, this is an incomplete implementation. From docs (quote #3015):\n *\n * > the escape sequences \"\\n\", \"\\l\" and \"\\r\" divide the label into lines, centered,\n * > left-justified, and right-justified, respectively.\n *\n * Source: http://www.graphviz.org/content/attrs#kescString\n *\n * > As another aid for readability, dot allows double-quoted strings to span multiple physical\n * > lines using the standard C convention of a backslash immediately preceding a newline\n * > character\n * > In addition, double-quoted strings can be concatenated using a '+' operator.\n * > As HTML strings can contain newline characters, which are used solely for formatting,\n * > the language does not allow escaped newlines or concatenation operators to be used\n * > within them.\n *\n * - Currently, only '\\\\n' is handled\n * - Note that text explicitly says 'labels'; the dot parser currently handles escape\n * sequences in **all** strings.\n */\nfunction parseDOT(data) {\n dot = data;\n return parseGraph();\n}\n\n// mapping of attributes from DOT (the keys) to vis.js (the values)\nvar NODE_ATTR_MAPPING = {\n fontsize: \"font.size\",\n fontcolor: \"font.color\",\n labelfontcolor: \"font.color\",\n fontname: \"font.face\",\n color: [\"color.border\", \"color.background\"],\n fillcolor: \"color.background\",\n tooltip: \"title\",\n labeltooltip: \"title\"\n};\nvar EDGE_ATTR_MAPPING = _Object$create(NODE_ATTR_MAPPING);\nEDGE_ATTR_MAPPING.color = \"color.color\";\nEDGE_ATTR_MAPPING.style = \"dashes\";\n\n// token types enumeration\nvar TOKENTYPE = {\n NULL: 0,\n DELIMITER: 1,\n IDENTIFIER: 2,\n UNKNOWN: 3\n};\n\n// map with all delimiters\nvar DELIMITERS = {\n \"{\": true,\n \"}\": true,\n \"[\": true,\n \"]\": true,\n \";\": true,\n \"=\": true,\n \",\": true,\n \"->\": true,\n \"--\": true\n};\nvar dot = \"\"; // current dot file\nvar index = 0; // current index in dot file\nvar c = \"\"; // current token character in expr\nvar token = \"\"; // current token\nvar tokenType = TOKENTYPE.NULL; // type of the token\n\n/**\n * Get the first character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\nfunction first() {\n index = 0;\n c = dot.charAt(0);\n}\n\n/**\n * Get the next character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\nfunction next() {\n index++;\n c = dot.charAt(index);\n}\n\n/**\n * Preview the next character from the dot file.\n * @returns {string} cNext\n */\nfunction nextPreview() {\n return dot.charAt(index + 1);\n}\n\n/**\n * Test whether given character is alphabetic or numeric ( a-zA-Z_0-9.:# )\n * @param {string} c\n * @returns {boolean} isAlphaNumeric\n */\nfunction isAlphaNumeric(c) {\n var charCode = c.charCodeAt(0);\n if (charCode < 47) {\n // #.\n return charCode === 35 || charCode === 46;\n }\n if (charCode < 59) {\n // 0-9 and :\n return charCode > 47;\n }\n if (charCode < 91) {\n // A-Z\n return charCode > 64;\n }\n if (charCode < 96) {\n // _\n return charCode === 95;\n }\n if (charCode < 123) {\n // a-z\n return charCode > 96;\n }\n return false;\n}\n\n/**\n * Merge all options of object b into object b\n * @param {object} a\n * @param {object} b\n * @returns {object} a\n */\nfunction merge(a, b) {\n if (!a) {\n a = {};\n }\n if (b) {\n for (var name in b) {\n if (b.hasOwnProperty(name)) {\n a[name] = b[name];\n }\n }\n }\n return a;\n}\n\n/**\n * Set a value in an object, where the provided parameter name can be a\n * path with nested parameters. For example:\n *\n * var obj = {a: 2};\n * setValue(obj, 'b.c', 3); // obj = {a: 2, b: {c: 3}}\n * @param {object} obj\n * @param {string} path A parameter name or dot-separated parameter path,\n * like \"color.highlight.border\".\n * @param {*} value\n */\nfunction setValue(obj, path, value) {\n var keys = path.split(\".\");\n var o = obj;\n while (keys.length) {\n var key = keys.shift();\n if (keys.length) {\n // this isn't the end point\n if (!o[key]) {\n o[key] = {};\n }\n o = o[key];\n } else {\n // this is the end point\n o[key] = value;\n }\n }\n}\n\n/**\n * Add a node to a graph object. If there is already a node with\n * the same id, their attributes will be merged.\n * @param {object} graph\n * @param {object} node\n */\nfunction addNode(graph, node) {\n var i, len;\n var current = null;\n\n // find root graph (in case of subgraph)\n var graphs = [graph]; // list with all graphs from current graph to root graph\n var root = graph;\n while (root.parent) {\n graphs.push(root.parent);\n root = root.parent;\n }\n\n // find existing node (at root level) by its id\n if (root.nodes) {\n for (i = 0, len = root.nodes.length; i < len; i++) {\n if (node.id === root.nodes[i].id) {\n current = root.nodes[i];\n break;\n }\n }\n }\n if (!current) {\n // this is a new node\n current = {\n id: node.id\n };\n if (graph.node) {\n // clone default attributes\n current.attr = merge(current.attr, graph.node);\n }\n }\n\n // add node to this (sub)graph and all its parent graphs\n for (i = graphs.length - 1; i >= 0; i--) {\n var _context;\n var g = graphs[i];\n if (!g.nodes) {\n g.nodes = [];\n }\n if (_indexOfInstanceProperty(_context = g.nodes).call(_context, current) === -1) {\n g.nodes.push(current);\n }\n }\n\n // merge attributes\n if (node.attr) {\n current.attr = merge(current.attr, node.attr);\n }\n}\n\n/**\n * Add an edge to a graph object\n * @param {object} graph\n * @param {object} edge\n */\nfunction addEdge(graph, edge) {\n if (!graph.edges) {\n graph.edges = [];\n }\n graph.edges.push(edge);\n if (graph.edge) {\n var attr = merge({}, graph.edge); // clone default attributes\n edge.attr = merge(attr, edge.attr); // merge attributes\n }\n}\n\n/**\n * Create an edge to a graph object\n * @param {object} graph\n * @param {string | number | object} from\n * @param {string | number | object} to\n * @param {string} type\n * @param {object | null} attr\n * @returns {object} edge\n */\nfunction createEdge(graph, from, to, type, attr) {\n var edge = {\n from: from,\n to: to,\n type: type\n };\n if (graph.edge) {\n edge.attr = merge({}, graph.edge); // clone default attributes\n }\n edge.attr = merge(edge.attr || {}, attr); // merge attributes\n\n // Move arrows attribute from attr to edge temporally created in\n // parseAttributeList().\n if (attr != null) {\n if (attr.hasOwnProperty(\"arrows\") && attr[\"arrows\"] != null) {\n edge[\"arrows\"] = {\n to: {\n enabled: true,\n type: attr.arrows.type\n }\n };\n attr[\"arrows\"] = null;\n }\n }\n return edge;\n}\n\n/**\n * Get next token in the current dot file.\n * The token and token type are available as token and tokenType\n */\nfunction getToken() {\n tokenType = TOKENTYPE.NULL;\n token = \"\";\n\n // skip over whitespaces\n while (c === \" \" || c === \"\\t\" || c === \"\\n\" || c === \"\\r\") {\n // space, tab, enter\n next();\n }\n do {\n var isComment = false;\n\n // skip comment\n if (c === \"#\") {\n // find the previous non-space character\n var i = index - 1;\n while (dot.charAt(i) === \" \" || dot.charAt(i) === \"\\t\") {\n i--;\n }\n if (dot.charAt(i) === \"\\n\" || dot.charAt(i) === \"\") {\n // the # is at the start of a line, this is indeed a line comment\n while (c != \"\" && c != \"\\n\") {\n next();\n }\n isComment = true;\n }\n }\n if (c === \"/\" && nextPreview() === \"/\") {\n // skip line comment\n while (c != \"\" && c != \"\\n\") {\n next();\n }\n isComment = true;\n }\n if (c === \"/\" && nextPreview() === \"*\") {\n // skip block comment\n while (c != \"\") {\n if (c === \"*\" && nextPreview() === \"/\") {\n // end of block comment found. skip these last two characters\n next();\n next();\n break;\n } else {\n next();\n }\n }\n isComment = true;\n }\n\n // skip over whitespaces\n while (c === \" \" || c === \"\\t\" || c === \"\\n\" || c === \"\\r\") {\n // space, tab, enter\n next();\n }\n } while (isComment);\n\n // check for end of dot file\n if (c === \"\") {\n // token is still empty\n tokenType = TOKENTYPE.DELIMITER;\n return;\n }\n\n // check for delimiters consisting of 2 characters\n var c2 = c + nextPreview();\n if (DELIMITERS[c2]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c2;\n next();\n next();\n return;\n }\n\n // check for delimiters consisting of 1 character\n if (DELIMITERS[c]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c;\n next();\n return;\n }\n\n // check for an identifier (number or string)\n // TODO: more precise parsing of numbers/strings (and the port separator ':')\n if (isAlphaNumeric(c) || c === \"-\") {\n token += c;\n next();\n while (isAlphaNumeric(c)) {\n token += c;\n next();\n }\n if (token === \"false\") {\n token = false; // convert to boolean\n } else if (token === \"true\") {\n token = true; // convert to boolean\n } else if (!isNaN(Number(token))) {\n token = Number(token); // convert to number\n }\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // check for a string enclosed by double quotes\n if (c === '\"') {\n next();\n while (c != \"\" && (c != '\"' || c === '\"' && nextPreview() === '\"')) {\n if (c === '\"') {\n // skip the escape character\n token += c;\n next();\n } else if (c === \"\\\\\" && nextPreview() === \"n\") {\n // Honor a newline escape sequence\n token += \"\\n\";\n next();\n } else {\n token += c;\n }\n next();\n }\n if (c != '\"') {\n throw newSyntaxError('End of string \" expected');\n }\n next();\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // something unknown is found, wrong characters, a syntax error\n tokenType = TOKENTYPE.UNKNOWN;\n while (c != \"\") {\n token += c;\n next();\n }\n throw new SyntaxError('Syntax error in part \"' + chop(token, 30) + '\"');\n}\n\n/**\n * Parse a graph.\n * @returns {object} graph\n */\nfunction parseGraph() {\n var graph = {};\n first();\n getToken();\n\n // optional strict keyword\n if (token === \"strict\") {\n graph.strict = true;\n getToken();\n }\n\n // graph or digraph keyword\n if (token === \"graph\" || token === \"digraph\") {\n graph.type = token;\n getToken();\n }\n\n // optional graph id\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n graph.id = token;\n getToken();\n }\n\n // open angle bracket\n if (token != \"{\") {\n throw newSyntaxError(\"Angle bracket { expected\");\n }\n getToken();\n\n // statements\n parseStatements(graph);\n\n // close angle bracket\n if (token != \"}\") {\n throw newSyntaxError(\"Angle bracket } expected\");\n }\n getToken();\n\n // end of file\n if (token !== \"\") {\n throw newSyntaxError(\"End of file expected\");\n }\n getToken();\n\n // remove temporary default options\n delete graph.node;\n delete graph.edge;\n delete graph.graph;\n return graph;\n}\n\n/**\n * Parse a list with statements.\n * @param {object} graph\n */\nfunction parseStatements(graph) {\n while (token !== \"\" && token != \"}\") {\n parseStatement(graph);\n if (token === \";\") {\n getToken();\n }\n }\n}\n\n/**\n * Parse a single statement. Can be a an attribute statement, node\n * statement, a series of node statements and edge statements, or a\n * parameter.\n * @param {object} graph\n */\nfunction parseStatement(graph) {\n // parse subgraph\n var subgraph = parseSubgraph(graph);\n if (subgraph) {\n // edge statements\n parseEdge(graph, subgraph);\n return;\n }\n\n // parse an attribute statement\n var attr = parseAttributeStatement(graph);\n if (attr) {\n return;\n }\n\n // parse node\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError(\"Identifier expected\");\n }\n var id = token; // id can be a string or a number\n getToken();\n if (token === \"=\") {\n // id statement\n getToken();\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError(\"Identifier expected\");\n }\n graph[id] = token;\n getToken();\n // TODO: implement comma separated list with \"a_list: ID=ID [','] [a_list] \"\n } else {\n parseNodeStatement(graph, id);\n }\n}\n\n/**\n * Parse a subgraph\n * @param {object} graph parent graph object\n * @returns {object | null} subgraph\n */\nfunction parseSubgraph(graph) {\n var subgraph = null;\n\n // optional subgraph keyword\n if (token === \"subgraph\") {\n subgraph = {};\n subgraph.type = \"subgraph\";\n getToken();\n\n // optional graph id\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n subgraph.id = token;\n getToken();\n }\n }\n\n // open angle bracket\n if (token === \"{\") {\n getToken();\n if (!subgraph) {\n subgraph = {};\n }\n subgraph.parent = graph;\n subgraph.node = graph.node;\n subgraph.edge = graph.edge;\n subgraph.graph = graph.graph;\n\n // statements\n parseStatements(subgraph);\n\n // close angle bracket\n if (token != \"}\") {\n throw newSyntaxError(\"Angle bracket } expected\");\n }\n getToken();\n\n // remove temporary default options\n delete subgraph.node;\n delete subgraph.edge;\n delete subgraph.graph;\n delete subgraph.parent;\n\n // register at the parent graph\n if (!graph.subgraphs) {\n graph.subgraphs = [];\n }\n graph.subgraphs.push(subgraph);\n }\n return subgraph;\n}\n\n/**\n * parse an attribute statement like \"node [shape=circle fontSize=16]\".\n * Available keywords are 'node', 'edge', 'graph'.\n * The previous list with default attributes will be replaced\n * @param {object} graph\n * @returns {string | null} keyword Returns the name of the parsed attribute\n * (node, edge, graph), or null if nothing\n * is parsed.\n */\nfunction parseAttributeStatement(graph) {\n // attribute statements\n if (token === \"node\") {\n getToken();\n\n // node attributes\n graph.node = parseAttributeList();\n return \"node\";\n } else if (token === \"edge\") {\n getToken();\n\n // edge attributes\n graph.edge = parseAttributeList();\n return \"edge\";\n } else if (token === \"graph\") {\n getToken();\n\n // graph attributes\n graph.graph = parseAttributeList();\n return \"graph\";\n }\n return null;\n}\n\n/**\n * parse a node statement\n * @param {object} graph\n * @param {string | number} id\n */\nfunction parseNodeStatement(graph, id) {\n // node statement\n var node = {\n id: id\n };\n var attr = parseAttributeList();\n if (attr) {\n node.attr = attr;\n }\n addNode(graph, node);\n\n // edge statements\n parseEdge(graph, id);\n}\n\n/**\n * Parse an edge or a series of edges\n * @param {object} graph\n * @param {string | number} from Id of the from node\n */\nfunction parseEdge(graph, from) {\n while (token === \"->\" || token === \"--\") {\n var to;\n var type = token;\n getToken();\n var subgraph = parseSubgraph(graph);\n if (subgraph) {\n to = subgraph;\n } else {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError(\"Identifier or subgraph expected\");\n }\n to = token;\n addNode(graph, {\n id: to\n });\n getToken();\n }\n\n // parse edge attributes\n var attr = parseAttributeList();\n\n // create edge\n var edge = createEdge(graph, from, to, type, attr);\n addEdge(graph, edge);\n from = to;\n }\n}\n\n/**\n * Parse a set with attributes,\n * for example [label=\"1.000\", shape=solid]\n * @returns {object | null} attr\n */\nfunction parseAttributeList() {\n var i;\n var attr = null;\n\n // edge styles of dot and vis\n var edgeStyles = {\n dashed: true,\n solid: false,\n dotted: [1, 5]\n };\n\n /**\n * Define arrow types.\n * vis currently supports types defined in 'arrowTypes'.\n * Details of arrow shapes are described in\n * http://www.graphviz.org/content/arrow-shapes\n */\n var arrowTypes = {\n dot: \"circle\",\n box: \"box\",\n crow: \"crow\",\n curve: \"curve\",\n icurve: \"inv_curve\",\n normal: \"triangle\",\n inv: \"inv_triangle\",\n diamond: \"diamond\",\n tee: \"bar\",\n vee: \"vee\"\n };\n\n /**\n * 'attr_list' contains attributes for checking if some of them are affected\n * later. For instance, both of 'arrowhead' and 'dir' (edge style defined\n * in DOT) make changes to 'arrows' attribute in vis.\n */\n var attr_list = new Array();\n var attr_names = new Array(); // used for checking the case.\n\n // parse attributes\n while (token === \"[\") {\n getToken();\n attr = {};\n while (token !== \"\" && token != \"]\") {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError(\"Attribute name expected\");\n }\n var name = token;\n getToken();\n if (token != \"=\") {\n throw newSyntaxError(\"Equal sign = expected\");\n }\n getToken();\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError(\"Attribute value expected\");\n }\n var value = token;\n\n // convert from dot style to vis\n if (name === \"style\") {\n value = edgeStyles[value];\n }\n var arrowType;\n if (name === \"arrowhead\") {\n arrowType = arrowTypes[value];\n name = \"arrows\";\n value = {\n to: {\n enabled: true,\n type: arrowType\n }\n };\n }\n if (name === \"arrowtail\") {\n arrowType = arrowTypes[value];\n name = \"arrows\";\n value = {\n from: {\n enabled: true,\n type: arrowType\n }\n };\n }\n attr_list.push({\n attr: attr,\n name: name,\n value: value\n });\n attr_names.push(name);\n getToken();\n if (token == \",\") {\n getToken();\n }\n }\n if (token != \"]\") {\n throw newSyntaxError(\"Bracket ] expected\");\n }\n getToken();\n }\n\n /**\n * As explained in [1], graphviz has limitations for combination of\n * arrow[head|tail] and dir. If attribute list includes 'dir',\n * following cases just be supported.\n * 1. both or none + arrowhead, arrowtail\n * 2. forward + arrowhead (arrowtail is not affedted)\n * 3. back + arrowtail (arrowhead is not affected)\n * [1] https://www.graphviz.org/doc/info/attrs.html#h:undir_note\n */\n if (_includesInstanceProperty(attr_names).call(attr_names, \"dir\")) {\n var idx = {}; // get index of 'arrows' and 'dir'\n idx.arrows = {};\n for (i = 0; i < attr_list.length; i++) {\n if (attr_list[i].name === \"arrows\") {\n if (attr_list[i].value.to != null) {\n idx.arrows.to = i;\n } else if (attr_list[i].value.from != null) {\n idx.arrows.from = i;\n } else {\n throw newSyntaxError(\"Invalid value of arrows\");\n }\n } else if (attr_list[i].name === \"dir\") {\n idx.dir = i;\n }\n }\n\n // first, add default arrow shape if it is not assigned to avoid error\n var dir_type = attr_list[idx.dir].value;\n if (!_includesInstanceProperty(attr_names).call(attr_names, \"arrows\")) {\n if (dir_type === \"both\") {\n attr_list.push({\n attr: attr_list[idx.dir].attr,\n name: \"arrows\",\n value: {\n to: {\n enabled: true\n }\n }\n });\n idx.arrows.to = attr_list.length - 1;\n attr_list.push({\n attr: attr_list[idx.dir].attr,\n name: \"arrows\",\n value: {\n from: {\n enabled: true\n }\n }\n });\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === \"forward\") {\n attr_list.push({\n attr: attr_list[idx.dir].attr,\n name: \"arrows\",\n value: {\n to: {\n enabled: true\n }\n }\n });\n idx.arrows.to = attr_list.length - 1;\n } else if (dir_type === \"back\") {\n attr_list.push({\n attr: attr_list[idx.dir].attr,\n name: \"arrows\",\n value: {\n from: {\n enabled: true\n }\n }\n });\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === \"none\") {\n attr_list.push({\n attr: attr_list[idx.dir].attr,\n name: \"arrows\",\n value: \"\"\n });\n idx.arrows.to = attr_list.length - 1;\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n }\n var from_type;\n var to_type;\n // update 'arrows' attribute from 'dir'.\n if (dir_type === \"both\") {\n // both of shapes of 'from' and 'to' are given\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n attr: attr_list[idx.arrows.to].attr,\n name: attr_list[idx.arrows.to].name,\n value: {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n };\n _spliceInstanceProperty(attr_list).call(attr_list, idx.arrows.from, 1);\n\n // shape of 'to' is assigned and use default to 'from'\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = \"arrow\";\n attr_list[idx.arrows.to] = {\n attr: attr_list[idx.arrows.to].attr,\n name: attr_list[idx.arrows.to].name,\n value: {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n };\n\n // only shape of 'from' is assigned and use default for 'to'\n } else if (idx.arrows.from) {\n to_type = \"arrow\";\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n attr: attr_list[idx.arrows.from].attr,\n name: attr_list[idx.arrows.from].name,\n value: {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n };\n }\n } else if (dir_type === \"back\") {\n // given both of shapes, but use only 'from'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = \"\";\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n attr: attr_list[idx.arrows.from].attr,\n name: attr_list[idx.arrows.from].name,\n value: {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n };\n\n // given shape of 'to', but does not use it\n } else if (idx.arrows.to) {\n to_type = \"\";\n from_type = \"arrow\";\n idx.arrows.from = idx.arrows.to;\n attr_list[idx.arrows.from] = {\n attr: attr_list[idx.arrows.from].attr,\n name: attr_list[idx.arrows.from].name,\n value: {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n };\n\n // assign given 'from' shape\n } else if (idx.arrows.from) {\n to_type = \"\";\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n attr: attr_list[idx.arrows.from].attr,\n name: attr_list[idx.arrows.from].name,\n value: {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n };\n }\n attr_list[idx.arrows.from] = {\n attr: attr_list[idx.arrows.from].attr,\n name: attr_list[idx.arrows.from].name,\n value: {\n from: {\n enabled: true,\n type: attr_list[idx.arrows.from].value.from.type\n }\n }\n };\n } else if (dir_type === \"none\") {\n var idx_arrow;\n if (idx.arrows.to) {\n idx_arrow = idx.arrows.to;\n } else {\n idx_arrow = idx.arrows.from;\n }\n attr_list[idx_arrow] = {\n attr: attr_list[idx_arrow].attr,\n name: attr_list[idx_arrow].name,\n value: \"\"\n };\n } else if (dir_type === \"forward\") {\n // given both of shapes, but use only 'to'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = \"\";\n attr_list[idx.arrows.to] = {\n attr: attr_list[idx.arrows.to].attr,\n name: attr_list[idx.arrows.to].name,\n value: {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n };\n\n // assign given 'to' shape\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = \"\";\n attr_list[idx.arrows.to] = {\n attr: attr_list[idx.arrows.to].attr,\n name: attr_list[idx.arrows.to].name,\n value: {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n };\n\n // given shape of 'from', but does not use it\n } else if (idx.arrows.from) {\n to_type = \"arrow\";\n from_type = \"\";\n idx.arrows.to = idx.arrows.from;\n attr_list[idx.arrows.to] = {\n attr: attr_list[idx.arrows.to].attr,\n name: attr_list[idx.arrows.to].name,\n value: {\n to: {\n enabled: true,\n type: to_type\n },\n from: {\n enabled: true,\n type: from_type\n }\n }\n };\n }\n attr_list[idx.arrows.to] = {\n attr: attr_list[idx.arrows.to].attr,\n name: attr_list[idx.arrows.to].name,\n value: {\n to: {\n enabled: true,\n type: attr_list[idx.arrows.to].value.to.type\n }\n }\n };\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n\n // remove 'dir' attribute no need anymore\n _spliceInstanceProperty(attr_list).call(attr_list, idx.dir, 1);\n }\n\n // parse 'penwidth'\n var nof_attr_list;\n if (_includesInstanceProperty(attr_names).call(attr_names, \"penwidth\")) {\n var tmp_attr_list = [];\n nof_attr_list = attr_list.length;\n for (i = 0; i < nof_attr_list; i++) {\n // exclude 'width' from attr_list if 'penwidth' exists\n if (attr_list[i].name !== \"width\") {\n if (attr_list[i].name === \"penwidth\") {\n attr_list[i].name = \"width\";\n }\n tmp_attr_list.push(attr_list[i]);\n }\n }\n attr_list = tmp_attr_list;\n }\n nof_attr_list = attr_list.length;\n for (i = 0; i < nof_attr_list; i++) {\n setValue(attr_list[i].attr, attr_list[i].name, attr_list[i].value);\n }\n return attr;\n}\n\n/**\n * Create a syntax error with extra information on current token and index.\n * @param {string} message\n * @returns {SyntaxError} err\n */\nfunction newSyntaxError(message) {\n return new SyntaxError(message + ', got \"' + chop(token, 30) + '\" (char ' + index + \")\");\n}\n\n/**\n * Chop off text after a maximum length\n * @param {string} text\n * @param {number} maxLength\n * @returns {string}\n */\nfunction chop(text, maxLength) {\n return text.length <= maxLength ? text : text.substr(0, 27) + \"...\";\n}\n\n/**\n * Execute a function fn for each pair of elements in two arrays\n * @param {Array | *} array1\n * @param {Array | *} array2\n * @param {Function} fn\n */\nfunction forEach2(array1, array2, fn) {\n if (_Array$isArray(array1)) {\n _forEachInstanceProperty(array1).call(array1, function (elem1) {\n if (_Array$isArray(array2)) {\n _forEachInstanceProperty(array2).call(array2, function (elem2) {\n fn(elem1, elem2);\n });\n } else {\n fn(elem1, array2);\n }\n });\n } else {\n if (_Array$isArray(array2)) {\n _forEachInstanceProperty(array2).call(array2, function (elem2) {\n fn(array1, elem2);\n });\n } else {\n fn(array1, array2);\n }\n }\n}\n\n/**\n * Set a nested property on an object\n * When nested objects are missing, they will be created.\n * For example setProp({}, 'font.color', 'red') will return {font: {color: 'red'}}\n * @param {object} object\n * @param {string} path A dot separated string like 'font.color'\n * @param {*} value Value for the property\n * @returns {object} Returns the original object, allows for chaining.\n */\nfunction setProp(object, path, value) {\n var names = path.split(\".\");\n var prop = names.pop();\n\n // traverse over the nested objects\n var obj = object;\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n if (!(name in obj)) {\n obj[name] = {};\n }\n obj = obj[name];\n }\n\n // set the property value\n obj[prop] = value;\n return object;\n}\n\n/**\n * Convert an object with DOT attributes to their vis.js equivalents.\n * @param {object} attr Object with DOT attributes\n * @param {object} mapping\n * @returns {object} Returns an object with vis.js attributes\n */\nfunction convertAttr(attr, mapping) {\n var converted = {};\n for (var prop in attr) {\n if (attr.hasOwnProperty(prop)) {\n var visProp = mapping[prop];\n if (_Array$isArray(visProp)) {\n _forEachInstanceProperty(visProp).call(visProp, function (visPropI) {\n setProp(converted, visPropI, attr[prop]);\n });\n } else if (typeof visProp === \"string\") {\n setProp(converted, visProp, attr[prop]);\n } else {\n setProp(converted, prop, attr[prop]);\n }\n }\n }\n return converted;\n}\n\n/**\n * Convert a string containing a graph in DOT language into a map containing\n * with nodes and edges in the format of graph.\n * @param {string} data Text containing a graph in DOT-notation\n * @returns {object} graphData\n */\nfunction DOTToGraph(data) {\n // parse the DOT file\n var dotData = parseDOT(data);\n var graphData = {\n nodes: [],\n edges: [],\n options: {}\n };\n\n // copy the nodes\n if (dotData.nodes) {\n var _context2;\n _forEachInstanceProperty(_context2 = dotData.nodes).call(_context2, function (dotNode) {\n var graphNode = {\n id: dotNode.id,\n label: String(dotNode.label || dotNode.id)\n };\n merge(graphNode, convertAttr(dotNode.attr, NODE_ATTR_MAPPING));\n if (graphNode.image) {\n graphNode.shape = \"image\";\n }\n graphData.nodes.push(graphNode);\n });\n }\n\n // copy the edges\n if (dotData.edges) {\n var _context3;\n /**\n * Convert an edge in DOT format to an edge with VisGraph format\n * @param {object} dotEdge\n * @returns {object} graphEdge\n */\n var convertEdge = function (dotEdge) {\n var graphEdge = {\n from: dotEdge.from,\n to: dotEdge.to\n };\n merge(graphEdge, convertAttr(dotEdge.attr, EDGE_ATTR_MAPPING));\n\n // Add arrows attribute to default styled arrow.\n // The reason why default style is not added in parseAttributeList() is\n // because only default is cleared before here.\n if (graphEdge.arrows == null && dotEdge.type === \"->\") {\n graphEdge.arrows = \"to\";\n }\n return graphEdge;\n };\n _forEachInstanceProperty(_context3 = dotData.edges).call(_context3, function (dotEdge) {\n var from, to;\n if (dotEdge.from instanceof Object) {\n from = dotEdge.from.nodes;\n } else {\n from = {\n id: dotEdge.from\n };\n }\n if (dotEdge.to instanceof Object) {\n to = dotEdge.to.nodes;\n } else {\n to = {\n id: dotEdge.to\n };\n }\n if (dotEdge.from instanceof Object && dotEdge.from.edges) {\n var _context4;\n _forEachInstanceProperty(_context4 = dotEdge.from.edges).call(_context4, function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n forEach2(from, to, function (from, to) {\n var subEdge = createEdge(graphData, from.id, to.id, dotEdge.type, dotEdge.attr);\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n if (dotEdge.to instanceof Object && dotEdge.to.edges) {\n var _context5;\n _forEachInstanceProperty(_context5 = dotEdge.to.edges).call(_context5, function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n });\n }\n\n // copy the options\n if (dotData.attr) {\n graphData.options = dotData.attr;\n }\n return graphData;\n}\n\n/* eslint-enable no-var */\n/* eslint-enable no-unused-vars */\n/* eslint-enable no-prototype-builtins */\n\nvar dotparser = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tDOTToGraph: DOTToGraph,\n\tparseDOT: parseDOT\n});\n\n/**\n * Convert Gephi to Vis.\n * @param gephiJSON - The parsed JSON data in Gephi format.\n * @param optionsObj - Additional options.\n * @returns The converted data ready to be used in Vis.\n */\nfunction parseGephi(gephiJSON, optionsObj) {\n var _context;\n const options = {\n edges: {\n inheritColor: false\n },\n nodes: {\n fixed: false,\n parseColor: false\n }\n };\n if (optionsObj != null) {\n if (optionsObj.fixed != null) {\n options.nodes.fixed = optionsObj.fixed;\n }\n if (optionsObj.parseColor != null) {\n options.nodes.parseColor = optionsObj.parseColor;\n }\n if (optionsObj.inheritColor != null) {\n options.edges.inheritColor = optionsObj.inheritColor;\n }\n }\n const gEdges = gephiJSON.edges;\n const vEdges = _mapInstanceProperty(gEdges).call(gEdges, gEdge => {\n const vEdge = {\n from: gEdge.source,\n id: gEdge.id,\n to: gEdge.target\n };\n if (gEdge.attributes != null) {\n vEdge.attributes = gEdge.attributes;\n }\n if (gEdge.label != null) {\n vEdge.label = gEdge.label;\n }\n if (gEdge.attributes != null && gEdge.attributes.title != null) {\n vEdge.title = gEdge.attributes.title;\n }\n if (gEdge.type === \"Directed\") {\n vEdge.arrows = \"to\";\n }\n // edge['value'] = gEdge.attributes != null ? gEdge.attributes.Weight : undefined;\n // edge['width'] = edge['value'] != null ? undefined : edgegEdge.size;\n if (gEdge.color && options.edges.inheritColor === false) {\n vEdge.color = gEdge.color;\n }\n return vEdge;\n });\n const vNodes = _mapInstanceProperty(_context = gephiJSON.nodes).call(_context, gNode => {\n const vNode = {\n id: gNode.id,\n fixed: options.nodes.fixed && gNode.x != null && gNode.y != null\n };\n if (gNode.attributes != null) {\n vNode.attributes = gNode.attributes;\n }\n if (gNode.label != null) {\n vNode.label = gNode.label;\n }\n if (gNode.size != null) {\n vNode.size = gNode.size;\n }\n if (gNode.attributes != null && gNode.attributes.title != null) {\n vNode.title = gNode.attributes.title;\n }\n if (gNode.title != null) {\n vNode.title = gNode.title;\n }\n if (gNode.x != null) {\n vNode.x = gNode.x;\n }\n if (gNode.y != null) {\n vNode.y = gNode.y;\n }\n if (gNode.color != null) {\n if (options.nodes.parseColor === true) {\n vNode.color = gNode.color;\n } else {\n vNode.color = {\n background: gNode.color,\n border: gNode.color,\n highlight: {\n background: gNode.color,\n border: gNode.color\n },\n hover: {\n background: gNode.color,\n border: gNode.color\n }\n };\n }\n }\n return vNode;\n });\n return {\n nodes: vNodes,\n edges: vEdges\n };\n}\n\nvar gephiParser = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tparseGephi: parseGephi\n});\n\n// English\nconst en = {\n addDescription: \"Click in an empty space to place a new node.\",\n addEdge: \"Add Edge\",\n addNode: \"Add Node\",\n back: \"Back\",\n close: \"Close\",\n createEdgeError: \"Cannot link edges to a cluster.\",\n del: \"Delete selected\",\n deleteClusterError: \"Clusters cannot be deleted.\",\n edgeDescription: \"Click on a node and drag the edge to another node to connect them.\",\n edit: \"Edit\",\n editClusterError: \"Clusters cannot be edited.\",\n editEdge: \"Edit Edge\",\n editEdgeDescription: \"Click on the control points and drag them to a node to connect to it.\",\n editNode: \"Edit Node\"\n};\n// German\nconst de = {\n addDescription: \"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.\",\n addEdge: \"Kante hinzuf\\u00fcgen\",\n addNode: \"Knoten hinzuf\\u00fcgen\",\n back: \"Zur\\u00fcck\",\n close: \"Schließen\",\n createEdgeError: \"Es ist nicht m\\u00f6glich, Kanten mit Clustern zu verbinden.\",\n del: \"L\\u00f6sche Auswahl\",\n deleteClusterError: \"Cluster k\\u00f6nnen nicht gel\\u00f6scht werden.\",\n edgeDescription: \"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.\",\n edit: \"Editieren\",\n editClusterError: \"Cluster k\\u00f6nnen nicht editiert werden.\",\n editEdge: \"Kante editieren\",\n editEdgeDescription: \"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.\",\n editNode: \"Knoten editieren\"\n};\n// Spanish\nconst es = {\n addDescription: \"Haga clic en un lugar vac\\u00edo para colocar un nuevo nodo.\",\n addEdge: \"A\\u00f1adir arista\",\n addNode: \"A\\u00f1adir nodo\",\n back: \"Atr\\u00e1s\",\n close: \"Cerrar\",\n createEdgeError: \"No se puede conectar una arista a un grupo.\",\n del: \"Eliminar selecci\\u00f3n\",\n deleteClusterError: \"No es posible eliminar grupos.\",\n edgeDescription: \"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.\",\n edit: \"Editar\",\n editClusterError: \"No es posible editar grupos.\",\n editEdge: \"Editar arista\",\n editEdgeDescription: \"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.\",\n editNode: \"Editar nodo\"\n};\n//Italiano\nconst it = {\n addDescription: \"Clicca per aggiungere un nuovo nodo\",\n addEdge: \"Aggiungi un vertice\",\n addNode: \"Aggiungi un nodo\",\n back: \"Indietro\",\n close: \"Chiudere\",\n createEdgeError: \"Non si possono collegare vertici ad un cluster\",\n del: \"Cancella la selezione\",\n deleteClusterError: \"I cluster non possono essere cancellati\",\n edgeDescription: \"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.\",\n edit: \"Modifica\",\n editClusterError: \"I clusters non possono essere modificati.\",\n editEdge: \"Modifica il vertice\",\n editEdgeDescription: \"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.\",\n editNode: \"Modifica il nodo\"\n};\n// Dutch\nconst nl = {\n addDescription: \"Klik op een leeg gebied om een nieuwe node te maken.\",\n addEdge: \"Link toevoegen\",\n addNode: \"Node toevoegen\",\n back: \"Terug\",\n close: \"Sluiten\",\n createEdgeError: \"Kan geen link maken naar een cluster.\",\n del: \"Selectie verwijderen\",\n deleteClusterError: \"Clusters kunnen niet worden verwijderd.\",\n edgeDescription: \"Klik op een node en sleep de link naar een andere node om ze te verbinden.\",\n edit: \"Wijzigen\",\n editClusterError: \"Clusters kunnen niet worden aangepast.\",\n editEdge: \"Link wijzigen\",\n editEdgeDescription: \"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.\",\n editNode: \"Node wijzigen\"\n};\n// Portuguese Brazil\nconst pt = {\n addDescription: \"Clique em um espaço em branco para adicionar um novo nó\",\n addEdge: \"Adicionar aresta\",\n addNode: \"Adicionar nó\",\n back: \"Voltar\",\n close: \"Fechar\",\n createEdgeError: \"Não foi possível linkar arestas a um cluster.\",\n del: \"Remover selecionado\",\n deleteClusterError: \"Clusters não puderam ser removidos.\",\n edgeDescription: \"Clique em um nó e arraste a aresta até outro nó para conectá-los\",\n edit: \"Editar\",\n editClusterError: \"Clusters não puderam ser editados.\",\n editEdge: \"Editar aresta\",\n editEdgeDescription: \"Clique nos pontos de controle e os arraste para um nó para conectá-los\",\n editNode: \"Editar nó\"\n};\n// Russian\nconst ru = {\n addDescription: \"Кликните в свободное место, чтобы добавить новый узел.\",\n addEdge: \"Добавить ребро\",\n addNode: \"Добавить узел\",\n back: \"Назад\",\n close: \"Закрывать\",\n createEdgeError: \"Невозможно соединить ребра в кластер.\",\n del: \"Удалить выбранное\",\n deleteClusterError: \"Кластеры не могут быть удалены\",\n edgeDescription: \"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.\",\n edit: \"Редактировать\",\n editClusterError: \"Кластеры недоступны для редактирования.\",\n editEdge: \"Редактировать ребро\",\n editEdgeDescription: \"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.\",\n editNode: \"Редактировать узел\"\n};\n// Chinese\nconst cn = {\n addDescription: \"单击空白处放置新节点。\",\n addEdge: \"添加连接线\",\n addNode: \"添加节点\",\n back: \"返回\",\n close: \"關閉\",\n createEdgeError: \"无法将连接线连接到群集。\",\n del: \"删除选定\",\n deleteClusterError: \"无法删除群集。\",\n edgeDescription: \"单击某个节点并将该连接线拖动到另一个节点以连接它们。\",\n edit: \"编辑\",\n editClusterError: \"无法编辑群集。\",\n editEdge: \"编辑连接线\",\n editEdgeDescription: \"单击控制节点并将它们拖到节点上连接。\",\n editNode: \"编辑节点\"\n};\n// Ukrainian\nconst uk = {\n addDescription: \"Kлікніть на вільне місце, щоб додати новий вузол.\",\n addEdge: \"Додати край\",\n addNode: \"Додати вузол\",\n back: \"Назад\",\n close: \"Закрити\",\n createEdgeError: \"Не можливо об'єднати краї в групу.\",\n del: \"Видалити обране\",\n deleteClusterError: \"Групи не можуть бути видалені.\",\n edgeDescription: \"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.\",\n edit: \"Редагувати\",\n editClusterError: \"Групи недоступні для редагування.\",\n editEdge: \"Редагувати край\",\n editEdgeDescription: \"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.\",\n editNode: \"Редагувати вузол\"\n};\n// French\nconst fr = {\n addDescription: \"Cliquez dans un endroit vide pour placer un nœud.\",\n addEdge: \"Ajouter un lien\",\n addNode: \"Ajouter un nœud\",\n back: \"Retour\",\n close: \"Fermer\",\n createEdgeError: \"Impossible de créer un lien vers un cluster.\",\n del: \"Effacer la sélection\",\n deleteClusterError: \"Les clusters ne peuvent pas être effacés.\",\n edgeDescription: \"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.\",\n edit: \"Éditer\",\n editClusterError: \"Les clusters ne peuvent pas être édités.\",\n editEdge: \"Éditer le lien\",\n editEdgeDescription: \"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.\",\n editNode: \"Éditer le nœud\"\n};\n// Czech\nconst cs = {\n addDescription: \"Kluknutím do prázdného prostoru můžete přidat nový vrchol.\",\n addEdge: \"Přidat hranu\",\n addNode: \"Přidat vrchol\",\n back: \"Zpět\",\n close: \"Zavřít\",\n createEdgeError: \"Nelze připojit hranu ke shluku.\",\n del: \"Smazat výběr\",\n deleteClusterError: \"Nelze mazat shluky.\",\n edgeDescription: \"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.\",\n edit: \"Upravit\",\n editClusterError: \"Nelze upravovat shluky.\",\n editEdge: \"Upravit hranu\",\n editEdgeDescription: \"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.\",\n editNode: \"Upravit vrchol\"\n};\n\nvar locales = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tcn: cn,\n\tcs: cs,\n\tde: de,\n\ten: en,\n\tes: es,\n\tfr: fr,\n\tit: it,\n\tnl: nl,\n\tpt: pt,\n\tru: ru,\n\tuk: uk\n});\n\n/**\n * Normalizes language code into the format used internally.\n * @param locales - All the available locales.\n * @param rawCode - The original code as supplied by the user.\n * @returns Language code in the format language-COUNTRY or language, eventually\n * fallbacks to en.\n */\nfunction normalizeLanguageCode(locales, rawCode) {\n try {\n const [rawLanguage, rawCountry] = rawCode.split(/[-_ /]/, 2);\n const language = rawLanguage != null ? rawLanguage.toLowerCase() : null;\n const country = rawCountry != null ? rawCountry.toUpperCase() : null;\n if (language && country) {\n const code = language + \"-\" + country;\n if (Object.prototype.hasOwnProperty.call(locales, code)) {\n return code;\n } else {\n var _context;\n console.warn(_concatInstanceProperty(_context = \"Unknown variant \".concat(country, \" of language \")).call(_context, language, \".\"));\n }\n }\n if (language) {\n const code = language;\n if (Object.prototype.hasOwnProperty.call(locales, code)) {\n return code;\n } else {\n console.warn(\"Unknown language \".concat(language));\n }\n }\n console.warn(\"Unknown locale \".concat(rawCode, \", falling back to English.\"));\n return \"en\";\n } catch (error) {\n console.error(error);\n console.warn(\"Unexpected error while normalizing locale \".concat(rawCode, \", falling back to English.\"));\n return \"en\";\n }\n}\n\n/**\n * Associates a canvas to a given image, containing a number of renderings\n * of the image at various sizes.\n *\n * This technique is known as 'mipmapping'.\n *\n * NOTE: Images can also be of type 'data:svg+xml`. This code also works\n * for svg, but the mipmapping may not be necessary.\n * @param {Image} image\n */\nclass CachedImage {\n /**\n * @ignore\n */\n constructor() {\n this.NUM_ITERATIONS = 4; // Number of items in the coordinates array\n\n this.image = new Image();\n this.canvas = document.createElement(\"canvas\");\n }\n\n /**\n * Called when the image has been successfully loaded.\n */\n init() {\n if (this.initialized()) return;\n this.src = this.image.src; // For same interface with Image\n const w = this.image.width;\n const h = this.image.height;\n\n // Ease external access\n this.width = w;\n this.height = h;\n const h2 = Math.floor(h / 2);\n const h4 = Math.floor(h / 4);\n const h8 = Math.floor(h / 8);\n const h16 = Math.floor(h / 16);\n const w2 = Math.floor(w / 2);\n const w4 = Math.floor(w / 4);\n const w8 = Math.floor(w / 8);\n const w16 = Math.floor(w / 16);\n\n // Make canvas as small as possible\n this.canvas.width = 3 * w4;\n this.canvas.height = h2;\n\n // Coordinates and sizes of images contained in the canvas\n // Values per row: [top x, left y, width, height]\n\n this.coordinates = [[0, 0, w2, h2], [w2, 0, w4, h4], [w2, h4, w8, h8], [5 * w8, h4, w16, h16]];\n this._fillMipMap();\n }\n\n /**\n * @returns {boolean} true if init() has been called, false otherwise.\n */\n initialized() {\n return this.coordinates !== undefined;\n }\n\n /**\n * Redraw main image in various sizes to the context.\n *\n * The rationale behind this is to reduce artefacts due to interpolation\n * at differing zoom levels.\n *\n * Source: http://stackoverflow.com/q/18761404/1223531\n *\n * This methods takes the resizing out of the drawing loop, in order to\n * reduce performance overhead.\n *\n * TODO: The code assumes that a 2D context can always be gotten. This is\n * not necessarily true! OTOH, if not true then usage of this class\n * is senseless.\n * @private\n */\n _fillMipMap() {\n const ctx = this.canvas.getContext(\"2d\");\n\n // First zoom-level comes from the image\n const to = this.coordinates[0];\n ctx.drawImage(this.image, to[0], to[1], to[2], to[3]);\n\n // The rest are copy actions internal to the canvas/context\n for (let iterations = 1; iterations < this.NUM_ITERATIONS; iterations++) {\n const from = this.coordinates[iterations - 1];\n const to = this.coordinates[iterations];\n ctx.drawImage(this.canvas, from[0], from[1], from[2], from[3], to[0], to[1], to[2], to[3]);\n }\n }\n\n /**\n * Draw the image, using the mipmap if necessary.\n *\n * MipMap is only used if param factor > 2; otherwise, original bitmap\n * is resized. This is also used to skip mipmap usage, e.g. by setting factor = 1\n *\n * Credits to 'Alex de Mulder' for original implementation.\n * @param {CanvasRenderingContext2D} ctx context on which to draw zoomed image\n * @param {Float} factor scale factor at which to draw\n * @param {number} left\n * @param {number} top\n * @param {number} width\n * @param {number} height\n */\n drawImageAtPosition(ctx, factor, left, top, width, height) {\n if (!this.initialized()) return; //can't draw image yet not intialized\n\n if (factor > 2) {\n // Determine which zoomed image to use\n factor *= 0.5;\n let iterations = 0;\n while (factor > 2 && iterations < this.NUM_ITERATIONS) {\n factor *= 0.5;\n iterations += 1;\n }\n if (iterations >= this.NUM_ITERATIONS) {\n iterations = this.NUM_ITERATIONS - 1;\n }\n //console.log(\"iterations: \" + iterations);\n\n const from = this.coordinates[iterations];\n ctx.drawImage(this.canvas, from[0], from[1], from[2], from[3], left, top, width, height);\n } else {\n // Draw image directly\n ctx.drawImage(this.image, left, top, width, height);\n }\n }\n}\n\n/**\n * This callback is a callback that accepts an Image.\n * @callback ImageCallback\n * @param {Image} image\n */\n\n/**\n * This class loads images and keeps them stored.\n * @param {ImageCallback} callback\n */\nclass Images {\n /**\n * @param {ImageCallback} callback\n */\n constructor(callback) {\n this.images = {};\n this.imageBroken = {};\n this.callback = callback;\n }\n\n /**\n * @param {string} url The original Url that failed to load, if the broken image is successfully loaded it will be added to the cache using this Url as the key so that subsequent requests for this Url will return the broken image\n * @param {string} brokenUrl Url the broken image to try and load\n * @param {Image} imageToLoadBrokenUrlOn The image object\n */\n _tryloadBrokenUrl(url, brokenUrl, imageToLoadBrokenUrlOn) {\n //If these parameters aren't specified then exit the function because nothing constructive can be done\n if (url === undefined || imageToLoadBrokenUrlOn === undefined) return;\n if (brokenUrl === undefined) {\n console.warn(\"No broken url image defined\");\n return;\n }\n\n //Clear the old subscription to the error event and put a new in place that only handle errors in loading the brokenImageUrl\n imageToLoadBrokenUrlOn.image.onerror = () => {\n console.error(\"Could not load brokenImage:\", brokenUrl);\n // cache item will contain empty image, this should be OK for default\n };\n\n //Set the source of the image to the brokenUrl, this is actually what kicks off the loading of the broken image\n imageToLoadBrokenUrlOn.image.src = brokenUrl;\n }\n\n /**\n *\n * @param {vis.Image} imageToRedrawWith\n * @private\n */\n _redrawWithImage(imageToRedrawWith) {\n if (this.callback) {\n this.callback(imageToRedrawWith);\n }\n }\n\n /**\n * @param {string} url Url of the image\n * @param {string} brokenUrl Url of an image to use if the url image is not found\n * @returns {Image} img The image object\n */\n load(url, brokenUrl) {\n //Try and get the image from the cache, if successful then return the cached image\n const cachedImage = this.images[url];\n if (cachedImage) return cachedImage;\n\n //Create a new image\n const img = new CachedImage();\n\n // Need to add to cache here, otherwise final return will spawn different copies of the same image,\n // Also, there will be multiple loads of the same image.\n this.images[url] = img;\n\n //Subscribe to the event that is raised if the image loads successfully\n img.image.onload = () => {\n // Properly init the cached item and then request a redraw\n this._fixImageCoordinates(img.image);\n img.init();\n this._redrawWithImage(img);\n };\n\n //Subscribe to the event that is raised if the image fails to load\n img.image.onerror = () => {\n console.error(\"Could not load image:\", url);\n //Try and load the image specified by the brokenUrl using\n this._tryloadBrokenUrl(url, brokenUrl, img);\n };\n\n //Set the source of the image to the url, this is what actually kicks off the loading of the image\n img.image.src = url;\n\n //Return the new image\n return img;\n }\n\n /**\n * IE11 fix -- thanks dponch!\n *\n * Local helper function\n * @param {vis.Image} imageToCache\n * @private\n */\n _fixImageCoordinates(imageToCache) {\n if (imageToCache.width === 0) {\n document.body.appendChild(imageToCache);\n imageToCache.width = imageToCache.offsetWidth;\n imageToCache.height = imageToCache.offsetHeight;\n document.body.removeChild(imageToCache);\n }\n }\n}\n\nvar es_map = {};\n\nvar es_map_constructor = {};\n\nvar internalMetadata = {exports: {}};\n\nvar arrayBufferNonExtensible;\nvar hasRequiredArrayBufferNonExtensible;\n\nfunction requireArrayBufferNonExtensible () {\n\tif (hasRequiredArrayBufferNonExtensible) return arrayBufferNonExtensible;\n\thasRequiredArrayBufferNonExtensible = 1;\n\t// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it\n\tvar fails = /*@__PURE__*/ requireFails();\n\n\tarrayBufferNonExtensible = fails(function () {\n\t if (typeof ArrayBuffer == 'function') {\n\t var buffer = new ArrayBuffer(8);\n\t // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe\n\t if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });\n\t }\n\t});\n\treturn arrayBufferNonExtensible;\n}\n\nvar objectIsExtensible;\nvar hasRequiredObjectIsExtensible;\n\nfunction requireObjectIsExtensible () {\n\tif (hasRequiredObjectIsExtensible) return objectIsExtensible;\n\thasRequiredObjectIsExtensible = 1;\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar classof = /*@__PURE__*/ requireClassofRaw();\n\tvar ARRAY_BUFFER_NON_EXTENSIBLE = /*@__PURE__*/ requireArrayBufferNonExtensible();\n\n\t// eslint-disable-next-line es/no-object-isextensible -- safe\n\tvar $isExtensible = Object.isExtensible;\n\tvar FAILS_ON_PRIMITIVES = fails(function () { });\n\n\t// `Object.isExtensible` method\n\t// https://tc39.es/ecma262/#sec-object.isextensible\n\tobjectIsExtensible = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) {\n\t if (!isObject(it)) return false;\n\t if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return false;\n\t return $isExtensible ? $isExtensible(it) : true;\n\t} : $isExtensible;\n\treturn objectIsExtensible;\n}\n\nvar freezing;\nvar hasRequiredFreezing;\n\nfunction requireFreezing () {\n\tif (hasRequiredFreezing) return freezing;\n\thasRequiredFreezing = 1;\n\tvar fails = /*@__PURE__*/ requireFails();\n\n\tfreezing = !fails(function () {\n\t // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing\n\t return Object.isExtensible(Object.preventExtensions({}));\n\t});\n\treturn freezing;\n}\n\nvar hasRequiredInternalMetadata;\n\nfunction requireInternalMetadata () {\n\tif (hasRequiredInternalMetadata) return internalMetadata.exports;\n\thasRequiredInternalMetadata = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar hiddenKeys = /*@__PURE__*/ requireHiddenKeys();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar defineProperty = /*@__PURE__*/ requireObjectDefineProperty().f;\n\tvar getOwnPropertyNamesModule = /*@__PURE__*/ requireObjectGetOwnPropertyNames();\n\tvar getOwnPropertyNamesExternalModule = /*@__PURE__*/ requireObjectGetOwnPropertyNamesExternal();\n\tvar isExtensible = /*@__PURE__*/ requireObjectIsExtensible();\n\tvar uid = /*@__PURE__*/ requireUid();\n\tvar FREEZING = /*@__PURE__*/ requireFreezing();\n\n\tvar REQUIRED = false;\n\tvar METADATA = uid('meta');\n\tvar id = 0;\n\n\tvar setMetadata = function (it) {\n\t defineProperty(it, METADATA, { value: {\n\t objectID: 'O' + id++, // object ID\n\t weakData: {} // weak collections IDs\n\t } });\n\t};\n\n\tvar fastKey = function (it, create) {\n\t // return a primitive with prefix\n\t if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n\t if (!hasOwn(it, METADATA)) {\n\t // can't set metadata to uncaught frozen object\n\t if (!isExtensible(it)) return 'F';\n\t // not necessary to add metadata\n\t if (!create) return 'E';\n\t // add missing metadata\n\t setMetadata(it);\n\t // return object ID\n\t } return it[METADATA].objectID;\n\t};\n\n\tvar getWeakData = function (it, create) {\n\t if (!hasOwn(it, METADATA)) {\n\t // can't set metadata to uncaught frozen object\n\t if (!isExtensible(it)) return true;\n\t // not necessary to add metadata\n\t if (!create) return false;\n\t // add missing metadata\n\t setMetadata(it);\n\t // return the store of weak collections IDs\n\t } return it[METADATA].weakData;\n\t};\n\n\t// add metadata on freeze-family methods calling\n\tvar onFreeze = function (it) {\n\t if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it);\n\t return it;\n\t};\n\n\tvar enable = function () {\n\t meta.enable = function () { /* empty */ };\n\t REQUIRED = true;\n\t var getOwnPropertyNames = getOwnPropertyNamesModule.f;\n\t var splice = uncurryThis([].splice);\n\t var test = {};\n\t test[METADATA] = 1;\n\n\t // prevent exposing of metadata key\n\t if (getOwnPropertyNames(test).length) {\n\t getOwnPropertyNamesModule.f = function (it) {\n\t var result = getOwnPropertyNames(it);\n\t for (var i = 0, length = result.length; i < length; i++) {\n\t if (result[i] === METADATA) {\n\t splice(result, i, 1);\n\t break;\n\t }\n\t } return result;\n\t };\n\n\t $({ target: 'Object', stat: true, forced: true }, {\n\t getOwnPropertyNames: getOwnPropertyNamesExternalModule.f\n\t });\n\t }\n\t};\n\n\tvar meta = internalMetadata.exports = {\n\t enable: enable,\n\t fastKey: fastKey,\n\t getWeakData: getWeakData,\n\t onFreeze: onFreeze\n\t};\n\n\thiddenKeys[METADATA] = true;\n\treturn internalMetadata.exports;\n}\n\nvar isArrayIteratorMethod;\nvar hasRequiredIsArrayIteratorMethod;\n\nfunction requireIsArrayIteratorMethod () {\n\tif (hasRequiredIsArrayIteratorMethod) return isArrayIteratorMethod;\n\thasRequiredIsArrayIteratorMethod = 1;\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\tvar Iterators = /*@__PURE__*/ requireIterators();\n\n\tvar ITERATOR = wellKnownSymbol('iterator');\n\tvar ArrayPrototype = Array.prototype;\n\n\t// check on default Array iterator\n\tisArrayIteratorMethod = function (it) {\n\t return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n\t};\n\treturn isArrayIteratorMethod;\n}\n\nvar getIteratorMethod;\nvar hasRequiredGetIteratorMethod;\n\nfunction requireGetIteratorMethod () {\n\tif (hasRequiredGetIteratorMethod) return getIteratorMethod;\n\thasRequiredGetIteratorMethod = 1;\n\tvar classof = /*@__PURE__*/ requireClassof();\n\tvar getMethod = /*@__PURE__*/ requireGetMethod();\n\tvar isNullOrUndefined = /*@__PURE__*/ requireIsNullOrUndefined();\n\tvar Iterators = /*@__PURE__*/ requireIterators();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\n\tvar ITERATOR = wellKnownSymbol('iterator');\n\n\tgetIteratorMethod = function (it) {\n\t if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)\n\t || getMethod(it, '@@iterator')\n\t || Iterators[classof(it)];\n\t};\n\treturn getIteratorMethod;\n}\n\nvar getIterator;\nvar hasRequiredGetIterator;\n\nfunction requireGetIterator () {\n\tif (hasRequiredGetIterator) return getIterator;\n\thasRequiredGetIterator = 1;\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\tvar aCallable = /*@__PURE__*/ requireACallable();\n\tvar anObject = /*@__PURE__*/ requireAnObject();\n\tvar tryToString = /*@__PURE__*/ requireTryToString();\n\tvar getIteratorMethod = /*@__PURE__*/ requireGetIteratorMethod();\n\n\tvar $TypeError = TypeError;\n\n\tgetIterator = function (argument, usingIterator) {\n\t var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n\t if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));\n\t throw new $TypeError(tryToString(argument) + ' is not iterable');\n\t};\n\treturn getIterator;\n}\n\nvar iteratorClose;\nvar hasRequiredIteratorClose;\n\nfunction requireIteratorClose () {\n\tif (hasRequiredIteratorClose) return iteratorClose;\n\thasRequiredIteratorClose = 1;\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\tvar anObject = /*@__PURE__*/ requireAnObject();\n\tvar getMethod = /*@__PURE__*/ requireGetMethod();\n\n\titeratorClose = function (iterator, kind, value) {\n\t var innerResult, innerError;\n\t anObject(iterator);\n\t try {\n\t innerResult = getMethod(iterator, 'return');\n\t if (!innerResult) {\n\t if (kind === 'throw') throw value;\n\t return value;\n\t }\n\t innerResult = call(innerResult, iterator);\n\t } catch (error) {\n\t innerError = true;\n\t innerResult = error;\n\t }\n\t if (kind === 'throw') throw value;\n\t if (innerError) throw innerResult;\n\t anObject(innerResult);\n\t return value;\n\t};\n\treturn iteratorClose;\n}\n\nvar iterate;\nvar hasRequiredIterate;\n\nfunction requireIterate () {\n\tif (hasRequiredIterate) return iterate;\n\thasRequiredIterate = 1;\n\tvar bind = /*@__PURE__*/ requireFunctionBindContext();\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\tvar anObject = /*@__PURE__*/ requireAnObject();\n\tvar tryToString = /*@__PURE__*/ requireTryToString();\n\tvar isArrayIteratorMethod = /*@__PURE__*/ requireIsArrayIteratorMethod();\n\tvar lengthOfArrayLike = /*@__PURE__*/ requireLengthOfArrayLike();\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar getIterator = /*@__PURE__*/ requireGetIterator();\n\tvar getIteratorMethod = /*@__PURE__*/ requireGetIteratorMethod();\n\tvar iteratorClose = /*@__PURE__*/ requireIteratorClose();\n\n\tvar $TypeError = TypeError;\n\n\tvar Result = function (stopped, result) {\n\t this.stopped = stopped;\n\t this.result = result;\n\t};\n\n\tvar ResultPrototype = Result.prototype;\n\n\titerate = function (iterable, unboundFunction, options) {\n\t var that = options && options.that;\n\t var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n\t var IS_RECORD = !!(options && options.IS_RECORD);\n\t var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n\t var INTERRUPTED = !!(options && options.INTERRUPTED);\n\t var fn = bind(unboundFunction, that);\n\t var iterator, iterFn, index, length, result, next, step;\n\n\t var stop = function (condition) {\n\t if (iterator) iteratorClose(iterator, 'normal');\n\t return new Result(true, condition);\n\t };\n\n\t var callFn = function (value) {\n\t if (AS_ENTRIES) {\n\t anObject(value);\n\t return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n\t } return INTERRUPTED ? fn(value, stop) : fn(value);\n\t };\n\n\t if (IS_RECORD) {\n\t iterator = iterable.iterator;\n\t } else if (IS_ITERATOR) {\n\t iterator = iterable;\n\t } else {\n\t iterFn = getIteratorMethod(iterable);\n\t if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');\n\t // optimisation for array iterators\n\t if (isArrayIteratorMethod(iterFn)) {\n\t for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {\n\t result = callFn(iterable[index]);\n\t if (result && isPrototypeOf(ResultPrototype, result)) return result;\n\t } return new Result(false);\n\t }\n\t iterator = getIterator(iterable, iterFn);\n\t }\n\n\t next = IS_RECORD ? iterable.next : iterator.next;\n\t while (!(step = call(next, iterator)).done) {\n\t try {\n\t result = callFn(step.value);\n\t } catch (error) {\n\t iteratorClose(iterator, 'throw', error);\n\t }\n\t if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;\n\t } return new Result(false);\n\t};\n\treturn iterate;\n}\n\nvar anInstance;\nvar hasRequiredAnInstance;\n\nfunction requireAnInstance () {\n\tif (hasRequiredAnInstance) return anInstance;\n\thasRequiredAnInstance = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\n\tvar $TypeError = TypeError;\n\n\tanInstance = function (it, Prototype) {\n\t if (isPrototypeOf(Prototype, it)) return it;\n\t throw new $TypeError('Incorrect invocation');\n\t};\n\treturn anInstance;\n}\n\nvar collection;\nvar hasRequiredCollection;\n\nfunction requireCollection () {\n\tif (hasRequiredCollection) return collection;\n\thasRequiredCollection = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar InternalMetadataModule = /*@__PURE__*/ requireInternalMetadata();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar createNonEnumerableProperty = /*@__PURE__*/ requireCreateNonEnumerableProperty();\n\tvar iterate = /*@__PURE__*/ requireIterate();\n\tvar anInstance = /*@__PURE__*/ requireAnInstance();\n\tvar isCallable = /*@__PURE__*/ requireIsCallable();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar isNullOrUndefined = /*@__PURE__*/ requireIsNullOrUndefined();\n\tvar setToStringTag = /*@__PURE__*/ requireSetToStringTag();\n\tvar defineProperty = /*@__PURE__*/ requireObjectDefineProperty().f;\n\tvar forEach = /*@__PURE__*/ requireArrayIteration().forEach;\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar InternalStateModule = /*@__PURE__*/ requireInternalState();\n\n\tvar setInternalState = InternalStateModule.set;\n\tvar internalStateGetterFor = InternalStateModule.getterFor;\n\n\tcollection = function (CONSTRUCTOR_NAME, wrapper, common) {\n\t var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n\t var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n\t var ADDER = IS_MAP ? 'set' : 'add';\n\t var NativeConstructor = globalThis[CONSTRUCTOR_NAME];\n\t var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n\t var exported = {};\n\t var Constructor;\n\n\t if (!DESCRIPTORS || !isCallable(NativeConstructor)\n\t || !(IS_WEAK || NativePrototype.forEach && !fails(function () { new NativeConstructor().entries().next(); }))\n\t ) {\n\t // create collection constructor\n\t Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n\t InternalMetadataModule.enable();\n\t } else {\n\t Constructor = wrapper(function (target, iterable) {\n\t setInternalState(anInstance(target, Prototype), {\n\t type: CONSTRUCTOR_NAME,\n\t collection: new NativeConstructor()\n\t });\n\t if (!isNullOrUndefined(iterable)) iterate(iterable, target[ADDER], { that: target, AS_ENTRIES: IS_MAP });\n\t });\n\n\t var Prototype = Constructor.prototype;\n\n\t var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n\t forEach(['add', 'clear', 'delete', 'forEach', 'get', 'has', 'set', 'keys', 'values', 'entries'], function (KEY) {\n\t var IS_ADDER = KEY === 'add' || KEY === 'set';\n\t if (KEY in NativePrototype && !(IS_WEAK && KEY === 'clear')) {\n\t createNonEnumerableProperty(Prototype, KEY, function (a, b) {\n\t var collection = getInternalState(this).collection;\n\t if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY === 'get' ? undefined : false;\n\t var result = collection[KEY](a === 0 ? 0 : a, b);\n\t return IS_ADDER ? this : result;\n\t });\n\t }\n\t });\n\n\t IS_WEAK || defineProperty(Prototype, 'size', {\n\t configurable: true,\n\t get: function () {\n\t return getInternalState(this).collection.size;\n\t }\n\t });\n\t }\n\n\t setToStringTag(Constructor, CONSTRUCTOR_NAME, false, true);\n\n\t exported[CONSTRUCTOR_NAME] = Constructor;\n\t $({ global: true, forced: true }, exported);\n\n\t if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n\t return Constructor;\n\t};\n\treturn collection;\n}\n\nvar defineBuiltIns;\nvar hasRequiredDefineBuiltIns;\n\nfunction requireDefineBuiltIns () {\n\tif (hasRequiredDefineBuiltIns) return defineBuiltIns;\n\thasRequiredDefineBuiltIns = 1;\n\tvar defineBuiltIn = /*@__PURE__*/ requireDefineBuiltIn();\n\n\tdefineBuiltIns = function (target, src, options) {\n\t for (var key in src) {\n\t if (options && options.unsafe && target[key]) target[key] = src[key];\n\t else defineBuiltIn(target, key, src[key], options);\n\t } return target;\n\t};\n\treturn defineBuiltIns;\n}\n\nvar setSpecies;\nvar hasRequiredSetSpecies;\n\nfunction requireSetSpecies () {\n\tif (hasRequiredSetSpecies) return setSpecies;\n\thasRequiredSetSpecies = 1;\n\tvar getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();\n\tvar defineBuiltInAccessor = /*@__PURE__*/ requireDefineBuiltInAccessor();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\n\tvar SPECIES = wellKnownSymbol('species');\n\n\tsetSpecies = function (CONSTRUCTOR_NAME) {\n\t var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n\n\t if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n\t defineBuiltInAccessor(Constructor, SPECIES, {\n\t configurable: true,\n\t get: function () { return this; }\n\t });\n\t }\n\t};\n\treturn setSpecies;\n}\n\nvar collectionStrong;\nvar hasRequiredCollectionStrong;\n\nfunction requireCollectionStrong () {\n\tif (hasRequiredCollectionStrong) return collectionStrong;\n\thasRequiredCollectionStrong = 1;\n\tvar create = /*@__PURE__*/ requireObjectCreate();\n\tvar defineBuiltInAccessor = /*@__PURE__*/ requireDefineBuiltInAccessor();\n\tvar defineBuiltIns = /*@__PURE__*/ requireDefineBuiltIns();\n\tvar bind = /*@__PURE__*/ requireFunctionBindContext();\n\tvar anInstance = /*@__PURE__*/ requireAnInstance();\n\tvar isNullOrUndefined = /*@__PURE__*/ requireIsNullOrUndefined();\n\tvar iterate = /*@__PURE__*/ requireIterate();\n\tvar defineIterator = /*@__PURE__*/ requireIteratorDefine();\n\tvar createIterResultObject = /*@__PURE__*/ requireCreateIterResultObject();\n\tvar setSpecies = /*@__PURE__*/ requireSetSpecies();\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar fastKey = /*@__PURE__*/ requireInternalMetadata().fastKey;\n\tvar InternalStateModule = /*@__PURE__*/ requireInternalState();\n\n\tvar setInternalState = InternalStateModule.set;\n\tvar internalStateGetterFor = InternalStateModule.getterFor;\n\n\tcollectionStrong = {\n\t getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n\t var Constructor = wrapper(function (that, iterable) {\n\t anInstance(that, Prototype);\n\t setInternalState(that, {\n\t type: CONSTRUCTOR_NAME,\n\t index: create(null),\n\t first: null,\n\t last: null,\n\t size: 0\n\t });\n\t if (!DESCRIPTORS) that.size = 0;\n\t if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n\t });\n\n\t var Prototype = Constructor.prototype;\n\n\t var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n\t var define = function (that, key, value) {\n\t var state = getInternalState(that);\n\t var entry = getEntry(that, key);\n\t var previous, index;\n\t // change existing entry\n\t if (entry) {\n\t entry.value = value;\n\t // create new entry\n\t } else {\n\t state.last = entry = {\n\t index: index = fastKey(key, true),\n\t key: key,\n\t value: value,\n\t previous: previous = state.last,\n\t next: null,\n\t removed: false\n\t };\n\t if (!state.first) state.first = entry;\n\t if (previous) previous.next = entry;\n\t if (DESCRIPTORS) state.size++;\n\t else that.size++;\n\t // add to index\n\t if (index !== 'F') state.index[index] = entry;\n\t } return that;\n\t };\n\n\t var getEntry = function (that, key) {\n\t var state = getInternalState(that);\n\t // fast case\n\t var index = fastKey(key);\n\t var entry;\n\t if (index !== 'F') return state.index[index];\n\t // frozen object case\n\t for (entry = state.first; entry; entry = entry.next) {\n\t if (entry.key === key) return entry;\n\t }\n\t };\n\n\t defineBuiltIns(Prototype, {\n\t // `{ Map, Set }.prototype.clear()` methods\n\t // https://tc39.es/ecma262/#sec-map.prototype.clear\n\t // https://tc39.es/ecma262/#sec-set.prototype.clear\n\t clear: function clear() {\n\t var that = this;\n\t var state = getInternalState(that);\n\t var entry = state.first;\n\t while (entry) {\n\t entry.removed = true;\n\t if (entry.previous) entry.previous = entry.previous.next = null;\n\t entry = entry.next;\n\t }\n\t state.first = state.last = null;\n\t state.index = create(null);\n\t if (DESCRIPTORS) state.size = 0;\n\t else that.size = 0;\n\t },\n\t // `{ Map, Set }.prototype.delete(key)` methods\n\t // https://tc39.es/ecma262/#sec-map.prototype.delete\n\t // https://tc39.es/ecma262/#sec-set.prototype.delete\n\t 'delete': function (key) {\n\t var that = this;\n\t var state = getInternalState(that);\n\t var entry = getEntry(that, key);\n\t if (entry) {\n\t var next = entry.next;\n\t var prev = entry.previous;\n\t delete state.index[entry.index];\n\t entry.removed = true;\n\t if (prev) prev.next = next;\n\t if (next) next.previous = prev;\n\t if (state.first === entry) state.first = next;\n\t if (state.last === entry) state.last = prev;\n\t if (DESCRIPTORS) state.size--;\n\t else that.size--;\n\t } return !!entry;\n\t },\n\t // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods\n\t // https://tc39.es/ecma262/#sec-map.prototype.foreach\n\t // https://tc39.es/ecma262/#sec-set.prototype.foreach\n\t forEach: function forEach(callbackfn /* , that = undefined */) {\n\t var state = getInternalState(this);\n\t var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t var entry;\n\t while (entry = entry ? entry.next : state.first) {\n\t boundFunction(entry.value, entry.key, this);\n\t // revert to the last existing entry\n\t while (entry && entry.removed) entry = entry.previous;\n\t }\n\t },\n\t // `{ Map, Set}.prototype.has(key)` methods\n\t // https://tc39.es/ecma262/#sec-map.prototype.has\n\t // https://tc39.es/ecma262/#sec-set.prototype.has\n\t has: function has(key) {\n\t return !!getEntry(this, key);\n\t }\n\t });\n\n\t defineBuiltIns(Prototype, IS_MAP ? {\n\t // `Map.prototype.get(key)` method\n\t // https://tc39.es/ecma262/#sec-map.prototype.get\n\t get: function get(key) {\n\t var entry = getEntry(this, key);\n\t return entry && entry.value;\n\t },\n\t // `Map.prototype.set(key, value)` method\n\t // https://tc39.es/ecma262/#sec-map.prototype.set\n\t set: function set(key, value) {\n\t return define(this, key === 0 ? 0 : key, value);\n\t }\n\t } : {\n\t // `Set.prototype.add(value)` method\n\t // https://tc39.es/ecma262/#sec-set.prototype.add\n\t add: function add(value) {\n\t return define(this, value = value === 0 ? 0 : value, value);\n\t }\n\t });\n\t if (DESCRIPTORS) defineBuiltInAccessor(Prototype, 'size', {\n\t configurable: true,\n\t get: function () {\n\t return getInternalState(this).size;\n\t }\n\t });\n\t return Constructor;\n\t },\n\t setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {\n\t var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n\t var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\t var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n\t // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods\n\t // https://tc39.es/ecma262/#sec-map.prototype.entries\n\t // https://tc39.es/ecma262/#sec-map.prototype.keys\n\t // https://tc39.es/ecma262/#sec-map.prototype.values\n\t // https://tc39.es/ecma262/#sec-map.prototype-@@iterator\n\t // https://tc39.es/ecma262/#sec-set.prototype.entries\n\t // https://tc39.es/ecma262/#sec-set.prototype.keys\n\t // https://tc39.es/ecma262/#sec-set.prototype.values\n\t // https://tc39.es/ecma262/#sec-set.prototype-@@iterator\n\t defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {\n\t setInternalState(this, {\n\t type: ITERATOR_NAME,\n\t target: iterated,\n\t state: getInternalCollectionState(iterated),\n\t kind: kind,\n\t last: null\n\t });\n\t }, function () {\n\t var state = getInternalIteratorState(this);\n\t var kind = state.kind;\n\t var entry = state.last;\n\t // revert to the last existing entry\n\t while (entry && entry.removed) entry = entry.previous;\n\t // get next entry\n\t if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n\t // or finish the iteration\n\t state.target = null;\n\t return createIterResultObject(undefined, true);\n\t }\n\t // return step by kind\n\t if (kind === 'keys') return createIterResultObject(entry.key, false);\n\t if (kind === 'values') return createIterResultObject(entry.value, false);\n\t return createIterResultObject([entry.key, entry.value], false);\n\t }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n\t // `{ Map, Set }.prototype[@@species]` accessors\n\t // https://tc39.es/ecma262/#sec-get-map-@@species\n\t // https://tc39.es/ecma262/#sec-get-set-@@species\n\t setSpecies(CONSTRUCTOR_NAME);\n\t }\n\t};\n\treturn collectionStrong;\n}\n\nvar hasRequiredEs_map_constructor;\n\nfunction requireEs_map_constructor () {\n\tif (hasRequiredEs_map_constructor) return es_map_constructor;\n\thasRequiredEs_map_constructor = 1;\n\tvar collection = /*@__PURE__*/ requireCollection();\n\tvar collectionStrong = /*@__PURE__*/ requireCollectionStrong();\n\n\t// `Map` constructor\n\t// https://tc39.es/ecma262/#sec-map-objects\n\tcollection('Map', function (init) {\n\t return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };\n\t}, collectionStrong);\n\treturn es_map_constructor;\n}\n\nvar hasRequiredEs_map;\n\nfunction requireEs_map () {\n\tif (hasRequiredEs_map) return es_map;\n\thasRequiredEs_map = 1;\n\t// TODO: Remove this module from `core-js@4` since it's replaced to module below\n\trequireEs_map_constructor();\n\treturn es_map;\n}\n\nvar es_map_groupBy = {};\n\nvar caller;\nvar hasRequiredCaller;\n\nfunction requireCaller () {\n\tif (hasRequiredCaller) return caller;\n\thasRequiredCaller = 1;\n\tcaller = function (methodName, numArgs) {\n\t return numArgs === 1 ? function (object, arg) {\n\t return object[methodName](arg);\n\t } : function (object, arg1, arg2) {\n\t return object[methodName](arg1, arg2);\n\t };\n\t};\n\treturn caller;\n}\n\nvar mapHelpers;\nvar hasRequiredMapHelpers;\n\nfunction requireMapHelpers () {\n\tif (hasRequiredMapHelpers) return mapHelpers;\n\thasRequiredMapHelpers = 1;\n\tvar getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();\n\tvar caller = /*@__PURE__*/ requireCaller();\n\n\tvar Map = getBuiltIn('Map');\n\n\tmapHelpers = {\n\t Map: Map,\n\t set: caller('set', 2),\n\t get: caller('get', 1),\n\t has: caller('has', 1),\n\t remove: caller('delete', 1),\n\t proto: Map.prototype\n\t};\n\treturn mapHelpers;\n}\n\nvar hasRequiredEs_map_groupBy;\n\nfunction requireEs_map_groupBy () {\n\tif (hasRequiredEs_map_groupBy) return es_map_groupBy;\n\thasRequiredEs_map_groupBy = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar aCallable = /*@__PURE__*/ requireACallable();\n\tvar requireObjectCoercible = /*@__PURE__*/ requireRequireObjectCoercible();\n\tvar iterate = /*@__PURE__*/ requireIterate();\n\tvar MapHelpers = /*@__PURE__*/ requireMapHelpers();\n\tvar IS_PURE = /*@__PURE__*/ requireIsPure();\n\tvar fails = /*@__PURE__*/ requireFails();\n\n\tvar Map = MapHelpers.Map;\n\tvar has = MapHelpers.has;\n\tvar get = MapHelpers.get;\n\tvar set = MapHelpers.set;\n\tvar push = uncurryThis([].push);\n\n\t// https://bugs.webkit.org/show_bug.cgi?id=271524\n\tvar DOES_NOT_WORK_WITH_PRIMITIVES = IS_PURE || fails(function () {\n\t return Map.groupBy('ab', function (it) {\n\t return it;\n\t }).get('a').length !== 1;\n\t});\n\n\t// `Map.groupBy` method\n\t// https://tc39.es/ecma262/#sec-map.groupby\n\t$({ target: 'Map', stat: true, forced: IS_PURE || DOES_NOT_WORK_WITH_PRIMITIVES }, {\n\t groupBy: function groupBy(items, callbackfn) {\n\t requireObjectCoercible(items);\n\t aCallable(callbackfn);\n\t var map = new Map();\n\t var k = 0;\n\t iterate(items, function (value) {\n\t var key = callbackfn(value, k++);\n\t if (!has(map, key)) set(map, key, [value]);\n\t else push(get(map, key), value);\n\t });\n\t return map;\n\t }\n\t});\n\treturn es_map_groupBy;\n}\n\nvar es_string_iterator = {};\n\nvar stringMultibyte;\nvar hasRequiredStringMultibyte;\n\nfunction requireStringMultibyte () {\n\tif (hasRequiredStringMultibyte) return stringMultibyte;\n\thasRequiredStringMultibyte = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar toIntegerOrInfinity = /*@__PURE__*/ requireToIntegerOrInfinity();\n\tvar toString = /*@__PURE__*/ requireToString();\n\tvar requireObjectCoercible = /*@__PURE__*/ requireRequireObjectCoercible();\n\n\tvar charAt = uncurryThis(''.charAt);\n\tvar charCodeAt = uncurryThis(''.charCodeAt);\n\tvar stringSlice = uncurryThis(''.slice);\n\n\tvar createMethod = function (CONVERT_TO_STRING) {\n\t return function ($this, pos) {\n\t var S = toString(requireObjectCoercible($this));\n\t var position = toIntegerOrInfinity(pos);\n\t var size = S.length;\n\t var first, second;\n\t if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n\t first = charCodeAt(S, position);\n\t return first < 0xD800 || first > 0xDBFF || position + 1 === size\n\t || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF\n\t ? CONVERT_TO_STRING\n\t ? charAt(S, position)\n\t : first\n\t : CONVERT_TO_STRING\n\t ? stringSlice(S, position, position + 2)\n\t : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n\t };\n\t};\n\n\tstringMultibyte = {\n\t // `String.prototype.codePointAt` method\n\t // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n\t codeAt: createMethod(false),\n\t // `String.prototype.at` method\n\t // https://github.com/mathiasbynens/String.prototype.at\n\t charAt: createMethod(true)\n\t};\n\treturn stringMultibyte;\n}\n\nvar hasRequiredEs_string_iterator;\n\nfunction requireEs_string_iterator () {\n\tif (hasRequiredEs_string_iterator) return es_string_iterator;\n\thasRequiredEs_string_iterator = 1;\n\tvar charAt = /*@__PURE__*/ requireStringMultibyte().charAt;\n\tvar toString = /*@__PURE__*/ requireToString();\n\tvar InternalStateModule = /*@__PURE__*/ requireInternalState();\n\tvar defineIterator = /*@__PURE__*/ requireIteratorDefine();\n\tvar createIterResultObject = /*@__PURE__*/ requireCreateIterResultObject();\n\n\tvar STRING_ITERATOR = 'String Iterator';\n\tvar setInternalState = InternalStateModule.set;\n\tvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n\t// `String.prototype[@@iterator]` method\n\t// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\n\tdefineIterator(String, 'String', function (iterated) {\n\t setInternalState(this, {\n\t type: STRING_ITERATOR,\n\t string: toString(iterated),\n\t index: 0\n\t });\n\t// `%StringIteratorPrototype%.next` method\n\t// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n\t}, function next() {\n\t var state = getInternalState(this);\n\t var string = state.string;\n\t var index = state.index;\n\t var point;\n\t if (index >= string.length) return createIterResultObject(undefined, true);\n\t point = charAt(string, index);\n\t state.index += point.length;\n\t return createIterResultObject(point, false);\n\t});\n\treturn es_string_iterator;\n}\n\nvar map$2;\nvar hasRequiredMap$2;\n\nfunction requireMap$2 () {\n\tif (hasRequiredMap$2) return map$2;\n\thasRequiredMap$2 = 1;\n\trequireEs_array_iterator();\n\trequireEs_map();\n\trequireEs_map_groupBy();\n\trequireEs_string_iterator();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tmap$2 = path.Map;\n\treturn map$2;\n}\n\nvar map$1;\nvar hasRequiredMap$1;\n\nfunction requireMap$1 () {\n\tif (hasRequiredMap$1) return map$1;\n\thasRequiredMap$1 = 1;\n\tvar parent = /*@__PURE__*/ requireMap$2();\n\trequireWeb_domCollections_iterator();\n\n\tmap$1 = parent;\n\treturn map$1;\n}\n\nvar map;\nvar hasRequiredMap;\n\nfunction requireMap () {\n\tif (hasRequiredMap) return map;\n\thasRequiredMap = 1;\n\tmap = /*@__PURE__*/ requireMap$1();\n\treturn map;\n}\n\nvar mapExports = requireMap();\nvar _Map = /*@__PURE__*/getDefaultExportFromCjs(mapExports);\n\n/**\n * This class can store groups and options specific for groups.\n */\nclass Groups {\n /**\n * @ignore\n */\n constructor() {\n this.clear();\n this._defaultIndex = 0;\n this._groupIndex = 0;\n this._defaultGroups = [{\n border: \"#2B7CE9\",\n background: \"#97C2FC\",\n highlight: {\n border: \"#2B7CE9\",\n background: \"#D2E5FF\"\n },\n hover: {\n border: \"#2B7CE9\",\n background: \"#D2E5FF\"\n }\n },\n // 0: blue\n {\n border: \"#FFA500\",\n background: \"#FFFF00\",\n highlight: {\n border: \"#FFA500\",\n background: \"#FFFFA3\"\n },\n hover: {\n border: \"#FFA500\",\n background: \"#FFFFA3\"\n }\n },\n // 1: yellow\n {\n border: \"#FA0A10\",\n background: \"#FB7E81\",\n highlight: {\n border: \"#FA0A10\",\n background: \"#FFAFB1\"\n },\n hover: {\n border: \"#FA0A10\",\n background: \"#FFAFB1\"\n }\n },\n // 2: red\n {\n border: \"#41A906\",\n background: \"#7BE141\",\n highlight: {\n border: \"#41A906\",\n background: \"#A1EC76\"\n },\n hover: {\n border: \"#41A906\",\n background: \"#A1EC76\"\n }\n },\n // 3: green\n {\n border: \"#E129F0\",\n background: \"#EB7DF4\",\n highlight: {\n border: \"#E129F0\",\n background: \"#F0B3F5\"\n },\n hover: {\n border: \"#E129F0\",\n background: \"#F0B3F5\"\n }\n },\n // 4: magenta\n {\n border: \"#7C29F0\",\n background: \"#AD85E4\",\n highlight: {\n border: \"#7C29F0\",\n background: \"#D3BDF0\"\n },\n hover: {\n border: \"#7C29F0\",\n background: \"#D3BDF0\"\n }\n },\n // 5: purple\n {\n border: \"#C37F00\",\n background: \"#FFA807\",\n highlight: {\n border: \"#C37F00\",\n background: \"#FFCA66\"\n },\n hover: {\n border: \"#C37F00\",\n background: \"#FFCA66\"\n }\n },\n // 6: orange\n {\n border: \"#4220FB\",\n background: \"#6E6EFD\",\n highlight: {\n border: \"#4220FB\",\n background: \"#9B9BFD\"\n },\n hover: {\n border: \"#4220FB\",\n background: \"#9B9BFD\"\n }\n },\n // 7: darkblue\n {\n border: \"#FD5A77\",\n background: \"#FFC0CB\",\n highlight: {\n border: \"#FD5A77\",\n background: \"#FFD1D9\"\n },\n hover: {\n border: \"#FD5A77\",\n background: \"#FFD1D9\"\n }\n },\n // 8: pink\n {\n border: \"#4AD63A\",\n background: \"#C2FABC\",\n highlight: {\n border: \"#4AD63A\",\n background: \"#E6FFE3\"\n },\n hover: {\n border: \"#4AD63A\",\n background: \"#E6FFE3\"\n }\n },\n // 9: mint\n\n {\n border: \"#990000\",\n background: \"#EE0000\",\n highlight: {\n border: \"#BB0000\",\n background: \"#FF3333\"\n },\n hover: {\n border: \"#BB0000\",\n background: \"#FF3333\"\n }\n },\n // 10:bright red\n\n {\n border: \"#FF6000\",\n background: \"#FF6000\",\n highlight: {\n border: \"#FF6000\",\n background: \"#FF6000\"\n },\n hover: {\n border: \"#FF6000\",\n background: \"#FF6000\"\n }\n },\n // 12: real orange\n {\n border: \"#97C2FC\",\n background: \"#2B7CE9\",\n highlight: {\n border: \"#D2E5FF\",\n background: \"#2B7CE9\"\n },\n hover: {\n border: \"#D2E5FF\",\n background: \"#2B7CE9\"\n }\n },\n // 13: blue\n {\n border: \"#399605\",\n background: \"#255C03\",\n highlight: {\n border: \"#399605\",\n background: \"#255C03\"\n },\n hover: {\n border: \"#399605\",\n background: \"#255C03\"\n }\n },\n // 14: green\n {\n border: \"#B70054\",\n background: \"#FF007E\",\n highlight: {\n border: \"#B70054\",\n background: \"#FF007E\"\n },\n hover: {\n border: \"#B70054\",\n background: \"#FF007E\"\n }\n },\n // 15: magenta\n {\n border: \"#AD85E4\",\n background: \"#7C29F0\",\n highlight: {\n border: \"#D3BDF0\",\n background: \"#7C29F0\"\n },\n hover: {\n border: \"#D3BDF0\",\n background: \"#7C29F0\"\n }\n },\n // 16: purple\n {\n border: \"#4557FA\",\n background: \"#000EA1\",\n highlight: {\n border: \"#6E6EFD\",\n background: \"#000EA1\"\n },\n hover: {\n border: \"#6E6EFD\",\n background: \"#000EA1\"\n }\n },\n // 17: darkblue\n {\n border: \"#FFC0CB\",\n background: \"#FD5A77\",\n highlight: {\n border: \"#FFD1D9\",\n background: \"#FD5A77\"\n },\n hover: {\n border: \"#FFD1D9\",\n background: \"#FD5A77\"\n }\n },\n // 18: pink\n {\n border: \"#C2FABC\",\n background: \"#74D66A\",\n highlight: {\n border: \"#E6FFE3\",\n background: \"#74D66A\"\n },\n hover: {\n border: \"#E6FFE3\",\n background: \"#74D66A\"\n }\n },\n // 19: mint\n\n {\n border: \"#EE0000\",\n background: \"#990000\",\n highlight: {\n border: \"#FF3333\",\n background: \"#BB0000\"\n },\n hover: {\n border: \"#FF3333\",\n background: \"#BB0000\"\n }\n } // 20:bright red\n ];\n this.options = {};\n this.defaultOptions = {\n useDefaultGroups: true\n };\n _Object$assign(this.options, this.defaultOptions);\n }\n\n /**\n *\n * @param {object} options\n */\n setOptions(options) {\n const optionFields = [\"useDefaultGroups\"];\n if (options !== undefined) {\n for (const groupName in options) {\n if (Object.prototype.hasOwnProperty.call(options, groupName)) {\n if (_indexOfInstanceProperty(optionFields).call(optionFields, groupName) === -1) {\n const group = options[groupName];\n this.add(groupName, group);\n }\n }\n }\n }\n }\n\n /**\n * Clear all groups\n */\n clear() {\n this._groups = new _Map();\n this._groupNames = [];\n }\n\n /**\n * Get group options of a groupname.\n * If groupname is not found, a new group may be created.\n * @param {*} groupname Can be a number, string, Date, etc.\n * @param {boolean} [shouldCreate] If true, create a new group\n * @returns {object} The found or created group\n */\n get(groupname) {\n let shouldCreate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n let group = this._groups.get(groupname);\n if (group === undefined && shouldCreate) {\n if (this.options.useDefaultGroups === false && this._groupNames.length > 0) {\n // create new group\n const index = this._groupIndex % this._groupNames.length;\n ++this._groupIndex;\n group = {};\n group.color = this._groups.get(this._groupNames[index]);\n this._groups.set(groupname, group);\n } else {\n // create new group\n const index = this._defaultIndex % this._defaultGroups.length;\n this._defaultIndex++;\n group = {};\n group.color = this._defaultGroups[index];\n this._groups.set(groupname, group);\n }\n }\n return group;\n }\n\n /**\n * Add custom group style.\n * @param {string} groupName - The name of the group, a new group will be\n * created if a group with the same name doesn't exist, otherwise the old\n * groups style will be overwritten.\n * @param {object} style - An object containing borderColor, backgroundColor,\n * etc.\n * @returns {object} The created group object.\n */\n add(groupName, style) {\n // Only push group name once to prevent duplicates which would consume more\n // RAM and also skew the distribution towards more often updated groups,\n // neither of which is desirable.\n if (!this._groups.has(groupName)) {\n this._groupNames.push(groupName);\n }\n this._groups.set(groupName, style);\n return style;\n }\n}\n\nvar es_number_isNan = {};\n\nvar hasRequiredEs_number_isNan;\n\nfunction requireEs_number_isNan () {\n\tif (hasRequiredEs_number_isNan) return es_number_isNan;\n\thasRequiredEs_number_isNan = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\n\t// `Number.isNaN` method\n\t// https://tc39.es/ecma262/#sec-number.isnan\n\t$({ target: 'Number', stat: true }, {\n\t isNaN: function isNaN(number) {\n\t // eslint-disable-next-line no-self-compare -- NaN check\n\t return number !== number;\n\t }\n\t});\n\treturn es_number_isNan;\n}\n\nvar isNan$2;\nvar hasRequiredIsNan$2;\n\nfunction requireIsNan$2 () {\n\tif (hasRequiredIsNan$2) return isNan$2;\n\thasRequiredIsNan$2 = 1;\n\trequireEs_number_isNan();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tisNan$2 = path.Number.isNaN;\n\treturn isNan$2;\n}\n\nvar isNan$1;\nvar hasRequiredIsNan$1;\n\nfunction requireIsNan$1 () {\n\tif (hasRequiredIsNan$1) return isNan$1;\n\thasRequiredIsNan$1 = 1;\n\tvar parent = /*@__PURE__*/ requireIsNan$2();\n\n\tisNan$1 = parent;\n\treturn isNan$1;\n}\n\nvar isNan;\nvar hasRequiredIsNan;\n\nfunction requireIsNan () {\n\tif (hasRequiredIsNan) return isNan;\n\thasRequiredIsNan = 1;\n\tisNan = /*@__PURE__*/ requireIsNan$1();\n\treturn isNan;\n}\n\nvar isNanExports = requireIsNan();\nvar _Number$isNaN = /*@__PURE__*/getDefaultExportFromCjs(isNanExports);\n\nvar es_number_isFinite = {};\n\nvar numberIsFinite;\nvar hasRequiredNumberIsFinite;\n\nfunction requireNumberIsFinite () {\n\tif (hasRequiredNumberIsFinite) return numberIsFinite;\n\thasRequiredNumberIsFinite = 1;\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\n\tvar globalIsFinite = globalThis.isFinite;\n\n\t// `Number.isFinite` method\n\t// https://tc39.es/ecma262/#sec-number.isfinite\n\t// eslint-disable-next-line es/no-number-isfinite -- safe\n\tnumberIsFinite = Number.isFinite || function isFinite(it) {\n\t return typeof it == 'number' && globalIsFinite(it);\n\t};\n\treturn numberIsFinite;\n}\n\nvar hasRequiredEs_number_isFinite;\n\nfunction requireEs_number_isFinite () {\n\tif (hasRequiredEs_number_isFinite) return es_number_isFinite;\n\thasRequiredEs_number_isFinite = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar numberIsFinite = /*@__PURE__*/ requireNumberIsFinite();\n\n\t// `Number.isFinite` method\n\t// https://tc39.es/ecma262/#sec-number.isfinite\n\t$({ target: 'Number', stat: true }, { isFinite: numberIsFinite });\n\treturn es_number_isFinite;\n}\n\nvar _isFinite$2;\nvar hasRequired_isFinite$2;\n\nfunction require_isFinite$2 () {\n\tif (hasRequired_isFinite$2) return _isFinite$2;\n\thasRequired_isFinite$2 = 1;\n\trequireEs_number_isFinite();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\t_isFinite$2 = path.Number.isFinite;\n\treturn _isFinite$2;\n}\n\nvar _isFinite$1;\nvar hasRequired_isFinite$1;\n\nfunction require_isFinite$1 () {\n\tif (hasRequired_isFinite$1) return _isFinite$1;\n\thasRequired_isFinite$1 = 1;\n\tvar parent = /*@__PURE__*/ require_isFinite$2();\n\n\t_isFinite$1 = parent;\n\treturn _isFinite$1;\n}\n\nvar _isFinite;\nvar hasRequired_isFinite;\n\nfunction require_isFinite () {\n\tif (hasRequired_isFinite) return _isFinite;\n\thasRequired_isFinite = 1;\n\t_isFinite = /*@__PURE__*/ require_isFinite$1();\n\treturn _isFinite;\n}\n\nvar _isFiniteExports = require_isFinite();\nvar _Number$isFinite = /*@__PURE__*/getDefaultExportFromCjs(_isFiniteExports);\n\nvar es_array_some = {};\n\nvar hasRequiredEs_array_some;\n\nfunction requireEs_array_some () {\n\tif (hasRequiredEs_array_some) return es_array_some;\n\thasRequiredEs_array_some = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar $some = /*@__PURE__*/ requireArrayIteration().some;\n\tvar arrayMethodIsStrict = /*@__PURE__*/ requireArrayMethodIsStrict();\n\n\tvar STRICT_METHOD = arrayMethodIsStrict('some');\n\n\t// `Array.prototype.some` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.some\n\t$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n\t some: function some(callbackfn /* , thisArg */) {\n\t return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t }\n\t});\n\treturn es_array_some;\n}\n\nvar some$3;\nvar hasRequiredSome$3;\n\nfunction requireSome$3 () {\n\tif (hasRequiredSome$3) return some$3;\n\thasRequiredSome$3 = 1;\n\trequireEs_array_some();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tsome$3 = getBuiltInPrototypeMethod('Array', 'some');\n\treturn some$3;\n}\n\nvar some$2;\nvar hasRequiredSome$2;\n\nfunction requireSome$2 () {\n\tif (hasRequiredSome$2) return some$2;\n\thasRequiredSome$2 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireSome$3();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\tsome$2 = function (it) {\n\t var own = it.some;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.some) ? method : own;\n\t};\n\treturn some$2;\n}\n\nvar some$1;\nvar hasRequiredSome$1;\n\nfunction requireSome$1 () {\n\tif (hasRequiredSome$1) return some$1;\n\thasRequiredSome$1 = 1;\n\tvar parent = /*@__PURE__*/ requireSome$2();\n\n\tsome$1 = parent;\n\treturn some$1;\n}\n\nvar some;\nvar hasRequiredSome;\n\nfunction requireSome () {\n\tif (hasRequiredSome) return some;\n\thasRequiredSome = 1;\n\tsome = /*@__PURE__*/ requireSome$1();\n\treturn some;\n}\n\nvar someExports = requireSome();\nvar _someInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(someExports);\n\nvar defineProperty$5 = {exports: {}};\n\nvar es_object_defineProperty = {};\n\nvar hasRequiredEs_object_defineProperty;\n\nfunction requireEs_object_defineProperty () {\n\tif (hasRequiredEs_object_defineProperty) return es_object_defineProperty;\n\thasRequiredEs_object_defineProperty = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar defineProperty = /*@__PURE__*/ requireObjectDefineProperty().f;\n\n\t// `Object.defineProperty` method\n\t// https://tc39.es/ecma262/#sec-object.defineproperty\n\t// eslint-disable-next-line es/no-object-defineproperty -- safe\n\t$({ target: 'Object', stat: true, forced: Object.defineProperty !== defineProperty, sham: !DESCRIPTORS }, {\n\t defineProperty: defineProperty\n\t});\n\treturn es_object_defineProperty;\n}\n\nvar hasRequiredDefineProperty$5;\n\nfunction requireDefineProperty$5 () {\n\tif (hasRequiredDefineProperty$5) return defineProperty$5.exports;\n\thasRequiredDefineProperty$5 = 1;\n\trequireEs_object_defineProperty();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tvar Object = path.Object;\n\n\tvar defineProperty = defineProperty$5.exports = function defineProperty(it, key, desc) {\n\t return Object.defineProperty(it, key, desc);\n\t};\n\n\tif (Object.defineProperty.sham) defineProperty.sham = true;\n\treturn defineProperty$5.exports;\n}\n\nvar defineProperty$4;\nvar hasRequiredDefineProperty$4;\n\nfunction requireDefineProperty$4 () {\n\tif (hasRequiredDefineProperty$4) return defineProperty$4;\n\thasRequiredDefineProperty$4 = 1;\n\tvar parent = /*@__PURE__*/ requireDefineProperty$5();\n\n\tdefineProperty$4 = parent;\n\treturn defineProperty$4;\n}\n\nvar defineProperty$3;\nvar hasRequiredDefineProperty$3;\n\nfunction requireDefineProperty$3 () {\n\tif (hasRequiredDefineProperty$3) return defineProperty$3;\n\thasRequiredDefineProperty$3 = 1;\n\tvar parent = /*@__PURE__*/ requireDefineProperty$4();\n\n\tdefineProperty$3 = parent;\n\treturn defineProperty$3;\n}\n\nvar defineProperty$2;\nvar hasRequiredDefineProperty$2;\n\nfunction requireDefineProperty$2 () {\n\tif (hasRequiredDefineProperty$2) return defineProperty$2;\n\thasRequiredDefineProperty$2 = 1;\n\tvar parent = /*@__PURE__*/ requireDefineProperty$3();\n\n\tdefineProperty$2 = parent;\n\treturn defineProperty$2;\n}\n\nvar defineProperty$1;\nvar hasRequiredDefineProperty$1;\n\nfunction requireDefineProperty$1 () {\n\tif (hasRequiredDefineProperty$1) return defineProperty$1;\n\thasRequiredDefineProperty$1 = 1;\n\tdefineProperty$1 = /*@__PURE__*/ requireDefineProperty$2();\n\treturn defineProperty$1;\n}\n\nvar definePropertyExports$1 = /*@__PURE__*/ requireDefineProperty$1();\nvar _Object$defineProperty$1 = /*@__PURE__*/getDefaultExportFromCjs(definePropertyExports$1);\n\nvar esnext_function_metadata = {};\n\nvar hasRequiredEsnext_function_metadata;\n\nfunction requireEsnext_function_metadata () {\n\tif (hasRequiredEsnext_function_metadata) return esnext_function_metadata;\n\thasRequiredEsnext_function_metadata = 1;\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\tvar defineProperty = /*@__PURE__*/ requireObjectDefineProperty().f;\n\n\tvar METADATA = wellKnownSymbol('metadata');\n\tvar FunctionPrototype = Function.prototype;\n\n\t// Function.prototype[@@metadata]\n\t// https://github.com/tc39/proposal-decorator-metadata\n\tif (FunctionPrototype[METADATA] === undefined) {\n\t defineProperty(FunctionPrototype, METADATA, {\n\t value: null\n\t });\n\t}\n\treturn esnext_function_metadata;\n}\n\nvar esnext_symbol_asyncDispose = {};\n\nvar hasRequiredEsnext_symbol_asyncDispose;\n\nfunction requireEsnext_symbol_asyncDispose () {\n\tif (hasRequiredEsnext_symbol_asyncDispose) return esnext_symbol_asyncDispose;\n\thasRequiredEsnext_symbol_asyncDispose = 1;\n\t// TODO: Remove from `core-js@4`\n\trequireEs_symbol_asyncDispose();\n\treturn esnext_symbol_asyncDispose;\n}\n\nvar esnext_symbol_dispose = {};\n\nvar hasRequiredEsnext_symbol_dispose;\n\nfunction requireEsnext_symbol_dispose () {\n\tif (hasRequiredEsnext_symbol_dispose) return esnext_symbol_dispose;\n\thasRequiredEsnext_symbol_dispose = 1;\n\t// TODO: Remove from `core-js@4`\n\trequireEs_symbol_dispose();\n\treturn esnext_symbol_dispose;\n}\n\nvar esnext_symbol_metadata = {};\n\nvar hasRequiredEsnext_symbol_metadata;\n\nfunction requireEsnext_symbol_metadata () {\n\tif (hasRequiredEsnext_symbol_metadata) return esnext_symbol_metadata;\n\thasRequiredEsnext_symbol_metadata = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.metadata` well-known symbol\n\t// https://github.com/tc39/proposal-decorators\n\tdefineWellKnownSymbol('metadata');\n\treturn esnext_symbol_metadata;\n}\n\nvar symbol$2;\nvar hasRequiredSymbol$2;\n\nfunction requireSymbol$2 () {\n\tif (hasRequiredSymbol$2) return symbol$2;\n\thasRequiredSymbol$2 = 1;\n\tvar parent = /*@__PURE__*/ requireSymbol$4();\n\n\trequireEsnext_function_metadata();\n\trequireEsnext_symbol_asyncDispose();\n\trequireEsnext_symbol_dispose();\n\trequireEsnext_symbol_metadata();\n\n\tsymbol$2 = parent;\n\treturn symbol$2;\n}\n\nvar esnext_symbol_isRegisteredSymbol = {};\n\nvar symbolIsRegistered;\nvar hasRequiredSymbolIsRegistered;\n\nfunction requireSymbolIsRegistered () {\n\tif (hasRequiredSymbolIsRegistered) return symbolIsRegistered;\n\thasRequiredSymbolIsRegistered = 1;\n\tvar getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\n\tvar Symbol = getBuiltIn('Symbol');\n\tvar keyFor = Symbol.keyFor;\n\tvar thisSymbolValue = uncurryThis(Symbol.prototype.valueOf);\n\n\t// `Symbol.isRegisteredSymbol` method\n\t// https://tc39.es/proposal-symbol-predicates/#sec-symbol-isregisteredsymbol\n\tsymbolIsRegistered = Symbol.isRegisteredSymbol || function isRegisteredSymbol(value) {\n\t try {\n\t return keyFor(thisSymbolValue(value)) !== undefined;\n\t } catch (error) {\n\t return false;\n\t }\n\t};\n\treturn symbolIsRegistered;\n}\n\nvar hasRequiredEsnext_symbol_isRegisteredSymbol;\n\nfunction requireEsnext_symbol_isRegisteredSymbol () {\n\tif (hasRequiredEsnext_symbol_isRegisteredSymbol) return esnext_symbol_isRegisteredSymbol;\n\thasRequiredEsnext_symbol_isRegisteredSymbol = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar isRegisteredSymbol = /*@__PURE__*/ requireSymbolIsRegistered();\n\n\t// `Symbol.isRegisteredSymbol` method\n\t// https://tc39.es/proposal-symbol-predicates/#sec-symbol-isregisteredsymbol\n\t$({ target: 'Symbol', stat: true }, {\n\t isRegisteredSymbol: isRegisteredSymbol\n\t});\n\treturn esnext_symbol_isRegisteredSymbol;\n}\n\nvar esnext_symbol_isWellKnownSymbol = {};\n\nvar symbolIsWellKnown;\nvar hasRequiredSymbolIsWellKnown;\n\nfunction requireSymbolIsWellKnown () {\n\tif (hasRequiredSymbolIsWellKnown) return symbolIsWellKnown;\n\thasRequiredSymbolIsWellKnown = 1;\n\tvar shared = /*@__PURE__*/ requireShared();\n\tvar getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar isSymbol = /*@__PURE__*/ requireIsSymbol();\n\tvar wellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbol();\n\n\tvar Symbol = getBuiltIn('Symbol');\n\tvar $isWellKnownSymbol = Symbol.isWellKnownSymbol;\n\tvar getOwnPropertyNames = getBuiltIn('Object', 'getOwnPropertyNames');\n\tvar thisSymbolValue = uncurryThis(Symbol.prototype.valueOf);\n\tvar WellKnownSymbolsStore = shared('wks');\n\n\tfor (var i = 0, symbolKeys = getOwnPropertyNames(Symbol), symbolKeysLength = symbolKeys.length; i < symbolKeysLength; i++) {\n\t // some old engines throws on access to some keys like `arguments` or `caller`\n\t try {\n\t var symbolKey = symbolKeys[i];\n\t if (isSymbol(Symbol[symbolKey])) wellKnownSymbol(symbolKey);\n\t } catch (error) { /* empty */ }\n\t}\n\n\t// `Symbol.isWellKnownSymbol` method\n\t// https://tc39.es/proposal-symbol-predicates/#sec-symbol-iswellknownsymbol\n\t// We should patch it for newly added well-known symbols. If it's not required, this module just will not be injected\n\tsymbolIsWellKnown = function isWellKnownSymbol(value) {\n\t if ($isWellKnownSymbol && $isWellKnownSymbol(value)) return true;\n\t try {\n\t var symbol = thisSymbolValue(value);\n\t for (var j = 0, keys = getOwnPropertyNames(WellKnownSymbolsStore), keysLength = keys.length; j < keysLength; j++) {\n\t // eslint-disable-next-line eqeqeq -- polyfilled symbols case\n\t if (WellKnownSymbolsStore[keys[j]] == symbol) return true;\n\t }\n\t } catch (error) { /* empty */ }\n\t return false;\n\t};\n\treturn symbolIsWellKnown;\n}\n\nvar hasRequiredEsnext_symbol_isWellKnownSymbol;\n\nfunction requireEsnext_symbol_isWellKnownSymbol () {\n\tif (hasRequiredEsnext_symbol_isWellKnownSymbol) return esnext_symbol_isWellKnownSymbol;\n\thasRequiredEsnext_symbol_isWellKnownSymbol = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar isWellKnownSymbol = /*@__PURE__*/ requireSymbolIsWellKnown();\n\n\t// `Symbol.isWellKnownSymbol` method\n\t// https://tc39.es/proposal-symbol-predicates/#sec-symbol-iswellknownsymbol\n\t// We should patch it for newly added well-known symbols. If it's not required, this module just will not be injected\n\t$({ target: 'Symbol', stat: true, forced: true }, {\n\t isWellKnownSymbol: isWellKnownSymbol\n\t});\n\treturn esnext_symbol_isWellKnownSymbol;\n}\n\nvar esnext_symbol_customMatcher = {};\n\nvar hasRequiredEsnext_symbol_customMatcher;\n\nfunction requireEsnext_symbol_customMatcher () {\n\tif (hasRequiredEsnext_symbol_customMatcher) return esnext_symbol_customMatcher;\n\thasRequiredEsnext_symbol_customMatcher = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.customMatcher` well-known symbol\n\t// https://github.com/tc39/proposal-pattern-matching\n\tdefineWellKnownSymbol('customMatcher');\n\treturn esnext_symbol_customMatcher;\n}\n\nvar esnext_symbol_observable = {};\n\nvar hasRequiredEsnext_symbol_observable;\n\nfunction requireEsnext_symbol_observable () {\n\tif (hasRequiredEsnext_symbol_observable) return esnext_symbol_observable;\n\thasRequiredEsnext_symbol_observable = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.observable` well-known symbol\n\t// https://github.com/tc39/proposal-observable\n\tdefineWellKnownSymbol('observable');\n\treturn esnext_symbol_observable;\n}\n\nvar esnext_symbol_isRegistered = {};\n\nvar hasRequiredEsnext_symbol_isRegistered;\n\nfunction requireEsnext_symbol_isRegistered () {\n\tif (hasRequiredEsnext_symbol_isRegistered) return esnext_symbol_isRegistered;\n\thasRequiredEsnext_symbol_isRegistered = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar isRegisteredSymbol = /*@__PURE__*/ requireSymbolIsRegistered();\n\n\t// `Symbol.isRegistered` method\n\t// obsolete version of https://tc39.es/proposal-symbol-predicates/#sec-symbol-isregisteredsymbol\n\t$({ target: 'Symbol', stat: true, name: 'isRegisteredSymbol' }, {\n\t isRegistered: isRegisteredSymbol\n\t});\n\treturn esnext_symbol_isRegistered;\n}\n\nvar esnext_symbol_isWellKnown = {};\n\nvar hasRequiredEsnext_symbol_isWellKnown;\n\nfunction requireEsnext_symbol_isWellKnown () {\n\tif (hasRequiredEsnext_symbol_isWellKnown) return esnext_symbol_isWellKnown;\n\thasRequiredEsnext_symbol_isWellKnown = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar isWellKnownSymbol = /*@__PURE__*/ requireSymbolIsWellKnown();\n\n\t// `Symbol.isWellKnown` method\n\t// obsolete version of https://tc39.es/proposal-symbol-predicates/#sec-symbol-iswellknownsymbol\n\t// We should patch it for newly added well-known symbols. If it's not required, this module just will not be injected\n\t$({ target: 'Symbol', stat: true, name: 'isWellKnownSymbol', forced: true }, {\n\t isWellKnown: isWellKnownSymbol\n\t});\n\treturn esnext_symbol_isWellKnown;\n}\n\nvar esnext_symbol_matcher = {};\n\nvar hasRequiredEsnext_symbol_matcher;\n\nfunction requireEsnext_symbol_matcher () {\n\tif (hasRequiredEsnext_symbol_matcher) return esnext_symbol_matcher;\n\thasRequiredEsnext_symbol_matcher = 1;\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.matcher` well-known symbol\n\t// https://github.com/tc39/proposal-pattern-matching\n\tdefineWellKnownSymbol('matcher');\n\treturn esnext_symbol_matcher;\n}\n\nvar esnext_symbol_metadataKey = {};\n\nvar hasRequiredEsnext_symbol_metadataKey;\n\nfunction requireEsnext_symbol_metadataKey () {\n\tif (hasRequiredEsnext_symbol_metadataKey) return esnext_symbol_metadataKey;\n\thasRequiredEsnext_symbol_metadataKey = 1;\n\t// TODO: Remove from `core-js@4`\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.metadataKey` well-known symbol\n\t// https://github.com/tc39/proposal-decorator-metadata\n\tdefineWellKnownSymbol('metadataKey');\n\treturn esnext_symbol_metadataKey;\n}\n\nvar esnext_symbol_patternMatch = {};\n\nvar hasRequiredEsnext_symbol_patternMatch;\n\nfunction requireEsnext_symbol_patternMatch () {\n\tif (hasRequiredEsnext_symbol_patternMatch) return esnext_symbol_patternMatch;\n\thasRequiredEsnext_symbol_patternMatch = 1;\n\t// TODO: remove from `core-js@4`\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\t// `Symbol.patternMatch` well-known symbol\n\t// https://github.com/tc39/proposal-pattern-matching\n\tdefineWellKnownSymbol('patternMatch');\n\treturn esnext_symbol_patternMatch;\n}\n\nvar esnext_symbol_replaceAll = {};\n\nvar hasRequiredEsnext_symbol_replaceAll;\n\nfunction requireEsnext_symbol_replaceAll () {\n\tif (hasRequiredEsnext_symbol_replaceAll) return esnext_symbol_replaceAll;\n\thasRequiredEsnext_symbol_replaceAll = 1;\n\t// TODO: remove from `core-js@4`\n\tvar defineWellKnownSymbol = /*@__PURE__*/ requireWellKnownSymbolDefine();\n\n\tdefineWellKnownSymbol('replaceAll');\n\treturn esnext_symbol_replaceAll;\n}\n\nvar symbol$1;\nvar hasRequiredSymbol$1;\n\nfunction requireSymbol$1 () {\n\tif (hasRequiredSymbol$1) return symbol$1;\n\thasRequiredSymbol$1 = 1;\n\tvar parent = /*@__PURE__*/ requireSymbol$2();\n\trequireEsnext_symbol_isRegisteredSymbol();\n\trequireEsnext_symbol_isWellKnownSymbol();\n\trequireEsnext_symbol_customMatcher();\n\trequireEsnext_symbol_observable();\n\t// TODO: Remove from `core-js@4`\n\trequireEsnext_symbol_isRegistered();\n\trequireEsnext_symbol_isWellKnown();\n\trequireEsnext_symbol_matcher();\n\trequireEsnext_symbol_metadataKey();\n\trequireEsnext_symbol_patternMatch();\n\trequireEsnext_symbol_replaceAll();\n\n\tsymbol$1 = parent;\n\treturn symbol$1;\n}\n\nvar symbol;\nvar hasRequiredSymbol;\n\nfunction requireSymbol () {\n\tif (hasRequiredSymbol) return symbol;\n\thasRequiredSymbol = 1;\n\tsymbol = /*@__PURE__*/ requireSymbol$1();\n\treturn symbol;\n}\n\nvar symbolExports = /*@__PURE__*/ requireSymbol();\nvar _Symbol = /*@__PURE__*/getDefaultExportFromCjs(symbolExports);\n\nvar iterator$4;\nvar hasRequiredIterator$4;\n\nfunction requireIterator$4 () {\n\tif (hasRequiredIterator$4) return iterator$4;\n\thasRequiredIterator$4 = 1;\n\trequireEs_array_iterator();\n\trequireEs_string_iterator();\n\trequireEs_symbol_iterator();\n\tvar WrappedWellKnownSymbolModule = /*@__PURE__*/ requireWellKnownSymbolWrapped();\n\n\titerator$4 = WrappedWellKnownSymbolModule.f('iterator');\n\treturn iterator$4;\n}\n\nvar iterator$3;\nvar hasRequiredIterator$3;\n\nfunction requireIterator$3 () {\n\tif (hasRequiredIterator$3) return iterator$3;\n\thasRequiredIterator$3 = 1;\n\tvar parent = /*@__PURE__*/ requireIterator$4();\n\trequireWeb_domCollections_iterator();\n\n\titerator$3 = parent;\n\treturn iterator$3;\n}\n\nvar iterator$2;\nvar hasRequiredIterator$2;\n\nfunction requireIterator$2 () {\n\tif (hasRequiredIterator$2) return iterator$2;\n\thasRequiredIterator$2 = 1;\n\tvar parent = /*@__PURE__*/ requireIterator$3();\n\n\titerator$2 = parent;\n\treturn iterator$2;\n}\n\nvar iterator$1;\nvar hasRequiredIterator$1;\n\nfunction requireIterator$1 () {\n\tif (hasRequiredIterator$1) return iterator$1;\n\thasRequiredIterator$1 = 1;\n\tvar parent = /*@__PURE__*/ requireIterator$2();\n\n\titerator$1 = parent;\n\treturn iterator$1;\n}\n\nvar iterator;\nvar hasRequiredIterator;\n\nfunction requireIterator () {\n\tif (hasRequiredIterator) return iterator;\n\thasRequiredIterator = 1;\n\titerator = /*@__PURE__*/ requireIterator$1();\n\treturn iterator;\n}\n\nvar iteratorExports = /*@__PURE__*/ requireIterator();\nvar _Symbol$iterator = /*@__PURE__*/getDefaultExportFromCjs(iteratorExports);\n\nfunction _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof _Symbol && \"symbol\" == typeof _Symbol$iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof _Symbol && o.constructor === _Symbol && o !== _Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\n\nvar toPrimitive$5;\nvar hasRequiredToPrimitive$4;\n\nfunction requireToPrimitive$4 () {\n\tif (hasRequiredToPrimitive$4) return toPrimitive$5;\n\thasRequiredToPrimitive$4 = 1;\n\trequireEs_symbol_toPrimitive();\n\tvar WrappedWellKnownSymbolModule = /*@__PURE__*/ requireWellKnownSymbolWrapped();\n\n\ttoPrimitive$5 = WrappedWellKnownSymbolModule.f('toPrimitive');\n\treturn toPrimitive$5;\n}\n\nvar toPrimitive$4;\nvar hasRequiredToPrimitive$3;\n\nfunction requireToPrimitive$3 () {\n\tif (hasRequiredToPrimitive$3) return toPrimitive$4;\n\thasRequiredToPrimitive$3 = 1;\n\tvar parent = /*@__PURE__*/ requireToPrimitive$4();\n\n\ttoPrimitive$4 = parent;\n\treturn toPrimitive$4;\n}\n\nvar toPrimitive$3;\nvar hasRequiredToPrimitive$2;\n\nfunction requireToPrimitive$2 () {\n\tif (hasRequiredToPrimitive$2) return toPrimitive$3;\n\thasRequiredToPrimitive$2 = 1;\n\tvar parent = /*@__PURE__*/ requireToPrimitive$3();\n\n\ttoPrimitive$3 = parent;\n\treturn toPrimitive$3;\n}\n\nvar toPrimitive$2;\nvar hasRequiredToPrimitive$1;\n\nfunction requireToPrimitive$1 () {\n\tif (hasRequiredToPrimitive$1) return toPrimitive$2;\n\thasRequiredToPrimitive$1 = 1;\n\tvar parent = /*@__PURE__*/ requireToPrimitive$2();\n\n\ttoPrimitive$2 = parent;\n\treturn toPrimitive$2;\n}\n\nvar toPrimitive$1;\nvar hasRequiredToPrimitive;\n\nfunction requireToPrimitive () {\n\tif (hasRequiredToPrimitive) return toPrimitive$1;\n\thasRequiredToPrimitive = 1;\n\ttoPrimitive$1 = /*@__PURE__*/ requireToPrimitive$1();\n\treturn toPrimitive$1;\n}\n\nvar toPrimitiveExports = /*@__PURE__*/ requireToPrimitive();\nvar _Symbol$toPrimitive = /*@__PURE__*/getDefaultExportFromCjs(toPrimitiveExports);\n\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[_Symbol$toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r);\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\n\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\n\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? _Object$defineProperty$1(e, r, {\n value: t,\n enumerable: true,\n configurable: true,\n writable: true\n }) : e[r] = t, e;\n}\n\nvar es_parseFloat = {};\n\nvar numberParseFloat;\nvar hasRequiredNumberParseFloat;\n\nfunction requireNumberParseFloat () {\n\tif (hasRequiredNumberParseFloat) return numberParseFloat;\n\thasRequiredNumberParseFloat = 1;\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar toString = /*@__PURE__*/ requireToString();\n\tvar trim = /*@__PURE__*/ requireStringTrim().trim;\n\tvar whitespaces = /*@__PURE__*/ requireWhitespaces();\n\n\tvar charAt = uncurryThis(''.charAt);\n\tvar $parseFloat = globalThis.parseFloat;\n\tvar Symbol = globalThis.Symbol;\n\tvar ITERATOR = Symbol && Symbol.iterator;\n\tvar FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity\n\t // MS Edge 18- broken with boxed symbols\n\t || (ITERATOR && !fails(function () { $parseFloat(Object(ITERATOR)); }));\n\n\t// `parseFloat` method\n\t// https://tc39.es/ecma262/#sec-parsefloat-string\n\tnumberParseFloat = FORCED ? function parseFloat(string) {\n\t var trimmedString = trim(toString(string));\n\t var result = $parseFloat(trimmedString);\n\t return result === 0 && charAt(trimmedString, 0) === '-' ? -0 : result;\n\t} : $parseFloat;\n\treturn numberParseFloat;\n}\n\nvar hasRequiredEs_parseFloat;\n\nfunction requireEs_parseFloat () {\n\tif (hasRequiredEs_parseFloat) return es_parseFloat;\n\thasRequiredEs_parseFloat = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar $parseFloat = /*@__PURE__*/ requireNumberParseFloat();\n\n\t// `parseFloat` method\n\t// https://tc39.es/ecma262/#sec-parsefloat-string\n\t$({ global: true, forced: parseFloat !== $parseFloat }, {\n\t parseFloat: $parseFloat\n\t});\n\treturn es_parseFloat;\n}\n\nvar _parseFloat$3;\nvar hasRequired_parseFloat$2;\n\nfunction require_parseFloat$2 () {\n\tif (hasRequired_parseFloat$2) return _parseFloat$3;\n\thasRequired_parseFloat$2 = 1;\n\trequireEs_parseFloat();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\t_parseFloat$3 = path.parseFloat;\n\treturn _parseFloat$3;\n}\n\nvar _parseFloat$2;\nvar hasRequired_parseFloat$1;\n\nfunction require_parseFloat$1 () {\n\tif (hasRequired_parseFloat$1) return _parseFloat$2;\n\thasRequired_parseFloat$1 = 1;\n\tvar parent = /*@__PURE__*/ require_parseFloat$2();\n\n\t_parseFloat$2 = parent;\n\treturn _parseFloat$2;\n}\n\nvar _parseFloat$1;\nvar hasRequired_parseFloat;\n\nfunction require_parseFloat () {\n\tif (hasRequired_parseFloat) return _parseFloat$1;\n\thasRequired_parseFloat = 1;\n\t_parseFloat$1 = /*@__PURE__*/ require_parseFloat$1();\n\treturn _parseFloat$1;\n}\n\nvar _parseFloatExports = require_parseFloat();\nvar _parseFloat = /*@__PURE__*/getDefaultExportFromCjs(_parseFloatExports);\n\nvar es_object_getOwnPropertyNames = {};\n\nvar hasRequiredEs_object_getOwnPropertyNames;\n\nfunction requireEs_object_getOwnPropertyNames () {\n\tif (hasRequiredEs_object_getOwnPropertyNames) return es_object_getOwnPropertyNames;\n\thasRequiredEs_object_getOwnPropertyNames = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar getOwnPropertyNames = /*@__PURE__*/ requireObjectGetOwnPropertyNamesExternal().f;\n\n\t// eslint-disable-next-line es/no-object-getownpropertynames -- required for testing\n\tvar FAILS_ON_PRIMITIVES = fails(function () { return !Object.getOwnPropertyNames(1); });\n\n\t// `Object.getOwnPropertyNames` method\n\t// https://tc39.es/ecma262/#sec-object.getownpropertynames\n\t$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n\t getOwnPropertyNames: getOwnPropertyNames\n\t});\n\treturn es_object_getOwnPropertyNames;\n}\n\nvar getOwnPropertyNames$2;\nvar hasRequiredGetOwnPropertyNames$2;\n\nfunction requireGetOwnPropertyNames$2 () {\n\tif (hasRequiredGetOwnPropertyNames$2) return getOwnPropertyNames$2;\n\thasRequiredGetOwnPropertyNames$2 = 1;\n\trequireEs_object_getOwnPropertyNames();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tvar Object = path.Object;\n\n\tgetOwnPropertyNames$2 = function getOwnPropertyNames(it) {\n\t return Object.getOwnPropertyNames(it);\n\t};\n\treturn getOwnPropertyNames$2;\n}\n\nvar getOwnPropertyNames$1;\nvar hasRequiredGetOwnPropertyNames$1;\n\nfunction requireGetOwnPropertyNames$1 () {\n\tif (hasRequiredGetOwnPropertyNames$1) return getOwnPropertyNames$1;\n\thasRequiredGetOwnPropertyNames$1 = 1;\n\tvar parent = /*@__PURE__*/ requireGetOwnPropertyNames$2();\n\n\tgetOwnPropertyNames$1 = parent;\n\treturn getOwnPropertyNames$1;\n}\n\nvar getOwnPropertyNames;\nvar hasRequiredGetOwnPropertyNames;\n\nfunction requireGetOwnPropertyNames () {\n\tif (hasRequiredGetOwnPropertyNames) return getOwnPropertyNames;\n\thasRequiredGetOwnPropertyNames = 1;\n\tgetOwnPropertyNames = /*@__PURE__*/ requireGetOwnPropertyNames$1();\n\treturn getOwnPropertyNames;\n}\n\nvar getOwnPropertyNamesExports = requireGetOwnPropertyNames();\nvar _Object$getOwnPropertyNames = /*@__PURE__*/getDefaultExportFromCjs(getOwnPropertyNamesExports);\n\nvar getOwnPropertySymbols$2;\nvar hasRequiredGetOwnPropertySymbols$2;\n\nfunction requireGetOwnPropertySymbols$2 () {\n\tif (hasRequiredGetOwnPropertySymbols$2) return getOwnPropertySymbols$2;\n\thasRequiredGetOwnPropertySymbols$2 = 1;\n\trequireEs_symbol();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tgetOwnPropertySymbols$2 = path.Object.getOwnPropertySymbols;\n\treturn getOwnPropertySymbols$2;\n}\n\nvar getOwnPropertySymbols$1;\nvar hasRequiredGetOwnPropertySymbols$1;\n\nfunction requireGetOwnPropertySymbols$1 () {\n\tif (hasRequiredGetOwnPropertySymbols$1) return getOwnPropertySymbols$1;\n\thasRequiredGetOwnPropertySymbols$1 = 1;\n\tvar parent = /*@__PURE__*/ requireGetOwnPropertySymbols$2();\n\n\tgetOwnPropertySymbols$1 = parent;\n\treturn getOwnPropertySymbols$1;\n}\n\nvar getOwnPropertySymbols;\nvar hasRequiredGetOwnPropertySymbols;\n\nfunction requireGetOwnPropertySymbols () {\n\tif (hasRequiredGetOwnPropertySymbols) return getOwnPropertySymbols;\n\thasRequiredGetOwnPropertySymbols = 1;\n\tgetOwnPropertySymbols = /*@__PURE__*/ requireGetOwnPropertySymbols$1();\n\treturn getOwnPropertySymbols;\n}\n\nvar getOwnPropertySymbolsExports = requireGetOwnPropertySymbols();\nvar _Object$getOwnPropertySymbols = /*@__PURE__*/getDefaultExportFromCjs(getOwnPropertySymbolsExports);\n\nvar getOwnPropertyDescriptor$2 = {exports: {}};\n\nvar es_object_getOwnPropertyDescriptor = {};\n\nvar hasRequiredEs_object_getOwnPropertyDescriptor;\n\nfunction requireEs_object_getOwnPropertyDescriptor () {\n\tif (hasRequiredEs_object_getOwnPropertyDescriptor) return es_object_getOwnPropertyDescriptor;\n\thasRequiredEs_object_getOwnPropertyDescriptor = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar toIndexedObject = /*@__PURE__*/ requireToIndexedObject();\n\tvar nativeGetOwnPropertyDescriptor = /*@__PURE__*/ requireObjectGetOwnPropertyDescriptor().f;\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\n\tvar FORCED = !DESCRIPTORS || fails(function () { nativeGetOwnPropertyDescriptor(1); });\n\n\t// `Object.getOwnPropertyDescriptor` method\n\t// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\n\t$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {\n\t getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {\n\t return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);\n\t }\n\t});\n\treturn es_object_getOwnPropertyDescriptor;\n}\n\nvar hasRequiredGetOwnPropertyDescriptor$2;\n\nfunction requireGetOwnPropertyDescriptor$2 () {\n\tif (hasRequiredGetOwnPropertyDescriptor$2) return getOwnPropertyDescriptor$2.exports;\n\thasRequiredGetOwnPropertyDescriptor$2 = 1;\n\trequireEs_object_getOwnPropertyDescriptor();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tvar Object = path.Object;\n\n\tvar getOwnPropertyDescriptor = getOwnPropertyDescriptor$2.exports = function getOwnPropertyDescriptor(it, key) {\n\t return Object.getOwnPropertyDescriptor(it, key);\n\t};\n\n\tif (Object.getOwnPropertyDescriptor.sham) getOwnPropertyDescriptor.sham = true;\n\treturn getOwnPropertyDescriptor$2.exports;\n}\n\nvar getOwnPropertyDescriptor$1;\nvar hasRequiredGetOwnPropertyDescriptor$1;\n\nfunction requireGetOwnPropertyDescriptor$1 () {\n\tif (hasRequiredGetOwnPropertyDescriptor$1) return getOwnPropertyDescriptor$1;\n\thasRequiredGetOwnPropertyDescriptor$1 = 1;\n\tvar parent = /*@__PURE__*/ requireGetOwnPropertyDescriptor$2();\n\n\tgetOwnPropertyDescriptor$1 = parent;\n\treturn getOwnPropertyDescriptor$1;\n}\n\nvar getOwnPropertyDescriptor;\nvar hasRequiredGetOwnPropertyDescriptor;\n\nfunction requireGetOwnPropertyDescriptor () {\n\tif (hasRequiredGetOwnPropertyDescriptor) return getOwnPropertyDescriptor;\n\thasRequiredGetOwnPropertyDescriptor = 1;\n\tgetOwnPropertyDescriptor = /*@__PURE__*/ requireGetOwnPropertyDescriptor$1();\n\treturn getOwnPropertyDescriptor;\n}\n\nvar getOwnPropertyDescriptorExports = requireGetOwnPropertyDescriptor();\nvar _Object$getOwnPropertyDescriptor = /*@__PURE__*/getDefaultExportFromCjs(getOwnPropertyDescriptorExports);\n\nvar es_object_getOwnPropertyDescriptors = {};\n\nvar hasRequiredEs_object_getOwnPropertyDescriptors;\n\nfunction requireEs_object_getOwnPropertyDescriptors () {\n\tif (hasRequiredEs_object_getOwnPropertyDescriptors) return es_object_getOwnPropertyDescriptors;\n\thasRequiredEs_object_getOwnPropertyDescriptors = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar ownKeys = /*@__PURE__*/ requireOwnKeys();\n\tvar toIndexedObject = /*@__PURE__*/ requireToIndexedObject();\n\tvar getOwnPropertyDescriptorModule = /*@__PURE__*/ requireObjectGetOwnPropertyDescriptor();\n\tvar createProperty = /*@__PURE__*/ requireCreateProperty();\n\n\t// `Object.getOwnPropertyDescriptors` method\n\t// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n\t$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {\n\t getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n\t var O = toIndexedObject(object);\n\t var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n\t var keys = ownKeys(O);\n\t var result = {};\n\t var index = 0;\n\t var key, descriptor;\n\t while (keys.length > index) {\n\t descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);\n\t if (descriptor !== undefined) createProperty(result, key, descriptor);\n\t }\n\t return result;\n\t }\n\t});\n\treturn es_object_getOwnPropertyDescriptors;\n}\n\nvar getOwnPropertyDescriptors$2;\nvar hasRequiredGetOwnPropertyDescriptors$2;\n\nfunction requireGetOwnPropertyDescriptors$2 () {\n\tif (hasRequiredGetOwnPropertyDescriptors$2) return getOwnPropertyDescriptors$2;\n\thasRequiredGetOwnPropertyDescriptors$2 = 1;\n\trequireEs_object_getOwnPropertyDescriptors();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tgetOwnPropertyDescriptors$2 = path.Object.getOwnPropertyDescriptors;\n\treturn getOwnPropertyDescriptors$2;\n}\n\nvar getOwnPropertyDescriptors$1;\nvar hasRequiredGetOwnPropertyDescriptors$1;\n\nfunction requireGetOwnPropertyDescriptors$1 () {\n\tif (hasRequiredGetOwnPropertyDescriptors$1) return getOwnPropertyDescriptors$1;\n\thasRequiredGetOwnPropertyDescriptors$1 = 1;\n\tvar parent = /*@__PURE__*/ requireGetOwnPropertyDescriptors$2();\n\n\tgetOwnPropertyDescriptors$1 = parent;\n\treturn getOwnPropertyDescriptors$1;\n}\n\nvar getOwnPropertyDescriptors;\nvar hasRequiredGetOwnPropertyDescriptors;\n\nfunction requireGetOwnPropertyDescriptors () {\n\tif (hasRequiredGetOwnPropertyDescriptors) return getOwnPropertyDescriptors;\n\thasRequiredGetOwnPropertyDescriptors = 1;\n\tgetOwnPropertyDescriptors = /*@__PURE__*/ requireGetOwnPropertyDescriptors$1();\n\treturn getOwnPropertyDescriptors;\n}\n\nvar getOwnPropertyDescriptorsExports = requireGetOwnPropertyDescriptors();\nvar _Object$getOwnPropertyDescriptors = /*@__PURE__*/getDefaultExportFromCjs(getOwnPropertyDescriptorsExports);\n\nvar defineProperties$2 = {exports: {}};\n\nvar es_object_defineProperties = {};\n\nvar hasRequiredEs_object_defineProperties;\n\nfunction requireEs_object_defineProperties () {\n\tif (hasRequiredEs_object_defineProperties) return es_object_defineProperties;\n\thasRequiredEs_object_defineProperties = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar DESCRIPTORS = /*@__PURE__*/ requireDescriptors();\n\tvar defineProperties = /*@__PURE__*/ requireObjectDefineProperties().f;\n\n\t// `Object.defineProperties` method\n\t// https://tc39.es/ecma262/#sec-object.defineproperties\n\t// eslint-disable-next-line es/no-object-defineproperties -- safe\n\t$({ target: 'Object', stat: true, forced: Object.defineProperties !== defineProperties, sham: !DESCRIPTORS }, {\n\t defineProperties: defineProperties\n\t});\n\treturn es_object_defineProperties;\n}\n\nvar hasRequiredDefineProperties$2;\n\nfunction requireDefineProperties$2 () {\n\tif (hasRequiredDefineProperties$2) return defineProperties$2.exports;\n\thasRequiredDefineProperties$2 = 1;\n\trequireEs_object_defineProperties();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tvar Object = path.Object;\n\n\tvar defineProperties = defineProperties$2.exports = function defineProperties(T, D) {\n\t return Object.defineProperties(T, D);\n\t};\n\n\tif (Object.defineProperties.sham) defineProperties.sham = true;\n\treturn defineProperties$2.exports;\n}\n\nvar defineProperties$1;\nvar hasRequiredDefineProperties$1;\n\nfunction requireDefineProperties$1 () {\n\tif (hasRequiredDefineProperties$1) return defineProperties$1;\n\thasRequiredDefineProperties$1 = 1;\n\tvar parent = /*@__PURE__*/ requireDefineProperties$2();\n\n\tdefineProperties$1 = parent;\n\treturn defineProperties$1;\n}\n\nvar defineProperties;\nvar hasRequiredDefineProperties;\n\nfunction requireDefineProperties () {\n\tif (hasRequiredDefineProperties) return defineProperties;\n\thasRequiredDefineProperties = 1;\n\tdefineProperties = /*@__PURE__*/ requireDefineProperties$1();\n\treturn defineProperties;\n}\n\nvar definePropertiesExports = requireDefineProperties();\nvar _Object$defineProperties = /*@__PURE__*/getDefaultExportFromCjs(definePropertiesExports);\n\nvar defineProperty;\nvar hasRequiredDefineProperty;\n\nfunction requireDefineProperty () {\n\tif (hasRequiredDefineProperty) return defineProperty;\n\thasRequiredDefineProperty = 1;\n\tdefineProperty = /*@__PURE__*/ requireDefineProperty$4();\n\treturn defineProperty;\n}\n\nvar definePropertyExports = requireDefineProperty();\nvar _Object$defineProperty = /*@__PURE__*/getDefaultExportFromCjs(definePropertyExports);\n\n/**\n * Helper functions for components\n */\n\n/**\n * Determine values to use for (sub)options of 'chosen'.\n *\n * This option is either a boolean or an object whose values should be examined further.\n * The relevant structures are:\n *\n * - chosen: <boolean value>\n * - chosen: { subOption: <boolean or function> }\n *\n * Where subOption is 'node', 'edge' or 'label'.\n *\n * The intention of this method appears to be to set a specific priority to the options;\n * Since most properties are either bridged or merged into the local options objects, there\n * is not much point in handling them separately.\n * TODO: examine if 'most' in previous sentence can be replaced with 'all'. In that case, we\n * should be able to get rid of this method.\n * @param {string} subOption option within object 'chosen' to consider; either 'node', 'edge' or 'label'\n * @param {object} pile array of options objects to consider\n * @returns {boolean | Function} value for passed subOption of 'chosen' to use\n */\nfunction choosify(subOption, pile) {\n // allowed values for subOption\n const allowed = [\"node\", \"edge\", \"label\"];\n let value = true;\n const chosen = topMost(pile, \"chosen\");\n if (typeof chosen === \"boolean\") {\n value = chosen;\n } else if (typeof chosen === \"object\") {\n if (_indexOfInstanceProperty(allowed).call(allowed, subOption) === -1) {\n throw new Error(\"choosify: subOption '\" + subOption + \"' should be one of \" + \"'\" + allowed.join(\"', '\") + \"'\");\n }\n const chosenEdge = topMost(pile, [\"chosen\", subOption]);\n if (typeof chosenEdge === \"boolean\" || typeof chosenEdge === \"function\") {\n value = chosenEdge;\n }\n }\n return value;\n}\n\n/**\n * Check if the point falls within the given rectangle.\n * @param {rect} rect\n * @param {point} point\n * @param {rotationPoint} [rotationPoint] if specified, the rotation that applies to the rectangle.\n * @returns {boolean} true if point within rectangle, false otherwise\n */\nfunction pointInRect(rect, point, rotationPoint) {\n if (rect.width <= 0 || rect.height <= 0) {\n return false; // early out\n }\n if (rotationPoint !== undefined) {\n // Rotate the point the same amount as the rectangle\n const tmp = {\n x: point.x - rotationPoint.x,\n y: point.y - rotationPoint.y\n };\n if (rotationPoint.angle !== 0) {\n // In order to get the coordinates the same, you need to\n // rotate in the reverse direction\n const angle = -rotationPoint.angle;\n const tmp2 = {\n x: Math.cos(angle) * tmp.x - Math.sin(angle) * tmp.y,\n y: Math.sin(angle) * tmp.x + Math.cos(angle) * tmp.y\n };\n point = tmp2;\n } else {\n point = tmp;\n }\n\n // Note that if a rotation is specified, the rectangle coordinates\n // are **not* the full canvas coordinates. They are relative to the\n // rotationPoint. Hence, the point coordinates need not be translated\n // back in this case.\n }\n const right = rect.x + rect.width;\n const bottom = rect.y + rect.width;\n return rect.left < point.x && right > point.x && rect.top < point.y && bottom > point.y;\n}\n\n/**\n * Check if given value is acceptable as a label text.\n * @param {*} text value to check; can be anything at this point\n * @returns {boolean} true if valid label value, false otherwise\n */\nfunction isValidLabel(text) {\n // Note that this is quite strict: types that *might* be converted to string are disallowed\n return typeof text === \"string\" && text !== \"\";\n}\n\n/**\n * Returns x, y of self reference circle based on provided angle\n * @param {object} ctx\n * @param {number} angle\n * @param {number} radius\n * @param {VisNode} node\n * @returns {object} x and y coordinates\n */\nfunction getSelfRefCoordinates(ctx, angle, radius, node) {\n let x = node.x;\n let y = node.y;\n if (typeof node.distanceToBorder === \"function\") {\n //calculating opposite and adjacent\n //distaneToBorder becomes Hypotenuse.\n //Formulas sin(a) = Opposite / Hypotenuse and cos(a) = Adjacent / Hypotenuse\n const toBorderDist = node.distanceToBorder(ctx, angle);\n const yFromNodeCenter = Math.sin(angle) * toBorderDist;\n const xFromNodeCenter = Math.cos(angle) * toBorderDist;\n //xFromNodeCenter is basically x and if xFromNodeCenter equals to the distance to border then it means\n //that y does not need calculation because it is equal node.height / 2 or node.y\n //same thing with yFromNodeCenter and if yFromNodeCenter equals to the distance to border then it means\n //that x is equal node.width / 2 or node.x\n if (xFromNodeCenter === toBorderDist) {\n x += toBorderDist;\n y = node.y;\n } else if (yFromNodeCenter === toBorderDist) {\n x = node.x;\n y -= toBorderDist;\n } else {\n x += xFromNodeCenter;\n y -= yFromNodeCenter;\n }\n } else if (node.shape.width > node.shape.height) {\n x = node.x + node.shape.width * 0.5;\n y = node.y - radius;\n } else {\n x = node.x + radius;\n y = node.y - node.shape.height * 0.5;\n }\n return {\n x,\n y\n };\n}\n\nvar values$3;\nvar hasRequiredValues$3;\n\nfunction requireValues$3 () {\n\tif (hasRequiredValues$3) return values$3;\n\thasRequiredValues$3 = 1;\n\trequireEs_array_iterator();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tvalues$3 = getBuiltInPrototypeMethod('Array', 'values');\n\treturn values$3;\n}\n\nvar values$2;\nvar hasRequiredValues$2;\n\nfunction requireValues$2 () {\n\tif (hasRequiredValues$2) return values$2;\n\thasRequiredValues$2 = 1;\n\tvar parent = /*@__PURE__*/ requireValues$3();\n\n\tvalues$2 = parent;\n\treturn values$2;\n}\n\nvar values$1;\nvar hasRequiredValues$1;\n\nfunction requireValues$1 () {\n\tif (hasRequiredValues$1) return values$1;\n\thasRequiredValues$1 = 1;\n\trequireWeb_domCollections_iterator();\n\tvar classof = /*@__PURE__*/ requireClassof();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireValues$2();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\tvar DOMIterables = {\n\t DOMTokenList: true,\n\t NodeList: true\n\t};\n\n\tvalues$1 = function (it) {\n\t var own = it.values;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.values)\n\t || hasOwn(DOMIterables, classof(it)) ? method : own;\n\t};\n\treturn values$1;\n}\n\nvar values;\nvar hasRequiredValues;\n\nfunction requireValues () {\n\tif (hasRequiredValues) return values;\n\thasRequiredValues = 1;\n\tvalues = /*@__PURE__*/ requireValues$1();\n\treturn values;\n}\n\nvar valuesExports = requireValues();\nvar _valuesInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(valuesExports);\n\n/**\n * Callback to determine text dimensions, using the parent label settings.\n * @callback MeasureText\n * @param {text} text\n * @param {text} mod\n * @returns {object} { width, values} width in pixels and font attributes\n */\n\n/**\n * Helper class for Label which collects results of splitting labels into lines and blocks.\n * @private\n */\nclass LabelAccumulator {\n /**\n * @param {MeasureText} measureText\n */\n constructor(measureText) {\n this.measureText = measureText;\n this.current = 0;\n this.width = 0;\n this.height = 0;\n this.lines = [];\n }\n\n /**\n * Append given text to the given line.\n * @param {number} l index of line to add to\n * @param {string} text string to append to line\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod]\n * @private\n */\n _add(l, text) {\n let mod = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"normal\";\n if (this.lines[l] === undefined) {\n this.lines[l] = {\n width: 0,\n height: 0,\n blocks: []\n };\n }\n\n // We still need to set a block for undefined and empty texts, hence return at this point\n // This is necessary because we don't know at this point if we're at the\n // start of an empty line or not.\n // To compensate, empty blocks are removed in `finalize()`.\n //\n // Empty strings should still have a height\n let tmpText = text;\n if (text === undefined || text === \"\") tmpText = \" \";\n\n // Determine width and get the font properties\n const result = this.measureText(tmpText, mod);\n const block = _Object$assign({}, _valuesInstanceProperty(result));\n block.text = text;\n block.width = result.width;\n block.mod = mod;\n if (text === undefined || text === \"\") {\n block.width = 0;\n }\n this.lines[l].blocks.push(block);\n\n // Update the line width. We need this for determining if a string goes over max width\n this.lines[l].width += block.width;\n }\n\n /**\n * Returns the width in pixels of the current line.\n * @returns {number}\n */\n curWidth() {\n const line = this.lines[this.current];\n if (line === undefined) return 0;\n return line.width;\n }\n\n /**\n * Add text in block to current line\n * @param {string} text\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod]\n */\n append(text) {\n let mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"normal\";\n this._add(this.current, text, mod);\n }\n\n /**\n * Add text in block to current line and start a new line\n * @param {string} text\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod]\n */\n newLine(text) {\n let mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"normal\";\n this._add(this.current, text, mod);\n this.current++;\n }\n\n /**\n * Determine and set the heights of all the lines currently contained in this instance\n *\n * Note that width has already been set.\n * @private\n */\n determineLineHeights() {\n for (let k = 0; k < this.lines.length; k++) {\n const line = this.lines[k];\n\n // Looking for max height of blocks in line\n let height = 0;\n if (line.blocks !== undefined) {\n // Can happen if text contains e.g. '\\n '\n for (let l = 0; l < line.blocks.length; l++) {\n const block = line.blocks[l];\n if (height < block.height) {\n height = block.height;\n }\n }\n }\n line.height = height;\n }\n }\n\n /**\n * Determine the full size of the label text, as determined by current lines and blocks\n * @private\n */\n determineLabelSize() {\n let width = 0;\n let height = 0;\n for (let k = 0; k < this.lines.length; k++) {\n const line = this.lines[k];\n if (line.width > width) {\n width = line.width;\n }\n height += line.height;\n }\n this.width = width;\n this.height = height;\n }\n\n /**\n * Remove all empty blocks and empty lines we don't need\n *\n * This must be done after the width/height determination,\n * so that these are set properly for processing here.\n * @returns {Array<Line>} Lines with empty blocks (and some empty lines) removed\n * @private\n */\n removeEmptyBlocks() {\n const tmpLines = [];\n for (let k = 0; k < this.lines.length; k++) {\n const line = this.lines[k];\n\n // Note: an empty line in between text has width zero but is still relevant to layout.\n // So we can't use width for testing empty line here\n if (line.blocks.length === 0) continue;\n\n // Discard final empty line always\n if (k === this.lines.length - 1) {\n if (line.width === 0) continue;\n }\n const tmpLine = {};\n _Object$assign(tmpLine, line);\n tmpLine.blocks = [];\n let firstEmptyBlock;\n const tmpBlocks = [];\n for (let l = 0; l < line.blocks.length; l++) {\n const block = line.blocks[l];\n if (block.width !== 0) {\n tmpBlocks.push(block);\n } else {\n if (firstEmptyBlock === undefined) {\n firstEmptyBlock = block;\n }\n }\n }\n\n // Ensure that there is *some* text present\n if (tmpBlocks.length === 0 && firstEmptyBlock !== undefined) {\n tmpBlocks.push(firstEmptyBlock);\n }\n tmpLine.blocks = tmpBlocks;\n tmpLines.push(tmpLine);\n }\n return tmpLines;\n }\n\n /**\n * Set the sizes for all lines and the whole thing.\n * @returns {{width: (number|*), height: (number|*), lines: Array}}\n */\n finalize() {\n //console.log(JSON.stringify(this.lines, null, 2));\n\n this.determineLineHeights();\n this.determineLabelSize();\n const tmpLines = this.removeEmptyBlocks();\n\n // Return a simple hash object for further processing.\n return {\n width: this.width,\n height: this.height,\n lines: tmpLines\n };\n }\n}\n\n// Hash of prepared regexp's for tags\nconst tagPattern = {\n // HTML\n \"<b>\": /<b>/,\n \"<i>\": /<i>/,\n \"<code>\": /<code>/,\n \"</b>\": /<\\/b>/,\n \"</i>\": /<\\/i>/,\n \"</code>\": /<\\/code>/,\n // Markdown\n \"*\": /\\*/,\n // bold\n _: /_/,\n // ital\n \"`\": /`/,\n // mono\n afterBold: /[^*]/,\n afterItal: /[^_]/,\n afterMono: /[^`]/\n};\n\n/**\n * Internal helper class for parsing the markup tags for HTML and Markdown.\n *\n * NOTE: Sequences of tabs and spaces are reduced to single space.\n * Scan usage of `this.spacing` within method\n */\nclass MarkupAccumulator {\n /**\n * Create an instance\n * @param {string} text text to parse for markup\n */\n constructor(text) {\n this.text = text;\n this.bold = false;\n this.ital = false;\n this.mono = false;\n this.spacing = false;\n this.position = 0;\n this.buffer = \"\";\n this.modStack = [];\n this.blocks = [];\n }\n\n /**\n * Return the mod label currently on the top of the stack\n * @returns {string} label of topmost mod\n * @private\n */\n mod() {\n return this.modStack.length === 0 ? \"normal\" : this.modStack[0];\n }\n\n /**\n * Return the mod label currently active\n * @returns {string} label of active mod\n * @private\n */\n modName() {\n if (this.modStack.length === 0) return \"normal\";else if (this.modStack[0] === \"mono\") return \"mono\";else {\n if (this.bold && this.ital) {\n return \"boldital\";\n } else if (this.bold) {\n return \"bold\";\n } else if (this.ital) {\n return \"ital\";\n }\n }\n }\n\n /**\n * @private\n */\n emitBlock() {\n if (this.spacing) {\n this.add(\" \");\n this.spacing = false;\n }\n if (this.buffer.length > 0) {\n this.blocks.push({\n text: this.buffer,\n mod: this.modName()\n });\n this.buffer = \"\";\n }\n }\n\n /**\n * Output text to buffer\n * @param {string} text text to add\n * @private\n */\n add(text) {\n if (text === \" \") {\n this.spacing = true;\n }\n if (this.spacing) {\n this.buffer += \" \";\n this.spacing = false;\n }\n if (text != \" \") {\n this.buffer += text;\n }\n }\n\n /**\n * Handle parsing of whitespace\n * @param {string} ch the character to check\n * @returns {boolean} true if the character was processed as whitespace, false otherwise\n */\n parseWS(ch) {\n if (/[ \\t]/.test(ch)) {\n if (!this.mono) {\n this.spacing = true;\n } else {\n this.add(ch);\n }\n return true;\n }\n return false;\n }\n\n /**\n * @param {string} tagName label for block type to set\n * @private\n */\n setTag(tagName) {\n this.emitBlock();\n this[tagName] = true;\n this.modStack.unshift(tagName);\n }\n\n /**\n * @param {string} tagName label for block type to unset\n * @private\n */\n unsetTag(tagName) {\n this.emitBlock();\n this[tagName] = false;\n this.modStack.shift();\n }\n\n /**\n * @param {string} tagName label for block type we are currently processing\n * @param {string|RegExp} tag string to match in text\n * @returns {boolean} true if the tag was processed, false otherwise\n */\n parseStartTag(tagName, tag) {\n // Note: if 'mono' passed as tagName, there is a double check here. This is OK\n if (!this.mono && !this[tagName] && this.match(tag)) {\n this.setTag(tagName);\n return true;\n }\n return false;\n }\n\n /**\n * @param {string|RegExp} tag\n * @param {number} [advance] if set, advance current position in text\n * @returns {boolean} true if match at given position, false otherwise\n * @private\n */\n match(tag) {\n let advance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n const [regExp, length] = this.prepareRegExp(tag);\n const matched = regExp.test(this.text.substr(this.position, length));\n if (matched && advance) {\n this.position += length - 1;\n }\n return matched;\n }\n\n /**\n * @param {string} tagName label for block type we are currently processing\n * @param {string|RegExp} tag string to match in text\n * @param {RegExp} [nextTag] regular expression to match for characters *following* the current tag\n * @returns {boolean} true if the tag was processed, false otherwise\n */\n parseEndTag(tagName, tag, nextTag) {\n let checkTag = this.mod() === tagName;\n if (tagName === \"mono\") {\n // special handling for 'mono'\n checkTag = checkTag && this.mono;\n } else {\n checkTag = checkTag && !this.mono;\n }\n if (checkTag && this.match(tag)) {\n if (nextTag !== undefined) {\n // Purpose of the following match is to prevent a direct unset/set of a given tag\n // E.g. '*bold **still bold*' => '*bold still bold*'\n if (this.position === this.text.length - 1 || this.match(nextTag, false)) {\n this.unsetTag(tagName);\n }\n } else {\n this.unsetTag(tagName);\n }\n return true;\n }\n return false;\n }\n\n /**\n * @param {string|RegExp} tag string to match in text\n * @param {value} value string to replace tag with, if found at current position\n * @returns {boolean} true if the tag was processed, false otherwise\n */\n replace(tag, value) {\n if (this.match(tag)) {\n this.add(value);\n this.position += length - 1;\n return true;\n }\n return false;\n }\n\n /**\n * Create a regular expression for the tag if it isn't already one.\n *\n * The return value is an array `[RegExp, number]`, with exactly two value, where:\n * - RegExp is the regular expression to use\n * - number is the lenth of the input string to match\n * @param {string|RegExp} tag string to match in text\n * @returns {Array} regular expression to use and length of input string to match\n * @private\n */\n prepareRegExp(tag) {\n let length;\n let regExp;\n if (tag instanceof RegExp) {\n regExp = tag;\n length = 1; // ASSUMPTION: regexp only tests one character\n } else {\n // use prepared regexp if present\n const prepared = tagPattern[tag];\n if (prepared !== undefined) {\n regExp = prepared;\n } else {\n regExp = new RegExp(tag);\n }\n length = tag.length;\n }\n return [regExp, length];\n }\n}\n\n/**\n * Helper class for Label which explodes the label text into lines and blocks within lines\n * @private\n */\nclass LabelSplitter {\n /**\n * @param {CanvasRenderingContext2D} ctx Canvas rendering context\n * @param {Label} parent reference to the Label instance using current instance\n * @param {boolean} selected\n * @param {boolean} hover\n */\n constructor(ctx, parent, selected, hover) {\n this.ctx = ctx;\n this.parent = parent;\n this.selected = selected;\n this.hover = hover;\n\n /**\n * Callback to determine text width; passed to LabelAccumulator instance\n * @param {string} text string to determine width of\n * @param {string} mod font type to use for this text\n * @returns {object} { width, values} width in pixels and font attributes\n */\n const textWidth = (text, mod) => {\n if (text === undefined) return 0;\n\n // TODO: This can be done more efficiently with caching\n // This will set the ctx.font correctly, depending on selected/hover and mod - so that ctx.measureText() will be accurate.\n const values = this.parent.getFormattingValues(ctx, selected, hover, mod);\n let width = 0;\n if (text !== \"\") {\n const measure = this.ctx.measureText(text);\n width = measure.width;\n }\n return {\n width,\n values: values\n };\n };\n this.lines = new LabelAccumulator(textWidth);\n }\n\n /**\n * Split passed text of a label into lines and blocks.\n *\n * # NOTE\n *\n * The handling of spacing is option dependent:\n *\n * - if `font.multi : false`, all spaces are retained\n * - if `font.multi : true`, every sequence of spaces is compressed to a single space\n *\n * This might not be the best way to do it, but this is as it has been working till now.\n * In order not to break existing functionality, for the time being this behaviour will\n * be retained in any code changes.\n * @param {string} text text to split\n * @returns {Array<line>}\n */\n process(text) {\n if (!isValidLabel(text)) {\n return this.lines.finalize();\n }\n const font = this.parent.fontOptions;\n\n // Normalize the end-of-line's to a single representation - order important\n text = text.replace(/\\r\\n/g, \"\\n\"); // Dos EOL's\n text = text.replace(/\\r/g, \"\\n\"); // Mac EOL's\n\n // Note that at this point, there can be no \\r's in the text.\n // This is used later on splitStringIntoLines() to split multifont texts.\n\n const nlLines = String(text).split(\"\\n\");\n const lineCount = nlLines.length;\n if (font.multi) {\n // Multi-font case: styling tags active\n for (let i = 0; i < lineCount; i++) {\n const blocks = this.splitBlocks(nlLines[i], font.multi);\n // Post: Sequences of tabs and spaces are reduced to single space\n\n if (blocks === undefined) continue;\n if (blocks.length === 0) {\n this.lines.newLine(\"\");\n continue;\n }\n if (font.maxWdt > 0) {\n // widthConstraint.maximum defined\n //console.log('Running widthConstraint multi, max: ' + this.fontOptions.maxWdt);\n for (let j = 0; j < blocks.length; j++) {\n const mod = blocks[j].mod;\n const text = blocks[j].text;\n this.splitStringIntoLines(text, mod, true);\n }\n } else {\n // widthConstraint.maximum NOT defined\n for (let j = 0; j < blocks.length; j++) {\n const mod = blocks[j].mod;\n const text = blocks[j].text;\n this.lines.append(text, mod);\n }\n }\n this.lines.newLine();\n }\n } else {\n // Single-font case\n if (font.maxWdt > 0) {\n // widthConstraint.maximum defined\n // console.log('Running widthConstraint normal, max: ' + this.fontOptions.maxWdt);\n for (let i = 0; i < lineCount; i++) {\n this.splitStringIntoLines(nlLines[i]);\n }\n } else {\n // widthConstraint.maximum NOT defined\n for (let i = 0; i < lineCount; i++) {\n this.lines.newLine(nlLines[i]);\n }\n }\n }\n return this.lines.finalize();\n }\n\n /**\n * normalize the markup system\n * @param {boolean|'md'|'markdown'|'html'} markupSystem\n * @returns {string}\n */\n decodeMarkupSystem(markupSystem) {\n let system = \"none\";\n if (markupSystem === \"markdown\" || markupSystem === \"md\") {\n system = \"markdown\";\n } else if (markupSystem === true || markupSystem === \"html\") {\n system = \"html\";\n }\n return system;\n }\n\n /**\n *\n * @param {string} text\n * @returns {Array}\n */\n splitHtmlBlocks(text) {\n const s = new MarkupAccumulator(text);\n const parseEntities = ch => {\n if (/&/.test(ch)) {\n const parsed = s.replace(s.text, \"<\", \"<\") || s.replace(s.text, \"&\", \"&\");\n if (!parsed) {\n s.add(\"&\");\n }\n return true;\n }\n return false;\n };\n while (s.position < s.text.length) {\n const ch = s.text.charAt(s.position);\n const parsed = s.parseWS(ch) || /</.test(ch) && (s.parseStartTag(\"bold\", \"<b>\") || s.parseStartTag(\"ital\", \"<i>\") || s.parseStartTag(\"mono\", \"<code>\") || s.parseEndTag(\"bold\", \"</b>\") || s.parseEndTag(\"ital\", \"</i>\") || s.parseEndTag(\"mono\", \"</code>\")) || parseEntities(ch);\n if (!parsed) {\n s.add(ch);\n }\n s.position++;\n }\n s.emitBlock();\n return s.blocks;\n }\n\n /**\n *\n * @param {string} text\n * @returns {Array}\n */\n splitMarkdownBlocks(text) {\n const s = new MarkupAccumulator(text);\n let beginable = true;\n const parseOverride = ch => {\n if (/\\\\/.test(ch)) {\n if (s.position < this.text.length + 1) {\n s.position++;\n ch = this.text.charAt(s.position);\n if (/ \\t/.test(ch)) {\n s.spacing = true;\n } else {\n s.add(ch);\n beginable = false;\n }\n }\n return true;\n }\n return false;\n };\n while (s.position < s.text.length) {\n const ch = s.text.charAt(s.position);\n const parsed = s.parseWS(ch) || parseOverride(ch) || (beginable || s.spacing) && (s.parseStartTag(\"bold\", \"*\") || s.parseStartTag(\"ital\", \"_\") || s.parseStartTag(\"mono\", \"`\")) || s.parseEndTag(\"bold\", \"*\", \"afterBold\") || s.parseEndTag(\"ital\", \"_\", \"afterItal\") || s.parseEndTag(\"mono\", \"`\", \"afterMono\");\n if (!parsed) {\n s.add(ch);\n beginable = false;\n }\n s.position++;\n }\n s.emitBlock();\n return s.blocks;\n }\n\n /**\n * Explodes a piece of text into single-font blocks using a given markup\n * @param {string} text\n * @param {boolean|'md'|'markdown'|'html'} markupSystem\n * @returns {Array.<{text: string, mod: string}>}\n * @private\n */\n splitBlocks(text, markupSystem) {\n const system = this.decodeMarkupSystem(markupSystem);\n if (system === \"none\") {\n return [{\n text: text,\n mod: \"normal\"\n }];\n } else if (system === \"markdown\") {\n return this.splitMarkdownBlocks(text);\n } else if (system === \"html\") {\n return this.splitHtmlBlocks(text);\n }\n }\n\n /**\n * @param {string} text\n * @returns {boolean} true if text length over the current max with\n * @private\n */\n overMaxWidth(text) {\n const width = this.ctx.measureText(text).width;\n return this.lines.curWidth() + width > this.parent.fontOptions.maxWdt;\n }\n\n /**\n * Determine the longest part of the sentence which still fits in the\n * current max width.\n * @param {Array} words Array of strings signifying a text lines\n * @returns {number} index of first item in string making string go over max\n * @private\n */\n getLongestFit(words) {\n let text = \"\";\n let w = 0;\n while (w < words.length) {\n const pre = text === \"\" ? \"\" : \" \";\n const newText = text + pre + words[w];\n if (this.overMaxWidth(newText)) break;\n text = newText;\n w++;\n }\n return w;\n }\n\n /**\n * Determine the longest part of the string which still fits in the\n * current max width.\n * @param {Array} words Array of strings signifying a text lines\n * @returns {number} index of first item in string making string go over max\n */\n getLongestFitWord(words) {\n let w = 0;\n while (w < words.length) {\n if (this.overMaxWidth(_sliceInstanceProperty(words).call(words, 0, w))) break;\n w++;\n }\n return w;\n }\n\n /**\n * Split the passed text into lines, according to width constraint (if any).\n *\n * The method assumes that the input string is a single line, i.e. without lines break.\n *\n * This method retains spaces, if still present (case `font.multi: false`).\n * A space which falls on an internal line break, will be replaced by a newline.\n * There is no special handling of tabs; these go along with the flow.\n * @param {string} str\n * @param {string} [mod]\n * @param {boolean} [appendLast]\n * @private\n */\n splitStringIntoLines(str) {\n let mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"normal\";\n let appendLast = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n // Set the canvas context font, based upon the current selected/hover state\n // and the provided mod, so the text measurement performed by getLongestFit\n // will be accurate - and not just use the font of whoever last used the canvas.\n this.parent.getFormattingValues(this.ctx, this.selected, this.hover, mod);\n\n // Still-present spaces are relevant, retain them\n str = str.replace(/^( +)/g, \"$1\\r\");\n str = str.replace(/([^\\r][^ ]*)( +)/g, \"$1\\r$2\\r\");\n let words = str.split(\"\\r\");\n while (words.length > 0) {\n let w = this.getLongestFit(words);\n if (w === 0) {\n // Special case: the first word is already larger than the max width.\n const word = words[0];\n\n // Break the word to the largest part that fits the line\n const x = this.getLongestFitWord(word);\n this.lines.newLine(_sliceInstanceProperty(word).call(word, 0, x), mod);\n\n // Adjust the word, so that the rest will be done next iteration\n words[0] = _sliceInstanceProperty(word).call(word, x);\n } else {\n // skip any space that is replaced by a newline\n let newW = w;\n if (words[w - 1] === \" \") {\n w--;\n } else if (words[newW] === \" \") {\n newW++;\n }\n const text = _sliceInstanceProperty(words).call(words, 0, w).join(\"\");\n if (w == words.length && appendLast) {\n this.lines.append(text, mod);\n } else {\n this.lines.newLine(text, mod);\n }\n\n // Adjust the word, so that the rest will be done next iteration\n words = _sliceInstanceProperty(words).call(words, newW);\n }\n }\n }\n}\n\n/**\n * List of special styles for multi-fonts\n * @private\n */\nconst multiFontStyle = [\"bold\", \"ital\", \"boldital\", \"mono\"];\n\n/**\n * A Label to be used for Nodes or Edges.\n */\nclass Label {\n /**\n * @param {object} body\n * @param {object} options\n * @param {boolean} [edgelabel]\n */\n constructor(body, options) {\n let edgelabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n this.body = body;\n this.pointToSelf = false;\n this.baseSize = undefined;\n this.fontOptions = {}; // instance variable containing the *instance-local* font options\n this.setOptions(options);\n this.size = {\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n yLine: 0\n };\n this.isEdgeLabel = edgelabel;\n }\n\n /**\n * @param {object} options the options of the parent Node-instance\n */\n setOptions(options) {\n this.elementOptions = options; // Reference to the options of the parent Node-instance\n\n this.initFontOptions(options.font);\n if (isValidLabel(options.label)) {\n this.labelDirty = true;\n } else {\n // Bad label! Change the option value to prevent bad stuff happening\n options.label = undefined;\n }\n if (options.font !== undefined && options.font !== null) {\n // font options can be deleted at various levels\n if (typeof options.font === \"string\") {\n this.baseSize = this.fontOptions.size;\n } else if (typeof options.font === \"object\") {\n const size = options.font.size;\n if (size !== undefined) {\n this.baseSize = size;\n }\n }\n }\n }\n\n /**\n * Init the font Options structure.\n *\n * Member fontOptions serves as an accumulator for the current font options.\n * As such, it needs to be completely separated from the node options.\n * @param {object} newFontOptions the new font options to process\n * @private\n */\n initFontOptions(newFontOptions) {\n // Prepare the multi-font option objects.\n // These will be filled in propagateFonts(), if required\n forEach(multiFontStyle, style => {\n this.fontOptions[style] = {};\n });\n\n // Handle shorthand option, if present\n if (Label.parseFontString(this.fontOptions, newFontOptions)) {\n this.fontOptions.vadjust = 0;\n return;\n }\n\n // Copy over the non-multifont options, if specified\n forEach(newFontOptions, (prop, n) => {\n if (prop !== undefined && prop !== null && typeof prop !== \"object\") {\n this.fontOptions[n] = prop;\n }\n });\n }\n\n /**\n * If in-variable is a string, parse it as a font specifier.\n *\n * Note that following is not done here and have to be done after the call:\n * - Not all font options are set (vadjust, mod)\n * @param {object} outOptions out-parameter, object in which to store the parse results (if any)\n * @param {object} inOptions font options to parse\n * @returns {boolean} true if font parsed as string, false otherwise\n * @static\n */\n static parseFontString(outOptions, inOptions) {\n if (!inOptions || typeof inOptions !== \"string\") return false;\n const newOptionsArray = inOptions.split(\" \");\n outOptions.size = +newOptionsArray[0].replace(\"px\", \"\");\n outOptions.face = newOptionsArray[1];\n outOptions.color = newOptionsArray[2];\n return true;\n }\n\n /**\n * Set the width and height constraints based on 'nearest' value\n * @param {Array} pile array of option objects to consider\n * @returns {object} the actual constraint values to use\n * @private\n */\n constrain(pile) {\n // NOTE: constrainWidth and constrainHeight never set!\n // NOTE: for edge labels, only 'maxWdt' set\n // Node labels can set all the fields\n const fontOptions = {\n constrainWidth: false,\n maxWdt: -1,\n minWdt: -1,\n constrainHeight: false,\n minHgt: -1,\n valign: \"middle\"\n };\n const widthConstraint = topMost(pile, \"widthConstraint\");\n if (typeof widthConstraint === \"number\") {\n fontOptions.maxWdt = Number(widthConstraint);\n fontOptions.minWdt = Number(widthConstraint);\n } else if (typeof widthConstraint === \"object\") {\n const widthConstraintMaximum = topMost(pile, [\"widthConstraint\", \"maximum\"]);\n if (typeof widthConstraintMaximum === \"number\") {\n fontOptions.maxWdt = Number(widthConstraintMaximum);\n }\n const widthConstraintMinimum = topMost(pile, [\"widthConstraint\", \"minimum\"]);\n if (typeof widthConstraintMinimum === \"number\") {\n fontOptions.minWdt = Number(widthConstraintMinimum);\n }\n }\n const heightConstraint = topMost(pile, \"heightConstraint\");\n if (typeof heightConstraint === \"number\") {\n fontOptions.minHgt = Number(heightConstraint);\n } else if (typeof heightConstraint === \"object\") {\n const heightConstraintMinimum = topMost(pile, [\"heightConstraint\", \"minimum\"]);\n if (typeof heightConstraintMinimum === \"number\") {\n fontOptions.minHgt = Number(heightConstraintMinimum);\n }\n const heightConstraintValign = topMost(pile, [\"heightConstraint\", \"valign\"]);\n if (typeof heightConstraintValign === \"string\") {\n if (heightConstraintValign === \"top\" || heightConstraintValign === \"bottom\") {\n fontOptions.valign = heightConstraintValign;\n }\n }\n }\n return fontOptions;\n }\n\n /**\n * Set options and update internal state\n * @param {object} options options to set\n * @param {Array} pile array of option objects to consider for option 'chosen'\n */\n update(options, pile) {\n this.setOptions(options, true);\n this.propagateFonts(pile);\n deepExtend(this.fontOptions, this.constrain(pile));\n this.fontOptions.chooser = choosify(\"label\", pile);\n }\n\n /**\n * When margins are set in an element, adjust sizes is called to remove them\n * from the width/height constraints. This must be done prior to label sizing.\n * @param {{top: number, right: number, bottom: number, left: number}} margins\n */\n adjustSizes(margins) {\n const widthBias = margins ? margins.right + margins.left : 0;\n if (this.fontOptions.constrainWidth) {\n this.fontOptions.maxWdt -= widthBias;\n this.fontOptions.minWdt -= widthBias;\n }\n const heightBias = margins ? margins.top + margins.bottom : 0;\n if (this.fontOptions.constrainHeight) {\n this.fontOptions.minHgt -= heightBias;\n }\n }\n\n /////////////////////////////////////////////////////////\n // Methods for handling options piles\n // Eventually, these will be moved to a separate class\n /////////////////////////////////////////////////////////\n\n /**\n * Add the font members of the passed list of option objects to the pile.\n * @param {Pile} dstPile pile of option objects add to\n * @param {Pile} srcPile pile of option objects to take font options from\n * @private\n */\n addFontOptionsToPile(dstPile, srcPile) {\n for (let i = 0; i < srcPile.length; ++i) {\n this.addFontToPile(dstPile, srcPile[i]);\n }\n }\n\n /**\n * Add given font option object to the list of objects (the 'pile') to consider for determining\n * multi-font option values.\n * @param {Pile} pile pile of option objects to use\n * @param {object} options instance to add to pile\n * @private\n */\n addFontToPile(pile, options) {\n if (options === undefined) return;\n if (options.font === undefined || options.font === null) return;\n const item = options.font;\n pile.push(item);\n }\n\n /**\n * Collect all own-property values from the font pile that aren't multi-font option objectss.\n * @param {Pile} pile pile of option objects to use\n * @returns {object} object with all current own basic font properties\n * @private\n */\n getBasicOptions(pile) {\n const ret = {};\n\n // Scans the whole pile to get all options present\n for (let n = 0; n < pile.length; ++n) {\n let fontOptions = pile[n];\n\n // Convert shorthand if necessary\n const tmpShorthand = {};\n if (Label.parseFontString(tmpShorthand, fontOptions)) {\n fontOptions = tmpShorthand;\n }\n forEach(fontOptions, (opt, name) => {\n if (opt === undefined) return; // multi-font option need not be present\n if (Object.prototype.hasOwnProperty.call(ret, name)) return; // Keep first value we encounter\n\n if (_indexOfInstanceProperty(multiFontStyle).call(multiFontStyle, name) !== -1) {\n // Skip multi-font properties but we do need the structure\n ret[name] = {};\n } else {\n ret[name] = opt;\n }\n });\n }\n return ret;\n }\n\n /**\n * Return the value for given option for the given multi-font.\n *\n * All available option objects are trawled in the set order to construct the option values.\n *\n * ---------------------------------------------------------------------\n * ## Traversal of pile for multi-fonts\n *\n * The determination of multi-font option values is a special case, because any values not\n * present in the multi-font options should by definition be taken from the main font options,\n * i.e. from the current 'parent' object of the multi-font option.\n *\n * ### Search order for multi-fonts\n *\n * 'bold' used as example:\n *\n * - search in option group 'bold' in local properties\n * - search in main font option group in local properties\n *\n * ---------------------------------------------------------------------\n * @param {Pile} pile pile of option objects to use\n * @param {MultiFontStyle} multiName sub path for the multi-font\n * @param {string} option the option to search for, for the given multi-font\n * @returns {string|number} the value for the given option\n * @private\n */\n getFontOption(pile, multiName, option) {\n let multiFont;\n\n // Search multi font in local properties\n for (let n = 0; n < pile.length; ++n) {\n const fontOptions = pile[n];\n if (Object.prototype.hasOwnProperty.call(fontOptions, multiName)) {\n multiFont = fontOptions[multiName];\n if (multiFont === undefined || multiFont === null) continue;\n\n // Convert shorthand if necessary\n // TODO: inefficient to do this conversion every time; find a better way.\n const tmpShorthand = {};\n if (Label.parseFontString(tmpShorthand, multiFont)) {\n multiFont = tmpShorthand;\n }\n if (Object.prototype.hasOwnProperty.call(multiFont, option)) {\n return multiFont[option];\n }\n }\n }\n\n // Option is not mentioned in the multi font options; take it from the parent font options.\n // These have already been converted with getBasicOptions(), so use the converted values.\n if (Object.prototype.hasOwnProperty.call(this.fontOptions, option)) {\n return this.fontOptions[option];\n }\n\n // A value **must** be found; you should never get here.\n throw new Error(\"Did not find value for multi-font for property: '\" + option + \"'\");\n }\n\n /**\n * Return all options values for the given multi-font.\n *\n * All available option objects are trawled in the set order to construct the option values.\n * @param {Pile} pile pile of option objects to use\n * @param {MultiFontStyle} multiName sub path for the mod-font\n * @returns {MultiFontOptions}\n * @private\n */\n getFontOptions(pile, multiName) {\n const result = {};\n const optionNames = [\"color\", \"size\", \"face\", \"mod\", \"vadjust\"]; // List of allowed options per multi-font\n\n for (let i = 0; i < optionNames.length; ++i) {\n const mod = optionNames[i];\n result[mod] = this.getFontOption(pile, multiName, mod);\n }\n return result;\n }\n\n /////////////////////////////////////////////////////////\n // End methods for handling options piles\n /////////////////////////////////////////////////////////\n\n /**\n * Collapse the font options for the multi-font to single objects, from\n * the chain of option objects passed (the 'pile').\n * @param {Pile} pile sequence of option objects to consider.\n * First item in list assumed to be the newly set options.\n */\n propagateFonts(pile) {\n const fontPile = []; // sequence of font objects to consider, order important\n\n // Note that this.elementOptions is not used here.\n this.addFontOptionsToPile(fontPile, pile);\n this.fontOptions = this.getBasicOptions(fontPile);\n\n // We set multifont values even if multi === false, for consistency (things break otherwise)\n for (let i = 0; i < multiFontStyle.length; ++i) {\n const mod = multiFontStyle[i];\n const modOptions = this.fontOptions[mod];\n const tmpMultiFontOptions = this.getFontOptions(fontPile, mod);\n\n // Copy over found values\n forEach(tmpMultiFontOptions, (option, n) => {\n modOptions[n] = option;\n });\n modOptions.size = Number(modOptions.size);\n modOptions.vadjust = Number(modOptions.vadjust);\n }\n }\n\n /**\n * Main function. This is called from anything that wants to draw a label.\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} [baseline]\n */\n draw(ctx, x, y, selected, hover) {\n let baseline = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : \"middle\";\n // if no label, return\n if (this.elementOptions.label === undefined) return;\n\n // check if we have to render the label\n let viewFontSize = this.fontOptions.size * this.body.view.scale;\n if (this.elementOptions.label && viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) return;\n\n // This ensures that there will not be HUGE letters on screen\n // by setting an upper limit on the visible text size (regardless of zoomLevel)\n if (viewFontSize >= this.elementOptions.scaling.label.maxVisible) {\n viewFontSize = Number(this.elementOptions.scaling.label.maxVisible) / this.body.view.scale;\n }\n\n // update the size cache if required\n this.calculateLabelSize(ctx, selected, hover, x, y, baseline);\n this._drawBackground(ctx);\n this._drawText(ctx, x, this.size.yLine, baseline, viewFontSize);\n }\n\n /**\n * Draws the label background\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n _drawBackground(ctx) {\n if (this.fontOptions.background !== undefined && this.fontOptions.background !== \"none\") {\n ctx.fillStyle = this.fontOptions.background;\n const size = this.getSize();\n ctx.fillRect(size.left, size.top, size.width, size.height);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {string} [baseline]\n * @param {number} viewFontSize\n * @private\n */\n _drawText(ctx, x, y) {\n let baseline = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : \"middle\";\n let viewFontSize = arguments.length > 4 ? arguments[4] : undefined;\n [x, y] = this._setAlignment(ctx, x, y, baseline);\n ctx.textAlign = \"left\";\n x = x - this.size.width / 2; // Shift label 1/2-distance to the left\n if (this.fontOptions.valign && this.size.height > this.size.labelHeight) {\n if (this.fontOptions.valign === \"top\") {\n y -= (this.size.height - this.size.labelHeight) / 2;\n }\n if (this.fontOptions.valign === \"bottom\") {\n y += (this.size.height - this.size.labelHeight) / 2;\n }\n }\n\n // draw the text\n for (let i = 0; i < this.lineCount; i++) {\n const line = this.lines[i];\n if (line && line.blocks) {\n let width = 0;\n if (this.isEdgeLabel || this.fontOptions.align === \"center\") {\n width += (this.size.width - line.width) / 2;\n } else if (this.fontOptions.align === \"right\") {\n width += this.size.width - line.width;\n }\n for (let j = 0; j < line.blocks.length; j++) {\n const block = line.blocks[j];\n ctx.font = block.font;\n const [fontColor, strokeColor] = this._getColor(block.color, viewFontSize, block.strokeColor);\n if (block.strokeWidth > 0) {\n ctx.lineWidth = block.strokeWidth;\n ctx.strokeStyle = strokeColor;\n ctx.lineJoin = \"round\";\n }\n ctx.fillStyle = fontColor;\n if (block.strokeWidth > 0) {\n ctx.strokeText(block.text, x + width, y + block.vadjust);\n }\n ctx.fillText(block.text, x + width, y + block.vadjust);\n width += block.width;\n }\n y += line.height;\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {string} baseline\n * @returns {Array.<number>}\n * @private\n */\n _setAlignment(ctx, x, y, baseline) {\n // check for label alignment (for edges)\n // TODO: make alignment for nodes\n if (this.isEdgeLabel && this.fontOptions.align !== \"horizontal\" && this.pointToSelf === false) {\n x = 0;\n y = 0;\n const lineMargin = 2;\n if (this.fontOptions.align === \"top\") {\n ctx.textBaseline = \"alphabetic\";\n y -= 2 * lineMargin; // distance from edge, required because we use alphabetic. Alphabetic has less difference between browsers\n } else if (this.fontOptions.align === \"bottom\") {\n ctx.textBaseline = \"hanging\";\n y += 2 * lineMargin; // distance from edge, required because we use hanging. Hanging has less difference between browsers\n } else {\n ctx.textBaseline = \"middle\";\n }\n } else {\n ctx.textBaseline = baseline;\n }\n return [x, y];\n }\n\n /**\n * fade in when relative scale is between threshold and threshold - 1.\n * If the relative scale would be smaller than threshold -1 the draw function would have returned before coming here.\n * @param {string} color The font color to use\n * @param {number} viewFontSize\n * @param {string} initialStrokeColor\n * @returns {Array.<string>} An array containing the font color and stroke color\n * @private\n */\n _getColor(color, viewFontSize, initialStrokeColor) {\n let fontColor = color || \"#000000\";\n let strokeColor = initialStrokeColor || \"#ffffff\";\n if (viewFontSize <= this.elementOptions.scaling.label.drawThreshold) {\n const opacity = Math.max(0, Math.min(1, 1 - (this.elementOptions.scaling.label.drawThreshold - viewFontSize)));\n fontColor = overrideOpacity(fontColor, opacity);\n strokeColor = overrideOpacity(strokeColor, opacity);\n }\n return [fontColor, strokeColor];\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {{width: number, height: number}}\n */\n getTextSize(ctx) {\n let selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n this._processLabel(ctx, selected, hover);\n return {\n width: this.size.width,\n height: this.size.height,\n lineCount: this.lineCount\n };\n }\n\n /**\n * Get the current dimensions of the label\n * @returns {rect}\n */\n getSize() {\n const lineMargin = 2;\n let x = this.size.left; // default values which might be overridden below\n let y = this.size.top - 0.5 * lineMargin; // idem\n\n if (this.isEdgeLabel) {\n const x2 = -this.size.width * 0.5;\n switch (this.fontOptions.align) {\n case \"middle\":\n x = x2;\n y = -this.size.height * 0.5;\n break;\n case \"top\":\n x = x2;\n y = -(this.size.height + lineMargin);\n break;\n case \"bottom\":\n x = x2;\n y = lineMargin;\n break;\n }\n }\n const ret = {\n left: x,\n top: y,\n width: this.size.width,\n height: this.size.height\n };\n return ret;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {number} [x]\n * @param {number} [y]\n * @param {'middle'|'hanging'} [baseline]\n */\n calculateLabelSize(ctx, selected, hover) {\n let x = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n let y = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n let baseline = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : \"middle\";\n this._processLabel(ctx, selected, hover);\n this.size.left = x - this.size.width * 0.5;\n this.size.top = y - this.size.height * 0.5;\n this.size.yLine = y + (1 - this.lineCount) * 0.5 * this.fontOptions.size;\n if (baseline === \"hanging\") {\n this.size.top += 0.5 * this.fontOptions.size;\n this.size.top += 4; // distance from node, required because we use hanging. Hanging has less difference between browsers\n this.size.yLine += 4; // distance from node\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} mod\n * @returns {{color, size, face, mod, vadjust, strokeWidth: *, strokeColor: (*|string|allOptions.edges.font.strokeColor|{string}|allOptions.nodes.font.strokeColor|Array)}}\n */\n getFormattingValues(ctx, selected, hover, mod) {\n const getValue = function (fontOptions, mod, option) {\n if (mod === \"normal\") {\n if (option === \"mod\") return \"\";\n return fontOptions[option];\n }\n if (fontOptions[mod][option] !== undefined) {\n // Grumbl leaving out test on undefined equals false for \"\"\n return fontOptions[mod][option];\n } else {\n // Take from parent font option\n return fontOptions[option];\n }\n };\n const values = {\n color: getValue(this.fontOptions, mod, \"color\"),\n size: getValue(this.fontOptions, mod, \"size\"),\n face: getValue(this.fontOptions, mod, \"face\"),\n mod: getValue(this.fontOptions, mod, \"mod\"),\n vadjust: getValue(this.fontOptions, mod, \"vadjust\"),\n strokeWidth: this.fontOptions.strokeWidth,\n strokeColor: this.fontOptions.strokeColor\n };\n if (selected || hover) {\n if (mod === \"normal\" && this.fontOptions.chooser === true && this.elementOptions.labelHighlightBold) {\n values.mod = \"bold\";\n } else {\n if (typeof this.fontOptions.chooser === \"function\") {\n this.fontOptions.chooser(values, this.elementOptions.id, selected, hover);\n }\n }\n }\n let fontString = \"\";\n if (values.mod !== undefined && values.mod !== \"\") {\n // safeguard for undefined - this happened\n fontString += values.mod + \" \";\n }\n fontString += values.size + \"px \" + values.face;\n ctx.font = fontString.replace(/\"/g, \"\");\n values.font = ctx.font;\n values.height = values.size;\n return values;\n }\n\n /**\n *\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {boolean}\n */\n differentState(selected, hover) {\n return selected !== this.selectedState || hover !== this.hoverState;\n }\n\n /**\n * This explodes the passed text into lines and determines the width, height and number of lines.\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} inText the text to explode\n * @returns {{width, height, lines}|*}\n * @private\n */\n _processLabelText(ctx, selected, hover, inText) {\n const splitter = new LabelSplitter(ctx, this, selected, hover);\n return splitter.process(inText);\n }\n\n /**\n * This explodes the label string into lines and sets the width, height and number of lines.\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _processLabel(ctx, selected, hover) {\n if (this.labelDirty === false && !this.differentState(selected, hover)) return;\n const state = this._processLabelText(ctx, selected, hover, this.elementOptions.label);\n if (this.fontOptions.minWdt > 0 && state.width < this.fontOptions.minWdt) {\n state.width = this.fontOptions.minWdt;\n }\n this.size.labelHeight = state.height;\n if (this.fontOptions.minHgt > 0 && state.height < this.fontOptions.minHgt) {\n state.height = this.fontOptions.minHgt;\n }\n this.lines = state.lines;\n this.lineCount = state.lines.length;\n this.size.width = state.width;\n this.size.height = state.height;\n this.selectedState = selected;\n this.hoverState = hover;\n this.labelDirty = false;\n }\n\n /**\n * Check if this label is visible\n * @returns {boolean} true if this label will be show, false otherwise\n */\n visible() {\n if (this.size.width === 0 || this.size.height === 0 || this.elementOptions.label === undefined) {\n return false; // nothing to display\n }\n const viewFontSize = this.fontOptions.size * this.body.view.scale;\n if (viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) {\n return false; // Too small or too far away to show\n }\n return true;\n }\n}\n\n/**\n * The Base class for all Nodes.\n */\nclass NodeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n this.body = body;\n this.labelModule = labelModule;\n this.setOptions(options);\n this.top = undefined;\n this.left = undefined;\n this.height = undefined;\n this.width = undefined;\n this.radius = undefined;\n this.margin = undefined;\n this.refreshNeeded = true;\n this.boundingBox = {\n top: 0,\n left: 0,\n right: 0,\n bottom: 0\n };\n }\n\n /**\n *\n * @param {object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n *\n * @param {Label} labelModule\n * @private\n */\n _setMargins(labelModule) {\n this.margin = {};\n if (this.options.margin) {\n if (typeof this.options.margin == \"object\") {\n this.margin.top = this.options.margin.top;\n this.margin.right = this.options.margin.right;\n this.margin.bottom = this.options.margin.bottom;\n this.margin.left = this.options.margin.left;\n } else {\n this.margin.top = this.options.margin;\n this.margin.right = this.options.margin;\n this.margin.bottom = this.options.margin;\n this.margin.left = this.options.margin;\n }\n }\n labelModule.adjustSizes(this.margin);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n * @private\n */\n _distanceToBorder(ctx, angle) {\n const borderWidth = this.options.borderWidth;\n if (ctx) {\n this.resize(ctx);\n }\n return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = \"rgba(0,0,0,0)\";\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n let dashes = values.borderDashes;\n if (dashes === true) {\n dashes = [5, 15];\n }\n ctx.setLineDash(dashes);\n } else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([0]);\n } else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n\n /**\n * Determine if the shape of a node needs to be recalculated.\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {boolean}\n * @protected\n */\n needsRefresh(selected, hover) {\n if (this.refreshNeeded === true) {\n // This is probably not the best location to reset this member.\n // However, in the current logic, it is the most convenient one.\n this.refreshNeeded = false;\n return true;\n }\n return this.width === undefined || this.labelModule.differentState(selected, hover);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n initContextForDraw(ctx, values) {\n const borderWidth = values.borderWidth / this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, borderWidth);\n ctx.strokeStyle = values.borderColor;\n ctx.fillStyle = values.color;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n performStroke(ctx, values) {\n const borderWidth = values.borderWidth / this.body.view.scale;\n\n //draw dashed border if enabled, save and restore is required for firefox not to crash on unix.\n ctx.save();\n // if borders are zero width, they will be drawn with width 1 by default. This prevents that\n if (borderWidth > 0) {\n this.enableBorderDashes(ctx, values);\n //draw the border\n ctx.stroke();\n //disable dashed border for other elements\n this.disableBorderDashes(ctx, values);\n }\n ctx.restore();\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n performFill(ctx, values) {\n ctx.save();\n ctx.fillStyle = values.color;\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n // draw the background\n _fillInstanceProperty(ctx).call(ctx);\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n ctx.restore();\n this.performStroke(ctx, values);\n }\n\n /**\n *\n * @param {number} margin\n * @private\n */\n _addBoundingBoxMargin(margin) {\n this.boundingBox.left -= margin;\n this.boundingBox.top -= margin;\n this.boundingBox.bottom += margin;\n this.boundingBox.right += margin;\n }\n\n /**\n * Actual implementation of this method call.\n *\n * Doing it like this makes it easier to override\n * in the child classes.\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _updateBoundingBox(x, y, ctx, selected, hover) {\n if (ctx !== undefined) {\n this.resize(ctx, selected, hover);\n }\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this.boundingBox.left = this.left;\n this.boundingBox.top = this.top;\n this.boundingBox.bottom = this.top + this.height;\n this.boundingBox.right = this.left + this.width;\n }\n\n /**\n * Default implementation of this method call.\n * This acts as a stub which can be overridden.\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n updateBoundingBox(x, y, ctx, selected, hover) {\n this._updateBoundingBox(x, y, ctx, selected, hover);\n }\n\n /**\n * Determine the dimensions to use for nodes with an internal label\n *\n * Currently, these are: Circle, Ellipse, Database, Box\n * The other nodes have external labels, and will not call this method\n *\n * If there is no label, decent default values are supplied.\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n * @returns {{width:number, height:number}}\n */\n getDimensionsFromLabel(ctx, selected, hover) {\n // NOTE: previously 'textSize' was not put in 'this' for Ellipse\n // TODO: examine the consequences.\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n let width = this.textSize.width;\n let height = this.textSize.height;\n const DEFAULT_SIZE = 14;\n if (width === 0) {\n // This happens when there is no label text set\n width = DEFAULT_SIZE; // use a decent default\n height = DEFAULT_SIZE; // if width zero, then height also always zero\n }\n return {\n width: width,\n height: height\n };\n }\n}\n\n/**\n * A Box Node/Cluster shape.\n * @augments NodeBase\n */\nlet Box$1 = class Box extends NodeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx) {\n let selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n let hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n if (this.needsRefresh(selected, hover)) {\n const dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n this.width = dimensions.width + this.margin.right + this.margin.left;\n this.height = dimensions.height + this.margin.top + this.margin.bottom;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this.initContextForDraw(ctx, values);\n drawRoundRect(ctx, this.left, this.top, this.width, this.height, values.borderRadius);\n this.performFill(ctx, values);\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n\n /**\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n updateBoundingBox(x, y, ctx, selected, hover) {\n this._updateBoundingBox(x, y, ctx, selected, hover);\n const borderRadius = this.options.shapeProperties.borderRadius; // only effective for box\n this._addBoundingBoxMargin(borderRadius);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n if (ctx) {\n this.resize(ctx);\n }\n const borderWidth = this.options.borderWidth;\n return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth;\n }\n};\n\n/**\n * NOTE: This is a bad base class\n *\n * Child classes are:\n *\n * Image - uses *only* image methods\n * Circle - uses *only* _drawRawCircle\n * CircleImage - uses all\n *\n * TODO: Refactor, move _drawRawCircle to different module, derive Circle from NodeBase\n * Rename this to ImageBase\n * Consolidate common code in Image and CircleImage to base class\n * @augments NodeBase\n */\nclass CircleImageBase extends NodeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this.labelOffset = 0;\n this.selected = false;\n }\n\n /**\n *\n * @param {object} options\n * @param {object} [imageObj]\n * @param {object} [imageObjAlt]\n */\n setOptions(options, imageObj, imageObjAlt) {\n this.options = options;\n if (!(imageObj === undefined && imageObjAlt === undefined)) {\n this.setImages(imageObj, imageObjAlt);\n }\n }\n\n /**\n * Set the images for this node.\n *\n * The images can be updated after the initial setting of options;\n * therefore, this method needs to be reentrant.\n *\n * For correct working in error cases, it is necessary to properly set\n * field 'nodes.brokenImage' in the options.\n * @param {Image} imageObj required; main image to show for this node\n * @param {Image|undefined} imageObjAlt optional; image to show when node is selected\n */\n setImages(imageObj, imageObjAlt) {\n if (imageObjAlt && this.selected) {\n this.imageObj = imageObjAlt;\n this.imageObjAlt = imageObj;\n } else {\n this.imageObj = imageObj;\n this.imageObjAlt = imageObjAlt;\n }\n }\n\n /**\n * Set selection and switch between the base and the selected image.\n *\n * Do the switch only if imageObjAlt exists.\n * @param {boolean} selected value of new selected state for current node\n */\n switchImages(selected) {\n const selection_changed = selected && !this.selected || !selected && this.selected;\n this.selected = selected; // Remember new selection\n\n if (this.imageObjAlt !== undefined && selection_changed) {\n const imageTmp = this.imageObj;\n this.imageObj = this.imageObjAlt;\n this.imageObjAlt = imageTmp;\n }\n }\n\n /**\n * Returns Image Padding from node options\n * @returns {{top: number,left: number,bottom: number,right: number}} image padding inside this shape\n * @private\n */\n _getImagePadding() {\n const imgPadding = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n if (this.options.imagePadding) {\n const optImgPadding = this.options.imagePadding;\n if (typeof optImgPadding == \"object\") {\n imgPadding.top = optImgPadding.top;\n imgPadding.right = optImgPadding.right;\n imgPadding.bottom = optImgPadding.bottom;\n imgPadding.left = optImgPadding.left;\n } else {\n imgPadding.top = optImgPadding;\n imgPadding.right = optImgPadding;\n imgPadding.bottom = optImgPadding;\n imgPadding.left = optImgPadding;\n }\n }\n return imgPadding;\n }\n\n /**\n * Adjust the node dimensions for a loaded image.\n *\n * Pre: this.imageObj is valid\n */\n _resizeImage() {\n let width, height;\n if (this.options.shapeProperties.useImageSize === false) {\n // Use the size property\n let ratio_width = 1;\n let ratio_height = 1;\n\n // Only calculate the proper ratio if both width and height not zero\n if (this.imageObj.width && this.imageObj.height) {\n if (this.imageObj.width > this.imageObj.height) {\n ratio_width = this.imageObj.width / this.imageObj.height;\n } else {\n ratio_height = this.imageObj.height / this.imageObj.width;\n }\n }\n width = this.options.size * 2 * ratio_width;\n height = this.options.size * 2 * ratio_height;\n } else {\n // Use the image size with image padding\n const imgPadding = this._getImagePadding();\n width = this.imageObj.width + imgPadding.left + imgPadding.right;\n height = this.imageObj.height + imgPadding.top + imgPadding.bottom;\n }\n this.width = width;\n this.height = height;\n this.radius = 0.5 * this.width;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {ArrowOptions} values\n * @private\n */\n _drawRawCircle(ctx, x, y, values) {\n this.initContextForDraw(ctx, values);\n drawCircle(ctx, x, y, values.size);\n this.performFill(ctx, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @private\n */\n _drawImageAtPosition(ctx, values) {\n if (this.imageObj.width != 0) {\n // draw the image\n ctx.globalAlpha = values.opacity !== undefined ? values.opacity : 1;\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n let factor = 1;\n if (this.options.shapeProperties.interpolation === true) {\n factor = this.imageObj.width / this.width / this.body.view.scale;\n }\n const imgPadding = this._getImagePadding();\n const imgPosLeft = this.left + imgPadding.left;\n const imgPosTop = this.top + imgPadding.top;\n const imgWidth = this.width - imgPadding.left - imgPadding.right;\n const imgHeight = this.height - imgPadding.top - imgPadding.bottom;\n this.imageObj.drawImageAtPosition(ctx, factor, imgPosLeft, imgPosTop, imgWidth, imgHeight);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _drawImageLabel(ctx, x, y, selected, hover) {\n let offset = 0;\n if (this.height !== undefined) {\n offset = this.height * 0.5;\n const labelDimensions = this.labelModule.getTextSize(ctx, selected, hover);\n if (labelDimensions.lineCount >= 1) {\n offset += labelDimensions.height / 2;\n }\n }\n const yLabel = y + offset;\n if (this.options.label) {\n this.labelOffset = offset;\n }\n this.labelModule.draw(ctx, x, yLabel, selected, hover, \"hanging\");\n }\n}\n\n/**\n * A Circle Node/Cluster shape.\n * @augments CircleImageBase\n */\nlet Circle$1 = class Circle extends CircleImageBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx) {\n let selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n let hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n if (this.needsRefresh(selected, hover)) {\n const dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n const diameter = Math.max(dimensions.width + this.margin.right + this.margin.left, dimensions.height + this.margin.top + this.margin.bottom);\n this.options.size = diameter / 2; // NOTE: this size field only set here, not in Ellipse, Database, Box\n this.width = diameter;\n this.height = diameter;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this._drawRawCircle(ctx, x, y, values);\n this.updateBoundingBox(x, y);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, y, selected, hover);\n }\n\n /**\n *\n * @param {number} x width\n * @param {number} y height\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @returns {number}\n */\n distanceToBorder(ctx) {\n if (ctx) {\n this.resize(ctx);\n }\n return this.width * 0.5;\n }\n};\n\n/**\n * A CircularImage Node/Cluster shape.\n * @augments CircleImageBase\n */\nclass CircularImage extends CircleImageBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n * @param {Image} imageObj\n * @param {Image} imageObjAlt\n */\n constructor(options, body, labelModule, imageObj, imageObjAlt) {\n super(options, body, labelModule);\n this.setImages(imageObj, imageObjAlt);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx) {\n let selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n let hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n const imageAbsent = this.imageObj.src === undefined || this.imageObj.width === undefined || this.imageObj.height === undefined;\n if (imageAbsent) {\n const diameter = this.options.size * 2;\n this.width = diameter;\n this.height = diameter;\n this.radius = 0.5 * this.width;\n return;\n }\n\n // At this point, an image is present, i.e. this.imageObj is valid.\n if (this.needsRefresh(selected, hover)) {\n this._resizeImage();\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.switchImages(selected);\n this.resize();\n let labelX = x,\n labelY = y;\n if (this.options.shapeProperties.coordinateOrigin === \"top-left\") {\n this.left = x;\n this.top = y;\n labelX += this.width / 2;\n labelY += this.height / 2;\n } else {\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n }\n\n // draw the background circle. IMPORTANT: the stroke in this method is used by the clip method below.\n this._drawRawCircle(ctx, labelX, labelY, values);\n\n // now we draw in the circle, we save so we can revert the clip operation after drawing.\n ctx.save();\n // clip is used to use the stroke in drawRawCircle as an area that we can draw in.\n ctx.clip();\n // draw the image\n this._drawImageAtPosition(ctx, values);\n // restore so we can again draw on the full canvas\n ctx.restore();\n this._drawImageLabel(ctx, labelX, labelY, selected, hover);\n this.updateBoundingBox(x, y);\n }\n\n // TODO: compare with Circle.updateBoundingBox(), consolidate? More stuff is happening here\n /**\n *\n * @param {number} x width\n * @param {number} y height\n */\n updateBoundingBox(x, y) {\n if (this.options.shapeProperties.coordinateOrigin === \"top-left\") {\n this.boundingBox.top = y;\n this.boundingBox.left = x;\n this.boundingBox.right = x + this.options.size * 2;\n this.boundingBox.bottom = y + this.options.size * 2;\n } else {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n }\n\n // TODO: compare with Image.updateBoundingBox(), consolidate?\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @returns {number}\n */\n distanceToBorder(ctx) {\n if (ctx) {\n this.resize(ctx);\n }\n return this.width * 0.5;\n }\n}\n\n/**\n * Base class for constructing Node/Cluster Shapes.\n * @augments NodeBase\n */\nclass ShapeBase extends NodeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n * @param {object} [values]\n */\n resize(ctx) {\n let selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n let hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n let values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {\n size: this.options.size\n };\n if (this.needsRefresh(selected, hover)) {\n var _this$customSizeWidth, _this$customSizeHeigh;\n this.labelModule.getTextSize(ctx, selected, hover);\n const size = 2 * values.size;\n this.width = (_this$customSizeWidth = this.customSizeWidth) !== null && _this$customSizeWidth !== void 0 ? _this$customSizeWidth : size;\n this.height = (_this$customSizeHeigh = this.customSizeHeight) !== null && _this$customSizeHeigh !== void 0 ? _this$customSizeHeigh : size;\n this.radius = 0.5 * this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} shape\n * @param {number} sizeMultiplier - Unused! TODO: Remove next major release\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @private\n * @returns {object} Callbacks to draw later on higher layers.\n */\n _drawShape(ctx, shape, sizeMultiplier, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover, values);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this.initContextForDraw(ctx, values);\n getShape(shape)(ctx, x, y, values.size);\n this.performFill(ctx, values);\n if (this.options.icon !== undefined) {\n if (this.options.icon.code !== undefined) {\n ctx.font = (selected ? \"bold \" : \"\") + this.height / 2 + \"px \" + (this.options.icon.face || \"FontAwesome\");\n ctx.fillStyle = this.options.icon.color || \"black\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n ctx.fillText(this.options.icon.code, x, y);\n }\n }\n return {\n drawExternalLabel: () => {\n if (this.options.label !== undefined) {\n // Need to call following here in order to ensure value for\n // `this.labelModule.size.height`.\n this.labelModule.calculateLabelSize(ctx, selected, hover, x, y, \"hanging\");\n const yLabel = y + 0.5 * this.height + 0.5 * this.labelModule.size.height;\n this.labelModule.draw(ctx, x, yLabel, selected, hover, \"hanging\");\n }\n this.updateBoundingBox(x, y);\n }\n };\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height);\n }\n }\n}\n\nfunction ownKeys$3(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$3(Object(t), true)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$3(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n/**\n * A CustomShape Node/Cluster shape.\n * @augments ShapeBase\n */\nclass CustomShape extends ShapeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n * @param {Function} ctxRenderer\n */\n constructor(options, body, labelModule, ctxRenderer) {\n super(options, body, labelModule, ctxRenderer);\n this.ctxRenderer = ctxRenderer;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @returns {object} Callbacks to draw later on different layers.\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover, values);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n // Guard right away because someone may just draw in the function itself.\n ctx.save();\n const drawLater = this.ctxRenderer({\n ctx,\n id: this.options.id,\n x,\n y,\n state: {\n selected,\n hover\n },\n style: _objectSpread$3({}, values),\n label: this.options.label\n });\n // Render the node shape bellow arrows.\n if (drawLater.drawNode != null) {\n drawLater.drawNode();\n }\n ctx.restore();\n if (drawLater.drawExternalLabel) {\n // Guard the external label (above arrows) drawing function.\n const drawExternalLabel = drawLater.drawExternalLabel;\n drawLater.drawExternalLabel = () => {\n ctx.save();\n drawExternalLabel();\n ctx.restore();\n };\n }\n if (drawLater.nodeDimensions) {\n this.customSizeWidth = drawLater.nodeDimensions.width;\n this.customSizeHeight = drawLater.nodeDimensions.height;\n }\n return drawLater;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n}\n\n/**\n * A Database Node/Cluster shape.\n * @augments NodeBase\n */\nclass Database extends NodeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n const dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n const size = dimensions.width + this.margin.right + this.margin.left;\n this.width = size;\n this.height = size;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this.initContextForDraw(ctx, values);\n drawDatabase(ctx, x - this.width / 2, y - this.height / 2, this.width, this.height);\n this.performFill(ctx, values);\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n}\n\n/**\n * A Diamond Node/Cluster shape.\n * @augments ShapeBase\n */\nlet Diamond$1 = class Diamond extends ShapeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @returns {object} Callbacks to draw later on higher layers.\n */\n draw(ctx, x, y, selected, hover, values) {\n return this._drawShape(ctx, \"diamond\", 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n};\n\n/**\n * A Dot Node/Cluster shape.\n * @augments ShapeBase\n */\nclass Dot extends ShapeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @returns {object} Callbacks to draw later on higher layers.\n */\n draw(ctx, x, y, selected, hover, values) {\n return this._drawShape(ctx, \"circle\", 2, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @returns {number}\n */\n distanceToBorder(ctx) {\n if (ctx) {\n this.resize(ctx);\n }\n return this.options.size;\n }\n}\n\n/**\n * Am Ellipse Node/Cluster shape.\n * @augments NodeBase\n */\nclass Ellipse extends NodeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx) {\n let selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n let hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n if (this.needsRefresh(selected, hover)) {\n const dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n this.height = dimensions.height * 2;\n this.width = dimensions.width + dimensions.height;\n this.radius = 0.5 * this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width * 0.5;\n this.top = y - this.height * 0.5;\n this.initContextForDraw(ctx, values);\n drawEllipse(ctx, this.left, this.top, this.width, this.height);\n this.performFill(ctx, values);\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, x, y, selected, hover);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n if (ctx) {\n this.resize(ctx);\n }\n const a = this.width * 0.5;\n const b = this.height * 0.5;\n const w = Math.sin(angle) * a;\n const h = Math.cos(angle) * b;\n return a * b / Math.sqrt(w * w + h * h);\n }\n}\n\n/**\n * An icon replacement for the default Node shape.\n * @augments NodeBase\n */\nclass Icon extends NodeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx - Unused.\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n this.iconSize = {\n width: Number(this.options.icon.size),\n height: Number(this.options.icon.size)\n };\n this.width = this.iconSize.width + this.margin.right + this.margin.left;\n this.height = this.iconSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5 * this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @returns {object} Callbacks to draw later on higher layers.\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.options.icon.size = this.options.icon.size || 50;\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this._icon(ctx, x, y, selected, hover, values);\n return {\n drawExternalLabel: () => {\n if (this.options.label !== undefined) {\n const iconTextSpacing = 5;\n this.labelModule.draw(ctx, this.left + this.iconSize.width / 2 + this.margin.left, y + this.height / 2 + iconTextSpacing, selected);\n }\n this.updateBoundingBox(x, y);\n }\n };\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.icon.size * 0.5;\n this.boundingBox.left = x - this.options.icon.size * 0.5;\n this.boundingBox.right = x + this.options.icon.size * 0.5;\n this.boundingBox.bottom = y + this.options.icon.size * 0.5;\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n const iconTextSpacing = 5;\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height + iconTextSpacing);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover - Unused\n * @param {ArrowOptions} values\n */\n _icon(ctx, x, y, selected, hover, values) {\n const iconSize = Number(this.options.icon.size);\n if (this.options.icon.code !== undefined) {\n ctx.font = [this.options.icon.weight != null ? this.options.icon.weight : selected ? \"bold\" : \"\",\n // If the weight is forced (for example to make Font Awesome 5 work\n // properly) substitute slightly bigger size for bold font face.\n (this.options.icon.weight != null && selected ? 5 : 0) + iconSize + \"px\", this.options.icon.face].join(\" \");\n\n // draw icon\n ctx.fillStyle = this.options.icon.color || \"black\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.fillText(this.options.icon.code, x, y);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n } else {\n console.error(\"When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.\");\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n}\n\n/**\n * An image-based replacement for the default Node shape.\n * @augments CircleImageBase\n */\nlet Image$2 = class Image extends CircleImageBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n * @param {Image} imageObj\n * @param {Image} imageObjAlt\n */\n constructor(options, body, labelModule, imageObj, imageObjAlt) {\n super(options, body, labelModule);\n this.setImages(imageObj, imageObjAlt);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx - Unused.\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx) {\n let selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n let hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n const imageAbsent = this.imageObj.src === undefined || this.imageObj.width === undefined || this.imageObj.height === undefined;\n if (imageAbsent) {\n const side = this.options.size * 2;\n this.width = side;\n this.height = side;\n return;\n }\n if (this.needsRefresh(selected, hover)) {\n this._resizeImage();\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n ctx.save();\n this.switchImages(selected);\n this.resize();\n let labelX = x,\n labelY = y;\n if (this.options.shapeProperties.coordinateOrigin === \"top-left\") {\n this.left = x;\n this.top = y;\n labelX += this.width / 2;\n labelY += this.height / 2;\n } else {\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n }\n if (this.options.shapeProperties.useBorderWithImage === true) {\n const neutralborderWidth = this.options.borderWidth;\n const selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth;\n const borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, borderWidth);\n ctx.beginPath();\n let strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border;\n let fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background;\n if (values.opacity !== undefined) {\n strokeStyle = overrideOpacity(strokeStyle, values.opacity);\n fillStyle = overrideOpacity(fillStyle, values.opacity);\n }\n // setup the line properties.\n ctx.strokeStyle = strokeStyle;\n\n // set a fillstyle\n ctx.fillStyle = fillStyle;\n\n // draw a rectangle to form the border around. This rectangle is filled so the opacity of a picture (in future vis releases?) can be used to tint the image\n ctx.rect(this.left - 0.5 * ctx.lineWidth, this.top - 0.5 * ctx.lineWidth, this.width + ctx.lineWidth, this.height + ctx.lineWidth);\n _fillInstanceProperty(ctx).call(ctx);\n this.performStroke(ctx, values);\n ctx.closePath();\n }\n this._drawImageAtPosition(ctx, values);\n this._drawImageLabel(ctx, labelX, labelY, selected, hover);\n this.updateBoundingBox(x, y);\n ctx.restore();\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.resize();\n if (this.options.shapeProperties.coordinateOrigin === \"top-left\") {\n this.left = x;\n this.top = y;\n } else {\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n }\n this.boundingBox.left = this.left;\n this.boundingBox.top = this.top;\n this.boundingBox.bottom = this.top + this.height;\n this.boundingBox.right = this.left + this.width;\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n};\n\n/**\n * A Square Node/Cluster shape.\n * @augments ShapeBase\n */\nclass Square extends ShapeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @returns {object} Callbacks to draw later on higher layers.\n */\n draw(ctx, x, y, selected, hover, values) {\n return this._drawShape(ctx, \"square\", 2, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n}\n\n/**\n * A Hexagon Node/Cluster shape.\n * @augments ShapeBase\n */\nclass Hexagon extends ShapeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @returns {object} Callbacks to draw later on higher layers.\n */\n draw(ctx, x, y, selected, hover, values) {\n return this._drawShape(ctx, \"hexagon\", 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n}\n\n/**\n * A Star Node/Cluster shape.\n * @augments ShapeBase\n */\nclass Star extends ShapeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @returns {object} Callbacks to draw later on higher layers.\n */\n draw(ctx, x, y, selected, hover, values) {\n return this._drawShape(ctx, \"star\", 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n}\n\n/**\n * A text-based replacement for the default Node shape.\n * @augments NodeBase\n */\nclass Text extends NodeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n this.width = this.textSize.width + this.margin.right + this.margin.left;\n this.height = this.textSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5 * this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n this.updateBoundingBox(x, y, ctx, selected, hover);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n}\n\n/**\n * A Triangle Node/Cluster shape.\n * @augments ShapeBase\n */\nlet Triangle$1 = class Triangle extends ShapeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @returns {object} Callbacks to draw later on higher layers.\n */\n draw(ctx, x, y, selected, hover, values) {\n return this._drawShape(ctx, \"triangle\", 3, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n};\n\n/**\n * A downward facing Triangle Node/Cluster shape.\n * @augments ShapeBase\n */\nclass TriangleDown extends ShapeBase {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @returns {object} Callbacks to draw later on higher layers.\n */\n draw(ctx, x, y, selected, hover, values) {\n return this._drawShape(ctx, \"triangleDown\", 3, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n}\n\nfunction ownKeys$2(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context5 = ownKeys$2(Object(t), true)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context6 = ownKeys$2(Object(t))).call(_context6, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n/**\n * A node. A node can be connected to other nodes via one or multiple edges.\n */\nclass Node {\n /**\n *\n * @param {object} options An object containing options for the node. All\n * options are optional, except for the id.\n * {number} id Id of the node. Required\n * {string} label Text label for the node\n * {number} x Horizontal position of the node\n * {number} y Vertical position of the node\n * {string} shape Node shape\n * {string} image An image url\n * {string} title A title text, can be HTML\n * {anytype} group A group name or number\n * @param {object} body Shared state of current network instance\n * @param {Network.Images} imagelist A list with images. Only needed when the node has an image\n * @param {Groups} grouplist A list with groups. Needed for retrieving group options\n * @param {object} globalOptions Current global node options; these serve as defaults for the node instance\n * @param {object} defaultOptions Global default options for nodes; note that this is also the prototype\n * for parameter `globalOptions`.\n */\n constructor(options, body, imagelist, grouplist, globalOptions, defaultOptions) {\n this.options = bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.body = body;\n this.edges = []; // all edges connected to this node\n\n // set defaults for the options\n this.id = undefined;\n this.imagelist = imagelist;\n this.grouplist = grouplist;\n\n // state options\n this.x = undefined;\n this.y = undefined;\n this.baseSize = this.options.size;\n this.baseFontSize = this.options.font.size;\n this.predefinedPosition = false; // used to check if initial fit should just take the range or approximate\n this.selected = false;\n this.hover = false;\n this.labelModule = new Label(this.body, this.options, false /* Not edge label */);\n this.setOptions(options);\n }\n\n /**\n * Attach a edge to the node\n * @param {Edge} edge\n */\n attachEdge(edge) {\n var _context;\n if (_indexOfInstanceProperty(_context = this.edges).call(_context, edge) === -1) {\n this.edges.push(edge);\n }\n }\n\n /**\n * Detach a edge from the node\n * @param {Edge} edge\n */\n detachEdge(edge) {\n var _context2;\n const index = _indexOfInstanceProperty(_context2 = this.edges).call(_context2, edge);\n if (index != -1) {\n var _context3;\n _spliceInstanceProperty(_context3 = this.edges).call(_context3, index, 1);\n }\n }\n\n /**\n * Set or overwrite options for the node\n * @param {object} options an object with options\n * @returns {null|boolean}\n */\n setOptions(options) {\n const currentShape = this.options.shape;\n if (!options) {\n return; // Note that the return value will be 'undefined'! This is OK.\n }\n\n // Save the color for later.\n // This is necessary in order to prevent local color from being overwritten by group color.\n // TODO: To prevent such workarounds the way options are handled should be rewritten from scratch.\n // This is not the only problem with current options handling.\n if (typeof options.color !== \"undefined\") {\n this._localColor = options.color;\n }\n\n // basic options\n if (options.id !== undefined) {\n this.id = options.id;\n }\n if (this.id === undefined) {\n throw new Error(\"Node must have an id\");\n }\n Node.checkMass(options, this.id);\n\n // set these options locally\n // clear x and y positions\n if (options.x !== undefined) {\n if (options.x === null) {\n this.x = undefined;\n this.predefinedPosition = false;\n } else {\n this.x = _parseInt(options.x);\n this.predefinedPosition = true;\n }\n }\n if (options.y !== undefined) {\n if (options.y === null) {\n this.y = undefined;\n this.predefinedPosition = false;\n } else {\n this.y = _parseInt(options.y);\n this.predefinedPosition = true;\n }\n }\n if (options.size !== undefined) {\n this.baseSize = options.size;\n }\n if (options.value !== undefined) {\n options.value = _parseFloat(options.value);\n }\n\n // this transforms all shorthands into fully defined options\n Node.parseOptions(this.options, options, true, this.globalOptions, this.grouplist);\n const pile = [options, this.options, this.defaultOptions];\n this.chooser = choosify(\"node\", pile);\n this._load_images();\n this.updateLabelModule(options);\n\n // Need to set local opacity after `this.updateLabelModule(options);` because `this.updateLabelModule(options);` overrites local opacity with group opacity\n if (options.opacity !== undefined && Node.checkOpacity(options.opacity)) {\n this.options.opacity = options.opacity;\n }\n this.updateShape(currentShape);\n return options.hidden !== undefined || options.physics !== undefined;\n }\n\n /**\n * Load the images from the options, for the nodes that need them.\n *\n * Images are always loaded, even if they are not used in the current shape.\n * The user may switch to an image shape later on.\n * @private\n */\n _load_images() {\n if (this.options.shape === \"circularImage\" || this.options.shape === \"image\") {\n if (this.options.image === undefined) {\n throw new Error(\"Option image must be defined for node type '\" + this.options.shape + \"'\");\n }\n }\n if (this.options.image === undefined) {\n return;\n }\n if (this.imagelist === undefined) {\n throw new Error(\"Internal Error: No images provided\");\n }\n if (typeof this.options.image === \"string\") {\n this.imageObj = this.imagelist.load(this.options.image, this.options.brokenImage, this.id);\n } else {\n if (this.options.image.unselected === undefined) {\n throw new Error(\"No unselected image provided\");\n }\n this.imageObj = this.imagelist.load(this.options.image.unselected, this.options.brokenImage, this.id);\n if (this.options.image.selected !== undefined) {\n this.imageObjAlt = this.imagelist.load(this.options.image.selected, this.options.brokenImage, this.id);\n } else {\n this.imageObjAlt = undefined;\n }\n }\n }\n\n /**\n * Check that opacity is only between 0 and 1\n * @param {number} opacity\n * @returns {boolean}\n */\n static checkOpacity(opacity) {\n return 0 <= opacity && opacity <= 1;\n }\n\n /**\n * Check that origin is 'center' or 'top-left'\n * @param {string} origin\n * @returns {boolean}\n */\n static checkCoordinateOrigin(origin) {\n return origin === undefined || origin === \"center\" || origin === \"top-left\";\n }\n\n /**\n * Copy group option values into the node options.\n *\n * The group options override the global node options, so the copy of group options\n * must happen *after* the global node options have been set.\n *\n * This method must also be called also if the global node options have changed and the group options did not.\n * @param {object} parentOptions\n * @param {object} newOptions new values for the options, currently only passed in for check\n * @param {object} groupList\n */\n static updateGroupOptions(parentOptions, newOptions, groupList) {\n var _context4;\n if (groupList === undefined) return; // No groups, nothing to do\n\n const group = parentOptions.group;\n\n // paranoia: the selected group is already merged into node options, check.\n if (newOptions !== undefined && newOptions.group !== undefined && group !== newOptions.group) {\n throw new Error(\"updateGroupOptions: group values in options don't match.\");\n }\n const hasGroup = typeof group === \"number\" || typeof group === \"string\" && group != \"\";\n if (!hasGroup) return; // current node has no group, no need to merge\n\n const groupObj = groupList.get(group);\n if (groupObj.opacity !== undefined && newOptions.opacity === undefined) {\n if (!Node.checkOpacity(groupObj.opacity)) {\n console.error(\"Invalid option for node opacity. Value must be between 0 and 1, found: \" + groupObj.opacity);\n groupObj.opacity = undefined;\n }\n }\n\n // Skip any new option to avoid them being overridden by the group options.\n const skipProperties = _filterInstanceProperty(_context4 = _Object$getOwnPropertyNames(newOptions)).call(_context4, p => newOptions[p] != null);\n // Always skip merging group font options into parent; these are required to be distinct for labels\n skipProperties.push(\"font\");\n selectiveNotDeepExtend(skipProperties, parentOptions, groupObj);\n\n // the color object needs to be completely defined.\n // Since groups can partially overwrite the colors, we parse it again, just in case.\n parentOptions.color = parseColor(parentOptions.color);\n }\n\n /**\n * This process all possible shorthands in the new options and makes sure that the parentOptions are fully defined.\n * Static so it can also be used by the handler.\n * @param {object} parentOptions\n * @param {object} newOptions\n * @param {boolean} [allowDeletion]\n * @param {object} [globalOptions]\n * @param {object} [groupList]\n * @static\n */\n static parseOptions(parentOptions, newOptions) {\n let allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n let groupList = arguments.length > 4 ? arguments[4] : undefined;\n const fields = [\"color\", \"fixed\", \"shadow\"];\n selectiveNotDeepExtend(fields, parentOptions, newOptions, allowDeletion);\n Node.checkMass(newOptions);\n if (parentOptions.opacity !== undefined) {\n if (!Node.checkOpacity(parentOptions.opacity)) {\n console.error(\"Invalid option for node opacity. Value must be between 0 and 1, found: \" + parentOptions.opacity);\n parentOptions.opacity = undefined;\n }\n }\n if (newOptions.opacity !== undefined) {\n if (!Node.checkOpacity(newOptions.opacity)) {\n console.error(\"Invalid option for node opacity. Value must be between 0 and 1, found: \" + newOptions.opacity);\n newOptions.opacity = undefined;\n }\n }\n if (newOptions.shapeProperties && !Node.checkCoordinateOrigin(newOptions.shapeProperties.coordinateOrigin)) {\n console.error(\"Invalid option for node coordinateOrigin, found: \" + newOptions.shapeProperties.coordinateOrigin);\n }\n\n // merge the shadow options into the parent.\n mergeOptions(parentOptions, newOptions, \"shadow\", globalOptions);\n\n // individual shape newOptions\n if (newOptions.color !== undefined && newOptions.color !== null) {\n const parsedColor = parseColor(newOptions.color);\n fillIfDefined(parentOptions.color, parsedColor);\n } else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = bridgeObject(globalOptions.color); // set the object back to the global options\n }\n\n // handle the fixed options\n if (newOptions.fixed !== undefined && newOptions.fixed !== null) {\n if (typeof newOptions.fixed === \"boolean\") {\n parentOptions.fixed.x = newOptions.fixed;\n parentOptions.fixed.y = newOptions.fixed;\n } else {\n if (newOptions.fixed.x !== undefined && typeof newOptions.fixed.x === \"boolean\") {\n parentOptions.fixed.x = newOptions.fixed.x;\n }\n if (newOptions.fixed.y !== undefined && typeof newOptions.fixed.y === \"boolean\") {\n parentOptions.fixed.y = newOptions.fixed.y;\n }\n }\n }\n if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = bridgeObject(globalOptions.font); // set the object back to the global options\n }\n Node.updateGroupOptions(parentOptions, newOptions, groupList);\n\n // handle the scaling options, specifically the label part\n if (newOptions.scaling !== undefined) {\n mergeOptions(parentOptions.scaling, newOptions.scaling, \"label\", globalOptions.scaling);\n }\n }\n\n /**\n *\n * @returns {{color: *, borderWidth: *, borderColor: *, size: *, borderDashes: (boolean|Array|allOptions.nodes.shapeProperties.borderDashes|{boolean, array}), borderRadius: (number|allOptions.nodes.shapeProperties.borderRadius|{number}|Array), shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *}}\n */\n getFormattingValues() {\n const values = {\n color: this.options.color.background,\n opacity: this.options.opacity,\n borderWidth: this.options.borderWidth,\n borderColor: this.options.color.border,\n size: this.options.size,\n borderDashes: this.options.shapeProperties.borderDashes,\n borderRadius: this.options.shapeProperties.borderRadius,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y\n };\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n if (this.options.borderWidthSelected != null) {\n values.borderWidth = this.options.borderWidthSelected;\n } else {\n values.borderWidth *= 2;\n }\n values.color = this.options.color.highlight.background;\n values.borderColor = this.options.color.highlight.border;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n values.color = this.options.color.hover.background;\n values.borderColor = this.options.color.hover.border;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === \"function\") {\n this.chooser(values, this.options.id, this.selected, this.hover);\n if (values.shadow === false) {\n if (values.shadowColor !== this.options.shadow.color || values.shadowSize !== this.options.shadow.size || values.shadowX !== this.options.shadow.x || values.shadowY !== this.options.shadow.y) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n }\n if (this.options.opacity !== undefined) {\n const opacity = this.options.opacity;\n values.borderColor = overrideOpacity(values.borderColor, opacity);\n values.color = overrideOpacity(values.color, opacity);\n values.shadowColor = overrideOpacity(values.shadowColor, opacity);\n }\n return values;\n }\n\n /**\n *\n * @param {object} options\n */\n updateLabelModule(options) {\n if (this.options.label === undefined || this.options.label === null) {\n this.options.label = \"\";\n }\n Node.updateGroupOptions(this.options, _objectSpread$2(_objectSpread$2({}, options), {}, {\n color: options && options.color || this._localColor || undefined\n }), this.grouplist);\n\n //\n // Note:The prototype chain for this.options is:\n //\n // this.options -> NodesHandler.options -> NodesHandler.defaultOptions\n // (also: this.globalOptions)\n //\n // Note that the prototypes are mentioned explicitly in the pile list below;\n // WE DON'T WANT THE ORDER OF THE PROTOTYPES!!!! At least, not for font handling of labels.\n // This is a good indication that the prototype usage of options is deficient.\n //\n const currentGroup = this.grouplist.get(this.options.group, false);\n const pile = [options,\n // new options\n this.options,\n // current node options, see comment above for prototype\n currentGroup,\n // group options, if any\n this.globalOptions,\n // Currently set global node options\n this.defaultOptions // Default global node options\n ];\n this.labelModule.update(this.options, pile);\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n }\n\n /**\n *\n * @param {string} currentShape\n */\n updateShape(currentShape) {\n if (currentShape === this.options.shape && this.shape) {\n this.shape.setOptions(this.options, this.imageObj, this.imageObjAlt);\n } else {\n // choose draw method depending on the shape\n switch (this.options.shape) {\n case \"box\":\n this.shape = new Box$1(this.options, this.body, this.labelModule);\n break;\n case \"circle\":\n this.shape = new Circle$1(this.options, this.body, this.labelModule);\n break;\n case \"circularImage\":\n this.shape = new CircularImage(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n case \"custom\":\n this.shape = new CustomShape(this.options, this.body, this.labelModule, this.options.ctxRenderer);\n break;\n case \"database\":\n this.shape = new Database(this.options, this.body, this.labelModule);\n break;\n case \"diamond\":\n this.shape = new Diamond$1(this.options, this.body, this.labelModule);\n break;\n case \"dot\":\n this.shape = new Dot(this.options, this.body, this.labelModule);\n break;\n case \"ellipse\":\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n break;\n case \"icon\":\n this.shape = new Icon(this.options, this.body, this.labelModule);\n break;\n case \"image\":\n this.shape = new Image$2(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n case \"square\":\n this.shape = new Square(this.options, this.body, this.labelModule);\n break;\n case \"hexagon\":\n this.shape = new Hexagon(this.options, this.body, this.labelModule);\n break;\n case \"star\":\n this.shape = new Star(this.options, this.body, this.labelModule);\n break;\n case \"text\":\n this.shape = new Text(this.options, this.body, this.labelModule);\n break;\n case \"triangle\":\n this.shape = new Triangle$1(this.options, this.body, this.labelModule);\n break;\n case \"triangleDown\":\n this.shape = new TriangleDown(this.options, this.body, this.labelModule);\n break;\n default:\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n break;\n }\n }\n this.needsRefresh();\n }\n\n /**\n * select this node\n */\n select() {\n this.selected = true;\n this.needsRefresh();\n }\n\n /**\n * unselect this node\n */\n unselect() {\n this.selected = false;\n this.needsRefresh();\n }\n\n /**\n * Reset the calculated size of the node, forces it to recalculate its size\n */\n needsRefresh() {\n this.shape.refreshNeeded = true;\n }\n\n /**\n * get the title of this node.\n * @returns {string} title The title of the node, or undefined when no title\n * has been set.\n */\n getTitle() {\n return this.options.title;\n }\n\n /**\n * Calculate the distance to the border of the Node\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle Angle in radians\n * @returns {number} distance Distance to the border in pixels\n */\n distanceToBorder(ctx, angle) {\n return this.shape.distanceToBorder(ctx, angle);\n }\n\n /**\n * Check if this node has a fixed x and y position\n * @returns {boolean} true if fixed, false if not\n */\n isFixed() {\n return this.options.fixed.x && this.options.fixed.y;\n }\n\n /**\n * check if this node is selecte\n * @returns {boolean} selected True if node is selected, else false\n */\n isSelected() {\n return this.selected;\n }\n\n /**\n * Retrieve the value of the node. Can be undefined\n * @returns {number} value\n */\n getValue() {\n return this.options.value;\n }\n\n /**\n * Get the current dimensions of the label\n * @returns {rect}\n */\n getLabelSize() {\n return this.labelModule.size();\n }\n\n /**\n * Adjust the value range of the node. The node will adjust it's size\n * based on its value.\n * @param {number} min\n * @param {number} max\n * @param {number} total\n */\n setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n const scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n const sizeDiff = this.options.scaling.max - this.options.scaling.min;\n if (this.options.scaling.label.enabled === true) {\n const fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n this.options.size = this.options.scaling.min + scale * sizeDiff;\n } else {\n this.options.size = this.baseSize;\n this.options.font.size = this.baseFontSize;\n }\n this.updateLabelModule();\n }\n\n /**\n * Draw this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n * @returns {object} Callbacks to draw later on higher layers.\n */\n draw(ctx) {\n const values = this.getFormattingValues();\n return this.shape.draw(ctx, this.x, this.y, this.selected, this.hover, values) || {};\n }\n\n /**\n * Update the bounding box of the shape\n * @param {CanvasRenderingContext2D} ctx\n */\n updateBoundingBox(ctx) {\n this.shape.updateBoundingBox(this.x, this.y, ctx);\n }\n\n /**\n * Recalculate the size of this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n resize(ctx) {\n const values = this.getFormattingValues();\n this.shape.resize(ctx, this.selected, this.hover, values);\n }\n\n /**\n * Determine all visual elements of this node instance, in which the given\n * point falls within the bounding shape.\n * @param {point} point\n * @returns {Array.<nodeClickItem|nodeLabelClickItem>} list with the items which are on the point\n */\n getItemsOnPoint(point) {\n const ret = [];\n if (this.labelModule.visible()) {\n if (pointInRect(this.labelModule.getSize(), point)) {\n ret.push({\n nodeId: this.id,\n labelId: 0\n });\n }\n }\n if (pointInRect(this.shape.boundingBox, point)) {\n ret.push({\n nodeId: this.id\n });\n }\n return ret;\n }\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {object} obj an object with parameters left, top, right, bottom\n * @returns {boolean} True if location is located on node\n */\n isOverlappingWith(obj) {\n return this.shape.left < obj.right && this.shape.left + this.shape.width > obj.left && this.shape.top < obj.bottom && this.shape.top + this.shape.height > obj.top;\n }\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {object} obj an object with parameters left, top, right, bottom\n * @returns {boolean} True if location is located on node\n */\n isBoundingBoxOverlappingWith(obj) {\n return this.shape.boundingBox.left < obj.right && this.shape.boundingBox.right > obj.left && this.shape.boundingBox.top < obj.bottom && this.shape.boundingBox.bottom > obj.top;\n }\n\n /**\n * Check valid values for mass\n *\n * The mass may not be negative or zero. If it is, reset to 1\n * @param {object} options\n * @param {Node.id} id\n * @static\n */\n static checkMass(options, id) {\n if (options.mass !== undefined && options.mass <= 0) {\n let strId = \"\";\n if (id !== undefined) {\n strId = \" in node id: \" + id;\n }\n console.error(\"%cNegative or zero mass disallowed\" + strId + \", setting mass to 1.\", VALIDATOR_PRINT_STYLE);\n options.mass = 1;\n }\n }\n}\n\n/**\n * Handler for Nodes\n */\nclass NodesHandler {\n /**\n * @param {object} body\n * @param {Images} images\n * @param {Array.<Group>} groups\n * @param {LayoutEngine} layoutEngine\n */\n constructor(body, images, groups, layoutEngine) {\n var _context;\n this.body = body;\n this.images = images;\n this.groups = groups;\n this.layoutEngine = layoutEngine;\n\n // create the node API in the body container\n this.body.functions.createNode = _bindInstanceProperty(_context = this.create).call(_context, this);\n this.nodesListeners = {\n add: (event, params) => {\n this.add(params.items);\n },\n update: (event, params) => {\n this.update(params.items, params.data, params.oldData);\n },\n remove: (event, params) => {\n this.remove(params.items);\n }\n };\n this.defaultOptions = {\n borderWidth: 1,\n borderWidthSelected: undefined,\n brokenImage: undefined,\n color: {\n border: \"#2B7CE9\",\n background: \"#97C2FC\",\n highlight: {\n border: \"#2B7CE9\",\n background: \"#D2E5FF\"\n },\n hover: {\n border: \"#2B7CE9\",\n background: \"#D2E5FF\"\n }\n },\n opacity: undefined,\n // number between 0 and 1\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: \"#343434\",\n size: 14,\n // px\n face: \"arial\",\n background: \"none\",\n strokeWidth: 0,\n // px\n strokeColor: \"#ffffff\",\n align: \"center\",\n vadjust: 0,\n multi: false,\n bold: {\n mod: \"bold\"\n },\n boldital: {\n mod: \"bold italic\"\n },\n ital: {\n mod: \"italic\"\n },\n mono: {\n mod: \"\",\n size: 15,\n // px\n face: \"monospace\",\n vadjust: 2\n }\n },\n group: undefined,\n hidden: false,\n icon: {\n face: \"FontAwesome\",\n //'FontAwesome',\n code: undefined,\n //'\\uf007',\n size: 50,\n //50,\n color: \"#2B7CE9\" //'#aa00ff'\n },\n image: undefined,\n // --> URL\n imagePadding: {\n // only for image shape\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n label: undefined,\n labelHighlightBold: true,\n level: undefined,\n margin: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5\n },\n mass: 1,\n physics: true,\n scaling: {\n min: 10,\n max: 30,\n label: {\n enabled: false,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function (min, max, total, value) {\n if (max === min) {\n return 0.5;\n } else {\n const scale = 1 / (max - min);\n return Math.max(0, (value - min) * scale);\n }\n }\n },\n shadow: {\n enabled: false,\n color: \"rgba(0,0,0,0.5)\",\n size: 10,\n x: 5,\n y: 5\n },\n shape: \"ellipse\",\n shapeProperties: {\n borderDashes: false,\n // only for borders\n borderRadius: 6,\n // only for box shape\n interpolation: true,\n // only for image and circularImage shapes\n useImageSize: false,\n // only for image and circularImage shapes\n useBorderWithImage: false,\n // only for image shape\n coordinateOrigin: \"center\" // only for image and circularImage shapes\n },\n size: 25,\n title: undefined,\n value: undefined,\n x: undefined,\n y: undefined\n };\n\n // Protect from idiocy\n if (this.defaultOptions.mass <= 0) {\n throw \"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative\";\n }\n this.options = bridgeObject(this.defaultOptions);\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n var _context2, _context3;\n // refresh the nodes. Used when reverting from hierarchical layout\n this.body.emitter.on(\"refreshNodes\", _bindInstanceProperty(_context2 = this.refresh).call(_context2, this));\n this.body.emitter.on(\"refresh\", _bindInstanceProperty(_context3 = this.refresh).call(_context3, this));\n this.body.emitter.on(\"destroy\", () => {\n forEach(this.nodesListeners, (callback, event) => {\n if (this.body.data.nodes) this.body.data.nodes.off(event, callback);\n });\n delete this.body.functions.createNode;\n delete this.nodesListeners.add;\n delete this.nodesListeners.update;\n delete this.nodesListeners.remove;\n delete this.nodesListeners;\n });\n }\n\n /**\n *\n * @param {object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n Node.parseOptions(this.options, options);\n\n // Need to set opacity here because Node.parseOptions is also used for groups,\n // if you set opacity in Node.parseOptions it overwrites group opacity.\n if (options.opacity !== undefined) {\n if (_Number$isNaN(options.opacity) || !_Number$isFinite(options.opacity) || options.opacity < 0 || options.opacity > 1) {\n console.error(\"Invalid option for node opacity. Value must be between 0 and 1, found: \" + options.opacity);\n } else {\n this.options.opacity = options.opacity;\n }\n }\n\n // update the shape in all nodes\n if (options.shape !== undefined) {\n for (const nodeId in this.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) {\n this.body.nodes[nodeId].updateShape();\n }\n }\n }\n\n // Update the labels of nodes if any relevant options changed.\n if (typeof options.font !== \"undefined\" || typeof options.widthConstraint !== \"undefined\" || typeof options.heightConstraint !== \"undefined\") {\n for (const nodeId of _Object$keys(this.body.nodes)) {\n this.body.nodes[nodeId].updateLabelModule();\n this.body.nodes[nodeId].needsRefresh();\n }\n }\n\n // update the shape size in all nodes\n if (options.size !== undefined) {\n for (const nodeId in this.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) {\n this.body.nodes[nodeId].needsRefresh();\n }\n }\n }\n\n // update the state of the variables if needed\n if (options.hidden !== undefined || options.physics !== undefined) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n }\n\n /**\n * Set a data set with nodes for the network\n * @param {Array | DataSet | DataView} nodes The data containing the nodes.\n * @param {boolean} [doNotEmit] - Suppress data changed event.\n * @private\n */\n setData(nodes) {\n let doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n const oldNodesData = this.body.data.nodes;\n if (isDataViewLike(\"id\", nodes)) {\n this.body.data.nodes = nodes;\n } else if (_Array$isArray(nodes)) {\n this.body.data.nodes = new DataSet();\n this.body.data.nodes.add(nodes);\n } else if (!nodes) {\n this.body.data.nodes = new DataSet();\n } else {\n throw new TypeError(\"Array or DataSet expected\");\n }\n if (oldNodesData) {\n // unsubscribe from old dataset\n forEach(this.nodesListeners, function (callback, event) {\n oldNodesData.off(event, callback);\n });\n }\n\n // remove drawn nodes\n this.body.nodes = {};\n if (this.body.data.nodes) {\n // subscribe to new dataset\n const me = this;\n forEach(this.nodesListeners, function (callback, event) {\n me.body.data.nodes.on(event, callback);\n });\n\n // draw all new nodes\n const ids = this.body.data.nodes.getIds();\n this.add(ids, true);\n }\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Add nodes\n * @param {number[] | string[]} ids\n * @param {boolean} [doNotEmit]\n * @private\n */\n add(ids) {\n let doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let id;\n const newNodes = [];\n for (let i = 0; i < ids.length; i++) {\n id = ids[i];\n const properties = this.body.data.nodes.get(id);\n const node = this.create(properties);\n newNodes.push(node);\n this.body.nodes[id] = node; // note: this may replace an existing node\n }\n this.layoutEngine.positionInitially(newNodes);\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Update existing nodes, or create them when not yet existing\n * @param {number[] | string[]} ids id's of changed nodes\n * @param {Array} changedData array with changed data\n * @param {Array|undefined} oldData optional; array with previous data\n * @private\n */\n update(ids, changedData, oldData) {\n const nodes = this.body.nodes;\n let dataChanged = false;\n for (let i = 0; i < ids.length; i++) {\n const id = ids[i];\n let node = nodes[id];\n const data = changedData[i];\n if (node !== undefined) {\n // update node\n if (node.setOptions(data)) {\n dataChanged = true;\n }\n } else {\n dataChanged = true;\n // create node\n node = this.create(data);\n nodes[id] = node;\n }\n }\n if (!dataChanged && oldData !== undefined) {\n // Check for any changes which should trigger a layout recalculation\n // For now, this is just 'level' for hierarchical layout\n // Assumption: old and new data arranged in same order; at time of writing, this holds.\n dataChanged = _someInstanceProperty(changedData).call(changedData, function (newValue, index) {\n const oldValue = oldData[index];\n return oldValue && oldValue.level !== newValue.level;\n });\n }\n if (dataChanged === true) {\n this.body.emitter.emit(\"_dataChanged\");\n } else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n\n /**\n * Remove existing nodes. If nodes do not exist, the method will just ignore it.\n * @param {number[] | string[]} ids\n * @private\n */\n remove(ids) {\n const nodes = this.body.nodes;\n for (let i = 0; i < ids.length; i++) {\n const id = ids[i];\n delete nodes[id];\n }\n this.body.emitter.emit(\"_dataChanged\");\n }\n\n /**\n * create a node\n * @param {object} properties\n * @param {class} [constructorClass]\n * @returns {*}\n */\n create(properties) {\n let constructorClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Node;\n return new constructorClass(properties, this.body, this.images, this.groups, this.options, this.defaultOptions);\n }\n\n /**\n *\n * @param {boolean} [clearPositions]\n */\n refresh() {\n let clearPositions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n forEach(this.body.nodes, (node, nodeId) => {\n const data = this.body.data.nodes.get(nodeId);\n if (data !== undefined) {\n if (clearPositions === true) {\n node.setOptions({\n x: null,\n y: null\n });\n }\n node.setOptions({\n fixed: false\n });\n node.setOptions(data);\n }\n });\n }\n\n /**\n * Returns the positions of the nodes.\n * @param {Array.<Node.id> | string} [ids] --> optional, can be array of nodeIds, can be string\n * @returns {{}}\n */\n getPositions(ids) {\n const dataArray = {};\n if (ids !== undefined) {\n if (_Array$isArray(ids) === true) {\n for (let i = 0; i < ids.length; i++) {\n if (this.body.nodes[ids[i]] !== undefined) {\n const node = this.body.nodes[ids[i]];\n dataArray[ids[i]] = {\n x: Math.round(node.x),\n y: Math.round(node.y)\n };\n }\n }\n } else {\n if (this.body.nodes[ids] !== undefined) {\n const node = this.body.nodes[ids];\n dataArray[ids] = {\n x: Math.round(node.x),\n y: Math.round(node.y)\n };\n }\n }\n } else {\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n const node = this.body.nodes[this.body.nodeIndices[i]];\n dataArray[this.body.nodeIndices[i]] = {\n x: Math.round(node.x),\n y: Math.round(node.y)\n };\n }\n }\n return dataArray;\n }\n\n /**\n * Retrieves the x y position of a specific id.\n * @param {string} id The id to retrieve.\n * @throws {TypeError} If no id is included.\n * @throws {ReferenceError} If an invalid id is provided.\n * @returns {{ x: number, y: number }} Returns X, Y canvas position of the node with given id.\n */\n getPosition(id) {\n if (id == undefined) {\n throw new TypeError(\"No id was specified for getPosition method.\");\n } else if (this.body.nodes[id] == undefined) {\n throw new ReferenceError(\"NodeId provided for getPosition does not exist. Provided: \".concat(id));\n } else {\n return {\n x: Math.round(this.body.nodes[id].x),\n y: Math.round(this.body.nodes[id].y)\n };\n }\n }\n\n /**\n * Load the XY positions of the nodes into the dataset.\n */\n storePositions() {\n // todo: add support for clusters and hierarchical.\n const dataArray = [];\n const dataset = this.body.data.nodes.getDataSet();\n for (const dsNode of dataset.get()) {\n const id = dsNode.id;\n const bodyNode = this.body.nodes[id];\n const x = Math.round(bodyNode.x);\n const y = Math.round(bodyNode.y);\n if (dsNode.x !== x || dsNode.y !== y) {\n dataArray.push({\n id,\n x,\n y\n });\n }\n }\n dataset.update(dataArray);\n }\n\n /**\n * get the bounding box of a node.\n * @param {Node.id} nodeId\n * @returns {j|*}\n */\n getBoundingBox(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].shape.boundingBox;\n }\n }\n\n /**\n * Get the Ids of nodes connected to this node.\n * @param {Node.id} nodeId\n * @param {'to'|'from'|undefined} direction values 'from' and 'to' select respectively parent and child nodes only.\n * Any other value returns both parent and child nodes.\n * @returns {Array}\n */\n getConnectedNodes(nodeId, direction) {\n const nodeList = [];\n if (this.body.nodes[nodeId] !== undefined) {\n const node = this.body.nodes[nodeId];\n const nodeObj = {}; // used to quickly check if node already exists\n for (let i = 0; i < node.edges.length; i++) {\n const edge = node.edges[i];\n if (direction !== \"to\" && edge.toId == node.id) {\n // these are double equals since ids can be numeric or string\n if (nodeObj[edge.fromId] === undefined) {\n nodeList.push(edge.fromId);\n nodeObj[edge.fromId] = true;\n }\n } else if (direction !== \"from\" && edge.fromId == node.id) {\n // these are double equals since ids can be numeric or string\n if (nodeObj[edge.toId] === undefined) {\n nodeList.push(edge.toId);\n nodeObj[edge.toId] = true;\n }\n }\n }\n }\n return nodeList;\n }\n\n /**\n * Get the ids of the edges connected to this node.\n * @param {Node.id} nodeId\n * @returns {*}\n */\n getConnectedEdges(nodeId) {\n const edgeList = [];\n if (this.body.nodes[nodeId] !== undefined) {\n const node = this.body.nodes[nodeId];\n for (let i = 0; i < node.edges.length; i++) {\n edgeList.push(node.edges[i].id);\n }\n } else {\n console.error(\"NodeId provided for getConnectedEdges does not exist. Provided: \", nodeId);\n }\n return edgeList;\n }\n\n /**\n * Move a node.\n * @param {Node.id} nodeId\n * @param {number} x\n * @param {number} y\n */\n moveNode(nodeId, x, y) {\n if (this.body.nodes[nodeId] !== undefined) {\n this.body.nodes[nodeId].x = Number(x);\n this.body.nodes[nodeId].y = Number(y);\n _setTimeout(() => {\n this.body.emitter.emit(\"startSimulation\");\n }, 0);\n } else {\n console.error(\"Node id supplied to moveNode does not exist. Provided: \", nodeId);\n }\n }\n}\n\nvar es_math_hypot = {};\n\nvar hasRequiredEs_math_hypot;\n\nfunction requireEs_math_hypot () {\n\tif (hasRequiredEs_math_hypot) return es_math_hypot;\n\thasRequiredEs_math_hypot = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\n\t// eslint-disable-next-line es/no-math-hypot -- required for testing\n\tvar $hypot = Math.hypot;\n\tvar abs = Math.abs;\n\tvar sqrt = Math.sqrt;\n\n\t// Chrome 77 bug\n\t// https://bugs.chromium.org/p/v8/issues/detail?id=9546\n\tvar FORCED = !!$hypot && $hypot(Infinity, NaN) !== Infinity;\n\n\t// `Math.hypot` method\n\t// https://tc39.es/ecma262/#sec-math.hypot\n\t$({ target: 'Math', stat: true, arity: 2, forced: FORCED }, {\n\t // eslint-disable-next-line no-unused-vars -- required for `.length`\n\t hypot: function hypot(value1, value2) {\n\t var sum = 0;\n\t var i = 0;\n\t var aLen = arguments.length;\n\t var larg = 0;\n\t var arg, div;\n\t while (i < aLen) {\n\t arg = abs(arguments[i++]);\n\t if (larg < arg) {\n\t div = larg / arg;\n\t sum = sum * div * div + 1;\n\t larg = arg;\n\t } else if (arg > 0) {\n\t div = arg / larg;\n\t sum += div * div;\n\t } else sum += arg;\n\t }\n\t return larg === Infinity ? Infinity : larg * sqrt(sum);\n\t }\n\t});\n\treturn es_math_hypot;\n}\n\nvar hypot$2;\nvar hasRequiredHypot$2;\n\nfunction requireHypot$2 () {\n\tif (hasRequiredHypot$2) return hypot$2;\n\thasRequiredHypot$2 = 1;\n\trequireEs_math_hypot();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\thypot$2 = path.Math.hypot;\n\treturn hypot$2;\n}\n\nvar hypot$1;\nvar hasRequiredHypot$1;\n\nfunction requireHypot$1 () {\n\tif (hasRequiredHypot$1) return hypot$1;\n\thasRequiredHypot$1 = 1;\n\tvar parent = /*@__PURE__*/ requireHypot$2();\n\n\thypot$1 = parent;\n\treturn hypot$1;\n}\n\nvar hypot;\nvar hasRequiredHypot;\n\nfunction requireHypot () {\n\tif (hasRequiredHypot) return hypot;\n\thasRequiredHypot = 1;\n\thypot = /*@__PURE__*/ requireHypot$1();\n\treturn hypot;\n}\n\nvar hypotExports = requireHypot();\nvar _Math$hypot = /*@__PURE__*/getDefaultExportFromCjs(hypotExports);\n\n/**\n * Common methods for endpoints\n * @class\n */\nclass EndPoint {\n /**\n * Apply transformation on points for display.\n *\n * The following is done:\n * - rotate by the specified angle\n * - multiply the (normalized) coordinates by the passed length\n * - offset by the target coordinates\n * @param points - The point(s) to be transformed.\n * @param arrowData - The data determining the result of the transformation.\n */\n static transform(points, arrowData) {\n if (!_Array$isArray(points)) {\n points = [points];\n }\n const x = arrowData.point.x;\n const y = arrowData.point.y;\n const angle = arrowData.angle;\n const length = arrowData.length;\n for (let i = 0; i < points.length; ++i) {\n const p = points[i];\n const xt = p.x * Math.cos(angle) - p.y * Math.sin(angle);\n const yt = p.x * Math.sin(angle) + p.y * Math.cos(angle);\n p.x = x + length * xt;\n p.y = y + length * yt;\n }\n }\n /**\n * Draw a closed path using the given real coordinates.\n * @param ctx - The path will be rendered into this context.\n * @param points - The points of the path.\n */\n static drawPath(ctx, points) {\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n for (let i = 1; i < points.length; ++i) {\n ctx.lineTo(points[i].x, points[i].y);\n }\n ctx.closePath();\n }\n}\n/**\n * Drawing methods for the arrow endpoint.\n */\nlet Image$1 = class Image extends EndPoint {\n /**\n * Draw this shape at the end of a line.\n * @param ctx - The shape will be rendered into this context.\n * @param arrowData - The data determining the shape.\n * @returns False as there is no way to fill an image.\n */\n static draw(ctx, arrowData) {\n if (arrowData.image) {\n ctx.save();\n ctx.translate(arrowData.point.x, arrowData.point.y);\n ctx.rotate(Math.PI / 2 + arrowData.angle);\n const width = arrowData.imageWidth != null ? arrowData.imageWidth : arrowData.image.width;\n const height = arrowData.imageHeight != null ? arrowData.imageHeight : arrowData.image.height;\n arrowData.image.drawImageAtPosition(ctx, 1,\n // scale\n -width / 2,\n // x\n 0,\n // y\n width, height);\n ctx.restore();\n }\n return false;\n }\n};\n/**\n * Drawing methods for the arrow endpoint.\n */\nclass Arrow extends EndPoint {\n /**\n * Draw this shape at the end of a line.\n * @param ctx - The shape will be rendered into this context.\n * @param arrowData - The data determining the shape.\n * @returns True because ctx.fill() can be used to fill the arrow.\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n const points = [{\n x: 0,\n y: 0\n }, {\n x: -1,\n y: 0.3\n }, {\n x: -0.9,\n y: 0\n }, {\n x: -1,\n y: -0.3\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n}\n/**\n * Drawing methods for the crow endpoint.\n */\nclass Crow {\n /**\n * Draw this shape at the end of a line.\n * @param ctx - The shape will be rendered into this context.\n * @param arrowData - The data determining the shape.\n * @returns True because ctx.fill() can be used to fill the arrow.\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n const points = [{\n x: -1,\n y: 0\n }, {\n x: 0,\n y: 0.3\n }, {\n x: -0.4,\n y: 0\n }, {\n x: 0,\n y: -0.3\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n}\n/**\n * Drawing methods for the curve endpoint.\n */\nclass Curve {\n /**\n * Draw this shape at the end of a line.\n * @param ctx - The shape will be rendered into this context.\n * @param arrowData - The data determining the shape.\n * @returns True because ctx.fill() can be used to fill the arrow.\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n const point = {\n x: -0.4,\n y: 0\n };\n EndPoint.transform(point, arrowData);\n // Update endpoint style for drawing transparent arc.\n ctx.strokeStyle = ctx.fillStyle;\n ctx.fillStyle = \"rgba(0, 0, 0, 0)\";\n // Define curve endpoint as semicircle.\n const pi = Math.PI;\n const startAngle = arrowData.angle - pi / 2;\n const endAngle = arrowData.angle + pi / 2;\n ctx.beginPath();\n ctx.arc(point.x, point.y, arrowData.length * 0.4, startAngle, endAngle, false);\n ctx.stroke();\n return true;\n }\n}\n/**\n * Drawing methods for the inverted curve endpoint.\n */\nclass InvertedCurve {\n /**\n * Draw this shape at the end of a line.\n * @param ctx - The shape will be rendered into this context.\n * @param arrowData - The data determining the shape.\n * @returns True because ctx.fill() can be used to fill the arrow.\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n const point = {\n x: -0.3,\n y: 0\n };\n EndPoint.transform(point, arrowData);\n // Update endpoint style for drawing transparent arc.\n ctx.strokeStyle = ctx.fillStyle;\n ctx.fillStyle = \"rgba(0, 0, 0, 0)\";\n // Define inverted curve endpoint as semicircle.\n const pi = Math.PI;\n const startAngle = arrowData.angle + pi / 2;\n const endAngle = arrowData.angle + 3 * pi / 2;\n ctx.beginPath();\n ctx.arc(point.x, point.y, arrowData.length * 0.4, startAngle, endAngle, false);\n ctx.stroke();\n return true;\n }\n}\n/**\n * Drawing methods for the trinagle endpoint.\n */\nclass Triangle {\n /**\n * Draw this shape at the end of a line.\n * @param ctx - The shape will be rendered into this context.\n * @param arrowData - The data determining the shape.\n * @returns True because ctx.fill() can be used to fill the arrow.\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n const points = [{\n x: 0.02,\n y: 0\n }, {\n x: -1,\n y: 0.3\n }, {\n x: -1,\n y: -0.3\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n}\n/**\n * Drawing methods for the inverted trinagle endpoint.\n */\nclass InvertedTriangle {\n /**\n * Draw this shape at the end of a line.\n * @param ctx - The shape will be rendered into this context.\n * @param arrowData - The data determining the shape.\n * @returns True because ctx.fill() can be used to fill the arrow.\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n const points = [{\n x: 0,\n y: 0.3\n }, {\n x: 0,\n y: -0.3\n }, {\n x: -1,\n y: 0\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n}\n/**\n * Drawing methods for the circle endpoint.\n */\nclass Circle {\n /**\n * Draw this shape at the end of a line.\n * @param ctx - The shape will be rendered into this context.\n * @param arrowData - The data determining the shape.\n * @returns True because ctx.fill() can be used to fill the arrow.\n */\n static draw(ctx, arrowData) {\n const point = {\n x: -0.4,\n y: 0\n };\n EndPoint.transform(point, arrowData);\n drawCircle(ctx, point.x, point.y, arrowData.length * 0.4);\n return true;\n }\n}\n/**\n * Drawing methods for the bar endpoint.\n */\nclass Bar {\n /**\n * Draw this shape at the end of a line.\n * @param ctx - The shape will be rendered into this context.\n * @param arrowData - The data determining the shape.\n * @returns True because ctx.fill() can be used to fill the arrow.\n */\n static draw(ctx, arrowData) {\n /*\n var points = [\n {x:0, y:0.5},\n {x:0, y:-0.5}\n ];\n EndPoint.transform(points, arrowData);\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n ctx.lineTo(points[1].x, points[1].y);\n ctx.stroke();\n */\n const points = [{\n x: 0,\n y: 0.5\n }, {\n x: 0,\n y: -0.5\n }, {\n x: -0.15,\n y: -0.5\n }, {\n x: -0.15,\n y: 0.5\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n}\n/**\n * Drawing methods for the box endpoint.\n */\nclass Box {\n /**\n * Draw this shape at the end of a line.\n * @param ctx - The shape will be rendered into this context.\n * @param arrowData - The data determining the shape.\n * @returns True because ctx.fill() can be used to fill the arrow.\n */\n static draw(ctx, arrowData) {\n const points = [{\n x: 0,\n y: 0.3\n }, {\n x: 0,\n y: -0.3\n }, {\n x: -0.6,\n y: -0.3\n }, {\n x: -0.6,\n y: 0.3\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n}\n/**\n * Drawing methods for the diamond endpoint.\n */\nclass Diamond {\n /**\n * Draw this shape at the end of a line.\n * @param ctx - The shape will be rendered into this context.\n * @param arrowData - The data determining the shape.\n * @returns True because ctx.fill() can be used to fill the arrow.\n */\n static draw(ctx, arrowData) {\n const points = [{\n x: 0,\n y: 0\n }, {\n x: -0.5,\n y: -0.3\n }, {\n x: -1,\n y: 0\n }, {\n x: -0.5,\n y: 0.3\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n}\n/**\n * Drawing methods for the vee endpoint.\n */\nclass Vee {\n /**\n * Draw this shape at the end of a line.\n * @param ctx - The shape will be rendered into this context.\n * @param arrowData - The data determining the shape.\n * @returns True because ctx.fill() can be used to fill the arrow.\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n const points = [{\n x: -1,\n y: 0.3\n }, {\n x: -0.5,\n y: 0\n }, {\n x: -1,\n y: -0.3\n }, {\n x: 0,\n y: 0\n }];\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n return true;\n }\n}\n/**\n * Drawing methods for the endpoints.\n */\nclass EndPoints {\n /**\n * Draw an endpoint.\n * @param ctx - The shape will be rendered into this context.\n * @param arrowData - The data determining the shape.\n * @returns True if ctx.fill() can be used to fill the arrow, false otherwise.\n */\n static draw(ctx, arrowData) {\n let type;\n if (arrowData.type) {\n type = arrowData.type.toLowerCase();\n }\n switch (type) {\n case \"image\":\n return Image$1.draw(ctx, arrowData);\n case \"circle\":\n return Circle.draw(ctx, arrowData);\n case \"box\":\n return Box.draw(ctx, arrowData);\n case \"crow\":\n return Crow.draw(ctx, arrowData);\n case \"curve\":\n return Curve.draw(ctx, arrowData);\n case \"diamond\":\n return Diamond.draw(ctx, arrowData);\n case \"inv_curve\":\n return InvertedCurve.draw(ctx, arrowData);\n case \"triangle\":\n return Triangle.draw(ctx, arrowData);\n case \"inv_triangle\":\n return InvertedTriangle.draw(ctx, arrowData);\n case \"bar\":\n return Bar.draw(ctx, arrowData);\n case \"vee\":\n return Vee.draw(ctx, arrowData);\n case \"arrow\": // fall-through\n default:\n return Arrow.draw(ctx, arrowData);\n }\n }\n}\n\nfunction ownKeys$1(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1(Object(t), true)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\n/**\n * The Base Class for all edges.\n */\nclass EdgeBase {\n /**\n * Create a new instance.\n * @param options - The options object of given edge.\n * @param body - The body of the network.\n * @param labelModule - Label module.\n */\n constructor(options, body, labelModule) {\n // Initialized in setOptions\n // Initialized in setOptions\n _defineProperty(this, \"color\", {});\n _defineProperty(this, \"colorDirty\", true);\n // Initialized in setOptions\n _defineProperty(this, \"hoverWidth\", 1.5);\n _defineProperty(this, \"selectionWidth\", 2);\n this._body = body;\n this._labelModule = labelModule;\n this.setOptions(options);\n this.fromPoint = this.from;\n this.toPoint = this.to;\n }\n /** @inheritDoc */\n connect() {\n this.from = this._body.nodes[this.options.from];\n this.to = this._body.nodes[this.options.to];\n }\n /** @inheritDoc */\n cleanup() {\n return false;\n }\n /**\n * Set new edge options.\n * @param options - The new edge options object.\n */\n setOptions(options) {\n this.options = options;\n this.from = this._body.nodes[this.options.from];\n this.to = this._body.nodes[this.options.to];\n this.id = this.options.id;\n }\n /** @inheritDoc */\n drawLine(ctx, values, _selected, _hover) {\n let viaNode = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.getViaNode();\n // set style\n ctx.strokeStyle = this.getColor(ctx, values);\n ctx.lineWidth = values.width;\n if (values.dashes !== false) {\n this._drawDashedLine(ctx, values, viaNode);\n } else {\n this._drawLine(ctx, values, viaNode);\n }\n }\n /**\n * Draw a line with given style between two nodes through supplied node(s).\n * @param ctx - The context that will be used for rendering.\n * @param values - Formatting values like color, opacity or shadow.\n * @param viaNode - Additional control point(s) for the edge.\n * @param fromPoint - TODO: Seems ignored, remove?\n * @param toPoint - TODO: Seems ignored, remove?\n */\n _drawLine(ctx, values, viaNode, fromPoint, toPoint) {\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode, fromPoint, toPoint);\n } else {\n const [x, y, radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n }\n /**\n * Draw a dashed line with given style between two nodes through supplied node(s).\n * @param ctx - The context that will be used for rendering.\n * @param values - Formatting values like color, opacity or shadow.\n * @param viaNode - Additional control point(s) for the edge.\n * @param _fromPoint - Ignored (TODO: remove in the future).\n * @param _toPoint - Ignored (TODO: remove in the future).\n */\n _drawDashedLine(ctx, values, viaNode, _fromPoint, _toPoint) {\n ctx.lineCap = \"round\";\n const pattern = _Array$isArray(values.dashes) ? values.dashes : [5, 5];\n // only firefox and chrome support this method, else we use the legacy one.\n if (ctx.setLineDash !== undefined) {\n ctx.save();\n // set dash settings for chrome or firefox\n ctx.setLineDash(pattern);\n ctx.lineDashOffset = 0;\n // draw the line\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode);\n } else {\n const [x, y, radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n // restore the dash settings.\n ctx.setLineDash([0]);\n ctx.lineDashOffset = 0;\n ctx.restore();\n } else {\n // unsupporting smooth lines\n if (this.from != this.to) {\n // draw line\n drawDashedLine(ctx, this.from.x, this.from.y, this.to.x, this.to.y, pattern);\n } else {\n const [x, y, radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.stroke();\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n }\n /**\n * Find the intersection between the border of the node and the edge.\n * @param node - The node (either from or to node of the edge).\n * @param ctx - The context that will be used for rendering.\n * @param options - Additional options.\n * @returns Cartesian coordinates of the intersection between the border of the node and the edge.\n */\n findBorderPosition(node, ctx, options) {\n if (this.from != this.to) {\n return this._findBorderPosition(node, ctx, options);\n } else {\n return this._findBorderPositionCircle(node, ctx, options);\n }\n }\n /** @inheritDoc */\n findBorderPositions(ctx) {\n if (this.from != this.to) {\n return {\n from: this._findBorderPosition(this.from, ctx),\n to: this._findBorderPosition(this.to, ctx)\n };\n } else {\n var _context;\n const [x, y] = _sliceInstanceProperty(_context = this._getCircleData(ctx)).call(_context, 0, 2);\n return {\n from: this._findBorderPositionCircle(this.from, ctx, {\n x,\n y,\n low: 0.25,\n high: 0.6,\n direction: -1\n }),\n to: this._findBorderPositionCircle(this.from, ctx, {\n x,\n y,\n low: 0.6,\n high: 0.8,\n direction: 1\n })\n };\n }\n }\n /**\n * Compute the center point and radius of an edge connected to the same node at both ends.\n * @param ctx - The context that will be used for rendering.\n * @returns `[x, y, radius]`\n */\n _getCircleData(ctx) {\n const radius = this.options.selfReference.size;\n if (ctx !== undefined) {\n if (this.from.shape.width === undefined) {\n this.from.shape.resize(ctx);\n }\n }\n // get circle coordinates\n const coordinates = getSelfRefCoordinates(ctx, this.options.selfReference.angle, radius, this.from);\n return [coordinates.x, coordinates.y, radius];\n }\n /**\n * Get a point on a circle.\n * @param x - Center of the circle on the x axis.\n * @param y - Center of the circle on the y axis.\n * @param radius - Radius of the circle.\n * @param position - Value between 0 (line start) and 1 (line end).\n * @returns Cartesian coordinates of requested point on the circle.\n */\n _pointOnCircle(x, y, radius, position) {\n const angle = position * 2 * Math.PI;\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n };\n }\n /**\n * Find the intersection between the border of the node and the edge.\n * @remarks\n * This function uses binary search to look for the point where the circle crosses the border of the node.\n * @param nearNode - The node (either from or to node of the edge).\n * @param ctx - The context that will be used for rendering.\n * @param options - Additional options.\n * @returns Cartesian coordinates of the intersection between the border of the node and the edge.\n */\n _findBorderPositionCircle(nearNode, ctx, options) {\n const x = options.x;\n const y = options.y;\n let low = options.low;\n let high = options.high;\n const direction = options.direction;\n const maxIterations = 10;\n const radius = this.options.selfReference.size;\n const threshold = 0.05;\n let pos;\n let middle = (low + high) * 0.5;\n let endPointOffset = 0;\n if (this.options.arrowStrikethrough === true) {\n if (direction === -1) {\n endPointOffset = this.options.endPointOffset.from;\n } else if (direction === 1) {\n endPointOffset = this.options.endPointOffset.to;\n }\n }\n let iteration = 0;\n do {\n middle = (low + high) * 0.5;\n pos = this._pointOnCircle(x, y, radius, middle);\n const angle = Math.atan2(nearNode.y - pos.y, nearNode.x - pos.x);\n const distanceToBorder = nearNode.distanceToBorder(ctx, angle) + endPointOffset;\n const distanceToPoint = Math.sqrt(Math.pow(pos.x - nearNode.x, 2) + Math.pow(pos.y - nearNode.y, 2));\n const difference = distanceToBorder - distanceToPoint;\n if (Math.abs(difference) < threshold) {\n break; // found\n } else if (difference > 0) {\n // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (direction > 0) {\n low = middle;\n } else {\n high = middle;\n }\n } else {\n if (direction > 0) {\n high = middle;\n } else {\n low = middle;\n }\n }\n ++iteration;\n } while (low <= high && iteration < maxIterations);\n return _objectSpread$1(_objectSpread$1({}, pos), {}, {\n t: middle\n });\n }\n /**\n * Get the line width of the edge. Depends on width and whether one of the connected nodes is selected.\n * @param selected - Determines wheter the line is selected.\n * @param hover - Determines wheter the line is being hovered, only applies if selected is false.\n * @returns The width of the line.\n */\n getLineWidth(selected, hover) {\n if (selected === true) {\n return Math.max(this.selectionWidth, 0.3 / this._body.view.scale);\n } else if (hover === true) {\n return Math.max(this.hoverWidth, 0.3 / this._body.view.scale);\n } else {\n return Math.max(this.options.width, 0.3 / this._body.view.scale);\n }\n }\n /**\n * Compute the color or gradient for given edge.\n * @param ctx - The context that will be used for rendering.\n * @param values - Formatting values like color, opacity or shadow.\n * @param _selected - Ignored (TODO: remove in the future).\n * @param _hover - Ignored (TODO: remove in the future).\n * @returns Color string if single color is inherited or gradient if two.\n */\n getColor(ctx, values) {\n if (values.inheritsColor !== false) {\n // when this is a loop edge, just use the 'from' method\n if (values.inheritsColor === \"both\" && this.from.id !== this.to.id) {\n const grd = ctx.createLinearGradient(this.from.x, this.from.y, this.to.x, this.to.y);\n let fromColor = this.from.options.color.highlight.border;\n let toColor = this.to.options.color.highlight.border;\n if (this.from.selected === false && this.to.selected === false) {\n fromColor = overrideOpacity(this.from.options.color.border, values.opacity);\n toColor = overrideOpacity(this.to.options.color.border, values.opacity);\n } else if (this.from.selected === true && this.to.selected === false) {\n toColor = this.to.options.color.border;\n } else if (this.from.selected === false && this.to.selected === true) {\n fromColor = this.from.options.color.border;\n }\n grd.addColorStop(0, fromColor);\n grd.addColorStop(1, toColor);\n // -------------------- this returns -------------------- //\n return grd;\n }\n if (values.inheritsColor === \"to\") {\n return overrideOpacity(this.to.options.color.border, values.opacity);\n } else {\n // \"from\"\n return overrideOpacity(this.from.options.color.border, values.opacity);\n }\n } else {\n return overrideOpacity(values.color, values.opacity);\n }\n }\n /**\n * Draw a line from a node to itself, a circle.\n * @param ctx - The context that will be used for rendering.\n * @param values - Formatting values like color, opacity or shadow.\n * @param x - Center of the circle on the x axis.\n * @param y - Center of the circle on the y axis.\n * @param radius - Radius of the circle.\n */\n _circle(ctx, values, x, y, radius) {\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n //full circle\n let angleFrom = 0;\n let angleTo = Math.PI * 2;\n if (!this.options.selfReference.renderBehindTheNode) {\n //render only parts which are not overlaping with parent node\n //need to find x,y of from point and x,y to point\n //calculating radians\n const low = this.options.selfReference.angle;\n const high = this.options.selfReference.angle + Math.PI;\n const pointTFrom = this._findBorderPositionCircle(this.from, ctx, {\n x,\n y,\n low,\n high,\n direction: -1\n });\n const pointTTo = this._findBorderPositionCircle(this.from, ctx, {\n x,\n y,\n low,\n high,\n direction: 1\n });\n angleFrom = Math.atan2(pointTFrom.y - y, pointTFrom.x - x);\n angleTo = Math.atan2(pointTTo.y - y, pointTTo.x - x);\n }\n // draw a circle\n ctx.beginPath();\n ctx.arc(x, y, radius, angleFrom, angleTo, false);\n ctx.stroke();\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n /**\n * @inheritDoc\n * @remarks\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n */\n getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n if (this.from != this.to) {\n return this._getDistanceToEdge(x1, y1, x2, y2, x3, y3);\n } else {\n const [x, y, radius] = this._getCircleData(undefined);\n const dx = x - x3;\n const dy = y - y3;\n return Math.abs(Math.sqrt(dx * dx + dy * dy) - radius);\n }\n }\n /**\n * Calculate the distance between a point (x3, y3) and a line segment from (x1, y1) to (x2, y2).\n * @param x1 - First end of the line segment on the x axis.\n * @param y1 - First end of the line segment on the y axis.\n * @param x2 - Second end of the line segment on the x axis.\n * @param y2 - Second end of the line segment on the y axis.\n * @param x3 - Position of the point on the x axis.\n * @param y3 - Position of the point on the y axis.\n * @returns The distance between the line segment and the point.\n */\n _getDistanceToLine(x1, y1, x2, y2, x3, y3) {\n const px = x2 - x1;\n const py = y2 - y1;\n const something = px * px + py * py;\n let u = ((x3 - x1) * px + (y3 - y1) * py) / something;\n if (u > 1) {\n u = 1;\n } else if (u < 0) {\n u = 0;\n }\n const x = x1 + u * px;\n const y = y1 + u * py;\n const dx = x - x3;\n const dy = y - y3;\n //# Note: If the actual distance does not matter,\n //# if you only want to compare what this function\n //# returns to other results of this function, you\n //# can just return the squared distance instead\n //# (i.e. remove the sqrt) to gain a little performance\n return Math.sqrt(dx * dx + dy * dy);\n }\n /** @inheritDoc */\n getArrowData(ctx, position, viaNode, _selected, _hover, values) {\n // set lets\n let angle;\n let arrowPoint;\n let node1;\n let node2;\n let reversed;\n let scaleFactor;\n let type;\n const lineWidth = values.width;\n if (position === \"from\") {\n node1 = this.from;\n node2 = this.to;\n reversed = values.fromArrowScale < 0;\n scaleFactor = Math.abs(values.fromArrowScale);\n type = values.fromArrowType;\n } else if (position === \"to\") {\n node1 = this.to;\n node2 = this.from;\n reversed = values.toArrowScale < 0;\n scaleFactor = Math.abs(values.toArrowScale);\n type = values.toArrowType;\n } else {\n node1 = this.to;\n node2 = this.from;\n reversed = values.middleArrowScale < 0;\n scaleFactor = Math.abs(values.middleArrowScale);\n type = values.middleArrowType;\n }\n const length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge.\n // if not connected to itself\n if (node1 != node2) {\n const approximateEdgeLength = _Math$hypot(node1.x - node2.x, node1.y - node2.y);\n const relativeLength = length / approximateEdgeLength;\n if (position !== \"middle\") {\n // draw arrow head\n if (this.options.smooth.enabled === true) {\n const pointT = this._findBorderPosition(node1, ctx, {\n via: viaNode\n });\n const guidePos = this.getPoint(pointT.t + relativeLength * (position === \"from\" ? 1 : -1), viaNode);\n angle = Math.atan2(pointT.y - guidePos.y, pointT.x - guidePos.x);\n arrowPoint = pointT;\n } else {\n angle = Math.atan2(node1.y - node2.y, node1.x - node2.x);\n arrowPoint = this._findBorderPosition(node1, ctx);\n }\n } else {\n // Negative half length reverses arrow direction.\n const halfLength = (reversed ? -relativeLength : relativeLength) / 2;\n const guidePos1 = this.getPoint(0.5 + halfLength, viaNode);\n const guidePos2 = this.getPoint(0.5 - halfLength, viaNode);\n angle = Math.atan2(guidePos1.y - guidePos2.y, guidePos1.x - guidePos2.x);\n arrowPoint = this.getPoint(0.5, viaNode);\n }\n } else {\n // draw circle\n const [x, y, radius] = this._getCircleData(ctx);\n if (position === \"from\") {\n const low = this.options.selfReference.angle;\n const high = this.options.selfReference.angle + Math.PI;\n const pointT = this._findBorderPositionCircle(this.from, ctx, {\n x,\n y,\n low,\n high,\n direction: -1\n });\n angle = pointT.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n arrowPoint = pointT;\n } else if (position === \"to\") {\n const low = this.options.selfReference.angle;\n const high = this.options.selfReference.angle + Math.PI;\n const pointT = this._findBorderPositionCircle(this.from, ctx, {\n x,\n y,\n low,\n high,\n direction: 1\n });\n angle = pointT.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI;\n arrowPoint = pointT;\n } else {\n const pos = this.options.selfReference.angle / (2 * Math.PI);\n arrowPoint = this._pointOnCircle(x, y, radius, pos);\n angle = pos * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n }\n }\n const xi = arrowPoint.x - length * 0.9 * Math.cos(angle);\n const yi = arrowPoint.y - length * 0.9 * Math.sin(angle);\n const arrowCore = {\n x: xi,\n y: yi\n };\n return {\n point: arrowPoint,\n core: arrowCore,\n angle: angle,\n length: length,\n type: type\n };\n }\n /** @inheritDoc */\n drawArrowHead(ctx, values, _selected, _hover, arrowData) {\n // set style\n ctx.strokeStyle = this.getColor(ctx, values);\n ctx.fillStyle = ctx.strokeStyle;\n ctx.lineWidth = values.width;\n const canFill = EndPoints.draw(ctx, arrowData);\n if (canFill) {\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n _fillInstanceProperty(ctx).call(ctx);\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n }\n /**\n * Set the shadow formatting values in the context if enabled, do nothing otherwise.\n * @param ctx - The context that will be used for rendering.\n * @param values - Formatting values for the shadow.\n */\n enableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n /**\n * Reset the shadow formatting values in the context if enabled, do nothing otherwise.\n * @param ctx - The context that will be used for rendering.\n * @param values - Formatting values for the shadow.\n */\n disableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = \"rgba(0,0,0,0)\";\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n /**\n * Render the background according to the formatting values.\n * @param ctx - The context that will be used for rendering.\n * @param values - Formatting values for the background.\n */\n drawBackground(ctx, values) {\n if (values.background !== false) {\n // save original line attrs\n const origCtxAttr = {\n strokeStyle: ctx.strokeStyle,\n lineWidth: ctx.lineWidth,\n dashes: ctx.dashes\n };\n ctx.strokeStyle = values.backgroundColor;\n ctx.lineWidth = values.backgroundSize;\n this.setStrokeDashed(ctx, values.backgroundDashes);\n ctx.stroke();\n // restore original line attrs\n ctx.strokeStyle = origCtxAttr.strokeStyle;\n ctx.lineWidth = origCtxAttr.lineWidth;\n ctx.dashes = origCtxAttr.dashes;\n this.setStrokeDashed(ctx, values.dashes);\n }\n }\n /**\n * Set the line dash pattern if supported. Logs a warning to the console if it isn't supported.\n * @param ctx - The context that will be used for rendering.\n * @param dashes - The pattern [line, space, line…], true for default dashed line or false for normal line.\n */\n setStrokeDashed(ctx, dashes) {\n if (dashes !== false) {\n if (ctx.setLineDash !== undefined) {\n const pattern = _Array$isArray(dashes) ? dashes : [5, 5];\n ctx.setLineDash(pattern);\n } else {\n console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\");\n }\n } else {\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([]);\n } else {\n console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\");\n }\n }\n }\n}\n\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), true)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\n/**\n * The Base Class for all Bezier edges.\n * Bezier curves are used to model smooth gradual curves in paths between nodes.\n */\nclass BezierEdgeBase extends EdgeBase {\n /**\n * Create a new instance.\n * @param options - The options object of given edge.\n * @param body - The body of the network.\n * @param labelModule - Label module.\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n /**\n * Find the intersection between the border of the node and the edge.\n * @remarks\n * This function uses binary search to look for the point where the bezier curve crosses the border of the node.\n * @param nearNode - The node (either from or to node of the edge).\n * @param ctx - The context that will be used for rendering.\n * @param viaNode - Additional node(s) the edge passes through.\n * @returns Cartesian coordinates of the intersection between the border of the node and the edge.\n */\n _findBorderPositionBezier(nearNode, ctx) {\n let viaNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._getViaCoordinates();\n const maxIterations = 10;\n const threshold = 0.2;\n let from = false;\n let high = 1;\n let low = 0;\n let node = this.to;\n let pos;\n let middle;\n let endPointOffset = this.options.endPointOffset ? this.options.endPointOffset.to : 0;\n if (nearNode.id === this.from.id) {\n node = this.from;\n from = true;\n endPointOffset = this.options.endPointOffset ? this.options.endPointOffset.from : 0;\n }\n if (this.options.arrowStrikethrough === false) {\n endPointOffset = 0;\n }\n let iteration = 0;\n do {\n middle = (low + high) * 0.5;\n pos = this.getPoint(middle, viaNode);\n const angle = Math.atan2(node.y - pos.y, node.x - pos.x);\n const distanceToBorder = node.distanceToBorder(ctx, angle) + endPointOffset;\n const distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2));\n const difference = distanceToBorder - distanceToPoint;\n if (Math.abs(difference) < threshold) {\n break; // found\n } else if (difference < 0) {\n // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (from === false) {\n low = middle;\n } else {\n high = middle;\n }\n } else {\n if (from === false) {\n high = middle;\n } else {\n low = middle;\n }\n }\n ++iteration;\n } while (low <= high && iteration < maxIterations);\n return _objectSpread(_objectSpread({}, pos), {}, {\n t: middle\n });\n }\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from (x1,y1) to (x2,y2).\n * @remarks\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n * @param x1 - First end of the line segment on the x axis.\n * @param y1 - First end of the line segment on the y axis.\n * @param x2 - Second end of the line segment on the x axis.\n * @param y2 - Second end of the line segment on the y axis.\n * @param x3 - Position of the point on the x axis.\n * @param y3 - Position of the point on the y axis.\n * @param via - The control point for the edge.\n * @returns The distance between the line segment and the point.\n */\n _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via) {\n // x3,y3 is the point\n let minDistance = 1e9;\n let distance;\n let i, t, x, y;\n let lastX = x1;\n let lastY = y1;\n for (i = 1; i < 10; i++) {\n t = 0.1 * i;\n x = Math.pow(1 - t, 2) * x1 + 2 * t * (1 - t) * via.x + Math.pow(t, 2) * x2;\n y = Math.pow(1 - t, 2) * y1 + 2 * t * (1 - t) * via.y + Math.pow(t, 2) * y2;\n if (i > 0) {\n distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n minDistance = distance < minDistance ? distance : minDistance;\n }\n lastX = x;\n lastY = y;\n }\n return minDistance;\n }\n /**\n * Render a bezier curve between two nodes.\n * @remarks\n * The method accepts zero, one or two control points.\n * Passing zero control points just draws a straight line.\n * @param ctx - The context that will be used for rendering.\n * @param values - Style options for edge drawing.\n * @param viaNode1 - First control point for curve drawing.\n * @param viaNode2 - Second control point for curve drawing.\n */\n _bezierCurve(ctx, values, viaNode1, viaNode2) {\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y);\n if (viaNode1 != null && viaNode1.x != null) {\n if (viaNode2 != null && viaNode2.x != null) {\n ctx.bezierCurveTo(viaNode1.x, viaNode1.y, viaNode2.x, viaNode2.y, this.toPoint.x, this.toPoint.y);\n } else {\n ctx.quadraticCurveTo(viaNode1.x, viaNode1.y, this.toPoint.x, this.toPoint.y);\n }\n } else {\n // fallback to normal straight edge\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n }\n // draw a background\n this.drawBackground(ctx, values);\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n /** @inheritDoc */\n getViaNode() {\n return this._getViaCoordinates();\n }\n}\n\n/**\n * A Dynamic Bezier Edge. Bezier curves are used to model smooth gradual\n * curves in paths between nodes. The Dynamic piece refers to how the curve\n * reacts to physics changes.\n * @augments BezierEdgeBase\n */\nclass BezierEdgeDynamic extends BezierEdgeBase {\n /**\n * Create a new instance.\n * @param options - The options object of given edge.\n * @param body - The body of the network.\n * @param labelModule - Label module.\n */\n constructor(options, body, labelModule) {\n //this.via = undefined; // Here for completeness but not allowed to defined before super() is invoked.\n super(options, body, labelModule); // --> this calls the setOptions below\n // @ts-expect-error constructor → super → super → setOptions → setupSupportNode\n _defineProperty(this, \"via\", this.via);\n this._boundFunction = () => {\n this.positionBezierNode();\n };\n this._body.emitter.on(\"_repositionBezierNodes\", this._boundFunction);\n }\n /** @inheritDoc */\n setOptions(options) {\n super.setOptions(options);\n // check if the physics has changed.\n let physicsChange = false;\n if (this.options.physics !== options.physics) {\n physicsChange = true;\n }\n // set the options and the to and from nodes\n this.options = options;\n this.id = this.options.id;\n this.from = this._body.nodes[this.options.from];\n this.to = this._body.nodes[this.options.to];\n // setup the support node and connect\n this.setupSupportNode();\n this.connect();\n // when we change the physics state of the edge, we reposition the support node.\n if (physicsChange === true) {\n this.via.setOptions({\n physics: this.options.physics\n });\n this.positionBezierNode();\n }\n }\n /** @inheritDoc */\n connect() {\n this.from = this._body.nodes[this.options.from];\n this.to = this._body.nodes[this.options.to];\n if (this.from === undefined || this.to === undefined || this.options.physics === false) {\n this.via.setOptions({\n physics: false\n });\n } else {\n // fix weird behaviour where a self referencing node has physics enabled\n if (this.from.id === this.to.id) {\n this.via.setOptions({\n physics: false\n });\n } else {\n this.via.setOptions({\n physics: true\n });\n }\n }\n }\n /** @inheritDoc */\n cleanup() {\n this._body.emitter.off(\"_repositionBezierNodes\", this._boundFunction);\n if (this.via !== undefined) {\n delete this._body.nodes[this.via.id];\n this.via = undefined;\n return true;\n }\n return false;\n }\n /**\n * Create and add a support node if not already present.\n * @remarks\n * Bezier curves require an anchor point to calculate the smooth flow.\n * These points are nodes.\n * These nodes are invisible but are used for the force calculation.\n *\n * The changed data is not called, if needed, it is returned by the main edge constructor.\n */\n setupSupportNode() {\n if (this.via === undefined) {\n const nodeId = \"edgeId:\" + this.id;\n const node = this._body.functions.createNode({\n id: nodeId,\n shape: \"circle\",\n physics: true,\n hidden: true\n });\n this._body.nodes[nodeId] = node;\n this.via = node;\n this.via.parentEdgeId = this.id;\n this.positionBezierNode();\n }\n }\n /**\n * Position bezier node.\n */\n positionBezierNode() {\n if (this.via !== undefined && this.from !== undefined && this.to !== undefined) {\n this.via.x = 0.5 * (this.from.x + this.to.x);\n this.via.y = 0.5 * (this.from.y + this.to.y);\n } else if (this.via !== undefined) {\n this.via.x = 0;\n this.via.y = 0;\n }\n }\n /** @inheritDoc */\n _line(ctx, values, viaNode) {\n this._bezierCurve(ctx, values, viaNode);\n }\n /** @inheritDoc */\n _getViaCoordinates() {\n return this.via;\n }\n /** @inheritDoc */\n getViaNode() {\n return this.via;\n }\n /** @inheritDoc */\n getPoint(position) {\n let viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.via;\n if (this.from === this.to) {\n const [cx, cy, cr] = this._getCircleData();\n const a = 2 * Math.PI * (1 - position);\n return {\n x: cx + cr * Math.sin(a),\n y: cy + cr - cr * (1 - Math.cos(a))\n };\n } else {\n return {\n x: Math.pow(1 - position, 2) * this.fromPoint.x + 2 * position * (1 - position) * viaNode.x + Math.pow(position, 2) * this.toPoint.x,\n y: Math.pow(1 - position, 2) * this.fromPoint.y + 2 * position * (1 - position) * viaNode.y + Math.pow(position, 2) * this.toPoint.y\n };\n }\n }\n /** @inheritDoc */\n _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx, this.via);\n }\n /** @inheritDoc */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, this.via);\n }\n}\n\n/**\n * A Static Bezier Edge. Bezier curves are used to model smooth gradual curves in paths between nodes.\n */\nclass BezierEdgeStatic extends BezierEdgeBase {\n /**\n * Create a new instance.\n * @param options - The options object of given edge.\n * @param body - The body of the network.\n * @param labelModule - Label module.\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n /** @inheritDoc */\n _line(ctx, values, viaNode) {\n this._bezierCurve(ctx, values, viaNode);\n }\n /** @inheritDoc */\n getViaNode() {\n return this._getViaCoordinates();\n }\n /**\n * Compute the coordinates of the via node.\n * @remarks\n * We do not use the to and fromPoints here to make the via nodes the same as edges without arrows.\n * @returns Cartesian coordinates of the via node.\n */\n _getViaCoordinates() {\n // Assumption: x/y coordinates in from/to always defined\n const factor = this.options.smooth.roundness;\n const type = this.options.smooth.type;\n let dx = Math.abs(this.from.x - this.to.x);\n let dy = Math.abs(this.from.y - this.to.y);\n if (type === \"discrete\" || type === \"diagonalCross\") {\n let stepX;\n let stepY;\n if (dx <= dy) {\n stepX = stepY = factor * dy;\n } else {\n stepX = stepY = factor * dx;\n }\n if (this.from.x > this.to.x) {\n stepX = -stepX;\n }\n if (this.from.y >= this.to.y) {\n stepY = -stepY;\n }\n let xVia = this.from.x + stepX;\n let yVia = this.from.y + stepY;\n if (type === \"discrete\") {\n if (dx <= dy) {\n xVia = dx < factor * dy ? this.from.x : xVia;\n } else {\n yVia = dy < factor * dx ? this.from.y : yVia;\n }\n }\n return {\n x: xVia,\n y: yVia\n };\n } else if (type === \"straightCross\") {\n let stepX = (1 - factor) * dx;\n let stepY = (1 - factor) * dy;\n if (dx <= dy) {\n // up - down\n stepX = 0;\n if (this.from.y < this.to.y) {\n stepY = -stepY;\n }\n } else {\n // left - right\n if (this.from.x < this.to.x) {\n stepX = -stepX;\n }\n stepY = 0;\n }\n return {\n x: this.to.x + stepX,\n y: this.to.y + stepY\n };\n } else if (type === \"horizontal\") {\n let stepX = (1 - factor) * dx;\n if (this.from.x < this.to.x) {\n stepX = -stepX;\n }\n return {\n x: this.to.x + stepX,\n y: this.from.y\n };\n } else if (type === \"vertical\") {\n let stepY = (1 - factor) * dy;\n if (this.from.y < this.to.y) {\n stepY = -stepY;\n }\n return {\n x: this.from.x,\n y: this.to.y + stepY\n };\n } else if (type === \"curvedCW\") {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n const radius = Math.sqrt(dx * dx + dy * dy);\n const pi = Math.PI;\n const originalAngle = Math.atan2(dy, dx);\n const myAngle = (originalAngle + (factor * 0.5 + 0.5) * pi) % (2 * pi);\n return {\n x: this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle),\n y: this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle)\n };\n } else if (type === \"curvedCCW\") {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n const radius = Math.sqrt(dx * dx + dy * dy);\n const pi = Math.PI;\n const originalAngle = Math.atan2(dy, dx);\n const myAngle = (originalAngle + (-factor * 0.5 + 0.5) * pi) % (2 * pi);\n return {\n x: this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle),\n y: this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle)\n };\n } else {\n // continuous\n let stepX;\n let stepY;\n if (dx <= dy) {\n stepX = stepY = factor * dy;\n } else {\n stepX = stepY = factor * dx;\n }\n if (this.from.x > this.to.x) {\n stepX = -stepX;\n }\n if (this.from.y >= this.to.y) {\n stepY = -stepY;\n }\n let xVia = this.from.x + stepX;\n let yVia = this.from.y + stepY;\n if (dx <= dy) {\n if (this.from.x <= this.to.x) {\n xVia = this.to.x < xVia ? this.to.x : xVia;\n } else {\n xVia = this.to.x > xVia ? this.to.x : xVia;\n }\n } else {\n if (this.from.y >= this.to.y) {\n yVia = this.to.y > yVia ? this.to.y : yVia;\n } else {\n yVia = this.to.y < yVia ? this.to.y : yVia;\n }\n }\n return {\n x: xVia,\n y: yVia\n };\n }\n }\n /** @inheritDoc */\n _findBorderPosition(nearNode, ctx) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return this._findBorderPositionBezier(nearNode, ctx, options.via);\n }\n /** @inheritDoc */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n let viaNode = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates();\n // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, viaNode);\n }\n /** @inheritDoc */\n getPoint(position) {\n let viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates();\n const t = position;\n const x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x;\n const y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y;\n return {\n x: x,\n y: y\n };\n }\n}\n\n/**\n * A Base Class for all Cubic Bezier Edges. Bezier curves are used to model\n * smooth gradual curves in paths between nodes.\n * @augments BezierEdgeBase\n */\nclass CubicBezierEdgeBase extends BezierEdgeBase {\n /**\n * Create a new instance.\n * @param options - The options object of given edge.\n * @param body - The body of the network.\n * @param labelModule - Label module.\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from (x1,y1) to (x2,y2).\n * @remarks\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n * https://en.wikipedia.org/wiki/B%C3%A9zier_curve\n * @param x1 - First end of the line segment on the x axis.\n * @param y1 - First end of the line segment on the y axis.\n * @param x2 - Second end of the line segment on the x axis.\n * @param y2 - Second end of the line segment on the y axis.\n * @param x3 - Position of the point on the x axis.\n * @param y3 - Position of the point on the y axis.\n * @param via1 - The first point this edge passes through.\n * @param via2 - The second point this edge passes through.\n * @returns The distance between the line segment and the point.\n */\n _getDistanceToBezierEdge2(x1, y1, x2, y2, x3, y3, via1, via2) {\n // x3,y3 is the point\n let minDistance = 1e9;\n let lastX = x1;\n let lastY = y1;\n const vec = [0, 0, 0, 0];\n for (let i = 1; i < 10; i++) {\n const t = 0.1 * i;\n vec[0] = Math.pow(1 - t, 3);\n vec[1] = 3 * t * Math.pow(1 - t, 2);\n vec[2] = 3 * Math.pow(t, 2) * (1 - t);\n vec[3] = Math.pow(t, 3);\n const x = vec[0] * x1 + vec[1] * via1.x + vec[2] * via2.x + vec[3] * x2;\n const y = vec[0] * y1 + vec[1] * via1.y + vec[2] * via2.y + vec[3] * y2;\n if (i > 0) {\n const distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n minDistance = distance < minDistance ? distance : minDistance;\n }\n lastX = x;\n lastY = y;\n }\n return minDistance;\n }\n}\n\n/**\n * A Cubic Bezier Edge. Bezier curves are used to model smooth gradual curves in paths between nodes.\n */\nclass CubicBezierEdge extends CubicBezierEdgeBase {\n /**\n * Create a new instance.\n * @param options - The options object of given edge.\n * @param body - The body of the network.\n * @param labelModule - Label module.\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n /** @inheritDoc */\n _line(ctx, values, viaNodes) {\n // get the coordinates of the support points.\n const via1 = viaNodes[0];\n const via2 = viaNodes[1];\n this._bezierCurve(ctx, values, via1, via2);\n }\n /**\n * Compute the additional points the edge passes through.\n * @returns Cartesian coordinates of the points the edge passes through.\n */\n _getViaCoordinates() {\n const dx = this.from.x - this.to.x;\n const dy = this.from.y - this.to.y;\n let x1;\n let y1;\n let x2;\n let y2;\n const roundness = this.options.smooth.roundness;\n // horizontal if x > y or if direction is forced or if direction is horizontal\n if ((Math.abs(dx) > Math.abs(dy) || this.options.smooth.forceDirection === true || this.options.smooth.forceDirection === \"horizontal\") && this.options.smooth.forceDirection !== \"vertical\") {\n y1 = this.from.y;\n y2 = this.to.y;\n x1 = this.from.x - roundness * dx;\n x2 = this.to.x + roundness * dx;\n } else {\n y1 = this.from.y - roundness * dy;\n y2 = this.to.y + roundness * dy;\n x1 = this.from.x;\n x2 = this.to.x;\n }\n return [{\n x: x1,\n y: y1\n }, {\n x: x2,\n y: y2\n }];\n }\n /** @inheritDoc */\n getViaNode() {\n return this._getViaCoordinates();\n }\n /** @inheritDoc */\n _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx);\n }\n /** @inheritDoc */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n let [via1, via2] = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates();\n // x3,y3 is the point\n return this._getDistanceToBezierEdge2(x1, y1, x2, y2, x3, y3, via1, via2);\n }\n /** @inheritDoc */\n getPoint(position) {\n let [via1, via2] = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates();\n const t = position;\n const vec = [Math.pow(1 - t, 3), 3 * t * Math.pow(1 - t, 2), 3 * Math.pow(t, 2) * (1 - t), Math.pow(t, 3)];\n const x = vec[0] * this.fromPoint.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.toPoint.x;\n const y = vec[0] * this.fromPoint.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.toPoint.y;\n return {\n x: x,\n y: y\n };\n }\n}\n\n/**\n * A Straight Edge.\n */\nclass StraightEdge extends EdgeBase {\n /**\n * Create a new instance.\n * @param options - The options object of given edge.\n * @param body - The body of the network.\n * @param labelModule - Label module.\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n /** @inheritDoc */\n _line(ctx, values) {\n // draw a straight line\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y);\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n /** @inheritDoc */\n getViaNode() {\n return undefined;\n }\n /** @inheritDoc */\n getPoint(position) {\n return {\n x: (1 - position) * this.fromPoint.x + position * this.toPoint.x,\n y: (1 - position) * this.fromPoint.y + position * this.toPoint.y\n };\n }\n /** @inheritDoc */\n _findBorderPosition(nearNode, ctx) {\n let node1 = this.to;\n let node2 = this.from;\n if (nearNode.id === this.from.id) {\n node1 = this.from;\n node2 = this.to;\n }\n const angle = Math.atan2(node1.y - node2.y, node1.x - node2.x);\n const dx = node1.x - node2.x;\n const dy = node1.y - node2.y;\n const edgeSegmentLength = Math.sqrt(dx * dx + dy * dy);\n const toBorderDist = nearNode.distanceToBorder(ctx, angle);\n const toBorderPoint = (edgeSegmentLength - toBorderDist) / edgeSegmentLength;\n return {\n x: (1 - toBorderPoint) * node2.x + toBorderPoint * node1.x,\n y: (1 - toBorderPoint) * node2.y + toBorderPoint * node1.y,\n t: 0\n };\n }\n /** @inheritDoc */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n // x3,y3 is the point\n return this._getDistanceToLine(x1, y1, x2, y2, x3, y3);\n }\n}\n\n/**\n * An edge connects two nodes and has a specific direction.\n */\nclass Edge {\n /**\n * @param {object} options values specific to this edge, must contain at least 'from' and 'to'\n * @param {object} body shared state from Network instance\n * @param {Network.Images} imagelist A list with images. Only needed when the edge has image arrows.\n * @param {object} globalOptions options from the EdgesHandler instance\n * @param {object} defaultOptions default options from the EdgeHandler instance. Value and reference are constant\n */\n constructor(options, body, imagelist, globalOptions, defaultOptions) {\n if (body === undefined) {\n throw new Error(\"No body provided\");\n }\n\n // Since globalOptions is constant in values as well as reference,\n // Following needs to be done only once.\n\n this.options = bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.body = body;\n this.imagelist = imagelist;\n\n // initialize variables\n this.id = undefined;\n this.fromId = undefined;\n this.toId = undefined;\n this.selected = false;\n this.hover = false;\n this.labelDirty = true;\n this.baseWidth = this.options.width;\n this.baseFontSize = this.options.font.size;\n this.from = undefined; // a node\n this.to = undefined; // a node\n\n this.edgeType = undefined;\n this.connected = false;\n this.labelModule = new Label(this.body, this.options, true /* It's an edge label */);\n this.setOptions(options);\n }\n\n /**\n * Set or overwrite options for the edge\n * @param {object} options an object with options\n * @returns {undefined|boolean} undefined if no options, true if layout affecting data changed, false otherwise.\n */\n setOptions(options) {\n if (!options) {\n return;\n }\n\n // Following options if changed affect the layout.\n let affectsLayout = typeof options.physics !== \"undefined\" && this.options.physics !== options.physics || typeof options.hidden !== \"undefined\" && (this.options.hidden || false) !== (options.hidden || false) || typeof options.from !== \"undefined\" && this.options.from !== options.from || typeof options.to !== \"undefined\" && this.options.to !== options.to;\n Edge.parseOptions(this.options, options, true, this.globalOptions);\n if (options.id !== undefined) {\n this.id = options.id;\n }\n if (options.from !== undefined) {\n this.fromId = options.from;\n }\n if (options.to !== undefined) {\n this.toId = options.to;\n }\n if (options.title !== undefined) {\n this.title = options.title;\n }\n if (options.value !== undefined) {\n options.value = _parseFloat(options.value);\n }\n const pile = [options, this.options, this.defaultOptions];\n this.chooser = choosify(\"edge\", pile);\n\n // update label Module\n this.updateLabelModule(options);\n\n // Update edge type, this if changed affects the layout.\n affectsLayout = this.updateEdgeType() || affectsLayout;\n\n // if anything has been updates, reset the selection width and the hover width\n this._setInteractionWidths();\n\n // A node is connected when it has a from and to node that both exist in the network.body.nodes.\n this.connect();\n return affectsLayout;\n }\n\n /**\n *\n * @param {object} parentOptions\n * @param {object} newOptions\n * @param {boolean} [allowDeletion]\n * @param {object} [globalOptions]\n * @param {boolean} [copyFromGlobals]\n */\n static parseOptions(parentOptions, newOptions) {\n let allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n let copyFromGlobals = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n const fields = [\"endPointOffset\", \"arrowStrikethrough\", \"id\", \"from\", \"hidden\", \"hoverWidth\", \"labelHighlightBold\", \"length\", \"line\", \"opacity\", \"physics\", \"scaling\", \"selectionWidth\", \"selfReferenceSize\", \"selfReference\", \"to\", \"title\", \"value\", \"width\", \"font\", \"chosen\", \"widthConstraint\"];\n\n // only deep extend the items in the field array. These do not have shorthand.\n selectiveDeepExtend(fields, parentOptions, newOptions, allowDeletion);\n\n // Only use endPointOffset values (from and to) if it's valid values\n if (newOptions.endPointOffset !== undefined && newOptions.endPointOffset.from !== undefined) {\n if (_Number$isFinite(newOptions.endPointOffset.from)) {\n parentOptions.endPointOffset.from = newOptions.endPointOffset.from;\n } else {\n parentOptions.endPointOffset.from = globalOptions.endPointOffset.from !== undefined ? globalOptions.endPointOffset.from : 0;\n console.error(\"endPointOffset.from is not a valid number\");\n }\n }\n if (newOptions.endPointOffset !== undefined && newOptions.endPointOffset.to !== undefined) {\n if (_Number$isFinite(newOptions.endPointOffset.to)) {\n parentOptions.endPointOffset.to = newOptions.endPointOffset.to;\n } else {\n parentOptions.endPointOffset.to = globalOptions.endPointOffset.to !== undefined ? globalOptions.endPointOffset.to : 0;\n console.error(\"endPointOffset.to is not a valid number\");\n }\n }\n\n // Only copy label if it's a legal value.\n if (isValidLabel(newOptions.label)) {\n parentOptions.label = newOptions.label;\n } else if (!isValidLabel(parentOptions.label)) {\n parentOptions.label = undefined;\n }\n mergeOptions(parentOptions, newOptions, \"smooth\", globalOptions);\n mergeOptions(parentOptions, newOptions, \"shadow\", globalOptions);\n mergeOptions(parentOptions, newOptions, \"background\", globalOptions);\n if (newOptions.dashes !== undefined && newOptions.dashes !== null) {\n parentOptions.dashes = newOptions.dashes;\n } else if (allowDeletion === true && newOptions.dashes === null) {\n parentOptions.dashes = _Object$create(globalOptions.dashes); // this sets the pointer of the option back to the global option.\n }\n\n // set the scaling newOptions\n if (newOptions.scaling !== undefined && newOptions.scaling !== null) {\n if (newOptions.scaling.min !== undefined) {\n parentOptions.scaling.min = newOptions.scaling.min;\n }\n if (newOptions.scaling.max !== undefined) {\n parentOptions.scaling.max = newOptions.scaling.max;\n }\n mergeOptions(parentOptions.scaling, newOptions.scaling, \"label\", globalOptions.scaling);\n } else if (allowDeletion === true && newOptions.scaling === null) {\n parentOptions.scaling = _Object$create(globalOptions.scaling); // this sets the pointer of the option back to the global option.\n }\n\n // handle multiple input cases for arrows\n if (newOptions.arrows !== undefined && newOptions.arrows !== null) {\n if (typeof newOptions.arrows === \"string\") {\n const arrows = newOptions.arrows.toLowerCase();\n parentOptions.arrows.to.enabled = _indexOfInstanceProperty(arrows).call(arrows, \"to\") != -1;\n parentOptions.arrows.middle.enabled = _indexOfInstanceProperty(arrows).call(arrows, \"middle\") != -1;\n parentOptions.arrows.from.enabled = _indexOfInstanceProperty(arrows).call(arrows, \"from\") != -1;\n } else if (typeof newOptions.arrows === \"object\") {\n mergeOptions(parentOptions.arrows, newOptions.arrows, \"to\", globalOptions.arrows);\n mergeOptions(parentOptions.arrows, newOptions.arrows, \"middle\", globalOptions.arrows);\n mergeOptions(parentOptions.arrows, newOptions.arrows, \"from\", globalOptions.arrows);\n } else {\n throw new Error(\"The arrow newOptions can only be an object or a string. Refer to the documentation. You used:\" + _JSON$stringify(newOptions.arrows));\n }\n } else if (allowDeletion === true && newOptions.arrows === null) {\n parentOptions.arrows = _Object$create(globalOptions.arrows); // this sets the pointer of the option back to the global option.\n }\n\n // handle multiple input cases for color\n if (newOptions.color !== undefined && newOptions.color !== null) {\n const fromColor = isString(newOptions.color) ? {\n color: newOptions.color,\n highlight: newOptions.color,\n hover: newOptions.color,\n inherit: false,\n opacity: 1\n } : newOptions.color;\n const toColor = parentOptions.color;\n\n // If passed, fill in values from default options - required in the case of no prototype bridging\n if (copyFromGlobals) {\n deepExtend(toColor, globalOptions.color, false, allowDeletion);\n } else {\n // Clear local properties - need to do it like this in order to retain prototype bridges\n for (const i in toColor) {\n if (Object.prototype.hasOwnProperty.call(toColor, i)) {\n delete toColor[i];\n }\n }\n }\n if (isString(toColor)) {\n toColor.color = toColor;\n toColor.highlight = toColor;\n toColor.hover = toColor;\n toColor.inherit = false;\n if (fromColor.opacity === undefined) {\n toColor.opacity = 1.0; // set default\n }\n } else {\n let colorsDefined = false;\n if (fromColor.color !== undefined) {\n toColor.color = fromColor.color;\n colorsDefined = true;\n }\n if (fromColor.highlight !== undefined) {\n toColor.highlight = fromColor.highlight;\n colorsDefined = true;\n }\n if (fromColor.hover !== undefined) {\n toColor.hover = fromColor.hover;\n colorsDefined = true;\n }\n if (fromColor.inherit !== undefined) {\n toColor.inherit = fromColor.inherit;\n }\n if (fromColor.opacity !== undefined) {\n toColor.opacity = Math.min(1, Math.max(0, fromColor.opacity));\n }\n if (colorsDefined === true) {\n toColor.inherit = false;\n } else {\n if (toColor.inherit === undefined) {\n toColor.inherit = \"from\"; // Set default\n }\n }\n }\n } else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = bridgeObject(globalOptions.color); // set the object back to the global options\n }\n if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = bridgeObject(globalOptions.font); // set the object back to the global options\n }\n if (Object.prototype.hasOwnProperty.call(newOptions, \"selfReferenceSize\")) {\n console.warn(\"The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}\");\n parentOptions.selfReference.size = newOptions.selfReferenceSize;\n }\n }\n\n /**\n *\n * @returns {ArrowOptions}\n */\n getFormattingValues() {\n const toArrow = this.options.arrows.to === true || this.options.arrows.to.enabled === true;\n const fromArrow = this.options.arrows.from === true || this.options.arrows.from.enabled === true;\n const middleArrow = this.options.arrows.middle === true || this.options.arrows.middle.enabled === true;\n const inheritsColor = this.options.color.inherit;\n const values = {\n toArrow: toArrow,\n toArrowScale: this.options.arrows.to.scaleFactor,\n toArrowType: this.options.arrows.to.type,\n toArrowSrc: this.options.arrows.to.src,\n toArrowImageWidth: this.options.arrows.to.imageWidth,\n toArrowImageHeight: this.options.arrows.to.imageHeight,\n middleArrow: middleArrow,\n middleArrowScale: this.options.arrows.middle.scaleFactor,\n middleArrowType: this.options.arrows.middle.type,\n middleArrowSrc: this.options.arrows.middle.src,\n middleArrowImageWidth: this.options.arrows.middle.imageWidth,\n middleArrowImageHeight: this.options.arrows.middle.imageHeight,\n fromArrow: fromArrow,\n fromArrowScale: this.options.arrows.from.scaleFactor,\n fromArrowType: this.options.arrows.from.type,\n fromArrowSrc: this.options.arrows.from.src,\n fromArrowImageWidth: this.options.arrows.from.imageWidth,\n fromArrowImageHeight: this.options.arrows.from.imageHeight,\n arrowStrikethrough: this.options.arrowStrikethrough,\n color: inheritsColor ? undefined : this.options.color.color,\n inheritsColor: inheritsColor,\n opacity: this.options.color.opacity,\n hidden: this.options.hidden,\n length: this.options.length,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y,\n dashes: this.options.dashes,\n width: this.options.width,\n background: this.options.background.enabled,\n backgroundColor: this.options.background.color,\n backgroundSize: this.options.background.size,\n backgroundDashes: this.options.background.dashes\n };\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n const selectedWidth = this.options.selectionWidth;\n if (typeof selectedWidth === \"function\") {\n values.width = selectedWidth(values.width);\n } else if (typeof selectedWidth === \"number\") {\n values.width += selectedWidth;\n }\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.highlight;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n const hoverWidth = this.options.hoverWidth;\n if (typeof hoverWidth === \"function\") {\n values.width = hoverWidth(values.width);\n } else if (typeof hoverWidth === \"number\") {\n values.width += hoverWidth;\n }\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.hover;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === \"function\") {\n this.chooser(values, this.options.id, this.selected, this.hover);\n if (values.color !== undefined) {\n values.inheritsColor = false;\n }\n if (values.shadow === false) {\n if (values.shadowColor !== this.options.shadow.color || values.shadowSize !== this.options.shadow.size || values.shadowX !== this.options.shadow.x || values.shadowY !== this.options.shadow.y) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n }\n return values;\n }\n\n /**\n * update the options in the label module\n * @param {object} options\n */\n updateLabelModule(options) {\n const pile = [options, this.options, this.globalOptions,\n // Currently set global edge options\n this.defaultOptions];\n this.labelModule.update(this.options, pile);\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n }\n\n /**\n * update the edge type, set the options\n * @returns {boolean}\n */\n updateEdgeType() {\n const smooth = this.options.smooth;\n let dataChanged = false;\n let changeInType = true;\n if (this.edgeType !== undefined) {\n if (this.edgeType instanceof BezierEdgeDynamic && smooth.enabled === true && smooth.type === \"dynamic\" || this.edgeType instanceof CubicBezierEdge && smooth.enabled === true && smooth.type === \"cubicBezier\" || this.edgeType instanceof BezierEdgeStatic && smooth.enabled === true && smooth.type !== \"dynamic\" && smooth.type !== \"cubicBezier\" || this.edgeType instanceof StraightEdge && smooth.type.enabled === false) {\n changeInType = false;\n }\n if (changeInType === true) {\n dataChanged = this.cleanup();\n }\n }\n if (changeInType === true) {\n if (smooth.enabled === true) {\n if (smooth.type === \"dynamic\") {\n dataChanged = true;\n this.edgeType = new BezierEdgeDynamic(this.options, this.body, this.labelModule);\n } else if (smooth.type === \"cubicBezier\") {\n this.edgeType = new CubicBezierEdge(this.options, this.body, this.labelModule);\n } else {\n this.edgeType = new BezierEdgeStatic(this.options, this.body, this.labelModule);\n }\n } else {\n this.edgeType = new StraightEdge(this.options, this.body, this.labelModule);\n }\n } else {\n // if nothing changes, we just set the options.\n this.edgeType.setOptions(this.options);\n }\n return dataChanged;\n }\n\n /**\n * Connect an edge to its nodes\n */\n connect() {\n this.disconnect();\n this.from = this.body.nodes[this.fromId] || undefined;\n this.to = this.body.nodes[this.toId] || undefined;\n this.connected = this.from !== undefined && this.to !== undefined;\n if (this.connected === true) {\n this.from.attachEdge(this);\n this.to.attachEdge(this);\n } else {\n if (this.from) {\n this.from.detachEdge(this);\n }\n if (this.to) {\n this.to.detachEdge(this);\n }\n }\n this.edgeType.connect();\n }\n\n /**\n * Disconnect an edge from its nodes\n */\n disconnect() {\n if (this.from) {\n this.from.detachEdge(this);\n this.from = undefined;\n }\n if (this.to) {\n this.to.detachEdge(this);\n this.to = undefined;\n }\n this.connected = false;\n }\n\n /**\n * get the title of this edge.\n * @returns {string} title The title of the edge, or undefined when no title\n * has been set.\n */\n getTitle() {\n return this.title;\n }\n\n /**\n * check if this node is selecte\n * @returns {boolean} selected True if node is selected, else false\n */\n isSelected() {\n return this.selected;\n }\n\n /**\n * Retrieve the value of the edge. Can be undefined\n * @returns {number} value\n */\n getValue() {\n return this.options.value;\n }\n\n /**\n * Adjust the value range of the edge. The edge will adjust it's width\n * based on its value.\n * @param {number} min\n * @param {number} max\n * @param {number} total\n */\n setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n const scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n const widthDiff = this.options.scaling.max - this.options.scaling.min;\n if (this.options.scaling.label.enabled === true) {\n const fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n this.options.width = this.options.scaling.min + scale * widthDiff;\n } else {\n this.options.width = this.baseWidth;\n this.options.font.size = this.baseFontSize;\n }\n this._setInteractionWidths();\n this.updateLabelModule();\n }\n\n /**\n *\n * @private\n */\n _setInteractionWidths() {\n if (typeof this.options.hoverWidth === \"function\") {\n this.edgeType.hoverWidth = this.options.hoverWidth(this.options.width);\n } else {\n this.edgeType.hoverWidth = this.options.hoverWidth + this.options.width;\n }\n if (typeof this.options.selectionWidth === \"function\") {\n this.edgeType.selectionWidth = this.options.selectionWidth(this.options.width);\n } else {\n this.edgeType.selectionWidth = this.options.selectionWidth + this.options.width;\n }\n }\n\n /**\n * Redraw a edge\n * Draw this edge in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n draw(ctx) {\n const values = this.getFormattingValues();\n if (values.hidden) {\n return;\n }\n\n // get the via node from the edge type\n const viaNode = this.edgeType.getViaNode();\n\n // draw line and label\n this.edgeType.drawLine(ctx, values, this.selected, this.hover, viaNode);\n this.drawLabel(ctx, viaNode);\n }\n\n /**\n * Redraw arrows\n * Draw this arrows in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n drawArrows(ctx) {\n const values = this.getFormattingValues();\n if (values.hidden) {\n return;\n }\n\n // get the via node from the edge type\n const viaNode = this.edgeType.getViaNode();\n const arrowData = {};\n\n // restore edge targets to defaults\n this.edgeType.fromPoint = this.edgeType.from;\n this.edgeType.toPoint = this.edgeType.to;\n\n // from and to arrows give a different end point for edges. we set them here\n if (values.fromArrow) {\n arrowData.from = this.edgeType.getArrowData(ctx, \"from\", viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false) this.edgeType.fromPoint = arrowData.from.core;\n if (values.fromArrowSrc) {\n arrowData.from.image = this.imagelist.load(values.fromArrowSrc);\n }\n if (values.fromArrowImageWidth) {\n arrowData.from.imageWidth = values.fromArrowImageWidth;\n }\n if (values.fromArrowImageHeight) {\n arrowData.from.imageHeight = values.fromArrowImageHeight;\n }\n }\n if (values.toArrow) {\n arrowData.to = this.edgeType.getArrowData(ctx, \"to\", viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false) this.edgeType.toPoint = arrowData.to.core;\n if (values.toArrowSrc) {\n arrowData.to.image = this.imagelist.load(values.toArrowSrc);\n }\n if (values.toArrowImageWidth) {\n arrowData.to.imageWidth = values.toArrowImageWidth;\n }\n if (values.toArrowImageHeight) {\n arrowData.to.imageHeight = values.toArrowImageHeight;\n }\n }\n\n // the middle arrow depends on the line, which can depend on the to and from arrows so we do this one lastly.\n if (values.middleArrow) {\n arrowData.middle = this.edgeType.getArrowData(ctx, \"middle\", viaNode, this.selected, this.hover, values);\n if (values.middleArrowSrc) {\n arrowData.middle.image = this.imagelist.load(values.middleArrowSrc);\n }\n if (values.middleArrowImageWidth) {\n arrowData.middle.imageWidth = values.middleArrowImageWidth;\n }\n if (values.middleArrowImageHeight) {\n arrowData.middle.imageHeight = values.middleArrowImageHeight;\n }\n }\n if (values.fromArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.from);\n }\n if (values.middleArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.middle);\n }\n if (values.toArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.to);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Node} viaNode\n */\n drawLabel(ctx, viaNode) {\n if (this.options.label !== undefined) {\n // set style\n const node1 = this.from;\n const node2 = this.to;\n if (this.labelModule.differentState(this.selected, this.hover)) {\n this.labelModule.getTextSize(ctx, this.selected, this.hover);\n }\n let point;\n if (node1.id != node2.id) {\n this.labelModule.pointToSelf = false;\n point = this.edgeType.getPoint(0.5, viaNode);\n ctx.save();\n const rotationPoint = this._getRotation(ctx);\n if (rotationPoint.angle != 0) {\n ctx.translate(rotationPoint.x, rotationPoint.y);\n ctx.rotate(rotationPoint.angle);\n }\n\n // draw the label\n this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover);\n\n /*\n // Useful debug code: draw a border around the label\n // This should **not** be enabled in production!\n var size = this.labelModule.getSize();; // ;; intentional so lint catches it\n ctx.strokeStyle = \"#ff0000\";\n ctx.strokeRect(size.left, size.top, size.width, size.height);\n // End debug code\n */\n\n ctx.restore();\n } else {\n // Ignore the orientations.\n this.labelModule.pointToSelf = true;\n\n // get circle coordinates\n const coordinates = getSelfRefCoordinates(ctx, this.options.selfReference.angle, this.options.selfReference.size, node1);\n point = this._pointOnCircle(coordinates.x, coordinates.y, this.options.selfReference.size, this.options.selfReference.angle);\n this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover);\n }\n }\n }\n\n /**\n * Determine all visual elements of this edge instance, in which the given\n * point falls within the bounding shape.\n * @param {point} point\n * @returns {Array.<edgeClickItem|edgeLabelClickItem>} list with the items which are on the point\n */\n getItemsOnPoint(point) {\n const ret = [];\n if (this.labelModule.visible()) {\n const rotationPoint = this._getRotation();\n if (pointInRect(this.labelModule.getSize(), point, rotationPoint)) {\n ret.push({\n edgeId: this.id,\n labelId: 0\n });\n }\n }\n const obj = {\n left: point.x,\n top: point.y\n };\n if (this.isOverlappingWith(obj)) {\n ret.push({\n edgeId: this.id\n });\n }\n return ret;\n }\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {object} obj an object with parameters left, top\n * @returns {boolean} True if location is located on the edge\n */\n isOverlappingWith(obj) {\n if (this.connected) {\n const distMax = 10;\n const xFrom = this.from.x;\n const yFrom = this.from.y;\n const xTo = this.to.x;\n const yTo = this.to.y;\n const xObj = obj.left;\n const yObj = obj.top;\n const dist = this.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, xObj, yObj);\n return dist < distMax;\n } else {\n return false;\n }\n }\n\n /**\n * Determine the rotation point, if any.\n * @param {CanvasRenderingContext2D} [ctx] if passed, do a recalculation of the label size\n * @returns {rotationPoint} the point to rotate around and the angle in radians to rotate\n * @private\n */\n _getRotation(ctx) {\n const viaNode = this.edgeType.getViaNode();\n const point = this.edgeType.getPoint(0.5, viaNode);\n if (ctx !== undefined) {\n this.labelModule.calculateLabelSize(ctx, this.selected, this.hover, point.x, point.y);\n }\n const ret = {\n x: point.x,\n y: this.labelModule.size.yLine,\n angle: 0\n };\n if (!this.labelModule.visible()) {\n return ret; // Don't even bother doing the atan2, there's nothing to draw\n }\n if (this.options.font.align === \"horizontal\") {\n return ret; // No need to calculate angle\n }\n const dy = this.from.y - this.to.y;\n const dx = this.from.x - this.to.x;\n let angle = Math.atan2(dy, dx); // radians\n\n // rotate so that label is readable\n if (angle < -1 && dx < 0 || angle > 0 && dx < 0) {\n angle += Math.PI;\n }\n ret.angle = angle;\n return ret;\n }\n\n /**\n * Get a point on a circle\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @param {number} angle\n * @returns {object} point\n * @private\n */\n _pointOnCircle(x, y, radius, angle) {\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n };\n }\n\n /**\n * Sets selected state to true\n */\n select() {\n this.selected = true;\n }\n\n /**\n * Sets selected state to false\n */\n unselect() {\n this.selected = false;\n }\n\n /**\n * cleans all required things on delete\n * @returns {*}\n */\n cleanup() {\n return this.edgeType.cleanup();\n }\n\n /**\n * Remove edge from the list and perform necessary cleanup.\n */\n remove() {\n this.cleanup();\n this.disconnect();\n delete this.body.edges[this.id];\n }\n\n /**\n * Check if both connecting nodes exist\n * @returns {boolean}\n */\n endPointsValid() {\n return this.body.nodes[this.fromId] !== undefined && this.body.nodes[this.toId] !== undefined;\n }\n}\n\n/**\n * Handler for Edges\n */\nclass EdgesHandler {\n /**\n * @param {object} body\n * @param {Array.<Image>} images\n * @param {Array.<Group>} groups\n */\n constructor(body, images, groups) {\n var _context;\n this.body = body;\n this.images = images;\n this.groups = groups;\n\n // create the edge API in the body container\n this.body.functions.createEdge = _bindInstanceProperty(_context = this.create).call(_context, this);\n this.edgesListeners = {\n add: (event, params) => {\n this.add(params.items);\n },\n update: (event, params) => {\n this.update(params.items);\n },\n remove: (event, params) => {\n this.remove(params.items);\n }\n };\n this.options = {};\n this.defaultOptions = {\n arrows: {\n to: {\n enabled: false,\n scaleFactor: 1,\n type: \"arrow\"\n },\n // boolean / {arrowScaleFactor:1} / {enabled: false, arrowScaleFactor:1}\n middle: {\n enabled: false,\n scaleFactor: 1,\n type: \"arrow\"\n },\n from: {\n enabled: false,\n scaleFactor: 1,\n type: \"arrow\"\n }\n },\n endPointOffset: {\n from: 0,\n to: 0\n },\n arrowStrikethrough: true,\n color: {\n color: \"#848484\",\n highlight: \"#848484\",\n hover: \"#848484\",\n inherit: \"from\",\n opacity: 1.0\n },\n dashes: false,\n font: {\n color: \"#343434\",\n size: 14,\n // px\n face: \"arial\",\n background: \"none\",\n strokeWidth: 2,\n // px\n strokeColor: \"#ffffff\",\n align: \"horizontal\",\n multi: false,\n vadjust: 0,\n bold: {\n mod: \"bold\"\n },\n boldital: {\n mod: \"bold italic\"\n },\n ital: {\n mod: \"italic\"\n },\n mono: {\n mod: \"\",\n size: 15,\n // px\n face: \"courier new\",\n vadjust: 2\n }\n },\n hidden: false,\n hoverWidth: 1.5,\n label: undefined,\n labelHighlightBold: true,\n length: undefined,\n physics: true,\n scaling: {\n min: 1,\n max: 15,\n label: {\n enabled: true,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function (min, max, total, value) {\n if (max === min) {\n return 0.5;\n } else {\n const scale = 1 / (max - min);\n return Math.max(0, (value - min) * scale);\n }\n }\n },\n selectionWidth: 1.5,\n selfReference: {\n size: 20,\n angle: Math.PI / 4,\n renderBehindTheNode: true\n },\n shadow: {\n enabled: false,\n color: \"rgba(0,0,0,0.5)\",\n size: 10,\n x: 5,\n y: 5\n },\n background: {\n enabled: false,\n color: \"rgba(111,111,111,1)\",\n size: 10,\n dashes: false\n },\n smooth: {\n enabled: true,\n type: \"dynamic\",\n forceDirection: \"none\",\n roundness: 0.5\n },\n title: undefined,\n width: 1,\n value: undefined\n };\n deepExtend(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n var _this = this,\n _context2,\n _context3;\n // this allows external modules to force all dynamic curves to turn static.\n this.body.emitter.on(\"_forceDisableDynamicCurves\", function (type) {\n let emit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (type === \"dynamic\") {\n type = \"continuous\";\n }\n let dataChanged = false;\n for (const edgeId in _this.body.edges) {\n if (Object.prototype.hasOwnProperty.call(_this.body.edges, edgeId)) {\n const edge = _this.body.edges[edgeId];\n const edgeData = _this.body.data.edges.get(edgeId);\n\n // only forcibly remove the smooth curve if the data has been set of the edge has the smooth curves defined.\n // this is because a change in the global would not affect these curves.\n if (edgeData != null) {\n const smoothOptions = edgeData.smooth;\n if (smoothOptions !== undefined) {\n if (smoothOptions.enabled === true && smoothOptions.type === \"dynamic\") {\n if (type === undefined) {\n edge.setOptions({\n smooth: false\n });\n } else {\n edge.setOptions({\n smooth: {\n type: type\n }\n });\n }\n dataChanged = true;\n }\n }\n }\n }\n }\n if (emit === true && dataChanged === true) {\n _this.body.emitter.emit(\"_dataChanged\");\n }\n });\n\n // this is called when options of EXISTING nodes or edges have changed.\n //\n // NOTE: Not true, called when options have NOT changed, for both existing as well as new nodes.\n // See update() for logic.\n // TODO: Verify and examine the consequences of this. It might still trigger when\n // non-option fields have changed, but then reconnecting edges is still useless.\n // Alternatively, it might also be called when edges are removed.\n //\n this.body.emitter.on(\"_dataUpdated\", () => {\n this.reconnectEdges();\n });\n\n // refresh the edges. Used when reverting from hierarchical layout\n this.body.emitter.on(\"refreshEdges\", _bindInstanceProperty(_context2 = this.refresh).call(_context2, this));\n this.body.emitter.on(\"refresh\", _bindInstanceProperty(_context3 = this.refresh).call(_context3, this));\n this.body.emitter.on(\"destroy\", () => {\n forEach(this.edgesListeners, (callback, event) => {\n if (this.body.data.edges) this.body.data.edges.off(event, callback);\n });\n delete this.body.functions.createEdge;\n delete this.edgesListeners.add;\n delete this.edgesListeners.update;\n delete this.edgesListeners.remove;\n delete this.edgesListeners;\n });\n }\n\n /**\n *\n * @param {object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // use the parser from the Edge class to fill in all shorthand notations\n Edge.parseOptions(this.options, options, true, this.defaultOptions, true);\n\n // update smooth settings in all edges\n let dataChanged = false;\n if (options.smooth !== undefined) {\n for (const edgeId in this.body.edges) {\n if (Object.prototype.hasOwnProperty.call(this.body.edges, edgeId)) {\n dataChanged = this.body.edges[edgeId].updateEdgeType() || dataChanged;\n }\n }\n }\n\n // update fonts in all edges\n if (options.font !== undefined) {\n for (const edgeId in this.body.edges) {\n if (Object.prototype.hasOwnProperty.call(this.body.edges, edgeId)) {\n this.body.edges[edgeId].updateLabelModule();\n }\n }\n }\n\n // update the state of the variables if needed\n if (options.hidden !== undefined || options.physics !== undefined || dataChanged === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n }\n\n /**\n * Load edges by reading the data table\n * @param {Array | DataSet | DataView} edges The data containing the edges.\n * @param {boolean} [doNotEmit] - Suppress data changed event.\n * @private\n */\n setData(edges) {\n let doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n const oldEdgesData = this.body.data.edges;\n if (isDataViewLike(\"id\", edges)) {\n this.body.data.edges = edges;\n } else if (_Array$isArray(edges)) {\n this.body.data.edges = new DataSet();\n this.body.data.edges.add(edges);\n } else if (!edges) {\n this.body.data.edges = new DataSet();\n } else {\n throw new TypeError(\"Array or DataSet expected\");\n }\n\n // TODO: is this null or undefined or false?\n if (oldEdgesData) {\n // unsubscribe from old dataset\n forEach(this.edgesListeners, (callback, event) => {\n oldEdgesData.off(event, callback);\n });\n }\n\n // remove drawn edges\n this.body.edges = {};\n\n // TODO: is this null or undefined or false?\n if (this.body.data.edges) {\n // subscribe to new dataset\n forEach(this.edgesListeners, (callback, event) => {\n this.body.data.edges.on(event, callback);\n });\n\n // draw all new nodes\n const ids = this.body.data.edges.getIds();\n this.add(ids, true);\n }\n this.body.emitter.emit(\"_adjustEdgesForHierarchicalLayout\");\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Add edges\n * @param {number[] | string[]} ids\n * @param {boolean} [doNotEmit]\n * @private\n */\n add(ids) {\n let doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n const edges = this.body.edges;\n const edgesData = this.body.data.edges;\n for (let i = 0; i < ids.length; i++) {\n const id = ids[i];\n const oldEdge = edges[id];\n if (oldEdge) {\n oldEdge.disconnect();\n }\n const data = edgesData.get(id, {\n showInternalIds: true\n });\n edges[id] = this.create(data);\n }\n this.body.emitter.emit(\"_adjustEdgesForHierarchicalLayout\");\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Update existing edges, or create them when not yet existing\n * @param {number[] | string[]} ids\n * @private\n */\n update(ids) {\n const edges = this.body.edges;\n const edgesData = this.body.data.edges;\n let dataChanged = false;\n for (let i = 0; i < ids.length; i++) {\n const id = ids[i];\n const data = edgesData.get(id);\n const edge = edges[id];\n if (edge !== undefined) {\n // update edge\n edge.disconnect();\n dataChanged = edge.setOptions(data) || dataChanged; // if a support node is added, data can be changed.\n edge.connect();\n } else {\n // create edge\n this.body.edges[id] = this.create(data);\n dataChanged = true;\n }\n }\n if (dataChanged === true) {\n this.body.emitter.emit(\"_adjustEdgesForHierarchicalLayout\");\n this.body.emitter.emit(\"_dataChanged\");\n } else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n\n /**\n * Remove existing edges. Non existing ids will be ignored\n * @param {number[] | string[]} ids\n * @param {boolean} [emit]\n * @private\n */\n remove(ids) {\n let emit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (ids.length === 0) return; // early out\n\n const edges = this.body.edges;\n forEach(ids, id => {\n const edge = edges[id];\n if (edge !== undefined) {\n edge.remove();\n }\n });\n if (emit) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Refreshes Edge Handler\n */\n refresh() {\n forEach(this.body.edges, (edge, edgeId) => {\n const data = this.body.data.edges.get(edgeId);\n if (data !== undefined) {\n edge.setOptions(data);\n }\n });\n }\n\n /**\n *\n * @param {object} properties\n * @returns {Edge}\n */\n create(properties) {\n return new Edge(properties, this.body, this.images, this.options, this.defaultOptions);\n }\n\n /**\n * Reconnect all edges\n * @private\n */\n reconnectEdges() {\n let id;\n const nodes = this.body.nodes;\n const edges = this.body.edges;\n for (id in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, id)) {\n nodes[id].edges = [];\n }\n }\n for (id in edges) {\n if (Object.prototype.hasOwnProperty.call(edges, id)) {\n const edge = edges[id];\n edge.from = null;\n edge.to = null;\n edge.connect();\n }\n }\n }\n\n /**\n *\n * @param {Edge.id} edgeId\n * @returns {Array}\n */\n getConnectedNodes(edgeId) {\n const nodeList = [];\n if (this.body.edges[edgeId] !== undefined) {\n const edge = this.body.edges[edgeId];\n if (edge.fromId !== undefined) {\n nodeList.push(edge.fromId);\n }\n if (edge.toId !== undefined) {\n nodeList.push(edge.toId);\n }\n }\n return nodeList;\n }\n\n /**\n * There is no direct relation between the nodes and the edges DataSet,\n * so the right place to do call this is in the handler for event `_dataUpdated`.\n */\n _updateState() {\n this._addMissingEdges();\n this._removeInvalidEdges();\n }\n\n /**\n * Scan for missing nodes and remove corresponding edges, if any.\n * @private\n */\n _removeInvalidEdges() {\n const edgesToDelete = [];\n forEach(this.body.edges, (edge, id) => {\n const toNode = this.body.nodes[edge.toId];\n const fromNode = this.body.nodes[edge.fromId];\n\n // Skip clustering edges here, let the Clustering module handle those\n if (toNode !== undefined && toNode.isCluster === true || fromNode !== undefined && fromNode.isCluster === true) {\n return;\n }\n if (toNode === undefined || fromNode === undefined) {\n edgesToDelete.push(id);\n }\n });\n this.remove(edgesToDelete, false);\n }\n\n /**\n * add all edges from dataset that are not in the cached state\n * @private\n */\n _addMissingEdges() {\n const edgesData = this.body.data.edges;\n if (edgesData === undefined || edgesData === null) {\n return; // No edges DataSet yet; can happen on startup\n }\n const edges = this.body.edges;\n const addIds = [];\n _forEachInstanceProperty(edgesData).call(edgesData, (edgeData, edgeId) => {\n const edge = edges[edgeId];\n if (edge === undefined) {\n addIds.push(edgeId);\n }\n });\n this.add(addIds, true);\n }\n}\n\n/**\n * Barnes Hut Solver\n */\nclass BarnesHutSolver {\n /**\n * @param {object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.barnesHutTree;\n this.setOptions(options);\n this._rng = Alea(\"BARNES HUT SOLVER\");\n\n // debug: show grid\n // this.body.emitter.on(\"afterDrawing\", (ctx) => {this._debug(ctx,'#ff0000')})\n }\n\n /**\n *\n * @param {object} options\n */\n setOptions(options) {\n this.options = options;\n this.thetaInversed = 1 / this.options.theta;\n\n // if 1 then min distance = 0.5, if 0.5 then min distance = 0.5 + 0.5*node.shape.radius\n this.overlapAvoidanceFactor = 1 - Math.max(0, Math.min(1, this.options.avoidOverlap));\n }\n\n /**\n * This function calculates the forces the nodes apply on each other based on a gravitational model.\n * The Barnes Hut method is used to speed up this N-body simulation.\n * @private\n */\n solve() {\n if (this.options.gravitationalConstant !== 0 && this.physicsBody.physicsNodeIndices.length > 0) {\n let node;\n const nodes = this.body.nodes;\n const nodeIndices = this.physicsBody.physicsNodeIndices;\n const nodeCount = nodeIndices.length;\n\n // create the tree\n const barnesHutTree = this._formBarnesHutTree(nodes, nodeIndices);\n\n // for debugging\n this.barnesHutTree = barnesHutTree;\n\n // place the nodes one by one recursively\n for (let i = 0; i < nodeCount; i++) {\n node = nodes[nodeIndices[i]];\n if (node.options.mass > 0) {\n // starting with root is irrelevant, it never passes the BarnesHutSolver condition\n this._getForceContributions(barnesHutTree.root, node);\n }\n }\n }\n }\n\n /**\n * @param {object} parentBranch\n * @param {Node} node\n * @private\n */\n _getForceContributions(parentBranch, node) {\n this._getForceContribution(parentBranch.children.NW, node);\n this._getForceContribution(parentBranch.children.NE, node);\n this._getForceContribution(parentBranch.children.SW, node);\n this._getForceContribution(parentBranch.children.SE, node);\n }\n\n /**\n * This function traverses the barnesHutTree. It checks when it can approximate distant nodes with their center of mass.\n * If a region contains a single node, we check if it is not itself, then we apply the force.\n * @param {object} parentBranch\n * @param {Node} node\n * @private\n */\n _getForceContribution(parentBranch, node) {\n // we get no force contribution from an empty region\n if (parentBranch.childrenCount > 0) {\n // get the distance from the center of mass to the node.\n const dx = parentBranch.centerOfMass.x - node.x;\n const dy = parentBranch.centerOfMass.y - node.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n // BarnesHutSolver condition\n // original condition : s/d < theta = passed === d/s > 1/theta = passed\n // calcSize = 1/s --> d * 1/s > 1/theta = passed\n if (distance * parentBranch.calcSize > this.thetaInversed) {\n this._calculateForces(distance, dx, dy, node, parentBranch);\n } else {\n // Did not pass the condition, go into children if available\n if (parentBranch.childrenCount === 4) {\n this._getForceContributions(parentBranch, node);\n } else {\n // parentBranch must have only one node, if it was empty we wouldnt be here\n if (parentBranch.children.data.id != node.id) {\n // if it is not self\n this._calculateForces(distance, dx, dy, node, parentBranch);\n }\n }\n }\n }\n }\n\n /**\n * Calculate the forces based on the distance.\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Node} node\n * @param {object} parentBranch\n * @private\n */\n _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1;\n dx = distance;\n }\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius);\n }\n\n // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n const gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass / Math.pow(distance, 3);\n const fx = dx * gravityForce;\n const fy = dy * gravityForce;\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n\n /**\n * This function constructs the barnesHut tree recursively. It creates the root, splits it and starts placing the nodes.\n * @param {Array.<Node>} nodes\n * @param {Array.<number>} nodeIndices\n * @returns {{root: {centerOfMass: {x: number, y: number}, mass: number, range: {minX: number, maxX: number, minY: number, maxY: number}, size: number, calcSize: number, children: {data: null}, maxWidth: number, level: number, childrenCount: number}}} BarnesHutTree\n * @private\n */\n _formBarnesHutTree(nodes, nodeIndices) {\n let node;\n const nodeCount = nodeIndices.length;\n let minX = nodes[nodeIndices[0]].x;\n let minY = nodes[nodeIndices[0]].y;\n let maxX = nodes[nodeIndices[0]].x;\n let maxY = nodes[nodeIndices[0]].y;\n\n // get the range of the nodes\n for (let i = 1; i < nodeCount; i++) {\n const node = nodes[nodeIndices[i]];\n const x = node.x;\n const y = node.y;\n if (node.options.mass > 0) {\n if (x < minX) {\n minX = x;\n }\n if (x > maxX) {\n maxX = x;\n }\n if (y < minY) {\n minY = y;\n }\n if (y > maxY) {\n maxY = y;\n }\n }\n }\n // make the range a square\n const sizeDiff = Math.abs(maxX - minX) - Math.abs(maxY - minY); // difference between X and Y\n if (sizeDiff > 0) {\n minY -= 0.5 * sizeDiff;\n maxY += 0.5 * sizeDiff;\n } // xSize > ySize\n else {\n minX += 0.5 * sizeDiff;\n maxX -= 0.5 * sizeDiff;\n } // xSize < ySize\n\n const minimumTreeSize = 1e-5;\n const rootSize = Math.max(minimumTreeSize, Math.abs(maxX - minX));\n const halfRootSize = 0.5 * rootSize;\n const centerX = 0.5 * (minX + maxX),\n centerY = 0.5 * (minY + maxY);\n\n // construct the barnesHutTree\n const barnesHutTree = {\n root: {\n centerOfMass: {\n x: 0,\n y: 0\n },\n mass: 0,\n range: {\n minX: centerX - halfRootSize,\n maxX: centerX + halfRootSize,\n minY: centerY - halfRootSize,\n maxY: centerY + halfRootSize\n },\n size: rootSize,\n calcSize: 1 / rootSize,\n children: {\n data: null\n },\n maxWidth: 0,\n level: 0,\n childrenCount: 4\n }\n };\n this._splitBranch(barnesHutTree.root);\n\n // place the nodes one by one recursively\n for (let i = 0; i < nodeCount; i++) {\n node = nodes[nodeIndices[i]];\n if (node.options.mass > 0) {\n this._placeInTree(barnesHutTree.root, node);\n }\n }\n\n // make global\n return barnesHutTree;\n }\n\n /**\n * this updates the mass of a branch. this is increased by adding a node.\n * @param {object} parentBranch\n * @param {Node} node\n * @private\n */\n _updateBranchMass(parentBranch, node) {\n const centerOfMass = parentBranch.centerOfMass;\n const totalMass = parentBranch.mass + node.options.mass;\n const totalMassInv = 1 / totalMass;\n centerOfMass.x = centerOfMass.x * parentBranch.mass + node.x * node.options.mass;\n centerOfMass.x *= totalMassInv;\n centerOfMass.y = centerOfMass.y * parentBranch.mass + node.y * node.options.mass;\n centerOfMass.y *= totalMassInv;\n parentBranch.mass = totalMass;\n const biggestSize = Math.max(Math.max(node.height, node.radius), node.width);\n parentBranch.maxWidth = parentBranch.maxWidth < biggestSize ? biggestSize : parentBranch.maxWidth;\n }\n\n /**\n * determine in which branch the node will be placed.\n * @param {object} parentBranch\n * @param {Node} node\n * @param {boolean} skipMassUpdate\n * @private\n */\n _placeInTree(parentBranch, node, skipMassUpdate) {\n if (skipMassUpdate != true || skipMassUpdate === undefined) {\n // update the mass of the branch.\n this._updateBranchMass(parentBranch, node);\n }\n const range = parentBranch.children.NW.range;\n let region;\n if (range.maxX > node.x) {\n // in NW or SW\n if (range.maxY > node.y) {\n region = \"NW\";\n } else {\n region = \"SW\";\n }\n } else {\n // in NE or SE\n if (range.maxY > node.y) {\n region = \"NE\";\n } else {\n region = \"SE\";\n }\n }\n this._placeInRegion(parentBranch, node, region);\n }\n\n /**\n * actually place the node in a region (or branch)\n * @param {object} parentBranch\n * @param {Node} node\n * @param {'NW'| 'NE' | 'SW' | 'SE'} region\n * @private\n */\n _placeInRegion(parentBranch, node, region) {\n const children = parentBranch.children[region];\n switch (children.childrenCount) {\n case 0:\n // place node here\n children.children.data = node;\n children.childrenCount = 1;\n this._updateBranchMass(children, node);\n break;\n case 1:\n // convert into children\n // if there are two nodes exactly overlapping (on init, on opening of cluster etc.)\n // we move one node a little bit and we do not put it in the tree.\n if (children.children.data.x === node.x && children.children.data.y === node.y) {\n node.x += this._rng();\n node.y += this._rng();\n } else {\n this._splitBranch(children);\n this._placeInTree(children, node);\n }\n break;\n case 4:\n // place in branch\n this._placeInTree(children, node);\n break;\n }\n }\n\n /**\n * this function splits a branch into 4 sub branches. If the branch contained a node, we place it in the subbranch\n * after the split is complete.\n * @param {object} parentBranch\n * @private\n */\n _splitBranch(parentBranch) {\n // if the branch is shaded with a node, replace the node in the new subset.\n let containedNode = null;\n if (parentBranch.childrenCount === 1) {\n containedNode = parentBranch.children.data;\n parentBranch.mass = 0;\n parentBranch.centerOfMass.x = 0;\n parentBranch.centerOfMass.y = 0;\n }\n parentBranch.childrenCount = 4;\n parentBranch.children.data = null;\n this._insertRegion(parentBranch, \"NW\");\n this._insertRegion(parentBranch, \"NE\");\n this._insertRegion(parentBranch, \"SW\");\n this._insertRegion(parentBranch, \"SE\");\n if (containedNode != null) {\n this._placeInTree(parentBranch, containedNode);\n }\n }\n\n /**\n * This function subdivides the region into four new segments.\n * Specifically, this inserts a single new segment.\n * It fills the children section of the parentBranch\n * @param {object} parentBranch\n * @param {'NW'| 'NE' | 'SW' | 'SE'} region\n * @private\n */\n _insertRegion(parentBranch, region) {\n let minX, maxX, minY, maxY;\n const childSize = 0.5 * parentBranch.size;\n switch (region) {\n case \"NW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n case \"NE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n case \"SW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n case \"SE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n }\n parentBranch.children[region] = {\n centerOfMass: {\n x: 0,\n y: 0\n },\n mass: 0,\n range: {\n minX: minX,\n maxX: maxX,\n minY: minY,\n maxY: maxY\n },\n size: 0.5 * parentBranch.size,\n calcSize: 2 * parentBranch.calcSize,\n children: {\n data: null\n },\n maxWidth: 0,\n level: parentBranch.level + 1,\n childrenCount: 0\n };\n }\n\n //--------------------------- DEBUGGING BELOW ---------------------------//\n\n /**\n * This function is for debugging purposed, it draws the tree.\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} color\n * @private\n */\n _debug(ctx, color) {\n if (this.barnesHutTree !== undefined) {\n ctx.lineWidth = 1;\n this._drawBranch(this.barnesHutTree.root, ctx, color);\n }\n }\n\n /**\n * This function is for debugging purposes. It draws the branches recursively.\n * @param {object} branch\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} color\n * @private\n */\n _drawBranch(branch, ctx, color) {\n if (color === undefined) {\n color = \"#FF0000\";\n }\n if (branch.childrenCount === 4) {\n this._drawBranch(branch.children.NW, ctx);\n this._drawBranch(branch.children.NE, ctx);\n this._drawBranch(branch.children.SE, ctx);\n this._drawBranch(branch.children.SW, ctx);\n }\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.minY);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.maxY);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.maxY);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.minY);\n ctx.stroke();\n\n /*\n if (branch.mass > 0) {\n ctx.circle(branch.centerOfMass.x, branch.centerOfMass.y, 3*branch.mass);\n ctx.stroke();\n }\n */\n }\n}\n\n/**\n * Repulsion Solver\n */\nclass RepulsionSolver {\n /**\n * @param {object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {object} options\n */\n constructor(body, physicsBody, options) {\n this._rng = Alea(\"REPULSION SOLVER\");\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n * @private\n */\n solve() {\n let dx, dy, distance, fx, fy, repulsingForce, node1, node2;\n const nodes = this.body.nodes;\n const nodeIndices = this.physicsBody.physicsNodeIndices;\n const forces = this.physicsBody.forces;\n\n // repulsing forces between nodes\n const nodeDistance = this.options.nodeDistance;\n\n // approximation constants\n const a = -2 / 3 / nodeDistance;\n const b = 4 / 3;\n\n // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n for (let i = 0; i < nodeIndices.length - 1; i++) {\n node1 = nodes[nodeIndices[i]];\n for (let j = i + 1; j < nodeIndices.length; j++) {\n node2 = nodes[nodeIndices[j]];\n dx = node2.x - node1.x;\n dy = node2.y - node1.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n // same condition as BarnesHutSolver, making sure nodes are never 100% overlapping.\n if (distance === 0) {\n distance = 0.1 * this._rng();\n dx = distance;\n }\n if (distance < 2 * nodeDistance) {\n if (distance < 0.5 * nodeDistance) {\n repulsingForce = 1.0;\n } else {\n repulsingForce = a * distance + b; // linear approx of 1 / (1 + Math.exp((distance / nodeDistance - 1) * steepness))\n }\n repulsingForce = repulsingForce / distance;\n fx = dx * repulsingForce;\n fy = dy * repulsingForce;\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n}\n\n/**\n * Hierarchical Repulsion Solver\n */\nclass HierarchicalRepulsionSolver {\n /**\n * @param {object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {object} options\n */\n setOptions(options) {\n this.options = options;\n this.overlapAvoidanceFactor = Math.max(0, Math.min(1, this.options.avoidOverlap || 0));\n }\n\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n * @private\n */\n solve() {\n const nodes = this.body.nodes;\n const nodeIndices = this.physicsBody.physicsNodeIndices;\n const forces = this.physicsBody.forces;\n\n // repulsing forces between nodes\n const nodeDistance = this.options.nodeDistance;\n\n // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n for (let i = 0; i < nodeIndices.length - 1; i++) {\n const node1 = nodes[nodeIndices[i]];\n for (let j = i + 1; j < nodeIndices.length; j++) {\n const node2 = nodes[nodeIndices[j]];\n\n // nodes only affect nodes on their level\n if (node1.level === node2.level) {\n const theseNodesDistance = nodeDistance + this.overlapAvoidanceFactor * ((node1.shape.radius || 0) / 2 + (node2.shape.radius || 0) / 2);\n const dx = node2.x - node1.x;\n const dy = node2.y - node1.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n const steepness = 0.05;\n let repulsingForce;\n if (distance < theseNodesDistance) {\n repulsingForce = -Math.pow(steepness * distance, 2) + Math.pow(steepness * theseNodesDistance, 2);\n } else {\n repulsingForce = 0;\n }\n // normalize force with\n if (distance !== 0) {\n repulsingForce = repulsingForce / distance;\n }\n const fx = dx * repulsingForce;\n const fy = dy * repulsingForce;\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n}\n\n/**\n * Spring Solver\n */\nclass SpringSolver {\n /**\n * @param {object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n * @private\n */\n solve() {\n let edgeLength, edge;\n const edgeIndices = this.physicsBody.physicsEdgeIndices;\n const edges = this.body.edges;\n let node1, node2, node3;\n\n // forces caused by the edges, modelled as springs\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true && edge.toId !== edge.fromId) {\n // only calculate forces if nodes are in the same sector\n if (this.body.nodes[edge.toId] !== undefined && this.body.nodes[edge.fromId] !== undefined) {\n if (edge.edgeType.via !== undefined) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n node1 = edge.to;\n node2 = edge.edgeType.via;\n node3 = edge.from;\n this._calculateSpringForce(node1, node2, 0.5 * edgeLength);\n this._calculateSpringForce(node2, node3, 0.5 * edgeLength);\n } else {\n // the * 1.5 is here so the edge looks as large as a smooth edge. It does not initially because the smooth edges use\n // the support nodes which exert a repulsive force on the to and from nodes, making the edge appear larger.\n edgeLength = edge.options.length === undefined ? this.options.springLength * 1.5 : edge.options.length;\n this._calculateSpringForce(edge.from, edge.to, edgeLength);\n }\n }\n }\n }\n }\n\n /**\n * This is the code actually performing the calculation for the function above.\n * @param {Node} node1\n * @param {Node} node2\n * @param {number} edgeLength\n * @private\n */\n _calculateSpringForce(node1, node2, edgeLength) {\n const dx = node1.x - node2.x;\n const dy = node1.y - node2.y;\n const distance = Math.max(Math.sqrt(dx * dx + dy * dy), 0.01);\n\n // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n const springForce = this.options.springConstant * (edgeLength - distance) / distance;\n const fx = dx * springForce;\n const fy = dy * springForce;\n\n // handle the case where one node is not part of the physcis\n if (this.physicsBody.forces[node1.id] !== undefined) {\n this.physicsBody.forces[node1.id].x += fx;\n this.physicsBody.forces[node1.id].y += fy;\n }\n if (this.physicsBody.forces[node2.id] !== undefined) {\n this.physicsBody.forces[node2.id].x -= fx;\n this.physicsBody.forces[node2.id].y -= fy;\n }\n }\n}\n\n/**\n * Hierarchical Spring Solver\n */\nclass HierarchicalSpringSolver {\n /**\n * @param {object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n * @private\n */\n solve() {\n let edgeLength, edge;\n let dx, dy, fx, fy, springForce, distance;\n const edges = this.body.edges;\n const factor = 0.5;\n const edgeIndices = this.physicsBody.physicsEdgeIndices;\n const nodeIndices = this.physicsBody.physicsNodeIndices;\n const forces = this.physicsBody.forces;\n\n // initialize the spring force counters\n for (let i = 0; i < nodeIndices.length; i++) {\n const nodeId = nodeIndices[i];\n forces[nodeId].springFx = 0;\n forces[nodeId].springFy = 0;\n }\n\n // forces caused by the edges, modelled as springs\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n dx = edge.from.x - edge.to.x;\n dy = edge.from.y - edge.to.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n distance = distance === 0 ? 0.01 : distance;\n\n // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n springForce = this.options.springConstant * (edgeLength - distance) / distance;\n fx = dx * springForce;\n fy = dy * springForce;\n if (edge.to.level != edge.from.level) {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].springFx -= fx;\n forces[edge.toId].springFy -= fy;\n }\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].springFx += fx;\n forces[edge.fromId].springFy += fy;\n }\n } else {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].x -= factor * fx;\n forces[edge.toId].y -= factor * fy;\n }\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].x += factor * fx;\n forces[edge.fromId].y += factor * fy;\n }\n }\n }\n }\n\n // normalize spring forces\n springForce = 1;\n let springFx, springFy;\n for (let i = 0; i < nodeIndices.length; i++) {\n const nodeId = nodeIndices[i];\n springFx = Math.min(springForce, Math.max(-springForce, forces[nodeId].springFx));\n springFy = Math.min(springForce, Math.max(-springForce, forces[nodeId].springFy));\n forces[nodeId].x += springFx;\n forces[nodeId].y += springFy;\n }\n\n // retain energy balance\n let totalFx = 0;\n let totalFy = 0;\n for (let i = 0; i < nodeIndices.length; i++) {\n const nodeId = nodeIndices[i];\n totalFx += forces[nodeId].x;\n totalFy += forces[nodeId].y;\n }\n const correctionFx = totalFx / nodeIndices.length;\n const correctionFy = totalFy / nodeIndices.length;\n for (let i = 0; i < nodeIndices.length; i++) {\n const nodeId = nodeIndices[i];\n forces[nodeId].x -= correctionFx;\n forces[nodeId].y -= correctionFy;\n }\n }\n}\n\n/**\n * Central Gravity Solver\n */\nclass CentralGravitySolver {\n /**\n * @param {object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculates forces for each node\n */\n solve() {\n let dx, dy, distance, node;\n const nodes = this.body.nodes;\n const nodeIndices = this.physicsBody.physicsNodeIndices;\n const forces = this.physicsBody.forces;\n for (let i = 0; i < nodeIndices.length; i++) {\n const nodeId = nodeIndices[i];\n node = nodes[nodeId];\n dx = -node.x;\n dy = -node.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n this._calculateForces(distance, dx, dy, forces, node);\n }\n }\n\n /**\n * Calculate the forces based on the distance.\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Object<Node.id, vis.Node>} forces\n * @param {Node} node\n * @private\n */\n _calculateForces(distance, dx, dy, forces, node) {\n const gravityForce = distance === 0 ? 0 : this.options.centralGravity / distance;\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n}\n\n/**\n * @augments BarnesHutSolver\n */\nclass ForceAtlas2BasedRepulsionSolver extends BarnesHutSolver {\n /**\n * @param {object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {object} options\n */\n constructor(body, physicsBody, options) {\n super(body, physicsBody, options);\n this._rng = Alea(\"FORCE ATLAS 2 BASED REPULSION SOLVER\");\n }\n\n /**\n * Calculate the forces based on the distance.\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Node} node\n * @param {object} parentBranch\n * @private\n */\n _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1 * this._rng();\n dx = distance;\n }\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius);\n }\n const degree = node.edges.length + 1;\n // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n const gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass * degree / Math.pow(distance, 2);\n const fx = dx * gravityForce;\n const fy = dy * gravityForce;\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n}\n\n/**\n * @augments CentralGravitySolver\n */\nclass ForceAtlas2BasedCentralGravitySolver extends CentralGravitySolver {\n /**\n * @param {object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {object} options\n */\n constructor(body, physicsBody, options) {\n super(body, physicsBody, options);\n }\n\n /**\n * Calculate the forces based on the distance.\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Object<Node.id, Node>} forces\n * @param {Node} node\n * @private\n */\n _calculateForces(distance, dx, dy, forces, node) {\n if (distance > 0) {\n const degree = node.edges.length + 1;\n const gravityForce = this.options.centralGravity * degree * node.options.mass;\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n }\n}\n\n/**\n * The physics engine\n */\nclass PhysicsEngine {\n /**\n * @param {object} body\n */\n constructor(body) {\n this.body = body;\n this.physicsBody = {\n physicsNodeIndices: [],\n physicsEdgeIndices: [],\n forces: {},\n velocities: {}\n };\n this.physicsEnabled = true;\n this.simulationInterval = 1000 / 60;\n this.requiresTimeout = true;\n this.previousStates = {};\n this.referenceState = {};\n this.freezeCache = {};\n this.renderTimer = undefined;\n\n // parameters for the adaptive timestep\n this.adaptiveTimestep = false;\n this.adaptiveTimestepEnabled = false;\n this.adaptiveCounter = 0;\n this.adaptiveInterval = 3;\n this.stabilized = false;\n this.startedStabilization = false;\n this.stabilizationIterations = 0;\n this.ready = false; // will be set to true if the stabilize\n\n // default options\n this.options = {};\n this.defaultOptions = {\n enabled: true,\n barnesHut: {\n theta: 0.5,\n gravitationalConstant: -2e3,\n centralGravity: 0.3,\n springLength: 95,\n springConstant: 0.04,\n damping: 0.09,\n avoidOverlap: 0\n },\n forceAtlas2Based: {\n theta: 0.5,\n gravitationalConstant: -50,\n centralGravity: 0.01,\n springConstant: 0.08,\n springLength: 100,\n damping: 0.4,\n avoidOverlap: 0\n },\n repulsion: {\n centralGravity: 0.2,\n springLength: 200,\n springConstant: 0.05,\n nodeDistance: 100,\n damping: 0.09,\n avoidOverlap: 0\n },\n hierarchicalRepulsion: {\n centralGravity: 0.0,\n springLength: 100,\n springConstant: 0.01,\n nodeDistance: 120,\n damping: 0.09\n },\n maxVelocity: 50,\n minVelocity: 0.75,\n // px/s\n solver: \"barnesHut\",\n stabilization: {\n enabled: true,\n iterations: 1000,\n // maximum number of iteration to stabilize\n updateInterval: 50,\n onlyDynamicEdges: false,\n fit: true\n },\n timestep: 0.5,\n adaptiveTimestep: true,\n wind: {\n x: 0,\n y: 0\n }\n };\n _Object$assign(this.options, this.defaultOptions);\n this.timestep = 0.5;\n this.layoutFailed = false;\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on(\"initPhysics\", () => {\n this.initPhysics();\n });\n this.body.emitter.on(\"_layoutFailed\", () => {\n this.layoutFailed = true;\n });\n this.body.emitter.on(\"resetPhysics\", () => {\n this.stopSimulation();\n this.ready = false;\n });\n this.body.emitter.on(\"disablePhysics\", () => {\n this.physicsEnabled = false;\n this.stopSimulation();\n });\n this.body.emitter.on(\"restorePhysics\", () => {\n this.setOptions(this.options);\n if (this.ready === true) {\n this.startSimulation();\n }\n });\n this.body.emitter.on(\"startSimulation\", () => {\n if (this.ready === true) {\n this.startSimulation();\n }\n });\n this.body.emitter.on(\"stopSimulation\", () => {\n this.stopSimulation();\n });\n this.body.emitter.on(\"destroy\", () => {\n this.stopSimulation(false);\n this.body.emitter.off();\n });\n this.body.emitter.on(\"_dataChanged\", () => {\n // Nodes and/or edges have been added or removed, update shortcut lists.\n this.updatePhysicsData();\n });\n\n // debug: show forces\n // this.body.emitter.on(\"afterDrawing\", (ctx) => {this._drawForces(ctx);});\n }\n\n /**\n * set the physics options\n * @param {object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n if (options === false) {\n this.options.enabled = false;\n this.physicsEnabled = false;\n this.stopSimulation();\n } else if (options === true) {\n this.options.enabled = true;\n this.physicsEnabled = true;\n this.startSimulation();\n } else {\n this.physicsEnabled = true;\n selectiveNotDeepExtend([\"stabilization\"], this.options, options);\n mergeOptions(this.options, options, \"stabilization\");\n if (options.enabled === undefined) {\n this.options.enabled = true;\n }\n if (this.options.enabled === false) {\n this.physicsEnabled = false;\n this.stopSimulation();\n }\n const wind = this.options.wind;\n if (wind) {\n if (typeof wind.x !== \"number\" || _Number$isNaN(wind.x)) {\n wind.x = 0;\n }\n if (typeof wind.y !== \"number\" || _Number$isNaN(wind.y)) {\n wind.y = 0;\n }\n }\n\n // set the timestep\n this.timestep = this.options.timestep;\n }\n }\n this.init();\n }\n\n /**\n * configure the engine.\n */\n init() {\n let options;\n if (this.options.solver === \"forceAtlas2Based\") {\n options = this.options.forceAtlas2Based;\n this.nodesSolver = new ForceAtlas2BasedRepulsionSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new ForceAtlas2BasedCentralGravitySolver(this.body, this.physicsBody, options);\n } else if (this.options.solver === \"repulsion\") {\n options = this.options.repulsion;\n this.nodesSolver = new RepulsionSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n } else if (this.options.solver === \"hierarchicalRepulsion\") {\n options = this.options.hierarchicalRepulsion;\n this.nodesSolver = new HierarchicalRepulsionSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new HierarchicalSpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n } else {\n // barnesHut\n options = this.options.barnesHut;\n this.nodesSolver = new BarnesHutSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n this.modelOptions = options;\n }\n\n /**\n * initialize the engine\n */\n initPhysics() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n if (this.options.stabilization.enabled === true) {\n this.stabilize();\n } else {\n this.stabilized = false;\n this.ready = true;\n this.body.emitter.emit(\"fit\", {}, this.layoutFailed); // if the layout failed, we use the approximation for the zoom\n this.startSimulation();\n }\n } else {\n this.ready = true;\n this.body.emitter.emit(\"fit\");\n }\n }\n\n /**\n * Start the simulation\n */\n startSimulation() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n this.stabilized = false;\n\n // when visible, adaptivity is disabled.\n this.adaptiveTimestep = false;\n\n // this sets the width of all nodes initially which could be required for the avoidOverlap\n this.body.emitter.emit(\"_resizeNodes\");\n if (this.viewFunction === undefined) {\n var _context;\n this.viewFunction = _bindInstanceProperty(_context = this.simulationStep).call(_context, this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n this.body.emitter.emit(\"_startRendering\");\n }\n } else {\n this.body.emitter.emit(\"_redraw\");\n }\n }\n\n /**\n * Stop the simulation, force stabilization.\n * @param {boolean} [emit]\n */\n stopSimulation() {\n let emit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n this.stabilized = true;\n if (emit === true) {\n this._emitStabilized();\n }\n if (this.viewFunction !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.viewFunction = undefined;\n if (emit === true) {\n this.body.emitter.emit(\"_stopRendering\");\n }\n }\n }\n\n /**\n * The viewFunction inserts this step into each render loop. It calls the physics tick and handles the cleanup at stabilized.\n *\n */\n simulationStep() {\n // check if the physics have settled\n const startTime = _Date$now();\n this.physicsTick();\n const physicsTime = _Date$now() - startTime;\n\n // run double speed if it is a little graph\n if ((physicsTime < 0.4 * this.simulationInterval || this.runDoubleSpeed === true) && this.stabilized === false) {\n this.physicsTick();\n\n // this makes sure there is no jitter. The decision is taken once to run it at double speed.\n this.runDoubleSpeed = true;\n }\n if (this.stabilized === true) {\n this.stopSimulation();\n }\n }\n\n /**\n * trigger the stabilized event.\n * @param {number} [amountOfIterations]\n * @private\n */\n _emitStabilized() {\n let amountOfIterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.stabilizationIterations;\n if (this.stabilizationIterations > 1 || this.startedStabilization === true) {\n _setTimeout(() => {\n this.body.emitter.emit(\"stabilized\", {\n iterations: amountOfIterations\n });\n this.startedStabilization = false;\n this.stabilizationIterations = 0;\n }, 0);\n }\n }\n\n /**\n * Calculate the forces for one physics iteration and move the nodes.\n * @private\n */\n physicsStep() {\n this.gravitySolver.solve();\n this.nodesSolver.solve();\n this.edgesSolver.solve();\n this.moveNodes();\n }\n\n /**\n * Make dynamic adjustments to the timestep, based on current state.\n *\n * Helper function for physicsTick().\n * @private\n */\n adjustTimeStep() {\n const factor = 1.2; // Factor for increasing the timestep on success.\n\n // we compare the two steps. if it is acceptable we double the step.\n if (this._evaluateStepQuality() === true) {\n this.timestep = factor * this.timestep;\n } else {\n // if not, we decrease the step to a minimum of the options timestep.\n // if the decreased timestep is smaller than the options step, we do not reset the counter\n // we assume that the options timestep is stable enough.\n if (this.timestep / factor < this.options.timestep) {\n this.timestep = this.options.timestep;\n } else {\n // if the timestep was larger than 2 times the option one we check the adaptivity again to ensure\n // that large instabilities do not form.\n this.adaptiveCounter = -1; // check again next iteration\n this.timestep = Math.max(this.options.timestep, this.timestep / factor);\n }\n }\n }\n\n /**\n * A single simulation step (or 'tick') in the physics simulation\n * @private\n */\n physicsTick() {\n this._startStabilizing(); // this ensures that there is no start event when the network is already stable.\n if (this.stabilized === true) return;\n\n // adaptivity means the timestep adapts to the situation, only applicable for stabilization\n if (this.adaptiveTimestep === true && this.adaptiveTimestepEnabled === true) {\n // timestep remains stable for \"interval\" iterations.\n const doAdaptive = this.adaptiveCounter % this.adaptiveInterval === 0;\n if (doAdaptive) {\n // first the big step and revert.\n this.timestep = 2 * this.timestep;\n this.physicsStep();\n this.revert(); // saves the reference state\n\n // now the normal step. Since this is the last step, it is the more stable one and we will take this.\n this.timestep = 0.5 * this.timestep;\n\n // since it's half the step, we do it twice.\n this.physicsStep();\n this.physicsStep();\n this.adjustTimeStep();\n } else {\n this.physicsStep(); // normal step, keeping timestep constant\n }\n this.adaptiveCounter += 1;\n } else {\n // case for the static timestep, we reset it to the one in options and take a normal step.\n this.timestep = this.options.timestep;\n this.physicsStep();\n }\n if (this.stabilized === true) this.revert();\n this.stabilizationIterations++;\n }\n\n /**\n * Nodes and edges can have the physics toggles on or off. A collection of indices is created here so we can skip the check all the time.\n * @private\n */\n updatePhysicsData() {\n this.physicsBody.forces = {};\n this.physicsBody.physicsNodeIndices = [];\n this.physicsBody.physicsEdgeIndices = [];\n const nodes = this.body.nodes;\n const edges = this.body.edges;\n\n // get node indices for physics\n for (const nodeId in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, nodeId)) {\n if (nodes[nodeId].options.physics === true) {\n this.physicsBody.physicsNodeIndices.push(nodes[nodeId].id);\n }\n }\n }\n\n // get edge indices for physics\n for (const edgeId in edges) {\n if (Object.prototype.hasOwnProperty.call(edges, edgeId)) {\n if (edges[edgeId].options.physics === true) {\n this.physicsBody.physicsEdgeIndices.push(edges[edgeId].id);\n }\n }\n }\n\n // get the velocity and the forces vector\n for (let i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n const nodeId = this.physicsBody.physicsNodeIndices[i];\n this.physicsBody.forces[nodeId] = {\n x: 0,\n y: 0\n };\n\n // forces can be reset because they are recalculated. Velocities have to persist.\n if (this.physicsBody.velocities[nodeId] === undefined) {\n this.physicsBody.velocities[nodeId] = {\n x: 0,\n y: 0\n };\n }\n }\n\n // clean deleted nodes from the velocity vector\n for (const nodeId in this.physicsBody.velocities) {\n if (nodes[nodeId] === undefined) {\n delete this.physicsBody.velocities[nodeId];\n }\n }\n }\n\n /**\n * Revert the simulation one step. This is done so after stabilization, every new start of the simulation will also say stabilized.\n */\n revert() {\n const nodeIds = _Object$keys(this.previousStates);\n const nodes = this.body.nodes;\n const velocities = this.physicsBody.velocities;\n this.referenceState = {};\n for (let i = 0; i < nodeIds.length; i++) {\n const nodeId = nodeIds[i];\n if (nodes[nodeId] !== undefined) {\n if (nodes[nodeId].options.physics === true) {\n this.referenceState[nodeId] = {\n positions: {\n x: nodes[nodeId].x,\n y: nodes[nodeId].y\n }\n };\n velocities[nodeId].x = this.previousStates[nodeId].vx;\n velocities[nodeId].y = this.previousStates[nodeId].vy;\n nodes[nodeId].x = this.previousStates[nodeId].x;\n nodes[nodeId].y = this.previousStates[nodeId].y;\n }\n } else {\n delete this.previousStates[nodeId];\n }\n }\n }\n\n /**\n * This compares the reference state to the current state\n * @returns {boolean}\n * @private\n */\n _evaluateStepQuality() {\n let dx, dy, dpos;\n const nodes = this.body.nodes;\n const reference = this.referenceState;\n const posThreshold = 0.3;\n for (const nodeId in this.referenceState) {\n if (Object.prototype.hasOwnProperty.call(this.referenceState, nodeId) && nodes[nodeId] !== undefined) {\n dx = nodes[nodeId].x - reference[nodeId].positions.x;\n dy = nodes[nodeId].y - reference[nodeId].positions.y;\n dpos = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n if (dpos > posThreshold) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * move the nodes one timestep and check if they are stabilized\n */\n moveNodes() {\n const nodeIndices = this.physicsBody.physicsNodeIndices;\n let maxNodeVelocity = 0;\n let averageNodeVelocity = 0;\n\n // the velocity threshold (energy in the system) for the adaptivity toggle\n const velocityAdaptiveThreshold = 5;\n for (let i = 0; i < nodeIndices.length; i++) {\n const nodeId = nodeIndices[i];\n const nodeVelocity = this._performStep(nodeId);\n // stabilized is true if stabilized is true and velocity is smaller than vmin --> all nodes must be stabilized\n maxNodeVelocity = Math.max(maxNodeVelocity, nodeVelocity);\n averageNodeVelocity += nodeVelocity;\n }\n\n // evaluating the stabilized and adaptiveTimestepEnabled conditions\n this.adaptiveTimestepEnabled = averageNodeVelocity / nodeIndices.length < velocityAdaptiveThreshold;\n this.stabilized = maxNodeVelocity < this.options.minVelocity;\n }\n\n /**\n * Calculate new velocity for a coordinate direction\n * @param {number} v velocity for current coordinate\n * @param {number} f regular force for current coordinate\n * @param {number} m mass of current node\n * @returns {number} new velocity for current coordinate\n * @private\n */\n calculateComponentVelocity(v, f, m) {\n const df = this.modelOptions.damping * v; // damping force\n const a = (f - df) / m; // acceleration\n\n v += a * this.timestep;\n\n // Put a limit on the velocities if it is really high\n const maxV = this.options.maxVelocity || 1e9;\n if (Math.abs(v) > maxV) {\n v = v > 0 ? maxV : -maxV;\n }\n return v;\n }\n\n /**\n * Perform the actual step\n * @param {Node.id} nodeId\n * @returns {number} the new velocity of given node\n * @private\n */\n _performStep(nodeId) {\n const node = this.body.nodes[nodeId];\n const force = this.physicsBody.forces[nodeId];\n if (this.options.wind) {\n force.x += this.options.wind.x;\n force.y += this.options.wind.y;\n }\n const velocity = this.physicsBody.velocities[nodeId];\n\n // store the state so we can revert\n this.previousStates[nodeId] = {\n x: node.x,\n y: node.y,\n vx: velocity.x,\n vy: velocity.y\n };\n if (node.options.fixed.x === false) {\n velocity.x = this.calculateComponentVelocity(velocity.x, force.x, node.options.mass);\n node.x += velocity.x * this.timestep;\n } else {\n force.x = 0;\n velocity.x = 0;\n }\n if (node.options.fixed.y === false) {\n velocity.y = this.calculateComponentVelocity(velocity.y, force.y, node.options.mass);\n node.y += velocity.y * this.timestep;\n } else {\n force.y = 0;\n velocity.y = 0;\n }\n const totalVelocity = Math.sqrt(Math.pow(velocity.x, 2) + Math.pow(velocity.y, 2));\n return totalVelocity;\n }\n\n /**\n * When initializing and stabilizing, we can freeze nodes with a predefined position.\n * This greatly speeds up stabilization because only the supportnodes for the smoothCurves have to settle.\n * @private\n */\n _freezeNodes() {\n const nodes = this.body.nodes;\n for (const id in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, id)) {\n if (nodes[id].x && nodes[id].y) {\n const fixed = nodes[id].options.fixed;\n this.freezeCache[id] = {\n x: fixed.x,\n y: fixed.y\n };\n fixed.x = true;\n fixed.y = true;\n }\n }\n }\n }\n\n /**\n * Unfreezes the nodes that have been frozen by _freezeDefinedNodes.\n * @private\n */\n _restoreFrozenNodes() {\n const nodes = this.body.nodes;\n for (const id in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, id)) {\n if (this.freezeCache[id] !== undefined) {\n nodes[id].options.fixed.x = this.freezeCache[id].x;\n nodes[id].options.fixed.y = this.freezeCache[id].y;\n }\n }\n }\n this.freezeCache = {};\n }\n\n /**\n * Find a stable position for all nodes\n * @param {number} [iterations]\n */\n stabilize() {\n let iterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.stabilization.iterations;\n if (typeof iterations !== \"number\") {\n iterations = this.options.stabilization.iterations;\n console.error(\"The stabilize method needs a numeric amount of iterations. Switching to default: \", iterations);\n }\n if (this.physicsBody.physicsNodeIndices.length === 0) {\n this.ready = true;\n return;\n }\n\n // enable adaptive timesteps\n this.adaptiveTimestep = this.options.adaptiveTimestep;\n\n // this sets the width of all nodes initially which could be required for the avoidOverlap\n this.body.emitter.emit(\"_resizeNodes\");\n this.stopSimulation(); // stop the render loop\n this.stabilized = false;\n\n // block redraw requests\n this.body.emitter.emit(\"_blockRedraw\");\n this.targetIterations = iterations;\n\n // start the stabilization\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._freezeNodes();\n }\n this.stabilizationIterations = 0;\n _setTimeout(() => this._stabilizationBatch(), 0);\n }\n\n /**\n * If not already stabilizing, start it and emit a start event.\n * @returns {boolean} true if stabilization started with this call\n * @private\n */\n _startStabilizing() {\n if (this.startedStabilization === true) return false;\n this.body.emitter.emit(\"startStabilizing\");\n this.startedStabilization = true;\n return true;\n }\n\n /**\n * One batch of stabilization\n * @private\n */\n _stabilizationBatch() {\n const running = () => this.stabilized === false && this.stabilizationIterations < this.targetIterations;\n const sendProgress = () => {\n this.body.emitter.emit(\"stabilizationProgress\", {\n iterations: this.stabilizationIterations,\n total: this.targetIterations\n });\n };\n if (this._startStabilizing()) {\n sendProgress(); // Ensure that there is at least one start event.\n }\n let count = 0;\n while (running() && count < this.options.stabilization.updateInterval) {\n this.physicsTick();\n count++;\n }\n sendProgress();\n if (running()) {\n var _context2;\n _setTimeout(_bindInstanceProperty(_context2 = this._stabilizationBatch).call(_context2, this), 0);\n } else {\n this._finalizeStabilization();\n }\n }\n\n /**\n * Wrap up the stabilization, fit and emit the events.\n * @private\n */\n _finalizeStabilization() {\n this.body.emitter.emit(\"_allowRedraw\");\n if (this.options.stabilization.fit === true) {\n this.body.emitter.emit(\"fit\");\n }\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._restoreFrozenNodes();\n }\n this.body.emitter.emit(\"stabilizationIterationsDone\");\n this.body.emitter.emit(\"_requestRedraw\");\n if (this.stabilized === true) {\n this._emitStabilized();\n } else {\n this.startSimulation();\n }\n this.ready = true;\n }\n\n //--------------------------- DEBUGGING BELOW ---------------------------//\n\n /**\n * Debug function that display arrows for the forces currently active in the network.\n *\n * Use this when debugging only.\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n _drawForces(ctx) {\n for (let i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n const index = this.physicsBody.physicsNodeIndices[i];\n const node = this.body.nodes[index];\n const force = this.physicsBody.forces[index];\n const factor = 20;\n const colorFactor = 0.03;\n const forceSize = Math.sqrt(Math.pow(force.x, 2) + Math.pow(force.x, 2));\n const size = Math.min(Math.max(5, forceSize), 15);\n const arrowSize = 3 * size;\n const color = HSVToHex((180 - Math.min(1, Math.max(0, colorFactor * forceSize)) * 180) / 360, 1, 1);\n const point = {\n x: node.x + factor * force.x,\n y: node.y + factor * force.y\n };\n ctx.lineWidth = size;\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(node.x, node.y);\n ctx.lineTo(point.x, point.y);\n ctx.stroke();\n const angle = Math.atan2(force.y, force.x);\n ctx.fillStyle = color;\n EndPoints.draw(ctx, {\n type: \"arrow\",\n point: point,\n angle: angle,\n length: arrowSize\n });\n _fillInstanceProperty(ctx).call(ctx);\n }\n }\n}\n\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nfunction unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\n\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nfunction rng() {\n if (!getRandomValues) {\n if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n}\n\nconst randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nvar native = { randomUUID };\n\nfunction _v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n return unsafeStringify(rnds);\n}\nfunction v4(options, buf, offset) {\n if (native.randomUUID && true && !options) {\n return native.randomUUID();\n }\n return _v4(options);\n}\n\n/**\n * Utility Class\n */\nclass NetworkUtil {\n /**\n * @ignore\n */\n constructor() {}\n\n /**\n * Find the center position of the network considering the bounding boxes\n * @param {Array.<Node>} allNodes\n * @param {Array.<Node>} [specificNodes]\n * @returns {{minX: number, maxX: number, minY: number, maxY: number}}\n * @static\n */\n static getRange(allNodes) {\n let specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n let minY = 1e9,\n maxY = -1e9,\n minX = 1e9,\n maxX = -1e9,\n node;\n if (specificNodes.length > 0) {\n for (let i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n if (minX > node.shape.boundingBox.left) {\n minX = node.shape.boundingBox.left;\n }\n if (maxX < node.shape.boundingBox.right) {\n maxX = node.shape.boundingBox.right;\n }\n if (minY > node.shape.boundingBox.top) {\n minY = node.shape.boundingBox.top;\n } // top is negative, bottom is positive\n if (maxY < node.shape.boundingBox.bottom) {\n maxY = node.shape.boundingBox.bottom;\n } // top is negative, bottom is positive\n }\n }\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n return {\n minX: minX,\n maxX: maxX,\n minY: minY,\n maxY: maxY\n };\n }\n\n /**\n * Find the center position of the network\n * @param {Array.<Node>} allNodes\n * @param {Array.<Node>} [specificNodes]\n * @returns {{minX: number, maxX: number, minY: number, maxY: number}}\n * @static\n */\n static getRangeCore(allNodes) {\n let specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n let minY = 1e9,\n maxY = -1e9,\n minX = 1e9,\n maxX = -1e9,\n node;\n if (specificNodes.length > 0) {\n for (let i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n if (minX > node.x) {\n minX = node.x;\n }\n if (maxX < node.x) {\n maxX = node.x;\n }\n if (minY > node.y) {\n minY = node.y;\n } // top is negative, bottom is positive\n if (maxY < node.y) {\n maxY = node.y;\n } // top is negative, bottom is positive\n }\n }\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n return {\n minX: minX,\n maxX: maxX,\n minY: minY,\n maxY: maxY\n };\n }\n\n /**\n * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n * @returns {{x: number, y: number}}\n * @static\n */\n static findCenter(range) {\n return {\n x: 0.5 * (range.maxX + range.minX),\n y: 0.5 * (range.maxY + range.minY)\n };\n }\n\n /**\n * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes.\n * @param {vis.Item} item\n * @param {'node'|undefined} type\n * @returns {{}}\n * @static\n */\n static cloneOptions(item, type) {\n const clonedOptions = {};\n if (type === undefined || type === \"node\") {\n deepExtend(clonedOptions, item.options, true);\n clonedOptions.x = item.x;\n clonedOptions.y = item.y;\n clonedOptions.amountOfConnections = item.edges.length;\n } else {\n deepExtend(clonedOptions, item.options, true);\n }\n return clonedOptions;\n }\n}\n\n/**\n * A Cluster is a special Node that allows a group of Nodes positioned closely together\n * to be represented by a single Cluster Node.\n * @augments Node\n */\nclass Cluster extends Node {\n /**\n * @param {object} options\n * @param {object} body\n * @param {Array.<HTMLImageElement>}imagelist\n * @param {Array} grouplist\n * @param {object} globalOptions\n * @param {object} defaultOptions Global default options for nodes\n */\n constructor(options, body, imagelist, grouplist, globalOptions, defaultOptions) {\n super(options, body, imagelist, grouplist, globalOptions, defaultOptions);\n this.isCluster = true;\n this.containedNodes = {};\n this.containedEdges = {};\n }\n\n /**\n * Transfer child cluster data to current and disconnect the child cluster.\n *\n * Please consult the header comment in 'Clustering.js' for the fields set here.\n * @param {string|number} childClusterId id of child cluster to open\n */\n _openChildCluster(childClusterId) {\n const childCluster = this.body.nodes[childClusterId];\n if (this.containedNodes[childClusterId] === undefined) {\n throw new Error(\"node with id: \" + childClusterId + \" not in current cluster\");\n }\n if (!childCluster.isCluster) {\n throw new Error(\"node with id: \" + childClusterId + \" is not a cluster\");\n }\n\n // Disconnect child cluster from current cluster\n delete this.containedNodes[childClusterId];\n forEach(childCluster.edges, edge => {\n delete this.containedEdges[edge.id];\n });\n\n // Transfer nodes and edges\n forEach(childCluster.containedNodes, (node, nodeId) => {\n this.containedNodes[nodeId] = node;\n });\n childCluster.containedNodes = {};\n forEach(childCluster.containedEdges, (edge, edgeId) => {\n this.containedEdges[edgeId] = edge;\n });\n childCluster.containedEdges = {};\n\n // Transfer edges within cluster edges which are clustered\n forEach(childCluster.edges, clusterEdge => {\n forEach(this.edges, parentClusterEdge => {\n var _context, _context2;\n // Assumption: a clustered edge can only be present in a single clustering edge\n // Not tested here\n const index = _indexOfInstanceProperty(_context = parentClusterEdge.clusteringEdgeReplacingIds).call(_context, clusterEdge.id);\n if (index === -1) return;\n forEach(clusterEdge.clusteringEdgeReplacingIds, srcId => {\n parentClusterEdge.clusteringEdgeReplacingIds.push(srcId);\n\n // Maintain correct bookkeeping for transferred edge\n this.body.edges[srcId].edgeReplacedById = parentClusterEdge.id;\n });\n\n // Remove cluster edge from parent cluster edge\n _spliceInstanceProperty(_context2 = parentClusterEdge.clusteringEdgeReplacingIds).call(_context2, index, 1);\n });\n });\n childCluster.edges = [];\n }\n}\n\n/**\n * The clustering engine\n */\nclass ClusterEngine {\n /**\n * @param {object} body\n */\n constructor(body) {\n this.body = body;\n this.clusteredNodes = {}; // key: node id, value: { clusterId: <id of cluster>, node: <node instance>}\n this.clusteredEdges = {}; // key: edge id, value: restore information for given edge\n\n this.options = {};\n this.defaultOptions = {};\n _Object$assign(this.options, this.defaultOptions);\n this.body.emitter.on(\"_resetData\", () => {\n this.clusteredNodes = {};\n this.clusteredEdges = {};\n });\n }\n\n /**\n *\n * @param {number} hubsize\n * @param {object} options\n */\n clusterByHubsize(hubsize, options) {\n if (hubsize === undefined) {\n hubsize = this._getHubSize();\n } else if (typeof hubsize === \"object\") {\n options = this._checkOptions(hubsize);\n hubsize = this._getHubSize();\n }\n const nodesToCluster = [];\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n const node = this.body.nodes[this.body.nodeIndices[i]];\n if (node.edges.length >= hubsize) {\n nodesToCluster.push(node.id);\n }\n }\n for (let i = 0; i < nodesToCluster.length; i++) {\n this.clusterByConnection(nodesToCluster[i], options, true);\n }\n this.body.emitter.emit(\"_dataChanged\");\n }\n\n /**\n * loop over all nodes, check if they adhere to the condition and cluster if needed.\n * @param {object} options\n * @param {boolean} [refreshData]\n */\n cluster() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (options.joinCondition === undefined) {\n throw new Error(\"Cannot call clusterByNodeData without a joinCondition function in the options.\");\n }\n\n // check if the options object is fine, append if needed\n options = this._checkOptions(options);\n const childNodesObj = {};\n const childEdgesObj = {};\n\n // collect the nodes that will be in the cluster\n forEach(this.body.nodes, (node, nodeId) => {\n if (node.options && options.joinCondition(node.options) === true) {\n childNodesObj[nodeId] = node;\n\n // collect the edges that will be in the cluster\n forEach(node.edges, edge => {\n if (this.clusteredEdges[edge.id] === undefined) {\n childEdgesObj[edge.id] = edge;\n }\n });\n }\n });\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n\n /**\n * Cluster all nodes in the network that have only X edges\n * @param {number} edgeCount\n * @param {object} options\n * @param {boolean} [refreshData]\n */\n clusterByEdgeCount(edgeCount, options) {\n let refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n options = this._checkOptions(options);\n const clusters = [];\n const usedNodes = {};\n let edge, edges, relevantEdgeCount;\n // collect the nodes that will be in the cluster\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n const childNodesObj = {};\n const childEdgesObj = {};\n const nodeId = this.body.nodeIndices[i];\n const node = this.body.nodes[nodeId];\n\n // if this node is already used in another cluster this session, we do not have to re-evaluate it.\n if (usedNodes[nodeId] === undefined) {\n relevantEdgeCount = 0;\n edges = [];\n for (let j = 0; j < node.edges.length; j++) {\n edge = node.edges[j];\n if (this.clusteredEdges[edge.id] === undefined) {\n if (edge.toId !== edge.fromId) {\n relevantEdgeCount++;\n }\n edges.push(edge);\n }\n }\n\n // this node qualifies, we collect its neighbours to start the clustering process.\n if (relevantEdgeCount === edgeCount) {\n const checkJoinCondition = function (node) {\n if (options.joinCondition === undefined || options.joinCondition === null) {\n return true;\n }\n const clonedOptions = NetworkUtil.cloneOptions(node);\n return options.joinCondition(clonedOptions);\n };\n let gatheringSuccessful = true;\n for (let j = 0; j < edges.length; j++) {\n edge = edges[j];\n const childNodeId = this._getConnectedId(edge, nodeId);\n // add the nodes to the list by the join condition.\n if (checkJoinCondition(node)) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[nodeId] = node;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n usedNodes[nodeId] = true;\n } else {\n // this node does not qualify after all.\n gatheringSuccessful = false;\n break;\n }\n }\n\n // add to the cluster queue\n if (_Object$keys(childNodesObj).length > 0 && _Object$keys(childEdgesObj).length > 0 && gatheringSuccessful === true) {\n /**\n * Search for cluster data that contains any of the node id's\n * @returns {boolean} true if no joinCondition, otherwise return value of joinCondition\n */\n const findClusterData = function () {\n for (let n = 0; n < clusters.length; ++n) {\n // Search for a cluster containing any of the node id's\n for (const m in childNodesObj) {\n if (clusters[n].nodes[m] !== undefined) {\n return clusters[n];\n }\n }\n }\n return undefined;\n };\n\n // If any of the found nodes is part of a cluster found in this method,\n // add the current values to that cluster\n const foundCluster = findClusterData();\n if (foundCluster !== undefined) {\n // Add nodes to found cluster if not present\n for (const m in childNodesObj) {\n if (foundCluster.nodes[m] === undefined) {\n foundCluster.nodes[m] = childNodesObj[m];\n }\n }\n\n // Add edges to found cluster, if not present\n for (const m in childEdgesObj) {\n if (foundCluster.edges[m] === undefined) {\n foundCluster.edges[m] = childEdgesObj[m];\n }\n }\n } else {\n // Create a new cluster group\n clusters.push({\n nodes: childNodesObj,\n edges: childEdgesObj\n });\n }\n }\n }\n }\n }\n for (let i = 0; i < clusters.length; i++) {\n this._cluster(clusters[i].nodes, clusters[i].edges, options, false);\n }\n if (refreshData === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Cluster all nodes in the network that have only 1 edge\n * @param {object} options\n * @param {boolean} [refreshData]\n */\n clusterOutliers(options) {\n let refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n this.clusterByEdgeCount(1, options, refreshData);\n }\n\n /**\n * Cluster all nodes in the network that have only 2 edge\n * @param {object} options\n * @param {boolean} [refreshData]\n */\n clusterBridges(options) {\n let refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n this.clusterByEdgeCount(2, options, refreshData);\n }\n\n /**\n * suck all connected nodes of a node into the node.\n * @param {Node.id} nodeId\n * @param {object} options\n * @param {boolean} [refreshData]\n */\n clusterByConnection(nodeId, options) {\n var _context;\n let refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n // kill conditions\n if (nodeId === undefined) {\n throw new Error(\"No nodeId supplied to clusterByConnection!\");\n }\n if (this.body.nodes[nodeId] === undefined) {\n throw new Error(\"The nodeId given to clusterByConnection does not exist!\");\n }\n const node = this.body.nodes[nodeId];\n options = this._checkOptions(options, node);\n if (options.clusterNodeProperties.x === undefined) {\n options.clusterNodeProperties.x = node.x;\n }\n if (options.clusterNodeProperties.y === undefined) {\n options.clusterNodeProperties.y = node.y;\n }\n if (options.clusterNodeProperties.fixed === undefined) {\n options.clusterNodeProperties.fixed = {};\n options.clusterNodeProperties.fixed.x = node.options.fixed.x;\n options.clusterNodeProperties.fixed.y = node.options.fixed.y;\n }\n const childNodesObj = {};\n const childEdgesObj = {};\n const parentNodeId = node.id;\n const parentClonedOptions = NetworkUtil.cloneOptions(node);\n childNodesObj[parentNodeId] = node;\n\n // collect the nodes that will be in the cluster\n for (let i = 0; i < node.edges.length; i++) {\n const edge = node.edges[i];\n if (this.clusteredEdges[edge.id] === undefined) {\n const childNodeId = this._getConnectedId(edge, parentNodeId);\n\n // if the child node is not in a cluster\n if (this.clusteredNodes[childNodeId] === undefined) {\n if (childNodeId !== parentNodeId) {\n if (options.joinCondition === undefined) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n } else {\n // clone the options and insert some additional parameters that could be interesting.\n const childClonedOptions = NetworkUtil.cloneOptions(this.body.nodes[childNodeId]);\n if (options.joinCondition(parentClonedOptions, childClonedOptions) === true) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n }\n }\n } else {\n // swallow the edge if it is self-referencing.\n childEdgesObj[edge.id] = edge;\n }\n }\n }\n }\n const childNodeIDs = _mapInstanceProperty(_context = _Object$keys(childNodesObj)).call(_context, function (childNode) {\n return childNodesObj[childNode].id;\n });\n for (const childNodeKey in childNodesObj) {\n if (!Object.prototype.hasOwnProperty.call(childNodesObj, childNodeKey)) continue;\n const childNode = childNodesObj[childNodeKey];\n for (let y = 0; y < childNode.edges.length; y++) {\n const childEdge = childNode.edges[y];\n if (_indexOfInstanceProperty(childNodeIDs).call(childNodeIDs, this._getConnectedId(childEdge, childNode.id)) > -1) {\n childEdgesObj[childEdge.id] = childEdge;\n }\n }\n }\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n\n /**\n * This function creates the edges that will be attached to the cluster\n * It looks for edges that are connected to the nodes from the \"outside' of the cluster.\n * @param {{Node.id: vis.Node}} childNodesObj\n * @param {{vis.Edge.id: vis.Edge}} childEdgesObj\n * @param {object} clusterNodeProperties\n * @param {object} clusterEdgeProperties\n * @private\n */\n _createClusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, clusterEdgeProperties) {\n let edge, childNodeId, childNode, toId, fromId, otherNodeId;\n\n // loop over all child nodes and their edges to find edges going out of the cluster\n // these edges will be replaced by clusterEdges.\n const childKeys = _Object$keys(childNodesObj);\n const createEdges = [];\n for (let i = 0; i < childKeys.length; i++) {\n childNodeId = childKeys[i];\n childNode = childNodesObj[childNodeId];\n\n // construct new edges from the cluster to others\n for (let j = 0; j < childNode.edges.length; j++) {\n edge = childNode.edges[j];\n // we only handle edges that are visible to the system, not the disabled ones from the clustering process.\n if (this.clusteredEdges[edge.id] === undefined) {\n // self-referencing edges will be added to the \"hidden\" list\n if (edge.toId == edge.fromId) {\n childEdgesObj[edge.id] = edge;\n } else {\n // set up the from and to.\n if (edge.toId == childNodeId) {\n // this is a double equals because ints and strings can be interchanged here.\n toId = clusterNodeProperties.id;\n fromId = edge.fromId;\n otherNodeId = fromId;\n } else {\n toId = edge.toId;\n fromId = clusterNodeProperties.id;\n otherNodeId = toId;\n }\n }\n\n // Only edges from the cluster outwards are being replaced.\n if (childNodesObj[otherNodeId] === undefined) {\n createEdges.push({\n edge: edge,\n fromId: fromId,\n toId: toId\n });\n }\n }\n }\n }\n\n //\n // Here we actually create the replacement edges.\n //\n // We could not do this in the loop above as the creation process\n // would add an edge to the edges array we are iterating over.\n //\n // NOTE: a clustered edge can have multiple base edges!\n //\n const newEdges = [];\n\n /**\n * Find a cluster edge which matches the given created edge.\n * @param {vis.Edge} createdEdge\n * @returns {vis.Edge}\n */\n const getNewEdge = function (createdEdge) {\n for (let j = 0; j < newEdges.length; j++) {\n const newEdge = newEdges[j];\n\n // We replace both to and from edges with a single cluster edge\n const matchToDirection = createdEdge.fromId === newEdge.fromId && createdEdge.toId === newEdge.toId;\n const matchFromDirection = createdEdge.fromId === newEdge.toId && createdEdge.toId === newEdge.fromId;\n if (matchToDirection || matchFromDirection) {\n return newEdge;\n }\n }\n return null;\n };\n for (let j = 0; j < createEdges.length; j++) {\n const createdEdge = createEdges[j];\n const edge = createdEdge.edge;\n let newEdge = getNewEdge(createdEdge);\n if (newEdge === null) {\n // Create a clustered edge for this connection\n newEdge = this._createClusteredEdge(createdEdge.fromId, createdEdge.toId, edge, clusterEdgeProperties);\n newEdges.push(newEdge);\n } else {\n newEdge.clusteringEdgeReplacingIds.push(edge.id);\n }\n\n // also reference the new edge in the old edge\n this.body.edges[edge.id].edgeReplacedById = newEdge.id;\n\n // hide the replaced edge\n this._backupEdgeOptions(edge);\n edge.setOptions({\n physics: false\n });\n }\n }\n\n /**\n * This function checks the options that can be supplied to the different cluster functions\n * for certain fields and inserts defaults if needed\n * @param {object} options\n * @returns {*}\n * @private\n */\n _checkOptions() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (options.clusterEdgeProperties === undefined) {\n options.clusterEdgeProperties = {};\n }\n if (options.clusterNodeProperties === undefined) {\n options.clusterNodeProperties = {};\n }\n return options;\n }\n\n /**\n *\n * @param {object} childNodesObj | object with node objects, id as keys, same as childNodes except it also contains a source node\n * @param {object} childEdgesObj | object with edge objects, id as keys\n * @param {Array} options | object with {clusterNodeProperties, clusterEdgeProperties, processProperties}\n * @param {boolean} refreshData | when true, do not wrap up\n * @private\n */\n _cluster(childNodesObj, childEdgesObj, options) {\n let refreshData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n // Remove nodes which are already clustered\n const tmpNodesToRemove = [];\n for (const nodeId in childNodesObj) {\n if (Object.prototype.hasOwnProperty.call(childNodesObj, nodeId)) {\n if (this.clusteredNodes[nodeId] !== undefined) {\n tmpNodesToRemove.push(nodeId);\n }\n }\n }\n for (let n = 0; n < tmpNodesToRemove.length; ++n) {\n delete childNodesObj[tmpNodesToRemove[n]];\n }\n\n // kill condition: no nodes don't bother\n if (_Object$keys(childNodesObj).length == 0) {\n return;\n }\n\n // allow clusters of 1 if options allow\n if (_Object$keys(childNodesObj).length == 1 && options.clusterNodeProperties.allowSingleNodeCluster != true) {\n return;\n }\n let clusterNodeProperties = deepExtend({}, options.clusterNodeProperties);\n\n // construct the clusterNodeProperties\n if (options.processProperties !== undefined) {\n // get the childNode options\n const childNodesOptions = [];\n for (const nodeId in childNodesObj) {\n if (Object.prototype.hasOwnProperty.call(childNodesObj, nodeId)) {\n const clonedOptions = NetworkUtil.cloneOptions(childNodesObj[nodeId]);\n childNodesOptions.push(clonedOptions);\n }\n }\n\n // get cluster properties based on childNodes\n const childEdgesOptions = [];\n for (const edgeId in childEdgesObj) {\n if (Object.prototype.hasOwnProperty.call(childEdgesObj, edgeId)) {\n // these cluster edges will be removed on creation of the cluster.\n if (edgeId.substr(0, 12) !== \"clusterEdge:\") {\n const clonedOptions = NetworkUtil.cloneOptions(childEdgesObj[edgeId], \"edge\");\n childEdgesOptions.push(clonedOptions);\n }\n }\n }\n clusterNodeProperties = options.processProperties(clusterNodeProperties, childNodesOptions, childEdgesOptions);\n if (!clusterNodeProperties) {\n throw new Error(\"The processProperties function does not return properties!\");\n }\n }\n\n // check if we have an unique id;\n if (clusterNodeProperties.id === undefined) {\n clusterNodeProperties.id = \"cluster:\" + v4();\n }\n const clusterId = clusterNodeProperties.id;\n if (clusterNodeProperties.label === undefined) {\n clusterNodeProperties.label = \"cluster\";\n }\n\n // give the clusterNode a position if it does not have one.\n let pos = undefined;\n if (clusterNodeProperties.x === undefined) {\n pos = this._getClusterPosition(childNodesObj);\n clusterNodeProperties.x = pos.x;\n }\n if (clusterNodeProperties.y === undefined) {\n if (pos === undefined) {\n pos = this._getClusterPosition(childNodesObj);\n }\n clusterNodeProperties.y = pos.y;\n }\n\n // force the ID to remain the same\n clusterNodeProperties.id = clusterId;\n\n // create the cluster Node\n // Note that allowSingleNodeCluster, if present, is stored in the options as well\n const clusterNode = this.body.functions.createNode(clusterNodeProperties, Cluster);\n clusterNode.containedNodes = childNodesObj;\n clusterNode.containedEdges = childEdgesObj;\n // cache a copy from the cluster edge properties if we have to reconnect others later on\n clusterNode.clusterEdgeProperties = options.clusterEdgeProperties;\n\n // finally put the cluster node into global\n this.body.nodes[clusterNodeProperties.id] = clusterNode;\n this._clusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, options.clusterEdgeProperties);\n\n // set ID to undefined so no duplicates arise\n clusterNodeProperties.id = undefined;\n\n // wrap up\n if (refreshData === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n *\n * @param {Edge} edge\n * @private\n */\n _backupEdgeOptions(edge) {\n if (this.clusteredEdges[edge.id] === undefined) {\n this.clusteredEdges[edge.id] = {\n physics: edge.options.physics\n };\n }\n }\n\n /**\n *\n * @param {Edge} edge\n * @private\n */\n _restoreEdge(edge) {\n const originalOptions = this.clusteredEdges[edge.id];\n if (originalOptions !== undefined) {\n edge.setOptions({\n physics: originalOptions.physics\n });\n delete this.clusteredEdges[edge.id];\n }\n }\n\n /**\n * Check if a node is a cluster.\n * @param {Node.id} nodeId\n * @returns {*}\n */\n isCluster(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].isCluster === true;\n } else {\n console.error(\"Node does not exist.\");\n return false;\n }\n }\n\n /**\n * get the position of the cluster node based on what's inside\n * @param {object} childNodesObj | object with node objects, id as keys\n * @returns {{x: number, y: number}}\n * @private\n */\n _getClusterPosition(childNodesObj) {\n const childKeys = _Object$keys(childNodesObj);\n let minX = childNodesObj[childKeys[0]].x;\n let maxX = childNodesObj[childKeys[0]].x;\n let minY = childNodesObj[childKeys[0]].y;\n let maxY = childNodesObj[childKeys[0]].y;\n let node;\n for (let i = 1; i < childKeys.length; i++) {\n node = childNodesObj[childKeys[i]];\n minX = node.x < minX ? node.x : minX;\n maxX = node.x > maxX ? node.x : maxX;\n minY = node.y < minY ? node.y : minY;\n maxY = node.y > maxY ? node.y : maxY;\n }\n return {\n x: 0.5 * (minX + maxX),\n y: 0.5 * (minY + maxY)\n };\n }\n\n /**\n * Open a cluster by calling this function.\n * @param {vis.Edge.id} clusterNodeId | the ID of the cluster node\n * @param {object} options\n * @param {boolean} refreshData | wrap up afterwards if not true\n */\n openCluster(clusterNodeId, options) {\n let refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n // kill conditions\n if (clusterNodeId === undefined) {\n throw new Error(\"No clusterNodeId supplied to openCluster.\");\n }\n const clusterNode = this.body.nodes[clusterNodeId];\n if (clusterNode === undefined) {\n throw new Error(\"The clusterNodeId supplied to openCluster does not exist.\");\n }\n if (clusterNode.isCluster !== true || clusterNode.containedNodes === undefined || clusterNode.containedEdges === undefined) {\n throw new Error(\"The node:\" + clusterNodeId + \" is not a valid cluster.\");\n }\n\n // Check if current cluster is clustered itself\n const stack = this.findNode(clusterNodeId);\n const parentIndex = _indexOfInstanceProperty(stack).call(stack, clusterNodeId) - 1;\n if (parentIndex >= 0) {\n // Current cluster is clustered; transfer contained nodes and edges to parent\n const parentClusterNodeId = stack[parentIndex];\n const parentClusterNode = this.body.nodes[parentClusterNodeId];\n\n // clustering.clusteredNodes and clustering.clusteredEdges remain unchanged\n parentClusterNode._openChildCluster(clusterNodeId);\n\n // All components of child cluster node have been transferred. It can die now.\n delete this.body.nodes[clusterNodeId];\n if (refreshData === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n return;\n }\n\n // main body\n const containedNodes = clusterNode.containedNodes;\n const containedEdges = clusterNode.containedEdges;\n\n // allow the user to position the nodes after release.\n if (options !== undefined && options.releaseFunction !== undefined && typeof options.releaseFunction === \"function\") {\n const positions = {};\n const clusterPosition = {\n x: clusterNode.x,\n y: clusterNode.y\n };\n for (const nodeId in containedNodes) {\n if (Object.prototype.hasOwnProperty.call(containedNodes, nodeId)) {\n const containedNode = this.body.nodes[nodeId];\n positions[nodeId] = {\n x: containedNode.x,\n y: containedNode.y\n };\n }\n }\n const newPositions = options.releaseFunction(clusterPosition, positions);\n for (const nodeId in containedNodes) {\n if (Object.prototype.hasOwnProperty.call(containedNodes, nodeId)) {\n const containedNode = this.body.nodes[nodeId];\n if (newPositions[nodeId] !== undefined) {\n containedNode.x = newPositions[nodeId].x === undefined ? clusterNode.x : newPositions[nodeId].x;\n containedNode.y = newPositions[nodeId].y === undefined ? clusterNode.y : newPositions[nodeId].y;\n }\n }\n }\n } else {\n // copy the position from the cluster\n forEach(containedNodes, function (containedNode) {\n // inherit position\n if (containedNode.options.fixed.x === false) {\n containedNode.x = clusterNode.x;\n }\n if (containedNode.options.fixed.y === false) {\n containedNode.y = clusterNode.y;\n }\n });\n }\n\n // release nodes\n for (const nodeId in containedNodes) {\n if (Object.prototype.hasOwnProperty.call(containedNodes, nodeId)) {\n const containedNode = this.body.nodes[nodeId];\n\n // inherit speed\n containedNode.vx = clusterNode.vx;\n containedNode.vy = clusterNode.vy;\n containedNode.setOptions({\n physics: true\n });\n delete this.clusteredNodes[nodeId];\n }\n }\n\n // copy the clusterNode edges because we cannot iterate over an object that we add or remove from.\n const edgesToBeDeleted = [];\n for (let i = 0; i < clusterNode.edges.length; i++) {\n edgesToBeDeleted.push(clusterNode.edges[i]);\n }\n\n // actually handling the deleting.\n for (let i = 0; i < edgesToBeDeleted.length; i++) {\n const edge = edgesToBeDeleted[i];\n const otherNodeId = this._getConnectedId(edge, clusterNodeId);\n const otherNode = this.clusteredNodes[otherNodeId];\n for (let j = 0; j < edge.clusteringEdgeReplacingIds.length; j++) {\n const transferId = edge.clusteringEdgeReplacingIds[j];\n const transferEdge = this.body.edges[transferId];\n if (transferEdge === undefined) continue;\n\n // if the other node is in another cluster, we transfer ownership of this edge to the other cluster\n if (otherNode !== undefined) {\n // transfer ownership:\n const otherCluster = this.body.nodes[otherNode.clusterId];\n otherCluster.containedEdges[transferEdge.id] = transferEdge;\n\n // delete local reference\n delete containedEdges[transferEdge.id];\n\n // get to and from\n let fromId = transferEdge.fromId;\n let toId = transferEdge.toId;\n if (transferEdge.toId == otherNodeId) {\n toId = otherNode.clusterId;\n } else {\n fromId = otherNode.clusterId;\n }\n\n // create new cluster edge from the otherCluster\n this._createClusteredEdge(fromId, toId, transferEdge, otherCluster.clusterEdgeProperties, {\n hidden: false,\n physics: true\n });\n } else {\n this._restoreEdge(transferEdge);\n }\n }\n edge.remove();\n }\n\n // handle the releasing of the edges\n for (const edgeId in containedEdges) {\n if (Object.prototype.hasOwnProperty.call(containedEdges, edgeId)) {\n this._restoreEdge(containedEdges[edgeId]);\n }\n }\n\n // remove clusterNode\n delete this.body.nodes[clusterNodeId];\n if (refreshData === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n *\n * @param {Cluster.id} clusterId\n * @returns {Array.<Node.id>}\n */\n getNodesInCluster(clusterId) {\n const nodesArray = [];\n if (this.isCluster(clusterId) === true) {\n const containedNodes = this.body.nodes[clusterId].containedNodes;\n for (const nodeId in containedNodes) {\n if (Object.prototype.hasOwnProperty.call(containedNodes, nodeId)) {\n nodesArray.push(this.body.nodes[nodeId].id);\n }\n }\n }\n return nodesArray;\n }\n\n /**\n * Get the stack clusterId's that a certain node resides in. cluster A -> cluster B -> cluster C -> node\n *\n * If a node can't be found in the chain, return an empty array.\n * @param {string|number} nodeId\n * @returns {Array}\n */\n findNode(nodeId) {\n const stack = [];\n const max = 100;\n let counter = 0;\n let node;\n while (this.clusteredNodes[nodeId] !== undefined && counter < max) {\n node = this.body.nodes[nodeId];\n if (node === undefined) return [];\n stack.push(node.id);\n nodeId = this.clusteredNodes[nodeId].clusterId;\n counter++;\n }\n node = this.body.nodes[nodeId];\n if (node === undefined) return [];\n stack.push(node.id);\n _reverseInstanceProperty(stack).call(stack);\n return stack;\n }\n\n /**\n * Using a clustered nodeId, update with the new options\n * @param {Node.id} clusteredNodeId\n * @param {object} newOptions\n */\n updateClusteredNode(clusteredNodeId, newOptions) {\n if (clusteredNodeId === undefined) {\n throw new Error(\"No clusteredNodeId supplied to updateClusteredNode.\");\n }\n if (newOptions === undefined) {\n throw new Error(\"No newOptions supplied to updateClusteredNode.\");\n }\n if (this.body.nodes[clusteredNodeId] === undefined) {\n throw new Error(\"The clusteredNodeId supplied to updateClusteredNode does not exist.\");\n }\n this.body.nodes[clusteredNodeId].setOptions(newOptions);\n this.body.emitter.emit(\"_dataChanged\");\n }\n\n /**\n * Using a base edgeId, update all related clustered edges with the new options\n * @param {vis.Edge.id} startEdgeId\n * @param {object} newOptions\n */\n updateEdge(startEdgeId, newOptions) {\n if (startEdgeId === undefined) {\n throw new Error(\"No startEdgeId supplied to updateEdge.\");\n }\n if (newOptions === undefined) {\n throw new Error(\"No newOptions supplied to updateEdge.\");\n }\n if (this.body.edges[startEdgeId] === undefined) {\n throw new Error(\"The startEdgeId supplied to updateEdge does not exist.\");\n }\n const allEdgeIds = this.getClusteredEdges(startEdgeId);\n for (let i = 0; i < allEdgeIds.length; i++) {\n const edge = this.body.edges[allEdgeIds[i]];\n edge.setOptions(newOptions);\n }\n this.body.emitter.emit(\"_dataChanged\");\n }\n\n /**\n * Get a stack of clusterEdgeId's (+base edgeid) that a base edge is the same as. cluster edge C -> cluster edge B -> cluster edge A -> base edge(edgeId)\n * @param {vis.Edge.id} edgeId\n * @returns {Array.<vis.Edge.id>}\n */\n getClusteredEdges(edgeId) {\n const stack = [];\n const max = 100;\n let counter = 0;\n while (edgeId !== undefined && this.body.edges[edgeId] !== undefined && counter < max) {\n stack.push(this.body.edges[edgeId].id);\n edgeId = this.body.edges[edgeId].edgeReplacedById;\n counter++;\n }\n _reverseInstanceProperty(stack).call(stack);\n return stack;\n }\n\n /**\n * Get the base edge id of clusterEdgeId. cluster edge (clusteredEdgeId) -> cluster edge B -> cluster edge C -> base edge\n * @param {vis.Edge.id} clusteredEdgeId\n * @returns {vis.Edge.id} baseEdgeId\n *\n * TODO: deprecate in 5.0.0. Method getBaseEdges() is the correct one to use.\n */\n getBaseEdge(clusteredEdgeId) {\n // Just kludge this by returning the first base edge id found\n return this.getBaseEdges(clusteredEdgeId)[0];\n }\n\n /**\n * Get all regular edges for this clustered edge id.\n * @param {vis.Edge.id} clusteredEdgeId\n * @returns {Array.<vis.Edge.id>} all baseEdgeId's under this clustered edge\n */\n getBaseEdges(clusteredEdgeId) {\n const IdsToHandle = [clusteredEdgeId];\n const doneIds = [];\n const foundIds = [];\n const max = 100;\n let counter = 0;\n while (IdsToHandle.length > 0 && counter < max) {\n const nextId = IdsToHandle.pop();\n if (nextId === undefined) continue; // Paranoia here and onwards\n const nextEdge = this.body.edges[nextId];\n if (nextEdge === undefined) continue;\n counter++;\n const replacingIds = nextEdge.clusteringEdgeReplacingIds;\n if (replacingIds === undefined) {\n // nextId is a base id\n foundIds.push(nextId);\n } else {\n // Another cluster edge, unravel this one as well\n for (let i = 0; i < replacingIds.length; ++i) {\n const replacingId = replacingIds[i];\n\n // Don't add if already handled\n // TODO: never triggers; find a test-case which does\n if (_indexOfInstanceProperty(IdsToHandle).call(IdsToHandle, replacingIds) !== -1 || _indexOfInstanceProperty(doneIds).call(doneIds, replacingIds) !== -1) {\n continue;\n }\n IdsToHandle.push(replacingId);\n }\n }\n doneIds.push(nextId);\n }\n return foundIds;\n }\n\n /**\n * Get the Id the node is connected to\n * @param {vis.Edge} edge\n * @param {Node.id} nodeId\n * @returns {*}\n * @private\n */\n _getConnectedId(edge, nodeId) {\n if (edge.toId != nodeId) {\n return edge.toId;\n } else if (edge.fromId != nodeId) {\n return edge.fromId;\n } else {\n return edge.fromId;\n }\n }\n\n /**\n * We determine how many connections denote an important hub.\n * We take the mean + 2*std as the important hub size. (Assuming a normal distribution of data, ~2.2%)\n * @returns {number}\n * @private\n */\n _getHubSize() {\n let average = 0;\n let averageSquared = 0;\n let hubCounter = 0;\n let largestHub = 0;\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n const node = this.body.nodes[this.body.nodeIndices[i]];\n if (node.edges.length > largestHub) {\n largestHub = node.edges.length;\n }\n average += node.edges.length;\n averageSquared += Math.pow(node.edges.length, 2);\n hubCounter += 1;\n }\n average = average / hubCounter;\n averageSquared = averageSquared / hubCounter;\n const variance = averageSquared - Math.pow(average, 2);\n const standardDeviation = Math.sqrt(variance);\n let hubThreshold = Math.floor(average + 2 * standardDeviation);\n\n // always have at least one to cluster\n if (hubThreshold > largestHub) {\n hubThreshold = largestHub;\n }\n return hubThreshold;\n }\n\n /**\n * Create an edge for the cluster representation.\n * @param {Node.id} fromId\n * @param {Node.id} toId\n * @param {vis.Edge} baseEdge\n * @param {object} clusterEdgeProperties\n * @param {object} extraOptions\n * @returns {Edge} newly created clustered edge\n * @private\n */\n _createClusteredEdge(fromId, toId, baseEdge, clusterEdgeProperties, extraOptions) {\n // copy the options of the edge we will replace\n const clonedOptions = NetworkUtil.cloneOptions(baseEdge, \"edge\");\n // make sure the properties of clusterEdges are superimposed on it\n deepExtend(clonedOptions, clusterEdgeProperties);\n\n // set up the edge\n clonedOptions.from = fromId;\n clonedOptions.to = toId;\n clonedOptions.id = \"clusterEdge:\" + v4();\n\n // apply the edge specific options to it if specified\n if (extraOptions !== undefined) {\n deepExtend(clonedOptions, extraOptions);\n }\n const newEdge = this.body.functions.createEdge(clonedOptions);\n newEdge.clusteringEdgeReplacingIds = [baseEdge.id];\n newEdge.connect();\n\n // Register the new edge\n this.body.edges[newEdge.id] = newEdge;\n return newEdge;\n }\n\n /**\n * Add the passed child nodes and edges to the given cluster node.\n * @param {object | Node} childNodes hash of nodes or single node to add in cluster\n * @param {object | Edge} childEdges hash of edges or single edge to take into account when clustering\n * @param {Node} clusterNode cluster node to add nodes and edges to\n * @param {object} [clusterEdgeProperties]\n * @private\n */\n _clusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties) {\n if (childEdges instanceof Edge) {\n const edge = childEdges;\n const obj = {};\n obj[edge.id] = edge;\n childEdges = obj;\n }\n if (childNodes instanceof Node) {\n const node = childNodes;\n const obj = {};\n obj[node.id] = node;\n childNodes = obj;\n }\n if (clusterNode === undefined || clusterNode === null) {\n throw new Error(\"_clusterEdges: parameter clusterNode required\");\n }\n if (clusterEdgeProperties === undefined) {\n // Take the required properties from the cluster node\n clusterEdgeProperties = clusterNode.clusterEdgeProperties;\n }\n\n // create the new edges that will connect to the cluster.\n // All self-referencing edges will be added to childEdges here.\n this._createClusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties);\n\n // disable the childEdges\n for (const edgeId in childEdges) {\n if (Object.prototype.hasOwnProperty.call(childEdges, edgeId)) {\n if (this.body.edges[edgeId] !== undefined) {\n const edge = this.body.edges[edgeId];\n // cache the options before changing\n this._backupEdgeOptions(edge);\n // disable physics and hide the edge\n edge.setOptions({\n physics: false\n });\n }\n }\n }\n\n // disable the childNodes\n for (const nodeId in childNodes) {\n if (Object.prototype.hasOwnProperty.call(childNodes, nodeId)) {\n this.clusteredNodes[nodeId] = {\n clusterId: clusterNode.id,\n node: this.body.nodes[nodeId]\n };\n this.body.nodes[nodeId].setOptions({\n physics: false\n });\n }\n }\n }\n\n /**\n * Determine in which cluster given nodeId resides.\n *\n * If not in cluster, return undefined.\n *\n * NOTE: If you know a cleaner way to do this, please enlighten me (wimrijnders).\n * @param {Node.id} nodeId\n * @returns {Node|undefined} Node instance for cluster, if present\n * @private\n */\n _getClusterNodeForNode(nodeId) {\n if (nodeId === undefined) return undefined;\n const clusteredNode = this.clusteredNodes[nodeId];\n\n // NOTE: If no cluster info found, it should actually be an error\n if (clusteredNode === undefined) return undefined;\n const clusterId = clusteredNode.clusterId;\n if (clusterId === undefined) return undefined;\n return this.body.nodes[clusterId];\n }\n\n /**\n * Internal helper function for conditionally removing items in array\n *\n * Done like this because Array.filter() is not fully supported by all IE's.\n * @param {Array} arr\n * @param {Function} callback\n * @returns {Array}\n * @private\n */\n _filter(arr, callback) {\n const ret = [];\n forEach(arr, item => {\n if (callback(item)) {\n ret.push(item);\n }\n });\n return ret;\n }\n\n /**\n * Scan all edges for changes in clustering and adjust this if necessary.\n *\n * Call this (internally) after there has been a change in node or edge data.\n *\n * Pre: States of this.body.nodes and this.body.edges consistent\n * Pre: this.clusteredNodes and this.clusteredEdge consistent with containedNodes and containedEdges\n * of cluster nodes.\n */\n _updateState() {\n let nodeId;\n const deletedNodeIds = [];\n const deletedEdgeIds = {};\n\n /**\n * Utility function to iterate over clustering nodes only\n * @param {Function} callback function to call for each cluster node\n */\n const eachClusterNode = callback => {\n forEach(this.body.nodes, node => {\n if (node.isCluster === true) {\n callback(node);\n }\n });\n };\n\n //\n // Remove deleted regular nodes from clustering\n //\n\n // Determine the deleted nodes\n for (nodeId in this.clusteredNodes) {\n if (!Object.prototype.hasOwnProperty.call(this.clusteredNodes, nodeId)) continue;\n const node = this.body.nodes[nodeId];\n if (node === undefined) {\n deletedNodeIds.push(nodeId);\n }\n }\n\n // Remove nodes from cluster nodes\n eachClusterNode(function (clusterNode) {\n for (let n = 0; n < deletedNodeIds.length; n++) {\n delete clusterNode.containedNodes[deletedNodeIds[n]];\n }\n });\n\n // Remove nodes from cluster list\n for (let n = 0; n < deletedNodeIds.length; n++) {\n delete this.clusteredNodes[deletedNodeIds[n]];\n }\n\n //\n // Remove deleted edges from clustering\n //\n\n // Add the deleted clustered edges to the list\n forEach(this.clusteredEdges, edgeId => {\n const edge = this.body.edges[edgeId];\n if (edge === undefined || !edge.endPointsValid()) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n\n // Cluster nodes can also contain edges which are not clustered,\n // i.e. nodes 1-2 within cluster with an edge in between.\n // So the cluster nodes also need to be scanned for invalid edges\n eachClusterNode(function (clusterNode) {\n forEach(clusterNode.containedEdges, (edge, edgeId) => {\n if (!edge.endPointsValid() && !deletedEdgeIds[edgeId]) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n });\n\n // Also scan for cluster edges which need to be removed in the active list.\n // Regular edges have been removed beforehand, so this only picks up the cluster edges.\n forEach(this.body.edges, (edge, edgeId) => {\n // Explicitly scan the contained edges for validity\n let isValid = true;\n const replacedIds = edge.clusteringEdgeReplacingIds;\n if (replacedIds !== undefined) {\n let numValid = 0;\n forEach(replacedIds, containedEdgeId => {\n const containedEdge = this.body.edges[containedEdgeId];\n if (containedEdge !== undefined && containedEdge.endPointsValid()) {\n numValid += 1;\n }\n });\n isValid = numValid > 0;\n }\n if (!edge.endPointsValid() || !isValid) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n\n // Remove edges from cluster nodes\n eachClusterNode(clusterNode => {\n forEach(deletedEdgeIds, deletedEdgeId => {\n delete clusterNode.containedEdges[deletedEdgeId];\n forEach(clusterNode.edges, (edge, m) => {\n if (edge.id === deletedEdgeId) {\n clusterNode.edges[m] = null; // Don't want to directly delete here, because in the loop\n return;\n }\n edge.clusteringEdgeReplacingIds = this._filter(edge.clusteringEdgeReplacingIds, function (id) {\n return !deletedEdgeIds[id];\n });\n });\n\n // Clean up the nulls\n clusterNode.edges = this._filter(clusterNode.edges, function (item) {\n return item !== null;\n });\n });\n });\n\n // Remove from cluster list\n forEach(deletedEdgeIds, edgeId => {\n delete this.clusteredEdges[edgeId];\n });\n\n // Remove cluster edges from active list (this.body.edges).\n // deletedEdgeIds still contains id of regular edges, but these should all\n // be gone when you reach here.\n forEach(deletedEdgeIds, edgeId => {\n delete this.body.edges[edgeId];\n });\n\n //\n // Check changed cluster state of edges\n //\n\n // Iterating over keys here, because edges may be removed in the loop\n const ids = _Object$keys(this.body.edges);\n forEach(ids, edgeId => {\n const edge = this.body.edges[edgeId];\n const shouldBeClustered = this._isClusteredNode(edge.fromId) || this._isClusteredNode(edge.toId);\n if (shouldBeClustered === this._isClusteredEdge(edge.id)) {\n return; // all is well\n }\n if (shouldBeClustered) {\n // add edge to clustering\n const clusterFrom = this._getClusterNodeForNode(edge.fromId);\n if (clusterFrom !== undefined) {\n this._clusterEdges(this.body.nodes[edge.fromId], edge, clusterFrom);\n }\n const clusterTo = this._getClusterNodeForNode(edge.toId);\n if (clusterTo !== undefined) {\n this._clusterEdges(this.body.nodes[edge.toId], edge, clusterTo);\n }\n\n // TODO: check that it works for both edges clustered\n // (This might be paranoia)\n } else {\n delete this._clusterEdges[edgeId];\n this._restoreEdge(edge);\n // This should not be happening, the state should\n // be properly updated at this point.\n //\n // If it *is* reached during normal operation, then we have to implement\n // undo clustering for this edge here.\n // throw new Error('remove edge from clustering not implemented!')\n }\n });\n\n // Clusters may be nested to any level. Keep on opening until nothing to open\n let changed = false;\n let continueLoop = true;\n while (continueLoop) {\n const clustersToOpen = [];\n\n // Determine the id's of clusters that need opening\n eachClusterNode(function (clusterNode) {\n const numNodes = _Object$keys(clusterNode.containedNodes).length;\n const allowSingle = clusterNode.options.allowSingleNodeCluster === true;\n if (allowSingle && numNodes < 1 || !allowSingle && numNodes < 2) {\n clustersToOpen.push(clusterNode.id);\n }\n });\n\n // Open them\n for (let n = 0; n < clustersToOpen.length; ++n) {\n this.openCluster(clustersToOpen[n], {}, false /* Don't refresh, we're in an refresh/update already */);\n }\n continueLoop = clustersToOpen.length > 0;\n changed = changed || continueLoop;\n }\n if (changed) {\n this._updateState(); // Redo this method (recursion possible! should be safe)\n }\n }\n\n /**\n * Determine if node with given id is part of a cluster.\n * @param {Node.id} nodeId\n * @returns {boolean} true if part of a cluster.\n */\n _isClusteredNode(nodeId) {\n return this.clusteredNodes[nodeId] !== undefined;\n }\n\n /**\n * Determine if edge with given id is not visible due to clustering.\n *\n * An edge is considered clustered if:\n * - it is directly replaced by a clustering edge\n * - any of its connecting nodes is in a cluster\n * @param {vis.Edge.id} edgeId\n * @returns {boolean} true if part of a cluster.\n */\n _isClusteredEdge(edgeId) {\n return this.clusteredEdges[edgeId] !== undefined;\n }\n}\n\n/**\n * The canvas renderer\n */\nclass CanvasRenderer {\n /**\n * @param {object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n this.redrawRequested = false;\n this.requestAnimationFrameRequestId = undefined;\n this.renderingActive = false;\n this.renderRequests = 0;\n this.allowRedraw = true;\n this.dragging = false;\n this.zooming = false;\n this.options = {};\n this.defaultOptions = {\n hideEdgesOnDrag: false,\n hideEdgesOnZoom: false,\n hideNodesOnDrag: false\n };\n _Object$assign(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n var _context2;\n this.body.emitter.on(\"dragStart\", () => {\n this.dragging = true;\n });\n this.body.emitter.on(\"dragEnd\", () => {\n this.dragging = false;\n });\n this.body.emitter.on(\"zoom\", () => {\n this.zooming = true;\n window.clearTimeout(this.zoomTimeoutId);\n this.zoomTimeoutId = _setTimeout(() => {\n var _context;\n this.zooming = false;\n _bindInstanceProperty(_context = this._requestRedraw).call(_context, this)();\n }, 250);\n });\n this.body.emitter.on(\"_resizeNodes\", () => {\n this._resizeNodes();\n });\n this.body.emitter.on(\"_redraw\", () => {\n if (this.renderingActive === false) {\n this._redraw();\n }\n });\n this.body.emitter.on(\"_blockRedraw\", () => {\n this.allowRedraw = false;\n });\n this.body.emitter.on(\"_allowRedraw\", () => {\n this.allowRedraw = true;\n this.redrawRequested = false;\n });\n this.body.emitter.on(\"_requestRedraw\", _bindInstanceProperty(_context2 = this._requestRedraw).call(_context2, this));\n this.body.emitter.on(\"_startRendering\", () => {\n this.renderRequests += 1;\n this.renderingActive = true;\n this._startRendering();\n });\n this.body.emitter.on(\"_stopRendering\", () => {\n this.renderRequests -= 1;\n this.renderingActive = this.renderRequests > 0;\n this.requestAnimationFrameRequestId = undefined;\n });\n this.body.emitter.on(\"destroy\", () => {\n this.renderRequests = 0;\n this.allowRedraw = false;\n this.renderingActive = false;\n window.cancelAnimationFrame(this.requestAnimationFrameRequestId);\n this.body.emitter.off();\n });\n }\n\n /**\n *\n * @param {object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n const fields = [\"hideEdgesOnDrag\", \"hideEdgesOnZoom\", \"hideNodesOnDrag\"];\n selectiveDeepExtend(fields, this.options, options);\n }\n }\n\n /**\n *\n * @private\n */\n _startRendering() {\n if (this.renderingActive === true) {\n if (this.requestAnimationFrameRequestId === undefined) {\n var _context3;\n this.requestAnimationFrameRequestId = window.requestAnimationFrame(_bindInstanceProperty(_context3 = this._renderStep).call(_context3, this), this.simulationInterval);\n }\n }\n }\n\n /**\n *\n * @private\n */\n _renderStep() {\n if (this.renderingActive === true) {\n // reset the requestAnimationFrameRequestId so a new scheduled animation step can be set\n this.requestAnimationFrameRequestId = undefined;\n\n // this schedules a new simulation step\n this._startRendering();\n this._redraw();\n }\n }\n\n /**\n * Redraw the network with the current data\n * chart will be resized too.\n */\n redraw() {\n this.body.emitter.emit(\"setSize\");\n this._redraw();\n }\n\n /**\n * Redraw the network with the current data\n * @private\n */\n _requestRedraw() {\n if (this.redrawRequested !== true && this.renderingActive === false && this.allowRedraw === true) {\n this.redrawRequested = true;\n window.requestAnimationFrame(() => {\n this._redraw(false);\n });\n }\n }\n\n /**\n * Redraw the network with the current data\n * @param {boolean} [hidden] | Used to get the first estimate of the node sizes.\n * Only the nodes are drawn after which they are quickly drawn over.\n * @private\n */\n _redraw() {\n let hidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n if (this.allowRedraw === true) {\n this.body.emitter.emit(\"initRedraw\");\n this.redrawRequested = false;\n const drawLater = {\n drawExternalLabels: null\n };\n\n // when the container div was hidden, this fixes it back up!\n if (this.canvas.frame.canvas.width === 0 || this.canvas.frame.canvas.height === 0) {\n this.canvas.setSize();\n }\n this.canvas.setTransform();\n const ctx = this.canvas.getContext();\n\n // clear the canvas\n const w = this.canvas.frame.canvas.clientWidth;\n const h = this.canvas.frame.canvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n // if the div is hidden, we stop the redraw here for performance.\n if (this.canvas.frame.clientWidth === 0) {\n return;\n }\n\n // set scaling and translation\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n ctx.beginPath();\n this.body.emitter.emit(\"beforeDrawing\", ctx);\n ctx.closePath();\n if (hidden === false) {\n if ((this.dragging === false || this.dragging === true && this.options.hideEdgesOnDrag === false) && (this.zooming === false || this.zooming === true && this.options.hideEdgesOnZoom === false)) {\n this._drawEdges(ctx);\n }\n }\n if (this.dragging === false || this.dragging === true && this.options.hideNodesOnDrag === false) {\n const {\n drawExternalLabels\n } = this._drawNodes(ctx, hidden);\n drawLater.drawExternalLabels = drawExternalLabels;\n }\n\n // draw the arrows last so they will be at the top\n if (hidden === false) {\n if ((this.dragging === false || this.dragging === true && this.options.hideEdgesOnDrag === false) && (this.zooming === false || this.zooming === true && this.options.hideEdgesOnZoom === false)) {\n this._drawArrows(ctx);\n }\n }\n if (drawLater.drawExternalLabels != null) {\n drawLater.drawExternalLabels();\n }\n if (hidden === false) {\n this._drawSelectionBox(ctx);\n }\n ctx.beginPath();\n this.body.emitter.emit(\"afterDrawing\", ctx);\n ctx.closePath();\n\n // restore original scaling and translation\n ctx.restore();\n if (hidden === true) {\n ctx.clearRect(0, 0, w, h);\n }\n }\n }\n\n /**\n * Redraw all nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [alwaysShow]\n * @private\n */\n _resizeNodes() {\n this.canvas.setTransform();\n const ctx = this.canvas.getContext();\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n const nodes = this.body.nodes;\n let node;\n\n // resize all nodes\n for (const nodeId in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, nodeId)) {\n node = nodes[nodeId];\n node.resize(ctx);\n node.updateBoundingBox(ctx, node.selected);\n }\n }\n\n // restore original scaling and translation\n ctx.restore();\n }\n\n /**\n * Redraw all nodes\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @param {boolean} [alwaysShow]\n * @private\n * @returns {object} Callbacks to draw later on higher layers.\n */\n _drawNodes(ctx) {\n let alwaysShow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n const nodes = this.body.nodes;\n const nodeIndices = this.body.nodeIndices;\n let node;\n const selected = [];\n const hovered = [];\n const margin = 20;\n const topLeft = this.canvas.DOMtoCanvas({\n x: -margin,\n y: -margin\n });\n const bottomRight = this.canvas.DOMtoCanvas({\n x: this.canvas.frame.canvas.clientWidth + margin,\n y: this.canvas.frame.canvas.clientHeight + margin\n });\n const viewableArea = {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x\n };\n const drawExternalLabels = [];\n\n // draw unselected nodes;\n for (let i = 0; i < nodeIndices.length; i++) {\n node = nodes[nodeIndices[i]];\n // set selected and hovered nodes aside\n if (node.hover) {\n hovered.push(nodeIndices[i]);\n } else if (node.isSelected()) {\n selected.push(nodeIndices[i]);\n } else {\n if (alwaysShow === true) {\n const drawLater = node.draw(ctx);\n if (drawLater.drawExternalLabel != null) {\n drawExternalLabels.push(drawLater.drawExternalLabel);\n }\n } else if (node.isBoundingBoxOverlappingWith(viewableArea) === true) {\n const drawLater = node.draw(ctx);\n if (drawLater.drawExternalLabel != null) {\n drawExternalLabels.push(drawLater.drawExternalLabel);\n }\n } else {\n node.updateBoundingBox(ctx, node.selected);\n }\n }\n }\n let i;\n const selectedLength = selected.length;\n const hoveredLength = hovered.length;\n\n // draw the selected nodes on top\n for (i = 0; i < selectedLength; i++) {\n node = nodes[selected[i]];\n const drawLater = node.draw(ctx);\n if (drawLater.drawExternalLabel != null) {\n drawExternalLabels.push(drawLater.drawExternalLabel);\n }\n }\n\n // draw hovered nodes above everything else: fixes https://github.com/visjs/vis-network/issues/226\n for (i = 0; i < hoveredLength; i++) {\n node = nodes[hovered[i]];\n const drawLater = node.draw(ctx);\n if (drawLater.drawExternalLabel != null) {\n drawExternalLabels.push(drawLater.drawExternalLabel);\n }\n }\n return {\n drawExternalLabels: () => {\n for (const draw of drawExternalLabels) {\n draw();\n }\n }\n };\n }\n\n /**\n * Redraw all edges\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @private\n */\n _drawEdges(ctx) {\n const edges = this.body.edges;\n const edgeIndices = this.body.edgeIndices;\n for (let i = 0; i < edgeIndices.length; i++) {\n const edge = edges[edgeIndices[i]];\n if (edge.connected === true) {\n edge.draw(ctx);\n }\n }\n }\n\n /**\n * Redraw all arrows\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @private\n */\n _drawArrows(ctx) {\n const edges = this.body.edges;\n const edgeIndices = this.body.edgeIndices;\n for (let i = 0; i < edgeIndices.length; i++) {\n const edge = edges[edgeIndices[i]];\n if (edge.connected === true) {\n edge.drawArrows(ctx);\n }\n }\n }\n\n /**\n * Redraw selection box\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @private\n */\n _drawSelectionBox(ctx) {\n if (this.body.selectionBox.show) {\n ctx.beginPath();\n const width = this.body.selectionBox.position.end.x - this.body.selectionBox.position.start.x;\n const height = this.body.selectionBox.position.end.y - this.body.selectionBox.position.start.y;\n ctx.rect(this.body.selectionBox.position.start.x, this.body.selectionBox.position.start.y, width, height);\n ctx.fillStyle = \"rgba(151, 194, 252, 0.2)\";\n ctx.fillRect(this.body.selectionBox.position.start.x, this.body.selectionBox.position.start.y, width, height);\n ctx.strokeStyle = \"rgba(151, 194, 252, 1)\";\n ctx.stroke();\n } else {\n ctx.closePath();\n }\n }\n}\n\nvar setInterval$1;\nvar hasRequiredSetInterval$1;\n\nfunction requireSetInterval$1 () {\n\tif (hasRequiredSetInterval$1) return setInterval$1;\n\thasRequiredSetInterval$1 = 1;\n\trequireWeb_timers();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tsetInterval$1 = path.setInterval;\n\treturn setInterval$1;\n}\n\nvar setInterval;\nvar hasRequiredSetInterval;\n\nfunction requireSetInterval () {\n\tif (hasRequiredSetInterval) return setInterval;\n\thasRequiredSetInterval = 1;\n\tsetInterval = /*@__PURE__*/ requireSetInterval$1();\n\treturn setInterval;\n}\n\nvar setIntervalExports = requireSetInterval();\nvar _setInterval = /*@__PURE__*/getDefaultExportFromCjs(setIntervalExports);\n\n/**\n * Register a touch event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {Function} callback Callback, called as callback(event)\n */\nfunction onTouch(hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFirst) {\n callback(event);\n }\n };\n hammer.on(\"hammer.input\", callback.inputHandler);\n}\n\n/**\n * Register a release event, taking place after a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {Function} callback Callback, called as callback(event)\n * @returns {*}\n */\nfunction onRelease(hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFinal) {\n callback(event);\n }\n };\n return hammer.on(\"hammer.input\", callback.inputHandler);\n}\n\n/**\n * Create the main frame for the Network.\n * This function is executed once when a Network object is created. The frame\n * contains a canvas, and this canvas contains all objects like the axis and\n * nodes.\n */\nclass Canvas {\n /**\n * @param {object} body\n */\n constructor(body) {\n this.body = body;\n this.pixelRatio = 1;\n this.cameraState = {};\n this.initialized = false;\n this.canvasViewCenter = {};\n this._cleanupCallbacks = [];\n this.options = {};\n this.defaultOptions = {\n autoResize: true,\n height: \"100%\",\n width: \"100%\"\n };\n _Object$assign(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n var _context;\n // bind the events\n this.body.emitter.once(\"resize\", obj => {\n if (obj.width !== 0) {\n this.body.view.translation.x = obj.width * 0.5;\n }\n if (obj.height !== 0) {\n this.body.view.translation.y = obj.height * 0.5;\n }\n });\n this.body.emitter.on(\"setSize\", _bindInstanceProperty(_context = this.setSize).call(_context, this));\n this.body.emitter.on(\"destroy\", () => {\n this.hammerFrame.destroy();\n this.hammer.destroy();\n this._cleanUp();\n });\n }\n\n /**\n * @param {object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n const fields = [\"width\", \"height\", \"autoResize\"];\n selectiveDeepExtend(fields, this.options, options);\n }\n\n // Automatically adapt to changing size of the container element.\n this._cleanUp();\n if (this.options.autoResize === true) {\n var _context2;\n if (window.ResizeObserver) {\n // decent browsers, immediate reactions\n const observer = new ResizeObserver(() => {\n const changed = this.setSize();\n if (changed === true) {\n this.body.emitter.emit(\"_requestRedraw\");\n }\n });\n const {\n frame\n } = this;\n observer.observe(frame);\n this._cleanupCallbacks.push(() => {\n observer.unobserve(frame);\n });\n } else {\n // IE11, continous polling\n const resizeTimer = _setInterval(() => {\n const changed = this.setSize();\n if (changed === true) {\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }, 1000);\n this._cleanupCallbacks.push(() => {\n clearInterval(resizeTimer);\n });\n }\n\n // Automatically adapt to changing size of the browser.\n const resizeFunction = _bindInstanceProperty(_context2 = this._onResize).call(_context2, this);\n window.addEventListener(\"resize\", resizeFunction);\n this._cleanupCallbacks.push(() => {\n window.removeEventListener(\"resize\", resizeFunction);\n });\n }\n }\n\n /**\n * @private\n */\n _cleanUp() {\n var _context3, _context4, _context5;\n _forEachInstanceProperty(_context3 = _reverseInstanceProperty(_context4 = _spliceInstanceProperty(_context5 = this._cleanupCallbacks).call(_context5, 0)).call(_context4)).call(_context3, callback => {\n try {\n callback();\n } catch (error) {\n console.error(error);\n }\n });\n }\n\n /**\n * @private\n */\n _onResize() {\n this.setSize();\n this.body.emitter.emit(\"_redraw\");\n }\n\n /**\n * Get and store the cameraState\n * @param {number} [pixelRatio]\n * @private\n */\n _getCameraState() {\n let pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.pixelRatio;\n if (this.initialized === true) {\n this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio;\n this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio;\n this.cameraState.scale = this.body.view.scale;\n this.cameraState.position = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.width / pixelRatio,\n y: 0.5 * this.frame.canvas.height / pixelRatio\n });\n }\n }\n\n /**\n * Set the cameraState\n * @private\n */\n _setCameraState() {\n if (this.cameraState.scale !== undefined && this.frame.canvas.clientWidth !== 0 && this.frame.canvas.clientHeight !== 0 && this.pixelRatio !== 0 && this.cameraState.previousWidth > 0 && this.cameraState.previousHeight > 0) {\n const widthRatio = this.frame.canvas.width / this.pixelRatio / this.cameraState.previousWidth;\n const heightRatio = this.frame.canvas.height / this.pixelRatio / this.cameraState.previousHeight;\n let newScale = this.cameraState.scale;\n if (widthRatio != 1 && heightRatio != 1) {\n newScale = this.cameraState.scale * 0.5 * (widthRatio + heightRatio);\n } else if (widthRatio != 1) {\n newScale = this.cameraState.scale * widthRatio;\n } else if (heightRatio != 1) {\n newScale = this.cameraState.scale * heightRatio;\n }\n this.body.view.scale = newScale;\n // this comes from the view module.\n const currentViewCenter = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.clientWidth,\n y: 0.5 * this.frame.canvas.clientHeight\n });\n const distanceFromCenter = {\n // offset from view, distance view has to change by these x and y to center the node\n x: currentViewCenter.x - this.cameraState.position.x,\n y: currentViewCenter.y - this.cameraState.position.y\n };\n this.body.view.translation.x += distanceFromCenter.x * this.body.view.scale;\n this.body.view.translation.y += distanceFromCenter.y * this.body.view.scale;\n }\n }\n\n /**\n *\n * @param {number|string} value\n * @returns {string}\n * @private\n */\n _prepareValue(value) {\n if (typeof value === \"number\") {\n return value + \"px\";\n } else if (typeof value === \"string\") {\n if (_indexOfInstanceProperty(value).call(value, \"%\") !== -1 || _indexOfInstanceProperty(value).call(value, \"px\") !== -1) {\n return value;\n } else if (_indexOfInstanceProperty(value).call(value, \"%\") === -1) {\n return value + \"px\";\n }\n }\n throw new Error(\"Could not use the value supplied for width or height:\" + value);\n }\n\n /**\n * Create the HTML\n */\n _create() {\n // remove all elements from the container element.\n while (this.body.container.hasChildNodes()) {\n this.body.container.removeChild(this.body.container.firstChild);\n }\n this.frame = document.createElement(\"div\");\n this.frame.className = \"vis-network\";\n this.frame.style.position = \"relative\";\n this.frame.style.overflow = \"hidden\";\n this.frame.tabIndex = 0; // tab index is required for keycharm to bind keystrokes to the div instead of the window\n\n //////////////////////////////////////////////////////////////////\n\n this.frame.canvas = document.createElement(\"canvas\");\n this.frame.canvas.style.position = \"relative\";\n this.frame.appendChild(this.frame.canvas);\n if (!this.frame.canvas.getContext) {\n const noCanvas = document.createElement(\"DIV\");\n noCanvas.style.color = \"red\";\n noCanvas.style.fontWeight = \"bold\";\n noCanvas.style.padding = \"10px\";\n noCanvas.innerText = \"Error: your browser does not support HTML canvas\";\n this.frame.canvas.appendChild(noCanvas);\n } else {\n this._setPixelRatio();\n this.setTransform();\n }\n\n // add the frame to the container element\n this.body.container.appendChild(this.frame);\n this.body.view.scale = 1;\n this.body.view.translation = {\n x: 0.5 * this.frame.canvas.clientWidth,\n y: 0.5 * this.frame.canvas.clientHeight\n };\n this._bindHammer();\n }\n\n /**\n * This function binds hammer, it can be repeated over and over due to the uniqueness check.\n * @private\n */\n _bindHammer() {\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n }\n this.drag = {};\n this.pinch = {};\n\n // init hammer\n this.hammer = new Hammer(this.frame.canvas);\n this.hammer.get(\"pinch\").set({\n enable: true\n });\n // enable to get better response, todo: test on mobile.\n this.hammer.get(\"pan\").set({\n threshold: 5,\n direction: Hammer.DIRECTION_ALL\n });\n onTouch(this.hammer, event => {\n this.body.eventListeners.onTouch(event);\n });\n this.hammer.on(\"tap\", event => {\n this.body.eventListeners.onTap(event);\n });\n this.hammer.on(\"doubletap\", event => {\n this.body.eventListeners.onDoubleTap(event);\n });\n this.hammer.on(\"press\", event => {\n this.body.eventListeners.onHold(event);\n });\n this.hammer.on(\"panstart\", event => {\n this.body.eventListeners.onDragStart(event);\n });\n this.hammer.on(\"panmove\", event => {\n this.body.eventListeners.onDrag(event);\n });\n this.hammer.on(\"panend\", event => {\n this.body.eventListeners.onDragEnd(event);\n });\n this.hammer.on(\"pinch\", event => {\n this.body.eventListeners.onPinch(event);\n });\n\n // TODO: neatly cleanup these handlers when re-creating the Canvas, IF these are done with hammer, event.stopPropagation will not work?\n this.frame.canvas.addEventListener(\"wheel\", event => {\n this.body.eventListeners.onMouseWheel(event);\n });\n this.frame.canvas.addEventListener(\"mousemove\", event => {\n this.body.eventListeners.onMouseMove(event);\n });\n this.frame.canvas.addEventListener(\"contextmenu\", event => {\n this.body.eventListeners.onContext(event);\n });\n this.hammerFrame = new Hammer(this.frame);\n onRelease(this.hammerFrame, event => {\n this.body.eventListeners.onRelease(event);\n });\n }\n\n /**\n * Set a new size for the network\n * @param {string} width Width in pixels or percentage (for example '800px'\n * or '50%')\n * @param {string} height Height in pixels or percentage (for example '400px'\n * or '30%')\n * @returns {boolean}\n */\n setSize() {\n let width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.width;\n let height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.height;\n width = this._prepareValue(width);\n height = this._prepareValue(height);\n let emitEvent = false;\n const oldWidth = this.frame.canvas.width;\n const oldHeight = this.frame.canvas.height;\n\n // update the pixel ratio\n //\n // NOTE: Comment in following is rather inconsistent; this is the ONLY place in the code\n // where it is assumed that the pixel ratio could change at runtime.\n // The only way I can think of this happening is a rotating screen or tablet; but then\n // there should be a mechanism for reloading the data (TODO: check if this is present).\n //\n // If the assumption is true (i.e. pixel ratio can change at runtime), then *all* usage\n // of pixel ratio must be overhauled for this.\n //\n // For the time being, I will humor the assumption here, and in the rest of the code assume it is\n // constant.\n const previousRatio = this.pixelRatio; // we cache this because the camera state storage needs the old value\n this._setPixelRatio();\n if (width != this.options.width || height != this.options.height || this.frame.style.width != width || this.frame.style.height != height) {\n this._getCameraState(previousRatio);\n this.frame.style.width = width;\n this.frame.style.height = height;\n this.frame.canvas.style.width = \"100%\";\n this.frame.canvas.style.height = \"100%\";\n this.frame.canvas.width = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n this.frame.canvas.height = Math.round(this.frame.canvas.clientHeight * this.pixelRatio);\n this.options.width = width;\n this.options.height = height;\n this.canvasViewCenter = {\n x: 0.5 * this.frame.clientWidth,\n y: 0.5 * this.frame.clientHeight\n };\n emitEvent = true;\n } else {\n // this would adapt the width of the canvas to the width from 100% if and only if\n // there is a change.\n\n const newWidth = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n const newHeight = Math.round(this.frame.canvas.clientHeight * this.pixelRatio);\n\n // store the camera if there is a change in size.\n if (this.frame.canvas.width !== newWidth || this.frame.canvas.height !== newHeight) {\n this._getCameraState(previousRatio);\n }\n if (this.frame.canvas.width !== newWidth) {\n this.frame.canvas.width = newWidth;\n emitEvent = true;\n }\n if (this.frame.canvas.height !== newHeight) {\n this.frame.canvas.height = newHeight;\n emitEvent = true;\n }\n }\n if (emitEvent === true) {\n this.body.emitter.emit(\"resize\", {\n width: Math.round(this.frame.canvas.width / this.pixelRatio),\n height: Math.round(this.frame.canvas.height / this.pixelRatio),\n oldWidth: Math.round(oldWidth / this.pixelRatio),\n oldHeight: Math.round(oldHeight / this.pixelRatio)\n });\n\n // restore the camera on change.\n this._setCameraState();\n }\n\n // set initialized so the get and set camera will work from now on.\n this.initialized = true;\n return emitEvent;\n }\n\n /**\n *\n * @returns {CanvasRenderingContext2D}\n */\n getContext() {\n return this.frame.canvas.getContext(\"2d\");\n }\n\n /**\n * Determine the pixel ratio for various browsers.\n * @returns {number}\n * @private\n */\n _determinePixelRatio() {\n const ctx = this.getContext();\n if (ctx === undefined) {\n throw new Error(\"Could not get canvax context\");\n }\n let numerator = 1;\n if (typeof window !== \"undefined\") {\n // (window !== undefined) doesn't work here!\n // Protection during unit tests, where 'window' can be missing\n numerator = window.devicePixelRatio || 1;\n }\n const denominator = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;\n return numerator / denominator;\n }\n\n /**\n * Lazy determination of pixel ratio.\n * @private\n */\n _setPixelRatio() {\n this.pixelRatio = this._determinePixelRatio();\n }\n\n /**\n * Set the transform in the contained context, based on its pixelRatio\n */\n setTransform() {\n const ctx = this.getContext();\n if (ctx === undefined) {\n throw new Error(\"Could not get canvax context\");\n }\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n\n /**\n * Convert the X coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} x\n * @returns {number}\n * @private\n */\n _XconvertDOMtoCanvas(x) {\n return (x - this.body.view.translation.x) / this.body.view.scale;\n }\n\n /**\n * Convert the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the X coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} x\n * @returns {number}\n * @private\n */\n _XconvertCanvasToDOM(x) {\n return x * this.body.view.scale + this.body.view.translation.x;\n }\n\n /**\n * Convert the Y coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} y\n * @returns {number}\n * @private\n */\n _YconvertDOMtoCanvas(y) {\n return (y - this.body.view.translation.y) / this.body.view.scale;\n }\n\n /**\n * Convert the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the Y coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} y\n * @returns {number}\n * @private\n */\n _YconvertCanvasToDOM(y) {\n return y * this.body.view.scale + this.body.view.translation.y;\n }\n\n /**\n * @param {point} pos\n * @returns {point}\n */\n canvasToDOM(pos) {\n return {\n x: this._XconvertCanvasToDOM(pos.x),\n y: this._YconvertCanvasToDOM(pos.y)\n };\n }\n\n /**\n *\n * @param {point} pos\n * @returns {point}\n */\n DOMtoCanvas(pos) {\n return {\n x: this._XconvertDOMtoCanvas(pos.x),\n y: this._YconvertDOMtoCanvas(pos.y)\n };\n }\n}\n\n/**\n * Validate the fit options, replace missing optional values by defaults etc.\n * @param rawOptions - The raw options.\n * @param allNodeIds - All node ids that will be used if nodes are omitted in\n * the raw options.\n * @returns Options with everything filled in and validated.\n */\nfunction normalizeFitOptions(rawOptions, allNodeIds) {\n const options = _Object$assign({\n nodes: allNodeIds,\n minZoomLevel: Number.MIN_VALUE,\n maxZoomLevel: 1\n }, rawOptions !== null && rawOptions !== void 0 ? rawOptions : {});\n if (!_Array$isArray(options.nodes)) {\n throw new TypeError(\"Nodes has to be an array of ids.\");\n }\n if (options.nodes.length === 0) {\n options.nodes = allNodeIds;\n }\n if (!(typeof options.minZoomLevel === \"number\" && options.minZoomLevel > 0)) {\n throw new TypeError(\"Min zoom level has to be a number higher than zero.\");\n }\n if (!(typeof options.maxZoomLevel === \"number\" && options.minZoomLevel <= options.maxZoomLevel)) {\n throw new TypeError(\"Max zoom level has to be a number higher than min zoom level.\");\n }\n return options;\n}\n\n/**\n * The view\n */\nclass View {\n /**\n * @param {object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n var _context, _context2;\n this.body = body;\n this.canvas = canvas;\n this.animationSpeed = 1 / this.renderRefreshRate;\n this.animationEasingFunction = \"easeInOutQuint\";\n this.easingTime = 0;\n this.sourceScale = 0;\n this.targetScale = 0;\n this.sourceTranslation = 0;\n this.targetTranslation = 0;\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n this.touchTime = 0;\n this.viewFunction = undefined;\n this.body.emitter.on(\"fit\", _bindInstanceProperty(_context = this.fit).call(_context, this));\n this.body.emitter.on(\"animationFinished\", () => {\n this.body.emitter.emit(\"_stopRendering\");\n });\n this.body.emitter.on(\"unlockNode\", _bindInstanceProperty(_context2 = this.releaseNode).call(_context2, this));\n }\n\n /**\n *\n * @param {object} [options]\n */\n setOptions() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.options = options;\n }\n\n /**\n * This function zooms out to fit all data on screen based on amount of nodes\n * @param {object} [options={{nodes=Array}}]\n * @param options\n * @param {boolean} [initialZoom] | zoom based on fitted formula or range, true = fitted, default = false;\n */\n fit(options) {\n let initialZoom = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n options = normalizeFitOptions(options, this.body.nodeIndices);\n const canvasWidth = this.canvas.frame.canvas.clientWidth;\n const canvasHeight = this.canvas.frame.canvas.clientHeight;\n let range;\n let zoomLevel;\n if (canvasWidth === 0 || canvasHeight === 0) {\n // There's no point in trying to fit into zero sized canvas. This could\n // potentially even result in invalid values being computed. For example\n // for network without nodes and zero sized canvas the zoom level would\n // end up being computed as 0/0 which results in NaN. In any other case\n // this would be 0/something which is again pointless to compute.\n zoomLevel = 1;\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n } else if (initialZoom === true) {\n // check if more than half of the nodes have a predefined position. If so, we use the range, not the approximation.\n let positionDefined = 0;\n for (const nodeId in this.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) {\n const node = this.body.nodes[nodeId];\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n }\n }\n if (positionDefined > 0.5 * this.body.nodeIndices.length) {\n this.fit(options, false);\n return;\n }\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n const numberOfNodes = this.body.nodeIndices.length;\n zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good.\n\n // correct for larger canvasses.\n const factor = Math.min(canvasWidth / 600, canvasHeight / 600);\n zoomLevel *= factor;\n } else {\n this.body.emitter.emit(\"_resizeNodes\");\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n const xDistance = Math.abs(range.maxX - range.minX) * 1.1;\n const yDistance = Math.abs(range.maxY - range.minY) * 1.1;\n const xZoomLevel = canvasWidth / xDistance;\n const yZoomLevel = canvasHeight / yDistance;\n zoomLevel = xZoomLevel <= yZoomLevel ? xZoomLevel : yZoomLevel;\n }\n if (zoomLevel > options.maxZoomLevel) {\n zoomLevel = options.maxZoomLevel;\n } else if (zoomLevel < options.minZoomLevel) {\n zoomLevel = options.minZoomLevel;\n }\n const center = NetworkUtil.findCenter(range);\n const animationOptions = {\n position: center,\n scale: zoomLevel,\n animation: options.animation\n };\n this.moveTo(animationOptions);\n }\n\n // animation\n\n /**\n * Center a node in view.\n * @param {number} nodeId\n * @param {number} [options]\n */\n focus(nodeId) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (this.body.nodes[nodeId] !== undefined) {\n const nodePosition = {\n x: this.body.nodes[nodeId].x,\n y: this.body.nodes[nodeId].y\n };\n options.position = nodePosition;\n options.lockedOnNode = nodeId;\n this.moveTo(options);\n } else {\n console.error(\"Node: \" + nodeId + \" cannot be found.\");\n }\n }\n\n /**\n *\n * @param {object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels\n * | options.scale = number // scale to move to\n * | options.position = {x:number, y:number} // position to move to\n * | options.animation = {duration:number, easingFunction:String} || Boolean // position to move to\n */\n moveTo(options) {\n if (options === undefined) {\n options = {};\n return;\n }\n if (options.offset != null) {\n if (options.offset.x != null) {\n // Coerce and verify that x is valid.\n options.offset.x = +options.offset.x;\n if (!_Number$isFinite(options.offset.x)) {\n throw new TypeError('The option \"offset.x\" has to be a finite number.');\n }\n } else {\n options.offset.x = 0;\n }\n if (options.offset.y != null) {\n // Coerce and verify that y is valid.\n options.offset.y = +options.offset.y;\n if (!_Number$isFinite(options.offset.y)) {\n throw new TypeError('The option \"offset.y\" has to be a finite number.');\n }\n } else {\n options.offset.x = 0;\n }\n } else {\n options.offset = {\n x: 0,\n y: 0\n };\n }\n if (options.position != null) {\n if (options.position.x != null) {\n // Coerce and verify that x is valid.\n options.position.x = +options.position.x;\n if (!_Number$isFinite(options.position.x)) {\n throw new TypeError('The option \"position.x\" has to be a finite number.');\n }\n } else {\n options.position.x = 0;\n }\n if (options.position.y != null) {\n // Coerce and verify that y is valid.\n options.position.y = +options.position.y;\n if (!_Number$isFinite(options.position.y)) {\n throw new TypeError('The option \"position.y\" has to be a finite number.');\n }\n } else {\n options.position.x = 0;\n }\n } else {\n options.position = this.getViewPosition();\n }\n if (options.scale != null) {\n // Coerce and verify that the scale is valid.\n options.scale = +options.scale;\n if (!(options.scale > 0)) {\n throw new TypeError('The option \"scale\" has to be a number greater than zero.');\n }\n } else {\n options.scale = this.body.view.scale;\n }\n if (options.animation === undefined) {\n options.animation = {\n duration: 0\n };\n }\n if (options.animation === false) {\n options.animation = {\n duration: 0\n };\n }\n if (options.animation === true) {\n options.animation = {};\n }\n if (options.animation.duration === undefined) {\n options.animation.duration = 1000;\n } // default duration\n if (options.animation.easingFunction === undefined) {\n options.animation.easingFunction = \"easeInOutQuad\";\n } // default easing function\n\n this.animateView(options);\n }\n\n /**\n *\n * @param {object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels\n * | options.time = number // animation time in milliseconds\n * | options.scale = number // scale to animate to\n * | options.position = {x:number, y:number} // position to animate to\n * | options.easingFunction = String // linear, easeInQuad, easeOutQuad, easeInOutQuad,\n * // easeInCubic, easeOutCubic, easeInOutCubic,\n * // easeInQuart, easeOutQuart, easeInOutQuart,\n * // easeInQuint, easeOutQuint, easeInOutQuint\n */\n animateView(options) {\n if (options === undefined) {\n return;\n }\n this.animationEasingFunction = options.animation.easingFunction;\n // release if something focussed on the node\n this.releaseNode();\n if (options.locked === true) {\n this.lockedOnNodeId = options.lockedOnNode;\n this.lockedOnNodeOffset = options.offset;\n }\n\n // forcefully complete the old animation if it was still running\n if (this.easingTime != 0) {\n this._transitionRedraw(true); // by setting easingtime to 1, we finish the animation.\n }\n this.sourceScale = this.body.view.scale;\n this.sourceTranslation = this.body.view.translation;\n this.targetScale = options.scale;\n\n // set the scale so the viewCenter is based on the correct zoom level. This is overridden in the transitionRedraw\n // but at least then we'll have the target transition\n this.body.view.scale = this.targetScale;\n const viewCenter = this.canvas.DOMtoCanvas({\n x: 0.5 * this.canvas.frame.canvas.clientWidth,\n y: 0.5 * this.canvas.frame.canvas.clientHeight\n });\n const distanceFromCenter = {\n // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - options.position.x,\n y: viewCenter.y - options.position.y\n };\n this.targetTranslation = {\n x: this.sourceTranslation.x + distanceFromCenter.x * this.targetScale + options.offset.x,\n y: this.sourceTranslation.y + distanceFromCenter.y * this.targetScale + options.offset.y\n };\n\n // if the time is set to 0, don't do an animation\n if (options.animation.duration === 0) {\n if (this.lockedOnNodeId != undefined) {\n var _context3;\n this.viewFunction = _bindInstanceProperty(_context3 = this._lockedRedraw).call(_context3, this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n } else {\n this.body.view.scale = this.targetScale;\n this.body.view.translation = this.targetTranslation;\n this.body.emitter.emit(\"_requestRedraw\");\n }\n } else {\n var _context4;\n this.animationSpeed = 1 / (60 * options.animation.duration * 0.001) || 1 / 60; // 60 for 60 seconds, 0.001 for milli's\n this.animationEasingFunction = options.animation.easingFunction;\n this.viewFunction = _bindInstanceProperty(_context4 = this._transitionRedraw).call(_context4, this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n\n /**\n * used to animate smoothly by hijacking the redraw function.\n * @private\n */\n _lockedRedraw() {\n const nodePosition = {\n x: this.body.nodes[this.lockedOnNodeId].x,\n y: this.body.nodes[this.lockedOnNodeId].y\n };\n const viewCenter = this.canvas.DOMtoCanvas({\n x: 0.5 * this.canvas.frame.canvas.clientWidth,\n y: 0.5 * this.canvas.frame.canvas.clientHeight\n });\n const distanceFromCenter = {\n // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - nodePosition.x,\n y: viewCenter.y - nodePosition.y\n };\n const sourceTranslation = this.body.view.translation;\n const targetTranslation = {\n x: sourceTranslation.x + distanceFromCenter.x * this.body.view.scale + this.lockedOnNodeOffset.x,\n y: sourceTranslation.y + distanceFromCenter.y * this.body.view.scale + this.lockedOnNodeOffset.y\n };\n this.body.view.translation = targetTranslation;\n }\n\n /**\n * Resets state of a locked on Node\n */\n releaseNode() {\n if (this.lockedOnNodeId !== undefined && this.viewFunction !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n }\n }\n\n /**\n * @param {boolean} [finished]\n * @private\n */\n _transitionRedraw() {\n let finished = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.easingTime += this.animationSpeed;\n this.easingTime = finished === true ? 1.0 : this.easingTime;\n const progress = easingFunctions[this.animationEasingFunction](this.easingTime);\n this.body.view.scale = this.sourceScale + (this.targetScale - this.sourceScale) * progress;\n this.body.view.translation = {\n x: this.sourceTranslation.x + (this.targetTranslation.x - this.sourceTranslation.x) * progress,\n y: this.sourceTranslation.y + (this.targetTranslation.y - this.sourceTranslation.y) * progress\n };\n\n // cleanup\n if (this.easingTime >= 1.0) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.easingTime = 0;\n if (this.lockedOnNodeId != undefined) {\n var _context5;\n this.viewFunction = _bindInstanceProperty(_context5 = this._lockedRedraw).call(_context5, this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n }\n this.body.emitter.emit(\"animationFinished\");\n }\n }\n\n /**\n *\n * @returns {number}\n */\n getScale() {\n return this.body.view.scale;\n }\n\n /**\n *\n * @returns {{x: number, y: number}}\n */\n getViewPosition() {\n return this.canvas.DOMtoCanvas({\n x: 0.5 * this.canvas.frame.canvas.clientWidth,\n y: 0.5 * this.canvas.frame.canvas.clientHeight\n });\n }\n}\n\n/**\r\n * Created by Alex on 11/6/2014.\r\n */\r\nfunction keycharm(options) {\r\n var preventDefault = options && options.preventDefault || false;\r\n\r\n var container = options && options.container || window;\r\n\r\n var _exportFunctions = {};\r\n var _bound = {keydown:{}, keyup:{}};\r\n var _keys = {};\r\n var i;\r\n\r\n // a - z\r\n for (i = 97; i <= 122; i++) {_keys[String.fromCharCode(i)] = {code:65 + (i - 97), shift: false};}\r\n // A - Z\r\n for (i = 65; i <= 90; i++) {_keys[String.fromCharCode(i)] = {code:i, shift: true};}\r\n // 0 - 9\r\n for (i = 0; i <= 9; i++) {_keys['' + i] = {code:48 + i, shift: false};}\r\n // F1 - F12\r\n for (i = 1; i <= 12; i++) {_keys['F' + i] = {code:111 + i, shift: false};}\r\n // num0 - num9\r\n for (i = 0; i <= 9; i++) {_keys['num' + i] = {code:96 + i, shift: false};}\r\n\r\n // numpad misc\r\n _keys['num*'] = {code:106, shift: false};\r\n _keys['num+'] = {code:107, shift: false};\r\n _keys['num-'] = {code:109, shift: false};\r\n _keys['num/'] = {code:111, shift: false};\r\n _keys['num.'] = {code:110, shift: false};\r\n // arrows\r\n _keys['left'] = {code:37, shift: false};\r\n _keys['up'] = {code:38, shift: false};\r\n _keys['right'] = {code:39, shift: false};\r\n _keys['down'] = {code:40, shift: false};\r\n // extra keys\r\n _keys['space'] = {code:32, shift: false};\r\n _keys['enter'] = {code:13, shift: false};\r\n _keys['shift'] = {code:16, shift: undefined};\r\n _keys['esc'] = {code:27, shift: false};\r\n _keys['backspace'] = {code:8, shift: false};\r\n _keys['tab'] = {code:9, shift: false};\r\n _keys['ctrl'] = {code:17, shift: false};\r\n _keys['alt'] = {code:18, shift: false};\r\n _keys['delete'] = {code:46, shift: false};\r\n _keys['pageup'] = {code:33, shift: false};\r\n _keys['pagedown'] = {code:34, shift: false};\r\n // symbols\r\n _keys['='] = {code:187, shift: false};\r\n _keys['-'] = {code:189, shift: false};\r\n _keys[']'] = {code:221, shift: false};\r\n _keys['['] = {code:219, shift: false};\r\n\r\n\r\n\r\n var down = function(event) {handleEvent(event,'keydown');};\r\n var up = function(event) {handleEvent(event,'keyup');};\r\n\r\n // handle the actualy bound key with the event\r\n var handleEvent = function(event,type) {\r\n if (_bound[type][event.keyCode] !== undefined) {\r\n var bound = _bound[type][event.keyCode];\r\n for (var i = 0; i < bound.length; i++) {\r\n if (bound[i].shift === undefined) {\r\n bound[i].fn(event);\r\n }\r\n else if (bound[i].shift == true && event.shiftKey == true) {\r\n bound[i].fn(event);\r\n }\r\n else if (bound[i].shift == false && event.shiftKey == false) {\r\n bound[i].fn(event);\r\n }\r\n }\r\n\r\n if (preventDefault == true) {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n // bind a key to a callback\r\n _exportFunctions.bind = function(key, callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n if (_keys[key] === undefined) {\r\n throw new Error(\"unsupported key: \" + key);\r\n }\r\n if (_bound[type][_keys[key].code] === undefined) {\r\n _bound[type][_keys[key].code] = [];\r\n }\r\n _bound[type][_keys[key].code].push({fn:callback, shift:_keys[key].shift});\r\n };\r\n\r\n\r\n // bind all keys to a call back (demo purposes)\r\n _exportFunctions.bindAll = function(callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n for (var key in _keys) {\r\n if (_keys.hasOwnProperty(key)) {\r\n _exportFunctions.bind(key,callback,type);\r\n }\r\n }\r\n };\r\n\r\n // get the key label from an event\r\n _exportFunctions.getKey = function(event) {\r\n for (var key in _keys) {\r\n if (_keys.hasOwnProperty(key)) {\r\n if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) {\r\n return key;\r\n }\r\n else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) {\r\n return key;\r\n }\r\n else if (event.keyCode == _keys[key].code && key == 'shift') {\r\n return key;\r\n }\r\n }\r\n }\r\n return \"unknown key, currently not supported\";\r\n };\r\n\r\n // unbind either a specific callback from a key or all of them (by leaving callback undefined)\r\n _exportFunctions.unbind = function(key, callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n if (_keys[key] === undefined) {\r\n throw new Error(\"unsupported key: \" + key);\r\n }\r\n if (callback !== undefined) {\r\n var newBindings = [];\r\n var bound = _bound[type][_keys[key].code];\r\n if (bound !== undefined) {\r\n for (var i = 0; i < bound.length; i++) {\r\n if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) {\r\n newBindings.push(_bound[type][_keys[key].code][i]);\r\n }\r\n }\r\n }\r\n _bound[type][_keys[key].code] = newBindings;\r\n }\r\n else {\r\n _bound[type][_keys[key].code] = [];\r\n }\r\n };\r\n\r\n // reset all bound variables.\r\n _exportFunctions.reset = function() {\r\n _bound = {keydown:{}, keyup:{}};\r\n };\r\n\r\n // unbind all listeners and reset all variables.\r\n _exportFunctions.destroy = function() {\r\n _bound = {keydown:{}, keyup:{}};\r\n container.removeEventListener('keydown', down, true);\r\n container.removeEventListener('keyup', up, true);\r\n };\r\n\r\n // create listeners.\r\n container.addEventListener('keydown',down,true);\r\n container.addEventListener('keyup',up,true);\r\n\r\n // return the public functions.\r\n return _exportFunctions;\r\n}\n\n/**\n * Navigation Handler\n */\nclass NavigationHandler {\n /**\n * @param {object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n this.iconsCreated = false;\n this.navigationHammers = [];\n this.boundFunctions = {};\n this.touchTime = 0;\n this.activated = false;\n this.body.emitter.on(\"activate\", () => {\n this.activated = true;\n this.configureKeyboardBindings();\n });\n this.body.emitter.on(\"deactivate\", () => {\n this.activated = false;\n this.configureKeyboardBindings();\n });\n this.body.emitter.on(\"destroy\", () => {\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n });\n this.options = {};\n }\n\n /**\n *\n * @param {object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n this.options = options;\n this.create();\n }\n }\n\n /**\n * Creates or refreshes navigation and sets key bindings\n */\n create() {\n if (this.options.navigationButtons === true) {\n if (this.iconsCreated === false) {\n this.loadNavigationElements();\n }\n } else if (this.iconsCreated === true) {\n this.cleanNavigation();\n }\n this.configureKeyboardBindings();\n }\n\n /**\n * Cleans up previous navigation items\n */\n cleanNavigation() {\n // clean hammer bindings\n if (this.navigationHammers.length != 0) {\n for (let i = 0; i < this.navigationHammers.length; i++) {\n this.navigationHammers[i].destroy();\n }\n this.navigationHammers = [];\n }\n\n // clean up previous navigation items\n if (this.navigationDOM && this.navigationDOM[\"wrapper\"] && this.navigationDOM[\"wrapper\"].parentNode) {\n this.navigationDOM[\"wrapper\"].parentNode.removeChild(this.navigationDOM[\"wrapper\"]);\n }\n this.iconsCreated = false;\n }\n\n /**\n * Creation of the navigation controls nodes. They are drawn over the rest of the nodes and are not affected by scale and translation\n * they have a triggerFunction which is called on click. If the position of the navigation controls is dependent\n * on this.frame.canvas.clientWidth or this.frame.canvas.clientHeight, we flag horizontalAlignLeft and verticalAlignTop false.\n * This means that the location will be corrected by the _relocateNavigation function on a size change of the canvas.\n * @private\n */\n loadNavigationElements() {\n this.cleanNavigation();\n this.navigationDOM = {};\n const navigationDivs = [\"up\", \"down\", \"left\", \"right\", \"zoomIn\", \"zoomOut\", \"zoomExtends\"];\n const navigationDivActions = [\"_moveUp\", \"_moveDown\", \"_moveLeft\", \"_moveRight\", \"_zoomIn\", \"_zoomOut\", \"_fit\"];\n this.navigationDOM[\"wrapper\"] = document.createElement(\"div\");\n this.navigationDOM[\"wrapper\"].className = \"vis-navigation\";\n this.canvas.frame.appendChild(this.navigationDOM[\"wrapper\"]);\n for (let i = 0; i < navigationDivs.length; i++) {\n this.navigationDOM[navigationDivs[i]] = document.createElement(\"div\");\n this.navigationDOM[navigationDivs[i]].className = \"vis-button vis-\" + navigationDivs[i];\n this.navigationDOM[\"wrapper\"].appendChild(this.navigationDOM[navigationDivs[i]]);\n const hammer = new Hammer(this.navigationDOM[navigationDivs[i]]);\n if (navigationDivActions[i] === \"_fit\") {\n var _context;\n onTouch(hammer, _bindInstanceProperty(_context = this._fit).call(_context, this));\n } else {\n var _context2;\n onTouch(hammer, _bindInstanceProperty(_context2 = this.bindToRedraw).call(_context2, this, navigationDivActions[i]));\n }\n this.navigationHammers.push(hammer);\n }\n\n // use a hammer for the release so we do not require the one used in the rest of the network\n // the one the rest uses can be overloaded by the manipulation system.\n const hammerFrame = new Hammer(this.canvas.frame);\n onRelease(hammerFrame, () => {\n this._stopMovement();\n });\n this.navigationHammers.push(hammerFrame);\n this.iconsCreated = true;\n }\n\n /**\n *\n * @param {string} action\n */\n bindToRedraw(action) {\n if (this.boundFunctions[action] === undefined) {\n var _context3;\n this.boundFunctions[action] = _bindInstanceProperty(_context3 = this[action]).call(_context3, this);\n this.body.emitter.on(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n\n /**\n *\n * @param {string} action\n */\n unbindFromRedraw(action) {\n if (this.boundFunctions[action] !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_stopRendering\");\n delete this.boundFunctions[action];\n }\n }\n\n /**\n * this stops all movement induced by the navigation buttons\n * @private\n */\n _fit() {\n if (new Date().valueOf() - this.touchTime > 700) {\n // TODO: fix ugly hack to avoid hammer's double fireing of event (because we use release?)\n this.body.emitter.emit(\"fit\", {\n duration: 700\n });\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n * this stops all movement induced by the navigation buttons\n * @private\n */\n _stopMovement() {\n for (const boundAction in this.boundFunctions) {\n if (Object.prototype.hasOwnProperty.call(this.boundFunctions, boundAction)) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[boundAction]);\n this.body.emitter.emit(\"_stopRendering\");\n }\n }\n this.boundFunctions = {};\n }\n /**\n *\n * @private\n */\n _moveUp() {\n this.body.view.translation.y += this.options.keyboard.speed.y;\n }\n /**\n *\n * @private\n */\n _moveDown() {\n this.body.view.translation.y -= this.options.keyboard.speed.y;\n }\n /**\n *\n * @private\n */\n _moveLeft() {\n this.body.view.translation.x += this.options.keyboard.speed.x;\n }\n /**\n *\n * @private\n */\n _moveRight() {\n this.body.view.translation.x -= this.options.keyboard.speed.x;\n }\n /**\n *\n * @private\n */\n _zoomIn() {\n const scaleOld = this.body.view.scale;\n const scale = this.body.view.scale * (1 + this.options.keyboard.speed.zoom);\n const translation = this.body.view.translation;\n const scaleFrac = scale / scaleOld;\n const tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n const ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n this.body.view.scale = scale;\n this.body.view.translation = {\n x: tx,\n y: ty\n };\n this.body.emitter.emit(\"zoom\", {\n direction: \"+\",\n scale: this.body.view.scale,\n pointer: null\n });\n }\n\n /**\n *\n * @private\n */\n _zoomOut() {\n const scaleOld = this.body.view.scale;\n const scale = this.body.view.scale / (1 + this.options.keyboard.speed.zoom);\n const translation = this.body.view.translation;\n const scaleFrac = scale / scaleOld;\n const tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n const ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n this.body.view.scale = scale;\n this.body.view.translation = {\n x: tx,\n y: ty\n };\n this.body.emitter.emit(\"zoom\", {\n direction: \"-\",\n scale: this.body.view.scale,\n pointer: null\n });\n }\n\n /**\n * bind all keys using keycharm.\n */\n configureKeyboardBindings() {\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n if (this.options.keyboard.enabled === true) {\n if (this.options.keyboard.bindToWindow === true) {\n this.keycharm = keycharm({\n container: window,\n preventDefault: true\n });\n } else {\n this.keycharm = keycharm({\n container: this.canvas.frame,\n preventDefault: true\n });\n }\n this.keycharm.reset();\n if (this.activated === true) {\n var _context4, _context5, _context6, _context7, _context8, _context9, _context0, _context1, _context10, _context11, _context12, _context13, _context14, _context15, _context16, _context17, _context18, _context19, _context20, _context21, _context22, _context23, _context24, _context25;\n _bindInstanceProperty(_context4 = this.keycharm).call(_context4, \"up\", () => {\n this.bindToRedraw(\"_moveUp\");\n }, \"keydown\");\n _bindInstanceProperty(_context5 = this.keycharm).call(_context5, \"down\", () => {\n this.bindToRedraw(\"_moveDown\");\n }, \"keydown\");\n _bindInstanceProperty(_context6 = this.keycharm).call(_context6, \"left\", () => {\n this.bindToRedraw(\"_moveLeft\");\n }, \"keydown\");\n _bindInstanceProperty(_context7 = this.keycharm).call(_context7, \"right\", () => {\n this.bindToRedraw(\"_moveRight\");\n }, \"keydown\");\n _bindInstanceProperty(_context8 = this.keycharm).call(_context8, \"=\", () => {\n this.bindToRedraw(\"_zoomIn\");\n }, \"keydown\");\n _bindInstanceProperty(_context9 = this.keycharm).call(_context9, \"num+\", () => {\n this.bindToRedraw(\"_zoomIn\");\n }, \"keydown\");\n _bindInstanceProperty(_context0 = this.keycharm).call(_context0, \"num-\", () => {\n this.bindToRedraw(\"_zoomOut\");\n }, \"keydown\");\n _bindInstanceProperty(_context1 = this.keycharm).call(_context1, \"-\", () => {\n this.bindToRedraw(\"_zoomOut\");\n }, \"keydown\");\n _bindInstanceProperty(_context10 = this.keycharm).call(_context10, \"[\", () => {\n this.bindToRedraw(\"_zoomOut\");\n }, \"keydown\");\n _bindInstanceProperty(_context11 = this.keycharm).call(_context11, \"]\", () => {\n this.bindToRedraw(\"_zoomIn\");\n }, \"keydown\");\n _bindInstanceProperty(_context12 = this.keycharm).call(_context12, \"pageup\", () => {\n this.bindToRedraw(\"_zoomIn\");\n }, \"keydown\");\n _bindInstanceProperty(_context13 = this.keycharm).call(_context13, \"pagedown\", () => {\n this.bindToRedraw(\"_zoomOut\");\n }, \"keydown\");\n _bindInstanceProperty(_context14 = this.keycharm).call(_context14, \"up\", () => {\n this.unbindFromRedraw(\"_moveUp\");\n }, \"keyup\");\n _bindInstanceProperty(_context15 = this.keycharm).call(_context15, \"down\", () => {\n this.unbindFromRedraw(\"_moveDown\");\n }, \"keyup\");\n _bindInstanceProperty(_context16 = this.keycharm).call(_context16, \"left\", () => {\n this.unbindFromRedraw(\"_moveLeft\");\n }, \"keyup\");\n _bindInstanceProperty(_context17 = this.keycharm).call(_context17, \"right\", () => {\n this.unbindFromRedraw(\"_moveRight\");\n }, \"keyup\");\n _bindInstanceProperty(_context18 = this.keycharm).call(_context18, \"=\", () => {\n this.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\");\n _bindInstanceProperty(_context19 = this.keycharm).call(_context19, \"num+\", () => {\n this.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\");\n _bindInstanceProperty(_context20 = this.keycharm).call(_context20, \"num-\", () => {\n this.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\");\n _bindInstanceProperty(_context21 = this.keycharm).call(_context21, \"-\", () => {\n this.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\");\n _bindInstanceProperty(_context22 = this.keycharm).call(_context22, \"[\", () => {\n this.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\");\n _bindInstanceProperty(_context23 = this.keycharm).call(_context23, \"]\", () => {\n this.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\");\n _bindInstanceProperty(_context24 = this.keycharm).call(_context24, \"pageup\", () => {\n this.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\");\n _bindInstanceProperty(_context25 = this.keycharm).call(_context25, \"pagedown\", () => {\n this.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\");\n }\n }\n }\n}\n\n/**\n * Handler for interactions\n */\nclass InteractionHandler {\n /**\n * @param {object} body\n * @param {Canvas} canvas\n * @param {SelectionHandler} selectionHandler\n */\n constructor(body, canvas, selectionHandler) {\n var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context0, _context1, _context10, _context11;\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n this.navigationHandler = new NavigationHandler(body, canvas);\n\n // bind the events from hammer to functions in this object\n this.body.eventListeners.onTap = _bindInstanceProperty(_context = this.onTap).call(_context, this);\n this.body.eventListeners.onTouch = _bindInstanceProperty(_context2 = this.onTouch).call(_context2, this);\n this.body.eventListeners.onDoubleTap = _bindInstanceProperty(_context3 = this.onDoubleTap).call(_context3, this);\n this.body.eventListeners.onHold = _bindInstanceProperty(_context4 = this.onHold).call(_context4, this);\n this.body.eventListeners.onDragStart = _bindInstanceProperty(_context5 = this.onDragStart).call(_context5, this);\n this.body.eventListeners.onDrag = _bindInstanceProperty(_context6 = this.onDrag).call(_context6, this);\n this.body.eventListeners.onDragEnd = _bindInstanceProperty(_context7 = this.onDragEnd).call(_context7, this);\n this.body.eventListeners.onMouseWheel = _bindInstanceProperty(_context8 = this.onMouseWheel).call(_context8, this);\n this.body.eventListeners.onPinch = _bindInstanceProperty(_context9 = this.onPinch).call(_context9, this);\n this.body.eventListeners.onMouseMove = _bindInstanceProperty(_context0 = this.onMouseMove).call(_context0, this);\n this.body.eventListeners.onRelease = _bindInstanceProperty(_context1 = this.onRelease).call(_context1, this);\n this.body.eventListeners.onContext = _bindInstanceProperty(_context10 = this.onContext).call(_context10, this);\n this.touchTime = 0;\n this.drag = {};\n this.pinch = {};\n this.popup = undefined;\n this.popupObj = undefined;\n this.popupTimer = undefined;\n this.body.functions.getPointer = _bindInstanceProperty(_context11 = this.getPointer).call(_context11, this);\n this.options = {};\n this.defaultOptions = {\n dragNodes: true,\n dragView: true,\n hover: false,\n keyboard: {\n enabled: false,\n speed: {\n x: 10,\n y: 10,\n zoom: 0.02\n },\n bindToWindow: true,\n autoFocus: true\n },\n navigationButtons: false,\n tooltipDelay: 300,\n zoomView: true,\n zoomSpeed: 1\n };\n _Object$assign(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on(\"destroy\", () => {\n clearTimeout(this.popupTimer);\n delete this.body.functions.getPointer;\n });\n }\n\n /**\n *\n * @param {object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // extend all but the values in fields\n const fields = [\"hideEdgesOnDrag\", \"hideEdgesOnZoom\", \"hideNodesOnDrag\", \"keyboard\", \"multiselect\", \"selectable\", \"selectConnectedEdges\"];\n selectiveNotDeepExtend(fields, this.options, options);\n\n // merge the keyboard options in.\n mergeOptions(this.options, options, \"keyboard\");\n if (options.tooltip) {\n _Object$assign(this.options.tooltip, options.tooltip);\n if (options.tooltip.color) {\n this.options.tooltip.color = parseColor(options.tooltip.color);\n }\n }\n }\n this.navigationHandler.setOptions(this.options);\n }\n\n /**\n * Get the pointer location from a touch location\n * @param {{x: number, y: number}} touch\n * @returns {{x: number, y: number}} pointer\n * @private\n */\n getPointer(touch) {\n return {\n x: touch.x - getAbsoluteLeft(this.canvas.frame.canvas),\n y: touch.y - getAbsoluteTop(this.canvas.frame.canvas)\n };\n }\n\n /**\n * On start of a touch gesture, store the pointer\n * @param {Event} event The event\n * @private\n */\n onTouch(event) {\n if (new Date().valueOf() - this.touchTime > 50) {\n this.drag.pointer = this.getPointer(event.center);\n this.drag.pinched = false;\n this.pinch.scale = this.body.view.scale;\n // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n * handle tap/click event: select/unselect a node\n * @param {Event} event\n * @private\n */\n onTap(event) {\n const pointer = this.getPointer(event.center);\n const multiselect = this.selectionHandler.options.multiselect && (event.changedPointers[0].ctrlKey || event.changedPointers[0].metaKey);\n this.checkSelectionChanges(pointer, multiselect);\n this.selectionHandler.commitAndEmit(pointer, event);\n this.selectionHandler.generateClickEvent(\"click\", event, pointer);\n }\n\n /**\n * handle doubletap event\n * @param {Event} event\n * @private\n */\n onDoubleTap(event) {\n const pointer = this.getPointer(event.center);\n this.selectionHandler.generateClickEvent(\"doubleClick\", event, pointer);\n }\n\n /**\n * handle long tap event: multi select nodes\n * @param {Event} event\n * @private\n */\n onHold(event) {\n const pointer = this.getPointer(event.center);\n const multiselect = this.selectionHandler.options.multiselect;\n this.checkSelectionChanges(pointer, multiselect);\n this.selectionHandler.commitAndEmit(pointer, event);\n this.selectionHandler.generateClickEvent(\"click\", event, pointer);\n this.selectionHandler.generateClickEvent(\"hold\", event, pointer);\n }\n\n /**\n * handle the release of the screen\n * @param {Event} event\n * @private\n */\n onRelease(event) {\n if (new Date().valueOf() - this.touchTime > 10) {\n const pointer = this.getPointer(event.center);\n this.selectionHandler.generateClickEvent(\"release\", event, pointer);\n // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n *\n * @param {Event} event\n */\n onContext(event) {\n const pointer = this.getPointer({\n x: event.clientX,\n y: event.clientY\n });\n this.selectionHandler.generateClickEvent(\"oncontext\", event, pointer);\n }\n\n /**\n * Select and deselect nodes depending current selection change.\n * @param {{x: number, y: number}} pointer\n * @param {boolean} [add]\n */\n checkSelectionChanges(pointer) {\n let add = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (add === true) {\n this.selectionHandler.selectAdditionalOnPoint(pointer);\n } else {\n this.selectionHandler.selectOnPoint(pointer);\n }\n }\n\n /**\n * Remove all node and edge id's from the first set that are present in the second one.\n * @param {{nodes: Array.<Node>, edges: Array.<vis.Edge>}} firstSet\n * @param {{nodes: Array.<Node>, edges: Array.<vis.Edge>}} secondSet\n * @returns {{nodes: Array.<Node>, edges: Array.<vis.Edge>}}\n * @private\n */\n _determineDifference(firstSet, secondSet) {\n const arrayDiff = function (firstArr, secondArr) {\n const result = [];\n for (let i = 0; i < firstArr.length; i++) {\n const value = firstArr[i];\n if (_indexOfInstanceProperty(secondArr).call(secondArr, value) === -1) {\n result.push(value);\n }\n }\n return result;\n };\n return {\n nodes: arrayDiff(firstSet.nodes, secondSet.nodes),\n edges: arrayDiff(firstSet.edges, secondSet.edges)\n };\n }\n\n /**\n * This function is called by onDragStart.\n * It is separated out because we can then overload it for the datamanipulation system.\n * @param {Event} event\n * @private\n */\n onDragStart(event) {\n // if already dragging, do not start\n // this can happen on touch screens with multiple fingers\n if (this.drag.dragging) {\n return;\n }\n\n //in case the touch event was triggered on an external div, do the initial touch now.\n if (this.drag.pointer === undefined) {\n this.onTouch(event);\n }\n\n // note: drag.pointer is set in onTouch to get the initial touch location\n const node = this.selectionHandler.getNodeAt(this.drag.pointer);\n this.drag.dragging = true;\n this.drag.selection = [];\n this.drag.translation = _Object$assign({}, this.body.view.translation); // copy the object\n this.drag.nodeId = undefined;\n if (event.srcEvent.shiftKey) {\n this.body.selectionBox.show = true;\n const pointer = this.getPointer(event.center);\n this.body.selectionBox.position.start = {\n x: this.canvas._XconvertDOMtoCanvas(pointer.x),\n y: this.canvas._YconvertDOMtoCanvas(pointer.y)\n };\n this.body.selectionBox.position.end = {\n x: this.canvas._XconvertDOMtoCanvas(pointer.x),\n y: this.canvas._YconvertDOMtoCanvas(pointer.y)\n };\n } else if (node !== undefined && this.options.dragNodes === true) {\n this.drag.nodeId = node.id;\n // select the clicked node if not yet selected\n if (node.isSelected() === false) {\n this.selectionHandler.setSelection({\n nodes: [node.id]\n });\n }\n\n // after select to contain the node\n this.selectionHandler.generateClickEvent(\"dragStart\", event, this.drag.pointer);\n\n // create an array with the selected nodes and their original location and status\n for (const node of this.selectionHandler.getSelectedNodes()) {\n const s = {\n id: node.id,\n node: node,\n // store original x, y, xFixed and yFixed, make the node temporarily Fixed\n x: node.x,\n y: node.y,\n xFixed: node.options.fixed.x,\n yFixed: node.options.fixed.y\n };\n node.options.fixed.x = true;\n node.options.fixed.y = true;\n this.drag.selection.push(s);\n }\n } else {\n // fallback if no node is selected and thus the view is dragged.\n this.selectionHandler.generateClickEvent(\"dragStart\", event, this.drag.pointer, undefined, true);\n }\n }\n\n /**\n * handle drag event\n * @param {Event} event\n * @private\n */\n onDrag(event) {\n if (this.drag.pinched === true) {\n return;\n }\n\n // remove the focus on node if it is focussed on by the focusOnNode\n this.body.emitter.emit(\"unlockNode\");\n const pointer = this.getPointer(event.center);\n const selection = this.drag.selection;\n if (selection && selection.length && this.options.dragNodes === true) {\n this.selectionHandler.generateClickEvent(\"dragging\", event, pointer);\n\n // calculate delta's and new location\n const deltaX = pointer.x - this.drag.pointer.x;\n const deltaY = pointer.y - this.drag.pointer.y;\n\n // update position of all selected nodes\n _forEachInstanceProperty(selection).call(selection, selection => {\n const node = selection.node;\n // only move the node if it was not fixed initially\n if (selection.xFixed === false) {\n node.x = this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(selection.x) + deltaX);\n }\n // only move the node if it was not fixed initially\n if (selection.yFixed === false) {\n node.y = this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(selection.y) + deltaY);\n }\n });\n\n // start the simulation of the physics\n this.body.emitter.emit(\"startSimulation\");\n } else {\n // create selection box\n if (event.srcEvent.shiftKey) {\n this.selectionHandler.generateClickEvent(\"dragging\", event, pointer, undefined, true);\n\n // if the drag was not started properly because the click started outside the network div, start it now.\n if (this.drag.pointer === undefined) {\n this.onDragStart(event);\n return;\n }\n this.body.selectionBox.position.end = {\n x: this.canvas._XconvertDOMtoCanvas(pointer.x),\n y: this.canvas._YconvertDOMtoCanvas(pointer.y)\n };\n this.body.emitter.emit(\"_requestRedraw\");\n }\n\n // move the network\n if (this.options.dragView === true && !event.srcEvent.shiftKey) {\n this.selectionHandler.generateClickEvent(\"dragging\", event, pointer, undefined, true);\n\n // if the drag was not started properly because the click started outside the network div, start it now.\n if (this.drag.pointer === undefined) {\n this.onDragStart(event);\n return;\n }\n const diffX = pointer.x - this.drag.pointer.x;\n const diffY = pointer.y - this.drag.pointer.y;\n this.body.view.translation = {\n x: this.drag.translation.x + diffX,\n y: this.drag.translation.y + diffY\n };\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n }\n\n /**\n * handle drag start event\n * @param {Event} event\n * @private\n */\n onDragEnd(event) {\n this.drag.dragging = false;\n if (this.body.selectionBox.show) {\n var _context12;\n this.body.selectionBox.show = false;\n const selectionBoxPosition = this.body.selectionBox.position;\n const selectionBoxPositionMinMax = {\n minX: Math.min(selectionBoxPosition.start.x, selectionBoxPosition.end.x),\n minY: Math.min(selectionBoxPosition.start.y, selectionBoxPosition.end.y),\n maxX: Math.max(selectionBoxPosition.start.x, selectionBoxPosition.end.x),\n maxY: Math.max(selectionBoxPosition.start.y, selectionBoxPosition.end.y)\n };\n const toBeSelectedNodes = _filterInstanceProperty(_context12 = this.body.nodeIndices).call(_context12, nodeId => {\n const node = this.body.nodes[nodeId];\n return node.x >= selectionBoxPositionMinMax.minX && node.x <= selectionBoxPositionMinMax.maxX && node.y >= selectionBoxPositionMinMax.minY && node.y <= selectionBoxPositionMinMax.maxY;\n });\n _forEachInstanceProperty(toBeSelectedNodes).call(toBeSelectedNodes, nodeId => this.selectionHandler.selectObject(this.body.nodes[nodeId]));\n const pointer = this.getPointer(event.center);\n this.selectionHandler.commitAndEmit(pointer, event);\n this.selectionHandler.generateClickEvent(\"dragEnd\", event, this.getPointer(event.center), undefined, true);\n this.body.emitter.emit(\"_requestRedraw\");\n } else {\n const selection = this.drag.selection;\n if (selection && selection.length) {\n _forEachInstanceProperty(selection).call(selection, function (s) {\n // restore original xFixed and yFixed\n s.node.options.fixed.x = s.xFixed;\n s.node.options.fixed.y = s.yFixed;\n });\n this.selectionHandler.generateClickEvent(\"dragEnd\", event, this.getPointer(event.center));\n this.body.emitter.emit(\"startSimulation\");\n } else {\n this.selectionHandler.generateClickEvent(\"dragEnd\", event, this.getPointer(event.center), undefined, true);\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n }\n\n /**\n * Handle pinch event\n * @param {Event} event The event\n * @private\n */\n onPinch(event) {\n const pointer = this.getPointer(event.center);\n this.drag.pinched = true;\n if (this.pinch[\"scale\"] === undefined) {\n this.pinch.scale = 1;\n }\n\n // TODO: enabled moving while pinching?\n const scale = this.pinch.scale * event.scale;\n this.zoom(scale, pointer);\n }\n\n /**\n * Zoom the network in or out\n * @param {number} scale a number around 1, and between 0.01 and 10\n * @param {{x: number, y: number}} pointer Position on screen\n * @private\n */\n zoom(scale, pointer) {\n if (this.options.zoomView === true) {\n const scaleOld = this.body.view.scale;\n if (scale < 0.00001) {\n scale = 0.00001;\n }\n if (scale > 10) {\n scale = 10;\n }\n let preScaleDragPointer = undefined;\n if (this.drag !== undefined) {\n if (this.drag.dragging === true) {\n preScaleDragPointer = this.canvas.DOMtoCanvas(this.drag.pointer);\n }\n }\n // + this.canvas.frame.canvas.clientHeight / 2\n const translation = this.body.view.translation;\n const scaleFrac = scale / scaleOld;\n const tx = (1 - scaleFrac) * pointer.x + translation.x * scaleFrac;\n const ty = (1 - scaleFrac) * pointer.y + translation.y * scaleFrac;\n this.body.view.scale = scale;\n this.body.view.translation = {\n x: tx,\n y: ty\n };\n if (preScaleDragPointer != undefined) {\n const postScaleDragPointer = this.canvas.canvasToDOM(preScaleDragPointer);\n this.drag.pointer.x = postScaleDragPointer.x;\n this.drag.pointer.y = postScaleDragPointer.y;\n }\n this.body.emitter.emit(\"_requestRedraw\");\n if (scaleOld < scale) {\n this.body.emitter.emit(\"zoom\", {\n direction: \"+\",\n scale: this.body.view.scale,\n pointer: pointer\n });\n } else {\n this.body.emitter.emit(\"zoom\", {\n direction: \"-\",\n scale: this.body.view.scale,\n pointer: pointer\n });\n }\n }\n }\n\n /**\n * Event handler for mouse wheel event, used to zoom the timeline\n * See http://adomas.org/javascript-mouse-wheel/\n * https://github.com/EightMedia/hammer.js/issues/256\n * @param {MouseEvent} event\n * @private\n */\n onMouseWheel(event) {\n if (this.options.zoomView === true) {\n // If delta is nonzero, handle it.\n // Basically, delta is now positive if wheel was scrolled up,\n // and negative, if wheel was scrolled down.\n if (event.deltaY !== 0) {\n // calculate the new scale\n let scale = this.body.view.scale;\n scale *= 1 + (event.deltaY < 0 ? 1 : -1) * (this.options.zoomSpeed * 0.1);\n\n // calculate the pointer location\n const pointer = this.getPointer({\n x: event.clientX,\n y: event.clientY\n });\n\n // apply the new scale\n this.zoom(scale, pointer);\n }\n\n // Prevent default actions caused by mouse wheel.\n event.preventDefault();\n }\n }\n\n /**\n * Mouse move handler for checking whether the title moves over a node with a title.\n * @param {Event} event\n * @private\n */\n onMouseMove(event) {\n const pointer = this.getPointer({\n x: event.clientX,\n y: event.clientY\n });\n let popupVisible = false;\n\n // check if the previously selected node is still selected\n if (this.popup !== undefined) {\n if (this.popup.hidden === false) {\n this._checkHidePopup(pointer);\n }\n\n // if the popup was not hidden above\n if (this.popup.hidden === false) {\n popupVisible = true;\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.show();\n }\n }\n\n // if we bind the keyboard to the div, we have to highlight it to use it. This highlights it on mouse over.\n if (this.options.keyboard.autoFocus && this.options.keyboard.bindToWindow === false && this.options.keyboard.enabled === true) {\n this.canvas.frame.focus();\n }\n\n // start a timeout that will check if the mouse is positioned above an element\n if (popupVisible === false) {\n if (this.popupTimer !== undefined) {\n clearInterval(this.popupTimer); // stop any running calculationTimer\n this.popupTimer = undefined;\n }\n if (!this.drag.dragging) {\n this.popupTimer = _setTimeout(() => this._checkShowPopup(pointer), this.options.tooltipDelay);\n }\n }\n\n // adding hover highlights\n if (this.options.hover === true) {\n this.selectionHandler.hoverObject(event, pointer);\n }\n }\n\n /**\n * Check if there is an element on the given position in the network\n * (a node or edge). If so, and if this element has a title,\n * show a popup window with its title.\n * @param {{x:number, y:number}} pointer\n * @private\n */\n _checkShowPopup(pointer) {\n const x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n const y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n const pointerObj = {\n left: x,\n top: y,\n right: x,\n bottom: y\n };\n const previousPopupObjId = this.popupObj === undefined ? undefined : this.popupObj.id;\n let nodeUnderCursor = false;\n let popupType = \"node\";\n\n // check if a node is under the cursor.\n if (this.popupObj === undefined) {\n // search the nodes for overlap, select the top one in case of multiple nodes\n const nodeIndices = this.body.nodeIndices;\n const nodes = this.body.nodes;\n let node;\n const overlappingNodes = [];\n for (let i = 0; i < nodeIndices.length; i++) {\n node = nodes[nodeIndices[i]];\n if (node.isOverlappingWith(pointerObj) === true) {\n nodeUnderCursor = true;\n if (node.getTitle() !== undefined) {\n overlappingNodes.push(nodeIndices[i]);\n }\n }\n }\n if (overlappingNodes.length > 0) {\n // if there are overlapping nodes, select the last one, this is the one which is drawn on top of the others\n this.popupObj = nodes[overlappingNodes[overlappingNodes.length - 1]];\n // if you hover over a node, the title of the edge is not supposed to be shown.\n nodeUnderCursor = true;\n }\n }\n if (this.popupObj === undefined && nodeUnderCursor === false) {\n // search the edges for overlap\n const edgeIndices = this.body.edgeIndices;\n const edges = this.body.edges;\n let edge;\n const overlappingEdges = [];\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.isOverlappingWith(pointerObj) === true) {\n if (edge.connected === true && edge.getTitle() !== undefined) {\n overlappingEdges.push(edgeIndices[i]);\n }\n }\n }\n if (overlappingEdges.length > 0) {\n this.popupObj = edges[overlappingEdges[overlappingEdges.length - 1]];\n popupType = \"edge\";\n }\n }\n if (this.popupObj !== undefined) {\n // show popup message window\n if (this.popupObj.id !== previousPopupObjId) {\n if (this.popup === undefined) {\n this.popup = new Popup(this.canvas.frame);\n }\n this.popup.popupTargetType = popupType;\n this.popup.popupTargetId = this.popupObj.id;\n\n // adjust a small offset such that the mouse cursor is located in the\n // bottom left location of the popup, and you can easily move over the\n // popup area\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.setText(this.popupObj.getTitle());\n this.popup.show();\n this.body.emitter.emit(\"showPopup\", this.popupObj.id);\n }\n } else {\n if (this.popup !== undefined) {\n this.popup.hide();\n this.body.emitter.emit(\"hidePopup\");\n }\n }\n }\n\n /**\n * Check if the popup must be hidden, which is the case when the mouse is no\n * longer hovering on the object\n * @param {{x:number, y:number}} pointer\n * @private\n */\n _checkHidePopup(pointer) {\n const pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n let stillOnObj = false;\n if (this.popup.popupTargetType === \"node\") {\n if (this.body.nodes[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.nodes[this.popup.popupTargetId].isOverlappingWith(pointerObj);\n\n // if the mouse is still one the node, we have to check if it is not also on one that is drawn on top of it.\n // we initially only check stillOnObj because this is much faster.\n if (stillOnObj === true) {\n const overNode = this.selectionHandler.getNodeAt(pointer);\n stillOnObj = overNode === undefined ? false : overNode.id === this.popup.popupTargetId;\n }\n }\n } else {\n if (this.selectionHandler.getNodeAt(pointer) === undefined) {\n if (this.body.edges[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.edges[this.popup.popupTargetId].isOverlappingWith(pointerObj);\n }\n }\n }\n if (stillOnObj === false) {\n this.popupObj = undefined;\n this.popup.hide();\n this.body.emitter.emit(\"hidePopup\");\n }\n }\n}\n\nvar es_set = {};\n\nvar es_set_constructor = {};\n\nvar hasRequiredEs_set_constructor;\n\nfunction requireEs_set_constructor () {\n\tif (hasRequiredEs_set_constructor) return es_set_constructor;\n\thasRequiredEs_set_constructor = 1;\n\tvar collection = /*@__PURE__*/ requireCollection();\n\tvar collectionStrong = /*@__PURE__*/ requireCollectionStrong();\n\n\t// `Set` constructor\n\t// https://tc39.es/ecma262/#sec-set-objects\n\tcollection('Set', function (init) {\n\t return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };\n\t}, collectionStrong);\n\treturn es_set_constructor;\n}\n\nvar hasRequiredEs_set;\n\nfunction requireEs_set () {\n\tif (hasRequiredEs_set) return es_set;\n\thasRequiredEs_set = 1;\n\t// TODO: Remove this module from `core-js@4` since it's replaced to module below\n\trequireEs_set_constructor();\n\treturn es_set;\n}\n\nvar es_set_difference_v2 = {};\n\nvar aSet;\nvar hasRequiredASet;\n\nfunction requireASet () {\n\tif (hasRequiredASet) return aSet;\n\thasRequiredASet = 1;\n\tvar tryToString = /*@__PURE__*/ requireTryToString();\n\n\tvar $TypeError = TypeError;\n\n\t// Perform ? RequireInternalSlot(M, [[SetData]])\n\taSet = function (it) {\n\t if (typeof it == 'object' && 'size' in it && 'has' in it && 'add' in it && 'delete' in it && 'keys' in it) return it;\n\t throw new $TypeError(tryToString(it) + ' is not a set');\n\t};\n\treturn aSet;\n}\n\nvar setHelpers;\nvar hasRequiredSetHelpers;\n\nfunction requireSetHelpers () {\n\tif (hasRequiredSetHelpers) return setHelpers;\n\thasRequiredSetHelpers = 1;\n\tvar getBuiltIn = /*@__PURE__*/ requireGetBuiltIn();\n\tvar caller = /*@__PURE__*/ requireCaller();\n\n\tvar Set = getBuiltIn('Set');\n\tvar SetPrototype = Set.prototype;\n\n\tsetHelpers = {\n\t Set: Set,\n\t add: caller('add', 1),\n\t has: caller('has', 1),\n\t remove: caller('delete', 1),\n\t proto: SetPrototype\n\t};\n\treturn setHelpers;\n}\n\nvar iterateSimple;\nvar hasRequiredIterateSimple;\n\nfunction requireIterateSimple () {\n\tif (hasRequiredIterateSimple) return iterateSimple;\n\thasRequiredIterateSimple = 1;\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\n\titerateSimple = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {\n\t var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;\n\t var next = record.next;\n\t var step, result;\n\t while (!(step = call(next, iterator)).done) {\n\t result = fn(step.value);\n\t if (result !== undefined) return result;\n\t }\n\t};\n\treturn iterateSimple;\n}\n\nvar setIterate;\nvar hasRequiredSetIterate;\n\nfunction requireSetIterate () {\n\tif (hasRequiredSetIterate) return setIterate;\n\thasRequiredSetIterate = 1;\n\tvar iterateSimple = /*@__PURE__*/ requireIterateSimple();\n\n\tsetIterate = function (set, fn, interruptible) {\n\t return interruptible ? iterateSimple(set.keys(), fn, true) : set.forEach(fn);\n\t};\n\treturn setIterate;\n}\n\nvar setClone;\nvar hasRequiredSetClone;\n\nfunction requireSetClone () {\n\tif (hasRequiredSetClone) return setClone;\n\thasRequiredSetClone = 1;\n\tvar SetHelpers = /*@__PURE__*/ requireSetHelpers();\n\tvar iterate = /*@__PURE__*/ requireSetIterate();\n\n\tvar Set = SetHelpers.Set;\n\tvar add = SetHelpers.add;\n\n\tsetClone = function (set) {\n\t var result = new Set();\n\t iterate(set, function (it) {\n\t add(result, it);\n\t });\n\t return result;\n\t};\n\treturn setClone;\n}\n\nvar setSize;\nvar hasRequiredSetSize;\n\nfunction requireSetSize () {\n\tif (hasRequiredSetSize) return setSize;\n\thasRequiredSetSize = 1;\n\tsetSize = function (set) {\n\t return set.size;\n\t};\n\treturn setSize;\n}\n\nvar getIteratorDirect;\nvar hasRequiredGetIteratorDirect;\n\nfunction requireGetIteratorDirect () {\n\tif (hasRequiredGetIteratorDirect) return getIteratorDirect;\n\thasRequiredGetIteratorDirect = 1;\n\t// `GetIteratorDirect(obj)` abstract operation\n\t// https://tc39.es/ecma262/#sec-getiteratordirect\n\tgetIteratorDirect = function (obj) {\n\t return {\n\t iterator: obj,\n\t next: obj.next,\n\t done: false\n\t };\n\t};\n\treturn getIteratorDirect;\n}\n\nvar getSetRecord;\nvar hasRequiredGetSetRecord;\n\nfunction requireGetSetRecord () {\n\tif (hasRequiredGetSetRecord) return getSetRecord;\n\thasRequiredGetSetRecord = 1;\n\tvar aCallable = /*@__PURE__*/ requireACallable();\n\tvar anObject = /*@__PURE__*/ requireAnObject();\n\tvar call = /*@__PURE__*/ requireFunctionCall();\n\tvar toIntegerOrInfinity = /*@__PURE__*/ requireToIntegerOrInfinity();\n\tvar getIteratorDirect = /*@__PURE__*/ requireGetIteratorDirect();\n\n\tvar INVALID_SIZE = 'Invalid size';\n\tvar $RangeError = RangeError;\n\tvar $TypeError = TypeError;\n\tvar max = Math.max;\n\n\tvar SetRecord = function (set, intSize) {\n\t this.set = set;\n\t this.size = max(intSize, 0);\n\t this.has = aCallable(set.has);\n\t this.keys = aCallable(set.keys);\n\t};\n\n\tSetRecord.prototype = {\n\t getIterator: function () {\n\t return getIteratorDirect(anObject(call(this.keys, this.set)));\n\t },\n\t includes: function (it) {\n\t return call(this.has, this.set, it);\n\t }\n\t};\n\n\t// `GetSetRecord` abstract operation\n\t// https://tc39.es/proposal-set-methods/#sec-getsetrecord\n\tgetSetRecord = function (obj) {\n\t anObject(obj);\n\t var numSize = +obj.size;\n\t // NOTE: If size is undefined, then numSize will be NaN\n\t // eslint-disable-next-line no-self-compare -- NaN check\n\t if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);\n\t var intSize = toIntegerOrInfinity(numSize);\n\t if (intSize < 0) throw new $RangeError(INVALID_SIZE);\n\t return new SetRecord(obj, intSize);\n\t};\n\treturn getSetRecord;\n}\n\nvar setDifference;\nvar hasRequiredSetDifference;\n\nfunction requireSetDifference () {\n\tif (hasRequiredSetDifference) return setDifference;\n\thasRequiredSetDifference = 1;\n\tvar aSet = /*@__PURE__*/ requireASet();\n\tvar SetHelpers = /*@__PURE__*/ requireSetHelpers();\n\tvar clone = /*@__PURE__*/ requireSetClone();\n\tvar size = /*@__PURE__*/ requireSetSize();\n\tvar getSetRecord = /*@__PURE__*/ requireGetSetRecord();\n\tvar iterateSet = /*@__PURE__*/ requireSetIterate();\n\tvar iterateSimple = /*@__PURE__*/ requireIterateSimple();\n\n\tvar has = SetHelpers.has;\n\tvar remove = SetHelpers.remove;\n\n\t// `Set.prototype.difference` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.difference\n\tsetDifference = function difference(other) {\n\t var O = aSet(this);\n\t var otherRec = getSetRecord(other);\n\t var result = clone(O);\n\t if (size(O) <= otherRec.size) iterateSet(O, function (e) {\n\t if (otherRec.includes(e)) remove(result, e);\n\t });\n\t else iterateSimple(otherRec.getIterator(), function (e) {\n\t if (has(result, e)) remove(result, e);\n\t });\n\t return result;\n\t};\n\treturn setDifference;\n}\n\nvar setMethodAcceptSetLike;\nvar hasRequiredSetMethodAcceptSetLike;\n\nfunction requireSetMethodAcceptSetLike () {\n\tif (hasRequiredSetMethodAcceptSetLike) return setMethodAcceptSetLike;\n\thasRequiredSetMethodAcceptSetLike = 1;\n\tsetMethodAcceptSetLike = function () {\n\t return false;\n\t};\n\treturn setMethodAcceptSetLike;\n}\n\nvar hasRequiredEs_set_difference_v2;\n\nfunction requireEs_set_difference_v2 () {\n\tif (hasRequiredEs_set_difference_v2) return es_set_difference_v2;\n\thasRequiredEs_set_difference_v2 = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar difference = /*@__PURE__*/ requireSetDifference();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar setMethodAcceptSetLike = /*@__PURE__*/ requireSetMethodAcceptSetLike();\n\n\tvar SET_LIKE_INCORRECT_BEHAVIOR = !setMethodAcceptSetLike('difference', function (result) {\n\t return result.size === 0;\n\t});\n\n\tvar FORCED = SET_LIKE_INCORRECT_BEHAVIOR || fails(function () {\n\t // https://bugs.webkit.org/show_bug.cgi?id=288595\n\t var setLike = {\n\t size: 1,\n\t has: function () { return true; },\n\t keys: function () {\n\t var index = 0;\n\t return {\n\t next: function () {\n\t var done = index++ > 1;\n\t if (baseSet.has(1)) baseSet.clear();\n\t return { done: done, value: 2 };\n\t }\n\t };\n\t }\n\t };\n\t // eslint-disable-next-line es/no-set -- testing\n\t var baseSet = new Set([1, 2, 3, 4]);\n\t // eslint-disable-next-line es/no-set-prototype-difference -- testing\n\t return baseSet.difference(setLike).size !== 3;\n\t});\n\n\t// `Set.prototype.difference` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.difference\n\t$({ target: 'Set', proto: true, real: true, forced: FORCED }, {\n\t difference: difference\n\t});\n\treturn es_set_difference_v2;\n}\n\nvar es_set_intersection_v2 = {};\n\nvar setIntersection;\nvar hasRequiredSetIntersection;\n\nfunction requireSetIntersection () {\n\tif (hasRequiredSetIntersection) return setIntersection;\n\thasRequiredSetIntersection = 1;\n\tvar aSet = /*@__PURE__*/ requireASet();\n\tvar SetHelpers = /*@__PURE__*/ requireSetHelpers();\n\tvar size = /*@__PURE__*/ requireSetSize();\n\tvar getSetRecord = /*@__PURE__*/ requireGetSetRecord();\n\tvar iterateSet = /*@__PURE__*/ requireSetIterate();\n\tvar iterateSimple = /*@__PURE__*/ requireIterateSimple();\n\n\tvar Set = SetHelpers.Set;\n\tvar add = SetHelpers.add;\n\tvar has = SetHelpers.has;\n\n\t// `Set.prototype.intersection` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.intersection\n\tsetIntersection = function intersection(other) {\n\t var O = aSet(this);\n\t var otherRec = getSetRecord(other);\n\t var result = new Set();\n\n\t if (size(O) > otherRec.size) {\n\t iterateSimple(otherRec.getIterator(), function (e) {\n\t if (has(O, e)) add(result, e);\n\t });\n\t } else {\n\t iterateSet(O, function (e) {\n\t if (otherRec.includes(e)) add(result, e);\n\t });\n\t }\n\n\t return result;\n\t};\n\treturn setIntersection;\n}\n\nvar hasRequiredEs_set_intersection_v2;\n\nfunction requireEs_set_intersection_v2 () {\n\tif (hasRequiredEs_set_intersection_v2) return es_set_intersection_v2;\n\thasRequiredEs_set_intersection_v2 = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar intersection = /*@__PURE__*/ requireSetIntersection();\n\tvar setMethodAcceptSetLike = /*@__PURE__*/ requireSetMethodAcceptSetLike();\n\n\tvar INCORRECT = !setMethodAcceptSetLike('intersection', function (result) {\n\t return result.size === 2 && result.has(1) && result.has(2);\n\t}) || fails(function () {\n\t // eslint-disable-next-line es/no-array-from, es/no-set, es/no-set-prototype-intersection -- testing\n\t return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';\n\t});\n\n\t// `Set.prototype.intersection` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.intersection\n\t$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {\n\t intersection: intersection\n\t});\n\treturn es_set_intersection_v2;\n}\n\nvar es_set_isDisjointFrom_v2 = {};\n\nvar setIsDisjointFrom;\nvar hasRequiredSetIsDisjointFrom;\n\nfunction requireSetIsDisjointFrom () {\n\tif (hasRequiredSetIsDisjointFrom) return setIsDisjointFrom;\n\thasRequiredSetIsDisjointFrom = 1;\n\tvar aSet = /*@__PURE__*/ requireASet();\n\tvar has = /*@__PURE__*/ requireSetHelpers().has;\n\tvar size = /*@__PURE__*/ requireSetSize();\n\tvar getSetRecord = /*@__PURE__*/ requireGetSetRecord();\n\tvar iterateSet = /*@__PURE__*/ requireSetIterate();\n\tvar iterateSimple = /*@__PURE__*/ requireIterateSimple();\n\tvar iteratorClose = /*@__PURE__*/ requireIteratorClose();\n\n\t// `Set.prototype.isDisjointFrom` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom\n\tsetIsDisjointFrom = function isDisjointFrom(other) {\n\t var O = aSet(this);\n\t var otherRec = getSetRecord(other);\n\t if (size(O) <= otherRec.size) return iterateSet(O, function (e) {\n\t if (otherRec.includes(e)) return false;\n\t }, true) !== false;\n\t var iterator = otherRec.getIterator();\n\t return iterateSimple(iterator, function (e) {\n\t if (has(O, e)) return iteratorClose(iterator, 'normal', false);\n\t }) !== false;\n\t};\n\treturn setIsDisjointFrom;\n}\n\nvar hasRequiredEs_set_isDisjointFrom_v2;\n\nfunction requireEs_set_isDisjointFrom_v2 () {\n\tif (hasRequiredEs_set_isDisjointFrom_v2) return es_set_isDisjointFrom_v2;\n\thasRequiredEs_set_isDisjointFrom_v2 = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar isDisjointFrom = /*@__PURE__*/ requireSetIsDisjointFrom();\n\tvar setMethodAcceptSetLike = /*@__PURE__*/ requireSetMethodAcceptSetLike();\n\n\tvar INCORRECT = !setMethodAcceptSetLike('isDisjointFrom', function (result) {\n\t return !result;\n\t});\n\n\t// `Set.prototype.isDisjointFrom` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom\n\t$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {\n\t isDisjointFrom: isDisjointFrom\n\t});\n\treturn es_set_isDisjointFrom_v2;\n}\n\nvar es_set_isSubsetOf_v2 = {};\n\nvar setIsSubsetOf;\nvar hasRequiredSetIsSubsetOf;\n\nfunction requireSetIsSubsetOf () {\n\tif (hasRequiredSetIsSubsetOf) return setIsSubsetOf;\n\thasRequiredSetIsSubsetOf = 1;\n\tvar aSet = /*@__PURE__*/ requireASet();\n\tvar size = /*@__PURE__*/ requireSetSize();\n\tvar iterate = /*@__PURE__*/ requireSetIterate();\n\tvar getSetRecord = /*@__PURE__*/ requireGetSetRecord();\n\n\t// `Set.prototype.isSubsetOf` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.issubsetof\n\tsetIsSubsetOf = function isSubsetOf(other) {\n\t var O = aSet(this);\n\t var otherRec = getSetRecord(other);\n\t if (size(O) > otherRec.size) return false;\n\t return iterate(O, function (e) {\n\t if (!otherRec.includes(e)) return false;\n\t }, true) !== false;\n\t};\n\treturn setIsSubsetOf;\n}\n\nvar hasRequiredEs_set_isSubsetOf_v2;\n\nfunction requireEs_set_isSubsetOf_v2 () {\n\tif (hasRequiredEs_set_isSubsetOf_v2) return es_set_isSubsetOf_v2;\n\thasRequiredEs_set_isSubsetOf_v2 = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar isSubsetOf = /*@__PURE__*/ requireSetIsSubsetOf();\n\tvar setMethodAcceptSetLike = /*@__PURE__*/ requireSetMethodAcceptSetLike();\n\n\tvar INCORRECT = !setMethodAcceptSetLike('isSubsetOf', function (result) {\n\t return result;\n\t});\n\n\t// `Set.prototype.isSubsetOf` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.issubsetof\n\t$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {\n\t isSubsetOf: isSubsetOf\n\t});\n\treturn es_set_isSubsetOf_v2;\n}\n\nvar es_set_isSupersetOf_v2 = {};\n\nvar setIsSupersetOf;\nvar hasRequiredSetIsSupersetOf;\n\nfunction requireSetIsSupersetOf () {\n\tif (hasRequiredSetIsSupersetOf) return setIsSupersetOf;\n\thasRequiredSetIsSupersetOf = 1;\n\tvar aSet = /*@__PURE__*/ requireASet();\n\tvar has = /*@__PURE__*/ requireSetHelpers().has;\n\tvar size = /*@__PURE__*/ requireSetSize();\n\tvar getSetRecord = /*@__PURE__*/ requireGetSetRecord();\n\tvar iterateSimple = /*@__PURE__*/ requireIterateSimple();\n\tvar iteratorClose = /*@__PURE__*/ requireIteratorClose();\n\n\t// `Set.prototype.isSupersetOf` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.issupersetof\n\tsetIsSupersetOf = function isSupersetOf(other) {\n\t var O = aSet(this);\n\t var otherRec = getSetRecord(other);\n\t if (size(O) < otherRec.size) return false;\n\t var iterator = otherRec.getIterator();\n\t return iterateSimple(iterator, function (e) {\n\t if (!has(O, e)) return iteratorClose(iterator, 'normal', false);\n\t }) !== false;\n\t};\n\treturn setIsSupersetOf;\n}\n\nvar hasRequiredEs_set_isSupersetOf_v2;\n\nfunction requireEs_set_isSupersetOf_v2 () {\n\tif (hasRequiredEs_set_isSupersetOf_v2) return es_set_isSupersetOf_v2;\n\thasRequiredEs_set_isSupersetOf_v2 = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar isSupersetOf = /*@__PURE__*/ requireSetIsSupersetOf();\n\tvar setMethodAcceptSetLike = /*@__PURE__*/ requireSetMethodAcceptSetLike();\n\n\tvar INCORRECT = !setMethodAcceptSetLike('isSupersetOf', function (result) {\n\t return !result;\n\t});\n\n\t// `Set.prototype.isSupersetOf` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.issupersetof\n\t$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {\n\t isSupersetOf: isSupersetOf\n\t});\n\treturn es_set_isSupersetOf_v2;\n}\n\nvar es_set_symmetricDifference_v2 = {};\n\nvar setSymmetricDifference;\nvar hasRequiredSetSymmetricDifference;\n\nfunction requireSetSymmetricDifference () {\n\tif (hasRequiredSetSymmetricDifference) return setSymmetricDifference;\n\thasRequiredSetSymmetricDifference = 1;\n\tvar aSet = /*@__PURE__*/ requireASet();\n\tvar SetHelpers = /*@__PURE__*/ requireSetHelpers();\n\tvar clone = /*@__PURE__*/ requireSetClone();\n\tvar getSetRecord = /*@__PURE__*/ requireGetSetRecord();\n\tvar iterateSimple = /*@__PURE__*/ requireIterateSimple();\n\n\tvar add = SetHelpers.add;\n\tvar has = SetHelpers.has;\n\tvar remove = SetHelpers.remove;\n\n\t// `Set.prototype.symmetricDifference` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference\n\tsetSymmetricDifference = function symmetricDifference(other) {\n\t var O = aSet(this);\n\t var keysIter = getSetRecord(other).getIterator();\n\t var result = clone(O);\n\t iterateSimple(keysIter, function (e) {\n\t if (has(O, e)) remove(result, e);\n\t else add(result, e);\n\t });\n\t return result;\n\t};\n\treturn setSymmetricDifference;\n}\n\nvar setMethodGetKeysBeforeCloningDetection;\nvar hasRequiredSetMethodGetKeysBeforeCloningDetection;\n\nfunction requireSetMethodGetKeysBeforeCloningDetection () {\n\tif (hasRequiredSetMethodGetKeysBeforeCloningDetection) return setMethodGetKeysBeforeCloningDetection;\n\thasRequiredSetMethodGetKeysBeforeCloningDetection = 1;\n\t// Should get iterator record of a set-like object before cloning this\n\t// https://bugs.webkit.org/show_bug.cgi?id=289430\n\tsetMethodGetKeysBeforeCloningDetection = function (METHOD_NAME) {\n\t try {\n\t // eslint-disable-next-line es/no-set -- needed for test\n\t var baseSet = new Set();\n\t var setLike = {\n\t size: 0,\n\t has: function () { return true; },\n\t keys: function () {\n\t // eslint-disable-next-line es/no-object-defineproperty -- needed for test\n\t return Object.defineProperty({}, 'next', {\n\t get: function () {\n\t baseSet.clear();\n\t baseSet.add(4);\n\t return function () {\n\t return { done: true };\n\t };\n\t }\n\t });\n\t }\n\t };\n\t var result = baseSet[METHOD_NAME](setLike);\n\n\t return result.size === 1 && result.values().next().value === 4;\n\t } catch (error) {\n\t return false;\n\t }\n\t};\n\treturn setMethodGetKeysBeforeCloningDetection;\n}\n\nvar hasRequiredEs_set_symmetricDifference_v2;\n\nfunction requireEs_set_symmetricDifference_v2 () {\n\tif (hasRequiredEs_set_symmetricDifference_v2) return es_set_symmetricDifference_v2;\n\thasRequiredEs_set_symmetricDifference_v2 = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar symmetricDifference = /*@__PURE__*/ requireSetSymmetricDifference();\n\tvar setMethodGetKeysBeforeCloning = /*@__PURE__*/ requireSetMethodGetKeysBeforeCloningDetection();\n\tvar setMethodAcceptSetLike = /*@__PURE__*/ requireSetMethodAcceptSetLike();\n\n\tvar FORCED = !setMethodAcceptSetLike('symmetricDifference') || !setMethodGetKeysBeforeCloning('symmetricDifference');\n\n\t// `Set.prototype.symmetricDifference` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference\n\t$({ target: 'Set', proto: true, real: true, forced: FORCED }, {\n\t symmetricDifference: symmetricDifference\n\t});\n\treturn es_set_symmetricDifference_v2;\n}\n\nvar es_set_union_v2 = {};\n\nvar setUnion;\nvar hasRequiredSetUnion;\n\nfunction requireSetUnion () {\n\tif (hasRequiredSetUnion) return setUnion;\n\thasRequiredSetUnion = 1;\n\tvar aSet = /*@__PURE__*/ requireASet();\n\tvar add = /*@__PURE__*/ requireSetHelpers().add;\n\tvar clone = /*@__PURE__*/ requireSetClone();\n\tvar getSetRecord = /*@__PURE__*/ requireGetSetRecord();\n\tvar iterateSimple = /*@__PURE__*/ requireIterateSimple();\n\n\t// `Set.prototype.union` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.union\n\tsetUnion = function union(other) {\n\t var O = aSet(this);\n\t var keysIter = getSetRecord(other).getIterator();\n\t var result = clone(O);\n\t iterateSimple(keysIter, function (it) {\n\t add(result, it);\n\t });\n\t return result;\n\t};\n\treturn setUnion;\n}\n\nvar hasRequiredEs_set_union_v2;\n\nfunction requireEs_set_union_v2 () {\n\tif (hasRequiredEs_set_union_v2) return es_set_union_v2;\n\thasRequiredEs_set_union_v2 = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar union = /*@__PURE__*/ requireSetUnion();\n\tvar setMethodGetKeysBeforeCloning = /*@__PURE__*/ requireSetMethodGetKeysBeforeCloningDetection();\n\tvar setMethodAcceptSetLike = /*@__PURE__*/ requireSetMethodAcceptSetLike();\n\n\tvar FORCED = !setMethodAcceptSetLike('union') || !setMethodGetKeysBeforeCloning('union');\n\n\t// `Set.prototype.union` method\n\t// https://tc39.es/ecma262/#sec-set.prototype.union\n\t$({ target: 'Set', proto: true, real: true, forced: FORCED }, {\n\t union: union\n\t});\n\treturn es_set_union_v2;\n}\n\nvar set$2;\nvar hasRequiredSet$2;\n\nfunction requireSet$2 () {\n\tif (hasRequiredSet$2) return set$2;\n\thasRequiredSet$2 = 1;\n\trequireEs_array_iterator();\n\trequireEs_set();\n\trequireEs_set_difference_v2();\n\trequireEs_set_intersection_v2();\n\trequireEs_set_isDisjointFrom_v2();\n\trequireEs_set_isSubsetOf_v2();\n\trequireEs_set_isSupersetOf_v2();\n\trequireEs_set_symmetricDifference_v2();\n\trequireEs_set_union_v2();\n\trequireEs_string_iterator();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tset$2 = path.Set;\n\treturn set$2;\n}\n\nvar set$1;\nvar hasRequiredSet$1;\n\nfunction requireSet$1 () {\n\tif (hasRequiredSet$1) return set$1;\n\thasRequiredSet$1 = 1;\n\tvar parent = /*@__PURE__*/ requireSet$2();\n\trequireWeb_domCollections_iterator();\n\n\tset$1 = parent;\n\treturn set$1;\n}\n\nvar set;\nvar hasRequiredSet;\n\nfunction requireSet () {\n\tif (hasRequiredSet) return set;\n\thasRequiredSet = 1;\n\tset = /*@__PURE__*/ requireSet$1();\n\treturn set;\n}\n\nvar setExports = requireSet();\nvar _Set = /*@__PURE__*/getDefaultExportFromCjs(setExports);\n\nvar es_weakMap = {};\n\nvar es_weakMap_constructor = {};\n\nvar collectionWeak;\nvar hasRequiredCollectionWeak;\n\nfunction requireCollectionWeak () {\n\tif (hasRequiredCollectionWeak) return collectionWeak;\n\thasRequiredCollectionWeak = 1;\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar defineBuiltIns = /*@__PURE__*/ requireDefineBuiltIns();\n\tvar getWeakData = /*@__PURE__*/ requireInternalMetadata().getWeakData;\n\tvar anInstance = /*@__PURE__*/ requireAnInstance();\n\tvar anObject = /*@__PURE__*/ requireAnObject();\n\tvar isNullOrUndefined = /*@__PURE__*/ requireIsNullOrUndefined();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar iterate = /*@__PURE__*/ requireIterate();\n\tvar ArrayIterationModule = /*@__PURE__*/ requireArrayIteration();\n\tvar hasOwn = /*@__PURE__*/ requireHasOwnProperty();\n\tvar InternalStateModule = /*@__PURE__*/ requireInternalState();\n\n\tvar setInternalState = InternalStateModule.set;\n\tvar internalStateGetterFor = InternalStateModule.getterFor;\n\tvar find = ArrayIterationModule.find;\n\tvar findIndex = ArrayIterationModule.findIndex;\n\tvar splice = uncurryThis([].splice);\n\tvar id = 0;\n\n\t// fallback for uncaught frozen keys\n\tvar uncaughtFrozenStore = function (state) {\n\t return state.frozen || (state.frozen = new UncaughtFrozenStore());\n\t};\n\n\tvar UncaughtFrozenStore = function () {\n\t this.entries = [];\n\t};\n\n\tvar findUncaughtFrozen = function (store, key) {\n\t return find(store.entries, function (it) {\n\t return it[0] === key;\n\t });\n\t};\n\n\tUncaughtFrozenStore.prototype = {\n\t get: function (key) {\n\t var entry = findUncaughtFrozen(this, key);\n\t if (entry) return entry[1];\n\t },\n\t has: function (key) {\n\t return !!findUncaughtFrozen(this, key);\n\t },\n\t set: function (key, value) {\n\t var entry = findUncaughtFrozen(this, key);\n\t if (entry) entry[1] = value;\n\t else this.entries.push([key, value]);\n\t },\n\t 'delete': function (key) {\n\t var index = findIndex(this.entries, function (it) {\n\t return it[0] === key;\n\t });\n\t if (~index) splice(this.entries, index, 1);\n\t return !!~index;\n\t }\n\t};\n\n\tcollectionWeak = {\n\t getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n\t var Constructor = wrapper(function (that, iterable) {\n\t anInstance(that, Prototype);\n\t setInternalState(that, {\n\t type: CONSTRUCTOR_NAME,\n\t id: id++,\n\t frozen: null\n\t });\n\t if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n\t });\n\n\t var Prototype = Constructor.prototype;\n\n\t var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n\t var define = function (that, key, value) {\n\t var state = getInternalState(that);\n\t var data = getWeakData(anObject(key), true);\n\t if (data === true) uncaughtFrozenStore(state).set(key, value);\n\t else data[state.id] = value;\n\t return that;\n\t };\n\n\t defineBuiltIns(Prototype, {\n\t // `{ WeakMap, WeakSet }.prototype.delete(key)` methods\n\t // https://tc39.es/ecma262/#sec-weakmap.prototype.delete\n\t // https://tc39.es/ecma262/#sec-weakset.prototype.delete\n\t 'delete': function (key) {\n\t var state = getInternalState(this);\n\t if (!isObject(key)) return false;\n\t var data = getWeakData(key);\n\t if (data === true) return uncaughtFrozenStore(state)['delete'](key);\n\t return data && hasOwn(data, state.id) && delete data[state.id];\n\t },\n\t // `{ WeakMap, WeakSet }.prototype.has(key)` methods\n\t // https://tc39.es/ecma262/#sec-weakmap.prototype.has\n\t // https://tc39.es/ecma262/#sec-weakset.prototype.has\n\t has: function has(key) {\n\t var state = getInternalState(this);\n\t if (!isObject(key)) return false;\n\t var data = getWeakData(key);\n\t if (data === true) return uncaughtFrozenStore(state).has(key);\n\t return data && hasOwn(data, state.id);\n\t }\n\t });\n\n\t defineBuiltIns(Prototype, IS_MAP ? {\n\t // `WeakMap.prototype.get(key)` method\n\t // https://tc39.es/ecma262/#sec-weakmap.prototype.get\n\t get: function get(key) {\n\t var state = getInternalState(this);\n\t if (isObject(key)) {\n\t var data = getWeakData(key);\n\t if (data === true) return uncaughtFrozenStore(state).get(key);\n\t if (data) return data[state.id];\n\t }\n\t },\n\t // `WeakMap.prototype.set(key, value)` method\n\t // https://tc39.es/ecma262/#sec-weakmap.prototype.set\n\t set: function set(key, value) {\n\t return define(this, key, value);\n\t }\n\t } : {\n\t // `WeakSet.prototype.add(value)` method\n\t // https://tc39.es/ecma262/#sec-weakset.prototype.add\n\t add: function add(value) {\n\t return define(this, value, true);\n\t }\n\t });\n\n\t return Constructor;\n\t }\n\t};\n\treturn collectionWeak;\n}\n\nvar hasRequiredEs_weakMap_constructor;\n\nfunction requireEs_weakMap_constructor () {\n\tif (hasRequiredEs_weakMap_constructor) return es_weakMap_constructor;\n\thasRequiredEs_weakMap_constructor = 1;\n\tvar FREEZING = /*@__PURE__*/ requireFreezing();\n\tvar globalThis = /*@__PURE__*/ requireGlobalThis();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar defineBuiltIns = /*@__PURE__*/ requireDefineBuiltIns();\n\tvar InternalMetadataModule = /*@__PURE__*/ requireInternalMetadata();\n\tvar collection = /*@__PURE__*/ requireCollection();\n\tvar collectionWeak = /*@__PURE__*/ requireCollectionWeak();\n\tvar isObject = /*@__PURE__*/ requireIsObject();\n\tvar enforceInternalState = /*@__PURE__*/ requireInternalState().enforce;\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar NATIVE_WEAK_MAP = /*@__PURE__*/ requireWeakMapBasicDetection();\n\n\tvar $Object = Object;\n\t// eslint-disable-next-line es/no-array-isarray -- safe\n\tvar isArray = Array.isArray;\n\t// eslint-disable-next-line es/no-object-isextensible -- safe\n\tvar isExtensible = $Object.isExtensible;\n\t// eslint-disable-next-line es/no-object-isfrozen -- safe\n\tvar isFrozen = $Object.isFrozen;\n\t// eslint-disable-next-line es/no-object-issealed -- safe\n\tvar isSealed = $Object.isSealed;\n\t// eslint-disable-next-line es/no-object-freeze -- safe\n\tvar freeze = $Object.freeze;\n\t// eslint-disable-next-line es/no-object-seal -- safe\n\tvar seal = $Object.seal;\n\n\tvar IS_IE11 = !globalThis.ActiveXObject && 'ActiveXObject' in globalThis;\n\tvar InternalWeakMap;\n\n\tvar wrapper = function (init) {\n\t return function WeakMap() {\n\t return init(this, arguments.length ? arguments[0] : undefined);\n\t };\n\t};\n\n\t// `WeakMap` constructor\n\t// https://tc39.es/ecma262/#sec-weakmap-constructor\n\tvar $WeakMap = collection('WeakMap', wrapper, collectionWeak);\n\tvar WeakMapPrototype = $WeakMap.prototype;\n\tvar nativeSet = uncurryThis(WeakMapPrototype.set);\n\n\t// Chakra Edge bug: adding frozen arrays to WeakMap unfreeze them\n\tvar hasMSEdgeFreezingBug = function () {\n\t return FREEZING && fails(function () {\n\t var frozenArray = freeze([]);\n\t nativeSet(new $WeakMap(), frozenArray, 1);\n\t return !isFrozen(frozenArray);\n\t });\n\t};\n\n\t// IE11 WeakMap frozen keys fix\n\t// We can't use feature detection because it crash some old IE builds\n\t// https://github.com/zloirock/core-js/issues/485\n\tif (NATIVE_WEAK_MAP) if (IS_IE11) {\n\t InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);\n\t InternalMetadataModule.enable();\n\t var nativeDelete = uncurryThis(WeakMapPrototype['delete']);\n\t var nativeHas = uncurryThis(WeakMapPrototype.has);\n\t var nativeGet = uncurryThis(WeakMapPrototype.get);\n\t defineBuiltIns(WeakMapPrototype, {\n\t 'delete': function (key) {\n\t if (isObject(key) && !isExtensible(key)) {\n\t var state = enforceInternalState(this);\n\t if (!state.frozen) state.frozen = new InternalWeakMap();\n\t return nativeDelete(this, key) || state.frozen['delete'](key);\n\t } return nativeDelete(this, key);\n\t },\n\t has: function has(key) {\n\t if (isObject(key) && !isExtensible(key)) {\n\t var state = enforceInternalState(this);\n\t if (!state.frozen) state.frozen = new InternalWeakMap();\n\t return nativeHas(this, key) || state.frozen.has(key);\n\t } return nativeHas(this, key);\n\t },\n\t get: function get(key) {\n\t if (isObject(key) && !isExtensible(key)) {\n\t var state = enforceInternalState(this);\n\t if (!state.frozen) state.frozen = new InternalWeakMap();\n\t return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key);\n\t } return nativeGet(this, key);\n\t },\n\t set: function set(key, value) {\n\t if (isObject(key) && !isExtensible(key)) {\n\t var state = enforceInternalState(this);\n\t if (!state.frozen) state.frozen = new InternalWeakMap();\n\t nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value);\n\t } else nativeSet(this, key, value);\n\t return this;\n\t }\n\t });\n\t// Chakra Edge frozen keys fix\n\t} else if (hasMSEdgeFreezingBug()) {\n\t defineBuiltIns(WeakMapPrototype, {\n\t set: function set(key, value) {\n\t var arrayIntegrityLevel;\n\t if (isArray(key)) {\n\t if (isFrozen(key)) arrayIntegrityLevel = freeze;\n\t else if (isSealed(key)) arrayIntegrityLevel = seal;\n\t }\n\t nativeSet(this, key, value);\n\t if (arrayIntegrityLevel) arrayIntegrityLevel(key);\n\t return this;\n\t }\n\t });\n\t}\n\treturn es_weakMap_constructor;\n}\n\nvar hasRequiredEs_weakMap;\n\nfunction requireEs_weakMap () {\n\tif (hasRequiredEs_weakMap) return es_weakMap;\n\thasRequiredEs_weakMap = 1;\n\t// TODO: Remove this module from `core-js@4` since it's replaced to module below\n\trequireEs_weakMap_constructor();\n\treturn es_weakMap;\n}\n\nvar weakMap$2;\nvar hasRequiredWeakMap$2;\n\nfunction requireWeakMap$2 () {\n\tif (hasRequiredWeakMap$2) return weakMap$2;\n\thasRequiredWeakMap$2 = 1;\n\trequireEs_array_iterator();\n\trequireEs_weakMap();\n\tvar path = /*@__PURE__*/ requirePath();\n\n\tweakMap$2 = path.WeakMap;\n\treturn weakMap$2;\n}\n\nvar weakMap$1;\nvar hasRequiredWeakMap$1;\n\nfunction requireWeakMap$1 () {\n\tif (hasRequiredWeakMap$1) return weakMap$1;\n\thasRequiredWeakMap$1 = 1;\n\tvar parent = /*@__PURE__*/ requireWeakMap$2();\n\trequireWeb_domCollections_iterator();\n\n\tweakMap$1 = parent;\n\treturn weakMap$1;\n}\n\nvar weakMap;\nvar hasRequiredWeakMap;\n\nfunction requireWeakMap () {\n\tif (hasRequiredWeakMap) return weakMap;\n\thasRequiredWeakMap = 1;\n\tweakMap = /*@__PURE__*/ requireWeakMap$1();\n\treturn weakMap;\n}\n\nvar weakMapExports = requireWeakMap();\nvar _WeakMap = /*@__PURE__*/getDefaultExportFromCjs(weakMapExports);\n\nfunction _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }\nfunction _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/**\n * @param prev\n * @param next\n */\nfunction diffSets(prev, next) {\n const diff = new _Set();\n for (const item of next) {\n if (!prev.has(item)) {\n diff.add(item);\n }\n }\n return diff;\n}\nvar _previousSelection = /*#__PURE__*/new _WeakMap();\nvar _selection = /*#__PURE__*/new _WeakMap();\nclass SingleTypeSelectionAccumulator {\n constructor() {\n _classPrivateFieldInitSpec(this, _previousSelection, new _Set());\n _classPrivateFieldInitSpec(this, _selection, new _Set());\n }\n get size() {\n return _classPrivateFieldGet(_selection, this).size;\n }\n add() {\n for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {\n items[_key] = arguments[_key];\n }\n for (const item of items) {\n _classPrivateFieldGet(_selection, this).add(item);\n }\n }\n delete() {\n for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n items[_key2] = arguments[_key2];\n }\n for (const item of items) {\n _classPrivateFieldGet(_selection, this).delete(item);\n }\n }\n clear() {\n _classPrivateFieldGet(_selection, this).clear();\n }\n getSelection() {\n return [..._classPrivateFieldGet(_selection, this)];\n }\n getChanges() {\n return {\n added: [...diffSets(_classPrivateFieldGet(_previousSelection, this), _classPrivateFieldGet(_selection, this))],\n deleted: [...diffSets(_classPrivateFieldGet(_selection, this), _classPrivateFieldGet(_previousSelection, this))],\n previous: [...new _Set(_classPrivateFieldGet(_previousSelection, this))],\n current: [...new _Set(_classPrivateFieldGet(_selection, this))]\n };\n }\n commit() {\n const changes = this.getChanges();\n _classPrivateFieldSet(_previousSelection, this, _classPrivateFieldGet(_selection, this));\n _classPrivateFieldSet(_selection, this, new _Set(_classPrivateFieldGet(_previousSelection, this)));\n for (const item of changes.added) {\n item.select();\n }\n for (const item of changes.deleted) {\n item.unselect();\n }\n return changes;\n }\n}\nvar _nodes = /*#__PURE__*/new _WeakMap();\nvar _edges = /*#__PURE__*/new _WeakMap();\nvar _commitHandler = /*#__PURE__*/new _WeakMap();\nclass SelectionAccumulator {\n constructor() {\n let commitHandler = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : () => {};\n _classPrivateFieldInitSpec(this, _nodes, new SingleTypeSelectionAccumulator());\n _classPrivateFieldInitSpec(this, _edges, new SingleTypeSelectionAccumulator());\n _classPrivateFieldInitSpec(this, _commitHandler, void 0);\n _classPrivateFieldSet(_commitHandler, this, commitHandler);\n }\n get sizeNodes() {\n return _classPrivateFieldGet(_nodes, this).size;\n }\n get sizeEdges() {\n return _classPrivateFieldGet(_edges, this).size;\n }\n getNodes() {\n return _classPrivateFieldGet(_nodes, this).getSelection();\n }\n getEdges() {\n return _classPrivateFieldGet(_edges, this).getSelection();\n }\n addNodes() {\n _classPrivateFieldGet(_nodes, this).add(...arguments);\n }\n addEdges() {\n _classPrivateFieldGet(_edges, this).add(...arguments);\n }\n deleteNodes(node) {\n _classPrivateFieldGet(_nodes, this).delete(node);\n }\n deleteEdges(edge) {\n _classPrivateFieldGet(_edges, this).delete(edge);\n }\n clear() {\n _classPrivateFieldGet(_nodes, this).clear();\n _classPrivateFieldGet(_edges, this).clear();\n }\n commit() {\n const summary = {\n nodes: _classPrivateFieldGet(_nodes, this).commit(),\n edges: _classPrivateFieldGet(_edges, this).commit()\n };\n for (var _len3 = arguments.length, rest = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n rest[_key3] = arguments[_key3];\n }\n _classPrivateFieldGet(_commitHandler, this).call(this, summary, ...rest);\n return summary;\n }\n}\n\n/**\n * The handler for selections\n */\nclass SelectionHandler {\n /**\n * @param {object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n // TODO: Consider firing an event on any change to the selection, not\n // only those caused by clicks and taps. It would be easy to implement\n // now and (at least to me) it seems like something that could be\n // quite useful.\n this._selectionAccumulator = new SelectionAccumulator();\n this.hoverObj = {\n nodes: {},\n edges: {}\n };\n this.options = {};\n this.defaultOptions = {\n multiselect: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true\n };\n _Object$assign(this.options, this.defaultOptions);\n this.body.emitter.on(\"_dataChanged\", () => {\n this.updateSelection();\n });\n }\n\n /**\n *\n * @param {object} [options]\n */\n setOptions(options) {\n if (options !== undefined) {\n const fields = [\"multiselect\", \"hoverConnectedEdges\", \"selectable\", \"selectConnectedEdges\"];\n selectiveDeepExtend(fields, this.options, options);\n }\n }\n\n /**\n * handles the selection part of the tap;\n * @param {{x: number, y: number}} pointer\n * @returns {boolean}\n */\n selectOnPoint(pointer) {\n let selected = false;\n if (this.options.selectable === true) {\n const obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);\n\n // unselect after getting the objects in order to restore width and height.\n this.unselectAll();\n if (obj !== undefined) {\n selected = this.selectObject(obj);\n }\n this.body.emitter.emit(\"_requestRedraw\");\n }\n return selected;\n }\n\n /**\n *\n * @param {{x: number, y: number}} pointer\n * @returns {boolean}\n */\n selectAdditionalOnPoint(pointer) {\n let selectionChanged = false;\n if (this.options.selectable === true) {\n const obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);\n if (obj !== undefined) {\n selectionChanged = true;\n if (obj.isSelected() === true) {\n this.deselectObject(obj);\n } else {\n this.selectObject(obj);\n }\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n return selectionChanged;\n }\n\n /**\n * Create an object containing the standard fields for an event.\n * @param {Event} event\n * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse\n * @returns {{}}\n * @private\n */\n _initBaseEvent(event, pointer) {\n const properties = {};\n properties[\"pointer\"] = {\n DOM: {\n x: pointer.x,\n y: pointer.y\n },\n canvas: this.canvas.DOMtoCanvas(pointer)\n };\n properties[\"event\"] = event;\n return properties;\n }\n\n /**\n * Generate an event which the user can catch.\n *\n * This adds some extra data to the event with respect to cursor position and\n * selected nodes and edges.\n * @param {string} eventType Name of event to send\n * @param {Event} event\n * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse\n * @param {object | undefined} oldSelection If present, selection state before event occured\n * @param {boolean|undefined} [emptySelection] Indicate if selection data should be passed\n */\n generateClickEvent(eventType, event, pointer, oldSelection) {\n let emptySelection = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n const properties = this._initBaseEvent(event, pointer);\n if (emptySelection === true) {\n properties.nodes = [];\n properties.edges = [];\n } else {\n const tmp = this.getSelection();\n properties.nodes = tmp.nodes;\n properties.edges = tmp.edges;\n }\n if (oldSelection !== undefined) {\n properties[\"previousSelection\"] = oldSelection;\n }\n if (eventType == \"click\") {\n // For the time being, restrict this functionality to\n // just the click event.\n properties.items = this.getClickedItems(pointer);\n }\n if (event.controlEdge !== undefined) {\n properties.controlEdge = event.controlEdge;\n }\n this.body.emitter.emit(eventType, properties);\n }\n\n /**\n *\n * @param {object} obj\n * @param {boolean} [highlightEdges]\n * @returns {boolean}\n */\n selectObject(obj) {\n let highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.selectConnectedEdges;\n if (obj !== undefined) {\n if (obj instanceof Node) {\n if (highlightEdges === true) {\n this._selectionAccumulator.addEdges(...obj.edges);\n }\n this._selectionAccumulator.addNodes(obj);\n } else {\n this._selectionAccumulator.addEdges(obj);\n }\n return true;\n }\n return false;\n }\n\n /**\n *\n * @param {object} obj\n */\n deselectObject(obj) {\n if (obj.isSelected() === true) {\n obj.selected = false;\n this._removeFromSelection(obj);\n }\n }\n\n /**\n * retrieve all nodes overlapping with given object\n * @param {object} object An object with parameters left, top, right, bottom\n * @returns {number[]} An array with id's of the overlapping nodes\n * @private\n */\n _getAllNodesOverlappingWith(object) {\n const overlappingNodes = [];\n const nodes = this.body.nodes;\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n const nodeId = this.body.nodeIndices[i];\n if (nodes[nodeId].isOverlappingWith(object)) {\n overlappingNodes.push(nodeId);\n }\n }\n return overlappingNodes;\n }\n\n /**\n * Return a position object in canvasspace from a single point in screenspace\n * @param {{x: number, y: number}} pointer\n * @returns {{left: number, top: number, right: number, bottom: number}}\n * @private\n */\n _pointerToPositionObject(pointer) {\n const canvasPos = this.canvas.DOMtoCanvas(pointer);\n return {\n left: canvasPos.x - 1,\n top: canvasPos.y + 1,\n right: canvasPos.x + 1,\n bottom: canvasPos.y - 1\n };\n }\n\n /**\n * Get the top node at the passed point (like a click)\n * @param {{x: number, y: number}} pointer\n * @param {boolean} [returnNode]\n * @returns {Node | undefined} node\n */\n getNodeAt(pointer) {\n let returnNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n // we first check if this is an navigation controls element\n const positionObject = this._pointerToPositionObject(pointer);\n const overlappingNodes = this._getAllNodesOverlappingWith(positionObject);\n // if there are overlapping nodes, select the last one, this is the\n // one which is drawn on top of the others\n if (overlappingNodes.length > 0) {\n if (returnNode === true) {\n return this.body.nodes[overlappingNodes[overlappingNodes.length - 1]];\n } else {\n return overlappingNodes[overlappingNodes.length - 1];\n }\n } else {\n return undefined;\n }\n }\n\n /**\n * retrieve all edges overlapping with given object, selector is around center\n * @param {object} object An object with parameters left, top, right, bottom\n * @param {number[]} overlappingEdges An array with id's of the overlapping nodes\n * @private\n */\n _getEdgesOverlappingWith(object, overlappingEdges) {\n const edges = this.body.edges;\n for (let i = 0; i < this.body.edgeIndices.length; i++) {\n const edgeId = this.body.edgeIndices[i];\n if (edges[edgeId].isOverlappingWith(object)) {\n overlappingEdges.push(edgeId);\n }\n }\n }\n\n /**\n * retrieve all nodes overlapping with given object\n * @param {object} object An object with parameters left, top, right, bottom\n * @returns {number[]} An array with id's of the overlapping nodes\n * @private\n */\n _getAllEdgesOverlappingWith(object) {\n const overlappingEdges = [];\n this._getEdgesOverlappingWith(object, overlappingEdges);\n return overlappingEdges;\n }\n\n /**\n * Get the edges nearest to the passed point (like a click)\n * @param {{x: number, y: number}} pointer\n * @param {boolean} [returnEdge]\n * @returns {Edge | undefined} node\n */\n getEdgeAt(pointer) {\n let returnEdge = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n // Iterate over edges, pick closest within 10\n const canvasPos = this.canvas.DOMtoCanvas(pointer);\n let mindist = 10;\n let overlappingEdge = null;\n const edges = this.body.edges;\n for (let i = 0; i < this.body.edgeIndices.length; i++) {\n const edgeId = this.body.edgeIndices[i];\n const edge = edges[edgeId];\n if (edge.connected) {\n const xFrom = edge.from.x;\n const yFrom = edge.from.y;\n const xTo = edge.to.x;\n const yTo = edge.to.y;\n const dist = edge.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, canvasPos.x, canvasPos.y);\n if (dist < mindist) {\n overlappingEdge = edgeId;\n mindist = dist;\n }\n }\n }\n if (overlappingEdge !== null) {\n if (returnEdge === true) {\n return this.body.edges[overlappingEdge];\n } else {\n return overlappingEdge;\n }\n } else {\n return undefined;\n }\n }\n\n /**\n * Add object to the selection array.\n * @param {object} obj\n * @private\n */\n _addToHover(obj) {\n if (obj instanceof Node) {\n this.hoverObj.nodes[obj.id] = obj;\n } else {\n this.hoverObj.edges[obj.id] = obj;\n }\n }\n\n /**\n * Remove a single option from selection.\n * @param {object} obj\n * @private\n */\n _removeFromSelection(obj) {\n if (obj instanceof Node) {\n this._selectionAccumulator.deleteNodes(obj);\n this._selectionAccumulator.deleteEdges(...obj.edges);\n } else {\n this._selectionAccumulator.deleteEdges(obj);\n }\n }\n\n /**\n * Unselect all nodes and edges.\n */\n unselectAll() {\n this._selectionAccumulator.clear();\n }\n\n /**\n * return the number of selected nodes\n * @returns {number}\n */\n getSelectedNodeCount() {\n return this._selectionAccumulator.sizeNodes;\n }\n\n /**\n * return the number of selected edges\n * @returns {number}\n */\n getSelectedEdgeCount() {\n return this._selectionAccumulator.sizeEdges;\n }\n\n /**\n * select the edges connected to the node that is being selected\n * @param {Node} node\n * @private\n */\n _hoverConnectedEdges(node) {\n for (let i = 0; i < node.edges.length; i++) {\n const edge = node.edges[i];\n edge.hover = true;\n this._addToHover(edge);\n }\n }\n\n /**\n * Remove the highlight from a node or edge, in response to mouse movement\n * @param {Event} event\n * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse\n * @param {Node|vis.Edge} object\n * @private\n */\n emitBlurEvent(event, pointer, object) {\n const properties = this._initBaseEvent(event, pointer);\n if (object.hover === true) {\n object.hover = false;\n if (object instanceof Node) {\n properties.node = object.id;\n this.body.emitter.emit(\"blurNode\", properties);\n } else {\n properties.edge = object.id;\n this.body.emitter.emit(\"blurEdge\", properties);\n }\n }\n }\n\n /**\n * Create the highlight for a node or edge, in response to mouse movement\n * @param {Event} event\n * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse\n * @param {Node|vis.Edge} object\n * @returns {boolean} hoverChanged\n * @private\n */\n emitHoverEvent(event, pointer, object) {\n const properties = this._initBaseEvent(event, pointer);\n let hoverChanged = false;\n if (object.hover === false) {\n object.hover = true;\n this._addToHover(object);\n hoverChanged = true;\n if (object instanceof Node) {\n properties.node = object.id;\n this.body.emitter.emit(\"hoverNode\", properties);\n } else {\n properties.edge = object.id;\n this.body.emitter.emit(\"hoverEdge\", properties);\n }\n }\n return hoverChanged;\n }\n\n /**\n * Perform actions in response to a mouse movement.\n * @param {Event} event\n * @param {{x: number, y: number}} pointer | object with the x and y screen coordinates of the mouse\n */\n hoverObject(event, pointer) {\n let object = this.getNodeAt(pointer);\n if (object === undefined) {\n object = this.getEdgeAt(pointer);\n }\n let hoverChanged = false;\n // remove all node hover highlights\n for (const nodeId in this.hoverObj.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.hoverObj.nodes, nodeId)) {\n if (object === undefined || object instanceof Node && object.id != nodeId || object instanceof Edge) {\n this.emitBlurEvent(event, pointer, this.hoverObj.nodes[nodeId]);\n delete this.hoverObj.nodes[nodeId];\n hoverChanged = true;\n }\n }\n }\n\n // removing all edge hover highlights\n for (const edgeId in this.hoverObj.edges) {\n if (Object.prototype.hasOwnProperty.call(this.hoverObj.edges, edgeId)) {\n // if the hover has been changed here it means that the node has been hovered over or off\n // we then do not use the emitBlurEvent method here.\n if (hoverChanged === true) {\n this.hoverObj.edges[edgeId].hover = false;\n delete this.hoverObj.edges[edgeId];\n }\n // if the blur remains the same and the object is undefined (mouse off) or another\n // edge has been hovered, or another node has been hovered we blur the edge.\n else if (object === undefined || object instanceof Edge && object.id != edgeId || object instanceof Node && !object.hover) {\n this.emitBlurEvent(event, pointer, this.hoverObj.edges[edgeId]);\n delete this.hoverObj.edges[edgeId];\n hoverChanged = true;\n }\n }\n }\n if (object !== undefined) {\n const hoveredEdgesCount = _Object$keys(this.hoverObj.edges).length;\n const hoveredNodesCount = _Object$keys(this.hoverObj.nodes).length;\n const newOnlyHoveredEdge = object instanceof Edge && hoveredEdgesCount === 0 && hoveredNodesCount === 0;\n const newOnlyHoveredNode = object instanceof Node && hoveredEdgesCount === 0 && hoveredNodesCount === 0;\n if (hoverChanged || newOnlyHoveredEdge || newOnlyHoveredNode) {\n hoverChanged = this.emitHoverEvent(event, pointer, object);\n }\n if (object instanceof Node && this.options.hoverConnectedEdges === true) {\n this._hoverConnectedEdges(object);\n }\n }\n if (hoverChanged === true) {\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n\n /**\n * Commit the selection changes but don't emit any events.\n */\n commitWithoutEmitting() {\n this._selectionAccumulator.commit();\n }\n\n /**\n * Select and deselect nodes depending current selection change.\n *\n * For changing nodes, select/deselect events are fired.\n *\n * NOTE: For a given edge, if one connecting node is deselected and with the\n * same click the other node is selected, no events for the edge will fire. It\n * was selected and it will remain selected.\n * @param {{x: number, y: number}} pointer - The x and y coordinates of the\n * click, tap, dragend… that triggered this.\n * @param {UIEvent} event - The event that triggered this.\n */\n commitAndEmit(pointer, event) {\n let selected = false;\n const selectionChanges = this._selectionAccumulator.commit();\n const previousSelection = {\n nodes: selectionChanges.nodes.previous,\n edges: selectionChanges.edges.previous\n };\n if (selectionChanges.edges.deleted.length > 0) {\n this.generateClickEvent(\"deselectEdge\", event, pointer, previousSelection);\n selected = true;\n }\n if (selectionChanges.nodes.deleted.length > 0) {\n this.generateClickEvent(\"deselectNode\", event, pointer, previousSelection);\n selected = true;\n }\n if (selectionChanges.nodes.added.length > 0) {\n this.generateClickEvent(\"selectNode\", event, pointer);\n selected = true;\n }\n if (selectionChanges.edges.added.length > 0) {\n this.generateClickEvent(\"selectEdge\", event, pointer);\n selected = true;\n }\n\n // fire the select event if anything has been selected or deselected\n if (selected === true) {\n // select or unselect\n this.generateClickEvent(\"select\", event, pointer);\n }\n }\n\n /**\n * Retrieve the currently selected node and edge ids.\n * @returns {{nodes: Array.<string>, edges: Array.<string>}} Arrays with the\n * ids of the selected nodes and edges.\n */\n getSelection() {\n return {\n nodes: this.getSelectedNodeIds(),\n edges: this.getSelectedEdgeIds()\n };\n }\n\n /**\n * Retrieve the currently selected nodes.\n * @returns {Array} An array with selected nodes.\n */\n getSelectedNodes() {\n return this._selectionAccumulator.getNodes();\n }\n\n /**\n * Retrieve the currently selected edges.\n * @returns {Array} An array with selected edges.\n */\n getSelectedEdges() {\n return this._selectionAccumulator.getEdges();\n }\n\n /**\n * Retrieve the currently selected node ids.\n * @returns {Array} An array with the ids of the selected nodes.\n */\n getSelectedNodeIds() {\n var _context;\n return _mapInstanceProperty(_context = this._selectionAccumulator.getNodes()).call(_context, node => node.id);\n }\n\n /**\n * Retrieve the currently selected edge ids.\n * @returns {Array} An array with the ids of the selected edges.\n */\n getSelectedEdgeIds() {\n var _context2;\n return _mapInstanceProperty(_context2 = this._selectionAccumulator.getEdges()).call(_context2, edge => edge.id);\n }\n\n /**\n * Updates the current selection\n * @param {{nodes: Array.<string>, edges: Array.<string>}} selection\n * @param {object} options Options\n */\n setSelection(selection) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!selection || !selection.nodes && !selection.edges) {\n throw new TypeError(\"Selection must be an object with nodes and/or edges properties\");\n }\n\n // first unselect any selected node, if option is true or undefined\n if (options.unselectAll || options.unselectAll === undefined) {\n this.unselectAll();\n }\n if (selection.nodes) {\n for (const id of selection.nodes) {\n const node = this.body.nodes[id];\n if (!node) {\n throw new RangeError('Node with id \"' + id + '\" not found');\n }\n // don't select edges with it\n this.selectObject(node, options.highlightEdges);\n }\n }\n if (selection.edges) {\n for (const id of selection.edges) {\n const edge = this.body.edges[id];\n if (!edge) {\n throw new RangeError('Edge with id \"' + id + '\" not found');\n }\n this.selectObject(edge);\n }\n }\n this.body.emitter.emit(\"_requestRedraw\");\n this._selectionAccumulator.commit();\n }\n\n /**\n * select zero or more nodes with the option to highlight edges\n * @param {number[] | string[]} selection An array with the ids of the\n * selected nodes.\n * @param {boolean} [highlightEdges]\n */\n selectNodes(selection) {\n let highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (!selection || selection.length === undefined) throw \"Selection must be an array with ids\";\n this.setSelection({\n nodes: selection\n }, {\n highlightEdges: highlightEdges\n });\n }\n\n /**\n * select zero or more edges\n * @param {number[] | string[]} selection An array with the ids of the\n * selected nodes.\n */\n selectEdges(selection) {\n if (!selection || selection.length === undefined) throw \"Selection must be an array with ids\";\n this.setSelection({\n edges: selection\n });\n }\n\n /**\n * Validate the selection: remove ids of nodes which no longer exist\n * @private\n */\n updateSelection() {\n for (const node in this._selectionAccumulator.getNodes()) {\n if (!Object.prototype.hasOwnProperty.call(this.body.nodes, node.id)) {\n this._selectionAccumulator.deleteNodes(node);\n }\n }\n for (const edge in this._selectionAccumulator.getEdges()) {\n if (!Object.prototype.hasOwnProperty.call(this.body.edges, edge.id)) {\n this._selectionAccumulator.deleteEdges(edge);\n }\n }\n }\n\n /**\n * Determine all the visual elements clicked which are on the given point.\n *\n * All elements are returned; this includes nodes, edges and their labels.\n * The order returned is from highest to lowest, i.e. element 0 of the return\n * value is the topmost item clicked on.\n *\n * The return value consists of an array of the following possible elements:\n *\n * - `{nodeId:number}` - node with given id clicked on\n * - `{nodeId:number, labelId:0}` - label of node with given id clicked on\n * - `{edgeId:number}` - edge with given id clicked on\n * - `{edge:number, labelId:0}` - label of edge with given id clicked on\n *\n * ## NOTES\n *\n * - Currently, there is only one label associated with a node or an edge,\n * but this is expected to change somewhere in the future.\n * - Since there is no z-indexing yet, it is not really possible to set the nodes and\n * edges in the correct order. For the time being, nodes come first.\n * @param {point} pointer mouse position in screen coordinates\n * @returns {Array.<nodeClickItem|nodeLabelClickItem|edgeClickItem|edgeLabelClickItem>}\n * @private\n */\n getClickedItems(pointer) {\n const point = this.canvas.DOMtoCanvas(pointer);\n const items = [];\n\n // Note reverse order; we want the topmost clicked items to be first in the array\n // Also note that selected nodes are disregarded here; these normally display on top\n const nodeIndices = this.body.nodeIndices;\n const nodes = this.body.nodes;\n for (let i = nodeIndices.length - 1; i >= 0; i--) {\n const node = nodes[nodeIndices[i]];\n const ret = node.getItemsOnPoint(point);\n items.push.apply(items, ret); // Append the return value to the running list.\n }\n const edgeIndices = this.body.edgeIndices;\n const edges = this.body.edges;\n for (let i = edgeIndices.length - 1; i >= 0; i--) {\n const edge = edges[edgeIndices[i]];\n const ret = edge.getItemsOnPoint(point);\n items.push.apply(items, ret); // Append the return value to the running list.\n }\n return items;\n }\n}\n\nvar es_array_sort = {};\n\nvar arraySort;\nvar hasRequiredArraySort;\n\nfunction requireArraySort () {\n\tif (hasRequiredArraySort) return arraySort;\n\thasRequiredArraySort = 1;\n\tvar arraySlice = /*@__PURE__*/ requireArraySlice();\n\n\tvar floor = Math.floor;\n\n\tvar sort = function (array, comparefn) {\n\t var length = array.length;\n\n\t if (length < 8) {\n\t // insertion sort\n\t var i = 1;\n\t var element, j;\n\n\t while (i < length) {\n\t j = i;\n\t element = array[i];\n\t while (j && comparefn(array[j - 1], element) > 0) {\n\t array[j] = array[--j];\n\t }\n\t if (j !== i++) array[j] = element;\n\t }\n\t } else {\n\t // merge sort\n\t var middle = floor(length / 2);\n\t var left = sort(arraySlice(array, 0, middle), comparefn);\n\t var right = sort(arraySlice(array, middle), comparefn);\n\t var llength = left.length;\n\t var rlength = right.length;\n\t var lindex = 0;\n\t var rindex = 0;\n\n\t while (lindex < llength || rindex < rlength) {\n\t array[lindex + rindex] = (lindex < llength && rindex < rlength)\n\t ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]\n\t : lindex < llength ? left[lindex++] : right[rindex++];\n\t }\n\t }\n\n\t return array;\n\t};\n\n\tarraySort = sort;\n\treturn arraySort;\n}\n\nvar environmentFfVersion;\nvar hasRequiredEnvironmentFfVersion;\n\nfunction requireEnvironmentFfVersion () {\n\tif (hasRequiredEnvironmentFfVersion) return environmentFfVersion;\n\thasRequiredEnvironmentFfVersion = 1;\n\tvar userAgent = /*@__PURE__*/ requireEnvironmentUserAgent();\n\n\tvar firefox = userAgent.match(/firefox\\/(\\d+)/i);\n\n\tenvironmentFfVersion = !!firefox && +firefox[1];\n\treturn environmentFfVersion;\n}\n\nvar environmentIsIeOrEdge;\nvar hasRequiredEnvironmentIsIeOrEdge;\n\nfunction requireEnvironmentIsIeOrEdge () {\n\tif (hasRequiredEnvironmentIsIeOrEdge) return environmentIsIeOrEdge;\n\thasRequiredEnvironmentIsIeOrEdge = 1;\n\tvar UA = /*@__PURE__*/ requireEnvironmentUserAgent();\n\n\tenvironmentIsIeOrEdge = /MSIE|Trident/.test(UA);\n\treturn environmentIsIeOrEdge;\n}\n\nvar environmentWebkitVersion;\nvar hasRequiredEnvironmentWebkitVersion;\n\nfunction requireEnvironmentWebkitVersion () {\n\tif (hasRequiredEnvironmentWebkitVersion) return environmentWebkitVersion;\n\thasRequiredEnvironmentWebkitVersion = 1;\n\tvar userAgent = /*@__PURE__*/ requireEnvironmentUserAgent();\n\n\tvar webkit = userAgent.match(/AppleWebKit\\/(\\d+)\\./);\n\n\tenvironmentWebkitVersion = !!webkit && +webkit[1];\n\treturn environmentWebkitVersion;\n}\n\nvar hasRequiredEs_array_sort;\n\nfunction requireEs_array_sort () {\n\tif (hasRequiredEs_array_sort) return es_array_sort;\n\thasRequiredEs_array_sort = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar uncurryThis = /*@__PURE__*/ requireFunctionUncurryThis();\n\tvar aCallable = /*@__PURE__*/ requireACallable();\n\tvar toObject = /*@__PURE__*/ requireToObject();\n\tvar lengthOfArrayLike = /*@__PURE__*/ requireLengthOfArrayLike();\n\tvar deletePropertyOrThrow = /*@__PURE__*/ requireDeletePropertyOrThrow();\n\tvar toString = /*@__PURE__*/ requireToString();\n\tvar fails = /*@__PURE__*/ requireFails();\n\tvar internalSort = /*@__PURE__*/ requireArraySort();\n\tvar arrayMethodIsStrict = /*@__PURE__*/ requireArrayMethodIsStrict();\n\tvar FF = /*@__PURE__*/ requireEnvironmentFfVersion();\n\tvar IE_OR_EDGE = /*@__PURE__*/ requireEnvironmentIsIeOrEdge();\n\tvar V8 = /*@__PURE__*/ requireEnvironmentV8Version();\n\tvar WEBKIT = /*@__PURE__*/ requireEnvironmentWebkitVersion();\n\n\tvar test = [];\n\tvar nativeSort = uncurryThis(test.sort);\n\tvar push = uncurryThis(test.push);\n\n\t// IE8-\n\tvar FAILS_ON_UNDEFINED = fails(function () {\n\t test.sort(undefined);\n\t});\n\t// V8 bug\n\tvar FAILS_ON_NULL = fails(function () {\n\t test.sort(null);\n\t});\n\t// Old WebKit\n\tvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\n\tvar STABLE_SORT = !fails(function () {\n\t // feature detection can be too slow, so check engines versions\n\t if (V8) return V8 < 70;\n\t if (FF && FF > 3) return;\n\t if (IE_OR_EDGE) return true;\n\t if (WEBKIT) return WEBKIT < 603;\n\n\t var result = '';\n\t var code, chr, value, index;\n\n\t // generate an array with more 512 elements (Chakra and old V8 fails only in this case)\n\t for (code = 65; code < 76; code++) {\n\t chr = String.fromCharCode(code);\n\n\t switch (code) {\n\t case 66: case 69: case 70: case 72: value = 3; break;\n\t case 68: case 71: value = 4; break;\n\t default: value = 2;\n\t }\n\n\t for (index = 0; index < 47; index++) {\n\t test.push({ k: chr + index, v: value });\n\t }\n\t }\n\n\t test.sort(function (a, b) { return b.v - a.v; });\n\n\t for (index = 0; index < test.length; index++) {\n\t chr = test[index].k.charAt(0);\n\t if (result.charAt(result.length - 1) !== chr) result += chr;\n\t }\n\n\t return result !== 'DGBEFHACIJK';\n\t});\n\n\tvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;\n\n\tvar getSortCompare = function (comparefn) {\n\t return function (x, y) {\n\t if (y === undefined) return -1;\n\t if (x === undefined) return 1;\n\t if (comparefn !== undefined) return +comparefn(x, y) || 0;\n\t return toString(x) > toString(y) ? 1 : -1;\n\t };\n\t};\n\n\t// `Array.prototype.sort` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.sort\n\t$({ target: 'Array', proto: true, forced: FORCED }, {\n\t sort: function sort(comparefn) {\n\t if (comparefn !== undefined) aCallable(comparefn);\n\n\t var array = toObject(this);\n\n\t if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);\n\n\t var items = [];\n\t var arrayLength = lengthOfArrayLike(array);\n\t var itemsLength, index;\n\n\t for (index = 0; index < arrayLength; index++) {\n\t if (index in array) push(items, array[index]);\n\t }\n\n\t internalSort(items, getSortCompare(comparefn));\n\n\t itemsLength = lengthOfArrayLike(items);\n\t index = 0;\n\n\t while (index < itemsLength) array[index] = items[index++];\n\t while (index < arrayLength) deletePropertyOrThrow(array, index++);\n\n\t return array;\n\t }\n\t});\n\treturn es_array_sort;\n}\n\nvar sort$3;\nvar hasRequiredSort$3;\n\nfunction requireSort$3 () {\n\tif (hasRequiredSort$3) return sort$3;\n\thasRequiredSort$3 = 1;\n\trequireEs_array_sort();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tsort$3 = getBuiltInPrototypeMethod('Array', 'sort');\n\treturn sort$3;\n}\n\nvar sort$2;\nvar hasRequiredSort$2;\n\nfunction requireSort$2 () {\n\tif (hasRequiredSort$2) return sort$2;\n\thasRequiredSort$2 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireSort$3();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\tsort$2 = function (it) {\n\t var own = it.sort;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.sort) ? method : own;\n\t};\n\treturn sort$2;\n}\n\nvar sort$1;\nvar hasRequiredSort$1;\n\nfunction requireSort$1 () {\n\tif (hasRequiredSort$1) return sort$1;\n\thasRequiredSort$1 = 1;\n\tvar parent = /*@__PURE__*/ requireSort$2();\n\n\tsort$1 = parent;\n\treturn sort$1;\n}\n\nvar sort;\nvar hasRequiredSort;\n\nfunction requireSort () {\n\tif (hasRequiredSort) return sort;\n\thasRequiredSort = 1;\n\tsort = /*@__PURE__*/ requireSort$1();\n\treturn sort;\n}\n\nvar sortExports = requireSort();\nvar _sortInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(sortExports);\n\nvar es_array_reduce = {};\n\nvar arrayReduce;\nvar hasRequiredArrayReduce;\n\nfunction requireArrayReduce () {\n\tif (hasRequiredArrayReduce) return arrayReduce;\n\thasRequiredArrayReduce = 1;\n\tvar aCallable = /*@__PURE__*/ requireACallable();\n\tvar toObject = /*@__PURE__*/ requireToObject();\n\tvar IndexedObject = /*@__PURE__*/ requireIndexedObject();\n\tvar lengthOfArrayLike = /*@__PURE__*/ requireLengthOfArrayLike();\n\n\tvar $TypeError = TypeError;\n\n\tvar REDUCE_EMPTY = 'Reduce of empty array with no initial value';\n\n\t// `Array.prototype.{ reduce, reduceRight }` methods implementation\n\tvar createMethod = function (IS_RIGHT) {\n\t return function (that, callbackfn, argumentsLength, memo) {\n\t var O = toObject(that);\n\t var self = IndexedObject(O);\n\t var length = lengthOfArrayLike(O);\n\t aCallable(callbackfn);\n\t if (length === 0 && argumentsLength < 2) throw new $TypeError(REDUCE_EMPTY);\n\t var index = IS_RIGHT ? length - 1 : 0;\n\t var i = IS_RIGHT ? -1 : 1;\n\t if (argumentsLength < 2) while (true) {\n\t if (index in self) {\n\t memo = self[index];\n\t index += i;\n\t break;\n\t }\n\t index += i;\n\t if (IS_RIGHT ? index < 0 : length <= index) {\n\t throw new $TypeError(REDUCE_EMPTY);\n\t }\n\t }\n\t for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n\t memo = callbackfn(memo, self[index], index, O);\n\t }\n\t return memo;\n\t };\n\t};\n\n\tarrayReduce = {\n\t // `Array.prototype.reduce` method\n\t // https://tc39.es/ecma262/#sec-array.prototype.reduce\n\t left: createMethod(false),\n\t // `Array.prototype.reduceRight` method\n\t // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n\t right: createMethod(true)\n\t};\n\treturn arrayReduce;\n}\n\nvar environmentIsNode;\nvar hasRequiredEnvironmentIsNode;\n\nfunction requireEnvironmentIsNode () {\n\tif (hasRequiredEnvironmentIsNode) return environmentIsNode;\n\thasRequiredEnvironmentIsNode = 1;\n\tvar ENVIRONMENT = /*@__PURE__*/ requireEnvironment();\n\n\tenvironmentIsNode = ENVIRONMENT === 'NODE';\n\treturn environmentIsNode;\n}\n\nvar hasRequiredEs_array_reduce;\n\nfunction requireEs_array_reduce () {\n\tif (hasRequiredEs_array_reduce) return es_array_reduce;\n\thasRequiredEs_array_reduce = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar $reduce = /*@__PURE__*/ requireArrayReduce().left;\n\tvar arrayMethodIsStrict = /*@__PURE__*/ requireArrayMethodIsStrict();\n\tvar CHROME_VERSION = /*@__PURE__*/ requireEnvironmentV8Version();\n\tvar IS_NODE = /*@__PURE__*/ requireEnvironmentIsNode();\n\n\t// Chrome 80-82 has a critical bug\n\t// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\n\tvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\n\tvar FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');\n\n\t// `Array.prototype.reduce` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.reduce\n\t$({ target: 'Array', proto: true, forced: FORCED }, {\n\t reduce: function reduce(callbackfn /* , initialValue */) {\n\t var length = arguments.length;\n\t return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);\n\t }\n\t});\n\treturn es_array_reduce;\n}\n\nvar reduce$3;\nvar hasRequiredReduce$3;\n\nfunction requireReduce$3 () {\n\tif (hasRequiredReduce$3) return reduce$3;\n\thasRequiredReduce$3 = 1;\n\trequireEs_array_reduce();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\treduce$3 = getBuiltInPrototypeMethod('Array', 'reduce');\n\treturn reduce$3;\n}\n\nvar reduce$2;\nvar hasRequiredReduce$2;\n\nfunction requireReduce$2 () {\n\tif (hasRequiredReduce$2) return reduce$2;\n\thasRequiredReduce$2 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireReduce$3();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\treduce$2 = function (it) {\n\t var own = it.reduce;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.reduce) ? method : own;\n\t};\n\treturn reduce$2;\n}\n\nvar reduce$1;\nvar hasRequiredReduce$1;\n\nfunction requireReduce$1 () {\n\tif (hasRequiredReduce$1) return reduce$1;\n\thasRequiredReduce$1 = 1;\n\tvar parent = /*@__PURE__*/ requireReduce$2();\n\n\treduce$1 = parent;\n\treturn reduce$1;\n}\n\nvar reduce;\nvar hasRequiredReduce;\n\nfunction requireReduce () {\n\tif (hasRequiredReduce) return reduce;\n\thasRequiredReduce = 1;\n\treduce = /*@__PURE__*/ requireReduce$1();\n\treturn reduce;\n}\n\nvar reduceExports = requireReduce();\nvar _reduceInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(reduceExports);\n\n/**\n * Helper classes for LayoutEngine.\n *\n * Strategy pattern for usage of direction methods for hierarchical layouts.\n */\n\n/**\n * Interface definition for direction strategy classes.\n *\n * This class describes the interface for the Strategy\n * pattern classes used to differentiate horizontal and vertical\n * direction of hierarchical results.\n *\n * For a given direction, one coordinate will be 'fixed', meaning that it is\n * determined by level.\n * The other coordinate is 'unfixed', meaning that the nodes on a given level\n * can still move along that coordinate. So:\n *\n * - `vertical` layout: `x` unfixed, `y` fixed per level\n * - `horizontal` layout: `x` fixed per level, `y` unfixed\n *\n * The local methods are stubs and should be regarded as abstract.\n * Derived classes **must** implement all the methods themselves.\n * @private\n */\nclass DirectionInterface {\n /**\n * @ignore\n */\n abstract() {\n throw new Error(\"Can't instantiate abstract class!\");\n }\n\n /**\n * This is a dummy call which is used to suppress the jsdoc errors of type:\n *\n * \"'param' is assigned a value but never used\"\n * @ignore\n */\n fake_use() {\n // Do nothing special\n }\n\n /**\n * Type to use to translate dynamic curves to, in the case of hierarchical layout.\n * Dynamic curves do not work for these.\n *\n * The value should be perpendicular to the actual direction of the layout.\n * @returns {string} Direction, either 'vertical' or 'horizontal'\n */\n curveType() {\n return this.abstract();\n }\n\n /**\n * Return the value of the coordinate that is not fixed for this direction.\n * @param {Node} node The node to read\n * @returns {number} Value of the unfixed coordinate\n */\n getPosition(node) {\n this.fake_use(node);\n return this.abstract();\n }\n\n /**\n * Set the value of the coordinate that is not fixed for this direction.\n * @param {Node} node The node to adjust\n * @param {number} position\n * @param {number} [level] if specified, the hierarchy level that this node should be fixed to\n */\n setPosition(node, position) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n this.fake_use(node, position, level);\n this.abstract();\n }\n\n /**\n * Get the width of a tree.\n *\n * A `tree` here is a subset of nodes within the network which are not connected to other nodes,\n * only among themselves. In essence, it is a sub-network.\n * @param {number} index The index number of a tree\n * @returns {number} the width of a tree in the view coordinates\n */\n getTreeSize(index) {\n this.fake_use(index);\n return this.abstract();\n }\n\n /**\n * Sort array of nodes on the unfixed coordinates.\n *\n * Note:** chrome has non-stable sorting implementation, which\n * has a tendency to change the order of the array items,\n * even if the custom sort function returns 0.\n *\n * For this reason, an external sort implementation is used,\n * which has the added benefit of being faster than the standard\n * platforms implementation. This has been verified on `node.js`,\n * `firefox` and `chrome` (all linux).\n * @param {Array.<Node>} nodeArray array of nodes to sort\n */\n sort(nodeArray) {\n this.fake_use(nodeArray);\n this.abstract();\n }\n\n /**\n * Assign the fixed coordinate of the node to the given level\n * @param {Node} node The node to adjust\n * @param {number} level The level to fix to\n */\n fix(node, level) {\n this.fake_use(node, level);\n this.abstract();\n }\n\n /**\n * Add an offset to the unfixed coordinate of the given node.\n * @param {NodeId} nodeId Id of the node to adjust\n * @param {number} diff Offset to add to the unfixed coordinate\n */\n shift(nodeId, diff) {\n this.fake_use(nodeId, diff);\n this.abstract();\n }\n}\n\n/**\n * Vertical Strategy\n *\n * Coordinate `y` is fixed on levels, coordinate `x` is unfixed.\n * @augments DirectionInterface\n * @private\n */\nclass VerticalStrategy extends DirectionInterface {\n /**\n * Constructor\n * @param {object} layout reference to the parent LayoutEngine instance.\n */\n constructor(layout) {\n super();\n this.layout = layout;\n }\n\n /** @inheritDoc */\n curveType() {\n return \"horizontal\";\n }\n\n /** @inheritDoc */\n getPosition(node) {\n return node.x;\n }\n\n /** @inheritDoc */\n setPosition(node, position) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n if (level !== undefined) {\n this.layout.hierarchical.addToOrdering(node, level);\n }\n node.x = position;\n }\n\n /** @inheritDoc */\n getTreeSize(index) {\n const res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index);\n return {\n min: res.min_x,\n max: res.max_x\n };\n }\n\n /** @inheritDoc */\n sort(nodeArray) {\n _sortInstanceProperty(nodeArray).call(nodeArray, function (a, b) {\n return a.x - b.x;\n });\n }\n\n /** @inheritDoc */\n fix(node, level) {\n node.y = this.layout.options.hierarchical.levelSeparation * level;\n node.options.fixed.y = true;\n }\n\n /** @inheritDoc */\n shift(nodeId, diff) {\n this.layout.body.nodes[nodeId].x += diff;\n }\n}\n\n/**\n * Horizontal Strategy\n *\n * Coordinate `x` is fixed on levels, coordinate `y` is unfixed.\n * @augments DirectionInterface\n * @private\n */\nclass HorizontalStrategy extends DirectionInterface {\n /**\n * Constructor\n * @param {object} layout reference to the parent LayoutEngine instance.\n */\n constructor(layout) {\n super();\n this.layout = layout;\n }\n\n /** @inheritDoc */\n curveType() {\n return \"vertical\";\n }\n\n /** @inheritDoc */\n getPosition(node) {\n return node.y;\n }\n\n /** @inheritDoc */\n setPosition(node, position) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n if (level !== undefined) {\n this.layout.hierarchical.addToOrdering(node, level);\n }\n node.y = position;\n }\n\n /** @inheritDoc */\n getTreeSize(index) {\n const res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index);\n return {\n min: res.min_y,\n max: res.max_y\n };\n }\n\n /** @inheritDoc */\n sort(nodeArray) {\n _sortInstanceProperty(nodeArray).call(nodeArray, function (a, b) {\n return a.y - b.y;\n });\n }\n\n /** @inheritDoc */\n fix(node, level) {\n node.x = this.layout.options.hierarchical.levelSeparation * level;\n node.options.fixed.x = true;\n }\n\n /** @inheritDoc */\n shift(nodeId, diff) {\n this.layout.body.nodes[nodeId].y += diff;\n }\n}\n\nvar es_array_every = {};\n\nvar hasRequiredEs_array_every;\n\nfunction requireEs_array_every () {\n\tif (hasRequiredEs_array_every) return es_array_every;\n\thasRequiredEs_array_every = 1;\n\tvar $ = /*@__PURE__*/ require_export();\n\tvar $every = /*@__PURE__*/ requireArrayIteration().every;\n\tvar arrayMethodIsStrict = /*@__PURE__*/ requireArrayMethodIsStrict();\n\n\tvar STRICT_METHOD = arrayMethodIsStrict('every');\n\n\t// `Array.prototype.every` method\n\t// https://tc39.es/ecma262/#sec-array.prototype.every\n\t$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n\t every: function every(callbackfn /* , thisArg */) {\n\t return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n\t }\n\t});\n\treturn es_array_every;\n}\n\nvar every$3;\nvar hasRequiredEvery$3;\n\nfunction requireEvery$3 () {\n\tif (hasRequiredEvery$3) return every$3;\n\thasRequiredEvery$3 = 1;\n\trequireEs_array_every();\n\tvar getBuiltInPrototypeMethod = /*@__PURE__*/ requireGetBuiltInPrototypeMethod();\n\n\tevery$3 = getBuiltInPrototypeMethod('Array', 'every');\n\treturn every$3;\n}\n\nvar every$2;\nvar hasRequiredEvery$2;\n\nfunction requireEvery$2 () {\n\tif (hasRequiredEvery$2) return every$2;\n\thasRequiredEvery$2 = 1;\n\tvar isPrototypeOf = /*@__PURE__*/ requireObjectIsPrototypeOf();\n\tvar method = /*@__PURE__*/ requireEvery$3();\n\n\tvar ArrayPrototype = Array.prototype;\n\n\tevery$2 = function (it) {\n\t var own = it.every;\n\t return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.every) ? method : own;\n\t};\n\treturn every$2;\n}\n\nvar every$1;\nvar hasRequiredEvery$1;\n\nfunction requireEvery$1 () {\n\tif (hasRequiredEvery$1) return every$1;\n\thasRequiredEvery$1 = 1;\n\tvar parent = /*@__PURE__*/ requireEvery$2();\n\n\tevery$1 = parent;\n\treturn every$1;\n}\n\nvar every;\nvar hasRequiredEvery;\n\nfunction requireEvery () {\n\tif (hasRequiredEvery) return every;\n\thasRequiredEvery = 1;\n\tevery = /*@__PURE__*/ requireEvery$1();\n\treturn every;\n}\n\nvar everyExports = requireEvery();\nvar _everyInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(everyExports);\n\n/**\n * Try to assign levels to nodes according to their positions in the cyclic “hierarchy”.\n * @param nodes - Visible nodes of the graph.\n * @param levels - If present levels will be added to it, if not a new object will be created.\n * @returns Populated node levels.\n */\nfunction fillLevelsByDirectionCyclic(nodes, levels) {\n const edges = new _Set();\n _forEachInstanceProperty(nodes).call(nodes, node => {\n var _context;\n _forEachInstanceProperty(_context = node.edges).call(_context, edge => {\n if (edge.connected) {\n edges.add(edge);\n }\n });\n });\n _forEachInstanceProperty(edges).call(edges, edge => {\n const fromId = edge.from.id;\n const toId = edge.to.id;\n if (levels[fromId] == null) {\n levels[fromId] = 0;\n }\n if (levels[toId] == null || levels[fromId] >= levels[toId]) {\n levels[toId] = levels[fromId] + 1;\n }\n });\n return levels;\n}\n/**\n * Assign levels to nodes according to their positions in the hierarchy. Leaves will be lined up at the bottom and all other nodes as close to their children as possible.\n * @param nodes - Visible nodes of the graph.\n * @returns Populated node levels.\n */\nfunction fillLevelsByDirectionLeaves(nodes) {\n return fillLevelsByDirection(\n // Pick only leaves (nodes without children).\n node => {\n var _context2, _context3;\n return _everyInstanceProperty(_context2 = _filterInstanceProperty(_context3 = node.edges\n // Take only visible nodes into account.\n ).call(_context3, edge => nodes.has(edge.toId))\n // Check that all edges lead to this node (leaf).\n ).call(_context2, edge => edge.to === node);\n },\n // Use the lowest level.\n (newLevel, oldLevel) => oldLevel > newLevel,\n // Go against the direction of the edges.\n \"from\", nodes);\n}\n/**\n * Assign levels to nodes according to their positions in the hierarchy. Roots will be lined up at the top and all nodes as close to their parents as possible.\n * @param nodes - Visible nodes of the graph.\n * @returns Populated node levels.\n */\nfunction fillLevelsByDirectionRoots(nodes) {\n return fillLevelsByDirection(\n // Pick only roots (nodes without parents).\n node => {\n var _context4, _context5;\n return _everyInstanceProperty(_context4 = _filterInstanceProperty(_context5 = node.edges\n // Take only visible nodes into account.\n ).call(_context5, edge => nodes.has(edge.toId))\n // Check that all edges lead from this node (root).\n ).call(_context4, edge => edge.from === node);\n },\n // Use the highest level.\n (newLevel, oldLevel) => oldLevel < newLevel,\n // Go in the direction of the edges.\n \"to\", nodes);\n}\n/**\n * Assign levels to nodes according to their positions in the hierarchy.\n * @param isEntryNode - Checks and return true if the graph should be traversed from this node.\n * @param shouldLevelBeReplaced - Checks and returns true if the level of given node should be updated to the new value.\n * @param direction - Wheter the graph should be traversed in the direction of the edges `\"to\"` or in the other way `\"from\"`.\n * @param nodes - Visible nodes of the graph.\n * @returns Populated node levels.\n */\nfunction fillLevelsByDirection(isEntryNode, shouldLevelBeReplaced, direction, nodes) {\n var _context6;\n const levels = _Object$create(null);\n // If acyclic, the graph can be walked through with (most likely way) fewer\n // steps than the number bellow. The exact value isn't too important as long\n // as it's quick to compute (doesn't impact acyclic graphs too much), is\n // higher than the number of steps actually needed (doesn't cut off before\n // acyclic graph is walked through) and prevents infinite loops (cuts off for\n // cyclic graphs).\n const limit = _reduceInstanceProperty(_context6 = [..._valuesInstanceProperty(nodes).call(nodes)]).call(_context6, (acc, node) => acc + 1 + node.edges.length, 0);\n const edgeIdProp = direction + \"Id\";\n const newLevelDiff = direction === \"to\" ? 1 : -1;\n for (const [entryNodeId, entryNode] of nodes) {\n if (\n // Skip if the node is not visible.\n !nodes.has(entryNodeId) ||\n // Skip if the node is not an entry node.\n !isEntryNode(entryNode)) {\n continue;\n }\n // Line up all the entry nodes on level 0.\n levels[entryNodeId] = 0;\n const stack = [entryNode];\n let done = 0;\n let node;\n while (node = stack.pop()) {\n var _context7, _context8;\n if (!nodes.has(entryNodeId)) {\n // Skip if the node is not visible.\n continue;\n }\n const newLevel = levels[node.id] + newLevelDiff;\n _forEachInstanceProperty(_context7 = _filterInstanceProperty(_context8 = node.edges).call(_context8, edge =>\n // Ignore disconnected edges.\n edge.connected &&\n // Ignore circular edges.\n edge.to !== edge.from &&\n // Ignore edges leading to the node that's currently being processed.\n edge[direction] !== node &&\n // Ignore edges connecting to an invisible node.\n nodes.has(edge.toId) &&\n // Ignore edges connecting from an invisible node.\n nodes.has(edge.fromId))).call(_context7, edge => {\n const targetNodeId = edge[edgeIdProp];\n const oldLevel = levels[targetNodeId];\n if (oldLevel == null || shouldLevelBeReplaced(newLevel, oldLevel)) {\n levels[targetNodeId] = newLevel;\n stack.push(edge[direction]);\n }\n });\n if (done > limit) {\n // This would run forever on a cyclic graph.\n return fillLevelsByDirectionCyclic(nodes, levels);\n } else {\n ++done;\n }\n }\n }\n return levels;\n}\n\n/**\n * There's a mix-up with terms in the code. Following are the formal definitions:\n *\n * tree - a strict hierarchical network, i.e. every node has at most one parent\n * forest - a collection of trees. These distinct trees are thus not connected.\n *\n * So:\n * - in a network that is not a tree, there exist nodes with multiple parents.\n * - a network consisting of unconnected sub-networks, of which at least one\n * is not a tree, is not a forest.\n *\n * In the code, the definitions are:\n *\n * tree - any disconnected sub-network, strict hierarchical or not.\n * forest - a bunch of these sub-networks\n *\n * The difference between tree and not-tree is important in the code, notably within\n * to the block-shifting algorithm. The algorithm assumes formal trees and fails\n * for not-trees, often in a spectacular manner (search for 'exploding network' in the issues).\n *\n * In order to distinguish the definitions in the following code, the adjective 'formal' is\n * used. If 'formal' is absent, you must assume the non-formal definition.\n *\n * ----------------------------------------------------------------------------------\n * NOTES\n * =====\n *\n * A hierarchical layout is a different thing from a hierarchical network.\n * The layout is a way to arrange the nodes in the view; this can be done\n * on non-hierarchical networks as well. The converse is also possible.\n */\n\n/**\n * Container for derived data on current network, relating to hierarchy.\n * @private\n */\nclass HierarchicalStatus {\n /**\n * @ignore\n */\n constructor() {\n this.childrenReference = {}; // child id's per node id\n this.parentReference = {}; // parent id's per node id\n this.trees = {}; // tree id per node id; i.e. to which tree does given node id belong\n\n this.distributionOrdering = {}; // The nodes per level, in the display order\n this.levels = {}; // hierarchy level per node id\n this.distributionIndex = {}; // The position of the node in the level sorting order, per node id.\n\n this.isTree = false; // True if current network is a formal tree\n this.treeIndex = -1; // Highest tree id in current network.\n }\n\n /**\n * Add the relation between given nodes to the current state.\n * @param {Node.id} parentNodeId\n * @param {Node.id} childNodeId\n */\n addRelation(parentNodeId, childNodeId) {\n if (this.childrenReference[parentNodeId] === undefined) {\n this.childrenReference[parentNodeId] = [];\n }\n this.childrenReference[parentNodeId].push(childNodeId);\n if (this.parentReference[childNodeId] === undefined) {\n this.parentReference[childNodeId] = [];\n }\n this.parentReference[childNodeId].push(parentNodeId);\n }\n\n /**\n * Check if the current state is for a formal tree or formal forest.\n *\n * This is the case if every node has at most one parent.\n *\n * Pre: parentReference init'ed properly for current network\n */\n checkIfTree() {\n for (const i in this.parentReference) {\n if (this.parentReference[i].length > 1) {\n this.isTree = false;\n return;\n }\n }\n this.isTree = true;\n }\n\n /**\n * Return the number of separate trees in the current network.\n * @returns {number}\n */\n numTrees() {\n return this.treeIndex + 1; // This assumes the indexes are assigned consecitively\n }\n\n /**\n * Assign a tree id to a node\n * @param {Node} node\n * @param {string|number} treeId\n */\n setTreeIndex(node, treeId) {\n if (treeId === undefined) return; // Don't bother\n\n if (this.trees[node.id] === undefined) {\n this.trees[node.id] = treeId;\n this.treeIndex = Math.max(treeId, this.treeIndex);\n }\n }\n\n /**\n * Ensure level for given id is defined.\n *\n * Sets level to zero for given node id if not already present\n * @param {Node.id} nodeId\n */\n ensureLevel(nodeId) {\n if (this.levels[nodeId] === undefined) {\n this.levels[nodeId] = 0;\n }\n }\n\n /**\n * get the maximum level of a branch.\n *\n * TODO: Never entered; find a test case to test this!\n * @param {Node.id} nodeId\n * @returns {number}\n */\n getMaxLevel(nodeId) {\n const accumulator = {};\n const _getMaxLevel = nodeId => {\n if (accumulator[nodeId] !== undefined) {\n return accumulator[nodeId];\n }\n let level = this.levels[nodeId];\n if (this.childrenReference[nodeId]) {\n const children = this.childrenReference[nodeId];\n if (children.length > 0) {\n for (let i = 0; i < children.length; i++) {\n level = Math.max(level, _getMaxLevel(children[i]));\n }\n }\n }\n accumulator[nodeId] = level;\n return level;\n };\n return _getMaxLevel(nodeId);\n }\n\n /**\n *\n * @param {Node} nodeA\n * @param {Node} nodeB\n */\n levelDownstream(nodeA, nodeB) {\n if (this.levels[nodeB.id] === undefined) {\n // set initial level\n if (this.levels[nodeA.id] === undefined) {\n this.levels[nodeA.id] = 0;\n }\n // set level\n this.levels[nodeB.id] = this.levels[nodeA.id] + 1;\n }\n }\n\n /**\n * Small util method to set the minimum levels of the nodes to zero and\n * eliminate gaps (for cyclic).\n */\n setMinLevelToZero() {\n var _context;\n const remap = new _Map();\n let newLevel = 0;\n const uniqueSortedLevels = _sortInstanceProperty(_context = [...new _Set(_Object$values(this.levels))]).call(_context, (a, b) => a - b);\n for (const level of uniqueSortedLevels) {\n remap.set(level, newLevel++);\n }\n for (const nodeId in this.levels) {\n if (Object.prototype.hasOwnProperty.call(this.levels, nodeId)) {\n this.levels[nodeId] = remap.get(this.levels[nodeId]);\n }\n }\n }\n\n /**\n * Get the min and max xy-coordinates of a given tree\n * @param {Array.<Node>} nodes\n * @param {number} index\n * @returns {{min_x: number, max_x: number, min_y: number, max_y: number}}\n */\n getTreeSize(nodes, index) {\n let min_x = 1e9;\n let max_x = -1e9;\n let min_y = 1e9;\n let max_y = -1e9;\n for (const nodeId in this.trees) {\n if (Object.prototype.hasOwnProperty.call(this.trees, nodeId)) {\n if (this.trees[nodeId] === index) {\n const node = nodes[nodeId];\n min_x = Math.min(node.x, min_x);\n max_x = Math.max(node.x, max_x);\n min_y = Math.min(node.y, min_y);\n max_y = Math.max(node.y, max_y);\n }\n }\n }\n return {\n min_x: min_x,\n max_x: max_x,\n min_y: min_y,\n max_y: max_y\n };\n }\n\n /**\n * Check if two nodes have the same parent(s)\n * @param {Node} node1\n * @param {Node} node2\n * @returns {boolean} true if the two nodes have a same ancestor node, false otherwise\n */\n hasSameParent(node1, node2) {\n const parents1 = this.parentReference[node1.id];\n const parents2 = this.parentReference[node2.id];\n if (parents1 === undefined || parents2 === undefined) {\n return false;\n }\n for (let i = 0; i < parents1.length; i++) {\n for (let j = 0; j < parents2.length; j++) {\n if (parents1[i] == parents2[j]) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * Check if two nodes are in the same tree.\n * @param {Node} node1\n * @param {Node} node2\n * @returns {boolean} true if this is so, false otherwise\n */\n inSameSubNetwork(node1, node2) {\n return this.trees[node1.id] === this.trees[node2.id];\n }\n\n /**\n * Get a list of the distinct levels in the current network\n * @returns {Array}\n */\n getLevels() {\n return _Object$keys(this.distributionOrdering);\n }\n\n /**\n * Add a node to the ordering per level\n * @param {Node} node\n * @param {number} level\n */\n addToOrdering(node, level) {\n if (this.distributionOrdering[level] === undefined) {\n this.distributionOrdering[level] = [];\n }\n let isPresent = false;\n const curLevel = this.distributionOrdering[level];\n for (const n in curLevel) {\n //if (curLevel[n].id === node.id) {\n if (curLevel[n] === node) {\n isPresent = true;\n break;\n }\n }\n if (!isPresent) {\n this.distributionOrdering[level].push(node);\n this.distributionIndex[node.id] = this.distributionOrdering[level].length - 1;\n }\n }\n}\n\n/**\n * The Layout Engine\n */\nclass LayoutEngine {\n /**\n * @param {object} body\n */\n constructor(body) {\n this.body = body;\n\n // Make sure there always is some RNG because the setOptions method won't\n // set it unless there's a seed for it.\n this._resetRNG(Math.random() + \":\" + _Date$now());\n this.setPhysics = false;\n this.options = {};\n this.optionsBackup = {\n physics: {}\n };\n this.defaultOptions = {\n randomSeed: undefined,\n improvedLayout: true,\n clusterThreshold: 150,\n hierarchical: {\n enabled: false,\n levelSeparation: 150,\n nodeSpacing: 100,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: \"UD\",\n // UD, DU, LR, RL\n sortMethod: \"hubsize\" // hubsize, directed\n }\n };\n _Object$assign(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on(\"_dataChanged\", () => {\n this.setupHierarchicalLayout();\n });\n this.body.emitter.on(\"_dataLoaded\", () => {\n this.layoutNetwork();\n });\n this.body.emitter.on(\"_resetHierarchicalLayout\", () => {\n this.setupHierarchicalLayout();\n });\n this.body.emitter.on(\"_adjustEdgesForHierarchicalLayout\", () => {\n if (this.options.hierarchical.enabled !== true) {\n return;\n }\n // get the type of static smooth curve in case it is required\n const type = this.direction.curveType();\n\n // force all edges into static smooth curves.\n this.body.emitter.emit(\"_forceDisableDynamicCurves\", type, false);\n });\n }\n\n /**\n *\n * @param {object} options\n * @param {object} allOptions\n * @returns {object}\n */\n setOptions(options, allOptions) {\n if (options !== undefined) {\n const hierarchical = this.options.hierarchical;\n const prevHierarchicalState = hierarchical.enabled;\n selectiveDeepExtend([\"randomSeed\", \"improvedLayout\", \"clusterThreshold\"], this.options, options);\n mergeOptions(this.options, options, \"hierarchical\");\n if (options.randomSeed !== undefined) {\n this._resetRNG(options.randomSeed);\n }\n if (hierarchical.enabled === true) {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit(\"refresh\", true);\n }\n\n // make sure the level separation is the right way up\n if (hierarchical.direction === \"RL\" || hierarchical.direction === \"DU\") {\n if (hierarchical.levelSeparation > 0) {\n hierarchical.levelSeparation *= -1;\n }\n } else {\n if (hierarchical.levelSeparation < 0) {\n hierarchical.levelSeparation *= -1;\n }\n }\n this.setDirectionStrategy();\n this.body.emitter.emit(\"_resetHierarchicalLayout\");\n // because the hierarchical system needs it's own physics and smooth curve settings,\n // we adapt the other options if needed.\n return this.adaptAllOptionsForHierarchicalLayout(allOptions);\n } else {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit(\"refresh\");\n return deepExtend(allOptions, this.optionsBackup);\n }\n }\n }\n return allOptions;\n }\n\n /**\n * Reset the random number generator with given seed.\n * @param {any} seed - The seed that will be forwarded the the RNG.\n */\n _resetRNG(seed) {\n this.initialRandomSeed = seed;\n this._rng = Alea(this.initialRandomSeed);\n }\n\n /**\n *\n * @param {object} allOptions\n * @returns {object}\n */\n adaptAllOptionsForHierarchicalLayout(allOptions) {\n if (this.options.hierarchical.enabled === true) {\n const backupPhysics = this.optionsBackup.physics;\n\n // set the physics\n if (allOptions.physics === undefined || allOptions.physics === true) {\n allOptions.physics = {\n enabled: backupPhysics.enabled === undefined ? true : backupPhysics.enabled,\n solver: \"hierarchicalRepulsion\"\n };\n backupPhysics.enabled = backupPhysics.enabled === undefined ? true : backupPhysics.enabled;\n backupPhysics.solver = backupPhysics.solver || \"barnesHut\";\n } else if (typeof allOptions.physics === \"object\") {\n backupPhysics.enabled = allOptions.physics.enabled === undefined ? true : allOptions.physics.enabled;\n backupPhysics.solver = allOptions.physics.solver || \"barnesHut\";\n allOptions.physics.solver = \"hierarchicalRepulsion\";\n } else if (allOptions.physics !== false) {\n backupPhysics.solver = \"barnesHut\";\n allOptions.physics = {\n solver: \"hierarchicalRepulsion\"\n };\n }\n\n // get the type of static smooth curve in case it is required\n let type = this.direction.curveType();\n\n // disable smooth curves if nothing is defined. If smooth curves have been turned on,\n // turn them into static smooth curves.\n if (allOptions.edges === undefined) {\n this.optionsBackup.edges = {\n smooth: {\n enabled: true,\n type: \"dynamic\"\n }\n };\n allOptions.edges = {\n smooth: false\n };\n } else if (allOptions.edges.smooth === undefined) {\n this.optionsBackup.edges = {\n smooth: {\n enabled: true,\n type: \"dynamic\"\n }\n };\n allOptions.edges.smooth = false;\n } else {\n if (typeof allOptions.edges.smooth === \"boolean\") {\n this.optionsBackup.edges = {\n smooth: allOptions.edges.smooth\n };\n allOptions.edges.smooth = {\n enabled: allOptions.edges.smooth,\n type: type\n };\n } else {\n const smooth = allOptions.edges.smooth;\n\n // allow custom types except for dynamic\n if (smooth.type !== undefined && smooth.type !== \"dynamic\") {\n type = smooth.type;\n }\n\n // TODO: this is options merging; see if the standard routines can be used here.\n this.optionsBackup.edges = {\n smooth: {\n enabled: smooth.enabled === undefined ? true : smooth.enabled,\n type: smooth.type === undefined ? \"dynamic\" : smooth.type,\n roundness: smooth.roundness === undefined ? 0.5 : smooth.roundness,\n forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection\n }\n };\n\n // NOTE: Copying an object to self; this is basically setting defaults for undefined variables\n allOptions.edges.smooth = {\n enabled: smooth.enabled === undefined ? true : smooth.enabled,\n type: type,\n roundness: smooth.roundness === undefined ? 0.5 : smooth.roundness,\n forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection\n };\n }\n }\n\n // Force all edges into static smooth curves.\n // Only applies to edges that do not use the global options for smooth.\n this.body.emitter.emit(\"_forceDisableDynamicCurves\", type);\n }\n return allOptions;\n }\n\n /**\n *\n * @param {Array.<Node>} nodesArray\n */\n positionInitially(nodesArray) {\n if (this.options.hierarchical.enabled !== true) {\n this._resetRNG(this.initialRandomSeed);\n const radius = nodesArray.length + 50;\n for (let i = 0; i < nodesArray.length; i++) {\n const node = nodesArray[i];\n const angle = 2 * Math.PI * this._rng();\n if (node.x === undefined) {\n node.x = radius * Math.cos(angle);\n }\n if (node.y === undefined) {\n node.y = radius * Math.sin(angle);\n }\n }\n }\n }\n\n /**\n * Use Kamada Kawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we\n * cluster them first to reduce the amount.\n */\n layoutNetwork() {\n if (this.options.hierarchical.enabled !== true && this.options.improvedLayout === true) {\n const indices = this.body.nodeIndices;\n\n // first check if we should Kamada Kawai to layout. The threshold is if less than half of the visible\n // nodes have predefined positions we use this.\n let positionDefined = 0;\n for (let i = 0; i < indices.length; i++) {\n const node = this.body.nodes[indices[i]];\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n }\n\n // if less than half of the nodes have a predefined position we continue\n if (positionDefined < 0.5 * indices.length) {\n const MAX_LEVELS = 10;\n let level = 0;\n const clusterThreshold = this.options.clusterThreshold;\n\n //\n // Define the options for the hidden cluster nodes\n // These options don't propagate outside the clustering phase.\n //\n // Some options are explicitly disabled, because they may be set in group or default node options.\n // The clusters are never displayed, so most explicit settings here serve as performance optimizations.\n //\n // The explicit setting of 'shape' is to avoid `shape: 'image'`; images are not passed to the hidden\n // cluster nodes, leading to an exception on creation.\n //\n // All settings here are performance related, except when noted otherwise.\n //\n const clusterOptions = {\n clusterNodeProperties: {\n shape: \"ellipse\",\n // Bugfix: avoid type 'image', no images supplied\n label: \"\",\n // avoid label handling\n group: \"\",\n // avoid group handling\n font: {\n multi: false\n } // avoid font propagation\n },\n clusterEdgeProperties: {\n label: \"\",\n // avoid label handling\n font: {\n multi: false\n },\n // avoid font propagation\n smooth: {\n enabled: false // avoid drawing penalty for complex edges\n }\n }\n };\n\n // if there are a lot of nodes, we cluster before we run the algorithm.\n // NOTE: this part fails to find clusters for large scale-free networks, which should\n // be easily clusterable.\n // TODO: examine why this is so\n if (indices.length > clusterThreshold) {\n const startLength = indices.length;\n while (indices.length > clusterThreshold && level <= MAX_LEVELS) {\n //console.time(\"clustering\")\n level += 1;\n const before = indices.length;\n // if there are many nodes we do a hubsize cluster\n if (level % 3 === 0) {\n this.body.modules.clustering.clusterBridges(clusterOptions);\n } else {\n this.body.modules.clustering.clusterOutliers(clusterOptions);\n }\n const after = indices.length;\n if (before == after && level % 3 !== 0) {\n this._declusterAll();\n this.body.emitter.emit(\"_layoutFailed\");\n console.info(\"This network could not be positioned by this version of the improved layout algorithm.\" + \" Please disable improvedLayout for better performance.\");\n return;\n }\n //console.timeEnd(\"clustering\")\n //console.log(before,level,after);\n }\n // increase the size of the edges\n this.body.modules.kamadaKawai.setOptions({\n springLength: Math.max(150, 2 * startLength)\n });\n }\n if (level > MAX_LEVELS) {\n console.info(\"The clustering didn't succeed within the amount of interations allowed,\" + \" progressing with partial result.\");\n }\n\n // position the system for these nodes and edges\n this.body.modules.kamadaKawai.solve(indices, this.body.edgeIndices, true);\n\n // shift to center point\n this._shiftToCenter();\n\n // perturb the nodes a little bit to force the physics to kick in\n const offset = 70;\n for (let i = 0; i < indices.length; i++) {\n // Only perturb the nodes that aren't fixed\n const node = this.body.nodes[indices[i]];\n if (node.predefinedPosition === false) {\n node.x += (0.5 - this._rng()) * offset;\n node.y += (0.5 - this._rng()) * offset;\n }\n }\n\n // uncluster all clusters\n this._declusterAll();\n\n // reposition all bezier nodes.\n this.body.emitter.emit(\"_repositionBezierNodes\");\n }\n }\n }\n\n /**\n * Move all the nodes towards to the center so gravitational pull wil not move the nodes away from view\n * @private\n */\n _shiftToCenter() {\n const range = NetworkUtil.getRangeCore(this.body.nodes, this.body.nodeIndices);\n const center = NetworkUtil.findCenter(range);\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n const node = this.body.nodes[this.body.nodeIndices[i]];\n node.x -= center.x;\n node.y -= center.y;\n }\n }\n\n /**\n * Expands all clusters\n * @private\n */\n _declusterAll() {\n let clustersPresent = true;\n while (clustersPresent === true) {\n clustersPresent = false;\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n if (this.body.nodes[this.body.nodeIndices[i]].isCluster === true) {\n clustersPresent = true;\n this.body.modules.clustering.openCluster(this.body.nodeIndices[i], {}, false);\n }\n }\n if (clustersPresent === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n }\n\n /**\n *\n * @returns {number|*}\n */\n getSeed() {\n return this.initialRandomSeed;\n }\n\n /**\n * This is the main function to layout the nodes in a hierarchical way.\n * It checks if the node details are supplied correctly\n * @private\n */\n setupHierarchicalLayout() {\n if (this.options.hierarchical.enabled === true && this.body.nodeIndices.length > 0) {\n // get the size of the largest hubs and check if the user has defined a level for a node.\n let node, nodeId;\n let definedLevel = false;\n let undefinedLevel = false;\n this.lastNodeOnLevel = {};\n this.hierarchical = new HierarchicalStatus();\n for (nodeId in this.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) {\n node = this.body.nodes[nodeId];\n if (node.options.level !== undefined) {\n definedLevel = true;\n this.hierarchical.levels[nodeId] = node.options.level;\n } else {\n undefinedLevel = true;\n }\n }\n }\n\n // if the user defined some levels but not all, alert and run without hierarchical layout\n if (undefinedLevel === true && definedLevel === true) {\n throw new Error(\"To use the hierarchical layout, nodes require either no predefined levels\" + \" or levels have to be defined for all nodes.\");\n } else {\n // define levels if undefined by the users. Based on hubsize.\n if (undefinedLevel === true) {\n const sortMethod = this.options.hierarchical.sortMethod;\n if (sortMethod === \"hubsize\") {\n this._determineLevelsByHubsize();\n } else if (sortMethod === \"directed\") {\n this._determineLevelsDirected();\n } else if (sortMethod === \"custom\") {\n this._determineLevelsCustomCallback();\n }\n }\n\n // fallback for cases where there are nodes but no edges\n for (const nodeId in this.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) {\n this.hierarchical.ensureLevel(nodeId);\n }\n }\n // check the distribution of the nodes per level.\n const distribution = this._getDistribution();\n\n // get the parent children relations.\n this._generateMap();\n\n // place the nodes on the canvas.\n this._placeNodesByHierarchy(distribution);\n\n // condense the whitespace.\n this._condenseHierarchy();\n\n // shift to center so gravity does not have to do much\n this._shiftToCenter();\n }\n }\n }\n\n /**\n * @private\n */\n _condenseHierarchy() {\n var _this = this;\n // Global var in this scope to define when the movement has stopped.\n let stillShifting = false;\n const branches = {};\n // first we have some methods to help shifting trees around.\n // the main method to shift the trees\n const shiftTrees = () => {\n const treeSizes = getTreeSizes();\n let shiftBy = 0;\n for (let i = 0; i < treeSizes.length - 1; i++) {\n const diff = treeSizes[i].max - treeSizes[i + 1].min;\n shiftBy += diff + this.options.hierarchical.treeSpacing;\n shiftTree(i + 1, shiftBy);\n }\n };\n\n // shift a single tree by an offset\n const shiftTree = (index, offset) => {\n const trees = this.hierarchical.trees;\n for (const nodeId in trees) {\n if (Object.prototype.hasOwnProperty.call(trees, nodeId)) {\n if (trees[nodeId] === index) {\n this.direction.shift(nodeId, offset);\n }\n }\n }\n };\n\n // get the width of all trees\n const getTreeSizes = () => {\n const treeWidths = [];\n for (let i = 0; i < this.hierarchical.numTrees(); i++) {\n treeWidths.push(this.direction.getTreeSize(i));\n }\n return treeWidths;\n };\n\n // get a map of all nodes in this branch\n const getBranchNodes = (source, map) => {\n if (map[source.id]) {\n return;\n }\n map[source.id] = true;\n if (this.hierarchical.childrenReference[source.id]) {\n const children = this.hierarchical.childrenReference[source.id];\n if (children.length > 0) {\n for (let i = 0; i < children.length; i++) {\n getBranchNodes(this.body.nodes[children[i]], map);\n }\n }\n }\n };\n\n // get a min max width as well as the maximum movement space it has on either sides\n // we use min max terminology because width and height can interchange depending on the direction of the layout\n const getBranchBoundary = function (branchMap) {\n let maxLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1e9;\n let minSpace = 1e9;\n let maxSpace = 1e9;\n let min = 1e9;\n let max = -1e9;\n for (const branchNode in branchMap) {\n if (Object.prototype.hasOwnProperty.call(branchMap, branchNode)) {\n const node = _this.body.nodes[branchNode];\n const level = _this.hierarchical.levels[node.id];\n const position = _this.direction.getPosition(node);\n\n // get the space around the node.\n const [minSpaceNode, maxSpaceNode] = _this._getSpaceAroundNode(node, branchMap);\n minSpace = Math.min(minSpaceNode, minSpace);\n maxSpace = Math.min(maxSpaceNode, maxSpace);\n\n // the width is only relevant for the levels two nodes have in common. This is why we filter on this.\n if (level <= maxLevel) {\n min = Math.min(position, min);\n max = Math.max(position, max);\n }\n }\n }\n return [min, max, minSpace, maxSpace];\n };\n\n // check what the maximum level is these nodes have in common.\n const getCollisionLevel = (node1, node2) => {\n const maxLevel1 = this.hierarchical.getMaxLevel(node1.id);\n const maxLevel2 = this.hierarchical.getMaxLevel(node2.id);\n return Math.min(maxLevel1, maxLevel2);\n };\n\n /**\n * Condense elements. These can be nodes or branches depending on the callback.\n * @param {Function} callback\n * @param {Array.<number>} levels\n * @param {*} centerParents\n */\n const shiftElementsCloser = (callback, levels, centerParents) => {\n const hier = this.hierarchical;\n for (let i = 0; i < levels.length; i++) {\n const level = levels[i];\n const levelNodes = hier.distributionOrdering[level];\n if (levelNodes.length > 1) {\n for (let j = 0; j < levelNodes.length - 1; j++) {\n const node1 = levelNodes[j];\n const node2 = levelNodes[j + 1];\n\n // NOTE: logic maintained as it was; if nodes have same ancestor,\n // then of course they are in the same sub-network.\n if (hier.hasSameParent(node1, node2) && hier.inSameSubNetwork(node1, node2)) {\n callback(node1, node2, centerParents);\n }\n }\n }\n }\n };\n\n // callback for shifting branches\n const branchShiftCallback = function (node1, node2) {\n let centerParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n //window.CALLBACKS.push(() => {\n const pos1 = _this.direction.getPosition(node1);\n const pos2 = _this.direction.getPosition(node2);\n const diffAbs = Math.abs(pos2 - pos1);\n const nodeSpacing = _this.options.hierarchical.nodeSpacing;\n //console.log(\"NOW CHECKING:\", node1.id, node2.id, diffAbs);\n if (diffAbs > nodeSpacing) {\n const branchNodes1 = {};\n const branchNodes2 = {};\n getBranchNodes(node1, branchNodes1);\n getBranchNodes(node2, branchNodes2);\n\n // check the largest distance between the branches\n const maxLevel = getCollisionLevel(node1, node2);\n const branchNodeBoundary1 = getBranchBoundary(branchNodes1, maxLevel);\n const branchNodeBoundary2 = getBranchBoundary(branchNodes2, maxLevel);\n const max1 = branchNodeBoundary1[1];\n const min2 = branchNodeBoundary2[0];\n const minSpace2 = branchNodeBoundary2[2];\n\n //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id,\n // getBranchBoundary(branchNodes2, maxLevel), maxLevel);\n const diffBranch = Math.abs(max1 - min2);\n if (diffBranch > nodeSpacing) {\n let offset = max1 - min2 + nodeSpacing;\n if (offset < -minSpace2 + nodeSpacing) {\n offset = -minSpace2 + nodeSpacing;\n //console.log(\"RESETTING OFFSET\", max1 - min2 + this.options.hierarchical.nodeSpacing, -minSpace2, offset);\n }\n if (offset < 0) {\n //console.log(\"SHIFTING\", node2.id, offset);\n _this._shiftBlock(node2.id, offset);\n stillShifting = true;\n if (centerParent === true) _this._centerParent(node2);\n }\n }\n }\n //this.body.emitter.emit(\"_redraw\");})\n };\n const minimizeEdgeLength = (iterations, node) => {\n //window.CALLBACKS.push(() => {\n // console.log(\"ts\",node.id);\n const nodeId = node.id;\n const allEdges = node.edges;\n const nodeLevel = this.hierarchical.levels[node.id];\n\n // gather constants\n const C2 = this.options.hierarchical.levelSeparation * this.options.hierarchical.levelSeparation;\n const referenceNodes = {};\n const aboveEdges = [];\n for (let i = 0; i < allEdges.length; i++) {\n const edge = allEdges[i];\n if (edge.toId != edge.fromId) {\n const otherNode = edge.toId == nodeId ? edge.from : edge.to;\n referenceNodes[allEdges[i].id] = otherNode;\n if (this.hierarchical.levels[otherNode.id] < nodeLevel) {\n aboveEdges.push(edge);\n }\n }\n }\n\n // differentiated sum of lengths based on only moving one node over one axis\n const getFx = (point, edges) => {\n let sum = 0;\n for (let i = 0; i < edges.length; i++) {\n if (referenceNodes[edges[i].id] !== undefined) {\n const a = this.direction.getPosition(referenceNodes[edges[i].id]) - point;\n sum += a / Math.sqrt(a * a + C2);\n }\n }\n return sum;\n };\n\n // doubly differentiated sum of lengths based on only moving one node over one axis\n const getDFx = (point, edges) => {\n let sum = 0;\n for (let i = 0; i < edges.length; i++) {\n if (referenceNodes[edges[i].id] !== undefined) {\n const a = this.direction.getPosition(referenceNodes[edges[i].id]) - point;\n sum -= C2 * Math.pow(a * a + C2, -1.5);\n }\n }\n return sum;\n };\n const getGuess = (iterations, edges) => {\n let guess = this.direction.getPosition(node);\n // Newton's method for optimization\n const guessMap = {};\n for (let i = 0; i < iterations; i++) {\n const fx = getFx(guess, edges);\n const dfx = getDFx(guess, edges);\n\n // we limit the movement to avoid instability.\n const limit = 40;\n const ratio = Math.max(-limit, Math.min(limit, Math.round(fx / dfx)));\n guess = guess - ratio;\n // reduce duplicates\n if (guessMap[guess] !== undefined) {\n break;\n }\n guessMap[guess] = i;\n }\n return guess;\n };\n const moveBranch = guess => {\n // position node if there is space\n const nodePosition = this.direction.getPosition(node);\n\n // check movable area of the branch\n if (branches[node.id] === undefined) {\n const branchNodes = {};\n getBranchNodes(node, branchNodes);\n branches[node.id] = branchNodes;\n }\n const branchBoundary = getBranchBoundary(branches[node.id]);\n const minSpaceBranch = branchBoundary[2];\n const maxSpaceBranch = branchBoundary[3];\n const diff = guess - nodePosition;\n\n // check if we are allowed to move the node:\n let branchOffset = 0;\n if (diff > 0) {\n branchOffset = Math.min(diff, maxSpaceBranch - this.options.hierarchical.nodeSpacing);\n } else if (diff < 0) {\n branchOffset = -Math.min(-diff, minSpaceBranch - this.options.hierarchical.nodeSpacing);\n }\n if (branchOffset != 0) {\n //console.log(\"moving branch:\",branchOffset, maxSpaceBranch, minSpaceBranch)\n this._shiftBlock(node.id, branchOffset);\n //this.body.emitter.emit(\"_redraw\");\n stillShifting = true;\n }\n };\n const moveNode = guess => {\n const nodePosition = this.direction.getPosition(node);\n\n // position node if there is space\n const [minSpace, maxSpace] = this._getSpaceAroundNode(node);\n const diff = guess - nodePosition;\n // check if we are allowed to move the node:\n let newPosition = nodePosition;\n if (diff > 0) {\n newPosition = Math.min(nodePosition + (maxSpace - this.options.hierarchical.nodeSpacing), guess);\n } else if (diff < 0) {\n newPosition = Math.max(nodePosition - (minSpace - this.options.hierarchical.nodeSpacing), guess);\n }\n if (newPosition !== nodePosition) {\n //console.log(\"moving Node:\",diff, minSpace, maxSpace);\n this.direction.setPosition(node, newPosition);\n //this.body.emitter.emit(\"_redraw\");\n stillShifting = true;\n }\n };\n let guess = getGuess(iterations, aboveEdges);\n moveBranch(guess);\n guess = getGuess(iterations, allEdges);\n moveNode(guess);\n //})\n };\n\n // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n const minimizeEdgeLengthBottomUp = iterations => {\n let levels = this.hierarchical.getLevels();\n levels = _reverseInstanceProperty(levels).call(levels);\n for (let i = 0; i < iterations; i++) {\n stillShifting = false;\n for (let j = 0; j < levels.length; j++) {\n const level = levels[j];\n const levelNodes = this.hierarchical.distributionOrdering[level];\n for (let k = 0; k < levelNodes.length; k++) {\n minimizeEdgeLength(1000, levelNodes[k]);\n }\n }\n if (stillShifting !== true) {\n //console.log(\"FINISHED minimizeEdgeLengthBottomUp IN \" + i);\n break;\n }\n }\n };\n\n // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n const shiftBranchesCloserBottomUp = iterations => {\n let levels = this.hierarchical.getLevels();\n levels = _reverseInstanceProperty(levels).call(levels);\n for (let i = 0; i < iterations; i++) {\n stillShifting = false;\n shiftElementsCloser(branchShiftCallback, levels, true);\n if (stillShifting !== true) {\n //console.log(\"FINISHED shiftBranchesCloserBottomUp IN \" + (i+1));\n break;\n }\n }\n };\n\n // center all parents\n const centerAllParents = () => {\n for (const nodeId in this.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) this._centerParent(this.body.nodes[nodeId]);\n }\n };\n\n // center all parents\n const centerAllParentsBottomUp = () => {\n let levels = this.hierarchical.getLevels();\n levels = _reverseInstanceProperty(levels).call(levels);\n for (let i = 0; i < levels.length; i++) {\n const level = levels[i];\n const levelNodes = this.hierarchical.distributionOrdering[level];\n for (let j = 0; j < levelNodes.length; j++) {\n this._centerParent(levelNodes[j]);\n }\n }\n };\n\n // the actual work is done here.\n if (this.options.hierarchical.blockShifting === true) {\n shiftBranchesCloserBottomUp(5);\n centerAllParents();\n }\n\n // minimize edge length\n if (this.options.hierarchical.edgeMinimization === true) {\n minimizeEdgeLengthBottomUp(20);\n }\n if (this.options.hierarchical.parentCentralization === true) {\n centerAllParentsBottomUp();\n }\n shiftTrees();\n }\n\n /**\n * This gives the space around the node. IF a map is supplied, it will only check against nodes NOT in the map.\n * This is used to only get the distances to nodes outside of a branch.\n * @param {Node} node\n * @param {{Node.id: vis.Node}} map\n * @returns {number[]}\n * @private\n */\n _getSpaceAroundNode(node, map) {\n let useMap = true;\n if (map === undefined) {\n useMap = false;\n }\n const level = this.hierarchical.levels[node.id];\n if (level !== undefined) {\n const index = this.hierarchical.distributionIndex[node.id];\n const position = this.direction.getPosition(node);\n const ordering = this.hierarchical.distributionOrdering[level];\n let minSpace = 1e9;\n let maxSpace = 1e9;\n if (index !== 0) {\n const prevNode = ordering[index - 1];\n if (useMap === true && map[prevNode.id] === undefined || useMap === false) {\n const prevPos = this.direction.getPosition(prevNode);\n minSpace = position - prevPos;\n }\n }\n if (index != ordering.length - 1) {\n const nextNode = ordering[index + 1];\n if (useMap === true && map[nextNode.id] === undefined || useMap === false) {\n const nextPos = this.direction.getPosition(nextNode);\n maxSpace = Math.min(maxSpace, nextPos - position);\n }\n }\n return [minSpace, maxSpace];\n } else {\n return [0, 0];\n }\n }\n\n /**\n * We use this method to center a parent node and check if it does not cross other nodes when it does.\n * @param {Node} node\n * @private\n */\n _centerParent(node) {\n if (this.hierarchical.parentReference[node.id]) {\n const parents = this.hierarchical.parentReference[node.id];\n for (let i = 0; i < parents.length; i++) {\n const parentId = parents[i];\n const parentNode = this.body.nodes[parentId];\n const children = this.hierarchical.childrenReference[parentId];\n if (children !== undefined) {\n // get the range of the children\n const newPosition = this._getCenterPosition(children);\n const position = this.direction.getPosition(parentNode);\n const [minSpace, maxSpace] = this._getSpaceAroundNode(parentNode);\n const diff = position - newPosition;\n if (diff < 0 && Math.abs(diff) < maxSpace - this.options.hierarchical.nodeSpacing || diff > 0 && Math.abs(diff) < minSpace - this.options.hierarchical.nodeSpacing) {\n this.direction.setPosition(parentNode, newPosition);\n }\n }\n }\n }\n }\n\n /**\n * This function places the nodes on the canvas based on the hierarchial distribution.\n * @param {object} distribution | obtained by the function this._getDistribution()\n * @private\n */\n _placeNodesByHierarchy(distribution) {\n this.positionedNodes = {};\n // start placing all the level 0 nodes first. Then recursively position their branches.\n for (const level in distribution) {\n if (Object.prototype.hasOwnProperty.call(distribution, level)) {\n var _context2;\n // sort nodes in level by position:\n let nodeArray = _Object$keys(distribution[level]);\n nodeArray = this._indexArrayToNodes(nodeArray);\n _sortInstanceProperty(_context2 = this.direction).call(_context2, nodeArray);\n let handledNodeCount = 0;\n for (let i = 0; i < nodeArray.length; i++) {\n const node = nodeArray[i];\n if (this.positionedNodes[node.id] === undefined) {\n const spacing = this.options.hierarchical.nodeSpacing;\n let pos = spacing * handledNodeCount;\n // We get the X or Y values we need and store them in pos and previousPos.\n // The get and set make sure we get X or Y\n if (handledNodeCount > 0) {\n pos = this.direction.getPosition(nodeArray[i - 1]) + spacing;\n }\n this.direction.setPosition(node, pos, level);\n this._validatePositionAndContinue(node, level, pos);\n handledNodeCount++;\n }\n }\n }\n }\n }\n\n /**\n * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes\n * on a X position that ensures there will be no overlap.\n * @param {Node.id} parentId\n * @param {number} parentLevel\n * @private\n */\n _placeBranchNodes(parentId, parentLevel) {\n var _context3;\n const childRef = this.hierarchical.childrenReference[parentId];\n\n // if this is not a parent, cancel the placing. This can happen with multiple parents to one child.\n if (childRef === undefined) {\n return;\n }\n\n // get a list of childNodes\n const childNodes = [];\n for (let i = 0; i < childRef.length; i++) {\n childNodes.push(this.body.nodes[childRef[i]]);\n }\n\n // use the positions to order the nodes.\n _sortInstanceProperty(_context3 = this.direction).call(_context3, childNodes);\n\n // position the childNodes\n for (let i = 0; i < childNodes.length; i++) {\n const childNode = childNodes[i];\n const childNodeLevel = this.hierarchical.levels[childNode.id];\n // check if the child node is below the parent node and if it has already been positioned.\n if (childNodeLevel > parentLevel && this.positionedNodes[childNode.id] === undefined) {\n // get the amount of space required for this node. If parent the width is based on the amount of children.\n const spacing = this.options.hierarchical.nodeSpacing;\n let pos;\n\n // we get the X or Y values we need and store them in pos and previousPos.\n // The get and set make sure we get X or Y\n if (i === 0) {\n pos = this.direction.getPosition(this.body.nodes[parentId]);\n } else {\n pos = this.direction.getPosition(childNodes[i - 1]) + spacing;\n }\n this.direction.setPosition(childNode, pos, childNodeLevel);\n this._validatePositionAndContinue(childNode, childNodeLevel, pos);\n } else {\n return;\n }\n }\n\n // center the parent nodes.\n const center = this._getCenterPosition(childNodes);\n this.direction.setPosition(this.body.nodes[parentId], center, parentLevel);\n }\n\n /**\n * This method checks for overlap and if required shifts the branch. It also keeps records of positioned nodes.\n * Finally it will call _placeBranchNodes to place the branch nodes.\n * @param {Node} node\n * @param {number} level\n * @param {number} pos\n * @private\n */\n _validatePositionAndContinue(node, level, pos) {\n // This method only works for formal trees and formal forests\n // Early exit if this is not the case\n if (!this.hierarchical.isTree) return;\n\n // if overlap has been detected, we shift the branch\n if (this.lastNodeOnLevel[level] !== undefined) {\n const previousPos = this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[level]]);\n if (pos - previousPos < this.options.hierarchical.nodeSpacing) {\n const diff = previousPos + this.options.hierarchical.nodeSpacing - pos;\n const sharedParent = this._findCommonParent(this.lastNodeOnLevel[level], node.id);\n this._shiftBlock(sharedParent.withChild, diff);\n }\n }\n this.lastNodeOnLevel[level] = node.id; // store change in position.\n this.positionedNodes[node.id] = true;\n this._placeBranchNodes(node.id, level);\n }\n\n /**\n * Receives an array with node indices and returns an array with the actual node references.\n * Used for sorting based on node properties.\n * @param {Array.<Node.id>} idArray\n * @returns {Array.<Node>}\n */\n _indexArrayToNodes(idArray) {\n const array = [];\n for (let i = 0; i < idArray.length; i++) {\n array.push(this.body.nodes[idArray[i]]);\n }\n return array;\n }\n\n /**\n * This function get the distribution of levels based on hubsize\n * @returns {object}\n * @private\n */\n _getDistribution() {\n const distribution = {};\n let nodeId, node;\n\n // we fix Y because the hierarchy is vertical,\n // we fix X so we do not give a node an x position for a second time.\n // the fix of X is removed after the x value has been set.\n for (nodeId in this.body.nodes) {\n if (Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) {\n node = this.body.nodes[nodeId];\n const level = this.hierarchical.levels[nodeId] === undefined ? 0 : this.hierarchical.levels[nodeId];\n this.direction.fix(node, level);\n if (distribution[level] === undefined) {\n distribution[level] = {};\n }\n distribution[level][nodeId] = node;\n }\n }\n return distribution;\n }\n\n /**\n * Return the active (i.e. visible) edges for this node\n * @param {Node} node\n * @returns {Array.<vis.Edge>} Array of edge instances\n * @private\n */\n _getActiveEdges(node) {\n const result = [];\n forEach(node.edges, edge => {\n var _context4;\n if (_indexOfInstanceProperty(_context4 = this.body.edgeIndices).call(_context4, edge.id) !== -1) {\n result.push(edge);\n }\n });\n return result;\n }\n\n /**\n * Get the hubsizes for all active nodes.\n * @returns {number}\n * @private\n */\n _getHubSizes() {\n const hubSizes = {};\n const nodeIds = this.body.nodeIndices;\n forEach(nodeIds, nodeId => {\n const node = this.body.nodes[nodeId];\n const hubSize = this._getActiveEdges(node).length;\n hubSizes[hubSize] = true;\n });\n\n // Make an array of the size sorted descending\n const result = [];\n forEach(hubSizes, size => {\n result.push(Number(size));\n });\n _sortInstanceProperty(result).call(result, function (a, b) {\n return b - a;\n });\n return result;\n }\n\n /**\n * this function allocates nodes in levels based on the recursive branching from the largest hubs.\n * @private\n */\n _determineLevelsByHubsize() {\n const levelDownstream = (nodeA, nodeB) => {\n this.hierarchical.levelDownstream(nodeA, nodeB);\n };\n const hubSizes = this._getHubSizes();\n for (let i = 0; i < hubSizes.length; ++i) {\n const hubSize = hubSizes[i];\n if (hubSize === 0) break;\n forEach(this.body.nodeIndices, nodeId => {\n const node = this.body.nodes[nodeId];\n if (hubSize === this._getActiveEdges(node).length) {\n this._crawlNetwork(levelDownstream, nodeId);\n }\n });\n }\n }\n\n /**\n * TODO: release feature\n * TODO: Determine if this feature is needed at all\n * @private\n */\n _determineLevelsCustomCallback() {\n const minLevel = 100000;\n\n // TODO: this should come from options.\n // eslint-disable-next-line no-unused-vars -- This should eventually be implemented with these parameters used.\n const customCallback = function (nodeA, nodeB, edge) {};\n\n // TODO: perhaps move to HierarchicalStatus.\n // But I currently don't see the point, this method is not used.\n const levelByDirection = (nodeA, nodeB, edge) => {\n let levelA = this.hierarchical.levels[nodeA.id];\n // set initial level\n if (levelA === undefined) {\n levelA = this.hierarchical.levels[nodeA.id] = minLevel;\n }\n const diff = customCallback(NetworkUtil.cloneOptions(nodeA, \"node\"), NetworkUtil.cloneOptions(nodeB, \"node\"), NetworkUtil.cloneOptions(edge, \"edge\"));\n this.hierarchical.levels[nodeB.id] = levelA + diff;\n };\n this._crawlNetwork(levelByDirection);\n this.hierarchical.setMinLevelToZero();\n }\n\n /**\n * Allocate nodes in levels based on the direction of the edges.\n * @private\n */\n _determineLevelsDirected() {\n var _context5;\n const nodes = _reduceInstanceProperty(_context5 = this.body.nodeIndices).call(_context5, (acc, id) => {\n acc.set(id, this.body.nodes[id]);\n return acc;\n }, new _Map());\n if (this.options.hierarchical.shakeTowards === \"roots\") {\n this.hierarchical.levels = fillLevelsByDirectionRoots(nodes);\n } else {\n this.hierarchical.levels = fillLevelsByDirectionLeaves(nodes);\n }\n this.hierarchical.setMinLevelToZero();\n }\n\n /**\n * Update the bookkeeping of parent and child.\n * @private\n */\n _generateMap() {\n const fillInRelations = (parentNode, childNode) => {\n if (this.hierarchical.levels[childNode.id] > this.hierarchical.levels[parentNode.id]) {\n this.hierarchical.addRelation(parentNode.id, childNode.id);\n }\n };\n this._crawlNetwork(fillInRelations);\n this.hierarchical.checkIfTree();\n }\n\n /**\n * Crawl over the entire network and use a callback on each node couple that is connected to each other.\n * @param {Function} [callback] | will receive nodeA, nodeB and the connecting edge. A and B are distinct.\n * @param {Node.id} startingNodeId\n * @private\n */\n _crawlNetwork() {\n let callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};\n let startingNodeId = arguments.length > 1 ? arguments[1] : undefined;\n const progress = {};\n const crawler = (node, tree) => {\n if (progress[node.id] === undefined) {\n this.hierarchical.setTreeIndex(node, tree);\n progress[node.id] = true;\n let childNode;\n const edges = this._getActiveEdges(node);\n for (let i = 0; i < edges.length; i++) {\n const edge = edges[i];\n if (edge.connected === true) {\n if (edge.toId == node.id) {\n // Not '===' because id's can be string and numeric\n childNode = edge.from;\n } else {\n childNode = edge.to;\n }\n if (node.id != childNode.id) {\n // Not '!==' because id's can be string and numeric\n callback(node, childNode, edge);\n crawler(childNode, tree);\n }\n }\n }\n }\n };\n if (startingNodeId === undefined) {\n // Crawl over all nodes\n let treeIndex = 0; // Serves to pass a unique id for the current distinct tree\n\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n const nodeId = this.body.nodeIndices[i];\n if (progress[nodeId] === undefined) {\n const node = this.body.nodes[nodeId];\n crawler(node, treeIndex);\n treeIndex += 1;\n }\n }\n } else {\n // Crawl from the given starting node\n const node = this.body.nodes[startingNodeId];\n if (node === undefined) {\n console.error(\"Node not found:\", startingNodeId);\n return;\n }\n crawler(node);\n }\n }\n\n /**\n * Shift a branch a certain distance\n * @param {Node.id} parentId\n * @param {number} diff\n * @private\n */\n _shiftBlock(parentId, diff) {\n const progress = {};\n const shifter = parentId => {\n if (progress[parentId]) {\n return;\n }\n progress[parentId] = true;\n this.direction.shift(parentId, diff);\n const childRef = this.hierarchical.childrenReference[parentId];\n if (childRef !== undefined) {\n for (let i = 0; i < childRef.length; i++) {\n shifter(childRef[i]);\n }\n }\n };\n shifter(parentId);\n }\n\n /**\n * Find a common parent between branches.\n * @param {Node.id} childA\n * @param {Node.id} childB\n * @returns {{foundParent, withChild}}\n * @private\n */\n _findCommonParent(childA, childB) {\n const parents = {};\n const iterateParents = (parents, child) => {\n const parentRef = this.hierarchical.parentReference[child];\n if (parentRef !== undefined) {\n for (let i = 0; i < parentRef.length; i++) {\n const parent = parentRef[i];\n parents[parent] = true;\n iterateParents(parents, parent);\n }\n }\n };\n const findParent = (parents, child) => {\n const parentRef = this.hierarchical.parentReference[child];\n if (parentRef !== undefined) {\n for (let i = 0; i < parentRef.length; i++) {\n const parent = parentRef[i];\n if (parents[parent] !== undefined) {\n return {\n foundParent: parent,\n withChild: child\n };\n }\n const branch = findParent(parents, parent);\n if (branch.foundParent !== null) {\n return branch;\n }\n }\n }\n return {\n foundParent: null,\n withChild: child\n };\n };\n iterateParents(parents, childA);\n return findParent(parents, childB);\n }\n\n /**\n * Set the strategy pattern for handling the coordinates given the current direction.\n *\n * The individual instances contain all the operations and data specific to a layout direction.\n * @param {Node} node\n * @param {{x: number, y: number}} position\n * @param {number} level\n * @param {boolean} [doNotUpdate]\n * @private\n */\n setDirectionStrategy() {\n const isVertical = this.options.hierarchical.direction === \"UD\" || this.options.hierarchical.direction === \"DU\";\n if (isVertical) {\n this.direction = new VerticalStrategy(this);\n } else {\n this.direction = new HorizontalStrategy(this);\n }\n }\n\n /**\n * Determine the center position of a branch from the passed list of child nodes\n *\n * This takes into account the positions of all the child nodes.\n * @param {Array.<Node|vis.Node.id>} childNodes Array of either child nodes or node id's\n * @returns {number}\n * @private\n */\n _getCenterPosition(childNodes) {\n let minPos = 1e9;\n let maxPos = -1e9;\n for (let i = 0; i < childNodes.length; i++) {\n let childNode;\n if (childNodes[i].id !== undefined) {\n childNode = childNodes[i];\n } else {\n const childNodeId = childNodes[i];\n childNode = this.body.nodes[childNodeId];\n }\n const position = this.direction.getPosition(childNode);\n minPos = Math.min(minPos, position);\n maxPos = Math.max(maxPos, position);\n }\n return 0.5 * (minPos + maxPos);\n }\n}\n\n/**\n * Clears the toolbar div element of children\n * @private\n */\nclass ManipulationSystem {\n /**\n * @param {object} body\n * @param {Canvas} canvas\n * @param {SelectionHandler} selectionHandler\n * @param {InteractionHandler} interactionHandler\n */\n constructor(body, canvas, selectionHandler, interactionHandler) {\n var _context, _context2;\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n this.interactionHandler = interactionHandler;\n this.editMode = false;\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n this._domEventListenerCleanupQueue = [];\n this.temporaryUIFunctions = {};\n this.temporaryEventFunctions = [];\n this.touchTime = 0;\n this.temporaryIds = {\n nodes: [],\n edges: []\n };\n this.guiEnabled = false;\n this.inMode = false;\n this.selectedControlNode = undefined;\n this.options = {};\n this.defaultOptions = {\n enabled: false,\n initiallyActive: false,\n addNode: true,\n addEdge: true,\n editNode: undefined,\n editEdge: true,\n deleteNode: true,\n deleteEdge: true,\n controlNodeStyle: {\n shape: \"dot\",\n size: 6,\n color: {\n background: \"#ff0000\",\n border: \"#3c3c3c\",\n highlight: {\n background: \"#07f968\",\n border: \"#3c3c3c\"\n }\n },\n borderWidth: 2,\n borderWidthSelected: 2\n }\n };\n _Object$assign(this.options, this.defaultOptions);\n this.body.emitter.on(\"destroy\", () => {\n this._clean();\n });\n this.body.emitter.on(\"_dataChanged\", _bindInstanceProperty(_context = this._restore).call(_context, this));\n this.body.emitter.on(\"_resetData\", _bindInstanceProperty(_context2 = this._restore).call(_context2, this));\n }\n\n /**\n * If something changes in the data during editing, switch back to the initial datamanipulation state and close all edit modes.\n * @private\n */\n _restore() {\n if (this.inMode !== false) {\n if (this.options.initiallyActive === true) {\n this.enableEditMode();\n } else {\n this.disableEditMode();\n }\n }\n }\n\n /**\n * Set the Options\n * @param {object} options\n * @param {object} allOptions\n * @param {object} globalOptions\n */\n setOptions(options, allOptions, globalOptions) {\n if (allOptions !== undefined) {\n if (allOptions.locale !== undefined) {\n this.options.locale = allOptions.locale;\n } else {\n this.options.locale = globalOptions.locale;\n }\n if (allOptions.locales !== undefined) {\n this.options.locales = allOptions.locales;\n } else {\n this.options.locales = globalOptions.locales;\n }\n }\n if (options !== undefined) {\n if (typeof options === \"boolean\") {\n this.options.enabled = options;\n } else {\n this.options.enabled = true;\n deepExtend(this.options, options);\n }\n if (this.options.initiallyActive === true) {\n this.editMode = true;\n }\n this._setup();\n }\n }\n\n /**\n * Enable or disable edit-mode. Draws the DOM required and cleans up after itself.\n * @private\n */\n toggleEditMode() {\n if (this.editMode === true) {\n this.disableEditMode();\n } else {\n this.enableEditMode();\n }\n }\n\n /**\n * Enables Edit Mode\n */\n enableEditMode() {\n this.editMode = true;\n this._clean();\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = \"block\";\n this.closeDiv.style.display = \"block\";\n this.editModeDiv.style.display = \"none\";\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * Disables Edit Mode\n */\n disableEditMode() {\n this.editMode = false;\n this._clean();\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = \"none\";\n this.closeDiv.style.display = \"none\";\n this.editModeDiv.style.display = \"block\";\n this._createEditButton();\n }\n }\n\n /**\n * Creates the main toolbar. Removes functions bound to the select event. Binds all the buttons of the toolbar.\n * @private\n */\n showManipulatorToolbar() {\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n // reset global variables\n this.manipulationDOM = {};\n\n // if the gui is enabled, draw all elements.\n if (this.guiEnabled === true) {\n var _context3, _context4;\n // a _restore will hide these menus\n this.editMode = true;\n this.manipulationDiv.style.display = \"block\";\n this.closeDiv.style.display = \"block\";\n const selectedNodeCount = this.selectionHandler.getSelectedNodeCount();\n const selectedEdgeCount = this.selectionHandler.getSelectedEdgeCount();\n const selectedTotalCount = selectedNodeCount + selectedEdgeCount;\n const locale = this.options.locales[this.options.locale];\n let needSeperator = false;\n if (this.options.addNode !== false) {\n this._createAddNodeButton(locale);\n needSeperator = true;\n }\n if (this.options.addEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(1);\n } else {\n needSeperator = true;\n }\n this._createAddEdgeButton(locale);\n }\n if (selectedNodeCount === 1 && typeof this.options.editNode === \"function\") {\n if (needSeperator === true) {\n this._createSeperator(2);\n } else {\n needSeperator = true;\n }\n this._createEditNodeButton(locale);\n } else if (selectedEdgeCount === 1 && selectedNodeCount === 0 && this.options.editEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(3);\n } else {\n needSeperator = true;\n }\n this._createEditEdgeButton(locale);\n }\n\n // remove buttons\n if (selectedTotalCount !== 0) {\n if (selectedNodeCount > 0 && this.options.deleteNode !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n this._createDeleteButton(locale);\n } else if (selectedNodeCount === 0 && this.options.deleteEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n this._createDeleteButton(locale);\n }\n }\n\n // bind the close button\n this._bindElementEvents(this.closeDiv, _bindInstanceProperty(_context3 = this.toggleEditMode).call(_context3, this));\n\n // refresh this bar based on what has been selected\n this._temporaryBindEvent(\"select\", _bindInstanceProperty(_context4 = this.showManipulatorToolbar).call(_context4, this));\n }\n\n // redraw to show any possible changes\n this.body.emitter.emit(\"_redraw\");\n }\n\n /**\n * Create the toolbar for adding Nodes\n */\n addNodeMode() {\n var _context6;\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n this.inMode = \"addNode\";\n if (this.guiEnabled === true) {\n var _context5;\n const locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale[\"addDescription\"] || this.options.locales[\"en\"][\"addDescription\"]);\n\n // bind the close button\n this._bindElementEvents(this.closeDiv, _bindInstanceProperty(_context5 = this.toggleEditMode).call(_context5, this));\n }\n this._temporaryBindEvent(\"click\", _bindInstanceProperty(_context6 = this._performAddNode).call(_context6, this));\n }\n\n /**\n * call the bound function to handle the editing of the node. The node has to be selected.\n */\n editNode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n const node = this.selectionHandler.getSelectedNodes()[0];\n if (node !== undefined) {\n this.inMode = \"editNode\";\n if (typeof this.options.editNode === \"function\") {\n if (node.isCluster !== true) {\n const data = deepExtend({}, node.options, false);\n data.x = node.x;\n data.y = node.y;\n if (this.options.editNode.length === 2) {\n this.options.editNode(data, finalizedData => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === \"editNode\") {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.data.nodes.getDataSet().update(finalizedData);\n }\n this.showManipulatorToolbar();\n });\n } else {\n throw new Error(\"The function for edit does not support two arguments (data, callback)\");\n }\n } else {\n alert(this.options.locales[this.options.locale][\"editClusterError\"] || this.options.locales[\"en\"][\"editClusterError\"]);\n }\n } else {\n throw new Error(\"No function has been configured to handle the editing of nodes.\");\n }\n } else {\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * create the toolbar to connect nodes\n */\n addEdgeMode() {\n var _context8, _context9, _context0, _context1, _context10;\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n this.inMode = \"addEdge\";\n if (this.guiEnabled === true) {\n var _context7;\n const locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale[\"edgeDescription\"] || this.options.locales[\"en\"][\"edgeDescription\"]);\n\n // bind the close button\n this._bindElementEvents(this.closeDiv, _bindInstanceProperty(_context7 = this.toggleEditMode).call(_context7, this));\n }\n\n // temporarily overload functions\n this._temporaryBindUI(\"onTouch\", _bindInstanceProperty(_context8 = this._handleConnect).call(_context8, this));\n this._temporaryBindUI(\"onDragEnd\", _bindInstanceProperty(_context9 = this._finishConnect).call(_context9, this));\n this._temporaryBindUI(\"onDrag\", _bindInstanceProperty(_context0 = this._dragControlNode).call(_context0, this));\n this._temporaryBindUI(\"onRelease\", _bindInstanceProperty(_context1 = this._finishConnect).call(_context1, this));\n this._temporaryBindUI(\"onDragStart\", _bindInstanceProperty(_context10 = this._dragStartEdge).call(_context10, this));\n this._temporaryBindUI(\"onHold\", () => {});\n }\n\n /**\n * create the toolbar to edit edges\n */\n editEdgeMode() {\n // when using the gui, enable edit mode if it wasn't already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n this.inMode = \"editEdge\";\n if (typeof this.options.editEdge === \"object\" && typeof this.options.editEdge.editWithoutDrag === \"function\") {\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdgeIds()[0];\n if (this.edgeBeingEditedId !== undefined) {\n const edge = this.body.edges[this.edgeBeingEditedId];\n this._performEditEdge(edge.from.id, edge.to.id);\n return;\n }\n }\n if (this.guiEnabled === true) {\n var _context11;\n const locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale[\"editEdgeDescription\"] || this.options.locales[\"en\"][\"editEdgeDescription\"]);\n\n // bind the close button\n this._bindElementEvents(this.closeDiv, _bindInstanceProperty(_context11 = this.toggleEditMode).call(_context11, this));\n }\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdgeIds()[0];\n if (this.edgeBeingEditedId !== undefined) {\n var _context12, _context13, _context14, _context15;\n const edge = this.body.edges[this.edgeBeingEditedId];\n\n // create control nodes\n const controlNodeFrom = this._getNewTargetNode(edge.from.x, edge.from.y);\n const controlNodeTo = this._getNewTargetNode(edge.to.x, edge.to.y);\n this.temporaryIds.nodes.push(controlNodeFrom.id);\n this.temporaryIds.nodes.push(controlNodeTo.id);\n this.body.nodes[controlNodeFrom.id] = controlNodeFrom;\n this.body.nodeIndices.push(controlNodeFrom.id);\n this.body.nodes[controlNodeTo.id] = controlNodeTo;\n this.body.nodeIndices.push(controlNodeTo.id);\n\n // temporarily overload UI functions, cleaned up automatically because of _temporaryBindUI\n this._temporaryBindUI(\"onTouch\", _bindInstanceProperty(_context12 = this._controlNodeTouch).call(_context12, this)); // used to get the position\n this._temporaryBindUI(\"onTap\", () => {}); // disabled\n this._temporaryBindUI(\"onHold\", () => {}); // disabled\n this._temporaryBindUI(\"onDragStart\", _bindInstanceProperty(_context13 = this._controlNodeDragStart).call(_context13, this)); // used to select control node\n this._temporaryBindUI(\"onDrag\", _bindInstanceProperty(_context14 = this._controlNodeDrag).call(_context14, this)); // used to drag control node\n this._temporaryBindUI(\"onDragEnd\", _bindInstanceProperty(_context15 = this._controlNodeDragEnd).call(_context15, this)); // used to connect or revert control nodes\n this._temporaryBindUI(\"onMouseMove\", () => {}); // disabled\n\n // create function to position control nodes correctly on movement\n // automatically cleaned up because we use the temporary bind\n this._temporaryBindEvent(\"beforeDrawing\", ctx => {\n const positions = edge.edgeType.findBorderPositions(ctx);\n if (controlNodeFrom.selected === false) {\n controlNodeFrom.x = positions.from.x;\n controlNodeFrom.y = positions.from.y;\n }\n if (controlNodeTo.selected === false) {\n controlNodeTo.x = positions.to.x;\n controlNodeTo.y = positions.to.y;\n }\n });\n this.body.emitter.emit(\"_redraw\");\n } else {\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * delete everything in the selection\n */\n deleteSelected() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n this.inMode = \"delete\";\n const selectedNodes = this.selectionHandler.getSelectedNodeIds();\n const selectedEdges = this.selectionHandler.getSelectedEdgeIds();\n let deleteFunction = undefined;\n if (selectedNodes.length > 0) {\n for (let i = 0; i < selectedNodes.length; i++) {\n if (this.body.nodes[selectedNodes[i]].isCluster === true) {\n alert(this.options.locales[this.options.locale][\"deleteClusterError\"] || this.options.locales[\"en\"][\"deleteClusterError\"]);\n return;\n }\n }\n if (typeof this.options.deleteNode === \"function\") {\n deleteFunction = this.options.deleteNode;\n }\n } else if (selectedEdges.length > 0) {\n if (typeof this.options.deleteEdge === \"function\") {\n deleteFunction = this.options.deleteEdge;\n }\n }\n if (typeof deleteFunction === \"function\") {\n const data = {\n nodes: selectedNodes,\n edges: selectedEdges\n };\n if (deleteFunction.length === 2) {\n deleteFunction(data, finalizedData => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === \"delete\") {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.data.edges.getDataSet().remove(finalizedData.edges);\n this.body.data.nodes.getDataSet().remove(finalizedData.nodes);\n this.body.emitter.emit(\"startSimulation\");\n this.showManipulatorToolbar();\n } else {\n this.body.emitter.emit(\"startSimulation\");\n this.showManipulatorToolbar();\n }\n });\n } else {\n throw new Error(\"The function for delete does not support two arguments (data, callback)\");\n }\n } else {\n this.body.data.edges.getDataSet().remove(selectedEdges);\n this.body.data.nodes.getDataSet().remove(selectedNodes);\n this.body.emitter.emit(\"startSimulation\");\n this.showManipulatorToolbar();\n }\n }\n\n //********************************************** PRIVATE ***************************************//\n\n /**\n * draw or remove the DOM\n * @private\n */\n _setup() {\n if (this.options.enabled === true) {\n // Enable the GUI\n this.guiEnabled = true;\n this._createWrappers();\n if (this.editMode === false) {\n this._createEditButton();\n } else {\n this.showManipulatorToolbar();\n }\n } else {\n this._removeManipulationDOM();\n\n // disable the gui\n this.guiEnabled = false;\n }\n }\n\n /**\n * create the div overlays that contain the DOM\n * @private\n */\n _createWrappers() {\n // load the manipulator HTML elements. All styling done in css.\n if (this.manipulationDiv === undefined) {\n this.manipulationDiv = document.createElement(\"div\");\n this.manipulationDiv.className = \"vis-manipulation\";\n if (this.editMode === true) {\n this.manipulationDiv.style.display = \"block\";\n } else {\n this.manipulationDiv.style.display = \"none\";\n }\n this.canvas.frame.appendChild(this.manipulationDiv);\n }\n\n // container for the edit button.\n if (this.editModeDiv === undefined) {\n this.editModeDiv = document.createElement(\"div\");\n this.editModeDiv.className = \"vis-edit-mode\";\n if (this.editMode === true) {\n this.editModeDiv.style.display = \"none\";\n } else {\n this.editModeDiv.style.display = \"block\";\n }\n this.canvas.frame.appendChild(this.editModeDiv);\n }\n\n // container for the close div button\n if (this.closeDiv === undefined) {\n var _this$options$locales, _this$options$locales2;\n this.closeDiv = document.createElement(\"button\");\n this.closeDiv.className = \"vis-close\";\n this.closeDiv.setAttribute(\"aria-label\", (_this$options$locales = (_this$options$locales2 = this.options.locales[this.options.locale]) === null || _this$options$locales2 === void 0 ? void 0 : _this$options$locales2[\"close\"]) !== null && _this$options$locales !== void 0 ? _this$options$locales : this.options.locales[\"en\"][\"close\"]);\n this.closeDiv.style.display = this.manipulationDiv.style.display;\n this.canvas.frame.appendChild(this.closeDiv);\n }\n }\n\n /**\n * generate a new target node. Used for creating new edges and editing edges\n * @param {number} x\n * @param {number} y\n * @returns {Node}\n * @private\n */\n _getNewTargetNode(x, y) {\n const controlNodeStyle = deepExtend({}, this.options.controlNodeStyle);\n controlNodeStyle.id = \"targetNode\" + v4();\n controlNodeStyle.hidden = false;\n controlNodeStyle.physics = false;\n controlNodeStyle.x = x;\n controlNodeStyle.y = y;\n\n // we have to define the bounding box in order for the nodes to be drawn immediately\n const node = this.body.functions.createNode(controlNodeStyle);\n node.shape.boundingBox = {\n left: x,\n right: x,\n top: y,\n bottom: y\n };\n return node;\n }\n\n /**\n * Create the edit button\n */\n _createEditButton() {\n var _context16;\n // restore everything to it's original state (if applicable)\n this._clean();\n\n // reset the manipulationDOM\n this.manipulationDOM = {};\n\n // empty the editModeDiv\n recursiveDOMDelete(this.editModeDiv);\n\n // create the contents for the editMode button\n const locale = this.options.locales[this.options.locale];\n const button = this._createButton(\"editMode\", \"vis-edit vis-edit-mode\", locale[\"edit\"] || this.options.locales[\"en\"][\"edit\"]);\n this.editModeDiv.appendChild(button);\n\n // bind a hammer listener to the button, calling the function toggleEditMode.\n this._bindElementEvents(button, _bindInstanceProperty(_context16 = this.toggleEditMode).call(_context16, this));\n }\n\n /**\n * this function cleans up after everything this module does. Temporary elements, functions and events are removed, physics restored, hammers removed.\n * @private\n */\n _clean() {\n // not in mode\n this.inMode = false;\n\n // _clean the divs\n if (this.guiEnabled === true) {\n recursiveDOMDelete(this.editModeDiv);\n recursiveDOMDelete(this.manipulationDiv);\n\n // removes all the bindings and overloads\n this._cleanupDOMEventListeners();\n }\n\n // remove temporary nodes and edges\n this._cleanupTemporaryNodesAndEdges();\n\n // restore overloaded UI functions\n this._unbindTemporaryUIs();\n\n // remove the temporaryEventFunctions\n this._unbindTemporaryEvents();\n\n // restore the physics if required\n this.body.emitter.emit(\"restorePhysics\");\n }\n\n /**\n * Each dom element has it's own hammer. They are stored in this.manipulationHammers. This cleans them up.\n * @private\n */\n _cleanupDOMEventListeners() {\n // _clean DOM event listener bindings\n for (const callback of _spliceInstanceProperty(_context17 = this._domEventListenerCleanupQueue).call(_context17, 0)) {\n var _context17;\n callback();\n }\n }\n\n /**\n * Remove all DOM elements created by this module.\n * @private\n */\n _removeManipulationDOM() {\n // removes all the bindings and overloads\n this._clean();\n\n // empty the manipulation divs\n recursiveDOMDelete(this.manipulationDiv);\n recursiveDOMDelete(this.editModeDiv);\n recursiveDOMDelete(this.closeDiv);\n\n // remove the manipulation divs\n if (this.manipulationDiv) {\n this.canvas.frame.removeChild(this.manipulationDiv);\n }\n if (this.editModeDiv) {\n this.canvas.frame.removeChild(this.editModeDiv);\n }\n if (this.closeDiv) {\n this.canvas.frame.removeChild(this.closeDiv);\n }\n\n // set the references to undefined\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n }\n\n /**\n * create a seperator line. the index is to differentiate in the manipulation dom\n * @param {number} [index]\n * @private\n */\n _createSeperator() {\n let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n this.manipulationDOM[\"seperatorLineDiv\" + index] = document.createElement(\"div\");\n this.manipulationDOM[\"seperatorLineDiv\" + index].className = \"vis-separator-line\";\n this.manipulationDiv.appendChild(this.manipulationDOM[\"seperatorLineDiv\" + index]);\n }\n\n // ---------------------- DOM functions for buttons --------------------------//\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createAddNodeButton(locale) {\n var _context18;\n const button = this._createButton(\"addNode\", \"vis-add\", locale[\"addNode\"] || this.options.locales[\"en\"][\"addNode\"]);\n this.manipulationDiv.appendChild(button);\n this._bindElementEvents(button, _bindInstanceProperty(_context18 = this.addNodeMode).call(_context18, this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createAddEdgeButton(locale) {\n var _context19;\n const button = this._createButton(\"addEdge\", \"vis-connect\", locale[\"addEdge\"] || this.options.locales[\"en\"][\"addEdge\"]);\n this.manipulationDiv.appendChild(button);\n this._bindElementEvents(button, _bindInstanceProperty(_context19 = this.addEdgeMode).call(_context19, this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createEditNodeButton(locale) {\n var _context20;\n const button = this._createButton(\"editNode\", \"vis-edit\", locale[\"editNode\"] || this.options.locales[\"en\"][\"editNode\"]);\n this.manipulationDiv.appendChild(button);\n this._bindElementEvents(button, _bindInstanceProperty(_context20 = this.editNode).call(_context20, this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createEditEdgeButton(locale) {\n var _context21;\n const button = this._createButton(\"editEdge\", \"vis-edit\", locale[\"editEdge\"] || this.options.locales[\"en\"][\"editEdge\"]);\n this.manipulationDiv.appendChild(button);\n this._bindElementEvents(button, _bindInstanceProperty(_context21 = this.editEdgeMode).call(_context21, this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createDeleteButton(locale) {\n var _context22;\n let deleteBtnClass;\n if (this.options.rtl) {\n deleteBtnClass = \"vis-delete-rtl\";\n } else {\n deleteBtnClass = \"vis-delete\";\n }\n const button = this._createButton(\"delete\", deleteBtnClass, locale[\"del\"] || this.options.locales[\"en\"][\"del\"]);\n this.manipulationDiv.appendChild(button);\n this._bindElementEvents(button, _bindInstanceProperty(_context22 = this.deleteSelected).call(_context22, this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createBackButton(locale) {\n var _context23;\n const button = this._createButton(\"back\", \"vis-back\", locale[\"back\"] || this.options.locales[\"en\"][\"back\"]);\n this.manipulationDiv.appendChild(button);\n this._bindElementEvents(button, _bindInstanceProperty(_context23 = this.showManipulatorToolbar).call(_context23, this));\n }\n\n /**\n *\n * @param {number|string} id\n * @param {string} className\n * @param {label} label\n * @param {string} labelClassName\n * @returns {HTMLElement}\n * @private\n */\n _createButton(id, className, label) {\n let labelClassName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : \"vis-label\";\n this.manipulationDOM[id + \"Div\"] = document.createElement(\"button\");\n this.manipulationDOM[id + \"Div\"].className = \"vis-button \" + className;\n this.manipulationDOM[id + \"Label\"] = document.createElement(\"div\");\n this.manipulationDOM[id + \"Label\"].className = labelClassName;\n this.manipulationDOM[id + \"Label\"].innerText = label;\n this.manipulationDOM[id + \"Div\"].appendChild(this.manipulationDOM[id + \"Label\"]);\n return this.manipulationDOM[id + \"Div\"];\n }\n\n /**\n *\n * @param {Label} label\n * @private\n */\n _createDescription(label) {\n this.manipulationDOM[\"descriptionLabel\"] = document.createElement(\"div\");\n this.manipulationDOM[\"descriptionLabel\"].className = \"vis-none\";\n this.manipulationDOM[\"descriptionLabel\"].innerText = label;\n this.manipulationDiv.appendChild(this.manipulationDOM[\"descriptionLabel\"]);\n }\n\n // -------------------------- End of DOM functions for buttons ------------------------------//\n\n /**\n * this binds an event until cleanup by the clean functions.\n * @param {Event} event The event\n * @param {Function} newFunction\n * @private\n */\n _temporaryBindEvent(event, newFunction) {\n this.temporaryEventFunctions.push({\n event: event,\n boundFunction: newFunction\n });\n this.body.emitter.on(event, newFunction);\n }\n\n /**\n * this overrides an UI function until cleanup by the clean function\n * @param {string} UIfunctionName\n * @param {Function} newFunction\n * @private\n */\n _temporaryBindUI(UIfunctionName, newFunction) {\n if (this.body.eventListeners[UIfunctionName] !== undefined) {\n this.temporaryUIFunctions[UIfunctionName] = this.body.eventListeners[UIfunctionName];\n this.body.eventListeners[UIfunctionName] = newFunction;\n } else {\n throw new Error(\"This UI function does not exist. Typo? You tried: \" + UIfunctionName + \" possible are: \" + _JSON$stringify(_Object$keys(this.body.eventListeners)));\n }\n }\n\n /**\n * Restore the overridden UI functions to their original state.\n * @private\n */\n _unbindTemporaryUIs() {\n for (const functionName in this.temporaryUIFunctions) {\n if (Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions, functionName)) {\n this.body.eventListeners[functionName] = this.temporaryUIFunctions[functionName];\n delete this.temporaryUIFunctions[functionName];\n }\n }\n this.temporaryUIFunctions = {};\n }\n\n /**\n * Unbind the events created by _temporaryBindEvent\n * @private\n */\n _unbindTemporaryEvents() {\n for (let i = 0; i < this.temporaryEventFunctions.length; i++) {\n const eventName = this.temporaryEventFunctions[i].event;\n const boundFunction = this.temporaryEventFunctions[i].boundFunction;\n this.body.emitter.off(eventName, boundFunction);\n }\n this.temporaryEventFunctions = [];\n }\n\n /**\n * Bind an hammer instance to a DOM element.\n * @param {Element} domElement\n * @param {Function} boundFunction\n */\n _bindElementEvents(domElement, boundFunction) {\n // Bind touch events.\n const hammer = new Hammer(domElement, {});\n onTouch(hammer, boundFunction);\n this._domEventListenerCleanupQueue.push(() => {\n hammer.destroy();\n });\n\n // Bind keyboard events.\n const keyupListener = _ref => {\n let {\n keyCode,\n key\n } = _ref;\n if (key === \"Enter\" || key === \" \" || keyCode === 13 || keyCode === 32) {\n boundFunction();\n }\n };\n domElement.addEventListener(\"keyup\", keyupListener, false);\n this._domEventListenerCleanupQueue.push(() => {\n domElement.removeEventListener(\"keyup\", keyupListener, false);\n });\n }\n\n /**\n * Neatly clean up temporary edges and nodes\n * @private\n */\n _cleanupTemporaryNodesAndEdges() {\n // _clean temporary edges\n for (let i = 0; i < this.temporaryIds.edges.length; i++) {\n var _context24;\n this.body.edges[this.temporaryIds.edges[i]].disconnect();\n delete this.body.edges[this.temporaryIds.edges[i]];\n const indexTempEdge = _indexOfInstanceProperty(_context24 = this.body.edgeIndices).call(_context24, this.temporaryIds.edges[i]);\n if (indexTempEdge !== -1) {\n var _context25;\n _spliceInstanceProperty(_context25 = this.body.edgeIndices).call(_context25, indexTempEdge, 1);\n }\n }\n\n // _clean temporary nodes\n for (let i = 0; i < this.temporaryIds.nodes.length; i++) {\n var _context26;\n delete this.body.nodes[this.temporaryIds.nodes[i]];\n const indexTempNode = _indexOfInstanceProperty(_context26 = this.body.nodeIndices).call(_context26, this.temporaryIds.nodes[i]);\n if (indexTempNode !== -1) {\n var _context27;\n _spliceInstanceProperty(_context27 = this.body.nodeIndices).call(_context27, indexTempNode, 1);\n }\n }\n this.temporaryIds = {\n nodes: [],\n edges: []\n };\n }\n\n // ------------------------------------------ EDIT EDGE FUNCTIONS -----------------------------------------//\n\n /**\n * the touch is used to get the position of the initial click\n * @param {Event} event The event\n * @private\n */\n _controlNodeTouch(event) {\n this.selectionHandler.unselectAll();\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = _Object$assign({}, this.body.view.translation); // copy the object\n }\n\n /**\n * the drag start is used to mark one of the control nodes as selected.\n * @private\n */\n _controlNodeDragStart() {\n const pointer = this.lastTouch;\n const pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n const from = this.body.nodes[this.temporaryIds.nodes[0]];\n const to = this.body.nodes[this.temporaryIds.nodes[1]];\n const edge = this.body.edges[this.edgeBeingEditedId];\n this.selectedControlNode = undefined;\n const fromSelect = from.isOverlappingWith(pointerObj);\n const toSelect = to.isOverlappingWith(pointerObj);\n if (fromSelect === true) {\n this.selectedControlNode = from;\n edge.edgeType.from = from;\n } else if (toSelect === true) {\n this.selectedControlNode = to;\n edge.edgeType.to = to;\n }\n\n // we use the selection to find the node that is being dragged. We explicitly select it here.\n if (this.selectedControlNode !== undefined) {\n this.selectionHandler.selectObject(this.selectedControlNode);\n }\n this.body.emitter.emit(\"_redraw\");\n }\n\n /**\n * dragging the control nodes or the canvas\n * @param {Event} event The event\n * @private\n */\n _controlNodeDrag(event) {\n this.body.emitter.emit(\"disablePhysics\");\n const pointer = this.body.functions.getPointer(event.center);\n const pos = this.canvas.DOMtoCanvas(pointer);\n if (this.selectedControlNode !== undefined) {\n this.selectedControlNode.x = pos.x;\n this.selectedControlNode.y = pos.y;\n } else {\n this.interactionHandler.onDrag(event);\n }\n this.body.emitter.emit(\"_redraw\");\n }\n\n /**\n * connecting or restoring the control nodes.\n * @param {Event} event The event\n * @private\n */\n _controlNodeDragEnd(event) {\n const pointer = this.body.functions.getPointer(event.center);\n const pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n const edge = this.body.edges[this.edgeBeingEditedId];\n // if the node that was dragged is not a control node, return\n if (this.selectedControlNode === undefined) {\n return;\n }\n\n // we use the selection to find the node that is being dragged. We explicitly DEselect the control node here.\n this.selectionHandler.unselectAll();\n const overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n let node = undefined;\n for (let i = overlappingNodeIds.length - 1; i >= 0; i--) {\n if (overlappingNodeIds[i] !== this.selectedControlNode.id) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n // perform the connection\n if (node !== undefined && this.selectedControlNode !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale][\"createEdgeError\"] || this.options.locales[\"en\"][\"createEdgeError\"]);\n } else {\n const from = this.body.nodes[this.temporaryIds.nodes[0]];\n if (this.selectedControlNode.id === from.id) {\n this._performEditEdge(node.id, edge.to.id);\n } else {\n this._performEditEdge(edge.from.id, node.id);\n }\n }\n } else {\n edge.updateEdgeType();\n this.body.emitter.emit(\"restorePhysics\");\n }\n this.body.emitter.emit(\"_redraw\");\n }\n\n // ------------------------------------ END OF EDIT EDGE FUNCTIONS -----------------------------------------//\n\n // ------------------------------------------- ADD EDGE FUNCTIONS -----------------------------------------//\n /**\n * the function bound to the selection event. It checks if you want to connect a cluster and changes the description\n * to walk the user through the process.\n * @param {Event} event\n * @private\n */\n _handleConnect(event) {\n // check to avoid double fireing of this function.\n if (new Date().valueOf() - this.touchTime > 100) {\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = _Object$assign({}, this.body.view.translation); // copy the object\n\n this.interactionHandler.drag.pointer = this.lastTouch; // Drag pointer is not updated when adding edges\n this.interactionHandler.drag.translation = this.lastTouch.translation;\n const pointer = this.lastTouch;\n const node = this.selectionHandler.getNodeAt(pointer);\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale][\"createEdgeError\"] || this.options.locales[\"en\"][\"createEdgeError\"]);\n } else {\n // create a node the temporary line can look at\n const targetNode = this._getNewTargetNode(node.x, node.y);\n this.body.nodes[targetNode.id] = targetNode;\n this.body.nodeIndices.push(targetNode.id);\n\n // create a temporary edge\n const connectionEdge = this.body.functions.createEdge({\n id: \"connectionEdge\" + v4(),\n from: node.id,\n to: targetNode.id,\n physics: false,\n smooth: {\n enabled: true,\n type: \"continuous\",\n roundness: 0.5\n }\n });\n this.body.edges[connectionEdge.id] = connectionEdge;\n this.body.edgeIndices.push(connectionEdge.id);\n this.temporaryIds.nodes.push(targetNode.id);\n this.temporaryIds.edges.push(connectionEdge.id);\n }\n }\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n *\n * @param {Event} event\n * @private\n */\n _dragControlNode(event) {\n const pointer = this.body.functions.getPointer(event.center);\n const pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n // remember the edge id\n let connectFromId = undefined;\n if (this.temporaryIds.edges[0] !== undefined) {\n connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId;\n }\n\n // get the overlapping node but NOT the temporary node;\n const overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n let node = undefined;\n for (let i = overlappingNodeIds.length - 1; i >= 0; i--) {\n var _context28;\n // if the node id is NOT a temporary node, accept the node.\n if (_indexOfInstanceProperty(_context28 = this.temporaryIds.nodes).call(_context28, overlappingNodeIds[i]) === -1) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n event.controlEdge = {\n from: connectFromId,\n to: node ? node.id : undefined\n };\n this.selectionHandler.generateClickEvent(\"controlNodeDragging\", event, pointer);\n if (this.temporaryIds.nodes[0] !== undefined) {\n const targetNode = this.body.nodes[this.temporaryIds.nodes[0]]; // there is only one temp node in the add edge mode.\n targetNode.x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n targetNode.y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n this.body.emitter.emit(\"_redraw\");\n } else {\n this.interactionHandler.onDrag(event);\n }\n }\n\n /**\n * Connect the new edge to the target if one exists, otherwise remove temp line\n * @param {Event} event The event\n * @private\n */\n _finishConnect(event) {\n const pointer = this.body.functions.getPointer(event.center);\n const pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n // remember the edge id\n let connectFromId = undefined;\n if (this.temporaryIds.edges[0] !== undefined) {\n connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId;\n }\n\n // get the overlapping node but NOT the temporary node;\n const overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n let node = undefined;\n for (let i = overlappingNodeIds.length - 1; i >= 0; i--) {\n var _context29;\n // if the node id is NOT a temporary node, accept the node.\n if (_indexOfInstanceProperty(_context29 = this.temporaryIds.nodes).call(_context29, overlappingNodeIds[i]) === -1) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n\n // clean temporary nodes and edges.\n this._cleanupTemporaryNodesAndEdges();\n\n // perform the connection\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale][\"createEdgeError\"] || this.options.locales[\"en\"][\"createEdgeError\"]);\n } else {\n if (this.body.nodes[connectFromId] !== undefined && this.body.nodes[node.id] !== undefined) {\n this._performAddEdge(connectFromId, node.id);\n }\n }\n }\n event.controlEdge = {\n from: connectFromId,\n to: node ? node.id : undefined\n };\n this.selectionHandler.generateClickEvent(\"controlNodeDragEnd\", event, pointer);\n\n // No need to do _generateclickevent('dragEnd') here, the regular dragEnd event fires.\n this.body.emitter.emit(\"_redraw\");\n }\n\n /**\n *\n * @param {Event} event\n * @private\n */\n _dragStartEdge(event) {\n const pointer = this.lastTouch;\n this.selectionHandler.generateClickEvent(\"dragStart\", event, pointer, undefined, true);\n }\n\n // --------------------------------------- END OF ADD EDGE FUNCTIONS -------------------------------------//\n\n // ------------------------------ Performing all the actual data manipulation ------------------------//\n\n /**\n * Adds a node on the specified location\n * @param {object} clickData\n * @private\n */\n _performAddNode(clickData) {\n const defaultData = {\n id: v4(),\n x: clickData.pointer.canvas.x,\n y: clickData.pointer.canvas.y,\n label: \"new\"\n };\n if (typeof this.options.addNode === \"function\") {\n if (this.options.addNode.length === 2) {\n this.options.addNode(defaultData, finalizedData => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === \"addNode\") {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n this.body.data.nodes.getDataSet().add(finalizedData);\n }\n this.showManipulatorToolbar();\n });\n } else {\n this.showManipulatorToolbar();\n throw new Error(\"The function for add does not support two arguments (data,callback)\");\n }\n } else {\n this.body.data.nodes.getDataSet().add(defaultData);\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * connect two nodes with a new edge.\n * @param {Node.id} sourceNodeId\n * @param {Node.id} targetNodeId\n * @private\n */\n _performAddEdge(sourceNodeId, targetNodeId) {\n const defaultData = {\n from: sourceNodeId,\n to: targetNodeId\n };\n if (typeof this.options.addEdge === \"function\") {\n if (this.options.addEdge.length === 2) {\n this.options.addEdge(defaultData, finalizedData => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === \"addEdge\") {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n this.body.data.edges.getDataSet().add(finalizedData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n });\n } else {\n throw new Error(\"The function for connect does not support two arguments (data,callback)\");\n }\n } else {\n this.body.data.edges.getDataSet().add(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * connect two nodes with a new edge.\n * @param {Node.id} sourceNodeId\n * @param {Node.id} targetNodeId\n * @private\n */\n _performEditEdge(sourceNodeId, targetNodeId) {\n const defaultData = {\n id: this.edgeBeingEditedId,\n from: sourceNodeId,\n to: targetNodeId,\n label: this.body.data.edges.get(this.edgeBeingEditedId).label\n };\n let eeFunct = this.options.editEdge;\n if (typeof eeFunct === \"object\") {\n eeFunct = eeFunct.editWithoutDrag;\n }\n if (typeof eeFunct === \"function\") {\n if (eeFunct.length === 2) {\n eeFunct(defaultData, finalizedData => {\n if (finalizedData === null || finalizedData === undefined || this.inMode !== \"editEdge\") {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.edges[defaultData.id].updateEdgeType();\n this.body.emitter.emit(\"_redraw\");\n this.showManipulatorToolbar();\n } else {\n this.body.data.edges.getDataSet().update(finalizedData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n });\n } else {\n throw new Error(\"The function for edit does not support two arguments (data, callback)\");\n }\n } else {\n this.body.data.edges.getDataSet().update(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n}\n\n/**\n * This object contains all possible options. It will check if the types are correct, if required if the option is one\n * of the allowed values.\n *\n * __any__ means that the name of the property does not matter.\n * __type__ is a required field for all objects and contains the allowed types of all objects\n */\nconst string = \"string\";\nconst bool = \"boolean\";\nconst number = \"number\";\nconst array = \"array\";\nconst object = \"object\"; // should only be in a __type__ property\nconst dom = \"dom\";\nconst any = \"any\";\n// List of endpoints\nconst endPoints = [\"arrow\", \"bar\", \"box\", \"circle\", \"crow\", \"curve\", \"diamond\", \"image\", \"inv_curve\", \"inv_triangle\", \"triangle\", \"vee\"];\n/* eslint-disable @typescript-eslint/naming-convention -- The __*__ format is used to prevent collisions with actual option names. */\nconst nodeOptions = {\n borderWidth: {\n number\n },\n borderWidthSelected: {\n number,\n undefined: \"undefined\"\n },\n brokenImage: {\n string,\n undefined: \"undefined\"\n },\n chosen: {\n label: {\n boolean: bool,\n function: \"function\"\n },\n node: {\n boolean: bool,\n function: \"function\"\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n color: {\n border: {\n string\n },\n background: {\n string\n },\n highlight: {\n border: {\n string\n },\n background: {\n string\n },\n __type__: {\n object,\n string\n }\n },\n hover: {\n border: {\n string\n },\n background: {\n string\n },\n __type__: {\n object,\n string\n }\n },\n __type__: {\n object,\n string\n }\n },\n opacity: {\n number,\n undefined: \"undefined\"\n },\n fixed: {\n x: {\n boolean: bool\n },\n y: {\n boolean: bool\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n font: {\n align: {\n string\n },\n color: {\n string\n },\n size: {\n number\n },\n // px\n face: {\n string\n },\n background: {\n string\n },\n strokeWidth: {\n number\n },\n // px\n strokeColor: {\n string\n },\n vadjust: {\n number\n },\n multi: {\n boolean: bool,\n string\n },\n bold: {\n color: {\n string\n },\n size: {\n number\n },\n // px\n face: {\n string\n },\n mod: {\n string\n },\n vadjust: {\n number\n },\n __type__: {\n object,\n string\n }\n },\n boldital: {\n color: {\n string\n },\n size: {\n number\n },\n // px\n face: {\n string\n },\n mod: {\n string\n },\n vadjust: {\n number\n },\n __type__: {\n object,\n string\n }\n },\n ital: {\n color: {\n string\n },\n size: {\n number\n },\n // px\n face: {\n string\n },\n mod: {\n string\n },\n vadjust: {\n number\n },\n __type__: {\n object,\n string\n }\n },\n mono: {\n color: {\n string\n },\n size: {\n number\n },\n // px\n face: {\n string\n },\n mod: {\n string\n },\n vadjust: {\n number\n },\n __type__: {\n object,\n string\n }\n },\n __type__: {\n object,\n string\n }\n },\n group: {\n string,\n number,\n undefined: \"undefined\"\n },\n heightConstraint: {\n minimum: {\n number\n },\n valign: {\n string\n },\n __type__: {\n object,\n boolean: bool,\n number\n }\n },\n hidden: {\n boolean: bool\n },\n icon: {\n face: {\n string\n },\n code: {\n string\n },\n //'\\uf007',\n size: {\n number\n },\n //50,\n color: {\n string\n },\n weight: {\n string,\n number\n },\n __type__: {\n object\n }\n },\n id: {\n string,\n number\n },\n image: {\n selected: {\n string,\n undefined: \"undefined\"\n },\n // --> URL\n unselected: {\n string,\n undefined: \"undefined\"\n },\n // --> URL\n __type__: {\n object,\n string\n }\n },\n imagePadding: {\n top: {\n number\n },\n right: {\n number\n },\n bottom: {\n number\n },\n left: {\n number\n },\n __type__: {\n object,\n number\n }\n },\n label: {\n string,\n undefined: \"undefined\"\n },\n labelHighlightBold: {\n boolean: bool\n },\n level: {\n number,\n undefined: \"undefined\"\n },\n margin: {\n top: {\n number\n },\n right: {\n number\n },\n bottom: {\n number\n },\n left: {\n number\n },\n __type__: {\n object,\n number\n }\n },\n mass: {\n number\n },\n physics: {\n boolean: bool\n },\n scaling: {\n min: {\n number\n },\n max: {\n number\n },\n label: {\n enabled: {\n boolean: bool\n },\n min: {\n number\n },\n max: {\n number\n },\n maxVisible: {\n number\n },\n drawThreshold: {\n number\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n customScalingFunction: {\n function: \"function\"\n },\n __type__: {\n object\n }\n },\n shadow: {\n enabled: {\n boolean: bool\n },\n color: {\n string\n },\n size: {\n number\n },\n x: {\n number\n },\n y: {\n number\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n shape: {\n string: [\"custom\", \"ellipse\", \"circle\", \"database\", \"box\", \"text\", \"image\", \"circularImage\", \"diamond\", \"dot\", \"star\", \"triangle\", \"triangleDown\", \"square\", \"icon\", \"hexagon\"]\n },\n ctxRenderer: {\n function: \"function\"\n },\n shapeProperties: {\n borderDashes: {\n boolean: bool,\n array\n },\n borderRadius: {\n number\n },\n interpolation: {\n boolean: bool\n },\n useImageSize: {\n boolean: bool\n },\n useBorderWithImage: {\n boolean: bool\n },\n coordinateOrigin: {\n string: [\"center\", \"top-left\"]\n },\n __type__: {\n object\n }\n },\n size: {\n number\n },\n title: {\n string,\n dom,\n undefined: \"undefined\"\n },\n value: {\n number,\n undefined: \"undefined\"\n },\n widthConstraint: {\n minimum: {\n number\n },\n maximum: {\n number\n },\n __type__: {\n object,\n boolean: bool,\n number\n }\n },\n x: {\n number\n },\n y: {\n number\n },\n __type__: {\n object\n }\n};\nconst allOptions = {\n configure: {\n enabled: {\n boolean: bool\n },\n filter: {\n boolean: bool,\n string,\n array,\n function: \"function\"\n },\n container: {\n dom\n },\n showButton: {\n boolean: bool\n },\n __type__: {\n object,\n boolean: bool,\n string,\n array,\n function: \"function\"\n }\n },\n edges: {\n arrows: {\n to: {\n enabled: {\n boolean: bool\n },\n scaleFactor: {\n number\n },\n type: {\n string: endPoints\n },\n imageHeight: {\n number\n },\n imageWidth: {\n number\n },\n src: {\n string\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n middle: {\n enabled: {\n boolean: bool\n },\n scaleFactor: {\n number\n },\n type: {\n string: endPoints\n },\n imageWidth: {\n number\n },\n imageHeight: {\n number\n },\n src: {\n string\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n from: {\n enabled: {\n boolean: bool\n },\n scaleFactor: {\n number\n },\n type: {\n string: endPoints\n },\n imageWidth: {\n number\n },\n imageHeight: {\n number\n },\n src: {\n string\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n __type__: {\n string: [\"from\", \"to\", \"middle\"],\n object\n }\n },\n endPointOffset: {\n from: {\n number: number\n },\n to: {\n number: number\n },\n __type__: {\n object: object,\n number: number\n }\n },\n arrowStrikethrough: {\n boolean: bool\n },\n background: {\n enabled: {\n boolean: bool\n },\n color: {\n string\n },\n size: {\n number\n },\n dashes: {\n boolean: bool,\n array\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n chosen: {\n label: {\n boolean: bool,\n function: \"function\"\n },\n edge: {\n boolean: bool,\n function: \"function\"\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n color: {\n color: {\n string\n },\n highlight: {\n string\n },\n hover: {\n string\n },\n inherit: {\n string: [\"from\", \"to\", \"both\"],\n boolean: bool\n },\n opacity: {\n number\n },\n __type__: {\n object,\n string\n }\n },\n dashes: {\n boolean: bool,\n array\n },\n font: {\n color: {\n string\n },\n size: {\n number\n },\n // px\n face: {\n string\n },\n background: {\n string\n },\n strokeWidth: {\n number\n },\n // px\n strokeColor: {\n string\n },\n align: {\n string: [\"horizontal\", \"top\", \"middle\", \"bottom\"]\n },\n vadjust: {\n number\n },\n multi: {\n boolean: bool,\n string\n },\n bold: {\n color: {\n string\n },\n size: {\n number\n },\n // px\n face: {\n string\n },\n mod: {\n string\n },\n vadjust: {\n number\n },\n __type__: {\n object,\n string\n }\n },\n boldital: {\n color: {\n string\n },\n size: {\n number\n },\n // px\n face: {\n string\n },\n mod: {\n string\n },\n vadjust: {\n number\n },\n __type__: {\n object,\n string\n }\n },\n ital: {\n color: {\n string\n },\n size: {\n number\n },\n // px\n face: {\n string\n },\n mod: {\n string\n },\n vadjust: {\n number\n },\n __type__: {\n object,\n string\n }\n },\n mono: {\n color: {\n string\n },\n size: {\n number\n },\n // px\n face: {\n string\n },\n mod: {\n string\n },\n vadjust: {\n number\n },\n __type__: {\n object,\n string\n }\n },\n __type__: {\n object,\n string\n }\n },\n hidden: {\n boolean: bool\n },\n hoverWidth: {\n function: \"function\",\n number\n },\n label: {\n string,\n undefined: \"undefined\"\n },\n labelHighlightBold: {\n boolean: bool\n },\n length: {\n number,\n undefined: \"undefined\"\n },\n physics: {\n boolean: bool\n },\n scaling: {\n min: {\n number\n },\n max: {\n number\n },\n label: {\n enabled: {\n boolean: bool\n },\n min: {\n number\n },\n max: {\n number\n },\n maxVisible: {\n number\n },\n drawThreshold: {\n number\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n customScalingFunction: {\n function: \"function\"\n },\n __type__: {\n object\n }\n },\n selectionWidth: {\n function: \"function\",\n number\n },\n selfReferenceSize: {\n number\n },\n selfReference: {\n size: {\n number\n },\n angle: {\n number\n },\n renderBehindTheNode: {\n boolean: bool\n },\n __type__: {\n object\n }\n },\n shadow: {\n enabled: {\n boolean: bool\n },\n color: {\n string\n },\n size: {\n number\n },\n x: {\n number\n },\n y: {\n number\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n smooth: {\n enabled: {\n boolean: bool\n },\n type: {\n string: [\"dynamic\", \"continuous\", \"discrete\", \"diagonalCross\", \"straightCross\", \"horizontal\", \"vertical\", \"curvedCW\", \"curvedCCW\", \"cubicBezier\"]\n },\n roundness: {\n number\n },\n forceDirection: {\n string: [\"horizontal\", \"vertical\", \"none\"],\n boolean: bool\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n title: {\n string,\n undefined: \"undefined\"\n },\n width: {\n number\n },\n widthConstraint: {\n maximum: {\n number\n },\n __type__: {\n object,\n boolean: bool,\n number\n }\n },\n value: {\n number,\n undefined: \"undefined\"\n },\n __type__: {\n object\n }\n },\n groups: {\n useDefaultGroups: {\n boolean: bool\n },\n __any__: nodeOptions,\n __type__: {\n object\n }\n },\n interaction: {\n dragNodes: {\n boolean: bool\n },\n dragView: {\n boolean: bool\n },\n hideEdgesOnDrag: {\n boolean: bool\n },\n hideEdgesOnZoom: {\n boolean: bool\n },\n hideNodesOnDrag: {\n boolean: bool\n },\n hover: {\n boolean: bool\n },\n keyboard: {\n enabled: {\n boolean: bool\n },\n speed: {\n x: {\n number\n },\n y: {\n number\n },\n zoom: {\n number\n },\n __type__: {\n object\n }\n },\n bindToWindow: {\n boolean: bool\n },\n autoFocus: {\n boolean: bool\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n multiselect: {\n boolean: bool\n },\n navigationButtons: {\n boolean: bool\n },\n selectable: {\n boolean: bool\n },\n selectConnectedEdges: {\n boolean: bool\n },\n hoverConnectedEdges: {\n boolean: bool\n },\n tooltipDelay: {\n number\n },\n zoomView: {\n boolean: bool\n },\n zoomSpeed: {\n number\n },\n __type__: {\n object\n }\n },\n layout: {\n randomSeed: {\n undefined: \"undefined\",\n number,\n string\n },\n improvedLayout: {\n boolean: bool\n },\n clusterThreshold: {\n number\n },\n hierarchical: {\n enabled: {\n boolean: bool\n },\n levelSeparation: {\n number\n },\n nodeSpacing: {\n number\n },\n treeSpacing: {\n number\n },\n blockShifting: {\n boolean: bool\n },\n edgeMinimization: {\n boolean: bool\n },\n parentCentralization: {\n boolean: bool\n },\n direction: {\n string: [\"UD\", \"DU\", \"LR\", \"RL\"]\n },\n // UD, DU, LR, RL\n sortMethod: {\n string: [\"hubsize\", \"directed\"]\n },\n // hubsize, directed\n shakeTowards: {\n string: [\"leaves\", \"roots\"]\n },\n // leaves, roots\n __type__: {\n object,\n boolean: bool\n }\n },\n __type__: {\n object\n }\n },\n manipulation: {\n enabled: {\n boolean: bool\n },\n initiallyActive: {\n boolean: bool\n },\n addNode: {\n boolean: bool,\n function: \"function\"\n },\n addEdge: {\n boolean: bool,\n function: \"function\"\n },\n editNode: {\n function: \"function\"\n },\n editEdge: {\n editWithoutDrag: {\n function: \"function\"\n },\n __type__: {\n object,\n boolean: bool,\n function: \"function\"\n }\n },\n deleteNode: {\n boolean: bool,\n function: \"function\"\n },\n deleteEdge: {\n boolean: bool,\n function: \"function\"\n },\n controlNodeStyle: nodeOptions,\n __type__: {\n object,\n boolean: bool\n }\n },\n nodes: nodeOptions,\n physics: {\n enabled: {\n boolean: bool\n },\n barnesHut: {\n theta: {\n number\n },\n gravitationalConstant: {\n number\n },\n centralGravity: {\n number\n },\n springLength: {\n number\n },\n springConstant: {\n number\n },\n damping: {\n number\n },\n avoidOverlap: {\n number\n },\n __type__: {\n object\n }\n },\n forceAtlas2Based: {\n theta: {\n number\n },\n gravitationalConstant: {\n number\n },\n centralGravity: {\n number\n },\n springLength: {\n number\n },\n springConstant: {\n number\n },\n damping: {\n number\n },\n avoidOverlap: {\n number\n },\n __type__: {\n object\n }\n },\n repulsion: {\n centralGravity: {\n number\n },\n springLength: {\n number\n },\n springConstant: {\n number\n },\n nodeDistance: {\n number\n },\n damping: {\n number\n },\n __type__: {\n object\n }\n },\n hierarchicalRepulsion: {\n centralGravity: {\n number\n },\n springLength: {\n number\n },\n springConstant: {\n number\n },\n nodeDistance: {\n number\n },\n damping: {\n number\n },\n avoidOverlap: {\n number\n },\n __type__: {\n object\n }\n },\n maxVelocity: {\n number\n },\n minVelocity: {\n number\n },\n // px/s\n solver: {\n string: [\"barnesHut\", \"repulsion\", \"hierarchicalRepulsion\", \"forceAtlas2Based\"]\n },\n stabilization: {\n enabled: {\n boolean: bool\n },\n iterations: {\n number\n },\n // maximum number of iteration to stabilize\n updateInterval: {\n number\n },\n onlyDynamicEdges: {\n boolean: bool\n },\n fit: {\n boolean: bool\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n timestep: {\n number\n },\n adaptiveTimestep: {\n boolean: bool\n },\n wind: {\n x: {\n number\n },\n y: {\n number\n },\n __type__: {\n object\n }\n },\n __type__: {\n object,\n boolean: bool\n }\n },\n //globals :\n autoResize: {\n boolean: bool\n },\n clickToUse: {\n boolean: bool\n },\n locale: {\n string\n },\n locales: {\n __any__: {\n any\n },\n __type__: {\n object\n }\n },\n height: {\n string\n },\n width: {\n string\n },\n __type__: {\n object\n }\n};\n/* eslint-enable @typescript-eslint/naming-convention */\n/**\n * This provides ranges, initial values, steps and dropdown menu choices for the\n * configuration.\n * @remarks\n * Checkbox: `boolean`\n * The value supllied will be used as the initial value.\n *\n * Text field: `string`\n * The passed text will be used as the initial value. Any text will be\n * accepted afterwards.\n *\n * Number range: `[number, number, number, number]`\n * The meanings are `[initial value, min, max, step]`.\n *\n * Dropdown: `[Exclude<string, \"color\">, ...(string | number | boolean)[]]`\n * Translations for people with poor understanding of TypeScript: the first\n * value always has to be a string but never `\"color\"`, the rest can be any\n * combination of strings, numbers and booleans.\n *\n * Color picker: `[\"color\", string]`\n * The first value says this will be a color picker not a dropdown menu. The\n * next value is the initial color.\n */\nconst configureOptions = {\n nodes: {\n borderWidth: [1, 0, 10, 1],\n borderWidthSelected: [2, 0, 10, 1],\n color: {\n border: [\"color\", \"#2B7CE9\"],\n background: [\"color\", \"#97C2FC\"],\n highlight: {\n border: [\"color\", \"#2B7CE9\"],\n background: [\"color\", \"#D2E5FF\"]\n },\n hover: {\n border: [\"color\", \"#2B7CE9\"],\n background: [\"color\", \"#D2E5FF\"]\n }\n },\n opacity: [0, 0, 1, 0.1],\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: [\"color\", \"#343434\"],\n size: [14, 0, 100, 1],\n // px\n face: [\"arial\", \"verdana\", \"tahoma\"],\n background: [\"color\", \"none\"],\n strokeWidth: [0, 0, 50, 1],\n // px\n strokeColor: [\"color\", \"#ffffff\"]\n },\n //group: 'string',\n hidden: false,\n labelHighlightBold: true,\n //icon: {\n // face: 'string', //'FontAwesome',\n // code: 'string', //'\\uf007',\n // size: [50, 0, 200, 1], //50,\n // color: ['color','#2B7CE9'] //'#aa00ff'\n //},\n //image: 'string', // --> URL\n physics: true,\n scaling: {\n min: [10, 0, 200, 1],\n max: [30, 0, 200, 1],\n label: {\n enabled: false,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n shadow: {\n enabled: false,\n color: \"rgba(0,0,0,0.5)\",\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n shape: [\"ellipse\", \"box\", \"circle\", \"database\", \"diamond\", \"dot\", \"square\", \"star\", \"text\", \"triangle\", \"triangleDown\", \"hexagon\"],\n shapeProperties: {\n borderDashes: false,\n borderRadius: [6, 0, 20, 1],\n interpolation: true,\n useImageSize: false\n },\n size: [25, 0, 200, 1]\n },\n edges: {\n arrows: {\n to: {\n enabled: false,\n scaleFactor: [1, 0, 3, 0.05],\n type: \"arrow\"\n },\n middle: {\n enabled: false,\n scaleFactor: [1, 0, 3, 0.05],\n type: \"arrow\"\n },\n from: {\n enabled: false,\n scaleFactor: [1, 0, 3, 0.05],\n type: \"arrow\"\n }\n },\n endPointOffset: {\n from: [0, -10, 10, 1],\n to: [0, -10, 10, 1]\n },\n arrowStrikethrough: true,\n color: {\n color: [\"color\", \"#848484\"],\n highlight: [\"color\", \"#848484\"],\n hover: [\"color\", \"#848484\"],\n inherit: [\"from\", \"to\", \"both\", true, false],\n opacity: [1, 0, 1, 0.05]\n },\n dashes: false,\n font: {\n color: [\"color\", \"#343434\"],\n size: [14, 0, 100, 1],\n // px\n face: [\"arial\", \"verdana\", \"tahoma\"],\n background: [\"color\", \"none\"],\n strokeWidth: [2, 0, 50, 1],\n // px\n strokeColor: [\"color\", \"#ffffff\"],\n align: [\"horizontal\", \"top\", \"middle\", \"bottom\"]\n },\n hidden: false,\n hoverWidth: [1.5, 0, 5, 0.1],\n labelHighlightBold: true,\n physics: true,\n scaling: {\n min: [1, 0, 100, 1],\n max: [15, 0, 100, 1],\n label: {\n enabled: true,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n selectionWidth: [1.5, 0, 5, 0.1],\n selfReferenceSize: [20, 0, 200, 1],\n selfReference: {\n size: [20, 0, 200, 1],\n angle: [Math.PI / 2, -6 * Math.PI, 6 * Math.PI, Math.PI / 8],\n renderBehindTheNode: true\n },\n shadow: {\n enabled: false,\n color: \"rgba(0,0,0,0.5)\",\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n smooth: {\n enabled: true,\n type: [\"dynamic\", \"continuous\", \"discrete\", \"diagonalCross\", \"straightCross\", \"horizontal\", \"vertical\", \"curvedCW\", \"curvedCCW\", \"cubicBezier\"],\n forceDirection: [\"horizontal\", \"vertical\", \"none\"],\n roundness: [0.5, 0, 1, 0.05]\n },\n width: [1, 0, 30, 1]\n },\n layout: {\n //randomSeed: [0, 0, 500, 1],\n //improvedLayout: true,\n hierarchical: {\n enabled: false,\n levelSeparation: [150, 20, 500, 5],\n nodeSpacing: [100, 20, 500, 5],\n treeSpacing: [200, 20, 500, 5],\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: [\"UD\", \"DU\", \"LR\", \"RL\"],\n // UD, DU, LR, RL\n sortMethod: [\"hubsize\", \"directed\"],\n // hubsize, directed\n shakeTowards: [\"leaves\", \"roots\"] // leaves, roots\n }\n },\n interaction: {\n dragNodes: true,\n dragView: true,\n hideEdgesOnDrag: false,\n hideEdgesOnZoom: false,\n hideNodesOnDrag: false,\n hover: false,\n keyboard: {\n enabled: false,\n speed: {\n x: [10, 0, 40, 1],\n y: [10, 0, 40, 1],\n zoom: [0.02, 0, 0.1, 0.005]\n },\n bindToWindow: true,\n autoFocus: true\n },\n multiselect: false,\n navigationButtons: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true,\n tooltipDelay: [300, 0, 1000, 25],\n zoomView: true,\n zoomSpeed: [1, 0.1, 2, 0.1]\n },\n manipulation: {\n enabled: false,\n initiallyActive: false\n },\n physics: {\n enabled: true,\n barnesHut: {\n theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-2e3, -3e4, 0, 50],\n centralGravity: [0.3, 0, 10, 0.05],\n springLength: [95, 0, 500, 5],\n springConstant: [0.04, 0, 1.2, 0.005],\n damping: [0.09, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n forceAtlas2Based: {\n theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-50, -500, 0, 1],\n centralGravity: [0.01, 0, 1, 0.005],\n springLength: [95, 0, 500, 5],\n springConstant: [0.08, 0, 1.2, 0.005],\n damping: [0.4, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n repulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [200, 0, 500, 5],\n springConstant: [0.05, 0, 1.2, 0.005],\n nodeDistance: [100, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01]\n },\n hierarchicalRepulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [100, 0, 500, 5],\n springConstant: [0.01, 0, 1.2, 0.005],\n nodeDistance: [120, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n maxVelocity: [50, 0, 150, 1],\n minVelocity: [0.1, 0.01, 0.5, 0.01],\n solver: [\"barnesHut\", \"forceAtlas2Based\", \"repulsion\", \"hierarchicalRepulsion\"],\n timestep: [0.5, 0.01, 1, 0.01],\n wind: {\n x: [0, -10, 10, 0.1],\n y: [0, -10, 10, 0.1]\n }\n //adaptiveTimestep: true\n }\n};\nconst configuratorHideOption = (parentPath, optionName, options) => {\n var _context;\n if (_includesInstanceProperty(parentPath).call(parentPath, \"physics\") && _includesInstanceProperty(_context = configureOptions.physics.solver).call(_context, optionName) && options.physics.solver !== optionName && optionName !== \"wind\") {\n return true;\n }\n return false;\n};\n\nvar options = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tallOptions: allOptions,\n\tconfiguratorHideOption: configuratorHideOption,\n\tconfigureOptions: configureOptions\n});\n\n/**\n * The Floyd–Warshall algorithm is an algorithm for finding shortest paths in\n * a weighted graph with positive or negative edge weights (but with no negative\n * cycles). - https://en.wikipedia.org/wiki/Floyd–Warshall_algorithm\n */\nclass FloydWarshall {\n /**\n * @ignore\n */\n constructor() {}\n\n /**\n *\n * @param {object} body\n * @param {Array.<Node>} nodesArray\n * @param {Array.<Edge>} edgesArray\n * @returns {{}}\n */\n getDistances(body, nodesArray, edgesArray) {\n const D_matrix = {};\n const edges = body.edges;\n\n // prepare matrix with large numbers\n for (let i = 0; i < nodesArray.length; i++) {\n const node = nodesArray[i];\n const cell = {};\n D_matrix[node] = cell;\n for (let j = 0; j < nodesArray.length; j++) {\n cell[nodesArray[j]] = i == j ? 0 : 1e9;\n }\n }\n\n // put the weights for the edges in. This assumes unidirectionality.\n for (let i = 0; i < edgesArray.length; i++) {\n const edge = edges[edgesArray[i]];\n // edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix\n if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) {\n D_matrix[edge.fromId][edge.toId] = 1;\n D_matrix[edge.toId][edge.fromId] = 1;\n }\n }\n const nodeCount = nodesArray.length;\n\n // Adapted FloydWarshall based on unidirectionality to greatly reduce complexity.\n for (let k = 0; k < nodeCount; k++) {\n const knode = nodesArray[k];\n const kcolm = D_matrix[knode];\n for (let i = 0; i < nodeCount - 1; i++) {\n const inode = nodesArray[i];\n const icolm = D_matrix[inode];\n for (let j = i + 1; j < nodeCount; j++) {\n const jnode = nodesArray[j];\n const jcolm = D_matrix[jnode];\n const val = Math.min(icolm[jnode], icolm[knode] + kcolm[jnode]);\n icolm[jnode] = val;\n jcolm[inode] = val;\n }\n }\n }\n return D_matrix;\n }\n}\n\n// distance finding algorithm\n\n/**\n * KamadaKawai positions the nodes initially based on\n *\n * \"AN ALGORITHM FOR DRAWING GENERAL UNDIRECTED GRAPHS\"\n * -- Tomihisa KAMADA and Satoru KAWAI in 1989\n *\n * Possible optimizations in the distance calculation can be implemented.\n */\nclass KamadaKawai {\n /**\n * @param {object} body\n * @param {number} edgeLength\n * @param {number} edgeStrength\n */\n constructor(body, edgeLength, edgeStrength) {\n this.body = body;\n this.springLength = edgeLength;\n this.springConstant = edgeStrength;\n this.distanceSolver = new FloydWarshall();\n }\n\n /**\n * Not sure if needed but can be used to update the spring length and spring constant\n * @param {object} options\n */\n setOptions(options) {\n if (options) {\n if (options.springLength) {\n this.springLength = options.springLength;\n }\n if (options.springConstant) {\n this.springConstant = options.springConstant;\n }\n }\n }\n\n /**\n * Position the system\n * @param {Array.<Node>} nodesArray\n * @param {Array.<vis.Edge>} edgesArray\n * @param {boolean} [ignoreClusters]\n */\n solve(nodesArray, edgesArray) {\n let ignoreClusters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n // get distance matrix\n const D_matrix = this.distanceSolver.getDistances(this.body, nodesArray, edgesArray); // distance matrix\n\n // get the L Matrix\n this._createL_matrix(D_matrix);\n\n // get the K Matrix\n this._createK_matrix(D_matrix);\n\n // initial E Matrix\n this._createE_matrix();\n\n // calculate positions\n const threshold = 0.01;\n const innerThreshold = 1;\n let iterations = 0;\n const maxIterations = Math.max(1000, Math.min(10 * this.body.nodeIndices.length, 6000));\n const maxInnerIterations = 5;\n let maxEnergy = 1e9;\n let highE_nodeId = 0,\n dE_dx = 0,\n dE_dy = 0,\n delta_m = 0,\n subIterations = 0;\n while (maxEnergy > threshold && iterations < maxIterations) {\n iterations += 1;\n [highE_nodeId, maxEnergy, dE_dx, dE_dy] = this._getHighestEnergyNode(ignoreClusters);\n delta_m = maxEnergy;\n subIterations = 0;\n while (delta_m > innerThreshold && subIterations < maxInnerIterations) {\n subIterations += 1;\n this._moveNode(highE_nodeId, dE_dx, dE_dy);\n [delta_m, dE_dx, dE_dy] = this._getEnergy(highE_nodeId);\n }\n }\n }\n\n /**\n * get the node with the highest energy\n * @param {boolean} ignoreClusters\n * @returns {number[]}\n * @private\n */\n _getHighestEnergyNode(ignoreClusters) {\n const nodesArray = this.body.nodeIndices;\n const nodes = this.body.nodes;\n let maxEnergy = 0;\n let maxEnergyNodeId = nodesArray[0];\n let dE_dx_max = 0,\n dE_dy_max = 0;\n for (let nodeIdx = 0; nodeIdx < nodesArray.length; nodeIdx++) {\n const m = nodesArray[nodeIdx];\n // by not evaluating nodes with predefined positions we should only move nodes that have no positions.\n if (nodes[m].predefinedPosition !== true || nodes[m].isCluster === true && ignoreClusters === true || nodes[m].options.fixed.x !== true || nodes[m].options.fixed.y !== true) {\n const [delta_m, dE_dx, dE_dy] = this._getEnergy(m);\n if (maxEnergy < delta_m) {\n maxEnergy = delta_m;\n maxEnergyNodeId = m;\n dE_dx_max = dE_dx;\n dE_dy_max = dE_dy;\n }\n }\n }\n return [maxEnergyNodeId, maxEnergy, dE_dx_max, dE_dy_max];\n }\n\n /**\n * calculate the energy of a single node\n * @param {Node.id} m\n * @returns {number[]}\n * @private\n */\n _getEnergy(m) {\n const [dE_dx, dE_dy] = this.E_sums[m];\n const delta_m = Math.sqrt(dE_dx ** 2 + dE_dy ** 2);\n return [delta_m, dE_dx, dE_dy];\n }\n\n /**\n * move the node based on it's energy\n * the dx and dy are calculated from the linear system proposed by Kamada and Kawai\n * @param {number} m\n * @param {number} dE_dx\n * @param {number} dE_dy\n * @private\n */\n _moveNode(m, dE_dx, dE_dy) {\n const nodesArray = this.body.nodeIndices;\n const nodes = this.body.nodes;\n let d2E_dx2 = 0;\n let d2E_dxdy = 0;\n let d2E_dy2 = 0;\n const x_m = nodes[m].x;\n const y_m = nodes[m].y;\n const km = this.K_matrix[m];\n const lm = this.L_matrix[m];\n for (let iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n const i = nodesArray[iIdx];\n if (i !== m) {\n const x_i = nodes[i].x;\n const y_i = nodes[i].y;\n const kmat = km[i];\n const lmat = lm[i];\n const denominator = 1.0 / ((x_m - x_i) ** 2 + (y_m - y_i) ** 2) ** 1.5;\n d2E_dx2 += kmat * (1 - lmat * (y_m - y_i) ** 2 * denominator);\n d2E_dxdy += kmat * (lmat * (x_m - x_i) * (y_m - y_i) * denominator);\n d2E_dy2 += kmat * (1 - lmat * (x_m - x_i) ** 2 * denominator);\n }\n }\n // make the variable names easier to make the solving of the linear system easier to read\n const A = d2E_dx2,\n B = d2E_dxdy,\n C = dE_dx,\n D = d2E_dy2,\n E = dE_dy;\n\n // solve the linear system for dx and dy\n const dy = (C / A + E / B) / (B / A - D / B);\n const dx = -(B * dy + C) / A;\n\n // move the node\n nodes[m].x += dx;\n nodes[m].y += dy;\n\n // Recalculate E_matrix (should be incremental)\n this._updateE_matrix(m);\n }\n\n /**\n * Create the L matrix: edge length times shortest path\n * @param {object} D_matrix\n * @private\n */\n _createL_matrix(D_matrix) {\n const nodesArray = this.body.nodeIndices;\n const edgeLength = this.springLength;\n this.L_matrix = [];\n for (let i = 0; i < nodesArray.length; i++) {\n this.L_matrix[nodesArray[i]] = {};\n for (let j = 0; j < nodesArray.length; j++) {\n this.L_matrix[nodesArray[i]][nodesArray[j]] = edgeLength * D_matrix[nodesArray[i]][nodesArray[j]];\n }\n }\n }\n\n /**\n * Create the K matrix: spring constants times shortest path\n * @param {object} D_matrix\n * @private\n */\n _createK_matrix(D_matrix) {\n const nodesArray = this.body.nodeIndices;\n const edgeStrength = this.springConstant;\n this.K_matrix = [];\n for (let i = 0; i < nodesArray.length; i++) {\n this.K_matrix[nodesArray[i]] = {};\n for (let j = 0; j < nodesArray.length; j++) {\n this.K_matrix[nodesArray[i]][nodesArray[j]] = edgeStrength * D_matrix[nodesArray[i]][nodesArray[j]] ** -2;\n }\n }\n }\n\n /**\n * Create matrix with all energies between nodes\n * @private\n */\n _createE_matrix() {\n const nodesArray = this.body.nodeIndices;\n const nodes = this.body.nodes;\n this.E_matrix = {};\n this.E_sums = {};\n for (let mIdx = 0; mIdx < nodesArray.length; mIdx++) {\n this.E_matrix[nodesArray[mIdx]] = [];\n }\n for (let mIdx = 0; mIdx < nodesArray.length; mIdx++) {\n const m = nodesArray[mIdx];\n const x_m = nodes[m].x;\n const y_m = nodes[m].y;\n let dE_dx = 0;\n let dE_dy = 0;\n for (let iIdx = mIdx; iIdx < nodesArray.length; iIdx++) {\n const i = nodesArray[iIdx];\n if (i !== m) {\n const x_i = nodes[i].x;\n const y_i = nodes[i].y;\n const denominator = 1.0 / Math.sqrt((x_m - x_i) ** 2 + (y_m - y_i) ** 2);\n this.E_matrix[m][iIdx] = [this.K_matrix[m][i] * (x_m - x_i - this.L_matrix[m][i] * (x_m - x_i) * denominator), this.K_matrix[m][i] * (y_m - y_i - this.L_matrix[m][i] * (y_m - y_i) * denominator)];\n this.E_matrix[i][mIdx] = this.E_matrix[m][iIdx];\n dE_dx += this.E_matrix[m][iIdx][0];\n dE_dy += this.E_matrix[m][iIdx][1];\n }\n }\n //Store sum\n this.E_sums[m] = [dE_dx, dE_dy];\n }\n }\n\n /**\n * Update method, just doing single column (rows are auto-updated) (update all sums)\n * @param {number} m\n * @private\n */\n _updateE_matrix(m) {\n const nodesArray = this.body.nodeIndices;\n const nodes = this.body.nodes;\n const colm = this.E_matrix[m];\n const kcolm = this.K_matrix[m];\n const lcolm = this.L_matrix[m];\n const x_m = nodes[m].x;\n const y_m = nodes[m].y;\n let dE_dx = 0;\n let dE_dy = 0;\n for (let iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n const i = nodesArray[iIdx];\n if (i !== m) {\n //Keep old energy value for sum modification below\n const cell = colm[iIdx];\n const oldDx = cell[0];\n const oldDy = cell[1];\n\n //Calc new energy:\n const x_i = nodes[i].x;\n const y_i = nodes[i].y;\n const denominator = 1.0 / Math.sqrt((x_m - x_i) ** 2 + (y_m - y_i) ** 2);\n const dx = kcolm[i] * (x_m - x_i - lcolm[i] * (x_m - x_i) * denominator);\n const dy = kcolm[i] * (y_m - y_i - lcolm[i] * (y_m - y_i) * denominator);\n colm[iIdx] = [dx, dy];\n dE_dx += dx;\n dE_dy += dy;\n\n //add new energy to sum of each column\n const sum = this.E_sums[i];\n sum[0] += dx - oldDx;\n sum[1] += dy - oldDy;\n }\n }\n //Store sum at -1 index\n this.E_sums[m] = [dE_dx, dE_dy];\n }\n}\n\n/**\n * Create a network visualization, displaying nodes and edges.\n * @param {Element} container The DOM element in which the Network will\n * be created. Normally a div element.\n * @param {object} data An object containing parameters\n * {Array} nodes\n * {Array} edges\n * @param {object} options Options\n * @class Network\n */\nfunction Network(container, data, options) {\n var _context, _context2, _context3, _context4;\n if (!(this instanceof Network)) {\n throw new SyntaxError(\"Constructor must be called with the new operator\");\n }\n\n // set constant values\n this.options = {};\n this.defaultOptions = {\n locale: \"en\",\n locales: locales,\n clickToUse: false\n };\n _Object$assign(this.options, this.defaultOptions);\n\n /**\n * Containers for nodes and edges.\n *\n * 'edges' and 'nodes' contain the full definitions of all the network elements.\n * 'nodeIndices' and 'edgeIndices' contain the id's of the active elements.\n *\n * The distinction is important, because a defined node need not be active, i.e.\n * visible on the canvas. This happens in particular when clusters are defined, in\n * that case there will be nodes and edges not displayed.\n * The bottom line is that all code with actions related to visibility, *must* use\n * 'nodeIndices' and 'edgeIndices', not 'nodes' and 'edges' directly.\n */\n this.body = {\n container: container,\n // See comment above for following fields\n nodes: {},\n nodeIndices: [],\n edges: {},\n edgeIndices: [],\n emitter: {\n on: _bindInstanceProperty(_context = this.on).call(_context, this),\n off: _bindInstanceProperty(_context2 = this.off).call(_context2, this),\n emit: _bindInstanceProperty(_context3 = this.emit).call(_context3, this),\n once: _bindInstanceProperty(_context4 = this.once).call(_context4, this)\n },\n eventListeners: {\n onTap: function () {},\n onTouch: function () {},\n onDoubleTap: function () {},\n onHold: function () {},\n onDragStart: function () {},\n onDrag: function () {},\n onDragEnd: function () {},\n onMouseWheel: function () {},\n onPinch: function () {},\n onMouseMove: function () {},\n onRelease: function () {},\n onContext: function () {}\n },\n data: {\n nodes: null,\n // A DataSet or DataView\n edges: null // A DataSet or DataView\n },\n functions: {\n createNode: function () {},\n createEdge: function () {},\n getPointer: function () {}\n },\n modules: {},\n view: {\n scale: 1,\n translation: {\n x: 0,\n y: 0\n }\n },\n selectionBox: {\n show: false,\n position: {\n start: {\n x: 0,\n y: 0\n },\n end: {\n x: 0,\n y: 0\n }\n }\n }\n };\n\n // bind the event listeners\n this.bindEventListeners();\n\n // setting up all modules\n this.images = new Images(() => this.body.emitter.emit(\"_requestRedraw\")); // object with images\n this.groups = new Groups(); // object with groups\n this.canvas = new Canvas(this.body); // DOM handler\n this.selectionHandler = new SelectionHandler(this.body, this.canvas); // Selection handler\n this.interactionHandler = new InteractionHandler(this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key\n this.view = new View(this.body, this.canvas); // camera handler, does animations and zooms\n this.renderer = new CanvasRenderer(this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into\n this.physics = new PhysicsEngine(this.body); // physics engine, does all the simulations\n this.layoutEngine = new LayoutEngine(this.body); // layout engine for inital layout and hierarchical layout\n this.clustering = new ClusterEngine(this.body); // clustering api\n this.manipulation = new ManipulationSystem(this.body, this.canvas, this.selectionHandler, this.interactionHandler); // data manipulation system\n\n this.nodesHandler = new NodesHandler(this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options\n this.edgesHandler = new EdgesHandler(this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options\n\n this.body.modules[\"kamadaKawai\"] = new KamadaKawai(this.body, 150, 0.05); // Layouting algorithm.\n this.body.modules[\"clustering\"] = this.clustering;\n\n // create the DOM elements\n this.canvas._create();\n\n // apply options\n this.setOptions(options);\n\n // load data (the disable start variable will be the same as the enabled clustering)\n this.setData(data);\n}\n\n// Extend Network with an Emitter mixin\nEmitter(Network.prototype);\n\n/**\n * Set options\n * @param {object} options\n */\nNetwork.prototype.setOptions = function (options) {\n if (options === null) {\n options = undefined; // This ensures that options handling doesn't crash in the handling\n }\n if (options !== undefined) {\n const errorFound = Validator.validate(options, allOptions);\n if (errorFound === true) {\n console.error(\"%cErrors have been found in the supplied options object.\", VALIDATOR_PRINT_STYLE);\n }\n\n // copy the global fields over\n const fields = [\"locale\", \"locales\", \"clickToUse\"];\n selectiveDeepExtend(fields, this.options, options);\n\n // normalize the locale or use English\n if (options.locale !== undefined) {\n options.locale = normalizeLanguageCode(options.locales || this.options.locales, options.locale);\n }\n\n // the hierarchical system can adapt the edges and the physics to it's own options because not all combinations work with the hierarichical system.\n options = this.layoutEngine.setOptions(options.layout, options);\n this.canvas.setOptions(options); // options for canvas are in globals\n\n // pass the options to the modules\n this.groups.setOptions(options.groups);\n this.nodesHandler.setOptions(options.nodes);\n this.edgesHandler.setOptions(options.edges);\n this.physics.setOptions(options.physics);\n this.manipulation.setOptions(options.manipulation, options, this.options); // manipulation uses the locales in the globals\n\n this.interactionHandler.setOptions(options.interaction);\n this.renderer.setOptions(options.interaction); // options for rendering are in interaction\n this.selectionHandler.setOptions(options.interaction); // options for selection are in interaction\n\n // reload the settings of the nodes to apply changes in groups that are not referenced by pointer.\n if (options.groups !== undefined) {\n this.body.emitter.emit(\"refreshNodes\");\n }\n // these two do not have options at the moment, here for completeness\n //this.view.setOptions(options.view);\n //this.clustering.setOptions(options.clustering);\n\n if (\"configure\" in options) {\n if (!this.configurator) {\n this.configurator = new Configurator(this, this.body.container, configureOptions, this.canvas.pixelRatio, configuratorHideOption);\n }\n this.configurator.setOptions(options.configure);\n }\n\n // if the configuration system is enabled, copy all options and put them into the config system\n if (this.configurator && this.configurator.options.enabled === true) {\n const networkOptions = {\n nodes: {},\n edges: {},\n layout: {},\n interaction: {},\n manipulation: {},\n physics: {},\n global: {}\n };\n deepExtend(networkOptions.nodes, this.nodesHandler.options);\n deepExtend(networkOptions.edges, this.edgesHandler.options);\n deepExtend(networkOptions.layout, this.layoutEngine.options);\n // load the selectionHandler and render default options in to the interaction group\n deepExtend(networkOptions.interaction, this.selectionHandler.options);\n deepExtend(networkOptions.interaction, this.renderer.options);\n deepExtend(networkOptions.interaction, this.interactionHandler.options);\n deepExtend(networkOptions.manipulation, this.manipulation.options);\n deepExtend(networkOptions.physics, this.physics.options);\n\n // load globals into the global object\n deepExtend(networkOptions.global, this.canvas.options);\n deepExtend(networkOptions.global, this.options);\n this.configurator.setModuleOptions(networkOptions);\n }\n\n // handle network global options\n if (options.clickToUse !== undefined) {\n if (options.clickToUse === true) {\n if (this.activator === undefined) {\n this.activator = new Activator(this.canvas.frame);\n this.activator.on(\"change\", () => {\n this.body.emitter.emit(\"activate\");\n });\n }\n } else {\n if (this.activator !== undefined) {\n this.activator.destroy();\n delete this.activator;\n }\n this.body.emitter.emit(\"activate\");\n }\n } else {\n this.body.emitter.emit(\"activate\");\n }\n this.canvas.setSize();\n // start the physics simulation. Can be safely called multiple times.\n this.body.emitter.emit(\"startSimulation\");\n }\n};\n\n/**\n * Update the visible nodes and edges list with the most recent node state.\n *\n * Visible nodes are stored in this.body.nodeIndices.\n * Visible edges are stored in this.body.edgeIndices.\n * A node or edges is visible if it is not hidden or clustered.\n * @private\n */\nNetwork.prototype._updateVisibleIndices = function () {\n const nodes = this.body.nodes;\n const edges = this.body.edges;\n this.body.nodeIndices = [];\n this.body.edgeIndices = [];\n for (const nodeId in nodes) {\n if (Object.prototype.hasOwnProperty.call(nodes, nodeId)) {\n if (!this.clustering._isClusteredNode(nodeId) && nodes[nodeId].options.hidden === false) {\n this.body.nodeIndices.push(nodes[nodeId].id);\n }\n }\n }\n for (const edgeId in edges) {\n if (Object.prototype.hasOwnProperty.call(edges, edgeId)) {\n const edge = edges[edgeId];\n\n // It can happen that this is executed *after* a node edge has been removed,\n // but *before* the edge itself has been removed. Taking this into account.\n const fromNode = nodes[edge.fromId];\n const toNode = nodes[edge.toId];\n const edgeNodesPresent = fromNode !== undefined && toNode !== undefined;\n const isVisible = !this.clustering._isClusteredEdge(edgeId) && edge.options.hidden === false && edgeNodesPresent && fromNode.options.hidden === false &&\n // Also hidden if any of its connecting nodes are hidden\n toNode.options.hidden === false; // idem\n\n if (isVisible) {\n this.body.edgeIndices.push(edge.id);\n }\n }\n }\n};\n\n/**\n * Bind all events\n */\nNetwork.prototype.bindEventListeners = function () {\n // This event will trigger a rebuilding of the cache everything.\n // Used when nodes or edges have been added or removed.\n this.body.emitter.on(\"_dataChanged\", () => {\n this.edgesHandler._updateState();\n this.body.emitter.emit(\"_dataUpdated\");\n });\n\n // this is called when options of EXISTING nodes or edges have changed.\n this.body.emitter.on(\"_dataUpdated\", () => {\n // Order important in following block\n this.clustering._updateState();\n this._updateVisibleIndices();\n this._updateValueRange(this.body.nodes);\n this._updateValueRange(this.body.edges);\n // start simulation (can be called safely, even if already running)\n this.body.emitter.emit(\"startSimulation\");\n this.body.emitter.emit(\"_requestRedraw\");\n });\n};\n\n/**\n * Set nodes and edges, and optionally options as well.\n * @param {object} data Object containing parameters:\n * {Array | DataSet | DataView} [nodes] Array with nodes\n * {Array | DataSet | DataView} [edges] Array with edges\n * {String} [dot] String containing data in DOT format\n * {String} [gephi] String containing data in gephi JSON format\n * {Options} [options] Object with options\n */\nNetwork.prototype.setData = function (data) {\n // reset the physics engine.\n this.body.emitter.emit(\"resetPhysics\");\n this.body.emitter.emit(\"_resetData\");\n\n // unselect all to ensure no selections from old data are carried over.\n this.selectionHandler.unselectAll();\n if (data && data.dot && (data.nodes || data.edges)) {\n throw new SyntaxError('Data must contain either parameter \"dot\" or ' + ' parameter pair \"nodes\" and \"edges\", but not both.');\n }\n\n // set options\n this.setOptions(data && data.options);\n // set all data\n if (data && data.dot) {\n console.warn(\"The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);\");\n // parse DOT file\n const dotData = DOTToGraph(data.dot);\n this.setData(dotData);\n return;\n } else if (data && data.gephi) {\n // parse DOT file\n console.warn(\"The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);\");\n const gephiData = parseGephi(data.gephi);\n this.setData(gephiData);\n return;\n } else {\n this.nodesHandler.setData(data && data.nodes, true);\n this.edgesHandler.setData(data && data.edges, true);\n }\n\n // emit change in data\n this.body.emitter.emit(\"_dataChanged\");\n\n // emit data loaded\n this.body.emitter.emit(\"_dataLoaded\");\n\n // find a stable position or start animating to a stable position\n this.body.emitter.emit(\"initPhysics\");\n};\n\n/**\n * Cleans up all bindings of the network, removing it fully from the memory IF the variable is set to null after calling this function.\n * var network = new vis.Network(..);\n * network.destroy();\n * network = null;\n */\nNetwork.prototype.destroy = function () {\n this.body.emitter.emit(\"destroy\");\n // clear events\n this.body.emitter.off();\n this.off();\n\n // delete modules\n delete this.groups;\n delete this.canvas;\n delete this.selectionHandler;\n delete this.interactionHandler;\n delete this.view;\n delete this.renderer;\n delete this.physics;\n delete this.layoutEngine;\n delete this.clustering;\n delete this.manipulation;\n delete this.nodesHandler;\n delete this.edgesHandler;\n delete this.configurator;\n delete this.images;\n for (const nodeId in this.body.nodes) {\n if (!Object.prototype.hasOwnProperty.call(this.body.nodes, nodeId)) continue;\n delete this.body.nodes[nodeId];\n }\n for (const edgeId in this.body.edges) {\n if (!Object.prototype.hasOwnProperty.call(this.body.edges, edgeId)) continue;\n delete this.body.edges[edgeId];\n }\n\n // remove the container and everything inside it recursively\n recursiveDOMDelete(this.body.container);\n};\n\n/**\n * Update the values of all object in the given array according to the current\n * value range of the objects in the array.\n * @param {object} obj An object containing a set of Edges or Nodes\n * The objects must have a method getValue() and\n * setValueRange(min, max).\n * @private\n */\nNetwork.prototype._updateValueRange = function (obj) {\n let id;\n\n // determine the range of the objects\n let valueMin = undefined;\n let valueMax = undefined;\n let valueTotal = 0;\n for (id in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, id)) {\n const value = obj[id].getValue();\n if (value !== undefined) {\n valueMin = valueMin === undefined ? value : Math.min(value, valueMin);\n valueMax = valueMax === undefined ? value : Math.max(value, valueMax);\n valueTotal += value;\n }\n }\n }\n\n // adjust the range of all objects\n if (valueMin !== undefined && valueMax !== undefined) {\n for (id in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, id)) {\n obj[id].setValueRange(valueMin, valueMax, valueTotal);\n }\n }\n }\n};\n\n/**\n * Returns true when the Network is active.\n * @returns {boolean}\n */\nNetwork.prototype.isActive = function () {\n return !this.activator || this.activator.active;\n};\nNetwork.prototype.setSize = function () {\n return this.canvas.setSize.apply(this.canvas, arguments);\n};\nNetwork.prototype.canvasToDOM = function () {\n return this.canvas.canvasToDOM.apply(this.canvas, arguments);\n};\nNetwork.prototype.DOMtoCanvas = function () {\n return this.canvas.DOMtoCanvas.apply(this.canvas, arguments);\n};\n\n/**\n * Nodes can be in clusters. Clusters can also be in clusters. This function returns and array of\n * nodeIds showing where the node is.\n *\n * If any nodeId in the chain, especially the first passed in as a parameter, is not present in\n * the current nodes list, an empty array is returned.\n *\n * Example:\n * cluster 'A' contains cluster 'B',\n * cluster 'B' contains cluster 'C',\n * cluster 'C' contains node 'fred'.\n * `jsnetwork.clustering.findNode('fred')` will return `['A','B','C','fred']`.\n * @param {string|number} nodeId\n * @returns {Array}\n */\nNetwork.prototype.findNode = function () {\n return this.clustering.findNode.apply(this.clustering, arguments);\n};\nNetwork.prototype.isCluster = function () {\n return this.clustering.isCluster.apply(this.clustering, arguments);\n};\nNetwork.prototype.openCluster = function () {\n return this.clustering.openCluster.apply(this.clustering, arguments);\n};\nNetwork.prototype.cluster = function () {\n return this.clustering.cluster.apply(this.clustering, arguments);\n};\nNetwork.prototype.getNodesInCluster = function () {\n return this.clustering.getNodesInCluster.apply(this.clustering, arguments);\n};\nNetwork.prototype.clusterByConnection = function () {\n return this.clustering.clusterByConnection.apply(this.clustering, arguments);\n};\nNetwork.prototype.clusterByHubsize = function () {\n return this.clustering.clusterByHubsize.apply(this.clustering, arguments);\n};\nNetwork.prototype.updateClusteredNode = function () {\n return this.clustering.updateClusteredNode.apply(this.clustering, arguments);\n};\nNetwork.prototype.getClusteredEdges = function () {\n return this.clustering.getClusteredEdges.apply(this.clustering, arguments);\n};\nNetwork.prototype.getBaseEdge = function () {\n return this.clustering.getBaseEdge.apply(this.clustering, arguments);\n};\nNetwork.prototype.getBaseEdges = function () {\n return this.clustering.getBaseEdges.apply(this.clustering, arguments);\n};\nNetwork.prototype.updateEdge = function () {\n return this.clustering.updateEdge.apply(this.clustering, arguments);\n};\n\n/**\n * This method will cluster all nodes with 1 edge with their respective connected node.\n * The options object is explained in full <a data-scroll=\"\" data-options=\"{ "easing": "easeInCubic" }\" href=\"#optionsObject\">below</a>.\n * @param {object} [options]\n * @returns {undefined}\n */\nNetwork.prototype.clusterOutliers = function () {\n return this.clustering.clusterOutliers.apply(this.clustering, arguments);\n};\nNetwork.prototype.getSeed = function () {\n return this.layoutEngine.getSeed.apply(this.layoutEngine, arguments);\n};\nNetwork.prototype.enableEditMode = function () {\n return this.manipulation.enableEditMode.apply(this.manipulation, arguments);\n};\nNetwork.prototype.disableEditMode = function () {\n return this.manipulation.disableEditMode.apply(this.manipulation, arguments);\n};\nNetwork.prototype.addNodeMode = function () {\n return this.manipulation.addNodeMode.apply(this.manipulation, arguments);\n};\nNetwork.prototype.editNode = function () {\n return this.manipulation.editNode.apply(this.manipulation, arguments);\n};\nNetwork.prototype.editNodeMode = function () {\n console.warn(\"Deprecated: Please use editNode instead of editNodeMode.\");\n return this.manipulation.editNode.apply(this.manipulation, arguments);\n};\nNetwork.prototype.addEdgeMode = function () {\n return this.manipulation.addEdgeMode.apply(this.manipulation, arguments);\n};\nNetwork.prototype.editEdgeMode = function () {\n return this.manipulation.editEdgeMode.apply(this.manipulation, arguments);\n};\nNetwork.prototype.deleteSelected = function () {\n return this.manipulation.deleteSelected.apply(this.manipulation, arguments);\n};\nNetwork.prototype.getPositions = function () {\n return this.nodesHandler.getPositions.apply(this.nodesHandler, arguments);\n};\nNetwork.prototype.getPosition = function () {\n return this.nodesHandler.getPosition.apply(this.nodesHandler, arguments);\n};\nNetwork.prototype.storePositions = function () {\n return this.nodesHandler.storePositions.apply(this.nodesHandler, arguments);\n};\nNetwork.prototype.moveNode = function () {\n return this.nodesHandler.moveNode.apply(this.nodesHandler, arguments);\n};\nNetwork.prototype.getBoundingBox = function () {\n return this.nodesHandler.getBoundingBox.apply(this.nodesHandler, arguments);\n};\nNetwork.prototype.getConnectedNodes = function (objectId) {\n if (this.body.nodes[objectId] !== undefined) {\n return this.nodesHandler.getConnectedNodes.apply(this.nodesHandler, arguments);\n } else {\n return this.edgesHandler.getConnectedNodes.apply(this.edgesHandler, arguments);\n }\n};\nNetwork.prototype.getConnectedEdges = function () {\n return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler, arguments);\n};\nNetwork.prototype.startSimulation = function () {\n return this.physics.startSimulation.apply(this.physics, arguments);\n};\nNetwork.prototype.stopSimulation = function () {\n return this.physics.stopSimulation.apply(this.physics, arguments);\n};\nNetwork.prototype.stabilize = function () {\n return this.physics.stabilize.apply(this.physics, arguments);\n};\nNetwork.prototype.getSelection = function () {\n return this.selectionHandler.getSelection.apply(this.selectionHandler, arguments);\n};\nNetwork.prototype.setSelection = function () {\n return this.selectionHandler.setSelection.apply(this.selectionHandler, arguments);\n};\nNetwork.prototype.getSelectedNodes = function () {\n return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler, arguments);\n};\nNetwork.prototype.getSelectedEdges = function () {\n return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler, arguments);\n};\nNetwork.prototype.getNodeAt = function () {\n const node = this.selectionHandler.getNodeAt.apply(this.selectionHandler, arguments);\n if (node !== undefined && node.id !== undefined) {\n return node.id;\n }\n return node;\n};\nNetwork.prototype.getEdgeAt = function () {\n const edge = this.selectionHandler.getEdgeAt.apply(this.selectionHandler, arguments);\n if (edge !== undefined && edge.id !== undefined) {\n return edge.id;\n }\n return edge;\n};\nNetwork.prototype.selectNodes = function () {\n return this.selectionHandler.selectNodes.apply(this.selectionHandler, arguments);\n};\nNetwork.prototype.selectEdges = function () {\n return this.selectionHandler.selectEdges.apply(this.selectionHandler, arguments);\n};\nNetwork.prototype.unselectAll = function () {\n this.selectionHandler.unselectAll.apply(this.selectionHandler, arguments);\n this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler);\n this.redraw();\n};\nNetwork.prototype.redraw = function () {\n return this.renderer.redraw.apply(this.renderer, arguments);\n};\nNetwork.prototype.getScale = function () {\n return this.view.getScale.apply(this.view, arguments);\n};\nNetwork.prototype.getViewPosition = function () {\n return this.view.getViewPosition.apply(this.view, arguments);\n};\nNetwork.prototype.fit = function () {\n return this.view.fit.apply(this.view, arguments);\n};\nNetwork.prototype.moveTo = function () {\n return this.view.moveTo.apply(this.view, arguments);\n};\nNetwork.prototype.focus = function () {\n return this.view.focus.apply(this.view, arguments);\n};\nNetwork.prototype.releaseNode = function () {\n return this.view.releaseNode.apply(this.view, arguments);\n};\nNetwork.prototype.getOptionsFromConfigurator = function () {\n let options = {};\n if (this.configurator) {\n options = this.configurator.getOptions.apply(this.configurator);\n }\n return options;\n};\n\nconst parseDOTNetwork = DOTToGraph;\n// DataSet, utils etc. can't be reexported here because that would cause stack\n// overflow in UMD builds. They all export vis namespace therefore reexporting\n// leads to loading vis to load vis to load vis…\n\nexport { Network, Images as NetworkImages, dotparser as networkDOTParser, gephiParser as networkGephiParser, options as networkOptions, parseDOTNetwork, parseGephi as parseGephiNetwork };\n//# sourceMappingURL=vis-network.mjs.map\n"],"names":["commonjsGlobal","getDefaultExportFromCjs","x","es_object_assign","globalThis_1","hasRequiredGlobalThis","requireGlobalThis","check","it","fails","hasRequiredFails","requireFails","exec","functionBindNative","hasRequiredFunctionBindNative","requireFunctionBindNative","test","functionApply","hasRequiredFunctionApply","requireFunctionApply","NATIVE_BIND","FunctionPrototype","apply","call","functionUncurryThis","hasRequiredFunctionUncurryThis","requireFunctionUncurryThis","uncurryThisWithBind","fn","classofRaw","hasRequiredClassofRaw","requireClassofRaw","uncurryThis","toString","stringSlice","functionUncurryThisClause","hasRequiredFunctionUncurryThisClause","requireFunctionUncurryThisClause","isCallable","hasRequiredIsCallable","requireIsCallable","documentAll","argument","objectGetOwnPropertyDescriptor","descriptors","hasRequiredDescriptors","requireDescriptors","functionCall","hasRequiredFunctionCall","requireFunctionCall","objectPropertyIsEnumerable","hasRequiredObjectPropertyIsEnumerable","requireObjectPropertyIsEnumerable","$propertyIsEnumerable","getOwnPropertyDescriptor","NASHORN_BUG","V","descriptor","createPropertyDescriptor","hasRequiredCreatePropertyDescriptor","requireCreatePropertyDescriptor","bitmap","value","indexedObject","hasRequiredIndexedObject","requireIndexedObject","classof","$Object","split","isNullOrUndefined","hasRequiredIsNullOrUndefined","requireIsNullOrUndefined","requireObjectCoercible","hasRequiredRequireObjectCoercible","requireRequireObjectCoercible","$TypeError","toIndexedObject","hasRequiredToIndexedObject","requireToIndexedObject","IndexedObject","isObject$1","hasRequiredIsObject","requireIsObject","path","hasRequiredPath","requirePath","getBuiltIn","hasRequiredGetBuiltIn","requireGetBuiltIn","globalThis","aFunction","variable","namespace","method","objectIsPrototypeOf","hasRequiredObjectIsPrototypeOf","requireObjectIsPrototypeOf","environmentUserAgent","hasRequiredEnvironmentUserAgent","requireEnvironmentUserAgent","navigator","userAgent","environmentV8Version","hasRequiredEnvironmentV8Version","requireEnvironmentV8Version","process","Deno","versions","v8","match","version","symbolConstructorDetection","hasRequiredSymbolConstructorDetection","requireSymbolConstructorDetection","V8_VERSION","$String","symbol","useSymbolAsUid","hasRequiredUseSymbolAsUid","requireUseSymbolAsUid","NATIVE_SYMBOL","isSymbol","hasRequiredIsSymbol","requireIsSymbol","isPrototypeOf","USE_SYMBOL_AS_UID","$Symbol","tryToString","hasRequiredTryToString","requireTryToString","aCallable","hasRequiredACallable","requireACallable","getMethod","hasRequiredGetMethod","requireGetMethod","P","func","ordinaryToPrimitive","hasRequiredOrdinaryToPrimitive","requireOrdinaryToPrimitive","isObject","input","pref","val","sharedStore","isPure","hasRequiredIsPure","requireIsPure","defineGlobalProperty","hasRequiredDefineGlobalProperty","requireDefineGlobalProperty","defineProperty","key","hasRequiredSharedStore","requireSharedStore","IS_PURE","SHARED","store","shared","hasRequiredShared","requireShared","toObject","hasRequiredToObject","requireToObject","hasOwnProperty_1","hasRequiredHasOwnProperty","requireHasOwnProperty","hasOwnProperty","uid","hasRequiredUid","requireUid","id","postfix","wellKnownSymbol","hasRequiredWellKnownSymbol","requireWellKnownSymbol","hasOwn","Symbol","WellKnownSymbolsStore","createWellKnownSymbol","name","toPrimitive$6","hasRequiredToPrimitive$5","requireToPrimitive$5","TO_PRIMITIVE","exoticToPrim","result","toPropertyKey$1","hasRequiredToPropertyKey","requireToPropertyKey","toPrimitive","documentCreateElement","hasRequiredDocumentCreateElement","requireDocumentCreateElement","document","EXISTS","ie8DomDefine","hasRequiredIe8DomDefine","requireIe8DomDefine","DESCRIPTORS","createElement","hasRequiredObjectGetOwnPropertyDescriptor","requireObjectGetOwnPropertyDescriptor","propertyIsEnumerableModule","toPropertyKey","IE8_DOM_DEFINE","$getOwnPropertyDescriptor","O","isForced_1","hasRequiredIsForced","requireIsForced","replacement","isForced","feature","detection","data","normalize","POLYFILL","NATIVE","string","functionBindContext","hasRequiredFunctionBindContext","requireFunctionBindContext","bind","that","objectDefineProperty","v8PrototypeDefineBug","hasRequiredV8PrototypeDefineBug","requireV8PrototypeDefineBug","anObject","hasRequiredAnObject","requireAnObject","hasRequiredObjectDefineProperty","requireObjectDefineProperty","V8_PROTOTYPE_DEFINE_BUG","$defineProperty","ENUMERABLE","CONFIGURABLE","WRITABLE","Attributes","current","createNonEnumerableProperty","hasRequiredCreateNonEnumerableProperty","requireCreateNonEnumerableProperty","definePropertyModule","object","_export","hasRequired_export","require_export","wrapConstructor","NativeConstructor","Wrapper","a","b","c","options","source","TARGET","GLOBAL","STATIC","PROTO","nativeSource","target","targetPrototype","FORCED","USE_NATIVE","VIRTUAL_PROTOTYPE","sourceProperty","targetProperty","nativeProperty","resultProperty","mathTrunc","hasRequiredMathTrunc","requireMathTrunc","ceil","floor","n","toIntegerOrInfinity","hasRequiredToIntegerOrInfinity","requireToIntegerOrInfinity","trunc","number","toAbsoluteIndex","hasRequiredToAbsoluteIndex","requireToAbsoluteIndex","max","min","index","length","integer","toLength","hasRequiredToLength","requireToLength","len","lengthOfArrayLike","hasRequiredLengthOfArrayLike","requireLengthOfArrayLike","obj","arrayIncludes","hasRequiredArrayIncludes","requireArrayIncludes","createMethod","IS_INCLUDES","$this","el","fromIndex","hiddenKeys","hasRequiredHiddenKeys","requireHiddenKeys","objectKeysInternal","hasRequiredObjectKeysInternal","requireObjectKeysInternal","indexOf","push","names","i","enumBugKeys","hasRequiredEnumBugKeys","requireEnumBugKeys","objectKeys","hasRequiredObjectKeys","requireObjectKeys","internalObjectKeys","objectGetOwnPropertySymbols","hasRequiredObjectGetOwnPropertySymbols","requireObjectGetOwnPropertySymbols","objectAssign","hasRequiredObjectAssign","requireObjectAssign","getOwnPropertySymbolsModule","$assign","concat","A","B","alphabet","chr","T","argumentsLength","getOwnPropertySymbols","propertyIsEnumerable","S","keys","j","hasRequiredEs_object_assign","requireEs_object_assign","$","assign","assign$4","hasRequiredAssign$2","requireAssign$2","assign$3","hasRequiredAssign$1","requireAssign$1","parent","assign$2","hasRequiredAssign","requireAssign","assignExports","_Object$assign","es_function_bind","arraySlice","hasRequiredArraySlice","requireArraySlice","functionBind","hasRequiredFunctionBind","requireFunctionBind","$Function","join","factories","construct","C","argsLength","args","list","F","Prototype","partArgs","boundFunction","hasRequiredEs_function_bind","requireEs_function_bind","getBuiltInPrototypeMethod","hasRequiredGetBuiltInPrototypeMethod","requireGetBuiltInPrototypeMethod","CONSTRUCTOR","METHOD","Namespace","pureMethod","NativePrototype","bind$3","hasRequiredBind$3","requireBind$3","bind$2","hasRequiredBind$2","requireBind$2","own","bind$1","hasRequiredBind$1","requireBind$1","hasRequiredBind","requireBind","bindExports","_bindInstanceProperty","drawCircle","ctx","y","r","drawSquare","drawTriangle","s","s2","ir","h","drawTriangleDown","drawStar","radius","drawDiamond","drawRoundRect","w","r2d","drawEllipse","kappa","ox","oy","xe","ye","xm","ym","drawDatabase","f","wEllipse","hEllipse","ymb","yeb","drawDashedLine","x2","y2","pattern","patternLength","dx","dy","slope","distRemaining","patternIndex","draw","xStep","dashLength","drawHexagon","sides","shapeMap","getShape","_len","_key","componentEmitter","hasRequiredComponentEmitter","requireComponentEmitter","module","Emitter","mixin","event","on","callbacks","cb","componentEmitterExports","es_array_concat","isArray$3","hasRequiredIsArray$3","requireIsArray$3","doesNotExceedSafeInteger","hasRequiredDoesNotExceedSafeInteger","requireDoesNotExceedSafeInteger","MAX_SAFE_INTEGER","createProperty","hasRequiredCreateProperty","requireCreateProperty","toStringTagSupport","hasRequiredToStringTagSupport","requireToStringTagSupport","TO_STRING_TAG","hasRequiredClassof","requireClassof","TO_STRING_TAG_SUPPORT","CORRECT_ARGUMENTS","tryGet","tag","inspectSource","hasRequiredInspectSource","requireInspectSource","functionToString","isConstructor","hasRequiredIsConstructor","requireIsConstructor","noop","constructorRegExp","INCORRECT_TO_STRING","isConstructorModern","isConstructorLegacy","called","arraySpeciesConstructor","hasRequiredArraySpeciesConstructor","requireArraySpeciesConstructor","isArray","SPECIES","$Array","originalArray","arraySpeciesCreate","hasRequiredArraySpeciesCreate","requireArraySpeciesCreate","arrayMethodHasSpeciesSupport","hasRequiredArrayMethodHasSpeciesSupport","requireArrayMethodHasSpeciesSupport","METHOD_NAME","array","constructor","hasRequiredEs_array_concat","requireEs_array_concat","IS_CONCAT_SPREADABLE","IS_CONCAT_SPREADABLE_SUPPORT","isConcatSpreadable","spreadable","arg","k","E","es_symbol","es_symbol_constructor","hasRequiredToString","requireToString","objectDefineProperties","hasRequiredObjectDefineProperties","requireObjectDefineProperties","Properties","props","html","hasRequiredHtml","requireHtml","sharedKey","hasRequiredSharedKey","requireSharedKey","objectCreate","hasRequiredObjectCreate","requireObjectCreate","definePropertiesModule","GT","LT","PROTOTYPE","SCRIPT","IE_PROTO","EmptyConstructor","scriptTag","content","NullProtoObjectViaActiveX","activeXDocument","temp","NullProtoObjectViaIFrame","iframe","JS","iframeDocument","NullProtoObject","objectGetOwnPropertyNames","hasRequiredObjectGetOwnPropertyNames","requireObjectGetOwnPropertyNames","objectGetOwnPropertyNamesExternal","hasRequiredObjectGetOwnPropertyNamesExternal","requireObjectGetOwnPropertyNamesExternal","$getOwnPropertyNames","windowNames","getWindowNames","defineBuiltIn","hasRequiredDefineBuiltIn","requireDefineBuiltIn","defineBuiltInAccessor","hasRequiredDefineBuiltInAccessor","requireDefineBuiltInAccessor","wellKnownSymbolWrapped","hasRequiredWellKnownSymbolWrapped","requireWellKnownSymbolWrapped","wellKnownSymbolDefine","hasRequiredWellKnownSymbolDefine","requireWellKnownSymbolDefine","wrappedWellKnownSymbolModule","NAME","symbolDefineToPrimitive","hasRequiredSymbolDefineToPrimitive","requireSymbolDefineToPrimitive","SymbolPrototype","valueOf","hint","objectToString","hasRequiredObjectToString","requireObjectToString","setToStringTag","hasRequiredSetToStringTag","requireSetToStringTag","TAG","SET_METHOD","weakMapBasicDetection","hasRequiredWeakMapBasicDetection","requireWeakMapBasicDetection","WeakMap","internalState","hasRequiredInternalState","requireInternalState","NATIVE_WEAK_MAP","OBJECT_ALREADY_INITIALIZED","TypeError","set","get","has","enforce","getterFor","TYPE","state","metadata","STATE","arrayIteration","hasRequiredArrayIteration","requireArrayIteration","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","IS_FILTER_REJECT","NO_HOLES","callbackfn","specificCreate","self","create","hasRequiredEs_symbol_constructor","requireEs_symbol_constructor","$toString","nativeObjectCreate","getOwnPropertyNamesModule","getOwnPropertyNamesExternal","getOwnPropertyDescriptorModule","defineWellKnownSymbol","defineSymbolToPrimitive","InternalStateModule","$forEach","HIDDEN","SYMBOL","setInternalState","getInternalState","ObjectPrototype","RangeError","QObject","nativeGetOwnPropertyDescriptor","nativeDefineProperty","nativeGetOwnPropertyNames","nativePropertyIsEnumerable","AllSymbols","ObjectPrototypeSymbols","USE_SETTER","fallbackDefineProperty","ObjectPrototypeDescriptor","setSymbolDescriptor","wrap","description","$defineProperties","properties","$getOwnPropertySymbols","$create","enumerable","IS_OBJECT_PROTOTYPE","setter","error","es_symbol_for","symbolRegistryDetection","hasRequiredSymbolRegistryDetection","requireSymbolRegistryDetection","hasRequiredEs_symbol_for","requireEs_symbol_for","NATIVE_SYMBOL_REGISTRY","StringToSymbolRegistry","SymbolToStringRegistry","es_symbol_keyFor","hasRequiredEs_symbol_keyFor","requireEs_symbol_keyFor","sym","es_json_stringify","getJsonReplacerFunction","hasRequiredGetJsonReplacerFunction","requireGetJsonReplacerFunction","replacer","rawLength","element","keysLength","root","hasRequiredEs_json_stringify","requireEs_json_stringify","getReplacerFunction","$stringify","charAt","charCodeAt","replace","numberToString","tester","low","hi","WRONG_SYMBOLS_CONVERSION","ILL_FORMED_UNICODE","stringifyWithSymbolsFix","$replacer","fixIllFormed","offset","prev","next","space","es_object_getOwnPropertySymbols","hasRequiredEs_object_getOwnPropertySymbols","requireEs_object_getOwnPropertySymbols","hasRequiredEs_symbol","requireEs_symbol","es_symbol_asyncDispose","hasRequiredEs_symbol_asyncDispose","requireEs_symbol_asyncDispose","es_symbol_asyncIterator","hasRequiredEs_symbol_asyncIterator","requireEs_symbol_asyncIterator","es_symbol_dispose","hasRequiredEs_symbol_dispose","requireEs_symbol_dispose","es_symbol_hasInstance","hasRequiredEs_symbol_hasInstance","requireEs_symbol_hasInstance","es_symbol_isConcatSpreadable","hasRequiredEs_symbol_isConcatSpreadable","requireEs_symbol_isConcatSpreadable","es_symbol_iterator","hasRequiredEs_symbol_iterator","requireEs_symbol_iterator","es_symbol_match","hasRequiredEs_symbol_match","requireEs_symbol_match","es_symbol_matchAll","hasRequiredEs_symbol_matchAll","requireEs_symbol_matchAll","es_symbol_replace","hasRequiredEs_symbol_replace","requireEs_symbol_replace","es_symbol_search","hasRequiredEs_symbol_search","requireEs_symbol_search","es_symbol_species","hasRequiredEs_symbol_species","requireEs_symbol_species","es_symbol_split","hasRequiredEs_symbol_split","requireEs_symbol_split","es_symbol_toPrimitive","hasRequiredEs_symbol_toPrimitive","requireEs_symbol_toPrimitive","es_symbol_toStringTag","hasRequiredEs_symbol_toStringTag","requireEs_symbol_toStringTag","es_symbol_unscopables","hasRequiredEs_symbol_unscopables","requireEs_symbol_unscopables","es_json_toStringTag","hasRequiredEs_json_toStringTag","requireEs_json_toStringTag","symbol$5","hasRequiredSymbol$5","requireSymbol$5","web_domCollections_iterator","addToUnscopables","hasRequiredAddToUnscopables","requireAddToUnscopables","iterators","hasRequiredIterators","requireIterators","functionName","hasRequiredFunctionName","requireFunctionName","getDescriptor","PROPER","correctPrototypeGetter","hasRequiredCorrectPrototypeGetter","requireCorrectPrototypeGetter","objectGetPrototypeOf","hasRequiredObjectGetPrototypeOf","requireObjectGetPrototypeOf","CORRECT_PROTOTYPE_GETTER","iteratorsCore","hasRequiredIteratorsCore","requireIteratorsCore","getPrototypeOf","ITERATOR","BUGGY_SAFARI_ITERATORS","IteratorPrototype","PrototypeOfArrayIteratorPrototype","arrayIterator","NEW_ITERATOR_PROTOTYPE","iteratorCreateConstructor","hasRequiredIteratorCreateConstructor","requireIteratorCreateConstructor","Iterators","returnThis","IteratorConstructor","ENUMERABLE_NEXT","functionUncurryThisAccessor","hasRequiredFunctionUncurryThisAccessor","requireFunctionUncurryThisAccessor","isPossiblePrototype","hasRequiredIsPossiblePrototype","requireIsPossiblePrototype","aPossiblePrototype","hasRequiredAPossiblePrototype","requireAPossiblePrototype","objectSetPrototypeOf","hasRequiredObjectSetPrototypeOf","requireObjectSetPrototypeOf","uncurryThisAccessor","CORRECT_SETTER","proto","iteratorDefine","hasRequiredIteratorDefine","requireIteratorDefine","FunctionName","createIteratorConstructor","setPrototypeOf","IteratorsCore","PROPER_FUNCTION_NAME","CONFIGURABLE_FUNCTION_NAME","KEYS","VALUES","ENTRIES","Iterable","DEFAULT","IS_SET","getIterationMethod","KIND","defaultIterator","IterablePrototype","INCORRECT_VALUES_NAME","nativeIterator","anyNativeIterator","CurrentIteratorPrototype","methods","KEY","createIterResultObject","hasRequiredCreateIterResultObject","requireCreateIterResultObject","done","es_array_iterator","hasRequiredEs_array_iterator","requireEs_array_iterator","defineIterator","ARRAY_ITERATOR","iterated","kind","values","domIterables","hasRequiredDomIterables","requireDomIterables","hasRequiredWeb_domCollections_iterator","requireWeb_domCollections_iterator","DOMIterables","COLLECTION_NAME","symbol$4","hasRequiredSymbol$4","requireSymbol$4","symbol$3","hasRequiredSymbol$3","requireSymbol$3","symbolExports$1","_Symbol$1","es_array_slice","hasRequiredEs_array_slice","requireEs_array_slice","nativeSlice","HAS_SPECIES_SUPPORT","start","end","fin","Constructor","slice$3","hasRequiredSlice$3","requireSlice$3","slice$2","hasRequiredSlice$2","requireSlice$2","ArrayPrototype","slice$1","hasRequiredSlice$1","requireSlice$1","slice","hasRequiredSlice","requireSlice","sliceExports","_sliceInstanceProperty","ownKeys$4","hasRequiredOwnKeys","requireOwnKeys","es_array_isArray","hasRequiredEs_array_isArray","requireEs_array_isArray","isArray$2","hasRequiredIsArray$2","requireIsArray$2","isArray$1","hasRequiredIsArray$1","requireIsArray$1","hasRequiredIsArray","requireIsArray","isArrayExports","_Array$isArray","es_array_map","hasRequiredEs_array_map","requireEs_array_map","$map","map$6","hasRequiredMap$6","requireMap$6","map$5","hasRequiredMap$5","requireMap$5","map$4","hasRequiredMap$4","requireMap$4","map$3","hasRequiredMap$3","requireMap$3","mapExports$1","_mapInstanceProperty","es_object_keys","hasRequiredEs_object_keys","requireEs_object_keys","nativeKeys","FAILS_ON_PRIMITIVES","keys$2","hasRequiredKeys$2","requireKeys$2","keys$1","hasRequiredKeys$1","requireKeys$1","hasRequiredKeys","requireKeys","keysExports","_Object$keys","es_date_now","hasRequiredEs_date_now","requireEs_date_now","$Date","thisTimeValue","now$3","hasRequiredNow$2","requireNow$2","now$2","hasRequiredNow$1","requireNow$1","now$1","hasRequiredNow","requireNow","nowExports","_Date$now","es_array_forEach","arrayMethodIsStrict","hasRequiredArrayMethodIsStrict","requireArrayMethodIsStrict","arrayForEach","hasRequiredArrayForEach","requireArrayForEach","STRICT_METHOD","hasRequiredEs_array_forEach","requireEs_array_forEach","forEach","forEach$4","hasRequiredForEach$3","requireForEach$3","forEach$3","hasRequiredForEach$2","requireForEach$2","forEach$2","hasRequiredForEach$1","requireForEach$1","forEach$1","hasRequiredForEach","requireForEach","forEachExports","_forEachInstanceProperty","es_array_reverse","hasRequiredEs_array_reverse","requireEs_array_reverse","nativeReverse","reverse$3","hasRequiredReverse$3","requireReverse$3","reverse$2","hasRequiredReverse$2","requireReverse$2","reverse$1","hasRequiredReverse$1","requireReverse$1","reverse","hasRequiredReverse","requireReverse","reverseExports","_reverseInstanceProperty","es_array_splice","arraySetLength","hasRequiredArraySetLength","requireArraySetLength","SILENT_ON_NON_WRITABLE_LENGTH_SET","deletePropertyOrThrow","hasRequiredDeletePropertyOrThrow","requireDeletePropertyOrThrow","hasRequiredEs_array_splice","requireEs_array_splice","setArrayLength","deleteCount","actualStart","insertCount","actualDeleteCount","from","to","splice$3","hasRequiredSplice$3","requireSplice$3","splice$2","hasRequiredSplice$2","requireSplice$2","splice$1","hasRequiredSplice$1","requireSplice$1","splice","hasRequiredSplice","requireSplice","spliceExports","_spliceInstanceProperty","es_array_includes","hasRequiredEs_array_includes","requireEs_array_includes","$includes","BROKEN_ON_SPARSE","includes$4","hasRequiredIncludes$4","requireIncludes$4","es_string_includes","isRegexp","hasRequiredIsRegexp","requireIsRegexp","MATCH","isRegExp","notARegexp","hasRequiredNotARegexp","requireNotARegexp","correctIsRegexpLogic","hasRequiredCorrectIsRegexpLogic","requireCorrectIsRegexpLogic","regexp","hasRequiredEs_string_includes","requireEs_string_includes","notARegExp","correctIsRegExpLogic","stringIndexOf","searchString","includes$3","hasRequiredIncludes$3","requireIncludes$3","includes$2","hasRequiredIncludes$2","requireIncludes$2","arrayMethod","stringMethod","StringPrototype","includes$1","hasRequiredIncludes$1","requireIncludes$1","includes","hasRequiredIncludes","requireIncludes","includesExports","_includesInstanceProperty","es_object_getPrototypeOf","hasRequiredEs_object_getPrototypeOf","requireEs_object_getPrototypeOf","nativeGetPrototypeOf","getPrototypeOf$2","hasRequiredGetPrototypeOf$2","requireGetPrototypeOf$2","getPrototypeOf$1","hasRequiredGetPrototypeOf$1","requireGetPrototypeOf$1","hasRequiredGetPrototypeOf","requireGetPrototypeOf","getPrototypeOfExports","_Object$getPrototypeOf","concat$3","hasRequiredConcat$3","requireConcat$3","concat$2","hasRequiredConcat$2","requireConcat$2","concat$1","hasRequiredConcat$1","requireConcat$1","hasRequiredConcat","requireConcat","concatExports","_concatInstanceProperty","es_array_filter","hasRequiredEs_array_filter","requireEs_array_filter","$filter","filter$3","hasRequiredFilter$3","requireFilter$3","filter$2","hasRequiredFilter$2","requireFilter$2","filter$1","hasRequiredFilter$1","requireFilter$1","filter","hasRequiredFilter","requireFilter","filterExports","_filterInstanceProperty","es_object_values","objectToArray","hasRequiredObjectToArray","requireObjectToArray","IE_BUG","TO_ENTRIES","IE_WORKAROUND","hasRequiredEs_object_values","requireEs_object_values","$values","values$6","hasRequiredValues$6","requireValues$6","values$5","hasRequiredValues$5","requireValues$5","values$4","hasRequiredValues$4","requireValues$4","valuesExports$1","_Object$values","es_parseInt","whitespaces","hasRequiredWhitespaces","requireWhitespaces","stringTrim","hasRequiredStringTrim","requireStringTrim","ltrim","rtrim","numberParseInt","hasRequiredNumberParseInt","requireNumberParseInt","trim","$parseInt","hex","radix","hasRequiredEs_parseInt","requireEs_parseInt","_parseInt$3","hasRequired_parseInt$2","require_parseInt$2","_parseInt$2","hasRequired_parseInt$1","require_parseInt$1","_parseInt$1","hasRequired_parseInt","require_parseInt","_parseIntExports","_parseInt","es_array_indexOf","hasRequiredEs_array_indexOf","requireEs_array_indexOf","$indexOf","nativeIndexOf","NEGATIVE_ZERO","searchElement","indexOf$3","hasRequiredIndexOf$3","requireIndexOf$3","indexOf$2","hasRequiredIndexOf$2","requireIndexOf$2","indexOf$1","hasRequiredIndexOf$1","requireIndexOf$1","hasRequiredIndexOf","requireIndexOf","indexOfExports","_indexOfInstanceProperty","es_object_create","hasRequiredEs_object_create","requireEs_object_create","create$2","hasRequiredCreate$2","requireCreate$2","Object","D","create$1","hasRequiredCreate$1","requireCreate$1","hasRequiredCreate","requireCreate","createExports","_Object$create","es_date_toJson","stringRepeat","hasRequiredStringRepeat","requireStringRepeat","$RangeError","count","str","stringPad","hasRequiredStringPad","requireStringPad","$repeat","repeat","IS_END","maxLength","fillString","intMaxLength","stringLength","fillStr","fillLen","stringFiller","dateToIsoString","hasRequiredDateToIsoString","requireDateToIsoString","padStart","$isFinite","abs","DatePrototype","nativeDateToISOString","getUTCDate","getUTCFullYear","getUTCHours","getUTCMilliseconds","getUTCMinutes","getUTCMonth","getUTCSeconds","date","year","milliseconds","sign","hasRequiredEs_date_toJson","requireEs_date_toJson","toISOString","pv","stringify$2","hasRequiredStringify$2","requireStringify$2","stringify$1","hasRequiredStringify$1","requireStringify$1","stringify","hasRequiredStringify","requireStringify","stringifyExports","_JSON$stringify","web_timers","web_setInterval","environment","hasRequiredEnvironment","requireEnvironment","userAgentStartsWith","validateArgumentsLength","hasRequiredValidateArgumentsLength","requireValidateArgumentsLength","passed","required","schedulersFix","hasRequiredSchedulersFix","requireSchedulersFix","ENVIRONMENT","USER_AGENT","Function","WRAP","scheduler","hasTimeArg","firstParamIndex","handler","timeout","boundArgs","params","callback","hasRequiredWeb_setInterval","requireWeb_setInterval","setInterval","web_setTimeout","hasRequiredWeb_setTimeout","requireWeb_setTimeout","setTimeout","hasRequiredWeb_timers","requireWeb_timers","setTimeout$2","hasRequiredSetTimeout$1","requireSetTimeout$1","setTimeout$1","hasRequiredSetTimeout","requireSetTimeout","setTimeoutExports","_setTimeout","es_array_fill","arrayFill","hasRequiredArrayFill","requireArrayFill","endPos","hasRequiredEs_array_fill","requireEs_array_fill","fill","fill$3","hasRequiredFill$3","requireFill$3","fill$2","hasRequiredFill$2","requireFill$2","fill$1","hasRequiredFill$1","requireFill$1","hasRequiredFill","requireFill","fillExports","_fillInstanceProperty","_extends","_inheritsLoose","subClass","superClass","_assertThisInitialized","output","nextKey","assign$1","VENDOR_PREFIXES","TEST_ELEMENT","TYPE_FUNCTION","round","now","prefixed","property","prefix","prop","camelProp","win","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","getTouchActionProps","touchMap","cssSupports","TOUCH_ACTION_COMPUTE","TOUCH_ACTION_AUTO","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_NONE","TOUCH_ACTION_PAN_X","TOUCH_ACTION_PAN_Y","TOUCH_ACTION_MAP","MOBILE_REGEX","SUPPORT_TOUCH","SUPPORT_POINTER_EVENTS","SUPPORT_ONLY_TOUCH","INPUT_TYPE_TOUCH","INPUT_TYPE_PEN","INPUT_TYPE_MOUSE","INPUT_TYPE_KINECT","COMPUTE_INTERVAL","INPUT_START","INPUT_MOVE","INPUT_END","INPUT_CANCEL","DIRECTION_NONE","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_UP","DIRECTION_DOWN","DIRECTION_HORIZONTAL","DIRECTION_VERTICAL","DIRECTION_ALL","PROPS_XY","PROPS_CLIENT_XY","each","iterator","context","boolOrFn","inStr","find","cleanTouchActions","actions","hasPanX","hasPanY","TouchAction","manager","_proto","recognizer","srcEvent","direction","hasNone","isTapPointer","isTapMovement","isTapTouchTime","hasParent","node","getCenter","pointers","pointersLength","simpleCloneInputData","getDistance","p1","p2","getAngle","getDirection","computeDeltaXY","session","center","prevDelta","prevInput","getVelocity","deltaTime","getScale","getRotation","computeIntervalInputData","last","velocity","velocityX","velocityY","deltaX","deltaY","v","computeInputData","firstInput","firstMultiple","offsetCenter","overallVelocity","srcEventTarget","inputHandler","eventType","pointersLen","changedPointersLen","isFirst","isFinal","splitStr","addEventListeners","types","type","removeEventListeners","getWindowForElement","doc","Input","ev","inArray","src","findByKey","POINTER_INPUT_MAP","IE10_POINTER_TYPE_ENUM","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","PointerEventInput","_Input","_this","removePointer","eventTypeNormalized","pointerType","isTouch","storeIndex","toArray","uniqueArray","sort","results","TOUCH_INPUT_MAP","TOUCH_TARGET_EVENTS","TouchInput","touches","getTouches","allTouches","targetIds","targetTouches","changedTouches","changedTargetTouches","touch","MOUSE_INPUT_MAP","MOUSE_ELEMENT_EVENTS","MOUSE_WINDOW_EVENTS","MouseInput","DEDUP_TIMEOUT","DEDUP_DISTANCE","setLastTouch","eventData","_eventData$changedPoi","lastTouch","lts","removeLastTouch","recordTouches","isSyntheticEvent","t","TouchMouseInput","_manager","inputEvent","inputData","isMouse","createInputInstance","Type","inputClass","invokeArrayArg","STATE_POSSIBLE","STATE_BEGAN","STATE_CHANGED","STATE_ENDED","STATE_RECOGNIZED","STATE_CANCELLED","STATE_FAILED","_uniqueId","uniqueId","getRecognizerByNameIfManager","otherRecognizer","stateStr","Recognizer","simultaneous","requireFail","emit","inputDataClone","TapRecognizer","_Recognizer","_this2","validPointers","validMovement","validTouchTime","validInterval","validMultiTap","tapCount","_this3","AttrRecognizer","optionPointers","isRecognized","isValid","directionStr","PanRecognizer","_AttrRecognizer","hasMoved","distance","SwipeRecognizer","PinchRecognizer","inOut","RotateRecognizer","PressRecognizer","validTime","defaults","preset","STOP","FORCED_STOP","toggleCssProps","add","triggerDomEvent","gestureEvent","Manager","item","force","recognizers","curRecognizer","existing","targetRecognizer","events","handlers","SINGLE_TOUCH_INPUT_MAP","SINGLE_TOUCH_TARGET_EVENTS","SINGLE_TOUCH_WINDOW_EVENTS","SingleTouchInput","normalizeSingleTouches","all","changed","deprecate","message","deprecationMessage","e","stack","log","extend","dest","merge","merge$1","inherit","child","base","baseP","childP","bindFn","Hammer$2","Hammer","Alea","_len3","seed","_key3","AleaImplementation","s0","s1","mashSeed","random","mash","Mash","hammerMock","Hammer$1","Activator$1","container","_context","hammer","_hasParent","_context2","_context3","fullHexRE","shortHexRE","rgbRE","rgbaRE","recursiveDOMDelete","DOMobject","isString","copyOrDelete","allowDeletion","doDeletion","fillIfDefined","aProp","bProp","selectiveDeepExtend","p","deepExtend","selectiveNotDeepExtend","propsToExclude","protoExtend","_context4","copyAndExtendArray","arr","newValue","copyArray","getAbsoluteLeft","elem","getAbsoluteTop","hexToRGB","overrideOpacity","color","opacity","rgb","RGBToHex","red","green","blue","_context5","parseColor","inputColor","defaultColor","colorStr","isValidRGB","_context6","isValidHex","hsv","hexToHSV","lighterColorHSV","darkerColorHSV","darkerColorHex","HSVToHex","lighterColorHex","RGBToHSV","minRGB","maxRGB","d","hue","saturation","HSVToRGB","g","q","isValidRGBA","rgba","bridgeObject","referenceObject","objectTo","mergeOptions","mergeTarget","option","globalOptions","isPresent","isEmpty","doMerge","dst","srcOption","globalOption","globalEnabled","enabled","easingFunctions","topMost","pile","accessors","candidate","member","htmlColors","ColorPicker$1","pixelRatio","setInitial","htmlColor","rgbaArray","rgbObj","alpha","angleConvert","_context7","_context8","_context9","_context0","noCanvas","me","sat","hfac","sfac","rect","left","top","centerY","centerX","angle","newTop","newLeft","wrapInTag","_len5","rest","_key5","Configurator$1","parentModule","defaultContainer","configureOptions","hideOption","moduleOptions","counter","show","_len6","domElements","_key6","div","objectLabel","select","selectedValue","label","defaultValue","step","range","popupString","popupValue","itemIndex","generateButton","checkbox","colorString","checkOnly","visibleInSet","subObj","newPath","enabledPath","enabledValue","optionsObj","pointer","Popup$1","overflowMethod","doShow","height","width","maxHeight","maxWidth","isLeft","isTop","errorFound","allOptions$1","VALIDATOR_PRINT_STYLE$1","Validator$1","Validator","referenceOptions","subObject","usedOptions","referenceOption","is_object","refOptionObj","optionType","refOptionType","localSearch","globalSearch","localSearchThreshold","globalSearchThreshold","msg","recursive","closestMatch","closestMatchPath","lowerCaseOption","indexMatch","op","_context1","matrix","Activator","Configurator","Popup","VALIDATOR_PRINT_STYLE","parseDOT","dot","parseGraph","NODE_ATTR_MAPPING","EDGE_ATTR_MAPPING","TOKENTYPE","DELIMITERS","token","tokenType","first","nextPreview","isAlphaNumeric","charCode","setValue","o","addNode","graph","graphs","addEdge","edge","attr","createEdge","getToken","isComment","c2","newSyntaxError","chop","parseStatements","parseStatement","subgraph","parseSubgraph","parseEdge","parseAttributeStatement","parseNodeStatement","parseAttributeList","edgeStyles","arrowTypes","attr_list","attr_names","arrowType","idx","dir_type","from_type","to_type","idx_arrow","nof_attr_list","tmp_attr_list","text","forEach2","array1","array2","elem1","elem2","setProp","convertAttr","mapping","converted","visProp","visPropI","DOTToGraph","dotData","graphData","dotNode","graphNode","convertEdge","dotEdge","graphEdge","subEdge","dotparser","parseGephi","gephiJSON","gEdges","vEdges","gEdge","vEdge","gNode","vNode","gephiParser","locales","normalizeLanguageCode","rawCode","rawLanguage","rawCountry","language","country","code","CachedImage","h2","h4","h8","h16","w2","w4","w8","w16","iterations","factor","Images","url","brokenUrl","imageToLoadBrokenUrlOn","imageToRedrawWith","cachedImage","img","imageToCache","es_map","es_map_constructor","internalMetadata","arrayBufferNonExtensible","hasRequiredArrayBufferNonExtensible","requireArrayBufferNonExtensible","buffer","objectIsExtensible","hasRequiredObjectIsExtensible","requireObjectIsExtensible","ARRAY_BUFFER_NON_EXTENSIBLE","$isExtensible","freezing","hasRequiredFreezing","requireFreezing","hasRequiredInternalMetadata","requireInternalMetadata","getOwnPropertyNamesExternalModule","isExtensible","FREEZING","REQUIRED","METADATA","setMetadata","fastKey","getWeakData","onFreeze","enable","meta","getOwnPropertyNames","isArrayIteratorMethod","hasRequiredIsArrayIteratorMethod","requireIsArrayIteratorMethod","getIteratorMethod","hasRequiredGetIteratorMethod","requireGetIteratorMethod","getIterator","hasRequiredGetIterator","requireGetIterator","usingIterator","iteratorMethod","iteratorClose","hasRequiredIteratorClose","requireIteratorClose","innerResult","innerError","iterate","hasRequiredIterate","requireIterate","Result","stopped","ResultPrototype","iterable","unboundFunction","AS_ENTRIES","IS_RECORD","IS_ITERATOR","INTERRUPTED","iterFn","stop","condition","callFn","anInstance","hasRequiredAnInstance","requireAnInstance","collection","hasRequiredCollection","requireCollection","InternalMetadataModule","internalStateGetterFor","CONSTRUCTOR_NAME","wrapper","common","IS_WEAK","ADDER","exported","IS_ADDER","defineBuiltIns","hasRequiredDefineBuiltIns","requireDefineBuiltIns","setSpecies","hasRequiredSetSpecies","requireSetSpecies","collectionStrong","hasRequiredCollectionStrong","requireCollectionStrong","define","entry","getEntry","previous","ITERATOR_NAME","getInternalCollectionState","getInternalIteratorState","hasRequiredEs_map_constructor","requireEs_map_constructor","init","hasRequiredEs_map","requireEs_map","es_map_groupBy","caller","hasRequiredCaller","requireCaller","methodName","numArgs","arg1","arg2","mapHelpers","hasRequiredMapHelpers","requireMapHelpers","Map","hasRequiredEs_map_groupBy","requireEs_map_groupBy","MapHelpers","DOES_NOT_WORK_WITH_PRIMITIVES","items","map","es_string_iterator","stringMultibyte","hasRequiredStringMultibyte","requireStringMultibyte","CONVERT_TO_STRING","pos","position","size","second","hasRequiredEs_string_iterator","requireEs_string_iterator","STRING_ITERATOR","point","map$2","hasRequiredMap$2","requireMap$2","map$1","hasRequiredMap$1","requireMap$1","hasRequiredMap","requireMap","mapExports","_Map","Groups","optionFields","groupName","group","groupname","shouldCreate","style","es_number_isNan","hasRequiredEs_number_isNan","requireEs_number_isNan","isNan$2","hasRequiredIsNan$2","requireIsNan$2","isNan$1","hasRequiredIsNan$1","requireIsNan$1","isNan","hasRequiredIsNan","requireIsNan","isNanExports","_Number$isNaN","es_number_isFinite","numberIsFinite","hasRequiredNumberIsFinite","requireNumberIsFinite","globalIsFinite","hasRequiredEs_number_isFinite","requireEs_number_isFinite","_isFinite$2","hasRequired_isFinite$2","require_isFinite$2","_isFinite$1","hasRequired_isFinite$1","require_isFinite$1","_isFinite","hasRequired_isFinite","require_isFinite","_isFiniteExports","_Number$isFinite","es_array_some","hasRequiredEs_array_some","requireEs_array_some","$some","some$3","hasRequiredSome$3","requireSome$3","some$2","hasRequiredSome$2","requireSome$2","some$1","hasRequiredSome$1","requireSome$1","some","hasRequiredSome","requireSome","someExports","_someInstanceProperty","defineProperty$5","es_object_defineProperty","hasRequiredEs_object_defineProperty","requireEs_object_defineProperty","hasRequiredDefineProperty$5","requireDefineProperty$5","desc","defineProperty$4","hasRequiredDefineProperty$4","requireDefineProperty$4","defineProperty$3","hasRequiredDefineProperty$3","requireDefineProperty$3","defineProperty$2","hasRequiredDefineProperty$2","requireDefineProperty$2","defineProperty$1","hasRequiredDefineProperty$1","requireDefineProperty$1","definePropertyExports$1","_Object$defineProperty$1","esnext_function_metadata","hasRequiredEsnext_function_metadata","requireEsnext_function_metadata","esnext_symbol_asyncDispose","hasRequiredEsnext_symbol_asyncDispose","requireEsnext_symbol_asyncDispose","esnext_symbol_dispose","hasRequiredEsnext_symbol_dispose","requireEsnext_symbol_dispose","esnext_symbol_metadata","hasRequiredEsnext_symbol_metadata","requireEsnext_symbol_metadata","symbol$2","hasRequiredSymbol$2","requireSymbol$2","esnext_symbol_isRegisteredSymbol","symbolIsRegistered","hasRequiredSymbolIsRegistered","requireSymbolIsRegistered","keyFor","thisSymbolValue","hasRequiredEsnext_symbol_isRegisteredSymbol","requireEsnext_symbol_isRegisteredSymbol","isRegisteredSymbol","esnext_symbol_isWellKnownSymbol","symbolIsWellKnown","hasRequiredSymbolIsWellKnown","requireSymbolIsWellKnown","$isWellKnownSymbol","symbolKeys","symbolKeysLength","symbolKey","hasRequiredEsnext_symbol_isWellKnownSymbol","requireEsnext_symbol_isWellKnownSymbol","isWellKnownSymbol","esnext_symbol_customMatcher","hasRequiredEsnext_symbol_customMatcher","requireEsnext_symbol_customMatcher","esnext_symbol_observable","hasRequiredEsnext_symbol_observable","requireEsnext_symbol_observable","esnext_symbol_isRegistered","hasRequiredEsnext_symbol_isRegistered","requireEsnext_symbol_isRegistered","esnext_symbol_isWellKnown","hasRequiredEsnext_symbol_isWellKnown","requireEsnext_symbol_isWellKnown","esnext_symbol_matcher","hasRequiredEsnext_symbol_matcher","requireEsnext_symbol_matcher","esnext_symbol_metadataKey","hasRequiredEsnext_symbol_metadataKey","requireEsnext_symbol_metadataKey","esnext_symbol_patternMatch","hasRequiredEsnext_symbol_patternMatch","requireEsnext_symbol_patternMatch","esnext_symbol_replaceAll","hasRequiredEsnext_symbol_replaceAll","requireEsnext_symbol_replaceAll","symbol$1","hasRequiredSymbol$1","requireSymbol$1","hasRequiredSymbol","requireSymbol","symbolExports","_Symbol","iterator$4","hasRequiredIterator$4","requireIterator$4","WrappedWellKnownSymbolModule","iterator$3","hasRequiredIterator$3","requireIterator$3","iterator$2","hasRequiredIterator$2","requireIterator$2","iterator$1","hasRequiredIterator$1","requireIterator$1","hasRequiredIterator","requireIterator","iteratorExports","_Symbol$iterator","_typeof","toPrimitive$5","hasRequiredToPrimitive$4","requireToPrimitive$4","toPrimitive$4","hasRequiredToPrimitive$3","requireToPrimitive$3","toPrimitive$3","hasRequiredToPrimitive$2","requireToPrimitive$2","toPrimitive$2","hasRequiredToPrimitive$1","requireToPrimitive$1","toPrimitive$1","hasRequiredToPrimitive","requireToPrimitive","toPrimitiveExports","_Symbol$toPrimitive","_defineProperty","es_parseFloat","numberParseFloat","hasRequiredNumberParseFloat","requireNumberParseFloat","$parseFloat","trimmedString","hasRequiredEs_parseFloat","requireEs_parseFloat","_parseFloat$3","hasRequired_parseFloat$2","require_parseFloat$2","_parseFloat$2","hasRequired_parseFloat$1","require_parseFloat$1","_parseFloat$1","hasRequired_parseFloat","require_parseFloat","_parseFloatExports","_parseFloat","es_object_getOwnPropertyNames","hasRequiredEs_object_getOwnPropertyNames","requireEs_object_getOwnPropertyNames","getOwnPropertyNames$2","hasRequiredGetOwnPropertyNames$2","requireGetOwnPropertyNames$2","getOwnPropertyNames$1","hasRequiredGetOwnPropertyNames$1","requireGetOwnPropertyNames$1","hasRequiredGetOwnPropertyNames","requireGetOwnPropertyNames","getOwnPropertyNamesExports","_Object$getOwnPropertyNames","getOwnPropertySymbols$2","hasRequiredGetOwnPropertySymbols$2","requireGetOwnPropertySymbols$2","getOwnPropertySymbols$1","hasRequiredGetOwnPropertySymbols$1","requireGetOwnPropertySymbols$1","hasRequiredGetOwnPropertySymbols","requireGetOwnPropertySymbols","getOwnPropertySymbolsExports","_Object$getOwnPropertySymbols","getOwnPropertyDescriptor$2","es_object_getOwnPropertyDescriptor","hasRequiredEs_object_getOwnPropertyDescriptor","requireEs_object_getOwnPropertyDescriptor","hasRequiredGetOwnPropertyDescriptor$2","requireGetOwnPropertyDescriptor$2","getOwnPropertyDescriptor$1","hasRequiredGetOwnPropertyDescriptor$1","requireGetOwnPropertyDescriptor$1","hasRequiredGetOwnPropertyDescriptor","requireGetOwnPropertyDescriptor","getOwnPropertyDescriptorExports","_Object$getOwnPropertyDescriptor","es_object_getOwnPropertyDescriptors","hasRequiredEs_object_getOwnPropertyDescriptors","requireEs_object_getOwnPropertyDescriptors","ownKeys","getOwnPropertyDescriptors$2","hasRequiredGetOwnPropertyDescriptors$2","requireGetOwnPropertyDescriptors$2","getOwnPropertyDescriptors$1","hasRequiredGetOwnPropertyDescriptors$1","requireGetOwnPropertyDescriptors$1","getOwnPropertyDescriptors","hasRequiredGetOwnPropertyDescriptors","requireGetOwnPropertyDescriptors","getOwnPropertyDescriptorsExports","_Object$getOwnPropertyDescriptors","defineProperties$2","es_object_defineProperties","hasRequiredEs_object_defineProperties","requireEs_object_defineProperties","defineProperties","hasRequiredDefineProperties$2","requireDefineProperties$2","defineProperties$1","hasRequiredDefineProperties$1","requireDefineProperties$1","hasRequiredDefineProperties","requireDefineProperties","definePropertiesExports","_Object$defineProperties","hasRequiredDefineProperty","requireDefineProperty","definePropertyExports","_Object$defineProperty","choosify","subOption","allowed","chosen","chosenEdge","pointInRect","rotationPoint","tmp","right","bottom","isValidLabel","getSelfRefCoordinates","toBorderDist","yFromNodeCenter","xFromNodeCenter","values$3","hasRequiredValues$3","requireValues$3","values$2","hasRequiredValues$2","requireValues$2","values$1","hasRequiredValues$1","requireValues$1","hasRequiredValues","requireValues","valuesExports","_valuesInstanceProperty","LabelAccumulator","measureText","l","mod","tmpText","block","line","tmpLines","tmpLine","firstEmptyBlock","tmpBlocks","tagPattern","MarkupAccumulator","ch","tagName","advance","regExp","matched","nextTag","checkTag","prepared","LabelSplitter","selected","hover","textWidth","font","nlLines","lineCount","blocks","markupSystem","system","parseEntities","beginable","parseOverride","words","newText","appendLast","word","newW","multiFontStyle","Label","body","edgelabel","newFontOptions","outOptions","inOptions","newOptionsArray","fontOptions","widthConstraint","widthConstraintMaximum","widthConstraintMinimum","heightConstraint","heightConstraintMinimum","heightConstraintValign","margins","widthBias","heightBias","dstPile","srcPile","ret","tmpShorthand","opt","multiName","multiFont","optionNames","fontPile","modOptions","tmpMultiFontOptions","baseline","viewFontSize","fontColor","strokeColor","lineMargin","initialStrokeColor","getValue","fontString","inText","NodeBase","labelModule","borderWidth","dashes","margin","DEFAULT_SIZE","Box$1","dimensions","borderRadius","CircleImageBase","imageObj","imageObjAlt","selection_changed","imageTmp","imgPadding","optImgPadding","ratio_width","ratio_height","imgPosLeft","imgPosTop","imgWidth","imgHeight","labelDimensions","yLabel","Circle$1","diameter","CircularImage","labelX","labelY","ShapeBase","_this$customSizeWidth","_this$customSizeHeigh","shape","sizeMultiplier","ownKeys$3","_objectSpread$3","CustomShape","ctxRenderer","drawLater","drawExternalLabel","Database","Diamond$1","Dot","Ellipse","Icon","iconSize","Image$2","side","neutralborderWidth","selectionLineWidth","strokeStyle","fillStyle","Square","Hexagon","Star","Text","Triangle$1","TriangleDown","ownKeys$2","_objectSpread$2","Node","imagelist","grouplist","defaultOptions","currentShape","origin","parentOptions","newOptions","groupList","groupObj","skipProperties","parsedColor","currentGroup","total","scale","sizeDiff","fontDiff","strId","NodesHandler","images","groups","layoutEngine","nodeId","nodes","doNotEmit","oldNodesData","ids","newNodes","changedData","oldData","dataChanged","oldValue","constructorClass","clearPositions","dataArray","dataset","dsNode","bodyNode","nodeList","nodeObj","edgeList","es_math_hypot","hasRequiredEs_math_hypot","requireEs_math_hypot","$hypot","sqrt","value1","value2","sum","aLen","larg","hypot$2","hasRequiredHypot$2","requireHypot$2","hypot$1","hasRequiredHypot$1","requireHypot$1","hypot","hasRequiredHypot","requireHypot","hypotExports","_Math$hypot","EndPoint","points","arrowData","xt","yt","Image$1","Arrow","Crow","Curve","pi","startAngle","endAngle","InvertedCurve","Triangle","InvertedTriangle","Circle","Bar","Box","Diamond","Vee","EndPoints","ownKeys$1","_objectSpread$1","EdgeBase","_selected","_hover","viaNode","fromPoint","toPoint","_fromPoint","_toPoint","coordinates","nearNode","high","maxIterations","threshold","middle","endPointOffset","iteration","distanceToBorder","distanceToPoint","difference","grd","fromColor","toColor","angleFrom","angleTo","pointTFrom","pointTTo","x1","y1","x3","y3","px","py","something","u","arrowPoint","node1","node2","reversed","scaleFactor","lineWidth","approximateEdgeLength","relativeLength","pointT","guidePos","halfLength","guidePos1","guidePos2","xi","yi","origCtxAttr","_objectSpread","BezierEdgeBase","via","minDistance","lastX","lastY","viaNode1","viaNode2","BezierEdgeDynamic","physicsChange","cx","cy","cr","BezierEdgeStatic","stepX","stepY","xVia","yVia","myAngle","CubicBezierEdgeBase","via1","via2","vec","CubicBezierEdge","viaNodes","roundness","StraightEdge","edgeSegmentLength","toBorderPoint","Edge","affectsLayout","copyFromGlobals","arrows","colorsDefined","toArrow","fromArrow","middleArrow","inheritsColor","selectedWidth","hoverWidth","smooth","changeInType","widthDiff","xFrom","yFrom","xTo","yTo","xObj","yObj","EdgesHandler","edgeId","edgeData","smoothOptions","edges","oldEdgesData","edgesData","oldEdge","edgesToDelete","toNode","fromNode","addIds","BarnesHutSolver","physicsBody","nodeIndices","nodeCount","barnesHutTree","parentBranch","gravityForce","fx","fy","minX","minY","maxX","maxY","rootSize","halfRootSize","centerOfMass","totalMass","totalMassInv","biggestSize","skipMassUpdate","region","children","containedNode","childSize","branch","RepulsionSolver","repulsingForce","forces","nodeDistance","HierarchicalRepulsionSolver","theseNodesDistance","steepness","SpringSolver","edgeLength","edgeIndices","node3","springForce","HierarchicalSpringSolver","springFx","springFy","totalFx","totalFy","correctionFx","correctionFy","CentralGravitySolver","ForceAtlas2BasedRepulsionSolver","degree","ForceAtlas2BasedCentralGravitySolver","PhysicsEngine","wind","startTime","amountOfIterations","nodeIds","velocities","dpos","reference","posThreshold","maxNodeVelocity","averageNodeVelocity","velocityAdaptiveThreshold","nodeVelocity","m","df","maxV","fixed","running","sendProgress","colorFactor","forceSize","arrowSize","byteToHex","unsafeStringify","getRandomValues","rnds8","rng","native","_v4","buf","rnds","v4","NetworkUtil","allNodes","specificNodes","clonedOptions","Cluster","childClusterId","childCluster","clusterEdge","parentClusterEdge","srcId","ClusterEngine","hubsize","nodesToCluster","refreshData","childNodesObj","childEdgesObj","edgeCount","clusters","usedNodes","relevantEdgeCount","checkJoinCondition","gatheringSuccessful","childNodeId","foundCluster","parentNodeId","parentClonedOptions","childClonedOptions","childNodeIDs","childNode","childNodeKey","childEdge","clusterNodeProperties","clusterEdgeProperties","toId","fromId","otherNodeId","childKeys","createEdges","newEdges","getNewEdge","createdEdge","newEdge","matchToDirection","matchFromDirection","tmpNodesToRemove","childNodesOptions","childEdgesOptions","clusterId","clusterNode","originalOptions","clusterNodeId","parentIndex","parentClusterNodeId","containedNodes","containedEdges","positions","clusterPosition","newPositions","edgesToBeDeleted","otherNode","transferId","transferEdge","otherCluster","nodesArray","clusteredNodeId","startEdgeId","allEdgeIds","clusteredEdgeId","IdsToHandle","doneIds","foundIds","nextId","nextEdge","replacingIds","replacingId","average","averageSquared","hubCounter","largestHub","variance","standardDeviation","hubThreshold","baseEdge","extraOptions","childNodes","childEdges","clusteredNode","deletedNodeIds","deletedEdgeIds","eachClusterNode","replacedIds","numValid","containedEdgeId","containedEdge","deletedEdgeId","shouldBeClustered","clusterFrom","clusterTo","continueLoop","clustersToOpen","numNodes","allowSingle","CanvasRenderer","canvas","hidden","drawExternalLabels","alwaysShow","hovered","topLeft","bottomRight","viewableArea","selectedLength","hoveredLength","setInterval$1","hasRequiredSetInterval$1","requireSetInterval$1","hasRequiredSetInterval","requireSetInterval","setIntervalExports","_setInterval","onTouch","onRelease","Canvas","observer","frame","resizeTimer","resizeFunction","widthRatio","heightRatio","newScale","currentViewCenter","distanceFromCenter","emitEvent","oldWidth","oldHeight","previousRatio","newWidth","newHeight","numerator","denominator","normalizeFitOptions","rawOptions","allNodeIds","View","initialZoom","canvasWidth","canvasHeight","zoomLevel","positionDefined","xDistance","yDistance","xZoomLevel","yZoomLevel","animationOptions","nodePosition","viewCenter","sourceTranslation","targetTranslation","finished","progress","keycharm","preventDefault","_exportFunctions","_bound","_keys","down","handleEvent","up","bound","newBindings","NavigationHandler","navigationDivs","navigationDivActions","hammerFrame","action","boundAction","scaleOld","translation","scaleFrac","tx","ty","_context10","_context11","_context12","_context13","_context14","_context15","_context16","_context17","_context18","_context19","_context20","_context21","_context22","_context23","_context24","_context25","InteractionHandler","selectionHandler","multiselect","firstSet","secondSet","arrayDiff","firstArr","secondArr","selection","diffX","diffY","selectionBoxPosition","selectionBoxPositionMinMax","toBeSelectedNodes","preScaleDragPointer","postScaleDragPointer","popupVisible","pointerObj","previousPopupObjId","nodeUnderCursor","popupType","overlappingNodes","overlappingEdges","stillOnObj","overNode","es_set","es_set_constructor","hasRequiredEs_set_constructor","requireEs_set_constructor","hasRequiredEs_set","requireEs_set","es_set_difference_v2","aSet","hasRequiredASet","requireASet","setHelpers","hasRequiredSetHelpers","requireSetHelpers","Set","SetPrototype","iterateSimple","hasRequiredIterateSimple","requireIterateSimple","record","ITERATOR_INSTEAD_OF_RECORD","setIterate","hasRequiredSetIterate","requireSetIterate","interruptible","setClone","hasRequiredSetClone","requireSetClone","SetHelpers","setSize","hasRequiredSetSize","requireSetSize","getIteratorDirect","hasRequiredGetIteratorDirect","requireGetIteratorDirect","getSetRecord","hasRequiredGetSetRecord","requireGetSetRecord","INVALID_SIZE","SetRecord","intSize","numSize","setDifference","hasRequiredSetDifference","requireSetDifference","clone","iterateSet","remove","other","otherRec","setMethodAcceptSetLike","hasRequiredSetMethodAcceptSetLike","requireSetMethodAcceptSetLike","hasRequiredEs_set_difference_v2","requireEs_set_difference_v2","SET_LIKE_INCORRECT_BEHAVIOR","setLike","baseSet","es_set_intersection_v2","setIntersection","hasRequiredSetIntersection","requireSetIntersection","hasRequiredEs_set_intersection_v2","requireEs_set_intersection_v2","intersection","INCORRECT","es_set_isDisjointFrom_v2","setIsDisjointFrom","hasRequiredSetIsDisjointFrom","requireSetIsDisjointFrom","hasRequiredEs_set_isDisjointFrom_v2","requireEs_set_isDisjointFrom_v2","isDisjointFrom","es_set_isSubsetOf_v2","setIsSubsetOf","hasRequiredSetIsSubsetOf","requireSetIsSubsetOf","hasRequiredEs_set_isSubsetOf_v2","requireEs_set_isSubsetOf_v2","isSubsetOf","es_set_isSupersetOf_v2","setIsSupersetOf","hasRequiredSetIsSupersetOf","requireSetIsSupersetOf","hasRequiredEs_set_isSupersetOf_v2","requireEs_set_isSupersetOf_v2","isSupersetOf","es_set_symmetricDifference_v2","setSymmetricDifference","hasRequiredSetSymmetricDifference","requireSetSymmetricDifference","keysIter","setMethodGetKeysBeforeCloningDetection","hasRequiredSetMethodGetKeysBeforeCloningDetection","requireSetMethodGetKeysBeforeCloningDetection","hasRequiredEs_set_symmetricDifference_v2","requireEs_set_symmetricDifference_v2","symmetricDifference","setMethodGetKeysBeforeCloning","es_set_union_v2","setUnion","hasRequiredSetUnion","requireSetUnion","hasRequiredEs_set_union_v2","requireEs_set_union_v2","union","set$2","hasRequiredSet$2","requireSet$2","set$1","hasRequiredSet$1","requireSet$1","hasRequiredSet","requireSet","setExports","_Set","es_weakMap","es_weakMap_constructor","collectionWeak","hasRequiredCollectionWeak","requireCollectionWeak","ArrayIterationModule","findIndex","uncaughtFrozenStore","UncaughtFrozenStore","findUncaughtFrozen","hasRequiredEs_weakMap_constructor","requireEs_weakMap_constructor","enforceInternalState","isFrozen","isSealed","freeze","seal","IS_IE11","InternalWeakMap","$WeakMap","WeakMapPrototype","nativeSet","hasMSEdgeFreezingBug","frozenArray","nativeDelete","nativeHas","nativeGet","arrayIntegrityLevel","hasRequiredEs_weakMap","requireEs_weakMap","weakMap$2","hasRequiredWeakMap$2","requireWeakMap$2","weakMap$1","hasRequiredWeakMap$1","requireWeakMap$1","weakMap","hasRequiredWeakMap","requireWeakMap","weakMapExports","_WeakMap","_classPrivateFieldInitSpec","_checkPrivateRedeclaration","_classPrivateFieldSet","_assertClassBrand","_classPrivateFieldGet","diffSets","diff","_previousSelection","_selection","SingleTypeSelectionAccumulator","_len2","_key2","changes","_nodes","_edges","_commitHandler","SelectionAccumulator","commitHandler","summary","SelectionHandler","selectionChanged","oldSelection","emptySelection","highlightEdges","canvasPos","returnNode","positionObject","returnEdge","mindist","overlappingEdge","dist","hoverChanged","hoveredEdgesCount","hoveredNodesCount","newOnlyHoveredEdge","newOnlyHoveredNode","selectionChanges","previousSelection","es_array_sort","arraySort","hasRequiredArraySort","requireArraySort","comparefn","llength","rlength","lindex","rindex","environmentFfVersion","hasRequiredEnvironmentFfVersion","requireEnvironmentFfVersion","firefox","environmentIsIeOrEdge","hasRequiredEnvironmentIsIeOrEdge","requireEnvironmentIsIeOrEdge","UA","environmentWebkitVersion","hasRequiredEnvironmentWebkitVersion","requireEnvironmentWebkitVersion","webkit","hasRequiredEs_array_sort","requireEs_array_sort","internalSort","FF","IE_OR_EDGE","V8","WEBKIT","nativeSort","FAILS_ON_UNDEFINED","FAILS_ON_NULL","STABLE_SORT","getSortCompare","arrayLength","itemsLength","sort$3","hasRequiredSort$3","requireSort$3","sort$2","hasRequiredSort$2","requireSort$2","sort$1","hasRequiredSort$1","requireSort$1","hasRequiredSort","requireSort","sortExports","_sortInstanceProperty","es_array_reduce","arrayReduce","hasRequiredArrayReduce","requireArrayReduce","REDUCE_EMPTY","IS_RIGHT","memo","environmentIsNode","hasRequiredEnvironmentIsNode","requireEnvironmentIsNode","hasRequiredEs_array_reduce","requireEs_array_reduce","$reduce","CHROME_VERSION","IS_NODE","CHROME_BUG","reduce$3","hasRequiredReduce$3","requireReduce$3","reduce$2","hasRequiredReduce$2","requireReduce$2","reduce$1","hasRequiredReduce$1","requireReduce$1","reduce","hasRequiredReduce","requireReduce","reduceExports","_reduceInstanceProperty","DirectionInterface","level","nodeArray","VerticalStrategy","layout","res","HorizontalStrategy","es_array_every","hasRequiredEs_array_every","requireEs_array_every","$every","every$3","hasRequiredEvery$3","requireEvery$3","every$2","hasRequiredEvery$2","requireEvery$2","every$1","hasRequiredEvery$1","requireEvery$1","every","hasRequiredEvery","requireEvery","everyExports","_everyInstanceProperty","fillLevelsByDirectionCyclic","levels","fillLevelsByDirectionLeaves","fillLevelsByDirection","newLevel","oldLevel","fillLevelsByDirectionRoots","isEntryNode","shouldLevelBeReplaced","limit","acc","edgeIdProp","newLevelDiff","entryNodeId","entryNode","targetNodeId","HierarchicalStatus","treeId","accumulator","_getMaxLevel","nodeA","nodeB","remap","uniqueSortedLevels","min_x","max_x","min_y","max_y","parents1","parents2","curLevel","LayoutEngine","allOptions","hierarchical","prevHierarchicalState","backupPhysics","indices","clusterThreshold","clusterOptions","startLength","before","after","clustersPresent","definedLevel","undefinedLevel","sortMethod","distribution","stillShifting","branches","shiftTrees","treeSizes","getTreeSizes","shiftBy","shiftTree","trees","treeWidths","getBranchNodes","getBranchBoundary","branchMap","maxLevel","minSpace","maxSpace","branchNode","minSpaceNode","maxSpaceNode","getCollisionLevel","maxLevel1","maxLevel2","shiftElementsCloser","centerParents","hier","levelNodes","branchShiftCallback","centerParent","pos1","pos2","diffAbs","nodeSpacing","branchNodes1","branchNodes2","branchNodeBoundary1","branchNodeBoundary2","max1","min2","minSpace2","minimizeEdgeLength","allEdges","nodeLevel","C2","referenceNodes","aboveEdges","getFx","getDFx","getGuess","guess","guessMap","dfx","ratio","moveBranch","branchNodes","branchBoundary","minSpaceBranch","maxSpaceBranch","branchOffset","moveNode","newPosition","minimizeEdgeLengthBottomUp","shiftBranchesCloserBottomUp","centerAllParents","centerAllParentsBottomUp","useMap","ordering","prevNode","prevPos","nextNode","nextPos","parents","parentId","parentNode","handledNodeCount","spacing","parentLevel","childRef","childNodeLevel","previousPos","sharedParent","idArray","hubSizes","hubSize","levelDownstream","customCallback","levelByDirection","levelA","fillInRelations","startingNodeId","crawler","tree","treeIndex","shifter","childA","childB","iterateParents","parentRef","findParent","minPos","maxPos","ManipulationSystem","interactionHandler","selectedNodeCount","selectedEdgeCount","selectedTotalCount","locale","needSeperator","finalizedData","controlNodeFrom","controlNodeTo","selectedNodes","selectedEdges","deleteFunction","_this$options$locales","_this$options$locales2","controlNodeStyle","button","deleteBtnClass","className","labelClassName","newFunction","UIfunctionName","eventName","domElement","keyupListener","_ref","keyCode","indexTempEdge","_context26","indexTempNode","_context27","fromSelect","toSelect","overlappingNodeIds","targetNode","connectionEdge","connectFromId","_context28","_context29","clickData","defaultData","sourceNodeId","eeFunct","bool","dom","any","endPoints","nodeOptions","configuratorHideOption","parentPath","optionName","FloydWarshall","edgesArray","D_matrix","cell","knode","kcolm","inode","icolm","jnode","jcolm","KamadaKawai","edgeStrength","ignoreClusters","innerThreshold","maxInnerIterations","maxEnergy","highE_nodeId","dE_dx","dE_dy","delta_m","subIterations","maxEnergyNodeId","dE_dx_max","dE_dy_max","nodeIdx","d2E_dx2","d2E_dxdy","d2E_dy2","x_m","y_m","km","lm","iIdx","x_i","y_i","kmat","lmat","mIdx","colm","lcolm","oldDx","oldDy","Network","networkOptions","edgeNodesPresent","gephiData","valueMin","valueMax","valueTotal","objectId","parseDOTNetwork"],"sourceRoot":""}
.
Edit
..
Edit
1117.145ac642f59357bc40d8.js
Edit
1117.145ac642f59357bc40d8.js.map
Edit
1118.c684d1aadf16a6c70620.js
Edit
1118.c684d1aadf16a6c70620.js.map
Edit
1122.5fbf0d7cd148c610616d.js
Edit
1122.5fbf0d7cd148c610616d.js.map
Edit
1142.a4b35a0e8699cafd901e.js
Edit
1142.a4b35a0e8699cafd901e.js.map
Edit
1162.81868b3ac499fa5ea04b.js
Edit
1162.81868b3ac499fa5ea04b.js.map
Edit
1183.7444f51e5996a7f23c7d.js
Edit
1183.7444f51e5996a7f23c7d.js.map
Edit
1282.ae38cac1b732d8ac1d96.js
Edit
1282.ae38cac1b732d8ac1d96.js.map
Edit
130.a58aaeea748f37ee6482.js
Edit
130.a58aaeea748f37ee6482.js.map
Edit
1419.59f53ae25085b28e1e11.js
Edit
1419.59f53ae25085b28e1e11.js.map
Edit
1420.e63ce495727f83b8887d.js
Edit
1420.e63ce495727f83b8887d.js.map
Edit
1438.ccdd05d7188edf4191ff.js
Edit
1438.ccdd05d7188edf4191ff.js.map
Edit
1446.fe7b1f4563629b80793f.js
Edit
1446.fe7b1f4563629b80793f.js.map
Edit
1484.3da94e44ecdadcd342d4.js
Edit
1484.3da94e44ecdadcd342d4.js.map
Edit
1492.4026c6e7130c3afdae87.js
Edit
1494.ef220afb67ff6c52c7af.js
Edit
1494.ef220afb67ff6c52c7af.js.map
Edit
1560.538cd2395be11ba4e2c9.js
Edit
1560.538cd2395be11ba4e2c9.js.map
Edit
1579.c391ef869d4f7bfc0d1c.js
Edit
1579.c391ef869d4f7bfc0d1c.js.map
Edit
1646.d7d87a40853795910533.js
Edit
1646.d7d87a40853795910533.js.map
Edit
1710.7db3f56c6714c0c340e0.js
Edit
1710.7db3f56c6714c0c340e0.js.map
Edit
1716.f71f518289da5d2229bc.js
Edit
1716.f71f518289da5d2229bc.js.map
Edit
1740.baf38e7ee007e1a6935e.js
Edit
1740.baf38e7ee007e1a6935e.js.map
Edit
1821.c9a2456dc8d78cf6b02f.js
Edit
1821.c9a2456dc8d78cf6b02f.js.map
Edit
1888.d33142738af4fbf8a230.js
Edit
1888.d33142738af4fbf8a230.js.map
Edit
1914.5f33b3c2133b5bb7ea6e.js
Edit
1914.5f33b3c2133b5bb7ea6e.js.map
Edit
198.65a768ff6c601d19ea3f.js
Edit
198.65a768ff6c601d19ea3f.js.map
Edit
1990.9171129a8deabb59bf30.js
Edit
1990.9171129a8deabb59bf30.js.map
Edit
2018.5ff00ee0456301c1cf43.js
Edit
2018.5ff00ee0456301c1cf43.js.map
Edit
205.2eb73847215c8d021cc9.js
Edit
205.2eb73847215c8d021cc9.js.map
Edit
2077.a5848ca4b4b9fdebca17.js
Edit
2077.a5848ca4b4b9fdebca17.js.map
Edit
2094.97e7f0876201e76a77fd.js
Edit
2094.97e7f0876201e76a77fd.js.map
Edit
2150.7576285186c713978b39.js
Edit
2150.7576285186c713978b39.js.map
Edit
2152.b55841e6f422682a3891.js
Edit
2152.b55841e6f422682a3891.js.map
Edit
221.0fc4d14d0a67f3a25d64.js
Edit
221.0fc4d14d0a67f3a25d64.js.map
Edit
2218.623d73bd0985ddf5f8c4.js
Edit
2218.623d73bd0985ddf5f8c4.js.map
Edit
2223.e65417164a45701ed9dc.js
Edit
2223.e65417164a45701ed9dc.js.map
Edit
2244.70c156ada2487a05595c.js
Edit
2244.70c156ada2487a05595c.js.map
Edit
2278.f887de0a65e1b784ea9f.js
Edit
2278.f887de0a65e1b784ea9f.js.map
Edit
2288.6a65ba08c6c0f4f83435.js
Edit
2288.6a65ba08c6c0f4f83435.js.map
Edit
2311.73e1a2b949d289f5d6c9.js
Edit
2311.73e1a2b949d289f5d6c9.js.map
Edit
2398.d142e32be48079fc63c0.js
Edit
2398.d142e32be48079fc63c0.js.map
Edit
2405.c1b37a7cc8182472f6a6.js
Edit
2405.c1b37a7cc8182472f6a6.js.map
Edit
2446.0418c7ea000998178d8b.js
Edit
2446.0418c7ea000998178d8b.js.map
Edit
2450.d73c024ff7273aebf911.js
Edit
2450.d73c024ff7273aebf911.js.map
Edit
2586.668c65b61e9ea31b5bca.js
Edit
2586.668c65b61e9ea31b5bca.js.map
Edit
265.ed6933785cc750cbd9ed.js
Edit
265.ed6933785cc750cbd9ed.js.map
Edit
2658.7f70ebc378803654a814.js
Edit
2658.7f70ebc378803654a814.js.map
Edit
2686.ae267304ddd1380c30c7.js
Edit
2686.ae267304ddd1380c30c7.js.map
Edit
2692.fa24ada7d987a7ee05f1.js
Edit
2692.fa24ada7d987a7ee05f1.js.map
Edit
2699.b79e57051a1a63376320.js
Edit
2699.b79e57051a1a63376320.js.map
Edit
2710.e1ac8e57578a838f5bd8.js
Edit
2710.e1ac8e57578a838f5bd8.js.map
Edit
2744.d6b14bf01022bdb8eab5.js
Edit
2744.d6b14bf01022bdb8eab5.js.map
Edit
2745.8049d948cb362dfc6cb3.js
Edit
2745.8049d948cb362dfc6cb3.js.map
Edit
2835.01beb5b1a252d779aad7.js
Edit
2835.01beb5b1a252d779aad7.js.map
Edit
2961.4b27b21453fdbb115dd4.js
Edit
2961.4b27b21453fdbb115dd4.js.map
Edit
2962.85c9dc0cca68efab5e0c.js
Edit
2962.85c9dc0cca68efab5e0c.js.map
Edit
2975.e64aaea6ff35a7d3b3fd.js
Edit
2975.e64aaea6ff35a7d3b3fd.js.map
Edit
3003.f51365051eb27cf765d8.js
Edit
3003.f51365051eb27cf765d8.js.map
Edit
3042.44bad7d2d0536000b808.js
Edit
3042.44bad7d2d0536000b808.js.map
Edit
3062.ad5844391370fcc7525a.js
Edit
3062.ad5844391370fcc7525a.js.map
Edit
3082.704af6779ad700a5fa42.js
Edit
3082.704af6779ad700a5fa42.js.map
Edit
3096.aed61083f1ba4803ae84.js
Edit
3096.aed61083f1ba4803ae84.js.map
Edit
3126.10c85e1f02105e470a69.js
Edit
3126.10c85e1f02105e470a69.js.map
Edit
3169.0b88a5a2340f70961599.js
Edit
3169.0b88a5a2340f70961599.js.map
Edit
3171.c79c28e2611563e2dbcb.js
Edit
3171.c79c28e2611563e2dbcb.js.map
Edit
3182.831f754ed3b6f10441a0.js
Edit
3182.831f754ed3b6f10441a0.js.map
Edit
3192.2cb90eadf3399270363e.js
Edit
3192.2cb90eadf3399270363e.js.map
Edit
3217.c6faaa4f5637068f90f3.js
Edit
3217.c6faaa4f5637068f90f3.js.map
Edit
3259.c8e4d6ad93201a56e49f.js
Edit
3259.c8e4d6ad93201a56e49f.js.map
Edit
3284.79c2897655286b0c1f6d.js
Edit
3284.79c2897655286b0c1f6d.js.map
Edit
3303.225dae64cff0c2280c3b.js
Edit
3303.225dae64cff0c2280c3b.js.map
Edit
3326.cabc370d66d7ecfbd2c3.js
Edit
3326.cabc370d66d7ecfbd2c3.js.map
Edit
344.85cff3029cbbb5463c7e.js
Edit
344.85cff3029cbbb5463c7e.js.map
Edit
3466.fda7da0cb4150e59da98.js
Edit
3466.fda7da0cb4150e59da98.js.map
Edit
3474.74dfd856a9528c758a57.js
Edit
3474.74dfd856a9528c758a57.js.map
Edit
348.fd20e2547f12dbed76c7.js
Edit
348.fd20e2547f12dbed76c7.js.map
Edit
3495.9c1ae6f61edf7aef207b.js
Edit
3495.9c1ae6f61edf7aef207b.js.map
Edit
3501.a0ee7c2b24136aa91eb5.js
Edit
3501.a0ee7c2b24136aa91eb5.js.map
Edit
3520.a3c2b474e2dcaf9879fc.js
Edit
3520.a3c2b474e2dcaf9879fc.js.map
Edit
3605.41e3c44dfe2ca2966198.js
Edit
3605.41e3c44dfe2ca2966198.js.map
Edit
362.e5ce68af98ee6713a4e7.js
Edit
362.e5ce68af98ee6713a4e7.js.map
Edit
3622.0b196041f825b42c5233.js
Edit
3622.0b196041f825b42c5233.js.map
Edit
3630.1ffe9229d5c27fd0823a.js
Edit
3630.1ffe9229d5c27fd0823a.js.map
Edit
3659.f5dc1bb19d36546aadb8.js
Edit
3659.f5dc1bb19d36546aadb8.js.map
Edit
3688.ec5e74c60569e9498687.js
Edit
3688.ec5e74c60569e9498687.js.map
Edit
3718.b570aa4fa35f8dfc686e.js
Edit
3718.b570aa4fa35f8dfc686e.js.map
Edit
3726.84ef8bb1304f7adbc7f3.js
Edit
3726.84ef8bb1304f7adbc7f3.js.map
Edit
398.ceeafcf522343c717c4b.js
Edit
398.ceeafcf522343c717c4b.js.map
Edit
4064.e52eb763993ad947e4a1.js
Edit
4064.e52eb763993ad947e4a1.js.map
Edit
407.594046bd73cc88c29e80.js
Edit
407.594046bd73cc88c29e80.js.map
Edit
4113.3fa5432815c4662eb03e.js
Edit
4113.3fa5432815c4662eb03e.js.map
Edit
4114.c4741f0a73781d3f87dc.js
Edit
4114.c4741f0a73781d3f87dc.js.map
Edit
4120.968e1408d894f8515330.js
Edit
4120.968e1408d894f8515330.js.map
Edit
4162.8b8a683fa98d677f9137.js
Edit
4162.8b8a683fa98d677f9137.js.map
Edit
4209.de7f2b850ee1292a67e5.js
Edit
4209.de7f2b850ee1292a67e5.js.map
Edit
4224.cc13db0c6e3f7fdb05c9.js
Edit
4224.cc13db0c6e3f7fdb05c9.js.map
Edit
4251.28e90ad13c8fe749062c.js
Edit
4251.28e90ad13c8fe749062c.js.map
Edit
4334.396d65b7ba31733108e9.js
Edit
4334.396d65b7ba31733108e9.js.map
Edit
4350.6db49924324f8061d361.js
Edit
4350.6db49924324f8061d361.js.map
Edit
4463.24a3e34bed64cbbb8b99.js
Edit
4463.24a3e34bed64cbbb8b99.js.map
Edit
4514.03e966fee9064d7305dd.js
Edit
4514.03e966fee9064d7305dd.js.map
Edit
4564.ea4a09ba96ddbf74a0ee.js
Edit
4564.ea4a09ba96ddbf74a0ee.js.map
Edit
46.7809585ddbb4791e248a.js
Edit
46.7809585ddbb4791e248a.js.map
Edit
4630.54d7f3b9d384c6b95bbc.js
Edit
4630.54d7f3b9d384c6b95bbc.js.map
Edit
4656.a07d832134b096826a58.js
Edit
4656.a07d832134b096826a58.js.map
Edit
468.d3a2ba8b0d226ca1475b.js
Edit
468.d3a2ba8b0d226ca1475b.js.map
Edit
4680.abd86af55b75e75326ab.js
Edit
4680.abd86af55b75e75326ab.js.map
Edit
4691.2f69f76af87a66a1513c.js
Edit
4691.2f69f76af87a66a1513c.js.map
Edit
4698.c9a2c562b12da12dc66e.js
Edit
4698.c9a2c562b12da12dc66e.js.map
Edit
4791.fc3ef0337811ab73b164.js
Edit
4791.fc3ef0337811ab73b164.js.map
Edit
4814.2d8cb562606e508512d8.js
Edit
4814.2d8cb562606e508512d8.js.map
Edit
4824.2da8107f19d58bf153e0.js
Edit
4824.2da8107f19d58bf153e0.js.map
Edit
4839.f4d2edd5c2678ef2b624.js
Edit
4839.f4d2edd5c2678ef2b624.js.map
Edit
4857.4971a98037d2ec3b663d.js
Edit
4857.4971a98037d2ec3b663d.js.map
Edit
4865.be02c1283a83523c4414.js
Edit
4865.be02c1283a83523c4414.js.map
Edit
494.5463fc5a297eaedd150f.js
Edit
494.5463fc5a297eaedd150f.js.map
Edit
4958.226af5f19bf47305a407.js
Edit
4958.226af5f19bf47305a407.js.map
Edit
4962.bbff24c5a85e9314600a.js
Edit
4962.bbff24c5a85e9314600a.js.map
Edit
4964.1f2cc5acc0078feb7b08.js
Edit
4964.1f2cc5acc0078feb7b08.js.map
Edit
4965.ccdc00d808390be53820.js
Edit
4965.ccdc00d808390be53820.js.map
Edit
5065.a2c71dab50ccb4174ee2.js
Edit
5065.a2c71dab50ccb4174ee2.js.map
Edit
5074.92e2d1ae98dcd913506e.js
Edit
5074.92e2d1ae98dcd913506e.js.map
Edit
5091.987ffc33b70121541e5d.js
Edit
5091.987ffc33b70121541e5d.js.map
Edit
5106.581eaf66a6592320d97a.js
Edit
5106.581eaf66a6592320d97a.js.map
Edit
5110.96d49ea826be96c65045.js
Edit
5110.96d49ea826be96c65045.js.map
Edit
5130.cbdddcd716a093bdbaac.js
Edit
5130.cbdddcd716a093bdbaac.js.map
Edit
5196.9b7364caf64a8583ad01.js
Edit
5196.9b7364caf64a8583ad01.js.map
Edit
5198.2cd64d4e16a385dd9b91.js
Edit
5198.2cd64d4e16a385dd9b91.js.map
Edit
5280.2c29942977baa2dfbe0e.js
Edit
5280.2c29942977baa2dfbe0e.js.map
Edit
5364.0288d9c98f74f26b73e7.js
Edit
5364.0288d9c98f74f26b73e7.js.map
Edit
5446.ad01d0b233122dd49849.js
Edit
5446.ad01d0b233122dd49849.js.map
Edit
5550.5bf3e7d23d6b104740fd.js
Edit
5550.5bf3e7d23d6b104740fd.js.map
Edit
5618.909592bbe054b70f2377.js
Edit
5618.909592bbe054b70f2377.js.map
Edit
5648.a1fc2b0cbbca9bfa1d94.js
Edit
5648.a1fc2b0cbbca9bfa1d94.js.map
Edit
5664.c55be32f6d459ac3f3d8.js
Edit
5664.c55be32f6d459ac3f3d8.js.map
Edit
5671.e1e396b75d7b95ef461f.js
Edit
5671.e1e396b75d7b95ef461f.js.map
Edit
5742.117597ec799ab75cb2f4.js
Edit
5742.117597ec799ab75cb2f4.js.map
Edit
5747.b9389680058c12ffba68.js
Edit
5747.b9389680058c12ffba68.js.map
Edit
5757.5a4b7f2368dd09da42be.js
Edit
5786.c45dfaf9e1d969472e5e.js
Edit
5786.c45dfaf9e1d969472e5e.js.map
Edit
5790.29b0a5797fd46e9664f5.js
Edit
5790.29b0a5797fd46e9664f5.js.map
Edit
5923.b9c876b4bf528d8511cb.js
Edit
5923.b9c876b4bf528d8511cb.js.map
Edit
5984.1efdc4bb85100bd19ca9.js
Edit
5984.1efdc4bb85100bd19ca9.js.map
Edit
5995.5c7a375f33ea1cd16daa.js
Edit
5995.5c7a375f33ea1cd16daa.js.map
Edit
6018.befdd11bf701ea71f7bf.js
Edit
6018.befdd11bf701ea71f7bf.js.map
Edit
6029.bdcbf27bcdd36812f646.js
Edit
6029.bdcbf27bcdd36812f646.js.map
Edit
6088.7f526abfdb4003574c68.js
Edit
6088.7f526abfdb4003574c68.js.map
Edit
613.084d33252856771cf6e1.js
Edit
613.084d33252856771cf6e1.js.map
Edit
6185.2a7c893c6b3f2f0dadb8.js
Edit
6185.2a7c893c6b3f2f0dadb8.js.map
Edit
6208.571f272269524cfd14e7.js
Edit
6208.571f272269524cfd14e7.js.map
Edit
6236.30d1fa6aee173c946c50.js
Edit
6236.30d1fa6aee173c946c50.js.map
Edit
6244.64f83fc5d05560979c51.js
Edit
6244.64f83fc5d05560979c51.js.map
Edit
6260.b8be95165766a81dade2.js
Edit
6260.b8be95165766a81dade2.js.map
Edit
630.56b78dcdaeeb9d9c2967.js
Edit
630.56b78dcdaeeb9d9c2967.js.map
Edit
6302.a2ffa52069511df9772f.js
Edit
6302.a2ffa52069511df9772f.js.map
Edit
6315.f4d87fc6f8ae3cb40e38.js
Edit
6315.f4d87fc6f8ae3cb40e38.js.map
Edit
6414.7520859a2d9cc0a63d7f.js
Edit
6414.7520859a2d9cc0a63d7f.js.map
Edit
6446.1d75a8140260005fffbd.js
Edit
6446.1d75a8140260005fffbd.js.map
Edit
6743.67a52a99e2fdd1ae1e10.js
Edit
6743.67a52a99e2fdd1ae1e10.js.map
Edit
6759.0454d3c1e41385379bdc.js
Edit
6759.0454d3c1e41385379bdc.js.map
Edit
6772.0d4a074848bc323be8f8.js
Edit
6772.0d4a074848bc323be8f8.js.map
Edit
680.726adca366b4ecb272db.js
Edit
680.726adca366b4ecb272db.js.map
Edit
6830.a4b0ecf3a6d784ca7609.js
Edit
6830.a4b0ecf3a6d784ca7609.js.map
Edit
6834.0c9ef40e2f2b5428983d.js
Edit
6834.0c9ef40e2f2b5428983d.js.map
Edit
6857.252a60422ee275193aa7.js
Edit
6857.252a60422ee275193aa7.js.map
Edit
6940.b6c74df14413f0188f0d.js
Edit
6940.b6c74df14413f0188f0d.js.map
Edit
6990.d663924714fc213b17c6.js
Edit
6990.d663924714fc213b17c6.js.map
Edit
7018.5a037d2577fedc8d10f1.js
Edit
7018.5a037d2577fedc8d10f1.js.map
Edit
7031.047b15171c23b248efa0.js
Edit
7031.047b15171c23b248efa0.js.map
Edit
7033.141597840e42815ef6a4.js
Edit
7033.141597840e42815ef6a4.js.map
Edit
7048.3746fc9a274bf8ff72f1.js
Edit
7048.3746fc9a274bf8ff72f1.js.map
Edit
7051.604a402d305e093c00c2.js
Edit
7051.604a402d305e093c00c2.js.map
Edit
7061.f18464bcd6c6d7455662.js
Edit
7061.f18464bcd6c6d7455662.js.map
Edit
7080.9cdd1b7a0bf62b48e1fe.js
Edit
7080.9cdd1b7a0bf62b48e1fe.js.map
Edit
7200.d4425528f6cee80f9931.js
Edit
7200.d4425528f6cee80f9931.js.map
Edit
7235.46f071d3e4d0bb976223.js
Edit
7235.46f071d3e4d0bb976223.js.map
Edit
7246.03f5a8496e53f64602e2.js
Edit
7246.03f5a8496e53f64602e2.js.map
Edit
7249.3bea4aaf890f89fdad45.js
Edit
7249.3bea4aaf890f89fdad45.js.map
Edit
7299.cdff402b076dfea09ead.js
Edit
7299.cdff402b076dfea09ead.js.map
Edit
7348.6fd722455e8c7e077815.js
Edit
7348.6fd722455e8c7e077815.js.map
Edit
7396.ded473b7a47dc42fbb59.js
Edit
7396.ded473b7a47dc42fbb59.js.map
Edit
7466.b7c17c526c7b734dd5f7.js
Edit
7466.b7c17c526c7b734dd5f7.js.map
Edit
7539.5f405cae3b15e1e2f6fa.js
Edit
7539.5f405cae3b15e1e2f6fa.js.map
Edit
7585.084552e02c66201a55be.js
Edit
7585.084552e02c66201a55be.js.map
Edit
7626.38819cc0696f2d25cf99.js
Edit
7626.38819cc0696f2d25cf99.js.map
Edit
7651.5024ed8dd1beb08d01ab.js
Edit
7651.5024ed8dd1beb08d01ab.js.map
Edit
7681.7ef7b4f86e99abd7b7e1.js
Edit
7681.7ef7b4f86e99abd7b7e1.js.map
Edit
7691.0ad86f0c686b19ce829e.js
Edit
7691.0ad86f0c686b19ce829e.js.map
Edit
7790.4c141092868e7208a087.js
Edit
7790.4c141092868e7208a087.js.map
Edit
7806.dff3509790e494ca5a45.js
Edit
7806.dff3509790e494ca5a45.js.map
Edit
7836.afe37ef4be354f0a3b91.js
Edit
7836.afe37ef4be354f0a3b91.js.map
Edit
7882.e1721e9d6ac2d421bcda.js
Edit
7882.e1721e9d6ac2d421bcda.js.map
Edit
7886.8499ded396232466be7d.js
Edit
7886.8499ded396232466be7d.js.map
Edit
7887.a6dcfd824d57598ba1c3.js
Edit
7887.a6dcfd824d57598ba1c3.js.map
Edit
7969.a048d8060cabf1aede33.js
Edit
7969.a048d8060cabf1aede33.js.map
Edit
7996.bd232896e4559d37a26f.js
Edit
7996.bd232896e4559d37a26f.js.map
Edit
8016.8145cd87abcdd0646db2.js
Edit
8016.8145cd87abcdd0646db2.js.map
Edit
8018.c31846109f2dff21d8c4.js
Edit
8018.c31846109f2dff21d8c4.js.map
Edit
8056.4e8f71ed4d507f89b487.js
Edit
8056.4e8f71ed4d507f89b487.js.map
Edit
8177.52abd0953ac914f69e26.js
Edit
8177.52abd0953ac914f69e26.js.map
Edit
8220.aeea4a8f0893b3447b56.js
Edit
8220.aeea4a8f0893b3447b56.js.map
Edit
8224.75bd73bf51ff7a2fc4a0.js
Edit
8224.75bd73bf51ff7a2fc4a0.js.map
Edit
8230.d65bce2998eec95c6082.js
Edit
8230.d65bce2998eec95c6082.js.map
Edit
8260.c1da67af19b9259d5651.js
Edit
8260.c1da67af19b9259d5651.js.map
Edit
8271.0ee36e030014244adb47.js
Edit
8271.0ee36e030014244adb47.js.map
Edit
8332.a62e8632a336661f2969.js
Edit
8332.a62e8632a336661f2969.js.map
Edit
8334.1196f5ddcef25711fc25.js
Edit
8334.1196f5ddcef25711fc25.js.map
Edit
8347.de402f9280cd7a316c57.js
Edit
8347.de402f9280cd7a316c57.js.map
Edit
8390.9de755da2e214cc845a3.js
Edit
8390.9de755da2e214cc845a3.js.map
Edit
8393.30e95ae45cbe5455dcda.js
Edit
8393.30e95ae45cbe5455dcda.js.map
Edit
8477.4dad0537d13cf9315e86.js
Edit
8477.4dad0537d13cf9315e86.js.map
Edit
8494.659892f00c9d15ae441a.js
Edit
8494.659892f00c9d15ae441a.js.map
Edit
8530.0460c988ee4a40ce7769.js
Edit
8530.0460c988ee4a40ce7769.js.map
Edit
8542.317c15ed57f68fcf0c97.js
Edit
8542.317c15ed57f68fcf0c97.js.map
Edit
8547.390120a5caf7646e0e3e.js
Edit
8547.390120a5caf7646e0e3e.js.map
Edit
8566.5c8f392bb383ab92eed0.js
Edit
8566.5c8f392bb383ab92eed0.js.map
Edit
8622.5acf73c1485a11dfb0ab.js
Edit
8622.5acf73c1485a11dfb0ab.js.map
Edit
8706.f17afa6bcdfd511d5b03.js
Edit
8706.f17afa6bcdfd511d5b03.js.map
Edit
874.d24410518317d605c708.js
Edit
874.d24410518317d605c708.js.map
Edit
8813.e5137844631f6ddedbce.js
Edit
8813.e5137844631f6ddedbce.js.map
Edit
8856.2720526447b3adb5c75f.js
Edit
8856.2720526447b3adb5c75f.js.map
Edit
886.5f3383e84b10a6530b97.js
Edit
886.5f3383e84b10a6530b97.js.map
Edit
8864.2f4ee982114c25634e55.js
Edit
8864.2f4ee982114c25634e55.js.map
Edit
8902.71f14964ec6cea84dc8e.js
Edit
8902.71f14964ec6cea84dc8e.js.map
Edit
8932.e59e50ddb63414e0f2b9.js
Edit
8932.e59e50ddb63414e0f2b9.js.map
Edit
8990.665213a5c89afd6b2f83.js
Edit
8990.665213a5c89afd6b2f83.js.map
Edit
9034.a32e36472481cbe5d72d.js
Edit
9034.a32e36472481cbe5d72d.js.map
Edit
9038.f03b25f160057d4a0bf6.js
Edit
9038.f03b25f160057d4a0bf6.js.map
Edit
904.b68cd2a0cd6d68c5f1ae.js
Edit
904.b68cd2a0cd6d68c5f1ae.js.map
Edit
9044.441f64d6d946cc93be46.js
Edit
9044.441f64d6d946cc93be46.js.map
Edit
9147.8309cadbc384209d62e5.js
Edit
9147.8309cadbc384209d62e5.js.map
Edit
9150.38487365ffd149b730af.js
Edit
9150.38487365ffd149b730af.js.map
Edit
9292.e6befb57f8f116ad95a8.js
Edit
9292.e6befb57f8f116ad95a8.js.map
Edit
9355.95d7e1782f93f339549e.js
Edit
9355.95d7e1782f93f339549e.js.map
Edit
9388.88d95a230e9432e7037b.js
Edit
9388.88d95a230e9432e7037b.js.map
Edit
9390.c72fcd228017f7647b38.js
Edit
9390.c72fcd228017f7647b38.js.map
Edit
9414.642bfe0d5eb16efd0c16.js
Edit
9414.642bfe0d5eb16efd0c16.js.map
Edit
9449.502f2a824d0203e88d4d.js
Edit
9449.502f2a824d0203e88d4d.js.map
Edit
946.48c5e8c688cf29424295.js
Edit
946.48c5e8c688cf29424295.js.map
Edit
9473.e6fc327da88d88712828.js
Edit
9473.e6fc327da88d88712828.js.map
Edit
9510.1e255e96fe40aad2ed6f.js
Edit
9510.1e255e96fe40aad2ed6f.js.map
Edit
9521.e65411d726c29d77c526.js
Edit
9521.e65411d726c29d77c526.js.map
Edit
9538.a2289ff9ad06e24e391f.js
Edit
9538.a2289ff9ad06e24e391f.js.map
Edit
957.3c35d66aa698d8bdfe05.js
Edit
957.3c35d66aa698d8bdfe05.js.map
Edit
9571.41558d40bff9ea8c0726.js
Edit
9571.41558d40bff9ea8c0726.js.map
Edit
9578.9cfae16465bb9bc1f336.js
Edit
9578.9cfae16465bb9bc1f336.js.map
Edit
968.d4b150f9211c478b7b05.js
Edit
968.d4b150f9211c478b7b05.js.map
Edit
970.46f17b76711e4961a575.js
Edit
970.46f17b76711e4961a575.js.map
Edit
9700.02180b7a06c8a1f7606b.js
Edit
9700.02180b7a06c8a1f7606b.js.map
Edit
9744.aa6baaf988a68fa6a9ba.js
Edit
9744.aa6baaf988a68fa6a9ba.js.map
Edit
9820.6b462d83575efd05c883.js
Edit
9820.6b462d83575efd05c883.js.map
Edit
9838.06bd7dfd4290786f80e3.js
Edit
9838.06bd7dfd4290786f80e3.js.map
Edit
9992.fb08517d3ff77e887443.js
Edit
9992.fb08517d3ff77e887443.js.map
Edit
9996.21c451f22ff76b4bb683.js
Edit
9996.21c451f22ff76b4bb683.js.map
Edit
AdminAuthentication.076c98c6380fd1e42f7e.js
Edit
AdminAuthentication.076c98c6380fd1e42f7e.js.map
Edit
AdminEditOrgPage.8df8167ea6ff8f4803bd.js
Edit
AdminEditOrgPage.8df8167ea6ff8f4803bd.js.map
Edit
AdminListOrgsPage.176dac9ed391bda8952b.js
Edit
AdminListOrgsPage.176dac9ed391bda8952b.js.map
Edit
AdminSettings.7373ed8fa9b943bb2098.js
Edit
AdminSettings.7373ed8fa9b943bb2098.js.map
Edit
AlertGroups.81264e6e5009c36eed6e.js
Edit
AlertGroups.81264e6e5009c36eed6e.js.map
Edit
AlertRuleListIndex.98e7328feeaa2ffe67eb.js
Edit
AlertRuleListIndex.98e7328feeaa2ffe67eb.js.map
Edit
AlertingDisabled.b2c834be0ca4666dd793.js
Edit
AlertingDisabled.b2c834be0ca4666dd793.js.map
Edit
AlertingGroupDetails.3a2c6ef8085b505852e4.js
Edit
AlertingGroupDetails.3a2c6ef8085b505852e4.js.map
Edit
AlertingGroupEdit.69cfe9d5f37a1fc65326.js
Edit
AlertingGroupEdit.69cfe9d5f37a1fc65326.js.map
Edit
AlertingHome.06f307ab9a2a5d8b7f93.js
Edit
AlertingHome.06f307ab9a2a5d8b7f93.js.map
Edit
AlertingImportFromDSRules.f1224bcb622d25e2c94f.js
Edit
AlertingImportFromDSRules.f1224bcb622d25e2c94f.js.map
Edit
AlertingRedirectToRule.9ed1d16829d6833d2827.js
Edit
AlertingRedirectToRule.9ed1d16829d6833d2827.js.map
Edit
AlertingRuleForm.2e69d3f00eb6221e7355.js
Edit
AlertingRuleForm.2e69d3f00eb6221e7355.js.map
Edit
AlertingSettings.7a5f782f877cec4790cb.js
Edit
AlertingSettings.7a5f782f877cec4790cb.js.map
Edit
AlertingTriage.1174f36b4937ad0047c1.js
Edit
AlertingTriage.1174f36b4937ad0047c1.js.map
Edit
BenchmarksPage.ef387f4598ba2b2236ad.js
Edit
BenchmarksPage.ef387f4598ba2b2236ad.js.map
Edit
BookmarksPage.8fe93eb7377073f0c985.js
Edit
BookmarksPage.8fe93eb7377073f0c985.js.map
Edit
ChangePasswordPage.f21b0b1dd107ccd33c1a.js
Edit
ChangePasswordPage.f21b0b1dd107ccd33c1a.js.map
Edit
Connections.949b6389e73bcadb2109.js
Edit
Connections.949b6389e73bcadb2109.js.map
Edit
ContactPoints.9ae2d1927d60c6169b87.js
Edit
ContactPoints.9ae2d1927d60c6169b87.js.map
Edit
CorrelationsFeatureToggle.ec2f1aefce6b456e15eb.js
Edit
CorrelationsFeatureToggle.ec2f1aefce6b456e15eb.js.map
Edit
CorrelationsPage.bd7fcd24ed0b5fe8ac3e.js
Edit
CorrelationsPage.bd7fcd24ed0b5fe8ac3e.js.map
Edit
CreateTeam.429acf93986740280312.js
Edit
CreateTeam.429acf93986740280312.js.map
Edit
DashboardImport.3e9b6f980b81d6f1c755.js
Edit
DashboardImport.3e9b6f980b81d6f1c755.js.map
Edit
DashboardListPage.abeb0c29f072f888f9fb.js
Edit
DashboardListPage.abeb0c29f072f888f9fb.js.map
Edit
DashboardPage.72557fe6dd1a022b7d48.js
Edit
DashboardPage.72557fe6dd1a022b7d48.js.map
Edit
DashboardPageProxy.80adfefad8a885d8e2ef.js
Edit
DashboardPageProxy.80adfefad8a885d8e2ef.js.map
Edit
DashboardScenePage.83fe1fa9509b50120d65.js
Edit
DashboardScenePage.83fe1fa9509b50120d65.js.map
Edit
EditContactPoint.0c33428ddc8ba974d946.js
Edit
EditContactPoint.0c33428ddc8ba974d946.js.map
Edit
EditMuteTiming.8760cc9c77560acf0cd6.js
Edit
EditMuteTiming.8760cc9c77560acf0cd6.js.map
Edit
EditRepositoryPage.d71faaab1af2c8d70a22.js
Edit
EditRepositoryPage.d71faaab1af2c8d70a22.js.map
Edit
EmbeddedDashboard.57de550bce819e3d52e6.js
Edit
EmbeddedDashboard.57de550bce819e3d52e6.js.map
Edit
FileHistoryPage.154ab77c19bbe0ebed20.js
Edit
FileHistoryPage.154ab77c19bbe0ebed20.js.map
Edit
FileStatusPage.36f58cd61202ec603d22.js
Edit
FileStatusPage.36f58cd61202ec603d22.js.map
Edit
FolderAlerting.0b9acb6c42276aaee57d.js
Edit
FolderAlerting.0b9acb6c42276aaee57d.js.map
Edit
FolderLibraryPanelsPage.44f8cabf542ec314d176.js
Edit
FolderLibraryPanelsPage.44f8cabf542ec314d176.js.map
Edit
GettingStartedPage.4bea37f1c9bdcfd0f41b.js
Edit
GettingStartedPage.4bea37f1c9bdcfd0f41b.js.map
Edit
GlobalConfig.1377596507974d18caf6.js
Edit
GlobalConfig.1377596507974d18caf6.js.map
Edit
HistoryPage.4da98f4fa313ee3676ca.js
Edit
HistoryPage.4da98f4fa313ee3676ca.js.map
Edit
LdapSettingsPage.0e9f08d5e59150ecf466.js
Edit
LdapSettingsPage.0e9f08d5e59150ecf466.js.map
Edit
LibraryPanelsPage.824580d7751526c658e2.js
Edit
LibraryPanelsPage.824580d7751526c658e2.js.map
Edit
ListPublicDashboardPage.64c26ffd3ebe6c9076f3.js
Edit
ListPublicDashboardPage.64c26ffd3ebe6c9076f3.js.map
Edit
LoginPage.db48423ed1b455431daa.js
Edit
LoginPage.db48423ed1b455431daa.js.map
Edit
MetricsDrilldownRedirect.fcad4bdff346974952f4.js
Edit
MetricsDrilldownRedirect.fcad4bdff346974952f4.js.map
Edit
MigrateToCloud.5b474ad00e8a3d979750.js
Edit
MigrateToCloud.5b474ad00e8a3d979750.js.map
Edit
NewMuteTiming.2f6302420674f1c73aba.js
Edit
NewMuteTiming.2f6302420674f1c73aba.js.map
Edit
NewOrgPage.be31eaee06e2043d609b.js
Edit
NewOrgPage.be31eaee06e2043d609b.js.map
Edit
NewReceiverView.f1d83eb66a39882b8661.js
Edit
NewReceiverView.f1d83eb66a39882b8661.js.map
Edit
NewSilencePage.2643a48031f7e5d8f376.js
Edit
NewSilencePage.2643a48031f7e5d8f376.js.map
Edit
NotificationPoliciesPage.9333d10ecad1452ebf27.js
Edit
NotificationPoliciesPage.9333d10ecad1452ebf27.js.map
Edit
NotificationsPage.57df4ff5ba1433a4345d.js
Edit
NotificationsPage.57df4ff5ba1433a4345d.js.map
Edit
OrgDetailsPage.7b5835c30585aae81343.js
Edit
OrgDetailsPage.7b5835c30585aae81343.js.map
Edit
PlaylistEditPage.8310e384af659e40c313.js
Edit
PlaylistEditPage.8310e384af659e40c313.js.map
Edit
PlaylistNewPage.f45b642a98a747e28c0d.js
Edit
PlaylistNewPage.f45b642a98a747e28c0d.js.map
Edit
PlaylistPage.9af74957a1cdfb125338.js
Edit
PlaylistPage.9af74957a1cdfb125338.js.map
Edit
PlaylistStartPage.8011a98267ac64c7fa05.js
Edit
PlaylistStartPage.8011a98267ac64c7fa05.js.map
Edit
PluginExtensionsLog.54c02047d569b0c05823.js
Edit
PluginExtensionsLog.54c02047d569b0c05823.js.map
Edit
PluginListPage.e50c18fed21c23ca4ee8.js
Edit
PluginListPage.e50c18fed21c23ca4ee8.js.map
Edit
PluginPage.ae424531bce63dd4721e.js
Edit
PluginPage.ae424531bce63dd4721e.js.map
Edit
ProfileFeatureTogglePage.27378dcbb7520611348e.js
Edit
ProfileFeatureTogglePage.27378dcbb7520611348e.js.map
Edit
ProvisioningWizardPage.c4e4a8f431b4719b0e95.js
Edit
ProvisioningWizardPage.c4e4a8f431b4719b0e95.js.map
Edit
PublicDashboardPage.33d6ec8f685f1b70b9a6.js
Edit
PublicDashboardPage.33d6ec8f685f1b70b9a6.js.map
Edit
RecentlyDeleted.5e0ec16474d939fd9683.js
Edit
RecentlyDeleted.5e0ec16474d939fd9683.js.map
Edit
RecentlyDeletedPage.1dbc2b80b28204de8237.js
Edit
RecentlyDeletedPage.1dbc2b80b28204de8237.js.map
Edit
RepositoryListPage.ec3a0af1cbe2740800bf.js
Edit
RepositoryListPage.ec3a0af1cbe2740800bf.js.map
Edit
RepositoryStatusPage.9aee60589e35a4a19ec2.js
Edit
RepositoryStatusPage.9aee60589e35a4a19ec2.js.map
Edit
SelectOrgPage.910a8d842019a6d7fe93.js
Edit
SelectOrgPage.910a8d842019a6d7fe93.js.map
Edit
SendResetMailPage.513361d6980f98ff8139.js
Edit
SendResetMailPage.513361d6980f98ff8139.js.map
Edit
ServerStats.2830ca154f465dbdecea.js
Edit
ServerStats.2830ca154f465dbdecea.js.map
Edit
ServiceAccountCreatePage.80fcbdd2b7f5aa4e2da1.js
Edit
ServiceAccountCreatePage.80fcbdd2b7f5aa4e2da1.js.map
Edit
ServiceAccountPage.48944056459bb412ff33.js
Edit
ServiceAccountPage.48944056459bb412ff33.js.map
Edit
ServiceAccountsPage.d20b1eb9f87661f10b45.js
Edit
ServiceAccountsPage.d20b1eb9f87661f10b45.js.map
Edit
SignupInvited.fe2c29f380e9888c28cf.js
Edit
SignupInvited.fe2c29f380e9888c28cf.js.map
Edit
SilencesTablePage.b998fdbdcc3d60a81739.js
Edit
SilencesTablePage.b998fdbdcc3d60a81739.js.map
Edit
SnapshotListPage.6feaf24adb92e6a302ec.js
Edit
SnapshotListPage.6feaf24adb92e6a302ec.js.map
Edit
SoloPanelPage.7fc6a934aaadf4c1f84d.js
Edit
SoloPanelPage.7fc6a934aaadf4c1f84d.js.map
Edit
SoloPanelPageOld.bde57e000dd0a0108685.js
Edit
SoloPanelPageOld.bde57e000dd0a0108685.js.map
Edit
SupportBundles.1f46603ad3494624d67a.js
Edit
SupportBundles.1f46603ad3494624d67a.js.map
Edit
SupportBundlesCreate.5eaea61a9713f057277b.js
Edit
SupportBundlesCreate.5eaea61a9713f057277b.js.map
Edit
TeamList.6b088f83e6e8cb66b21d.js
Edit
TeamList.6b088f83e6e8cb66b21d.js.map
Edit
TeamPages.9d8b5dceef8be43c6923.js
Edit
TeamPages.9d8b5dceef8be43c6923.js.map
Edit
Templates.7a02a8497ebca052dcfb.js
Edit
Templates.7a02a8497ebca052dcfb.js.map
Edit
TestStuffPage.982c641592b2f7c9db40.js
Edit
TestStuffPage.982c641592b2f7c9db40.js.map
Edit
ThemePlayground.aeeec77fd8e9c1482f55.js
Edit
ThemePlayground.aeeec77fd8e9c1482f55.js.map
Edit
UserAdminPage.fc4d562eef05d9f59aca.js
Edit
UserAdminPage.fc4d562eef05d9f59aca.js.map
Edit
UserCreatePage.b7036214c66612fb31e9.js
Edit
UserCreatePage.b7036214c66612fb31e9.js.map
Edit
UserInvitePage.4a9bcd4084d7ae454c73.js
Edit
UserInvitePage.4a9bcd4084d7ae454c73.js.map
Edit
UserListPage.a452e1153ae820f58ac9.js
Edit
UserListPage.a452e1153ae820f58ac9.js.map
Edit
UserProfileEditPage.82c11690282e669eabb1.js
Edit
UserProfileEditPage.82c11690282e669eabb1.js.map
Edit
alert-rules-drawer-content.c95bb5ddd3fc813cae92.js
Edit
alert-rules-drawer-content.c95bb5ddd3fc813cae92.js.map
Edit
alert-rules-toolbar-button.0d86c1adae7edb55ff76.js
Edit
alert-rules-toolbar-button.0d86c1adae7edb55ff76.js.map
Edit
alertListPanel.0110106a8d1ab70d65d5.js
Edit
alertListPanel.0110106a8d1ab70d65d5.js.map
Edit
alertmanagerPlugin.2b59de5e7b7a556f87f1.js
Edit
alertmanagerPlugin.2b59de5e7b7a556f87f1.js.map
Edit
annoListPanel.0005a0eab0b05e24d970.js
Edit
annoListPanel.0005a0eab0b05e24d970.js.map
Edit
app.8385deda1df49aa75ec2.js
Edit
app.8385deda1df49aa75ec2.js.map
Edit
assets-manifest.json
Edit
barChartPanel.eecdaeab7d146d477721.js
Edit
barChartPanel.eecdaeab7d146d477721.js.map
Edit
barGaugePanel.6d9e94bbb72ba92a0e9b.js
Edit
barGaugePanel.6d9e94bbb72ba92a0e9b.js.map
Edit
candlestickPanel.af0e0decd06e7b7ab286.js
Edit
candlestickPanel.af0e0decd06e7b7ab286.js.map
Edit
canvasPanel.ddab72fab6e58c3419b2.js
Edit
canvasPanel.ddab72fab6e58c3419b2.js.map
Edit
cloudwatchPlugin.06ef34f60000c4f7ea37.js
Edit
cloudwatchPlugin.06ef34f60000c4f7ea37.js.map
Edit
dark.b66fa87185b9a313ec14.js
Edit
dashListPanel.23b954da0c4888602048.js
Edit
dashListPanel.23b954da0c4888602048.js.map
Edit
dataGridPanel.bb5d4b678cba38dd380b.js
Edit
debugPanel.fff63da32084d7a2e236.js
Edit
debugPanel.fff63da32084d7a2e236.js.map
Edit
elasticsearchPlugin.3f2edb012f5162b48903.js
Edit
elasticsearchPlugin.3f2edb012f5162b48903.js.map
Edit
explore-feature-toggle-page.3de03fa91c88d05cea1c.js
Edit
explore-feature-toggle-page.3de03fa91c88d05cea1c.js.map
Edit
explore.dd32637df83326225e0d.js
Edit
explore.dd32637df83326225e0d.js.map
Edit
flamegraphPanel.cc6c5b4bcd69e406fbb7.js
Edit
flamegraphPanel.cc6c5b4bcd69e406fbb7.js.map
Edit
gaugePanel.5da3c4e39a652e281cc4.js
Edit
gaugePanel.5da3c4e39a652e281cc4.js.map
Edit
gazetteer
Edit
geomapPanel.67ebb4567e9b5fa5074b.js
Edit
gettingStartedPanel.833059170dbbf8d5c4bf.js
Edit
gettingStartedPanel.833059170dbbf8d5c4bf.js.map
Edit
grafana.1492.25120d27db88f863e058.css
Edit
grafana.4350.a45e45977094df4a0bc9.css
Edit
grafana.5790.ffb3a9cd952d3cd7471b.css
Edit
grafana.DashboardPage.a66335f88cd003e4a44f.css
Edit
grafana.DashboardPageProxy.a66335f88cd003e4a44f.css
Edit
grafana.app.1f6473bb54b1e1647be8.css
Edit
grafana.dark.1e8d85816912aadbbba5.css
Edit
grafana.dataGridPanel.c1fc5db1829b1b31eb4d.css
Edit
grafana.geomapPanel.0057d964fa972bb207ec.css
Edit
grafana.light.111a5a99fcebc0962ddc.css
Edit
grafana.livePanel.25120d27db88f863e058.css
Edit
grafana.react-monaco-editor.ffb3a9cd952d3cd7471b.css
Edit
grafana.swagger.d0a2da197b9827204ac1.css
Edit
grafana.tablePanel.25120d27db88f863e058.css
Edit
grafanaPlugin.f21cdb4b84a732cc9dd8.js
Edit
grafanaPlugin.f21cdb4b84a732cc9dd8.js.map
Edit
heatmapPanel.7834b997bc573eddba88.js
Edit
heatmapPanel.7834b997bc573eddba88.js.map
Edit
histogramPanel.9953bfeccf8774500c0c.js
Edit
histogramPanel.9953bfeccf8774500c0c.js.map
Edit
img
Edit
influxdbPlugin.7a899e63be0a65d41e13.js
Edit
influxdbPlugin.7a899e63be0a65d41e13.js.map
Edit
light.827d442410485e491818.js
Edit
livePanel.2a43f499bc746d928d45.js
Edit
livePanel.2a43f499bc746d928d45.js.map
Edit
logsPanel.a328022d248508a083c1.js
Edit
logsPanel.a328022d248508a083c1.js.map
Edit
loki-query-field.f9a0b82b636d4821760c.js
Edit
loki-query-field.f9a0b82b636d4821760c.js.map
Edit
maps
Edit
mixedPlugin.3a69de93f366afbb2f85.js
Edit
newsPanel.c17f40f7c88ea14620e7.js
Edit
newsPanel.c17f40f7c88ea14620e7.js.map
Edit
nodeGraphPanel.f717a9075d994a9a8af4.js
Edit
nodeGraphPanel.f717a9075d994a9a8af4.js.map
Edit
opentsdbPlugin.1795eab1c223ea030c2e.js
Edit
opentsdbPlugin.1795eab1c223ea030c2e.js.map
Edit
pieChartPanel.45166aa6d57d163817ea.js
Edit
pieChartPanel.45166aa6d57d163817ea.js.map
Edit
prometheusPlugin.c3a55eb5353085fc3d2b.js
Edit
prometheusPlugin.c3a55eb5353085fc3d2b.js.map
Edit
radialBarPanel.294c52d497d8f5c2bebb.js
Edit
radialBarPanel.294c52d497d8f5c2bebb.js.map
Edit
runtime.a37cc2f12a959f33871a.js
Edit
runtime.a37cc2f12a959f33871a.js.map
Edit
sql-query-editor.e767d4a2aef360034bd9.js
Edit
sql-query-editor.e767d4a2aef360034bd9.js.map
Edit
statPanel.3a7f191bfb27fd320014.js
Edit
statPanel.3a7f191bfb27fd320014.js.map
Edit
stateTimelinePanel.08d857b143ef89dc195f.js
Edit
stateTimelinePanel.08d857b143ef89dc195f.js.map
Edit
static
Edit
statusHistoryPanel.29f7b8dc01039ba795af.js
Edit
statusHistoryPanel.29f7b8dc01039ba795af.js.map
Edit
swagger.06875a6266679f54141d.js
Edit
swagger.06875a6266679f54141d.js.map
Edit
tablePanel.43861ce2a60617dcd19d.js
Edit
tablePanel.43861ce2a60617dcd19d.js.map
Edit
textPanel.867ee60d01b2039aa159.js
Edit
textPanel.867ee60d01b2039aa159.js.map
Edit
timeseriesPanel.b4a947da450030262a31.js
Edit
timeseriesPanel.b4a947da450030262a31.js.map
Edit
tracesPanel.35bfc3e5ff6bea4212a3.js
Edit
tracesPanel.35bfc3e5ff6bea4212a3.js.map
Edit
trendPanel.001aff2bd153e737c464.js
Edit
trendPanel.001aff2bd153e737c464.js.map
Edit
vis-data.b34535ebabc0fcb91557.js
Edit
vis-data.b34535ebabc0fcb91557.js.map
Edit
vis-network.1b41caf21892c9525709.js
Edit
vis-network.1b41caf21892c9525709.js.map
Edit
welcomeBanner.1a693c9dc02006be4f0b.js
Edit
welcomeBanner.1a693c9dc02006be4f0b.js.map
Edit
xychart.cb20af67a6c495ba6ccd.js
Edit
xychart.cb20af67a6c495ba6ccd.js.map
Edit