igniteui-react-inputs
Version:
Ignite UI React input components.
1,598 lines • 62.8 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends, __values } from "tslib";
import { Base, runOn, delegateCombine, delegateRemove, markType, INotifyPropertyChanged_$type, PropertyChangedEventArgs, enumGetBox, fromEn } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { IMultiSliderTrackThumbVisual_$type } from "./IMultiSliderTrackThumbVisual";
import { IMultiSliderTrackRangeVisual_$type } from "./IMultiSliderTrackRangeVisual";
import { IMultiSliderTrackThumbCalloutVisual_$type } from "./IMultiSliderTrackThumbCalloutVisual";
import { RenderingContext } from "igniteui-react-core";
import { DefaultMultiSliderTrackBarVisual } from "./DefaultMultiSliderTrackBarVisual";
import { FontInfo } from "igniteui-react-core";
import { Rect } from "igniteui-react-core";
import { TranslateTransform } from "igniteui-react-core";
import { CanvasViewRenderer } from "igniteui-react-core";
import { CanvasGestureDOMEventProxy } from "igniteui-react-core";
import { FontUtil } from "igniteui-react-core";
import { Size } from "igniteui-react-core";
import { DefaultMultiSliderTrackThumbVisual } from "./DefaultMultiSliderTrackThumbVisual";
import { MultiSliderTrackThumbRange } from "./MultiSliderTrackThumbRange";
import { NotImplementedException } from "igniteui-react-core";
import { DefaultMultiSliderTrackThumbCalloutVisual } from "./DefaultMultiSliderTrackThumbCalloutVisual";
import { truncate, isNaN_ } from "igniteui-react-core";
import { ISliderTrackOwner_$type } from "./ISliderTrackOwner";
import { MultiSliderThumbCollection } from "./MultiSliderThumbCollection";
import { MultiSliderHitInfo } from "./MultiSliderHitInfo";
import { MultiSliderOrientation_$type } from "./MultiSliderOrientation";
import { MultiSliderResolvingToolTipValueEventArgs } from "./MultiSliderResolvingToolTipValueEventArgs";
import { MultiSliderThumbValueChangingEventArgs } from "./MultiSliderThumbValueChangingEventArgs";
import { MultiSliderYValueChangingEventArgs } from "./MultiSliderYValueChangingEventArgs";
import { Thickness } from "igniteui-react-core";
/**
* @hidden
*/
var MultiSliderView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(MultiSliderView, _super);
function MultiSliderView(a) {
var _this = _super.call(this) || this;
_this.n = false;
_this.r = null;
_this.q = null;
_this.b = null;
_this.p = null;
_this.g = null;
_this.u = null;
_this.v = null;
_this.l = null;
_this.t = 0;
_this.o = false;
_this.x = 0;
_this.w = 0;
_this.j = null;
_this.a = null;
_this.i = null;
_this.y = -1;
_this.s = 10;
_this.h = 0;
_this.z = -1;
_this.m = true;
_this.g = a;
_this.r = new List$1(IMultiSliderTrackThumbVisual_$type, 0);
_this.q = new List$1(IMultiSliderTrackRangeVisual_$type, 0);
_this.b = new DefaultMultiSliderTrackBarVisual();
_this.p = new List$1(IMultiSliderTrackThumbCalloutVisual_$type, 0);
_this.j = _this.k();
_this.ap();
return _this;
}
MultiSliderView.prototype.at = function () {
this.m = true;
this.ap();
if (this.a != null) {
this.a.at(this.u.rootWrapper, "");
}
if (this.z == -1) {
this.z = this.u.setTimeout(runOn(this, this.an), 200);
}
};
MultiSliderView.prototype.au = function () {
this.m = false;
if (this.a != null && this.u != null) {
this.a.bh(this.u.rootWrapper, "");
}
if (this.z != -1) {
window.clearTimeout(this.z);
this.z = -1;
}
};
MultiSliderView.prototype.aq = function () {
if (!this.n) {
if (this.u != null) {
this.n = true;
this.u.setTimeout(runOn(this, this.a6), 0);
}
}
};
MultiSliderView.prototype.ak = function () {
this.a6();
};
MultiSliderView.prototype.a6 = function () {
if (!this.n) {
return;
}
this.n = false;
this.g.d8();
this.a0();
};
MultiSliderView.prototype.a0 = function () {
if (this.l == null) {
return;
}
var a = this.g.e0.width;
var b = this.g.e0.height;
var c = Math.round(a * this.t);
var d = Math.round(b * this.t);
if (this.x != c || this.w != d) {
this.v.setAttribute("width", c.toString());
this.v.setAttribute("height", d.toString());
this.v.setStyleProperty("width", a.toString() + "px");
this.v.setStyleProperty("height", b.toString() + "px");
this.x = truncate(Math.round(c));
this.w = truncate(Math.round(d));
}
if (this.l.d && this.t != 1) {
this.l.aa();
this.l.ab(this.t, this.t);
}
this.l.l(this.g.e0.left, this.g.e0.top, this.g.e0.width, this.g.e0.height);
for (var e = 0; e < this.r.count; e++) {
this.a4(this.r._inner[e].allPaths, this.r._inner[e].translateX, this.r._inner[e].translateY);
}
for (var f = 0; f < this.q.count; f++) {
this.a4(this.q._inner[f].allPaths, this.q._inner[f].translateX, this.q._inner[f].translateY);
}
this.a4(this.b.allPaths, this.b.translateX, this.b.translateY);
for (var g = 0; g < this.p.count; g++) {
this.a4(this.p._inner[g].allPaths, this.p._inner[g].translateX, this.p._inner[g].translateY);
this.a5(this.p._inner[g].calloutText, this.p._inner[g].textTranslateX, this.p._inner[g].textTranslateY);
}
this.a1(this.b.allPaths);
for (var h = 0; h < this.q.count; h++) {
this.a1(this.q._inner[h].allPaths);
}
for (var i = 0; i < this.r.count; i++) {
this.a1(this.r._inner[i].allPaths);
}
if (this.l.d && this.t != 1) {
this.l.z();
}
};
MultiSliderView.prototype.a2 = function (a) {
if (a.j != null) {
this.l.aa();
}
this.l.k(a.j);
this.l.x(a);
if (a.j != null) {
this.l.z();
}
};
MultiSliderView.prototype.a1 = function (a) {
for (var b = 0; b < a.count; b++) {
var c = a.item(b);
if (c.j != null) {
this.l.aa();
}
this.l.k(c.j);
this.l.t(c);
if (c.j != null) {
this.l.z();
}
}
};
MultiSliderView.prototype.a5 = function (a, b, c) {
if (a.j == null) {
a.j = new TranslateTransform();
}
var d = a.j;
d.j = b;
d.k = c;
};
MultiSliderView.prototype.a4 = function (a, b, c) {
for (var d = 0; d < a.count; d++) {
var e = a.item(d);
if (e.j == null) {
e.j = new TranslateTransform();
}
var f = e.j;
f.j = b;
f.k = c;
}
};
MultiSliderView.prototype.ap = function () {
var a = this.g.bh;
var b = this.g.a9;
if (!isNaN_(a) && a != 0) {
return;
}
if (window.devicePixelRatio != undefined && window.devicePixelRatio != b) {
this.g.a9 = window.devicePixelRatio;
}
};
MultiSliderView.prototype.ax = function (a) {
var _this = this;
if (a == null) {
var b = this.u;
this.v = null;
this.u = null;
this.l = null;
this.ab();
if (this.z != -1) {
if (b != null) {
b.clearTimeout(this.z);
}
else {
window.clearTimeout(this.z);
}
this.z = -1;
}
return;
}
this.t = (isNaN_(this.g.bh) ? this.g.a9 : this.g.bh);
var c = a;
this.u = c;
this.u.rootWrapper.setStyleProperty("min-height", (this.g.bm + 5) + "px");
this.u.rootWrapper.setStyleProperty("min-width", (this.g.bo + 5) + "px");
this.u.rootWrapper.addClass("ui-MultiSlider-container");
var d = this.t;
var e = Math.round(c.rootWrapper.width());
var f = Math.round(c.rootWrapper.height());
var g = e * d;
var h = f * d;
this.u.rootWrapper.setStyleProperty("position", "relative");
var i = this.u.createElement("canvas");
i.setStyleProperty("position", "absolute");
this.u.append(i);
this.x = truncate(Math.round(g));
this.w = truncate(Math.round(h));
i.setAttribute("width", g.toString());
i.setAttribute("height", h.toString());
i.setStyleProperty("width", e.toString() + "px");
i.setStyleProperty("height", f.toString() + "px");
this.v = i;
var j = this.u.get2DCanvasContext(this.v);
this.l = new RenderingContext(new CanvasViewRenderer(), j);
this.l.ae(this.j);
this.ab();
this.a = new CanvasGestureDOMEventProxy(this.u.rootWrapper, this.u, false);
this.a.bl = this.g.e0;
var k = this.a;
k.onContactStarted = delegateCombine(k.onContactStarted, runOn(this, this.aj));
var l = this.a;
l.onContactMoved = delegateCombine(l.onContactMoved, runOn(this, this.ai));
var m = this.a;
m.onContactCompleted = delegateCombine(m.onContactCompleted, runOn(this, this.ah));
this.a.ao = function (n) { return _this.g.ey.containsPoint(n); };
this.g.ds(0, 0, e, f);
this.s = FontUtil.getCurrentFontHeight(this.u, this.j);
this.g.trackDirty();
this.z = this.u.setTimeout(runOn(this, this.an), 200);
};
MultiSliderView.prototype.ah = function (a, b) {
this.g.dh(a, b);
};
MultiSliderView.prototype.ai = function (a, b) {
this.g.di(a);
};
MultiSliderView.prototype.aj = function (a, b) {
this.g.af(a, b);
};
MultiSliderView.prototype.ab = function () {
if (this.a != null) {
var a = this.a;
a.onContactStarted = delegateRemove(a.onContactStarted, runOn(this, this.aj));
var b = this.a;
b.onContactMoved = delegateRemove(b.onContactMoved, runOn(this, this.ai));
var c = this.a;
c.onContactCompleted = delegateRemove(c.onContactCompleted, runOn(this, this.ah));
this.a.ao = null;
this.a.av();
}
};
MultiSliderView.prototype.ay = function () {
};
MultiSliderView.prototype.ar = function () {
this.as(true);
};
MultiSliderView.prototype.as = function (a) {
if (this.u == null || this.u.rootWrapper == null) {
return;
}
this.ap();
var b = Math.round(this.u.rootWrapper.width());
var c = Math.round(this.u.rootWrapper.height());
var d = b != this.g.e0.width || c != this.g.e0.height;
if (a || d) {
this.g.ds(0, 0, b, c);
if (this.a != null) {
this.a.bl = this.g.e0;
}
}
};
MultiSliderView.prototype.am = function () {
};
MultiSliderView.prototype.k = function () {
return ((function () {
var $ret = new FontInfo();
$ret.q = "Verdana";
$ret.f = 10;
return $ret;
})());
};
MultiSliderView.prototype.a7 = function (a, b, c) {
if (a.al != b) {
a.al = b;
}
if (this.i != c) {
this.i = c;
this.j = this.i;
this.s = FontUtil.getCurrentFontHeight(this.u, this.j);
this.l.ae(this.i);
this.g.trackDirty();
}
};
MultiSliderView.prototype.ae = function () {
if (this.h != 4) {
this.h = 4;
this.u.rootWrapper.setStyleProperty("cursor", "move");
}
};
MultiSliderView.prototype.ag = function () {
if (this.h != 3) {
this.h = 3;
this.u.rootWrapper.setStyleProperty("cursor", "ns-resize");
}
};
MultiSliderView.prototype.ad = function () {
if (this.h != 0) {
this.h = 0;
this.u.rootWrapper.setStyleProperty("cursor", "inherit");
}
};
MultiSliderView.prototype.af = function () {
if (this.h != 1) {
this.h = 1;
this.u.rootWrapper.setStyleProperty("cursor", "ew-resize");
}
};
MultiSliderView.prototype.ac = function () {
if (this.h != 2) {
this.h = 2;
this.u.rootWrapper.setStyleProperty("cursor", "move");
}
};
MultiSliderView.prototype.a8 = function (a) {
var b = this.s;
var c = this.l.g(a.al);
return new Size(1, c, b);
};
MultiSliderView.prototype.aw = function () {
this.t = this.g.a9;
this.aq();
};
MultiSliderView.prototype.a3 = function () {
if (this.u == null || this.u.rootWrapper == null) {
return;
}
this.u.rootWrapper.show();
};
MultiSliderView.prototype.ao = function () {
if (this.u == null || this.u.rootWrapper == null) {
return;
}
this.u.rootWrapper.hide();
};
MultiSliderView.prototype.an = function () {
this.z = -1;
if (this.u == null) {
return;
}
if (!this.m) {
return;
}
this.as(false);
this.z = this.u.setTimeout(runOn(this, this.an), 200);
};
MultiSliderView.prototype.av = function () {
};
MultiSliderView.prototype.f = function (a) {
return a.c;
};
MultiSliderView.prototype.az = function (a) {
if (a.c != null) {
this.r.remove(a.c);
a.c = null;
}
if (a.b != null) {
this.p.remove(a.b);
a.b = null;
}
};
MultiSliderView.prototype.e = function (a, b) {
var c = new DefaultMultiSliderTrackThumbVisual();
this.r.insert(b, c);
return c;
};
MultiSliderView.prototype.c = function (a) {
throw new NotImplementedException(0);
};
MultiSliderView.prototype.d = function (a) {
if (a.b == null) {
a.b = new DefaultMultiSliderTrackThumbCalloutVisual();
this.p.add(a.b);
return a.b;
}
return a.b;
};
MultiSliderView.prototype.al = function (a) {
for (var b = 0; b < this.p.count; b++) {
a(this.p._inner[b]);
}
};
MultiSliderView.$t = markType(MultiSliderView, 'MultiSliderView');
return MultiSliderView;
}(Base));
export { MultiSliderView };
/**
* @hidden
*/
var MultiSlider = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(MultiSlider, _super);
function MultiSlider() {
var _this = _super.call(this) || this;
_this.g = new MultiSliderThumbCollection();
_this.ag = new List$1(MultiSliderTrackThumbRange.$, 0);
_this.k = null;
_this.propertyChanged = null;
_this.b1 = 500;
_this.as = 0;
_this.ar = 100;
_this.aw = NaN;
_this.a2 = 100;
_this.a3 = 0;
_this.a5 = NaN;
_this.at = NaN;
_this.ai = 1;
_this.resolvingToolTipValue = null;
_this.ex = new Rect(0, 0, 0, 1, 1);
_this.x = false;
_this.a8 = 0;
_this.a4 = 0;
_this.aj = 0;
_this.b = null;
_this.a = null;
_this.ew = null;
_this.ev = null;
_this.e2 = new Thickness(1, 5, 5, 5, 5);
_this.e0 = null;
_this.ey = null;
_this.ez = null;
_this.av = 0;
_this.ap = 0;
_this.a1 = 15;
_this.a0 = 15;
_this.a7 = 15;
_this.a6 = 15;
_this.ak = 10;
_this.d = 0;
_this.eh = null;
_this.ay = 1;
_this.ei = null;
_this.az = 22;
_this.ax = 22;
_this.d9 = null;
_this.ea = null;
_this.al = 0;
_this.ee = null;
_this.ef = null;
_this.au = 1;
_this.eg = null;
_this.ej = null;
_this.eb = null;
_this.ed = null;
_this.ec = null;
_this.am = 1;
_this.t = false;
_this.n = null;
_this.p = null;
_this.q = false;
_this.r = false;
_this.ao = 0;
_this.an = 0;
_this.aq = 0;
_this.s = false;
_this.thumbValueChanging = null;
_this.thumbValueChanged = null;
_this.yValueChanging = null;
_this.yValueChanged = null;
var a = _this.thumbs;
a.collectionChanged = delegateCombine(a.collectionChanged, runOn(_this, _this.dz));
_this.a = ((function () {
var $ret = new MultiSliderHitInfo();
$ret.c = 3;
return $ret;
})());
_this.e0 = Rect.empty;
_this.ey = Rect.empty;
_this.ez = Rect.empty;
_this.k = new MultiSliderView(_this);
_this.n = _this.k.k();
return _this;
}
Object.defineProperty(MultiSlider.prototype, "thumbs", {
get: function () {
return this.g;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "ah", {
get: function () {
return this.ag;
},
enumerable: false,
configurable: true
});
MultiSlider.prototype.onDetachedFromUI = function () {
this.k.au();
};
MultiSlider.prototype.onAttachedToUI = function () {
this.k.at();
};
Object.defineProperty(MultiSlider.prototype, "bg", {
get: function () {
return this.as;
},
set: function (a) {
var b = this.as;
this.as = a;
if (b != this.as) {
this.dl("Min", b, this.as);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bf", {
get: function () {
return this.ar;
},
set: function (a) {
var b = this.ar;
this.ar = a;
if (b != this.ar) {
this.dl("Max", b, this.ar);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bl", {
get: function () {
return this.aw;
},
set: function (a) {
var b = this.aw;
this.aw = a;
if (b != this.aw) {
this.dl("Step", b, this.aw);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bu", {
get: function () {
return this.a2;
},
set: function (a) {
var b = this.a2;
this.a2 = a;
if (b != this.a2) {
this.dl("YMax", b, this.a2);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bv", {
get: function () {
return this.a3;
},
set: function (a) {
var b = this.a3;
this.a3 = a;
if (b != this.a3) {
this.dl("YMin", b, this.a3);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bx", {
get: function () {
return this.a5;
},
set: function (a) {
var b = this.a5;
this.a5 = a;
if (b != this.a5) {
this.dl("YStep", b, this.a5);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bh", {
get: function () {
return this.at;
},
set: function (a) {
var b = this.at;
this.at = a;
if (b != this.at) {
this.dl("PixelScalingRatio", b, this.at);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "a9", {
get: function () {
return this.ai;
},
set: function (a) {
var b = this.ai;
this.ai = a;
if (b != this.ai) {
this.dl("ActualPixelScalingRatio", b, this.ai);
}
},
enumerable: false,
configurable: true
});
MultiSlider.prototype.ds = function (a, b, c, d) {
this.e0 = new Rect(0, a, b, c, d);
if (this.e == 0) {
var e = Math.max(0, this.e0.width - (this.bk + this.be));
this.ey = new Rect(0, this.e0.left + this.bk, this.e0.top, e, this.e0.height);
var f = Math.max(0, this.ey.width - (this.bq + this.bp));
this.ez = new Rect(0, this.ey.left + this.bq, this.ey.top, f, this.ey.height);
}
else if (this.e == 2) {
var g = Math.max(0, this.e0.width - (this.bk + this.be));
this.ey = new Rect(0, this.e0.left + this.bk, this.e0.top, g, this.e0.height);
var h = Math.max(0, this.ey.width - (this.bq + this.bp));
var i = Math.max(0, this.ey.height - (this.bz + this.by));
this.ez = new Rect(0, this.ey.left + this.bq, this.ey.top + this.bz, h, i);
}
else {
this.ey = new Rect(0, this.e0.left, this.e0.top + this.bk, this.e0.width, this.e0.height - (this.bk + this.be));
this.ez = new Rect(0, this.ey.left, this.ey.top + this.bq, this.ey.width, this.ey.height - (this.bq + this.bp));
}
this.trackDirty();
};
MultiSlider.prototype.d8 = function () {
if (!this.s) {
return;
}
this.s = false;
var a = this.k.b;
for (var b = 0; b < this.thumbs.count; b++) {
this.d5(this.k.f(this.thumbs._inner[b]), this.thumbs._inner[b]);
}
for (var c = 0; c < this.ah.count; c++) {
this.d3(this.k.c(this.ah._inner[c]), this.ah._inner[c]);
}
this.d0(a);
};
Object.defineProperty(MultiSlider.prototype, "e1", {
get: function () {
return this.ex;
},
set: function (a) {
var b = this.ex;
this.ex = a;
if (Rect.l_op_Inequality(b, this.ex)) {
this.dl("WindowRect", b, this.ex);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "b0", {
get: function () {
return this.a8;
},
set: function (a) {
var b = this.a8;
this.a8 = a;
if (b != this.a8) {
this.dl("YValue", b, this.a8);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bw", {
get: function () {
return this.a4;
},
set: function (a) {
var b = this.a4;
this.a4 = a;
if (b != this.a4) {
this.dl("YPosition", b, this.a4);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "ba", {
get: function () {
return this.aj;
},
set: function (a) {
var b = this.aj;
this.aj = a;
if (b != this.aj) {
this.dl("ActualYPosition", b, this.aj);
}
},
enumerable: false,
configurable: true
});
MultiSlider.prototype.dh = function (a, b) {
var c = null;
if (this.a != null && this.a.c != 3) {
if (this.a.c == 0) {
c = this.a.a;
}
this.k.ay();
}
if (c != null) {
if (this.thumbValueChanging != null) {
this.thumbValueChanging(this, ((function () {
var $ret = new MultiSliderThumbValueChangingEventArgs();
$ret.b = c.s;
$ret.a = c;
return $ret;
})()));
}
if (this.thumbValueChanged != null) {
this.thumbValueChanged(this, ((function () {
var $ret = new MultiSliderThumbValueChangingEventArgs();
$ret.b = c.s;
$ret.a = c;
return $ret;
})()));
}
if (this.e == 2) {
if (this.yValueChanging != null) {
this.yValueChanging(this, ((function () {
var $ret = new MultiSliderYValueChangingEventArgs();
$ret.a = c.s;
return $ret;
})()));
}
if (this.yValueChanged != null) {
this.yValueChanged(this, ((function () {
var $ret = new MultiSliderYValueChangingEventArgs();
$ret.a = c.s;
return $ret;
})()));
}
}
}
this.b = this.c(a, b);
this.a = ((function () {
var $ret = new MultiSliderHitInfo();
$ret.c = 3;
return $ret;
})());
this.c5();
};
MultiSlider.prototype.c5 = function () {
this.k.al(function (a) { return a.isVisible = false; });
this.k.aq();
};
MultiSlider.prototype.dj = function (a, b) {
this.b = this.c(a, false);
};
MultiSlider.prototype.af = function (a, b) {
this.b = this.c(a, b);
if (this.b == null || this.b.c == 3) {
return false;
}
if (this.ad(this.b)) {
this.dy(a, this.b);
this.k.am();
return true;
}
if (this.y(this.b)) {
return this.ae(a, this.b);
}
return false;
};
MultiSlider.prototype.ae = function (a, b) {
if (b == null) {
return false;
}
switch (b.c) {
case 2: return false;
}
return false;
};
MultiSlider.prototype.dy = function (a, b) {
this.a = b;
this.ew = a;
this.ev = a;
};
MultiSlider.prototype.ad = function (a) {
if (a == null) {
return false;
}
switch (a.c) {
case 0:
case 1: return true;
}
return false;
};
MultiSlider.prototype.y = function (a) {
if (a == null) {
return false;
}
switch (a.c) {
case 2: return false;
}
return false;
};
MultiSlider.prototype.di = function (a) {
this.b = this.c(a, false);
if (this.a != null && this.a.c != 3) {
if (this.e == 0) {
this.dd(a);
}
else if (this.e == 2) {
this.dq(a);
}
else {
this.dr(a);
}
}
else {
this.c6();
}
};
MultiSlider.prototype.dq = function (a) {
var b = a.x - this.ev.x;
var c = a.y - this.ev.y;
this.ev = a;
b = b / this.ez.width;
c = c / this.ez.height;
if (this.a == null) {
return;
}
switch (this.a.c) {
case 0:
this.a.a.r(b);
this.bi(c);
this.d6(this.a.a);
this.c7();
break;
case 1:
this.a.b.o(b);
this.bi(c);
this.d6(this.a.b.f);
this.d6(this.a.b.e);
this.c7();
break;
}
};
MultiSlider.prototype.bi = function (a) {
if (this.bw + a > 1) {
a = 1 - this.bw;
}
if (this.bw + a < 0) {
a = -this.bw;
}
this.bw += a;
return a;
};
MultiSlider.prototype.c6 = function () {
if (this.b != null && this.b.c == 1) {
this.k.ae();
}
else if (this.b != null && this.b.c == 0) {
if (this.e == 1) {
this.k.ag();
}
else if (this.e == 2) {
this.k.ac();
}
else {
this.k.af();
}
}
else {
this.k.ad();
}
};
MultiSlider.prototype.dr = function (a) {
var b = a.y - this.ev.y;
b = b / this.ez.height;
this.ev = a;
if (this.a == null) {
return;
}
switch (this.a.c) {
case 0:
this.a.a.r(b);
this.d6(this.a.a);
this.c7();
break;
case 1:
this.a.b.o(b);
this.d6(this.a.b.f);
this.d6(this.a.b.e);
this.c7();
break;
}
};
MultiSlider.prototype.d6 = function (a) {
var b;
var c;
if (this.e == 0 || this.e == 2) {
b = a.p;
c = a.p * this.ez.width + this.ez.left;
if (this.t) {
var d_1 = b;
if (this.resolvingToolTipValue != null) {
var e = ((function () {
var $ret = new MultiSliderResolvingToolTipValueEventArgs();
$ret.position = b;
$ret.value = d_1;
return $ret;
})());
this.resolvingToolTipValue(this, e);
d_1 = e.value;
}
this.dx(a, c, d_1);
}
}
else {
b = a.p;
c = a.p * this.ez.height + this.ez.top;
if (this.t) {
var f_1 = b;
if (this.resolvingToolTipValue != null) {
var g = ((function () {
var $ret = new MultiSliderResolvingToolTipValueEventArgs();
$ret.position = b;
$ret.value = f_1;
return $ret;
})());
this.resolvingToolTipValue(this, g);
f_1 = g.value;
}
this.dx(a, c, f_1);
}
}
};
MultiSlider.prototype.dx = function (a, b, c) {
var d = this.k.d(a);
d.isVisible = true;
var e = "";
if (c != null) {
e = c.toString();
}
this.k.a7(d.calloutText, e, this.o());
var f = this.k.a8(d.calloutText);
var g = this.e3();
f = new Size(1, f.width + g.left + g.right, f.height + g.top + g.bottom);
var h = a.p * this.ez.width + this.ez.left;
var i = a.p * this.ez.width + this.ez.left;
var j = 0;
var k = 0;
if ((this.e0.right - h) <= f.width) {
j = h - f.width;
}
else {
j = h;
}
if (j < i) {
k = this.ez.top;
}
else {
k = this.ez.bottom - f.height;
}
d.width = f.width;
d.height = f.height;
d.translateX = j;
d.translateY = k;
d.textTranslateX = j + g.left;
d.textTranslateY = k + g.top;
};
MultiSlider.prototype.e3 = function () {
return this.e2;
};
MultiSlider.prototype.o = function () {
if (this.p != null) {
return this.p;
}
return this.n;
};
MultiSlider.prototype.dd = function (a) {
var b = a.x - this.ev.x;
this.ev = a;
b = b / this.ez.width;
if (this.a == null) {
return;
}
switch (this.a.c) {
case 0:
this.a.a.r(b);
this.d6(this.a.a);
this.c7();
break;
case 1:
this.a.b.o(b);
this.d6(this.a.b.f);
this.d6(this.a.b.e);
this.c7();
break;
}
};
MultiSlider.prototype.df = function (a) {
this.b = this.c(a, false);
};
MultiSlider.prototype.dg = function (a) {
this.b = this.c(a, false);
};
MultiSlider.prototype.c = function (a, b) {
var _loop_1 = function (c) {
var d = this_1.thumbs._inner[c];
if (this_1.w(a, d, this_1.k.f(d), b)) {
return { value: ((function () {
var $ret = new MultiSliderHitInfo();
$ret.a = d;
$ret.c = 0;
return $ret;
})()) };
}
};
var this_1 = this;
for (var c = 0; c < this.thumbs.count; c++) {
var state_1 = _loop_1(c);
if (typeof state_1 === "object")
return state_1.value;
}
var _loop_2 = function (e) {
var f = this_2.ah._inner[e];
if (this_2.v(a, f, this_2.k.c(f))) {
return { value: ((function () {
var $ret = new MultiSliderHitInfo();
$ret.b = f;
$ret.c = 1;
return $ret;
})()) };
}
};
var this_2 = this;
for (var e = 0; e < this.ah.count; e++) {
var state_2 = _loop_2(e);
if (typeof state_2 === "object")
return state_2.value;
}
if (this.u(a)) {
return ((function () {
var $ret = new MultiSliderHitInfo();
$ret.c = 2;
return $ret;
})());
}
return ((function () {
var $ret = new MultiSliderHitInfo();
$ret.c = 3;
return $ret;
})());
};
MultiSlider.prototype.u = function (a) {
if (this.e == 0) {
if (a.y > this.ez.bottom && a.x >= this.ez.left && a.x <= this.ez.right && a.y <= this.ey.bottom) {
return true;
}
}
else if (this.e == 2) {
if (a.y > this.ez.bottom && a.x >= this.ez.left && a.x <= this.ez.right && a.y <= this.ey.bottom) {
return true;
}
}
else {
if (a.x > this.ez.right && a.y >= this.ez.top && a.y <= this.ez.bottom && a.x <= this.ey.right) {
return true;
}
}
return false;
};
MultiSlider.prototype.v = function (a, b, c) {
if (this.e == 0) {
var d = (b.n) * this.ez.width + this.ez.left;
var e = d - c.width / 2;
var f = d + c.width / 2;
if (a.y >= this.ey.top && a.y <= this.ey.bottom && a.x >= e && a.x <= f) {
return true;
}
}
else {
var g = (b.n) * this.ez.height + this.ez.top;
var h = g - c.height / 2;
var i = g + c.height / 2;
if (a.x >= this.ey.left && a.x <= this.ey.right && a.y >= h && a.y <= i) {
return true;
}
}
return false;
};
MultiSlider.prototype.w = function (a, b, c, d) {
var e = 40;
if (this.e == 0) {
var f = b.p * this.ez.width + this.ez.left;
var g = this.ez.top + this.ez.height / 2;
var h = new Rect(0, f - c.width / 2, g - c.height / 2, c.width, c.height);
if (d) {
if (h.width < e) {
h.inflate((e - h.width) / 2, 0);
}
if (h.height < e) {
h.inflate(0, (e - h.height) / 2);
}
}
if (h.containsPoint(a)) {
return true;
}
}
else if (this.e == 2) {
var i = b.p * this.ez.width + this.ez.left;
var j = this.ez.top + (this.ba * this.ez.height);
var k = new Rect(0, i - c.width / 2, j - c.height / 2, c.width, c.height);
if (d) {
if (k.width < e) {
k.inflate((e - k.width) / 2, 0);
}
if (k.height < e) {
k.inflate(0, (e - k.height) / 2);
}
}
if (k.containsPoint(a)) {
return true;
}
}
else {
var l = b.p * this.ez.height + this.ez.top;
var m = this.ez.left + this.ez.width / 2;
var n = new Rect(0, m - c.width / 2, l - c.height / 2, c.width, c.height);
if (d) {
if (n.width < e) {
n.inflate((e - n.width) / 2, 0);
}
if (n.height < e) {
n.inflate(0, (e - n.height) / 2);
}
}
if (n.containsPoint(a)) {
return true;
}
}
return false;
};
MultiSlider.prototype.d3 = function (a, b) {
if (this.e == 0) {
a.orientation = this.e;
a.width = Math.max(15, this.ez.width * b.r);
a.height = this.bb;
a.translateX = (this.ez.left + this.ez.width * b.n);
a.translateY = this.ez.bottom + this.bb / 2;
}
else if (this.e == 2) {
a.orientation = this.e;
a.width = Math.max(15, this.ez.width * b.r);
a.height = this.bb;
a.translateX = (this.ez.left + this.ez.width * b.n);
a.translateY = this.ez.bottom + this.bb / 2;
}
else {
a.orientation = this.e;
a.height = Math.max(15, this.ez.height * b.r);
a.width = this.bb;
a.translateY = (this.ez.top + this.ez.height * b.n);
a.translateX = this.ez.right + this.bb / 2;
}
};
MultiSlider.prototype.d0 = function (a) {
if (this.e == 0) {
a.height = this.bb;
a.width = this.ez.width;
a.translateX = this.ez.left + this.ez.width / 2;
a.translateY = ((this.ey.top + this.ey.bottom) / 2);
}
else if (this.e == 2) {
a.height = this.bb;
a.width = this.ez.width;
a.translateX = this.ez.left + this.ez.width / 2;
a.translateY = this.ez.top + (this.ba * this.ez.height);
}
else {
a.width = this.bb;
a.height = this.ez.height;
a.translateY = this.ez.top + this.ez.height / 2;
a.translateX = ((this.ey.left + this.ey.right) / 2);
}
};
MultiSlider.prototype.d5 = function (a, b) {
if (this.e == 0) {
a.orientation = this.e;
a.translateX = this.ez.left + this.ez.width * b.p;
a.translateY = this.ez.top + this.ez.height / 2;
}
else if (this.e == 2) {
a.orientation = this.e;
a.translateX = this.ez.left + this.ez.width * b.p;
a.translateY = this.ez.top + this.ez.height * this.ba;
}
else {
a.orientation = this.e;
a.translateY = this.ez.top + this.ez.height * b.p;
a.translateX = this.ez.left + this.ez.width / 2;
}
};
Object.defineProperty(MultiSlider.prototype, "bk", {
get: function () {
return this.av;
},
set: function (a) {
var b = this.av;
this.av = a;
if (b != this.av) {
this.dl("StartInset", b, this.av);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "be", {
get: function () {
return this.ap;
},
set: function (a) {
var b = this.ap;
this.ap = a;
if (b != this.ap) {
this.dl("EndInset", b, this.ap);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bq", {
get: function () {
return this.a1;
},
set: function (a) {
var b = this.a1;
this.a1 = a;
if (b != this.a1) {
this.dl("TrackStartInset", b, this.a1);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bp", {
get: function () {
return this.a0;
},
set: function (a) {
var b = this.a0;
this.a0 = a;
if (b != this.a0) {
this.dl("TrackEndInset", b, this.a0);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bz", {
get: function () {
return this.a7;
},
set: function (a) {
var b = this.a7;
this.a7 = a;
if (b != this.a7) {
this.dl("YTrackStartInset", b, this.a7);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "by", {
get: function () {
return this.a6;
},
set: function (a) {
var b = this.a6;
this.a6 = a;
if (b != this.a6) {
this.dl("YTrackEndInset", b, this.a6);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bb", {
get: function () {
return this.ak;
},
set: function (a) {
var b = this.ak;
this.ak = a;
if (b != this.ak) {
this.dl("BarExtent", b, this.ak);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "e", {
get: function () {
return this.d;
},
set: function (a) {
var b = this.d;
this.d = a;
if (b != this.d) {
this.dl("Orientation", enumGetBox(MultiSliderOrientation_$type, b), enumGetBox(MultiSliderOrientation_$type, this.d));
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "es", {
get: function () {
return this.eh;
},
set: function (a) {
var b = this.eh;
this.eh = a;
if (b != this.eh) {
this.dl("ThumbBrush", b, this.eh);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bn", {
get: function () {
return this.ay;
},
set: function (a) {
var b = this.ay;
this.ay = a;
if (b != this.ay) {
this.dl("ThumbStrokeThickness", b, this.ay);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "et", {
get: function () {
return this.ei;
},
set: function (a) {
var b = this.ei;
this.ei = a;
if (b != this.ei) {
this.dl("ThumbOutline", b, this.ei);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bo", {
get: function () {
return this.az;
},
set: function (a) {
var b = this.az;
this.az = a;
if (b != this.az) {
this.dl("ThumbWidth", b, this.az);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bm", {
get: function () {
return this.ax;
},
set: function (a) {
var b = this.ax;
this.ax = a;
if (b != this.ax) {
this.dl("ThumbHeight", b, this.ax);
}
},
enumerable: false,
configurable: true
});
MultiSlider.prototype.destroy = function () {
this.provideContainer(null);
};
Object.defineProperty(MultiSlider.prototype, "ek", {
get: function () {
return this.d9;
},
set: function (a) {
var b = this.d9;
this.d9 = a;
if (b != this.d9) {
this.dl("BarBrush", b, this.d9);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "el", {
get: function () {
return this.ea;
},
set: function (a) {
var b = this.ea;
this.ea = a;
if (b != this.ea) {
this.dl("BarOutline", b, this.ea);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bc", {
get: function () {
return this.al;
},
set: function (a) {
var b = this.al;
this.al = a;
if (b != this.al) {
this.dl("BarStrokeThickness", b, this.al);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "ep", {
get: function () {
return this.ee;
},
set: function (a) {
var b = this.ee;
this.ee = a;
if (b != this.ee) {
this.dl("RangeThumbBrush", b, this.ee);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "eq", {
get: function () {
return this.ef;
},
set: function (a) {
var b = this.ef;
this.ef = a;
if (b != this.ef) {
this.dl("RangeThumbOutline", b, this.ef);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bj", {
get: function () {
return this.au;
},
set: function (a) {
var b = this.au;
this.au = a;
if (b != this.au) {
this.dl("RangeThumbStrokeThickness", b, this.au);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "er", {
get: function () {
return this.eg;
},
set: function (a) {
var b = this.eg;
this.eg = a;
if (b != this.eg) {
this.dl("RangeThumbRidgesBrush", b, this.eg);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "eu", {
get: function () {
return this.ej;
},
set: function (a) {
var b = this.ej;
this.ej = a;
if (b != this.ej) {
this.dl("ThumbRidgesBrush", b, this.ej);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "em", {
get: function () {
return this.eb;
},
set: function (a) {
var b = this.eb;
this.eb = a;
if (b != this.eb) {
this.dl("CalloutBrush", b, this.eb);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "eo", {
get: function () {
return this.ed;
},
set: function (a) {
var b = this.ed;
this.ed = a;
if (b != this.ed) {
this.dl("CalloutTextColor", b, this.ed);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "en", {
get: function () {
return this.ec;
},
set: function (a) {
var b = this.ec;
this.ec = a;
if (b != this.ec) {
this.dl("CalloutOutline", b, this.ec);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "bd", {
get: function () {
return this.am;
},
set: function (a) {
var b = this.am;
this.am = a;
if (b != this.am) {
this.dl("CalloutStrokeThickness", b, this.am);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(MultiSlider.prototype, "ac", {
get: function () {
return false