UNPKG

@data2viz/data2viz

Version:

Data2viz library modules

1,505 lines (1,504 loc) 94.4 kB
(function (root, factory) { if (typeof define === 'function' && define.amd) define(['exports', 'kotlin', 'd2v-core-js', 'd2v-color-js', 'd2v-timer-js'], factory); else if (typeof exports === 'object') factory(module.exports, require('kotlin'), require('d2v-core-js'), require('d2v-color-js'), require('d2v-timer-js')); else { if (typeof kotlin === 'undefined') { throw new Error("Error loading module 'd2v-viz-js'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'd2v-viz-js'."); } if (typeof this['d2v-core-js'] === 'undefined') { throw new Error("Error loading module 'd2v-viz-js'. Its dependency 'd2v-core-js' was not found. Please, check whether 'd2v-core-js' is loaded prior to 'd2v-viz-js'."); } if (typeof this['d2v-color-js'] === 'undefined') { throw new Error("Error loading module 'd2v-viz-js'. Its dependency 'd2v-color-js' was not found. Please, check whether 'd2v-color-js' is loaded prior to 'd2v-viz-js'."); } if (typeof this['d2v-timer-js'] === 'undefined') { throw new Error("Error loading module 'd2v-viz-js'. Its dependency 'd2v-timer-js' was not found. Please, check whether 'd2v-timer-js' is loaded prior to 'd2v-viz-js'."); } root['d2v-viz-js'] = factory(typeof this['d2v-viz-js'] === 'undefined' ? {} : this['d2v-viz-js'], kotlin, this['d2v-core-js'], this['d2v-color-js'], this['d2v-timer-js']); } }(this, function (_, Kotlin, $module$d2v_core_js, $module$d2v_color_js, $module$d2v_timer_js) { 'use strict'; var CircleGeom = $module$d2v_core_js.io.data2viz.geom.CircleGeom; var Kind_CLASS = Kotlin.Kind.CLASS; var Circle = $module$d2v_core_js.io.data2viz.geom.Circle; var Annotation = Kotlin.kotlin.Annotation; var Kind_INTERFACE = Kotlin.Kind.INTERFACE; var Enum = Kotlin.kotlin.Enum; var throwISE = Kotlin.throwISE; var Kind_OBJECT = Kotlin.Kind.OBJECT; var Unit = Kotlin.kotlin.Unit; var ensureNotNull = Kotlin.ensureNotNull; var IllegalStateException_init = Kotlin.kotlin.IllegalStateException_init_pdl1vj$; var ArrayList_init = Kotlin.kotlin.collections.ArrayList_init_287e2$; var PathGeom = $module$d2v_core_js.io.data2viz.geom.PathGeom; var Path = $module$d2v_core_js.io.data2viz.geom.Path; var RectGeom = $module$d2v_core_js.io.data2viz.geom.RectGeom; var Rect = $module$d2v_core_js.io.data2viz.geom.Rect; var replace = Kotlin.kotlin.text.replace_r2fvfm$; var Colors = $module$d2v_color_js.io.data2viz.color.Colors; var mutableListOf = Kotlin.kotlin.collections.mutableListOf_i5x0yv$; var HasSize = $module$d2v_core_js.io.data2viz.geom.HasSize; var throwCCE = Kotlin.throwCCE; var numberToInt = Kotlin.numberToInt; var timer = $module$d2v_timer_js.io.data2viz.timer.timer_k9susy$; var IllegalArgumentException_init = Kotlin.kotlin.IllegalArgumentException_init_pdl1vj$; var math = Kotlin.kotlin.math; var Color = $module$d2v_color_js.io.data2viz.color.Color; var LinearGradient = $module$d2v_color_js.io.data2viz.color.LinearGradient; var RadialGradient = $module$d2v_color_js.io.data2viz.color.RadialGradient; var throwUPAE = Kotlin.throwUPAE; var Point = $module$d2v_core_js.io.data2viz.geom.Point; var lazy = Kotlin.kotlin.lazy_klfg04$; var MoveTo = $module$d2v_core_js.io.data2viz.geom.MoveTo; var LineTo = $module$d2v_core_js.io.data2viz.geom.LineTo; var QuadraticCurveTo = $module$d2v_core_js.io.data2viz.geom.QuadraticCurveTo; var BezierCurveTo = $module$d2v_core_js.io.data2viz.geom.BezierCurveTo; var Arc = $module$d2v_core_js.io.data2viz.geom.Arc; var ArcTo = $module$d2v_core_js.io.data2viz.geom.ArcTo; var ClosePath = $module$d2v_core_js.io.data2viz.geom.ClosePath; var RectCmd = $module$d2v_core_js.io.data2viz.geom.RectCmd; CircleNode.prototype = Object.create(Node.prototype); CircleNode.prototype.constructor = CircleNode; KMouseEvent.prototype = Object.create(KPointerEvent.prototype); KMouseEvent.prototype.constructor = KMouseEvent; KDragEvent$KDragAction.prototype = Object.create(Enum.prototype); KDragEvent$KDragAction.prototype.constructor = KDragEvent$KDragAction; GroupNode.prototype = Object.create(Node.prototype); GroupNode.prototype.constructor = GroupNode; Layer.prototype = Object.create(GroupNode.prototype); Layer.prototype.constructor = Layer; LineNode.prototype = Object.create(Node.prototype); LineNode.prototype.constructor = LineNode; PathNode.prototype = Object.create(Node.prototype); PathNode.prototype.constructor = PathNode; RectNode.prototype = Object.create(Node.prototype); RectNode.prototype.constructor = RectNode; StateManagerStatus.prototype = Object.create(Enum.prototype); StateManagerStatus.prototype.constructor = StateManagerStatus; TextHAlign.prototype = Object.create(Enum.prototype); TextHAlign.prototype.constructor = TextHAlign; TextVAlign.prototype = Object.create(Enum.prototype); TextVAlign.prototype.constructor = TextVAlign; TextNode.prototype = Object.create(Node.prototype); TextNode.prototype.constructor = TextNode; FontWeight.prototype = Object.create(Enum.prototype); FontWeight.prototype.constructor = FontWeight; FontPosture.prototype = Object.create(Enum.prototype); FontPosture.prototype.constructor = FontPosture; function CircleNode(circle) { if (circle === void 0) circle = new CircleGeom(); Node.call(this); this.circle = circle; this.transform_p1zd3w$_0 = null; } Object.defineProperty(CircleNode.prototype, 'transform', { get: function () { return this.transform_p1zd3w$_0; }, set: function (transform) { this.transform_p1zd3w$_0 = transform; } }); Object.defineProperty(CircleNode.prototype, 'radius', { get: function () { return this.circle.radius; }, set: function (tmp$) { this.circle.radius = tmp$; } }); Object.defineProperty(CircleNode.prototype, 'x', { get: function () { return this.circle.x; }, set: function (tmp$) { this.circle.x = tmp$; } }); Object.defineProperty(CircleNode.prototype, 'y', { get: function () { return this.circle.y; }, set: function (tmp$) { this.circle.y = tmp$; } }); CircleNode.$metadata$ = { kind: Kind_CLASS, simpleName: 'CircleNode', interfaces: [HasFill, HasTransform, HasStroke, Circle, Node] }; function TextAlign(horizontal, vertical) { this.horizontal = horizontal; this.vertical = vertical; } TextAlign.$metadata$ = { kind: Kind_CLASS, simpleName: 'TextAlign', interfaces: [] }; TextAlign.prototype.component1 = function () { return this.horizontal; }; TextAlign.prototype.component2 = function () { return this.vertical; }; TextAlign.prototype.copy_yf6jvm$ = function (horizontal, vertical) { return new TextAlign(horizontal === void 0 ? this.horizontal : horizontal, vertical === void 0 ? this.vertical : vertical); }; TextAlign.prototype.toString = function () { return 'TextAlign(horizontal=' + Kotlin.toString(this.horizontal) + (', vertical=' + Kotlin.toString(this.vertical)) + ')'; }; TextAlign.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.horizontal) | 0; result = result * 31 + Kotlin.hashCode(this.vertical) | 0; return result; }; TextAlign.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.horizontal, other.horizontal) && Kotlin.equals(this.vertical, other.vertical))))); }; function get_textAlign($receiver) { return textAlign($receiver, $receiver.hAlign, $receiver.vAlign); } function set_textAlign($receiver, value) { $receiver.hAlign = value.horizontal; $receiver.vAlign = value.vertical; } function textAlign($receiver, horizontal, vertical) { if (horizontal === void 0) horizontal = TextHAlign$LEFT_getInstance(); if (vertical === void 0) vertical = TextVAlign$BASELINE_getInstance(); return new TextAlign(horizontal, vertical); } function ExperimentalKEvent() { } ExperimentalKEvent.$metadata$ = { kind: Kind_CLASS, simpleName: 'ExperimentalKEvent', interfaces: [Annotation] }; function KEvent() { } KEvent.$metadata$ = { kind: Kind_INTERFACE, simpleName: 'KEvent', interfaces: [] }; function Disposable() { } Disposable.$metadata$ = { kind: Kind_INTERFACE, simpleName: 'Disposable', interfaces: [] }; function KPointerEvent(pos) { this.pos = pos; } KPointerEvent.prototype.toString = function () { return 'KPointerEvent(pos=' + this.pos + ')'; }; KPointerEvent.$metadata$ = { kind: Kind_CLASS, simpleName: 'KPointerEvent', interfaces: [KEvent] }; function KMouseEvent(pos, altKey, ctrlKey, shiftKey, metaKey) { KPointerEvent.call(this, pos); this.altKey = altKey; this.ctrlKey = ctrlKey; this.shiftKey = shiftKey; this.metaKey = metaKey; } KMouseEvent.prototype.toString = function () { return 'KMouseEvent(pos=' + this.pos + ')'; }; KMouseEvent.$metadata$ = { kind: Kind_CLASS, simpleName: 'KMouseEvent', interfaces: [KPointerEvent] }; function KEventListener() { } KEventListener.$metadata$ = { kind: Kind_INTERFACE, simpleName: 'KEventListener', interfaces: [] }; function KDragEvent(action, pointerEvent) { this.action = action; this.pointerEvent = pointerEvent; } Object.defineProperty(KDragEvent.prototype, 'pos', { get: function () { return this.pointerEvent.pos; } }); KDragEvent.prototype.toString = function () { return 'KDragEvent(action=' + this.action + ', pos=' + this.pos + ')'; }; function KDragEvent$KDragAction(name, ordinal) { Enum.call(this); this.name$ = name; this.ordinal$ = ordinal; } function KDragEvent$KDragAction_initFields() { KDragEvent$KDragAction_initFields = function () { }; KDragEvent$KDragAction$Start_instance = new KDragEvent$KDragAction('Start', 0); KDragEvent$KDragAction$Dragging_instance = new KDragEvent$KDragAction('Dragging', 1); KDragEvent$KDragAction$Finish_instance = new KDragEvent$KDragAction('Finish', 2); } var KDragEvent$KDragAction$Start_instance; function KDragEvent$KDragAction$Start_getInstance() { KDragEvent$KDragAction_initFields(); return KDragEvent$KDragAction$Start_instance; } var KDragEvent$KDragAction$Dragging_instance; function KDragEvent$KDragAction$Dragging_getInstance() { KDragEvent$KDragAction_initFields(); return KDragEvent$KDragAction$Dragging_instance; } var KDragEvent$KDragAction$Finish_instance; function KDragEvent$KDragAction$Finish_getInstance() { KDragEvent$KDragAction_initFields(); return KDragEvent$KDragAction$Finish_instance; } KDragEvent$KDragAction.$metadata$ = { kind: Kind_CLASS, simpleName: 'KDragAction', interfaces: [Enum] }; function KDragEvent$KDragAction$values() { return [KDragEvent$KDragAction$Start_getInstance(), KDragEvent$KDragAction$Dragging_getInstance(), KDragEvent$KDragAction$Finish_getInstance()]; } KDragEvent$KDragAction.values = KDragEvent$KDragAction$values; function KDragEvent$KDragAction$valueOf(name) { switch (name) { case 'Start': return KDragEvent$KDragAction$Start_getInstance(); case 'Dragging': return KDragEvent$KDragAction$Dragging_getInstance(); case 'Finish': return KDragEvent$KDragAction$Finish_getInstance(); default:throwISE('No enum constant io.data2viz.viz.KDragEvent.KDragAction.' + name); } } KDragEvent$KDragAction.valueOf_61zpoe$ = KDragEvent$KDragAction$valueOf; KDragEvent.$metadata$ = { kind: Kind_CLASS, simpleName: 'KDragEvent', interfaces: [KEvent] }; function KZoomEvent(startZoomPos, delta) { KZoomEvent$Companion_getInstance(); this.startZoomPos = startZoomPos; this.delta = delta; } function KZoomEvent$Companion() { KZoomEvent$Companion_instance = this; this.diffTimeBetweenZoomEventsToDetectRestart = 500; this.minDelta = -100.0; this.maxDelta = 100.0; } KZoomEvent$Companion.prototype.isNewZoom_xg1spd$ = function (currentTime, lastTime) { if (lastTime == null) { return true; } else { return currentTime - lastTime > 500; } }; KZoomEvent$Companion.prototype.isNewZoom_r25hsp$ = function (currentTime, lastTime) { if (lastTime == null) { return true; } else { return currentTime.subtract(lastTime).toNumber() > 500; } }; KZoomEvent$Companion.prototype.scaleDelta_1lq62i$ = function (currentDelta, originMinDelta, originMaxDelta, newMinDelta, newMaxDelta) { if (newMinDelta === void 0) newMinDelta = this.minDelta; if (newMaxDelta === void 0) newMaxDelta = this.maxDelta; var originBoundsSize = originMaxDelta - originMinDelta; var currentDeltaPercentInBounds = (currentDelta - originMinDelta) / originBoundsSize; var newBoundsSize = newMaxDelta - newMinDelta; var newDeltaValue = newMinDelta + newBoundsSize * currentDeltaPercentInBounds; if (newDeltaValue > this.maxDelta) { newDeltaValue = this.maxDelta; } if (newDeltaValue < this.minDelta) { newDeltaValue = this.minDelta; } return newDeltaValue; }; KZoomEvent$Companion.$metadata$ = { kind: Kind_OBJECT, simpleName: 'Companion', interfaces: [] }; var KZoomEvent$Companion_instance = null; function KZoomEvent$Companion_getInstance() { if (KZoomEvent$Companion_instance === null) { new KZoomEvent$Companion(); } return KZoomEvent$Companion_instance; } KZoomEvent.prototype.toString = function () { return 'KZoomEvent(startZoomPos=' + this.startZoomPos + ', delta=' + this.delta + ')'; }; KZoomEvent.$metadata$ = { kind: Kind_CLASS, simpleName: 'KZoomEvent', interfaces: [KEvent] }; function KPointerDrag() { KPointerDrag$PointerDragEventListener_getInstance(); } function KPointerDrag$PointerDragEventListener() { KPointerDrag$PointerDragEventListener_instance = this; this.downActionPos_0 = null; this.dragInProgress_0 = false; } function KPointerDrag$PointerDragEventListener$addNativeListener$lambda(this$KPointerDrag$, closure$listener) { return function (it) { if (this$KPointerDrag$.dragInProgress_0) { closure$listener(new KDragEvent(KDragEvent$KDragAction$Dragging_getInstance(), it)); } else { var startPos = this$KPointerDrag$.downActionPos_0; if (startPos != null) { this$KPointerDrag$.dragInProgress_0 = true; closure$listener(new KDragEvent(KDragEvent$KDragAction$Start_getInstance(), it)); } } return Unit; }; } function KPointerDrag$PointerDragEventListener$addNativeListener$lambda_0(closure$listener, this$KPointerDrag$) { return function (it) { this$KPointerDrag$.onDragNotPossible_0(closure$listener, it); return Unit; }; } function KPointerDrag$PointerDragEventListener$addNativeListener$lambda_1(this$KPointerDrag$) { return function (it) { this$KPointerDrag$.downActionPos_0 = it.pos; return Unit; }; } function KPointerDrag$PointerDragEventListener$addNativeListener$lambda_2(closure$listener, this$KPointerDrag$) { return function (it) { this$KPointerDrag$.onDragNotPossible_0(closure$listener, it); return Unit; }; } KPointerDrag$PointerDragEventListener.prototype.addNativeListener_80knxr$ = function (target, listener) { var compositeDisposable = new CompositeDisposable(); compositeDisposable.add_5h210y$(KPointerMove$PointerMoveEventListener_getInstance().addNativeListener_80knxr$(target, KPointerDrag$PointerDragEventListener$addNativeListener$lambda(this, listener))); compositeDisposable.add_5h210y$(KPointerLeave$PointerLeaveEventListener_getInstance().addNativeListener_80knxr$(target, KPointerDrag$PointerDragEventListener$addNativeListener$lambda_0(listener, this))); compositeDisposable.add_5h210y$(KPointerDown$PointerDownEventListener_getInstance().addNativeListener_80knxr$(target, KPointerDrag$PointerDragEventListener$addNativeListener$lambda_1(this))); compositeDisposable.add_5h210y$(KPointerUp$PointerUpEventListener_getInstance().addNativeListener_80knxr$(target, KPointerDrag$PointerDragEventListener$addNativeListener$lambda_2(listener, this))); return compositeDisposable; }; KPointerDrag$PointerDragEventListener.prototype.onDragNotPossible_0 = function (listener, motionEvent) { this.downActionPos_0 = null; if (this.dragInProgress_0) { this.dragInProgress_0 = false; listener(new KDragEvent(KDragEvent$KDragAction$Finish_getInstance(), motionEvent)); } }; KPointerDrag$PointerDragEventListener.$metadata$ = { kind: Kind_OBJECT, simpleName: 'PointerDragEventListener', interfaces: [KEventListener] }; var KPointerDrag$PointerDragEventListener_instance = null; function KPointerDrag$PointerDragEventListener_getInstance() { if (KPointerDrag$PointerDragEventListener_instance === null) { new KPointerDrag$PointerDragEventListener(); } return KPointerDrag$PointerDragEventListener_instance; } KPointerDrag.$metadata$ = { kind: Kind_CLASS, simpleName: 'KPointerDrag', interfaces: [] }; function addEventHandle($receiver, handle) { if (!!handle.isAddedToRenderer) { var message = "Can't add event handle which already added to Renderer"; throw IllegalStateException_init(message.toString()); } handle.disposable = addNativeEventListenerFromHandle($receiver, handle); } function KEventHandle(eventListener, listener, onDispose) { this.eventListener = eventListener; this.listener = listener; this.onDispose = onDispose; this.disposable = null; } Object.defineProperty(KEventHandle.prototype, 'isAddedToRenderer', { get: function () { return this.disposable != null; } }); KEventHandle.prototype.dispose = function () { this.onDispose(this); }; KEventHandle.prototype.toString = function () { return 'KEventHandle(eventListener=' + this.eventListener + ')'; }; KEventHandle.$metadata$ = { kind: Kind_CLASS, simpleName: 'KEventHandle', interfaces: [Disposable] }; function removeEventHandle($receiver, handle) { if (!handle.isAddedToRenderer) { var message = "Can't remove event handle which not added to Renderer. " + handle; throw IllegalStateException_init(message.toString()); } ensureNotNull(handle.disposable).dispose(); handle.disposable = null; } function CompositeDisposable(disposables) { if (disposables === void 0) { disposables = ArrayList_init(); } this.disposables = disposables; } CompositeDisposable.prototype.dispose = function () { var tmp$; tmp$ = this.disposables.iterator(); while (tmp$.hasNext()) { var element = tmp$.next(); element.dispose(); } this.disposables.clear(); }; CompositeDisposable.prototype.add_5h210y$ = function (disposable) { this.disposables.add_11rb$(disposable); }; CompositeDisposable.$metadata$ = { kind: Kind_CLASS, simpleName: 'CompositeDisposable', interfaces: [Disposable] }; function GroupNode() { Node.call(this); this.transform_shx8rt$_0 = null; this.children = ArrayList_init(); } Object.defineProperty(GroupNode.prototype, 'transform', { get: function () { return this.transform_shx8rt$_0; }, set: function (transform) { this.transform_shx8rt$_0 = transform; } }); GroupNode.prototype.transform_tabxxp$ = function (init) { var $receiver = new Transform(); init($receiver); this.transform = $receiver; }; GroupNode.prototype.add_vetai8$ = function (node) { this.children.add_11rb$(node); node.parent = this; }; GroupNode.prototype.remove_vetai8$ = function (node) { node.parent = null; this.children.remove_11rb$(node); }; GroupNode.prototype.clear = function () { this.children.clear(); }; GroupNode.prototype.group_mdx85a$ = function (init) { var $receiver = new GroupNode(); init($receiver); this.add_vetai8$($receiver); return $receiver; }; GroupNode.prototype.line_e8vvwz$ = function (init) { var $receiver = new LineNode(); init($receiver); this.add_vetai8$($receiver); return $receiver; }; GroupNode.prototype.circle_107i6h$ = function (init) { var $receiver = new CircleNode(); init($receiver); this.add_vetai8$($receiver); return $receiver; }; GroupNode.prototype.rect_afayqr$ = function (init) { var $receiver = new RectNode(); init($receiver); this.add_vetai8$($receiver); return $receiver; }; GroupNode.prototype.text_6q900q$ = function (init) { var $receiver = new TextNode(); init($receiver); this.add_vetai8$($receiver); return $receiver; }; GroupNode.prototype.path_omiyse$ = function (init) { var $receiver = new PathNode(); init($receiver); this.add_vetai8$($receiver); return $receiver; }; GroupNode.$metadata$ = { kind: Kind_CLASS, simpleName: 'GroupNode', interfaces: [HasTransform, HasChildren, Node] }; function HasChildren() { } HasChildren.$metadata$ = { kind: Kind_INTERFACE, simpleName: 'HasChildren', interfaces: [Style] }; function Layer() { GroupNode.call(this); } Layer.$metadata$ = { kind: Kind_CLASS, simpleName: 'Layer', interfaces: [GroupNode] }; function LineNode() { Node.call(this); this.transform_56wv08$_0 = null; this.x1 = 0.0; this.y1 = 0.0; this.x2 = 0.0; this.y2 = 0.0; } Object.defineProperty(LineNode.prototype, 'transform', { get: function () { return this.transform_56wv08$_0; }, set: function (transform) { this.transform_56wv08$_0 = transform; } }); LineNode.$metadata$ = { kind: Kind_CLASS, simpleName: 'LineNode', interfaces: [HasTransform, HasStroke, Node] }; function Node() { this.parent_41e1qq$_0 = null; this.visible = true; this.style_u8faqh$_0 = new HierarchicalStyle(this.parent); } Object.defineProperty(Node.prototype, 'parent', { get: function () { return this.parent_41e1qq$_0; }, set: function (value) { this.parent_41e1qq$_0 = value; this.style_u8faqh$_0.parent = value; } }); Node.prototype.remove = function () { var tmp$; (tmp$ = this.parent) != null ? (tmp$.remove_vetai8$(this), Unit) : null; }; Object.defineProperty(Node.prototype, 'fill', { get: function () { return this.style_u8faqh$_0.fill; }, set: function (value) { this.style_u8faqh$_0.fill = value; } }); Object.defineProperty(Node.prototype, 'stroke', { get: function () { return this.style_u8faqh$_0.stroke; }, set: function (value) { this.style_u8faqh$_0.stroke = value; } }); Object.defineProperty(Node.prototype, 'strokeWidth', { get: function () { return this.style_u8faqh$_0.strokeWidth; }, set: function (value) { this.style_u8faqh$_0.strokeWidth = value; } }); Object.defineProperty(Node.prototype, 'textColor', { get: function () { return this.style_u8faqh$_0.textColor; }, set: function (value) { this.style_u8faqh$_0.textColor = value; } }); Object.defineProperty(Node.prototype, 'hAlign', { get: function () { return this.style_u8faqh$_0.hAlign; }, set: function (value) { this.style_u8faqh$_0.hAlign = value; } }); Object.defineProperty(Node.prototype, 'anchor', { get: function () { return this.hAlign; }, set: function (value) { this.hAlign = value; } }); Object.defineProperty(Node.prototype, 'vAlign', { get: function () { return this.style_u8faqh$_0.vAlign; }, set: function (value) { this.style_u8faqh$_0.vAlign = value; } }); Object.defineProperty(Node.prototype, 'baseline', { get: function () { return this.vAlign; }, set: function (value) { this.vAlign = value; } }); Node.$metadata$ = { kind: Kind_CLASS, simpleName: 'Node', interfaces: [Style] }; function PathNode(path) { if (path === void 0) path = new PathGeom(); Node.call(this); this.path = path; this.transform_mw07dl$_0 = null; } Object.defineProperty(PathNode.prototype, 'transform', { get: function () { return this.transform_mw07dl$_0; }, set: function (transform) { this.transform_mw07dl$_0 = transform; } }); PathNode.prototype.clearPath = function () { this.path.clearPath(); }; PathNode.prototype.arc_6p3vsx$$default = function (centerX, centerY, radius, startAngle, endAngle, counterClockWise) { return this.path.arc_6p3vsx$$default(centerX, centerY, radius, startAngle, endAngle, counterClockWise); }; PathNode.prototype.arcTo_1lq62i$ = function (cpx, cpy, x, y, radius) { return this.path.arcTo_1lq62i$(cpx, cpy, x, y, radius); }; PathNode.prototype.bezierCurveTo_15yvbs$ = function (cpx1, cpy1, cpx2, cpy2, x, y) { return this.path.bezierCurveTo_15yvbs$(cpx1, cpy1, cpx2, cpy2, x, y); }; PathNode.prototype.closePath = function () { return this.path.closePath(); }; PathNode.prototype.lineTo_lu1900$ = function (x, y) { return this.path.lineTo_lu1900$(x, y); }; PathNode.prototype.moveTo_lu1900$ = function (x, y) { return this.path.moveTo_lu1900$(x, y); }; PathNode.prototype.quadraticCurveTo_6y0v78$ = function (cpx, cpy, x, y) { return this.path.quadraticCurveTo_6y0v78$(cpx, cpy, x, y); }; PathNode.prototype.rect_6y0v78$ = function (x, y, w, h) { return this.path.rect_6y0v78$(x, y, w, h); }; PathNode.$metadata$ = { kind: Kind_CLASS, simpleName: 'PathNode', interfaces: [Path, HasTransform, HasFill, HasStroke, Node] }; function RectNode(rect) { if (rect === void 0) rect = new RectGeom(); Node.call(this); this.$delegate_or6qh8$_0 = rect; } Object.defineProperty(RectNode.prototype, 'bottom', { get: function () { return this.$delegate_or6qh8$_0.bottom; } }); Object.defineProperty(RectNode.prototype, 'bottomLeft', { get: function () { return this.$delegate_or6qh8$_0.bottomLeft; } }); Object.defineProperty(RectNode.prototype, 'bottomRight', { get: function () { return this.$delegate_or6qh8$_0.bottomRight; } }); Object.defineProperty(RectNode.prototype, 'center', { get: function () { return this.$delegate_or6qh8$_0.center; } }); Object.defineProperty(RectNode.prototype, 'height', { get: function () { return this.$delegate_or6qh8$_0.height; }, set: function (tmp$) { this.$delegate_or6qh8$_0.height = tmp$; } }); Object.defineProperty(RectNode.prototype, 'left', { get: function () { return this.$delegate_or6qh8$_0.left; } }); Object.defineProperty(RectNode.prototype, 'right', { get: function () { return this.$delegate_or6qh8$_0.right; } }); Object.defineProperty(RectNode.prototype, 'size', { get: function () { return this.$delegate_or6qh8$_0.size; }, set: function (tmp$) { this.$delegate_or6qh8$_0.size = tmp$; } }); Object.defineProperty(RectNode.prototype, 'top', { get: function () { return this.$delegate_or6qh8$_0.top; } }); Object.defineProperty(RectNode.prototype, 'topLeft', { get: function () { return this.$delegate_or6qh8$_0.topLeft; } }); Object.defineProperty(RectNode.prototype, 'topRight', { get: function () { return this.$delegate_or6qh8$_0.topRight; } }); Object.defineProperty(RectNode.prototype, 'width', { get: function () { return this.$delegate_or6qh8$_0.width; }, set: function (tmp$) { this.$delegate_or6qh8$_0.width = tmp$; } }); Object.defineProperty(RectNode.prototype, 'x', { get: function () { return this.$delegate_or6qh8$_0.x; }, set: function (tmp$) { this.$delegate_or6qh8$_0.x = tmp$; } }); Object.defineProperty(RectNode.prototype, 'y', { get: function () { return this.$delegate_or6qh8$_0.y; }, set: function (tmp$) { this.$delegate_or6qh8$_0.y = tmp$; } }); RectNode.prototype.contains_mowjvf$ = function (point) { return this.$delegate_or6qh8$_0.contains_mowjvf$(point); }; RectNode.prototype.contains_wt5aq9$ = function (rect) { return this.$delegate_or6qh8$_0.contains_wt5aq9$(rect); }; RectNode.$metadata$ = { kind: Kind_CLASS, simpleName: 'RectNode', interfaces: [HasStroke, HasFill, Rect, Node] }; function StateManager() { this.status = StateManagerStatus$REST_getInstance(); this.properties = ArrayList_init(); } StateManager.prototype.addStateProperty_z6ptt4$ = function (property) { this.properties.add_11rb$(property); }; StateManager.prototype.percentToState_14dthe$ = function (percent) { this.status = StateManagerStatus$UPDATE_PROPERTIES_getInstance(); var tmp$; tmp$ = this.properties.iterator(); while (tmp$.hasNext()) { var element = tmp$.next(); element.setPercent_14dthe$(percent); } this.status = StateManagerStatus$REST_getInstance(); }; StateManager.$metadata$ = { kind: Kind_CLASS, simpleName: 'StateManager', interfaces: [] }; function StateManagerStatus(name, ordinal) { Enum.call(this); this.name$ = name; this.ordinal$ = ordinal; } function StateManagerStatus_initFields() { StateManagerStatus_initFields = function () { }; StateManagerStatus$REST_instance = new StateManagerStatus('REST', 0); StateManagerStatus$RECORD_instance = new StateManagerStatus('RECORD', 1); StateManagerStatus$UPDATE_PROPERTIES_instance = new StateManagerStatus('UPDATE_PROPERTIES', 2); } var StateManagerStatus$REST_instance; function StateManagerStatus$REST_getInstance() { StateManagerStatus_initFields(); return StateManagerStatus$REST_instance; } var StateManagerStatus$RECORD_instance; function StateManagerStatus$RECORD_getInstance() { StateManagerStatus_initFields(); return StateManagerStatus$RECORD_instance; } var StateManagerStatus$UPDATE_PROPERTIES_instance; function StateManagerStatus$UPDATE_PROPERTIES_getInstance() { StateManagerStatus_initFields(); return StateManagerStatus$UPDATE_PROPERTIES_instance; } StateManagerStatus.$metadata$ = { kind: Kind_CLASS, simpleName: 'StateManagerStatus', interfaces: [Enum] }; function StateManagerStatus$values() { return [StateManagerStatus$REST_getInstance(), StateManagerStatus$RECORD_getInstance(), StateManagerStatus$UPDATE_PROPERTIES_getInstance()]; } StateManagerStatus.values = StateManagerStatus$values; function StateManagerStatus$valueOf(name) { switch (name) { case 'REST': return StateManagerStatus$REST_getInstance(); case 'RECORD': return StateManagerStatus$RECORD_getInstance(); case 'UPDATE_PROPERTIES': return StateManagerStatus$UPDATE_PROPERTIES_getInstance(); default:throwISE('No enum constant io.data2viz.viz.StateManagerStatus.' + name); } } StateManagerStatus.valueOf_61zpoe$ = StateManagerStatus$valueOf; function StateProperty() { } StateProperty.$metadata$ = { kind: Kind_INTERFACE, simpleName: 'StateProperty', interfaces: [] }; function Style() { } Style.$metadata$ = { kind: Kind_INTERFACE, simpleName: 'Style', interfaces: [] }; function StyleImpl() { this.fill_l1sct0$_0 = null; this.stroke_1w52jt$_0 = null; this.textColor_riwbw1$_0 = null; this.strokeWidth_l4w949$_0 = 1.0; this.hAlign_pi4kky$_0 = TextHAlign$LEFT_getInstance(); this.anchor_eyj0fu$_0 = this.hAlign; this.vAlign_hwcds0$_0 = TextVAlign$BASELINE_getInstance(); this.baseline_1osq8m$_0 = this.vAlign; } Object.defineProperty(StyleImpl.prototype, 'fill', { get: function () { return this.fill_l1sct0$_0; }, set: function (fill) { this.fill_l1sct0$_0 = fill; } }); Object.defineProperty(StyleImpl.prototype, 'stroke', { get: function () { return this.stroke_1w52jt$_0; }, set: function (stroke) { this.stroke_1w52jt$_0 = stroke; } }); Object.defineProperty(StyleImpl.prototype, 'textColor', { get: function () { return this.textColor_riwbw1$_0; }, set: function (textColor) { this.textColor_riwbw1$_0 = textColor; } }); Object.defineProperty(StyleImpl.prototype, 'strokeWidth', { get: function () { return this.strokeWidth_l4w949$_0; }, set: function (strokeWidth) { this.strokeWidth_l4w949$_0 = strokeWidth; } }); Object.defineProperty(StyleImpl.prototype, 'hAlign', { get: function () { return this.hAlign_pi4kky$_0; }, set: function (hAlign) { this.hAlign_pi4kky$_0 = hAlign; } }); Object.defineProperty(StyleImpl.prototype, 'anchor', { get: function () { return this.anchor_eyj0fu$_0; }, set: function (anchor) { this.anchor_eyj0fu$_0 = anchor; } }); Object.defineProperty(StyleImpl.prototype, 'vAlign', { get: function () { return this.vAlign_hwcds0$_0; }, set: function (vAlign) { this.vAlign_hwcds0$_0 = vAlign; } }); Object.defineProperty(StyleImpl.prototype, 'baseline', { get: function () { return this.baseline_1osq8m$_0; }, set: function (baseline) { this.baseline_1osq8m$_0 = baseline; } }); StyleImpl.$metadata$ = { kind: Kind_CLASS, simpleName: 'StyleImpl', interfaces: [Style] }; function HierarchicalStyle(parent) { this.parent = parent; this.style_0 = null; this.fillSet_0 = false; this.strokeSet_0 = false; this.strokeWidthSet_0 = false; this.textColorSet_0 = false; this.hAlignSet_0 = false; this.vAlignSet_0 = false; } Object.defineProperty(HierarchicalStyle.prototype, 'fill', { get: function () { var tmp$; return this.fillSet_0 ? ensureNotNull(this.style_0).fill : (tmp$ = this.parent) != null ? tmp$.fill : null; }, set: function (value) { var tmp$; if (this.style_0 == null) this.style_0 = new StyleImpl(); this.fillSet_0 = true; (tmp$ = this.style_0) != null ? (tmp$.fill = value) : null; } }); Object.defineProperty(HierarchicalStyle.prototype, 'stroke', { get: function () { var tmp$; return this.strokeSet_0 ? ensureNotNull(this.style_0).stroke : (tmp$ = this.parent) != null ? tmp$.stroke : null; }, set: function (value) { var tmp$; if (this.style_0 == null) this.style_0 = new StyleImpl(); this.strokeSet_0 = true; (tmp$ = this.style_0) != null ? (tmp$.stroke = value) : null; } }); Object.defineProperty(HierarchicalStyle.prototype, 'strokeWidth', { get: function () { var tmp$, tmp$_0; return this.strokeWidthSet_0 ? (tmp$ = this.style_0) != null ? tmp$.strokeWidth : null : (tmp$_0 = this.parent) != null ? tmp$_0.strokeWidth : null; }, set: function (value) { var tmp$; if (this.style_0 == null) this.style_0 = new StyleImpl(); this.strokeWidthSet_0 = true; (tmp$ = this.style_0) != null ? (tmp$.strokeWidth = value) : null; } }); Object.defineProperty(HierarchicalStyle.prototype, 'textColor', { get: function () { var tmp$, tmp$_0; return this.textColorSet_0 ? (tmp$ = this.style_0) != null ? tmp$.textColor : null : (tmp$_0 = this.parent) != null ? tmp$_0.textColor : null; }, set: function (value) { var tmp$; if (this.style_0 == null) this.style_0 = new StyleImpl(); this.textColorSet_0 = true; (tmp$ = this.style_0) != null ? (tmp$.textColor = value) : null; } }); Object.defineProperty(HierarchicalStyle.prototype, 'hAlign', { get: function () { var tmp$, tmp$_0; return this.hAlignSet_0 ? ensureNotNull((tmp$ = this.style_0) != null ? tmp$.hAlign : null) : ensureNotNull((tmp$_0 = this.parent) != null ? tmp$_0.hAlign : null); }, set: function (value) { var tmp$; if (this.style_0 == null) this.style_0 = new StyleImpl(); this.hAlignSet_0 = true; (tmp$ = this.style_0) != null ? (tmp$.hAlign = value) : null; } }); Object.defineProperty(HierarchicalStyle.prototype, 'anchor', { get: function () { return this.hAlign; }, set: function (value) { this.hAlign = value; } }); Object.defineProperty(HierarchicalStyle.prototype, 'vAlign', { get: function () { var tmp$, tmp$_0; return this.vAlignSet_0 ? ensureNotNull((tmp$ = this.style_0) != null ? tmp$.vAlign : null) : ensureNotNull((tmp$_0 = this.parent) != null ? tmp$_0.vAlign : null); }, set: function (value) { var tmp$; if (this.style_0 == null) this.style_0 = new StyleImpl(); this.vAlignSet_0 = true; (tmp$ = this.style_0) != null ? (tmp$.vAlign = value) : null; } }); Object.defineProperty(HierarchicalStyle.prototype, 'baseline', { get: function () { return this.vAlign; }, set: function (value) { this.vAlign = value; } }); HierarchicalStyle.$metadata$ = { kind: Kind_CLASS, simpleName: 'HierarchicalStyle', interfaces: [Style] }; function TextHAlign(name, ordinal) { Enum.call(this); this.name$ = name; this.ordinal$ = ordinal; } function TextHAlign_initFields() { TextHAlign_initFields = function () { }; TextHAlign$LEFT_instance = new TextHAlign('LEFT', 0); TextHAlign$START_instance = new TextHAlign('START', 1); TextHAlign$MIDDLE_instance = new TextHAlign('MIDDLE', 2); TextHAlign$RIGHT_instance = new TextHAlign('RIGHT', 3); TextHAlign$END_instance = new TextHAlign('END', 4); } var TextHAlign$LEFT_instance; function TextHAlign$LEFT_getInstance() { TextHAlign_initFields(); return TextHAlign$LEFT_instance; } var TextHAlign$START_instance; function TextHAlign$START_getInstance() { TextHAlign_initFields(); return TextHAlign$START_instance; } var TextHAlign$MIDDLE_instance; function TextHAlign$MIDDLE_getInstance() { TextHAlign_initFields(); return TextHAlign$MIDDLE_instance; } var TextHAlign$RIGHT_instance; function TextHAlign$RIGHT_getInstance() { TextHAlign_initFields(); return TextHAlign$RIGHT_instance; } var TextHAlign$END_instance; function TextHAlign$END_getInstance() { TextHAlign_initFields(); return TextHAlign$END_instance; } TextHAlign.$metadata$ = { kind: Kind_CLASS, simpleName: 'TextHAlign', interfaces: [Enum] }; function TextHAlign$values() { return [TextHAlign$LEFT_getInstance(), TextHAlign$START_getInstance(), TextHAlign$MIDDLE_getInstance(), TextHAlign$RIGHT_getInstance(), TextHAlign$END_getInstance()]; } TextHAlign.values = TextHAlign$values; function TextHAlign$valueOf(name) { switch (name) { case 'LEFT': return TextHAlign$LEFT_getInstance(); case 'START': return TextHAlign$START_getInstance(); case 'MIDDLE': return TextHAlign$MIDDLE_getInstance(); case 'RIGHT': return TextHAlign$RIGHT_getInstance(); case 'END': return TextHAlign$END_getInstance(); default:throwISE('No enum constant io.data2viz.viz.TextHAlign.' + name); } } TextHAlign.valueOf_61zpoe$ = TextHAlign$valueOf; function TextVAlign(name, ordinal) { Enum.call(this); this.name$ = name; this.ordinal$ = ordinal; } function TextVAlign_initFields() { TextVAlign_initFields = function () { }; TextVAlign$HANGING_instance = new TextVAlign('HANGING', 0); TextVAlign$MIDDLE_instance = new TextVAlign('MIDDLE', 1); TextVAlign$BASELINE_instance = new TextVAlign('BASELINE', 2); } var TextVAlign$HANGING_instance; function TextVAlign$HANGING_getInstance() { TextVAlign_initFields(); return TextVAlign$HANGING_instance; } var TextVAlign$MIDDLE_instance; function TextVAlign$MIDDLE_getInstance() { TextVAlign_initFields(); return TextVAlign$MIDDLE_instance; } var TextVAlign$BASELINE_instance; function TextVAlign$BASELINE_getInstance() { TextVAlign_initFields(); return TextVAlign$BASELINE_instance; } TextVAlign.$metadata$ = { kind: Kind_CLASS, simpleName: 'TextVAlign', interfaces: [Enum] }; function TextVAlign$values() { return [TextVAlign$HANGING_getInstance(), TextVAlign$MIDDLE_getInstance(), TextVAlign$BASELINE_getInstance()]; } TextVAlign.values = TextVAlign$values; function TextVAlign$valueOf(name) { switch (name) { case 'HANGING': return TextVAlign$HANGING_getInstance(); case 'MIDDLE': return TextVAlign$MIDDLE_getInstance(); case 'BASELINE': return TextVAlign$BASELINE_getInstance(); default:throwISE('No enum constant io.data2viz.viz.TextVAlign.' + name); } } TextVAlign.valueOf_61zpoe$ = TextVAlign$valueOf; function TextNode() { Node.call(this); this.transform_eg0kf5$_0 = null; this.x = 0.0; this.y = 0.0; this.textContent_dmbbup$_0 = 'Type something'; this.fontSize = 12.0; this.fontFamily = FontFamily$Companion_getInstance().SANS_SERIF; this.fontWeight = FontWeight$NORMAL_getInstance(); this.fontStyle = FontPosture$NORMAL_getInstance(); } Object.defineProperty(TextNode.prototype, 'transform', { get: function () { return this.transform_eg0kf5$_0; }, set: function (transform) { this.transform_eg0kf5$_0 = transform; } }); Object.defineProperty(TextNode.prototype, 'textContent', { get: function () { return this.textContent_dmbbup$_0; }, set: function (value) { this.textContent_dmbbup$_0 = makeVizFriendlyText(value); } }); TextNode.$metadata$ = { kind: Kind_CLASS, simpleName: 'TextNode', interfaces: [HasTransform, HasStroke, HasFill, Node] }; function makeVizFriendlyText($receiver) { return replaceNewLineWithSpace($receiver); } function replaceNewLineWithSpace($receiver) { return replace($receiver, 10, 32); } function FontFamily(name) { FontFamily$Companion_getInstance(); this.name = name; } function FontFamily$Companion() { FontFamily$Companion_instance = this; this.MONOSPACE = new FontFamily('monospace'); this.SANS_SERIF = new FontFamily('sans-serif'); this.SERIF = new FontFamily('serif'); } FontFamily$Companion.prototype.specifiedFont_61zpoe$ = function (name) { return new FontFamily(name); }; FontFamily$Companion.$metadata$ = { kind: Kind_OBJECT, simpleName: 'Companion', interfaces: [] }; var FontFamily$Companion_instance = null; function FontFamily$Companion_getInstance() { if (FontFamily$Companion_instance === null) { new FontFamily$Companion(); } return FontFamily$Companion_instance; } FontFamily.$metadata$ = { kind: Kind_CLASS, simpleName: 'FontFamily', interfaces: [] }; function FontWeight(name, ordinal) { Enum.call(this); this.name$ = name; this.ordinal$ = ordinal; } function FontWeight_initFields() { FontWeight_initFields = function () { }; FontWeight$BOLD_instance = new FontWeight('BOLD', 0); FontWeight$NORMAL_instance = new FontWeight('NORMAL', 1); } var FontWeight$BOLD_instance; function FontWeight$BOLD_getInstance() { FontWeight_initFields(); return FontWeight$BOLD_instance; } var FontWeight$NORMAL_instance; function FontWeight$NORMAL_getInstance() { FontWeight_initFields(); return FontWeight$NORMAL_instance; } FontWeight.$metadata$ = { kind: Kind_CLASS, simpleName: 'FontWeight', interfaces: [Enum] }; function FontWeight$values() { return [FontWeight$BOLD_getInstance(), FontWeight$NORMAL_getInstance()]; } FontWeight.values = FontWeight$values; function FontWeight$valueOf(name) { switch (name) { case 'BOLD': return FontWeight$BOLD_getInstance(); case 'NORMAL': return FontWeight$NORMAL_getInstance(); default:throwISE('No enum constant io.data2viz.viz.FontWeight.' + name); } } FontWeight.valueOf_61zpoe$ = FontWeight$valueOf; function FontPosture(name, ordinal) { Enum.call(this); this.name$ = name; this.ordinal$ = ordinal; } function FontPosture_initFields() { FontPosture_initFields = function () { }; FontPosture$ITALIC_instance = new FontPosture('ITALIC', 0); FontPosture$NORMAL_instance = new FontPosture('NORMAL', 1); } var FontPosture$ITALIC_instance; function FontPosture$ITALIC_getInstance() { FontPosture_initFields(); return FontPosture$ITALIC_instance; } var FontPosture$NORMAL_instance; function FontPosture$NORMAL_getInstance() { FontPosture_initFields(); return FontPosture$NORMAL_instance; } FontPosture.$metadata$ = { kind: Kind_CLASS, simpleName: 'FontPosture', interfaces: [Enum] }; function FontPosture$values() { return [FontPosture$ITALIC_getInstance(), FontPosture$NORMAL_getInstance()]; } FontPosture.values = FontPosture$values; function FontPosture$valueOf(name) { switch (name) { case 'ITALIC': return FontPosture$ITALIC_getInstance(); case 'NORMAL': return FontPosture$NORMAL_getInstance(); default:throwISE('No enum constant io.data2viz.viz.FontPosture.' + name); } } FontPosture.valueOf_61zpoe$ = FontPosture$valueOf; function Viz(activeLayer) { if (activeLayer === void 0) activeLayer = new Layer(); this.activeLayer = activeLayer; this.$delegate_jlwl53$_0 = activeLayer; this.style_0 = new StyleImpl(); this.activeLayer.parent = this; this.textColor = Colors.Web.black; this.config = new VizConfig(); this.width_p2f4jt$_0 = 100.0; this.height_d5hk3m$_0 = 100.0; this.layers = mutableListOf([this.activeLayer]); this.resizeBehavior_0 = null; this.eventListeners_0 = ArrayList_init(); this.renderer_9w8zxa$_0 = null; this.animationTimers_8be2vx$ = ArrayList_init(); } Object.defineProperty(Viz.prototype, 'fill', { get: function () { return this.style_0.fill; }, set: function (value) { this.style_0.fill = value; } }); Object.defineProperty(Viz.prototype, 'stroke', { get: function () { return this.style_0.stroke; }, set: function (value) { this.style_0.stroke = value; } }); Object.defineProperty(Viz.prototype, 'strokeWidth', { get: function () { return this.style_0.strokeWidth; }, set: function (value) { this.style_0.strokeWidth = value; } }); Object.defineProperty(Viz.prototype, 'textColor', { get: function () { return this.style_0.textColor; }, set: function (value) { this.style_0.textColor = value; } }); Object.defineProperty(Viz.prototype, 'hAlign', { get: function () { return this.style_0.hAlign; }, set: function (value) { this.style_0.hAlign = value; } }); Object.defineProperty(Viz.prototype, 'vAlign', { get: function () { return this.style_0.vAlign; }, set: function (value) { this.style_0.vAlign = value; } }); Object.defineProperty(Viz.prototype, 'width', { get: function () { return this.width_p2f4jt$_0; }, set: function (width) { this.width_p2f4jt$_0 = width; } }); Object.defineProperty(Viz.prototype, 'height', { get: function () { return this.height_d5hk3m$_0; }, set: function (height) { this.height_d5hk3m$_0 = height; } }); Object.defineProperty(Viz.prototype, 'renderer', { get: function () { return this.renderer_9w8zxa$_0; }, set: function (newValue) { var oldValue = this.renderer_9w8zxa$_0; this.renderer_9w8zxa$_0 = newValue; var tmp$; tmp$ = this.eventListeners_0.iterator(); while (tmp$.hasNext()) { var element = tmp$.next(); oldValue != null ? (removeEventHandle(oldValue, element), Unit) : null; newValue != null ? (addEventHandle(newValue, element), Unit) : null; } } }); function Viz$on$lambda(this$Viz) { return function (it) { var tmp$; this$Viz.eventListeners_0.remove_11rb$(it); if ((tmp$ = this$Viz.renderer) != null) { removeEventHandle(tmp$, it); } return Unit; }; } Viz.prototype.on_8o0vxr$ = function (eventListener, listener) { var tmp$; var eventHandle = new KEventHandle(eventListener, listener, Viz$on$lambda(this)); this.eventListeners_0.add_11rb$(eventHandle); (tmp$ = this.renderer) != null ? (addEventHandle(tmp$, eventHandle), Unit) : null; return eventHandle; }; Viz.prototype.render = function () { ensureNotNull(this.renderer).render(); }; Viz.prototype.startAnimations = function () { ensureNotNull(this.renderer).startAnimations(); }; Viz.prototype.stopAnimations = function () { ensureNotNull(this.renderer).stopAnimations(); }; Viz.prototype.animation_o5zv02$ = function (block) { this.animationTimers_8be2vx$.add_11rb$(block); }; function Viz$onFrame$lambda(closure$block) { return function ($receiver, it) { closure$block(it); return Unit; }; } Viz.prototype.onFrame_huw4wd$ = function (block) { this.animation_o5zv02$(Viz$onFrame$lambda(block)); }; Viz.prototype.onResize_tuav61$ = function (block) { this.resizeBehavior_0 = block;