8287 | }(e, i), e._tasks_dnd = t, t.init(i);
8288 | },
8289 | destructor: function destructor() {
> 8290 | t.destructor(), t = null;
| ^ 8291 | }
8292 | };
8293 | }
8308 | this._attachDomEvents(t), this._attachStateProvider(t, e), e._tasksDnD.init(e, t), e._linksDnD.init(e, t), "timeline" == e.$config.id && this.extendDom(e);
8309 | },
8310 | onDestroyed: function onDestroyed(e) {
> 8311 | this._clearDomEvents(t), this._clearStateProvider(t), e._tasksDnD && e._tasksDnD.destructor();
| ^ 8312 | },
8313 | extendDom: function extendDom(e) {
8314 | t.$task = e.$task, t.$task_scale = e.$task_scale, t.$task_data = e.$task_data, t.$task_bg = e.$task_bg, t.$task_links = e.$task_links, t.$task_bars = e.$task_bars;
10547 | n.onCreated && n.onCreated(e), e.attachEvent("onReady", function () {
10548 | n.onInitialized && n.onInitialized(e);
10549 | }), e.attachEvent("onDestroy", function () {
> 10550 | n.onDestroyed && n.onDestroyed(e);
| ^ 10551 | });
10552 | }
10553 |
491 | i = function i() {
492 | for (var i = !0, n = 0; n < e.length; n++) {
493 | if (e[n]) {
> 494 | var r = e[n].apply(t, arguments);
| ^ 495 | i = i && r;
496 | }
497 | }
515 | }, t.callEvent = function (t, i, n) {
516 | if (e._silent_mode) return !0;
517 | var r = "ev_" + t.toLowerCase();
> 518 | return e.ev_listen_all && e.ev_listen_all.apply(n || this, [t].concat(i)), !e[r] || e[r].apply(n || this, i);
| ^ 519 | }, t.checkEvent = function (t) {
520 | return !!e["ev_" + t.toLowerCase()];
521 | }, t.detachEvent = function (t) {
1152 | },
1153 | destructor: function destructor() {
1154 | var t = this.$gantt;
> 1155 | this._clearLayers(t), this.$task = null, this.$task_scale = null, this.$task_data = null, this.$task_bg = null, this.$task_links = null, this.$task_bars = null, this.$gantt = null, this.$config.rowStore && (this.$config.rowStore.detachEvent(this._staticBgHandler), this.$config.rowStore = null), this.$config.linkStore && (this.$config.linkStore = null), this.callEvent("onDestroy", []), this.detachAllEvents();
| ^ 1156 | }
1157 | }, a.mixin(l.prototype, o()), t.exports = l;
1158 | }, function (t, e) {
10012 | }, e.prototype.clear = function () {
10013 | if (this.$initialized = !1, this.$content) {
10014 | var e = this.$content.unload || this.$content.destructor;
> 10015 | e && e.call(this.$content);
| ^ 10016 | }
10017 |
10018 | t.prototype.clear.call(this);
10008 | }
10009 |
10010 | return n(e, t), e.prototype.destructor = function () {
> 10011 | this.clear(), t.prototype.destructor.call(this);
| ^ 10012 | }, e.prototype.clear = function () {
10013 | if (this.$initialized = !1, this.$content) {
10014 | var e = this.$content.unload || this.$content.destructor;
2320 | this.$container && this.$view && r.removeNode(this.$view);
2321 |
2322 | for (var e = 0; e < this.$cells.length; e++) {
> 2323 | this.$cells[e].destructor();
| ^ 2324 | }
2325 |
2326 | this.$cells = [], t.prototype.destructor.call(this);
2320 | this.$container && this.$view && r.removeNode(this.$view);
2321 |
2322 | for (var e = 0; e < this.$cells.length; e++) {
> 2323 | this.$cells[e].destructor();
| ^ 2324 | }
2325 |
2326 | this.$cells = [], t.prototype.destructor.call(this);
2752 | this.$container && this.$container.parentNode && (this.$container.parentNode.removeChild(this.$container), this.$container = null), this.$layout && this.$layout.clear(), this._reinit(t);
2753 | }, this._reinit(t);
2754 | }, t._reinit = function (i) {
> 2755 | this.callEvent("onBeforeGanttReady", []), this._eventRemoveAll(), this.$mouseEvents.reset(), this.resetLightbox(), this._update_flags(), this.$services.getService("templateLoader").initTemplates(this), this._clearTaskLayers(), this._clearLinkLayers(), this.$layout && (this.$layout.destructor(), this.$ui.reset()), this.$root = n.toNode(i), this.$root && (this.$root.innerHTML = ""), this.$root.gantt = this, e(this), this.config.layout.id = "main", this.$layout = this.$ui.createView("layout", i, this.config.layout), this.$layout.attachEvent("onBeforeResize", function () {
| ^ 2756 | for (var e = t.$services.getService("datastores"), i = 0; i < e.length; i++) {
2757 | t.getDatastore(e[i]).filter();
2758 | }
2749 |
2750 | t.assert = i(31)(t), t.init = function (t, e, i) {
2751 | e && i && (this.config.start_date = this._min_date = new Date(e), this.config.end_date = this._max_date = new Date(i)), this.date.init(), this.config.scroll_size || (this.config.scroll_size = n.getScrollSize() || 1), this.init = function (t) {
> 2752 | this.$container && this.$container.parentNode && (this.$container.parentNode.removeChild(this.$container), this.$container = null), this.$layout && this.$layout.clear(), this._reinit(t);
| ^ 2753 | }, this._reinit(t);
2754 | }, t._reinit = function (i) {
2755 | this.callEvent("onBeforeGanttReady", []), this._eventRemoveAll(), this.$mouseEvents.reset(), this.resetLightbox(), this._update_flags(), this.$services.getService("templateLoader").initTemplates(this), this._clearTaskLayers(), this._clearLinkLayers(), this.$layout && (this.$layout.destructor(), this.$ui.reset()), this.$root = n.toNode(i), this.$root && (this.$root.innerHTML = ""), this.$root.gantt = this, e(this), this.config.layout.id = "main", this.$layout = this.$ui.createView("layout", i, this.config.layout), this.$layout.attachEvent("onBeforeResize", function () {
111 | gantt.config.readonly = true;
112 | gantt.config.duration_unit = TimelineConfig.durationUnit;
113 |
> 114 | gantt.init('gantt');
| ^ 115 | }, []);
116 |
117 | useEffect(() => {