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K,QAAU,QACf,KAAK,OAAS,QACd,KAAK,YAAc,YACnB,KAAK,KAAO,KACZ,KAAK,UAAY,UACjB,KAAK,MAAQ,MACb,KAAK,MAAQ,MACb,KAAK,UAAY,UACjB,KAAK,OAAS,OACd,KAAK,OAAS,QAClB,CAQA,OAPA,EAAS,YAAc,WAInB,OAHqB,MAAjB,KAAK,WACL,KAAK,SAAW,IAAI,GAEjB,KAAK,QAChB,EACA,EAAS,SAAW,KACb,CACX,CAtC6B,GA4CzB,SAAW,SAAU,EAAc,GACnC,OAAO,EAAa,QAAQ,aAAc,SAAU,EAAG,GACnD,OAAO,OAAO,EAAW,SAAS,EAAG,KACzC,EACJ,EAiFI,cAA+B,WAC/B,SAAS,IACT,CA8BA,OArBA,EAAc,UAAU,IAAM,SAAU,GAEpC,IADA,IAAI,EAAa,GACR,EAAK,EAAG,EAAK,UAAU,OAAQ,IACpC,EAAW,EAAK,GAAK,UAAU,GAEnC,IAAI,EAAa,KAAK,OAAO,GAC7B,OAAkB,MAAd,EACO,EAEP,EAAW,QAAU,EACd,EAEJ,SAAS,EAAY,EAChC,EACA,EAAc,YAAc,WAIxB,OAHqB,MAAjB,KAAK,WACL,KAAK,SAAW,IAAI,GAEjB,KAAK,QAChB,EACA,EAAc,SAAW,KAClB,CACX,CAjCkC,GAkClC,cAAc,UAAU,OAAS,CAAC,EAMlC,SAAW,GACP,EAAO,KAAO,SAEd,EAAO,KAAO,SAAS,cACvB,EAAO,KAAO,KACd,EAAO,KAAO,KAAK,cACnB,EAAO,SAAW,aAClB,EAAO,cAAgB,cACvB,EAAO,cAAgB,cAAc,cACrC,EAAO,OAAS,WAChB,EAAO,OAAS,WAAW,aAC9B,CAXD,CAWG,QAAQ,OAAS,QAAQ,KAAO,CAAC","file":"/npm/@wcardinal/wcardinal@3.0.0/dist/wcardinal.cjs.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/@wcardinal/wcardinal@3.0.0/dist/wcardinal.cjs.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*\n Winter Cardinal v3.0.0\n Copyright (C) 2019 Toshiba Corporation\n SPDX-License-Identifier: Apache-2.0\n\n Promise Polyfill\n Copyright (C) 2014 Taylor Hakes and Forbes Lindesay.\n*/\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar hasOwn = function (target, key) {\n    return Object.prototype.hasOwnProperty.call(target, key);\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar toString = Object.prototype.toString;\nvar checkTag = function (target, expected) {\n    return toString.call(target) === expected;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar checkType = function (target, expected) {\n    return typeof target === expected;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar isString = function (target) {\n    return checkType(target, \"string\") || checkTag(target, \"[object String]\");\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar isFunction = function (target) {\n    var targetTag = Object.prototype.toString.call(target);\n    return targetTag === \"[object Function]\" ||\n        targetTag === \"[object GeneratorFunction]\" ||\n        targetTag === \"[object AsyncFunction]\" ||\n        targetTag === \"[object Proxy]\";\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar isNumber = function (target) {\n    return checkType(target, \"number\") || checkTag(target, \"[object Number]\");\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar isArrayLike = function (target) {\n    if (target == null || isFunction(target)) {\n        return false;\n    }\n    var length = target.length;\n    return isNumber(length) && 0 <= length && (length % 1) === 0;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar isEmptyObject = function (target) {\n    for (var key in target) {\n        if (hasOwn(target, key)) {\n            return false;\n        }\n    }\n    return true;\n};\nvar isEmptyArray = function (target) {\n    return target.length <= 0;\n};\nvar isNotEmptyArray = function (target) {\n    return 0 < target.length;\n};\nvar isEmpty = function (target) {\n    return (isArrayLike(target) ? isEmptyArray(target) : isEmptyObject(target));\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar copyEvent = (Object.keys != null ?\n    function (target, source) {\n        var keys = Object.keys(source);\n        for (var i = 0, imax = keys.length; i < imax; ++i) {\n            var key = keys[i];\n            if (key in target) {\n                continue;\n            }\n            target[key] = source[key];\n        }\n    } :\n    function (target, source) {\n        for (var key in source) {\n            if (key in target) {\n                continue;\n            }\n            target[key] = source[key];\n        }\n    });\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Provides event data and event operations\n */\nvar Event = /** @class */ (function () {\n    /**\n     * @param type the event type\n     * @param object the object who triggered this event\n     * @param currentTarget the current target of this event\n     * @param target the origin of this event\n     * @param originalEvent the original event object\n     */\n    function Event(type, object, currentTarget, target, originalEvent) {\n        // Copy info\n        if (originalEvent != null) {\n            copyEvent(this, originalEvent);\n        }\n        this.type = type;\n        this.object = object;\n        this.currentTarget = currentTarget;\n        this.target = target;\n        this.originalEvent = originalEvent;\n        this._isPropagationStopped = false;\n        this._isImmediatePropagationStopped = false;\n        this._isDefaultPrevented = false;\n    }\n    /**\n     * Prevents this event from bubbling up the DOM tree, and any parent handlers from being notified of this event.\n     *\n     * @returns this\n     */\n    Event.prototype.stopPropagation = function () {\n        this._isPropagationStopped = true;\n        var oe = this.originalEvent;\n        if (oe) {\n            if (oe.stopPropagation) {\n                oe.stopPropagation();\n            }\n            oe.cancelBubble = true;\n        }\n        return this;\n    };\n    /**\n     * Prevents the rest of event handlers from being notified of this event.\n     *\n     * @returns this\n     */\n    Event.prototype.stopImmediatePropagation = function () {\n        this._isImmediatePropagationStopped = true;\n        var oe = this.originalEvent;\n        if (oe) {\n            if (oe.stopImmediatePropagation) {\n                oe.stopImmediatePropagation();\n            }\n            else if (oe.stopPropagation) {\n                oe.stopPropagation();\n            }\n            oe.cancelBubble = true;\n        }\n        return this;\n    };\n    /**\n     * Prevents the default action of this event from being executed.\n     *\n     * @returns this\n     */\n    Event.prototype.preventDefault = function () {\n        this._isDefaultPrevented = true;\n        var oe = this.originalEvent;\n        if (oe) {\n            if (oe.preventDefault) {\n                oe.preventDefault();\n            }\n            oe.returnValue = false;\n        }\n        return this;\n    };\n    /**\n     * Returns true if wcardinal.event.Event#stopPropagation was called previously.\n     *\n     * @returns true if wcardinal.event.Event#stopPropagation was called previously\n     */\n    Event.prototype.isPropagationStopped = function () {\n        return this._isPropagationStopped;\n    };\n    /**\n     * Returns true if wcardinal.event.Event#stopImmediatePropagation was called previously.\n     *\n     * @returns true if wcardinal.event.Event#stopImmediatePropagation was called previously\n     */\n    Event.prototype.isImmediatePropagationStopped = function () {\n        return this._isImmediatePropagationStopped;\n    };\n    /**\n     * Returns true if wcardinal.event.Event#preventDefault was called previously.\n     *\n     * @returns true if wcardinal.event.Event#preventDefault was called previously\n     */\n    Event.prototype.isDefaultPrevented = function () {\n        return this._isDefaultPrevented;\n    };\n    return Event;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Represents a connections.\n */\nvar Connection = /** @class */ (function () {\n    function Connection(handler, type, limit, target) {\n        this.handler = handler;\n        this.type = type;\n        this.limit = limit;\n        this.target = target;\n    }\n    /**\n     * Invokes the newly-registered handler.\n     *\n     * @param object object firing the specified event\n     * @param target target of the specified event\n     * @param parameters array of parameters of the specified event\n     * @returns the returned values of the invoked handlers\n     */\n    Connection.prototype.trigger = function (object, target, parameters) {\n        var newParameters = (parameters == null ? [null] : [null].concat(parameters));\n        return this.triggerDirect(object, target, newParameters);\n    };\n    Connection.prototype.triggerDirect = function (object, target, args) {\n        var name = this.type[0];\n        if (isEmptyArray(this.type) || isEmptyArray(name)) {\n            return [];\n        }\n        var e = new Event(name, object, target, target, null);\n        e.currentTarget = object;\n        args = args || [null];\n        args[0] = e;\n        if (this.limit != null) {\n            if (0 < this.limit) {\n                this.limit -= 1;\n            }\n            else {\n                return [];\n            }\n        }\n        return [this.handler.apply(e.currentTarget, args)];\n    };\n    return Connection;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SPLIT_REGEX = /\\s+/;\nvar NAMESPACE_PREFIX = \".\";\nvar ASTERISK = \"*\";\nvar FAKE_TYPE = [\"\"];\nvar parse = function (typesString) {\n    var result = [];\n    var types = typesString.trim().split(SPLIT_REGEX);\n    for (var i = 0, imax = types.length; i < imax; ++i) {\n        var type = types[i];\n        var nameAndNamespaces = type.split(NAMESPACE_PREFIX);\n        if (nameAndNamespaces[0] === NAMESPACE_PREFIX) {\n            nameAndNamespaces[0] = ASTERISK;\n        }\n        result.push(nameAndNamespaces);\n    }\n    return result;\n};\nvar addOnon = function (context, type, handler) {\n    var name = type[0];\n    if (isNotEmptyArray(type) && isNotEmptyArray(name)) {\n        var nameToOnons = context.getOnons();\n        nameToOnons[name] = nameToOnons[name] || [];\n        nameToOnons[name].push(new Connection(handler, type, null, null));\n    }\n};\nvar checkOnonType = function (onon, type) {\n    for (var i = 1, imax = onon.type.length; i < imax; ++i) {\n        if (type.indexOf(onon.type[i]) <= 0) {\n            return false;\n        }\n    }\n    return true;\n};\nvar callOnon = function (context, type, connection, isFirst) {\n    var name = connection.type[0];\n    var onons = context.getOnons()[name];\n    if (onons != null) {\n        for (var i = 0, imax = onons.length; i < imax; ++i) {\n            var onon = onons[i];\n            if (checkOnonType(onon, type) !== true) {\n                continue;\n            }\n            onon.handler.call(connection.target, connection, isFirst);\n        }\n    }\n};\nvar addOnoff = function (context, type, handler) {\n    var name = type[0];\n    if (isNotEmptyArray(type) && isNotEmptyArray(name)) {\n        var nameToOnoffs = context.getOnoffs();\n        nameToOnoffs[name] = nameToOnoffs[name] || [];\n        nameToOnoffs[name].push(new Connection(handler, type, null, null));\n    }\n};\nvar checkOnoffType = function (onoff, type) {\n    for (var i = 1, imax = onoff.type.length; i < imax; ++i) {\n        if (type.indexOf(onoff.type[i]) <= 0) {\n            return false;\n        }\n    }\n    return true;\n};\nvar callOnoff = function (context, type, connection, isLast) {\n    var name = connection.type[0];\n    var onoffs = context.getOnoffs()[name];\n    if (onoffs != null) {\n        for (var i = 0, imax = onoffs.length; i < imax; ++i) {\n            var onoff = onoffs[i];\n            if (checkOnoffType(onoff, type) === true) {\n                onoff.handler.call(connection.target, connection, isLast);\n            }\n        }\n    }\n};\nvar addConnection = function (context, target, type, handler, limit) {\n    var name = type[0];\n    if (isNotEmptyArray(type) && isNotEmptyArray(name)) {\n        var connection = new Connection(handler, type, limit, target);\n        var nameToConnections = context.getConnections();\n        nameToConnections[name] = nameToConnections[name] || [];\n        var connections = nameToConnections[name];\n        connections.push(connection);\n        callOnon(context, type, connection, connections.length === 1);\n        if (connection.limit != null && connection.limit <= 0) {\n            // Here, we need to refresh the `sconnections`.\n            // This is because event handlers invoked via the `callOnon`\n            // may change the `connections`.\n            connections = nameToConnections[name];\n            if (connections != null) {\n                var index = connections.indexOf(connection);\n                if (0 <= index) {\n                    connections.splice(index, 1);\n                    callOnoff(context, type, connection, isEmptyArray(connections));\n                }\n            }\n        }\n    }\n};\nvar match = function (connection, type, target) {\n    for (var i = 1, imax = type.length; i < imax; ++i) {\n        if (connection.type.indexOf(type[i]) <= 0) {\n            return false;\n        }\n    }\n    return connection.target === target;\n};\nvar filter = function (context, connections, type, handler, target, callOnOff) {\n    var result = [];\n    for (var i = 0, imax = connections.length; i < imax; ++i) {\n        var connection = connections[i];\n        if (match(connection, type, target)) {\n            if (handler == null || connection.handler === handler) {\n                if (callOnOff) {\n                    callOnoff(context, type, connection, i === imax - 1 && isEmptyArray(result));\n                }\n                continue;\n            }\n        }\n        result.push(connection);\n    }\n    return result;\n};\nvar removeConnection = function (context, target, type, handler) {\n    var name = type[0];\n    if (isNotEmptyArray(type) && isNotEmptyArray(name)) {\n        filterConnections(context, target, context.getConnections(), name, type, handler, true);\n    }\n};\nvar filterConnection = function (context, target, nameToConnections, name, type, handler, callOnOff) {\n    var filteredConnections = filter(context, nameToConnections[name], type, handler, target, callOnOff);\n    if (isNotEmptyArray(filteredConnections)) {\n        nameToConnections[name] = filteredConnections;\n    }\n    else {\n        delete nameToConnections[name];\n    }\n};\nvar filterConnections = function (context, target, nameToConnections, name, type, handler, callOnOff) {\n    if (name !== ASTERISK) {\n        if (nameToConnections[name] == null) {\n            return;\n        }\n        filterConnection(context, target, nameToConnections, name, type, handler, callOnOff);\n    }\n    else {\n        for (name in nameToConnections) {\n            filterConnection(context, target, nameToConnections, name, type, handler, callOnOff);\n        }\n    }\n};\nvar removeOnon = function (context, type, handler) {\n    var name = type[0];\n    if (isNotEmptyArray(type) && isNotEmptyArray(name)) {\n        filterConnections(context, null, context.getOnons(), name, type, handler, false);\n    }\n};\nvar removeOnoff = function (context, type, handler) {\n    var name = type[0];\n    if (isNotEmptyArray(type) && isNotEmptyArray(name)) {\n        filterConnections(context, null, context.getOnoffs(), name, type, handler, false);\n    }\n};\nvar triggerConnections = function (context, connections, type, e, args, results) {\n    if (connections != null) {\n        for (var i = 0, imax = connections.length; i < imax; ++i) {\n            if (e.isImmediatePropagationStopped()) {\n                return;\n            }\n            var connection = connections[i];\n            if (match(connection, type, e.currentTarget)) {\n                var removed = false;\n                if (connection.limit != null) {\n                    if (connection.limit === 1) {\n                        connection.limit = 0;\n                        connections.splice(i, 1);\n                        i -= 1;\n                        imax -= 1;\n                        removed = true;\n                    }\n                    else if (connection.limit <= 0) {\n                        continue;\n                    }\n                    else {\n                        connection.limit -= 1;\n                    }\n                }\n                var result = connection.handler.apply(e.currentTarget, args);\n                if (results != null) {\n                    results.push(result);\n                }\n                if (removed) {\n                    callOnoff(context, type, connection, isEmptyArray(connections));\n                }\n            }\n        }\n    }\n};\nvar triggerChain = function (context, chain, connections, type, e, args, results) {\n    for (var i = 0, imax = chain.length; i < imax; ++i) {\n        if (!e.isPropagationStopped() && !e.isImmediatePropagationStopped()) {\n            e.currentTarget = chain[i];\n            triggerConnections(context, connections, type, e, args, results);\n        }\n    }\n};\nvar getChain = function (object, target) {\n    var result = [];\n    var currentTarget = target;\n    while (currentTarget != null) {\n        result.push(currentTarget);\n        currentTarget = currentTarget.parentNode;\n    }\n    result.push(object);\n    return result;\n};\nvar getArgs = function (eventObject, params) {\n    return [eventObject].concat(params || []);\n};\nvar triggerNamed = function (context, object, target, name, type, originalEvent, params, results) {\n    var nameToConnections = context.getConnections();\n    var connectionsName = nameToConnections[name];\n    var hasConnectionName = (connectionsName != null && isNotEmptyArray(connectionsName));\n    var connectionsStar = nameToConnections[ASTERISK];\n    var hasConnectionStar = (connectionsStar != null && isNotEmptyArray(connectionsStar));\n    if (hasConnectionName || hasConnectionStar) {\n        var eventObject = new Event(name, object, target, target, originalEvent);\n        var args = getArgs(eventObject, params);\n        var chain = getChain(object, target);\n        if (hasConnectionName) {\n            triggerChain(context, chain, connectionsName, type, eventObject, args, results);\n        }\n        if (hasConnectionStar) {\n            triggerChain(context, chain, connectionsStar, type, eventObject, args, results);\n        }\n    }\n};\nvar triggerUnnamed = function (context, object, target, type, originalEvent, params, results) {\n    var eventObject = new Event(\"\", object, target, target, originalEvent);\n    var args = getArgs(eventObject, params);\n    var chain = getChain(object, target);\n    var nameToConnections = context.getConnections();\n    for (var name_1 in nameToConnections) {\n        triggerChain(context, chain, nameToConnections[name_1], type, eventObject, args, results);\n    }\n};\nvar trigger = function (context, object, target, type, originalEvent, params, results) {\n    var name = type[0];\n    if (isNotEmptyArray(type) && isNotEmptyArray(name)) {\n        if (name !== ASTERISK) {\n            triggerNamed(context, object, target, name, type, originalEvent, params, results);\n        }\n        else {\n            triggerUnnamed(context, object, target, type, originalEvent, params, results);\n        }\n    }\n};\n/**\n * Provides event handling functions.\n */\nvar Connector = /** @class */ (function () {\n    function Connector() {\n        this._nameToConnections = {};\n        this._nameToOnons = {};\n        this._nameToOnoffs = {};\n    }\n    Connector.prototype.getConnections = function () {\n        return this._nameToConnections;\n    };\n    Connector.prototype.containsConnections = function () {\n        return !isEmptyObject(this._nameToConnections);\n    };\n    Connector.prototype.getOnons = function () {\n        return this._nameToOnons;\n    };\n    Connector.prototype.containsOnons = function () {\n        return !isEmptyObject(this._nameToOnons);\n    };\n    Connector.prototype.getOnoffs = function () {\n        return this._nameToOnoffs;\n    };\n    Connector.prototype.containsOnoffs = function () {\n        return !isEmptyObject(this._nameToOnoffs);\n    };\n    Connector.prototype.onon = function (types, handler) {\n        var typesList = parse(types);\n        for (var i = 0, imax = typesList.length; i < imax; ++i) {\n            addOnon(this, typesList[i], handler);\n        }\n    };\n    Connector.prototype.onoff = function (types, handler) {\n        var typesList = parse(types);\n        for (var i = 0, imax = typesList.length; i < imax; ++i) {\n            addOnoff(this, typesList[i], handler);\n        }\n    };\n    Connector.prototype.on = function (target, types, handler) {\n        var typesList = parse(types);\n        for (var i = 0, imax = typesList.length; i < imax; ++i) {\n            addConnection(this, target, typesList[i], handler, null);\n        }\n    };\n    Connector.prototype.one = function (target, types, handler) {\n        var typesList = parse(types);\n        for (var i = 0, imax = typesList.length; i < imax; ++i) {\n            addConnection(this, target, typesList[i], handler, 1);\n        }\n    };\n    Connector.prototype.off = function (target, types, handler) {\n        var typesList = parse(types);\n        for (var i = 0, imax = typesList.length; i < imax; ++i) {\n            removeConnection(this, target, typesList[i], handler);\n        }\n    };\n    Connector.prototype.offon = function (types, handler) {\n        var typesList = parse(types);\n        for (var i = 0, imax = typesList.length; i < imax; ++i) {\n            removeOnon(this, typesList[i], handler);\n        }\n    };\n    Connector.prototype.offoff = function (types, handler) {\n        var typesList = parse(types);\n        for (var i = 0, imax = typesList.length; i < imax; ++i) {\n            removeOnoff(this, typesList[i], handler);\n        }\n    };\n    Connector.prototype.trigger = function (object, target, types, params) {\n        var results = [];\n        var typesList = parse(types);\n        for (var i = 0, imax = typesList.length; i < imax; ++i) {\n            trigger(this, object, target, typesList[i], null, params, results);\n        }\n        return results;\n    };\n    Connector.prototype.triggerDirect = function (object, name, type, args, results) {\n        var eventObject = null;\n        var nameToConnections = this._nameToConnections;\n        var connectionsName = nameToConnections[name];\n        if (connectionsName != null && isNotEmptyArray(connectionsName)) {\n            eventObject = new Event(name, object, object, null, null);\n            args[0] = eventObject;\n            triggerConnections(this, connectionsName, type || FAKE_TYPE, eventObject, args, results);\n        }\n        var connectionsStar = nameToConnections[ASTERISK];\n        if (connectionsStar != null && isNotEmptyArray(connectionsStar)) {\n            if (eventObject == null) {\n                eventObject = new Event(name, object, null, null, null);\n                args[0] = eventObject;\n            }\n            triggerConnections(this, connectionsStar, type || FAKE_TYPE, eventObject, args, results);\n        }\n        return results;\n    };\n    Connector.prototype.retrigger = function (object, target, originalEvent, types, params) {\n        var results = [];\n        var typesList = parse(types);\n        for (var i = 0, imax = typesList.length; i < imax; ++i) {\n            trigger(this, object, target, typesList[i], originalEvent, params, results);\n        }\n        return results;\n    };\n    return Connector;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Provides event handling methods.\n */\nvar Connectable = /** @class */ (function () {\n    function Connectable() {\n        this.connector();\n    }\n    Connectable.prototype.connector = function () {\n        if (this.__con__ == null) {\n            Object.defineProperties(this, {\n                __con__: {\n                    value: new Connector()\n                }\n            });\n        }\n        return this.__con__;\n    };\n    /**\n     * Registers the event handler for the registration events of the specified events.\n     * The handler is invoked with [[Connection]] and a boolean when\n     * the event handlers of the specified events are registered.\n     * The latter boolean gets true if this is the first handler of the event identified\n     * by [[Connection.type]].\n     *\n     *     onon(\"eventname\", function( connection, isFirst ){\n     *         if( some-condition ) {\n     *             connection.trigger( this, null, [ first-event-parameter, second-event-parameter, ... ] );\n     *         }\n     *     });\n     *\n     * @param types space-separated event types\n     * @param handler an event handler\n     * @returns this\n     */\n    Connectable.prototype.onon = function (types, handler) {\n        this.connector().onon(types, handler);\n        return this;\n    };\n    /**\n     * Registers the event handler for the unregistration events of the specified events.\n     * The handler is invoked with [[Connection]] and a boolean when\n     * the event handlers of the specified events are unregistered.\n     * The latter boolean gets true if this is the last handler of the event identified\n     * by [[Connection.type]].\n     *\n     *     onoff(\"eventname\", function( connection, isLast ){\n     *         // DO SOMETHING HERE\n     *     });\n     *\n     * @param types space-separated event names\n     * @param handler an event handler\n     * @returns this\n     */\n    Connectable.prototype.onoff = function (types, handler) {\n        this.connector().onoff(types, handler);\n        return this;\n    };\n    /**\n     * Unregisters the event handlers for the registration events of the specified events.\n     *\n     *     offon(\"eventname\", handler);\n     *\n     * @param types space-separated event types\n     * @param handler an event handler\n     * @returns this\n     */\n    Connectable.prototype.offon = function (types, handler) {\n        this.connector().offon(types, handler);\n        return this;\n    };\n    /**\n     * Unregisters the event handler for the unregistration events of the specified events.\n     *\n     *     onoff(\"eventname\", handler);\n     *\n     * @param types space-separated event names\n     * @param handler an event handler\n     * @returns this\n     */\n    Connectable.prototype.offoff = function (types, handler) {\n        this.connector().offoff(types, handler);\n        return this;\n    };\n    Connectable.prototype.on = function (targetOrTypes, typesOrHandler, handler) {\n        var c = this.connector();\n        if (isString(typesOrHandler)) {\n            c.on(targetOrTypes, typesOrHandler, handler);\n        }\n        else {\n            c.on(this, targetOrTypes, typesOrHandler);\n        }\n        return this;\n    };\n    Connectable.prototype.one = function (targetOrTypes, typesOrHandler, handler) {\n        var c = this.connector();\n        if (isString(typesOrHandler)) {\n            c.one(targetOrTypes, typesOrHandler, handler);\n        }\n        else {\n            c.one(this, targetOrTypes, typesOrHandler);\n        }\n        return this;\n    };\n    Connectable.prototype.off = function (targetOrTypes, typesOrHandler, handler) {\n        var a = arguments;\n        var c = this.connector();\n        if (a.length === 1) {\n            c.off(this, targetOrTypes, null);\n        }\n        else if (a.length === 2) {\n            if (isString(a[0])) {\n                c.off(this, targetOrTypes, typesOrHandler);\n            }\n            else {\n                c.off(targetOrTypes, typesOrHandler, null);\n            }\n        }\n        else {\n            c.off(targetOrTypes, typesOrHandler, handler);\n        }\n        return this;\n    };\n    Connectable.prototype.trigger = function (targetOrTypes, typesOrParameters, parameters) {\n        var a = arguments;\n        var c = this.connector();\n        if (a.length === 1) {\n            return c.trigger(this, null, targetOrTypes, null);\n        }\n        else if (a.length === 2) {\n            if (isString(a[0])) {\n                return c.trigger(this, null, targetOrTypes, typesOrParameters);\n            }\n            else {\n                return c.trigger(this, targetOrTypes, typesOrParameters, null);\n            }\n        }\n        else {\n            return c.trigger(this, targetOrTypes, typesOrParameters, parameters);\n        }\n    };\n    Connectable.prototype.triggerDirect = function (name, type, args, results) {\n        return this.connector().triggerDirect(this, name, type, args || [null], results);\n    };\n    Connectable.prototype.retrigger = function (targetOrOriginalEvent, originalEventOrTypes, typesOrParameters, parameters) {\n        var a = arguments;\n        var c = this.connector();\n        if (a.length === 2) {\n            return c.retrigger(this, null, targetOrOriginalEvent, originalEventOrTypes, null);\n        }\n        else if (a.length === 3) {\n            if (isString(a[2])) {\n                return c.retrigger(this, targetOrOriginalEvent, originalEventOrTypes, typesOrParameters, null);\n            }\n            else {\n                return c.retrigger(this, null, targetOrOriginalEvent, originalEventOrTypes, typesOrParameters);\n            }\n        }\n        else {\n            return c.retrigger(this, targetOrOriginalEvent, originalEventOrTypes, typesOrParameters, parameters);\n        }\n    };\n    /**\n     * Extends the specified target with the Connectable methods.\n     *\n     * @param target non-null target to be extended\n     * @returns the specified target\n     */\n    Connectable.extend = function (target) {\n        var parameters = {};\n        var prototype = this.prototype;\n        for (var key in prototype) {\n            if (hasOwn(prototype, key)) {\n                parameters[key] = { value: prototype[key] };\n            }\n        }\n        return Object.defineProperties(target, parameters);\n    };\n    return Connectable;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A base class for all container classes.\n */\nvar SContainer = /** @class */ (function (_super) {\n    __extends(SContainer, _super);\n    function SContainer(__mem__) {\n        var _this = _super.call(this) || this;\n        _this.__mem__ = __mem__;\n        return _this;\n    }\n    /**\n     * Returns true if this is read-only.\n     *\n     * @returns true if this is read-only\n     */\n    SContainer.prototype.isReadOnly = function () {\n        return this.__mem__.isReadOnly_();\n    };\n    /**\n     * Returns true if this is non-null.\n     *\n     * @returns true if this is non-null.\n     */\n    SContainer.prototype.isNonNull = function () {\n        return this.__mem__.isNonNull_();\n    };\n    SContainer.prototype.uninitialize = function () {\n        this.__mem__.uninitialize_();\n        return this;\n    };\n    /**\n     * Returns true if this is initialized.\n     *\n     * @returns true if this is initialized.\n     */\n    SContainer.prototype.isInitialized = function () {\n        return this.__mem__.isInitialized_();\n    };\n    SContainer.prototype.initialize = function () {\n        this.__mem__.initialize_();\n        return this;\n    };\n    /**\n     * Locks this data.\n     *\n     * @returns this\n     */\n    SContainer.prototype.lock = function () {\n        this.__mem__.lock_();\n        return this;\n    };\n    /**\n     * Returns true if this data is locked.\n     *\n     * @returns true if this data is locked\n     */\n    SContainer.prototype.isLocked = function () {\n        return this.__mem__.isLocked_();\n    };\n    /**\n     * Unlocks this data.\n     *\n     * @returns this\n     */\n    SContainer.prototype.unlock = function () {\n        this.__mem__.unlock_();\n        return this;\n    };\n    /**\n     * Returns the string representation of this container.\n     *\n     * @returns the string representation of this container\n     */\n    SContainer.prototype.toString = function () {\n        return this.__mem__.toString_();\n    };\n    return SContainer;\n}(Connectable));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nfunction defaultComparator(a, b) {\n    return a === b;\n}\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar toSScalarValue = function (value) {\n    return (value instanceof SScalar ? value.get() : value);\n};\n/**\n * Represents a scalar data.\n * The scalar data this class has is to be synchronized with the one on a server.\n */\nvar SScalar = /** @class */ (function (_super) {\n    __extends(SScalar, _super);\n    function SScalar(__mem__) {\n        var _this = _super.call(this) || this;\n        _this.__mem__ = __mem__;\n        return _this;\n    }\n    /**\n     * Returns true if this is read-only.\n     *\n     * @returns true if this is read-only\n     */\n    SScalar.prototype.isReadOnly = function () {\n        return this.__mem__.isReadOnly_();\n    };\n    /**\n     * Returns true if this is non-null.\n     *\n     * @returns true if this is non-null.\n     */\n    SScalar.prototype.isNonNull = function () {\n        return this.__mem__.isNonNull_();\n    };\n    SScalar.prototype.uninitialize = function () {\n        this.__mem__.uninitialize_();\n        return this;\n    };\n    /**\n     * Returns true if this is initialized.\n     *\n     * @returns true if this is initialized.\n     */\n    SScalar.prototype.isInitialized = function () {\n        return this.__mem__.isInitialized_();\n    };\n    SScalar.prototype.initialize = function () {\n        this.__mem__.initialize_();\n        return this;\n    };\n    /**\n     * Locks this data.\n     *\n     * @returns this\n     */\n    SScalar.prototype.lock = function () {\n        this.__mem__.lock_();\n        return this;\n    };\n    /**\n     * Returns true if this data is locked.\n     *\n     * @returns true if this data is locked\n     */\n    SScalar.prototype.isLocked = function () {\n        return this.__mem__.isLocked_();\n    };\n    /**\n     * Unlocks this data.\n     *\n     * @returns this\n     */\n    SScalar.prototype.unlock = function () {\n        this.__mem__.unlock_();\n        return this;\n    };\n    /**\n     * Marks as updated.\n     *\n     * @throws Error if this is read-only\n     * @returns this\n     */\n    SScalar.prototype.toDirty = function () {\n        this.__mem__.toDirty_();\n        return this;\n    };\n    /**\n     * Returns the current value.\n     *\n     * @returns the current value\n     */\n    SScalar.prototype.get = function () {\n        return this.__mem__.get_();\n    };\n    /**\n     * Sets to the specified value if the specified value differs from the current value.\n     * If the `forcibly` is true, sets to the specified value even if the specified value equals to the current value.\n     *\n     * @param value new value\n     * @param forcibly true to ignore an equality check\n     * @throws Error if this is read-only\n     * @throws Error if `value` is null and this is non-null\n     * @returns this\n     */\n    SScalar.prototype.set = function (value, forcibly) {\n        if (forcibly === void 0) { forcibly = false; }\n        this.__mem__.set_(value, forcibly);\n        return this;\n    };\n    /**\n     * Resets to the current value.\n     *\n     * @throws Error if this is read-only\n     * @returns the current value\n     */\n    SScalar.prototype.reset = function () {\n        return this.__mem__.reset_();\n    };\n    /**\n     * Returns the current value.\n     *\n     * @returns the current value\n     */\n    SScalar.prototype.getValue = function () {\n        return this.__mem__.get_();\n    };\n    /**\n     * Sets to the specified value if the specified value differs from the current value.\n     * If the `forcibly` is true, sets to the specified value even if the specified value equals to the current value.\n     *\n     * @param value the new value\n     * @param forcibly true to ignore an equality check\n     * @throws Error if this is read-only\n     * @throws Error if `value` is null and this is non-null\n     * @returns this\n     */\n    SScalar.prototype.setValue = function (value, forcibly) {\n        if (forcibly === void 0) { forcibly = false; }\n        this.__mem__.set_(value, forcibly);\n        return this;\n    };\n    /**\n     * Resets to the current value.\n     *\n     * @throws Error if this is read-only\n     * @returns the current value\n     */\n    SScalar.prototype.resetValue = function () {\n        return this.__mem__.reset_();\n    };\n    /**\n     * Sets to the specified value and returns the old value if the specified value differs from the current value.\n     * If the `forcibly` is true, sets to the specified value even if the specified value equals to the current value.\n     *\n     * @param value the new value\n     * @param forcibly true to ignore an equality check\n     * @returns the old value\n     * @throws Error if this is read-only\n     * @throws Error if `value` is null and this is non-null\n     */\n    SScalar.prototype.getAndSet = function (value, forcibly) {\n        if (forcibly === void 0) { forcibly = false; }\n        return this.__mem__.set_(value, forcibly);\n    };\n    /**\n     * Sets to the `update` if the `expected` equals to this value and the `update` differs from the current value.\n     * If the `forcibly` is true, sets to the specified value even if the `update` equals to the current value.\n     *\n     * @param expected the expected value\n     * @param update the new value\n     * @param forcibly true to ignore an equality check\n     * @returns true if the `expected` is equal to this value\n     * @throws Error if this is read-only\n     * @throws Error if `update` is null and this is non-null\n     */\n    SScalar.prototype.compareAndSet = function (expected, update, forcibly) {\n        if (forcibly === void 0) { forcibly = false; }\n        return this.__mem__.compareAndSet_(expected, update, forcibly);\n    };\n    /**\n     * Returns true if this value is equal to the specified value.\n     *\n     * @param value value to be compared\n     * @returns true if this value is equal to the specified value\n     */\n    SScalar.prototype.equals = function (value) {\n        return this.__mem__.equals_(toSScalarValue(value));\n    };\n    /**\n     * Compares this value with the specified value.\n     * Returns a negative integer, zero, a positive integer as this value is less than,\n     * equals to, or greater than the specified value.\n     *\n     * @param value value to be compared\n     * @returns a negative integer, zero, a positive integer as this value is less than,\n     * equals to, or greater than the specified value\n     */\n    SScalar.prototype.compareTo = function (value) {\n        return this.__mem__.compareTo_(toSScalarValue(value));\n    };\n    /**\n     * If the value is an array, returns the size of the array.\n     *\n     * If the value is an object, returns the number of fields in the object.\n     *\n     * If the value is null/undefined, returns 0.\n     *\n     * For anything else, returns 1.\n     *\n     * @returns the size of this value\n     */\n    SScalar.prototype.size = function () {\n        return this.__mem__.size_();\n    };\n    /**\n     * Returns true if the size is zero.\n     *\n     * @returns true if the size is zero\n     */\n    SScalar.prototype.isEmpty = function () {\n        return this.__mem__.isEmpty_();\n    };\n    /**\n     * Returns true if the value is null/undefined.\n     *\n     * @returns true if the value is null/undefined.\n     */\n    SScalar.prototype.isNull = function () {\n        return this.__mem__.isNull_();\n    };\n    /**\n     * Returns true if the value is not null/undefined.\n     *\n     * @returns true if the value is not null/undefined.\n     */\n    SScalar.prototype.isNotNull = function () {\n        return this.__mem__.isNotNull_();\n    };\n    SScalar.prototype.each = function (iteratee, thisArg, reverse) {\n        if (thisArg === void 0) { thisArg = this; }\n        if (reverse === void 0) { reverse = false; }\n        this.__mem__.each_(iteratee, thisArg, reverse);\n        return this;\n    };\n    SScalar.prototype.find = function (predicate, thisArg, reverse) {\n        if (thisArg === void 0) { thisArg = this; }\n        if (reverse === void 0) { reverse = false; }\n        return this.__mem__.find_(predicate, thisArg, reverse);\n    };\n    /**\n     * If the value is an array, returns the index of the specified value.\n     * Otherwise, returns -1.\n     *\n     * @param value value to search for\n     * @param comparator comparator\n     * @param thisArg context for the comparator\n     * @returns the index of the specified value\n     */\n    SScalar.prototype.indexOf = function (value, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.indexOf_(value, comparator, thisArg);\n    };\n    /**\n     * If the value is an array, returns the last index of the specified value.\n     * Otherwise, returns -1.\n     *\n     * @param value value to search for\n     * @param comparator comparator\n     * @param thisArg context for the comparator\n     * @returns the last index of the specified value\n     */\n    SScalar.prototype.lastIndexOf = function (value, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.lastIndexOf_(value, comparator, thisArg);\n    };\n    /**\n     * Returns true if this contains the specified value.\n     *\n     * @param value value to search for\n     * @param comparator comparator\n     * @param thisArg context for the comparator\n     * @returns true if this contains the specified value\n     */\n    SScalar.prototype.contains = function (value, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.contains_(value, comparator, thisArg);\n    };\n    /**\n     * Returns true if this contains all the specified values.\n     *\n     * @param values values to search for\n     * @param comparator comparator\n     * @param thisArg context for the comparator\n     * @returns true if this contains all the specified values\n     */\n    SScalar.prototype.containsAll = function (values, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.containsAll_(values, comparator, thisArg);\n    };\n    /**\n     * Returns the JSON representing this value.\n     * Must not change the returned value.\n     *\n     * @returns the JSON representing this value\n     */\n    SScalar.prototype.toJson = function () {\n        return this.__mem__.toJson_();\n    };\n    /**\n     * Sets to the specified JSON.\n     *\n     * @param json JSON to be set\n     * @returns this\n     */\n    SScalar.prototype.fromJson = function (json) {\n        this.__mem__.fromJson_(json);\n        return this;\n    };\n    /**\n     * Returns the string representing this value.\n     *\n     * @returns the string representing this value\n     */\n    SScalar.prototype.toString = function () {\n        return this.__mem__.toString_();\n    };\n    /**\n     * Sets to the specified string.\n     *\n     * @param str string to be set\n     * @returns this\n     */\n    SScalar.prototype.fromString = function (str) {\n        this.__mem__.fromString_(str);\n        return this;\n    };\n    return SScalar;\n}(Connectable));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Represents a number.\n */\nvar SNumber = /** @class */ (function (_super) {\n    __extends(SNumber, _super);\n    function SNumber(memory) {\n        return _super.call(this, memory) || this;\n    }\n    /**\n     * Adds the specified value to the current value if the current value is not null.\n     *\n     * @param delta value to add\n     * @returns updated value\n     * @throws Error if this is read-only\n     */\n    SNumber.prototype.addAndGet = function (delta) {\n        return this.__mem__.addAndGet_(delta);\n    };\n    /**\n     * Adds the specified value to the current value if the current value is not null.\n     *\n     * @param delta value to add\n     * @returns previous value\n     * @throws Error if this is read-only\n     */\n    SNumber.prototype.getAndAdd = function (delta) {\n        return this.__mem__.getAndAdd_(delta);\n    };\n    /**\n     * Decrements by one the current value if the current value is not null.\n     *\n     * @returns updated value\n     * @throws Error if this is read-only\n     */\n    SNumber.prototype.decrementAndGet = function () {\n        return this.__mem__.decrementAndGet_();\n    };\n    /**\n     * Decrements by one the current value if the current value is not null.\n     *\n     * @returns previous value\n     * @throws Error if this is read-only\n     */\n    SNumber.prototype.getAndDecrement = function () {\n        return this.__mem__.getAndDecrement_();\n    };\n    /**\n     * Increments by one the current value if the current value is not null.\n     *\n     * @returns previous value\n     * @throws Error if this is read-only\n     */\n    SNumber.prototype.getAndIncrement = function () {\n        return this.__mem__.getAndIncrement_();\n    };\n    /**\n     * Increments by one the current value if the current value is not null.\n     *\n     * @returns updated value\n     * @throws Error if this is read-only\n     */\n    SNumber.prototype.incrementAndGet = function () {\n        return this.__mem__.incrementAndGet_();\n    };\n    return SNumber;\n}(SScalar));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SIntegralNumber = /** @class */ (function (_super) {\n    __extends(SIntegralNumber, _super);\n    function SIntegralNumber(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return SIntegralNumber;\n}(SNumber));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar N_BITS = 8;\nvar N_BINS = 256;\nvar HAS_TYPED_ARRAY = (typeof Uint32Array !== \"undefined\");\nvar COUNT = (HAS_TYPED_ARRAY ? new Uint32Array(N_BINS) : new Array(N_BINS));\nvar BIN_START = (HAS_TYPED_ARRAY ? new Uint32Array(N_BINS) : new Array(N_BINS));\nvar BIN_END = (HAS_TYPED_ARRAY ? new Uint32Array(N_BINS) : new Array(N_BINS));\nvar DUMMY_UPDATED_ITEM2 = { index: 0, newValue: null, oldValue: null };\nvar WORKING_ARRAY = [];\nvar toBinIndex = function (index, mask, shift) {\n    return (index & mask) >>> shift;\n};\nvar mergeAndSortUpdated = function (array) {\n    var length = array.length;\n    if (length <= 1) {\n        return array;\n    }\n    var workingArray = WORKING_ARRAY;\n    workingArray.length = length;\n    var mask = N_BINS - 1;\n    var shift = 0;\n    var count = COUNT;\n    var start = BIN_START;\n    var end = BIN_END;\n    var max = array[0].index;\n    for (var i = 0; i < length; ++i) {\n        max = Math.max(max, array[i].index);\n    }\n    while (0 < max) {\n        for (var i = 0; i < N_BINS; ++i) {\n            count[i] = 0;\n        }\n        for (var i = 0; i < length; ++i) {\n            ++count[toBinIndex(array[i].index, mask, shift)];\n        }\n        start[0] = end[0] = 0;\n        for (var i = 1; i < N_BINS; ++i) {\n            start[i] = end[i] = start[i - 1] + count[i - 1];\n        }\n        for (var i = 0; i < length; ++i) {\n            workingArray[end[toBinIndex(array[i].index, mask, shift)]++] = array[i];\n        }\n        // Swap\n        var tmp1 = array;\n        array = workingArray;\n        workingArray = tmp1;\n        // Next\n        mask <<= N_BITS;\n        shift += N_BITS;\n        max = max >>> N_BITS;\n    }\n    var tmp2 = array;\n    array = workingArray;\n    WORKING_ARRAY = workingArray = tmp2;\n    // Merge and copy\n    var previous = workingArray[0];\n    workingArray[0] = DUMMY_UPDATED_ITEM2;\n    array[0] = previous;\n    var inext = 1;\n    for (var i = 1; i < length; ++i) {\n        var next = workingArray[i];\n        workingArray[i] = DUMMY_UPDATED_ITEM2;\n        if (previous.index === next.index) {\n            previous.newValue = next.newValue;\n        }\n        else {\n            array[inext++] = next;\n            previous = next;\n        }\n    }\n    array.length = inext;\n    return array;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SRealNumber = /** @class */ (function (_super) {\n    __extends(SRealNumber, _super);\n    function SRealNumber(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return SRealNumber;\n}(SNumber));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar internal;\n(function (internal) {\n    internal.SScalar = SScalar;\n    internal.SNumber = SNumber;\n    internal.SIntegralNumber = SIntegralNumber;\n    internal.SRealNumber = SRealNumber;\n    internal.SContainer = SContainer;\n    internal.mergeAndSortUpdated = mergeAndSortUpdated;\n})(internal || (internal = {}));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar isArray = Array.isArray || (function (target) {\n    return checkTag(target, \"[object Array]\");\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar ID_KEY = \"__id__\";\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Central class for custom exceptions.\n *\n *     throw Exception.create();\n *\n * Must use [[isInstance]] static method instead of the `instanceof` to check\n * whether an error is an instance of this class.\n * This limitation comes from the fact that the custom exceptions inheriting\n * from the Error class are not printed well in the console.\n *\n *     const e = Exception.create();\n *\n *     console.log( e instanceof Exception ); // => false\n *     console.log( Exception.isInstance( e ) ); // => true\n */\nvar Exception = /** @class */ (function () {\n    /**\n     * Must not call this constructor.\n     *\n     * @private\n     */\n    function Exception() {\n        throw new Error(\"Must not call a constructor\");\n    }\n    /**\n     * Returns a new exception.\n     * The returned instance is not an instance of this class in the prototypical sense.\n     * Thus must use [[isInstance]] to check whether or not an instance is an instance of this class.\n     *\n     * @param message a message of a new exception\n     * @returns a new exception\n     */\n    Exception.create = function (message) {\n        if (message === void 0) { message = this.getMessage(); }\n        var result = new Error(message);\n        result[ID_KEY] = this.getId();\n        return result;\n    };\n    /**\n     * Returns true if the specified error is an instance of this class.\n     *\n     * @param error an error to be checked\n     * @returns true if the specified error is an instance of this class\n     */\n    Exception.isInstance = function (error) {\n        return error[ID_KEY] === this.getId();\n    };\n    Exception.getId = function () {\n        return \"Exception\";\n    };\n    Exception.getMessage = function () {\n        return \"\";\n    };\n    return Exception;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Thrown to indicate that an operation is not supported.\n *\n *     throw UnsupportedOperationException.create();\n *\n * Must use `isInstance` static method instead of the `instanceof` to check\n * whether an error is an instance of this class.\n * This limitation comes from the fact that the custom exceptions inheriting\n * from the Error class are not printed well in the console.\n *\n *     const e = UnsupportedOperationException.create();\n *\n *     console.log( e instanceof UnsupportedOperationException ); // => false\n *     console.log( UnsupportedOperationException.isInstance( e ) ); // => true\n */\nvar UnsupportedOperationException = /** @class */ (function (_super) {\n    __extends(UnsupportedOperationException, _super);\n    function UnsupportedOperationException() {\n        return _super.call(this) || this;\n    }\n    UnsupportedOperationException.getId = function () {\n        return \"UnsupportedOperationException\";\n    };\n    UnsupportedOperationException.getMessage = function () {\n        return \"unsupported operation\";\n    };\n    return UnsupportedOperationException;\n}(Exception));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Provides configurable logging functions.\n * Please note that the default log level is `debug`.\n *\n *     logger.log( \"log message\" );\n */\nvar Logger = /** @class */ (function () {\n    function Logger() {\n    }\n    // Instance\n    Logger.getInstance = function () {\n        throw UnsupportedOperationException.create();\n    };\n    return Logger;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar LoggerImpl = /** @class */ (function (_super) {\n    __extends(LoggerImpl, _super);\n    function LoggerImpl() {\n        var _this = _super.call(this) || this;\n        _this.setLevel(\"debug\");\n        return _this;\n    }\n    LoggerImpl.prototype.setLevel = function (newLevel) {\n        var LOG_LEVELS = LoggerImpl._LOG_LEVELS;\n        var index = LOG_LEVELS.indexOf(newLevel);\n        if (0 <= index) {\n            this._level = newLevel;\n            var target = this;\n            for (var i = 0; i < index; ++i) {\n                target[LOG_LEVELS[i]] = LoggerImpl.noop_;\n            }\n            for (var i = index, imax = LOG_LEVELS.length; i < imax; ++i) {\n                var level = LOG_LEVELS[i];\n                target[level] = LoggerImpl.getConsoleMethod_(level);\n            }\n        }\n        return this;\n    };\n    LoggerImpl.prototype.getLevel = function () {\n        return this._level;\n    };\n    LoggerImpl.prototype.debug = function () {\n        // DO NOTHING\n    };\n    LoggerImpl.prototype.info = function () {\n        // DO NOTHING\n    };\n    LoggerImpl.prototype.warn = function () {\n        // DO NOTHING\n    };\n    LoggerImpl.prototype.error = function () {\n        // DO NOTHING\n    };\n    LoggerImpl.prototype.log = function () {\n        // DO NOTHING\n    };\n    LoggerImpl.getInstance = function () {\n        if (this.INSTANCE == null) {\n            this.INSTANCE = new LoggerImpl();\n        }\n        return this.INSTANCE;\n    };\n    LoggerImpl.noop_ = function () {\n        /* DO NOTHING */\n    };\n    LoggerImpl.getConsoleMethod_ = function (level) {\n        if (typeof console === \"undefined\") {\n            return this.noop_;\n        }\n        else {\n            if (Function.prototype.bind) {\n                var c = console;\n                var m = c[level] || c.log;\n                return Function.prototype.bind.call(m, c);\n            }\n            else {\n                var c_1 = console;\n                var m_1 = c_1[level] || c_1.log;\n                // tslint:disable-next-line:only-arrow-functions\n                return function () {\n                    Function.prototype.apply.call(m_1, c_1, arguments);\n                };\n            }\n        }\n    };\n    LoggerImpl.INSTANCE = null;\n    LoggerImpl._LOG_LEVELS = [\"debug\", \"info\", \"warn\", \"error\", \"log\"];\n    return LoggerImpl;\n}(Logger));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar isPlainObject = (Object.getPrototypeOf != null ? function (target) {\n    if (target != null && checkType(target, \"object\") && checkTag(target, \"[object Object]\")) {\n        var prototype = Object.getPrototypeOf(target);\n        return prototype == null || prototype === Object.prototype;\n    }\n    return false;\n} : function (target) {\n    return (target != null && checkType(target, \"object\") && checkTag(target, \"[object Object]\"));\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar sizeObject = (Object.keys != null ? function (target) {\n    return Object.keys(target).length;\n} : function (target) {\n    var result = 0;\n    for (var key in target) {\n        if (hasOwn(target, key)) {\n            result += 1;\n        }\n    }\n    return result;\n});\nvar size = function (target) {\n    if (isArrayLike(target)) {\n        return target.length;\n    }\n    else if (target != null) {\n        return sizeObject(target);\n    }\n    return 0;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar isEqualOther = function (a, b) {\n    return (a === b) || (a !== a && b !== b);\n};\nvar isEqualArray = function (a, b) {\n    if (a.length !== b.length) {\n        return false;\n    }\n    for (var i = 0, imax = a.length; i < imax; ++i) {\n        if (!isEqual(a[i], b[i])) {\n            return false;\n        }\n    }\n    return true;\n};\nvar isEqualObject = (Object.keys != null ? function (a, b) {\n    var keys = Object.keys(a);\n    var length = keys.length;\n    if (length !== sizeObject(b)) {\n        return false;\n    }\n    for (var i = 0; i < length; ++i) {\n        var key = keys[i];\n        if (!hasOwn(b, key) || !isEqual(a[key], b[key])) {\n            return false;\n        }\n    }\n    return true;\n} : function (a, b) {\n    // For a\n    for (var key in a) {\n        if (hasOwn(a, key)) {\n            if (!hasOwn(b, key) || !isEqual(a[key], b[key])) {\n                return false;\n            }\n        }\n    }\n    // For b\n    for (var key in b) {\n        if (hasOwn(b, key) && !hasOwn(a, key)) {\n            return false;\n        }\n    }\n    return true;\n});\nvar isEqual = function (a, b) {\n    if (isEqualOther(a, b)) {\n        return true;\n    }\n    else {\n        if (isArray(a)) {\n            if (isArray(b)) {\n                return isEqualArray(a, b);\n            }\n            else {\n                return false;\n            }\n        }\n        else if (isPlainObject(a)) {\n            if (isPlainObject(b)) {\n                return isEqualObject(a, b);\n            }\n            else {\n                return false;\n            }\n        }\n        return false;\n    }\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Thrown to indicate that a method has been invoked with a null argument which is not supported.\n *\n *     throw NullPointerException.create();\n *\n * Must use `isInstance` static method instead of the `instanceof` to check\n * whether an error is an instance of this class.\n * This limitation comes from the fact that the custom exceptions inheriting\n * from the Error class are not printed well in the console.\n *\n *     const e = NullPointerException.create();\n *\n *     console.log( e instanceof NullPointerException ); // => false\n *     console.log( NullPointerException.isInstance( e ) ); // => true\n */\nvar NullPointerException = /** @class */ (function (_super) {\n    __extends(NullPointerException, _super);\n    function NullPointerException() {\n        return _super.call(this) || this;\n    }\n    NullPointerException.getId = function () {\n        return \"NullPointerException\";\n    };\n    NullPointerException.getMesage = function () {\n        return \"unexpected null\";\n    };\n    return NullPointerException;\n}(Exception));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar checkNonNull = function (value) {\n    if (value == null) {\n        throw NullPointerException.create();\n    }\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar checkNonNullValue = function (target, value) {\n    if (target.isNonNull_()) {\n        checkNonNull(value);\n    }\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar checkSupported = function (target) {\n    if (target.isReadOnly_()) {\n        throw UnsupportedOperationException.create();\n    }\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar ArrayMaps = {\n    put_: function (arrayMap, key, value) {\n        if (arrayMap == null) {\n            arrayMap = [[key], [value]];\n        }\n        else {\n            arrayMap[0].push(key);\n            arrayMap[1].push(value);\n        }\n        return arrayMap;\n    },\n    merge_: function (data, info) {\n        return ((data != null || info != null) ? [data, info] : null);\n    }\n};\nvar isCallableStaticData = function (staticData) {\n    return (staticData[0] === 0);\n};\nvar isTaskStaticData = function (staticData) {\n    return (staticData[0] === 1);\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar EVENT_INIT = \"init\";\nvar EVENT_CHANGE = \"change\";\nvar EVENT_VALUE = \"value\";\nvar EVENT_CHANGE_VALUE = \"change value\";\nvar EVENT_CREATE = \"create\";\nvar EVENT_DESTROY = \"destroy\";\nvar EVENT_SHOW = \"show\";\nvar EVENT_HIDE = \"hide\";\nvar EVENT_PAGE = \"page\";\nvar EVENT_CALL = \"call\";\nvar EVENT_SUCCESS = \"success\";\nvar EVENT_FAIL = \"fail\";\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SScalarMemory = /** @class */ (function () {\n    function SScalarMemory(parent, name, properties, lock, wrapperConstructor, type) {\n        var _this = this;\n        this._isChanged = false;\n        this._isInitialized = false;\n        this._revision = 0;\n        this._authorizedRevision = -1;\n        this._sentRevision = -1;\n        this._sentSenderId = -1;\n        this._isEventStopped = false;\n        this._forcibly = false;\n        this._wrapper = new wrapperConstructor(this);\n        this._parent = parent;\n        this._name = name;\n        this._lock = lock;\n        this._properties = properties;\n        this._type = type;\n        this._value = this.cast_(null);\n        var wrapper = this.getWrapper_();\n        wrapper.onon(EVENT_INIT, function (connection) {\n            if (_this._isInitialized) {\n                connection.triggerDirect(wrapper, null, [null, _this._value]);\n            }\n        });\n        wrapper.onon(EVENT_VALUE, function (connection) {\n            if (_this._isInitialized) {\n                var value = _this._value;\n                connection.triggerDirect(wrapper, null, [null, value, value]);\n            }\n        });\n    }\n    SScalarMemory.prototype.getWrapper_ = function () {\n        return this._wrapper;\n    };\n    SScalarMemory.prototype.getType_ = function () {\n        return this._type;\n    };\n    SScalarMemory.prototype.getName_ = function () {\n        return this._name;\n    };\n    SScalarMemory.prototype.startEvent_ = function () {\n        this._isEventStopped = true;\n        return this;\n    };\n    SScalarMemory.prototype.isEventStopped_ = function () {\n        return this._isEventStopped;\n    };\n    SScalarMemory.prototype.stopEvent_ = function () {\n        this._isEventStopped = false;\n        return this;\n    };\n    SScalarMemory.prototype.getRevision_ = function () {\n        return this._revision;\n    };\n    SScalarMemory.prototype.getAuthorizedRevision_ = function () {\n        return this._authorizedRevision;\n    };\n    SScalarMemory.prototype.setAuthorizedRevision_ = function (authorizedRevision) {\n        this._authorizedRevision = Math.max(this._authorizedRevision, authorizedRevision);\n    };\n    SScalarMemory.prototype.resetAuthorizedRevision_ = function () {\n        this._authorizedRevision = -1;\n        if (this._properties.isReadOnly_()) {\n            this._revision = 0;\n        }\n    };\n    SScalarMemory.prototype.getSentSenderId_ = function () {\n        return this._sentSenderId;\n    };\n    SScalarMemory.prototype.setSentSenderId_ = function (senderId) {\n        this._sentSenderId = senderId;\n        this._sentRevision = this._revision;\n    };\n    SScalarMemory.prototype.resetSentSenderId_ = function () {\n        this._sentSenderId = -1;\n        this.setAuthorizedRevision_(this._sentRevision);\n    };\n    SScalarMemory.prototype.getSentRevision_ = function () {\n        return this._sentRevision;\n    };\n    SScalarMemory.prototype.isReadOnly_ = function () {\n        return this._properties.isReadOnly_();\n    };\n    SScalarMemory.prototype.isNonNull_ = function () {\n        return this._properties.isNonNull_();\n    };\n    SScalarMemory.prototype.isLocal_ = function () {\n        return this._properties.isLocal_();\n    };\n    SScalarMemory.prototype.lock_ = function () {\n        this._lock.lock();\n    };\n    SScalarMemory.prototype.isLocked_ = function () {\n        return this._lock.isLocked();\n    };\n    SScalarMemory.prototype.unlock_ = function () {\n        // Propagate the change flag\n        if (this._isChanged) {\n            this._isChanged = false;\n            if (!this._properties.isLocal_()) {\n                this._revision += 1;\n                var parent_1 = this._parent;\n                if (parent_1 != null) {\n                    parent_1.update_();\n                }\n            }\n        }\n        // Unlock\n        var count = this._lock.getHoldCount();\n        if (count <= 1) {\n            var parent_2 = this._parent;\n            if (parent_2 != null) {\n                parent_2.onUnlock_();\n            }\n            else {\n                this._lock.unlock();\n            }\n        }\n        else {\n            // Otherwise\n            this._lock.unlock();\n        }\n    };\n    SScalarMemory.prototype.initialize_ = function () {\n        this.lock_();\n        try {\n            if (!this._isInitialized) {\n                this._isChanged = true;\n                this._isInitialized = true;\n                var value = this._value;\n                this.pushEvent_(EVENT_INIT, [null, value]);\n                this.pushEvent_(EVENT_VALUE, [null, value, value]);\n            }\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SScalarMemory.prototype.isInitialized_ = function () {\n        return this._isInitialized;\n    };\n    SScalarMemory.prototype.uninitialize_ = function () {\n        this._isInitialized = false;\n        if (this._parent != null) {\n            this._parent.uninitialize_();\n        }\n    };\n    SScalarMemory.prototype.pack_ = function (dynamicInfoDataMap, senderId) {\n        this.setSentSenderId_(senderId);\n        var packed = [this._revision, this.getType_(), this._value];\n        return ArrayMaps.put_(dynamicInfoDataMap, this._name, packed);\n    };\n    SScalarMemory.prototype.getAndSet_ = function (newValue, forcibly, update) {\n        var oldValue = this._value;\n        if (!this._isInitialized) {\n            this.pushEvent_(EVENT_INIT, [null, newValue]);\n        }\n        if (this._forcibly || forcibly || !isEqual(newValue, oldValue)) {\n            this._value = newValue;\n            if (update) {\n                this._isChanged = true;\n            }\n            this._isInitialized = true;\n            this.pushEvent_(EVENT_CHANGE_VALUE, [null, newValue, oldValue]);\n        }\n        else {\n            if (!this._isInitialized) {\n                this._isInitialized = true;\n                this.pushEvent_(EVENT_VALUE, [null, newValue, oldValue]);\n            }\n        }\n        return oldValue;\n    };\n    SScalarMemory.prototype.unpack__ = function (newValue, revision) {\n        if (this.isNonNull_() && newValue == null) {\n            if (this._value == null) {\n                this.forceRevision_(revision);\n            }\n            else {\n                this._isChanged = true;\n            }\n        }\n        else {\n            this.forceRevision_(revision);\n            this.getAndSet_(newValue, false, false);\n        }\n    };\n    SScalarMemory.prototype.unpack_ = function (origin, value, revision) {\n        this.lock_();\n        try {\n            this.unpack__(this.cast_(value), revision);\n        }\n        catch (e) {\n            LoggerImpl.getInstance().error(e);\n            this._isChanged = true;\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SScalarMemory.prototype.pushEvent_ = function (name, args) {\n        var parent = this._parent;\n        if (parent != null) {\n            var eventInfo = parent.getEventInfo_();\n            if (eventInfo != null) {\n                var eventInfoDataMap = eventInfo.data;\n                if (eventInfoDataMap == null) {\n                    eventInfoDataMap = {};\n                    eventInfo.data = eventInfoDataMap;\n                }\n                if (this._name in eventInfoDataMap) {\n                    switch (name) {\n                        case EVENT_INIT:\n                            this.pushEventInit_(eventInfoDataMap, args);\n                            break;\n                        case EVENT_VALUE:\n                            this.pushEventValue_(eventInfoDataMap, args);\n                            break;\n                        case EVENT_CHANGE_VALUE:\n                            this.pushEventChangeValue_(eventInfoDataMap, args);\n                            break;\n                    }\n                }\n                else {\n                    var nameToArgs = {};\n                    nameToArgs[name] = args;\n                    eventInfoDataMap[this._name] = [this, nameToArgs, [], false];\n                }\n            }\n        }\n    };\n    SScalarMemory.prototype.pushEventInit_ = function (eventInfoDataMap, args) {\n        var eventData = eventInfoDataMap[this._name];\n        var eventArgumentMap = eventData[1];\n        eventArgumentMap[EVENT_INIT] = args;\n    };\n    SScalarMemory.prototype.pushEventValue_ = function (eventInfoDataMap, args) {\n        var eventData = eventInfoDataMap[this._name];\n        var eventArgumentMap = eventData[1];\n        var valueArgs = eventArgumentMap[EVENT_VALUE];\n        if (valueArgs != null) {\n            valueArgs[1] = args[1];\n        }\n        else {\n            var changeValueArgs = eventArgumentMap[EVENT_CHANGE_VALUE];\n            if (changeValueArgs != null) {\n                changeValueArgs[1] = args[1];\n            }\n            else {\n                eventArgumentMap[EVENT_VALUE] = args;\n            }\n        }\n    };\n    SScalarMemory.prototype.pushEventChangeValue_ = function (eventInfoDataMap, args) {\n        var eventData = eventInfoDataMap[this._name];\n        var eventArgumentMap = eventData[1];\n        var valueArgs = eventArgumentMap[EVENT_VALUE];\n        if (valueArgs != null) {\n            eventArgumentMap[EVENT_CHANGE_VALUE] = valueArgs;\n            valueArgs[1] = args[1];\n            delete eventArgumentMap[EVENT_VALUE];\n        }\n        else {\n            var changeValueArgs = eventArgumentMap[EVENT_CHANGE_VALUE];\n            if (changeValueArgs != null) {\n                changeValueArgs[1] = args[1];\n            }\n            else {\n                eventArgumentMap[EVENT_CHANGE_VALUE] = args;\n            }\n        }\n    };\n    SScalarMemory.prototype.triggerEvents_ = function (eventArgumentMap, eventArgumentList, isFirst) {\n        var wrapper = this.getWrapper_();\n        var initArgs = eventArgumentMap[EVENT_INIT];\n        if (initArgs != null) {\n            wrapper.triggerDirect(EVENT_INIT, null, initArgs, null);\n        }\n        var valueArgs = eventArgumentMap[EVENT_VALUE];\n        if (valueArgs != null) {\n            wrapper.triggerDirect(EVENT_VALUE, null, valueArgs, null);\n        }\n        var changeValueArgs = eventArgumentMap[EVENT_CHANGE_VALUE];\n        if (changeValueArgs != null) {\n            wrapper.triggerDirect(EVENT_CHANGE, null, changeValueArgs, null);\n            wrapper.triggerDirect(EVENT_VALUE, null, changeValueArgs, null);\n        }\n    };\n    SScalarMemory.prototype.size_ = function () {\n        var values = this._value;\n        if (isArray(values)) {\n            return values.length;\n        }\n        else if (isPlainObject(values)) {\n            return sizeObject(values);\n        }\n        else if (values != null) {\n            return 1;\n        }\n        return 0;\n    };\n    SScalarMemory.prototype.isEmpty_ = function () {\n        return this.size_() <= 0;\n    };\n    SScalarMemory.prototype.isNull_ = function () {\n        return this._value == null;\n    };\n    SScalarMemory.prototype.isNotNull_ = function () {\n        return this._value != null;\n    };\n    SScalarMemory.prototype.get_ = function () {\n        return this._value;\n    };\n    SScalarMemory.prototype.set_ = function (value, forcibly) {\n        checkSupported(this);\n        checkNonNullValue(this, value);\n        this.lock_();\n        try {\n            return this.checkAndSet_(value, forcibly);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SScalarMemory.prototype.checkAndSet_ = function (value, forcibly) {\n        var newValue = this.cast_(value);\n        checkNonNullValue(this, newValue);\n        return this.getAndSet_(newValue, forcibly, true);\n    };\n    SScalarMemory.prototype.reset_ = function () {\n        checkSupported(this);\n        this.lock_();\n        try {\n            return this.reset__();\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SScalarMemory.prototype.reset__ = function () {\n        var value = this._value;\n        if (!this.isInitialized_()) {\n            this.forceInitilized_();\n            this.pushEvent_(EVENT_INIT, [null, value]);\n        }\n        this._value = value;\n        this._isChanged = true;\n        this.pushEvent_(EVENT_CHANGE_VALUE, [null, value, value]);\n        return value;\n    };\n    SScalarMemory.prototype.compareAndSet_ = function (expected, update, forcibly) {\n        checkSupported(this);\n        checkNonNullValue(this, update);\n        this.lock_();\n        try {\n            if (isEqual(expected, this._value)) {\n                this.checkAndSet_(update, forcibly);\n                return true;\n            }\n        }\n        finally {\n            this.unlock_();\n        }\n        return false;\n    };\n    SScalarMemory.prototype.equals_ = function (value) {\n        return isEqual(this._value, value);\n    };\n    SScalarMemory.prototype.compareTo_ = function (other) {\n        var value = this._value;\n        if (value != null) {\n            if (other != null) {\n                return (value < other ? -1 : (value > other ? +1 : 0));\n            }\n            else {\n                return +1;\n            }\n        }\n        else {\n            if (other != null) {\n                return -1;\n            }\n            else {\n                return 0;\n            }\n        }\n    };\n    SScalarMemory.prototype.each_ = function (iteratee, thisArg, reverse) {\n        var values = this._value;\n        if (values == null) {\n            return;\n        }\n        var wrapper = this._wrapper;\n        if (isArray(values)) {\n            if (reverse) {\n                for (var i = values.length - 1; 0 <= i; --i) {\n                    if (iteratee.call(thisArg, values[i], i, wrapper) === false) {\n                        return;\n                    }\n                }\n            }\n            else {\n                for (var i = 0, imax = values.length; i < imax; ++i) {\n                    if (iteratee.call(thisArg, values[i], i, wrapper) === false) {\n                        return;\n                    }\n                }\n            }\n        }\n        else if (isPlainObject(values)) {\n            for (var key in values) {\n                if (hasOwn(values, key)) {\n                    if (iteratee.call(thisArg, values[key], key, wrapper) === false) {\n                        return;\n                    }\n                }\n            }\n        }\n        else if (values != null) {\n            if (iteratee.call(thisArg, values, null, wrapper) === false) {\n                return;\n            }\n        }\n    };\n    SScalarMemory.prototype.find_ = function (predicate, thisArg, reverse) {\n        var found = null;\n        this.each_(function (value, key, wrapper) {\n            if (predicate.call(thisArg, value, key, wrapper) === true) {\n                found = value;\n                return false;\n            }\n            return true;\n        }, null, reverse);\n        return found;\n    };\n    SScalarMemory.prototype.indexOf_ = function (value, comparator, thisArg) {\n        var values = this._value;\n        if (isArray(values)) {\n            for (var i = 0, imax = values.length; i < imax; ++i) {\n                if (comparator.call(thisArg, values[i], value)) {\n                    return i;\n                }\n            }\n        }\n        return -1;\n    };\n    SScalarMemory.prototype.lastIndexOf_ = function (value, comparator, thisArg) {\n        var values = this._value;\n        if (isArray(values)) {\n            for (var i = values.length - 1; 0 <= i; --i) {\n                if (comparator.call(thisArg, values[i], value)) {\n                    return i;\n                }\n            }\n        }\n        return -1;\n    };\n    SScalarMemory.prototype.contains_ = function (value, comparator, thisArg) {\n        var result = false;\n        this.each_(function (target) {\n            if (comparator.call(thisArg, value, target)) {\n                result = true;\n                return false;\n            }\n            return true;\n        }, thisArg, false);\n        return result;\n    };\n    SScalarMemory.prototype.containsAll_ = function (values, comparator, thisArg) {\n        if (values != null && isNotEmptyArray(values)) {\n            for (var i = 0, imax = values.length; i < imax; ++i) {\n                if (this.contains_(values[i], comparator, thisArg) !== true) {\n                    return false;\n                }\n            }\n        }\n        return true;\n    };\n    SScalarMemory.prototype.toDirty_ = function () {\n        checkSupported(this);\n        this.lock_();\n        try {\n            this._isChanged = true;\n            if (!this._isInitialized) {\n                this._isInitialized = true;\n                var value = this._value;\n                this.pushEvent_(EVENT_INIT, [null, value]);\n                this.pushEvent_(EVENT_VALUE, [null, value, value]);\n            }\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SScalarMemory.prototype.toJson_ = function () {\n        return this.get_();\n    };\n    SScalarMemory.prototype.fromJson_ = function (json) {\n        this.set_(this.cast_(json), false);\n    };\n    SScalarMemory.prototype.toString_ = function () {\n        return JSON.stringify(this.get_());\n    };\n    SScalarMemory.prototype.fromString_ = function (str) {\n        this.fromJson_(JSON.parse(str));\n    };\n    SScalarMemory.prototype.forcibly_ = function () {\n        this._forcibly = true;\n    };\n    SScalarMemory.prototype.forceValue_ = function (value) {\n        this._value = value;\n    };\n    SScalarMemory.prototype.forceToUpdate_ = function (value) {\n        this._value = value;\n        this._revision += 1;\n    };\n    SScalarMemory.prototype.forceRevision_ = function (revision) {\n        this._revision = revision;\n        this._authorizedRevision = revision;\n    };\n    SScalarMemory.prototype.forceInitilized_ = function () {\n        this._isInitialized = true;\n    };\n    return SScalarMemory;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SArrayNodeMemory = /** @class */ (function (_super) {\n    __extends(SArrayNodeMemory, _super);\n    function SArrayNodeMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, 0 /* ARRAY_NODE */) || this;\n    }\n    SArrayNodeMemory.prototype.cast_ = function (value) {\n        if (isArray(value)) {\n            return value;\n        }\n        return null;\n    };\n    return SArrayNodeMemory;\n}(SScalarMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar mapping = {};\nvar STypeToClass = /** @class */ (function () {\n    function STypeToClass() {\n    }\n    STypeToClass.put_ = function (factory) {\n        mapping[factory.getType_()] = factory;\n    };\n    STypeToClass.getFactory_ = function (type) {\n        return mapping[type];\n    };\n    STypeToClass.getType_ = function (constructor) {\n        for (var key in mapping) {\n            var factory = mapping[key];\n            if (factory.getConstructor_() === constructor) {\n                return factory.getType_();\n            }\n        }\n        return null;\n    };\n    return STypeToClass;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized array node.\n */\nvar SArrayNode = /** @class */ (function (_super) {\n    __extends(SArrayNode, _super);\n    function SArrayNode(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return SArrayNode;\n}(SScalar));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SArrayNodeMemory(parent, name, properties, lock, SArrayNode);\n    },\n    getConstructor_: function () {\n        return SArrayNode;\n    },\n    getType_: function () {\n        return 0 /* ARRAY_NODE */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar isBoolean = function (target) {\n    return target === true || target === false || checkTag(target, \"[object Boolean]\");\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SBooleanMemory = /** @class */ (function (_super) {\n    __extends(SBooleanMemory, _super);\n    function SBooleanMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, 1 /* BOOLEAN */) || this;\n    }\n    SBooleanMemory.prototype.cast_ = function (value) {\n        if (isBoolean(value)) {\n            return value;\n        }\n        return null;\n    };\n    return SBooleanMemory;\n}(SScalarMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized boolean.\n *\n * @param V a value type\n */\nvar SBoolean = /** @class */ (function (_super) {\n    __extends(SBoolean, _super);\n    function SBoolean(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return SBoolean;\n}(SScalar));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SBooleanMemory(parent, name, properties, lock, SBoolean);\n    },\n    getConstructor_: function () {\n        return SBoolean;\n    },\n    getType_: function () {\n        return 1 /* BOOLEAN */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SClassMemory = /** @class */ (function (_super) {\n    __extends(SClassMemory, _super);\n    function SClassMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, 11 /* CLASS */) || this;\n    }\n    SClassMemory.prototype.cast_ = function (value) {\n        return value;\n    };\n    return SClassMemory;\n}(SScalarMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized class.\n *\n * @param V a value type\n */\nvar SClass = /** @class */ (function (_super) {\n    __extends(SClass, _super);\n    function SClass(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return SClass;\n}(SScalar));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SClassMemory(parent, name, properties, lock, SClass);\n    },\n    getConstructor_: function () {\n        return SClass;\n    },\n    getType_: function () {\n        return 11 /* CLASS */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SNumberMemory = /** @class */ (function (_super) {\n    __extends(SNumberMemory, _super);\n    function SNumberMemory() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    SNumberMemory.prototype.addAndGet_ = function (delta) {\n        checkSupported(this);\n        this.lock_();\n        try {\n            var value = this.get_();\n            if (value != null) {\n                this.getAndSet_(value + delta, false, true);\n            }\n            return this.get_();\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SNumberMemory.prototype.getAndAdd_ = function (delta) {\n        checkSupported(this);\n        this.lock_();\n        try {\n            var value = this.get_();\n            if (value != null) {\n                return this.getAndSet_(value + delta, false, true);\n            }\n            return value;\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SNumberMemory.prototype.decrementAndGet_ = function () {\n        return this.addAndGet_(-1);\n    };\n    SNumberMemory.prototype.getAndDecrement_ = function () {\n        return this.getAndAdd_(-1);\n    };\n    SNumberMemory.prototype.getAndIncrement_ = function () {\n        return this.getAndAdd_(+1);\n    };\n    SNumberMemory.prototype.incrementAndGet_ = function () {\n        return this.addAndGet_(+1);\n    };\n    return SNumberMemory;\n}(SScalarMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SRealNumberMemory = /** @class */ (function (_super) {\n    __extends(SRealNumberMemory, _super);\n    function SRealNumberMemory() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    SRealNumberMemory.prototype.cast_ = function (value) {\n        if (isNumber(value)) {\n            return value;\n        }\n        return null;\n    };\n    return SRealNumberMemory;\n}(SNumberMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SDoubleMemory = /** @class */ (function (_super) {\n    __extends(SDoubleMemory, _super);\n    function SDoubleMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, 2 /* DOUBLE */) || this;\n    }\n    return SDoubleMemory;\n}(SRealNumberMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized double-precision floating-point number.\n */\nvar SDouble = /** @class */ (function (_super) {\n    __extends(SDouble, _super);\n    function SDouble(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return SDouble;\n}(SRealNumber));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SDoubleMemory(parent, name, properties, lock, SDouble);\n    },\n    getConstructor_: function () {\n        return SDouble;\n    },\n    getType_: function () {\n        return 2 /* DOUBLE */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SFloatMemory = /** @class */ (function (_super) {\n    __extends(SFloatMemory, _super);\n    function SFloatMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, 4 /* FLOAT */) || this;\n    }\n    return SFloatMemory;\n}(SRealNumberMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized floating-point number.\n */\nvar SFloat = /** @class */ (function (_super) {\n    __extends(SFloat, _super);\n    function SFloat(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return SFloat;\n}(SRealNumber));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SFloatMemory(parent, name, properties, lock, SFloat);\n    },\n    getConstructor_: function () {\n        return SFloat;\n    },\n    getType_: function () {\n        return 4 /* FLOAT */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SIntegralNumberMemory = /** @class */ (function (_super) {\n    __extends(SIntegralNumberMemory, _super);\n    function SIntegralNumberMemory() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    SIntegralNumberMemory.prototype.cast_ = function (value) {\n        if (isNumber(value)) {\n            return (value - (value % 1));\n        }\n        return null;\n    };\n    return SIntegralNumberMemory;\n}(SNumberMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SIntegerMemory = /** @class */ (function (_super) {\n    __extends(SIntegerMemory, _super);\n    function SIntegerMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, 5 /* INTEGER */) || this;\n    }\n    return SIntegerMemory;\n}(SIntegralNumberMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized integer.\n */\nvar SInteger = /** @class */ (function (_super) {\n    __extends(SInteger, _super);\n    function SInteger(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return SInteger;\n}(SIntegralNumber));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SIntegerMemory(parent, name, properties, lock, SInteger);\n    },\n    getConstructor_: function () {\n        return SInteger;\n    },\n    getType_: function () {\n        return 5 /* INTEGER */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SJsonNodeMemory = /** @class */ (function (_super) {\n    __extends(SJsonNodeMemory, _super);\n    function SJsonNodeMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, 3 /* JSON_NODE */) || this;\n    }\n    SJsonNodeMemory.prototype.cast_ = function (value) {\n        return value;\n    };\n    return SJsonNodeMemory;\n}(SScalarMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized JSON node.\n */\nvar SJsonNode = /** @class */ (function (_super) {\n    __extends(SJsonNode, _super);\n    function SJsonNode(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return SJsonNode;\n}(SScalar));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SJsonNodeMemory(parent, name, properties, lock, SJsonNode);\n    },\n    getConstructor_: function () {\n        return SJsonNode;\n    },\n    getType_: function () {\n        return 3 /* JSON_NODE */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SListBase = /** @class */ (function (_super) {\n    __extends(SListBase, _super);\n    function SListBase(memory) {\n        return _super.call(this, memory) || this;\n    }\n    /**\n     * Returns the size of this list.\n     *\n     * @returns the size of this list\n     */\n    SListBase.prototype.size = function () {\n        return this.__mem__.size_();\n    };\n    /**\n     * Returns true if this list is empty.\n     *\n     * @returns true if this list is empty\n     */\n    SListBase.prototype.isEmpty = function () {\n        return this.__mem__.isEmpty_();\n    };\n    /**\n     * Returns the index of the specified value.\n     *\n     * @param value value to search for\n     * @param comparator\n     * @param thisArg context for the comparator\n     * @returns the index of the specified value or -1 if this list does not contain the specified value\n     */\n    SListBase.prototype.indexOf = function (value, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.indexOf_(value, comparator, thisArg);\n    };\n    /**\n     * Returns the last index of the specified value.\n     *\n     * @param value value to search for\n     * @param comparator comparator\n     * @param thisArg context for the comparator\n     * @returns the last index of the specified value or -1 if this list does not contain the specified value\n     */\n    SListBase.prototype.lastIndexOf = function (value, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.lastIndexOf_(value, comparator, thisArg);\n    };\n    /**\n     * Returns true if this list contains the specified value.\n     *\n     * @param value value to search for\n     * @param comparator comparator\n     * @param thisArg context for the comparator\n     * @returns true if this list contains the specified value\n     */\n    SListBase.prototype.contains = function (value, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.contains_(value, comparator, thisArg);\n    };\n    /**\n     * Returns true if this list contains all the specified values.\n     *\n     * @param values values to search for\n     * @param comparator comparator\n     * @param thisArg context for the comparator\n     * @returns true if this list contains all the specified values\n     */\n    SListBase.prototype.containsAll = function (values, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.containsAll_(values, comparator, thisArg);\n    };\n    /**\n     * Iterates over elements of this list, calling the iteratee for each element.\n     * The iteratee is bound to the thisArg and invoked with three arguments: value, index and this list.\n     * The iteratee may exit iteration early by explicitly returning false.\n     *\n     * @param iteratee the function called per iteration\n     * @param thisArg the this binding of the iteratee\n     * @param reverse true to iterate in the reverse order\n     * @returns this\n     */\n    SListBase.prototype.each = function (iteratee, thisArg, reverse) {\n        if (thisArg === void 0) { thisArg = this; }\n        if (reverse === void 0) { reverse = false; }\n        this.__mem__.each_(iteratee, thisArg, reverse);\n        return this;\n    };\n    /**\n     * Iterates elements of this list, calling the iteratee for each element,\n     * removing all elements the iteratee does not return true.\n     * The iteratee is bound to the thisArg and invoked with three arguments: value, key and this list.\n     *\n     * @param iteratee the function called per iteration\n     * @param thisArg the this binding of the iteratee\n     * @throws Error if this is read-only\n     * @returns this\n     */\n    SListBase.prototype.filter = function (iteratee, thisArg) {\n        if (thisArg === void 0) { thisArg = this; }\n        this.__mem__.filter_(iteratee, thisArg);\n        return this;\n    };\n    /**\n     * Returns the first element which the specified predicate returns true,\n     * or null if there is no such element.\n     * The predicate is bound to the thisArg and invoked with three arguments: value, index and this list.\n     *\n     * @param predicate the function called per iteration\n     * @param thisArg the this binding of the predicate\n     * @param reverse true to iterate in the reverse order\n     * @returns the first element which the predicate returns true, or null if there is no such element\n     */\n    SListBase.prototype.find = function (predicate, thisArg, reverse) {\n        if (thisArg === void 0) { thisArg = this; }\n        if (reverse === void 0) { reverse = false; }\n        return this.__mem__.find_(predicate, thisArg, reverse);\n    };\n    /**\n     * Returns the value at the specified index.\n     *\n     * @param index the index of the value\n     * @returns the value at the specified index\n     */\n    SListBase.prototype.get = function (index) {\n        return this.__mem__.get_(index);\n    };\n    /**\n     * Replaces the value at the specified index by the specified value.\n     *\n     * @param index an index\n     * @param value a value\n     * @returns the old value\n     * @throws Error if this is read-only\n     * @throws Error if the specified value is null and this does not support a null value\n     * @throws Error if the index is null\n     * @throws Error if the index is out of bounds (index < 0 || size() <= index)\n     */\n    SListBase.prototype.set = function (index, value) {\n        return this.__mem__.set_(index, value);\n    };\n    /**\n     * Resets the value at the specified index.\n     *\n     * @param index the index of the value\n     * @returns the value at the specified index\n     * @throws Error if this is read-only\n     * @throws Error if the index is null\n     * @throws Error if the index is out of bounds (index < 0 || size() <= index)\n     */\n    SListBase.prototype.reset = function (index) {\n        return this.__mem__.reset_(index);\n    };\n    SListBase.prototype.add = function (indexOrValue, value) {\n        var m = this.__mem__;\n        if (arguments.length <= 1) {\n            return m.add_(m.size_(), indexOrValue);\n        }\n        else {\n            return m.add_(indexOrValue, value);\n        }\n    };\n    SListBase.prototype.addAll = function (indexOrValues, values) {\n        var m = this.__mem__;\n        if (arguments.length <= 1) {\n            return m.addAll_(m.size_(), indexOrValues);\n        }\n        else {\n            return m.addAll_(indexOrValues, values);\n        }\n    };\n    /**\n     * Clear this list and then appends the specified value at the end of this list.\n     *\n     * @param value the value to be inserted\n     * @throws Error if this is read-only\n     * @throws Error if the specified value is null and this does not support a null value\n     * @returns true\n     */\n    SListBase.prototype.clearAndAdd = function (value) {\n        return this.__mem__.clearAndAdd_(value);\n    };\n    /**\n     * Clear this list and then appends all of the elements in the specified array to the end of this list.\n     *\n     * @param values the array of elements to be appended\n     * @throws Error if this is read-only\n     * @throws Error if the specified array is null\n     * @throws Error if the specified array contains null and this does not support a null value\n     * @returns true if this list is changed as a result of the call\n     */\n    SListBase.prototype.clearAndAddAll = function (values) {\n        return this.__mem__.clearAndAddAll_(values);\n    };\n    /**\n     * Removes the value at the specified index.\n     *\n     * @param index index of the element to be removed\n     * @returns the removed element at the specified index\n     * @throws Error if this is read-only\n     * @throws Error if the index is out of bounds (index < 0 || size() <= index)\n     */\n    SListBase.prototype.remove = function (index) {\n        return this.__mem__.remove_(index);\n    };\n    /**\n     * Removes all of the elements in this list.\n     *\n     * @throws Error if this is read-only\n     * @returns this\n     */\n    SListBase.prototype.clear = function () {\n        this.__mem__.clear_();\n        return this;\n    };\n    /**\n     * Returns the array of the object representations of elements.\n     * Each object has an index and a value.\n     *\n     * @returns the array of the object representations of elements\n     */\n    SListBase.prototype.toArrayObject = function () {\n        return this.__mem__.toArrayObject_();\n    };\n    /**\n     * Returns the array representation of this list.\n     * Must not change the returned array.\n     *\n     * @returns the array representation of this list\n     */\n    SListBase.prototype.toArray = function () {\n        return this.__mem__.toArray_();\n    };\n    SListBase.prototype.toJson = function () {\n        return this.__mem__.toJson_();\n    };\n    /**\n     * Sets to the specified JSON array.\n     *\n     * @param json JSON array to be set\n     * @returns this\n     */\n    SListBase.prototype.fromJson = function (json) {\n        this.__mem__.fromJson_(json);\n        return this;\n    };\n    /**\n     * Sets to the specified string.\n     *\n     * @param str string to be set\n     * @returns this\n     */\n    SListBase.prototype.fromString = function (str) {\n        this.__mem__.fromString_(str);\n        return this;\n    };\n    return SListBase;\n}(SContainer));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar eachObject = function (target, iteratee, thisArg) {\n    for (var key in target) {\n        if (hasOwn(target, key)) {\n            if (iteratee.call(thisArg, target[key], key, target) === false) {\n                break;\n            }\n        }\n    }\n    return target;\n};\nvar eachArray = function (target, iteratee, thisArg) {\n    for (var i = 0, imax = target.length; i < imax; ++i) {\n        if (iteratee.call(thisArg, target[i], i, target) === false) {\n            break;\n        }\n    }\n    return target;\n};\nfunction each(target, iteratee, thisArg) {\n    if (isArrayLike(target)) {\n        return eachArray(target, iteratee, thisArg);\n    }\n    else if (target != null) {\n        return eachObject(target, iteratee, thisArg);\n    }\n    return target;\n}\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar checkNonNullValues = function (target, values) {\n    if (values == null) {\n        throw NullPointerException.create();\n    }\n    if (target.isNonNull_()) {\n        each(values, checkNonNull);\n    }\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Thrown to indicate that a method has been invoked with an index which is out of bounds.\n *\n *     throw IndexOutOfBoundsException.create();\n *\n * Must use `isInstance` static method instead of the `instanceof` to check\n * whether an error is an instance of this class.\n * This limitation comes from the fact that the custom exceptions inheriting\n * from the Error class are not printed well in the console.\n *\n *     const e = IndexOutOfBoundsException.create();\n *\n *     console.log( e instanceof IndexOutOfBoundsException ); // => false\n *     console.log( IndexOutOfBoundsException.isInstance( e ) ); // => true\n */\nvar IndexOutOfBoundsException = /** @class */ (function (_super) {\n    __extends(IndexOutOfBoundsException, _super);\n    function IndexOutOfBoundsException() {\n        return _super.call(this) || this;\n    }\n    IndexOutOfBoundsException.getId = function () {\n        return \"IndexOutOfBoundsException\";\n    };\n    IndexOutOfBoundsException.getMessage = function () {\n        return \"index out of bounds\";\n    };\n    return IndexOutOfBoundsException;\n}(Exception));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar checkRange = function (index, from, to) {\n    if (index < from || to <= index) {\n        throw IndexOutOfBoundsException.create();\n    }\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar newMemory = function (memoryCtor, ctor, parent, name, properties, lock) {\n    var result = new memoryCtor(parent, name, properties, lock, ctor);\n    parent.putData_(name, result);\n    return result;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SLongMemory = /** @class */ (function (_super) {\n    __extends(SLongMemory, _super);\n    function SLongMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, 6 /* LONG */) || this;\n    }\n    return SLongMemory;\n}(SIntegralNumberMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized long integer.\n */\nvar SLong = /** @class */ (function (_super) {\n    __extends(SLong, _super);\n    function SLong(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return SLong;\n}(SIntegralNumber));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SLongMemory(parent, name, properties, lock, SLong);\n    },\n    getConstructor_: function () {\n        return SLong;\n    },\n    getType_: function () {\n        return 6 /* LONG */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SCONTAINER_ID_PREFIX = \"$$\";\nvar SCONTAINER_ID_CHAR = \"$\";\nvar toSContainerId = function (name, type) {\n    return \"\" + SCONTAINER_ID_PREFIX + name + \"@\" + type;\n};\nvar isSContainerId = function (name) {\n    return name[0] === SCONTAINER_ID_CHAR && name[1] === SCONTAINER_ID_CHAR;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar emptySet = function () {\n    // DO NOTHING\n    return this;\n};\nvar SContainerMemory = /** @class */ (function () {\n    function SContainerMemory(parent, name, properties, lock, wrapperConstructor, patches) {\n        var _this = this;\n        this._isInitialized = false;\n        this._revision = 0;\n        this._authorizedRevision = -1;\n        this._wrapper = this.initWrapper_(new wrapperConstructor(this));\n        this._parent = parent;\n        this._name = name;\n        this._lock = lock;\n        this._properties = properties;\n        this._values = this.makeInitValues_();\n        this._patches = patches;\n        var $arn = this._$arn = toSContainerId(name, \"ar\");\n        var $afn = this._$afn = toSContainerId(name, \"af\");\n        var $an = this._$an = toSContainerId(name, \"a\");\n        var $brn = this._$brn = toSContainerId(name, \"br\");\n        var $bfn = this._$bfn = toSContainerId(name, \"bf\");\n        var $bn = this._$bn = toSContainerId(name, \"b\");\n        var cp = properties.clone_().retain_(256 /* LOCAL */);\n        var cprn = cp.clone_().add_(4 /* READ_ONLY */ | 16 /* NON_NULL */);\n        var cpr = cp.clone_().add_(4 /* READ_ONLY */);\n        var cpn = cp.clone_().add_(16 /* NON_NULL */);\n        var $ar = this._$ar = newMemory(SLongMemory, SLong, parent, $arn, cprn, lock);\n        var $af = this._$af = newMemory(SIntegerMemory, SInteger, parent, $afn, cprn, lock);\n        var $a = this._$a = newMemory(SClassMemory, SClass, parent, $an, cpr, lock);\n        var $br = this._$br = newMemory(SLongMemory, SLong, parent, $brn, cpn, lock);\n        var $bf = this._$bf = newMemory(SIntegerMemory, SInteger, parent, $bfn, cpn, lock);\n        var $b = this._$b = newMemory(SClassMemory, SClass, parent, $bn, cp, lock);\n        $ar.stopEvent_();\n        $ar.forcibly_();\n        $af.stopEvent_();\n        $a.stopEvent_();\n        $br.stopEvent_();\n        $bf.stopEvent_();\n        $b.stopEvent_();\n        if (properties.isLocal_()) {\n            $b.set_ = emptySet;\n        }\n        $b.pack_ = function (dynamicInfoDataMap, senderId) {\n            $b.setSentSenderId_(senderId);\n            if ($b.get_() != null && !properties.isReadOnly_()) {\n                // $af\n                var forceReset = ($af.get_() !== 0);\n                if (forceReset) {\n                    $af.forceToUpdate_(0);\n                    dynamicInfoDataMap = $af.pack_(dynamicInfoDataMap, senderId);\n                }\n                // $b\n                var packed = [\n                    $b.getRevision_(),\n                    $b.getType_(),\n                    _this._patches.pack_(_this._authorizedRevision, forceReset, _this._revision, _this._values, properties.isSoft_())\n                ];\n                return ArrayMaps.put_(dynamicInfoDataMap, $b.getName_(), packed);\n            }\n            return dynamicInfoDataMap;\n        };\n        parent.putDynamicInfoHandlerDataName_($an, name);\n        parent.putDynamicInfoHandlerDataName_($arn, name);\n        parent.putDynamicInfoHandlerDataName_($afn, name);\n        parent.putDynamicInfoHandler_(name, function (data) {\n            return _this.dynamicInfoHandler_(data);\n        });\n    }\n    SContainerMemory.prototype.toUpdated_ = function () {\n        this._$b.set_(this._$b, true);\n    };\n    SContainerMemory.prototype.initWrapper_ = function (wrapper) {\n        var _this = this;\n        wrapper.onon(EVENT_INIT, function (connection) {\n            if (_this._isInitialized) {\n                connection.triggerDirect(wrapper, null, _this.newInitArgs_());\n            }\n        });\n        wrapper.onon(EVENT_VALUE, function (connection) {\n            if (_this._isInitialized) {\n                connection.triggerDirect(wrapper, null, _this.newValueArgs_(_this.newInitArgs_()));\n            }\n        });\n        return wrapper;\n    };\n    SContainerMemory.prototype.getWrapper_ = function () {\n        return this._wrapper;\n    };\n    SContainerMemory.prototype.getRevision_ = function () {\n        return this._revision;\n    };\n    SContainerMemory.prototype.getAndIncrementRevision_ = function () {\n        return this._revision++;\n    };\n    SContainerMemory.prototype.isReadOnly_ = function () {\n        return this._properties.isReadOnly_();\n    };\n    SContainerMemory.prototype.isNonNull_ = function () {\n        return this._properties.isNonNull_();\n    };\n    SContainerMemory.prototype.lock_ = function () {\n        this._lock.lock();\n    };\n    SContainerMemory.prototype.isLocked_ = function () {\n        return this._lock.isLocked();\n    };\n    SContainerMemory.prototype.unlock_ = function () {\n        // Unlock\n        var count = this._lock.getHoldCount();\n        if (count <= 1) {\n            var parent_1 = this._parent;\n            if (parent_1 != null) {\n                parent_1.onUnlock_();\n            }\n            else {\n                this._lock.unlock();\n            }\n        }\n        else {\n            // Otherwise\n            this._lock.unlock();\n        }\n    };\n    SContainerMemory.prototype.pushEvent_ = function (name, args) {\n        var parent = this._parent;\n        if (parent != null) {\n            var eventInfo = parent.getEventInfo_();\n            if (eventInfo != null) {\n                if (eventInfo.data == null) {\n                    eventInfo.data = {};\n                }\n                this.pushEvent__(eventInfo.data, name, args);\n            }\n        }\n    };\n    SContainerMemory.prototype.pushEvent__ = function (eventInfoDataMap, name, args) {\n        if (this._name in eventInfoDataMap) {\n            switch (name) {\n                case EVENT_INIT:\n                    this.pushEventInitEvent_(eventInfoDataMap, args);\n                    break;\n                case EVENT_VALUE:\n                    this.pushEventValueEvent_(eventInfoDataMap, args);\n                    break;\n                case EVENT_CHANGE_VALUE:\n                    this.pushEventChangeValueEvent_(eventInfoDataMap, args);\n                    break;\n            }\n        }\n        else {\n            var nameToArgs = {};\n            nameToArgs[name] = args;\n            eventInfoDataMap[this._name] = [this, nameToArgs, [], true];\n        }\n    };\n    SContainerMemory.prototype.pushEventInitEvent_ = function (eventInfoDataMap, args) {\n        var eventData = eventInfoDataMap[this._name];\n        var eventMap = eventData[1];\n        eventMap[EVENT_INIT] = args;\n    };\n    SContainerMemory.prototype.pushEventValueEvent_ = function (eventInfoDataMap, args) {\n        var eventData = eventInfoDataMap[this._name];\n        var eventMap = eventData[1];\n        var isFirst = eventData[3];\n        var valueArgs = eventMap[EVENT_VALUE];\n        if (valueArgs != null) {\n            this.mergeEvents_(args, valueArgs, isFirst);\n            eventData[3] = false;\n        }\n        else {\n            var changeValueArgs = eventMap[EVENT_CHANGE_VALUE];\n            if (changeValueArgs != null) {\n                this.mergeEvents_(args, changeValueArgs, isFirst);\n                eventData[3] = false;\n            }\n            else {\n                eventMap[EVENT_VALUE] = args;\n            }\n        }\n    };\n    SContainerMemory.prototype.pushEventChangeValueEvent_ = function (eventInfoDataMap, args) {\n        var eventData = eventInfoDataMap[this._name];\n        var eventMap = eventData[1];\n        var isFirst = eventData[3];\n        var valueArgs = eventMap[EVENT_VALUE];\n        if (valueArgs != null) {\n            eventMap[EVENT_CHANGE_VALUE] = valueArgs;\n            delete eventMap[EVENT_VALUE];\n            this.mergeEvents_(args, valueArgs, isFirst);\n            eventData[3] = false;\n        }\n        else {\n            var changeValueArgs = eventMap[EVENT_CHANGE_VALUE];\n            if (changeValueArgs != null) {\n                this.mergeEvents_(args, changeValueArgs, isFirst);\n                eventData[3] = false;\n            }\n            else {\n                eventMap[EVENT_CHANGE_VALUE] = args;\n            }\n        }\n    };\n    SContainerMemory.prototype.pushChangeEvent_ = function (initArg, changeArgs) {\n        if (this._isInitialized !== true) {\n            this._isInitialized = true;\n            var initArgs = (initArg != null ? [null, initArg] : this.newInitArgs_());\n            this.pushEvent_(EVENT_INIT, initArgs);\n        }\n        this.pushEvent_(EVENT_CHANGE_VALUE, changeArgs);\n    };\n    SContainerMemory.prototype.triggerEvents_ = function (eventMap, eventList, isFirst) {\n        var initArgs = eventMap[EVENT_INIT];\n        if (initArgs != null) {\n            this._wrapper.triggerDirect(EVENT_INIT, null, initArgs, null);\n        }\n        var valueArgs = eventMap[EVENT_VALUE];\n        if (valueArgs != null) {\n            if (!isFirst) {\n                this.onMergedEvent_(valueArgs);\n            }\n            this._wrapper.triggerDirect(EVENT_VALUE, null, valueArgs, null);\n        }\n        var changeValueArgs = eventMap[EVENT_CHANGE_VALUE];\n        if (changeValueArgs != null) {\n            if (!isFirst) {\n                this.onMergedEvent_(changeValueArgs);\n            }\n            this._wrapper.triggerDirect(EVENT_CHANGE, null, changeValueArgs, null);\n            this._wrapper.triggerDirect(EVENT_VALUE, null, changeValueArgs, null);\n        }\n    };\n    SContainerMemory.prototype.mergeEvents_ = function (argsA, argsB, isFirst) {\n        // DO NOTHING\n    };\n    SContainerMemory.prototype.onMergedEvent_ = function (args) {\n        // DO NOTHING\n    };\n    SContainerMemory.prototype.resetAuthorizedRevision_ = function () {\n        if (this._properties.isReadOnly_()) {\n            this._revision = 0;\n            this._patches.clear_();\n        }\n    };\n    SContainerMemory.prototype.dynamicInfoHandler_ = function (dataNames) {\n        var has$an = (this._$an in dataNames);\n        var isNotRejected = true;\n        if (has$an) {\n            isNotRejected = this.dynamicInfoHandlerAi_();\n        }\n        if (isNotRejected) {\n            if (this._$arn in dataNames) {\n                this.dynamicInfoHandlerAr_();\n            }\n            if (this._$afn in dataNames) {\n                this.dynamicInfoHandlerAf_();\n            }\n            if (has$an) {\n                this.dynamicInfoHandlerA_();\n            }\n            return null;\n        }\n        else {\n            return this._$bfn;\n        }\n    };\n    SContainerMemory.prototype.dynamicInfoHandlerAi_ = function () {\n        var apatches = this._$a.get_();\n        if (apatches != null) {\n            var startRevision = apatches[0];\n            var endRevision = startRevision + apatches[1];\n            if (this.isPatchApplicable_(apatches, this._revision, this._patches.isEmpty_())) {\n                this._$bf.compareAndSet_(1, 0, false);\n            }\n            else {\n                if (this._revision <= endRevision) {\n                    this._$bf.compareAndSet_(0, 1, false);\n                    return false;\n                }\n            }\n        }\n        return true;\n    };\n    SContainerMemory.prototype.dynamicInfoHandlerAr_ = function () {\n        var arevision = this._$ar.get_();\n        if (arevision != null && arevision <= this._revision) {\n            this._patches.compact_(arevision);\n            this._authorizedRevision = Math.max(this._authorizedRevision, arevision);\n            if (arevision < this._revision) {\n                this._$b.set_(this._$b, true);\n            }\n        }\n    };\n    SContainerMemory.prototype.dynamicInfoHandlerAf_ = function () {\n        var aflag = this._$af.get_();\n        if (aflag !== 0) {\n            this._$b.set_(this._$b, true);\n        }\n    };\n    SContainerMemory.prototype.dynamicInfoHandlerA_ = function () {\n        var apatches = this._$a.get_();\n        this._$a.forceValue_(null);\n        if (apatches == null) {\n            return;\n        }\n        var startRevision = apatches[0];\n        var endRevision = startRevision + apatches[1];\n        if (this._revision <= endRevision) {\n            if (this.isPatchEmpty_(apatches)) {\n                this._patches.clear_();\n                this._revision = endRevision;\n                this._authorizedRevision = Math.max(this._authorizedRevision, endRevision);\n                if (this._$br.get_() !== endRevision) {\n                    this._$br.set_(endRevision, true);\n                }\n                if (this._isInitialized !== true) {\n                    this._isInitialized = true;\n                    var initArgs = this.newInitArgs_();\n                    this.pushEvent_(EVENT_INIT, initArgs);\n                    this.pushEvent_(EVENT_VALUE, this.newValueArgs_(initArgs));\n                }\n            }\n            else {\n                var patchResult = this.patch_(apatches);\n                this._patches.clear_();\n                this._revision = endRevision;\n                this._authorizedRevision = Math.max(this._authorizedRevision, endRevision);\n                if (this._$br.get_() !== endRevision) {\n                    this._$br.set_(endRevision, true);\n                }\n                var initArgs = null;\n                if (this._isInitialized !== true) {\n                    this._isInitialized = true;\n                    initArgs = this.newInitArgs_();\n                    this.pushEvent_(EVENT_INIT, initArgs);\n                }\n                if (patchResult != null) {\n                    this.pushEvent_(EVENT_CHANGE_VALUE, patchResult);\n                }\n                else {\n                    if (initArgs != null) {\n                        this.pushEvent_(EVENT_VALUE, this.newValueArgs_(initArgs));\n                    }\n                }\n            }\n        }\n        apatches.length = 0;\n    };\n    SContainerMemory.prototype.isPatchApplicable_ = function (patches, revision, hasNoPatches) {\n        var startRevision = patches[0];\n        var isReset = (patches[2] === 0);\n        return ((hasNoPatches && startRevision === revision) || isReset);\n    };\n    SContainerMemory.prototype.isPatchEmpty_ = function (patches) {\n        var type = patches[2];\n        if (type === 0) {\n            return false;\n        }\n        else {\n            return patches.length <= 3;\n        }\n    };\n    SContainerMemory.prototype.initialize_ = function () {\n        this.lock_();\n        try {\n            if (this._isInitialized !== true) {\n                this._isInitialized = true;\n                this._$b.toDirty_();\n                var initArgs = this.newInitArgs_();\n                this.pushEvent_(EVENT_INIT, initArgs);\n                this.pushEvent_(EVENT_VALUE, this.newValueArgs_(initArgs));\n            }\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SContainerMemory.prototype.isInitialized_ = function () {\n        return this._isInitialized;\n    };\n    SContainerMemory.prototype.uninitialize_ = function () {\n        this._isInitialized = false;\n        if (this._parent != null) {\n            this._parent.uninitialize_();\n        }\n    };\n    SContainerMemory.prototype.toString_ = function () {\n        return JSON.stringify(this._values);\n    };\n    SContainerMemory.prototype.fromString_ = function (str) {\n        this.fromJson_(JSON.parse(str));\n    };\n    return SContainerMemory;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar patchReset = function (index, values, list, added, removed, updated) {\n    var llen = list.length;\n    if (index < llen) {\n        var value = values[index];\n        var lvalue = list[index];\n        if (isEqual(value, lvalue)) {\n            return index + 1;\n        }\n        var mode = 0;\n        var ilast = index + 1;\n        var vlen = values.length;\n        for (var i = index + 1, imax = Math.min(index + 10, Math.max(llen, vlen)); i < imax; ++i) {\n            if (i < vlen && isEqual(lvalue, values[i])) {\n                mode = 1;\n                ilast = i;\n                break;\n            }\n            if (i < llen && isEqual(value, list[i])) {\n                mode = 2;\n                ilast = i;\n                break;\n            }\n        }\n        if (mode !== 0) {\n            for (var i = index + 1, imax = Math.min(ilast, Math.min(llen, vlen)); i < imax; ++i) {\n                if (isEqual(list[i], values[i])) {\n                    mode = 3;\n                    ilast = i;\n                    break;\n                }\n            }\n        }\n        switch (mode) {\n            case 1:\n                for (var i = index; i < ilast; ++i) {\n                    var newValue = values[i];\n                    list.splice(i, 0, newValue);\n                    added.push({ index: i, value: newValue });\n                }\n                return ilast + 1;\n            case 2:\n                for (var i = index; i < ilast; ++i) {\n                    var oldValue = list.splice(index, 1)[0];\n                    removed.push({ index: index + removed.length - added.length, value: oldValue });\n                }\n                return index + 1;\n            default:\n                for (var i = index; i < ilast; ++i) {\n                    var newValue = values[i];\n                    var oldValue = list.splice(i, 1, newValue)[0];\n                    updated.push({ index: i, newValue: newValue, oldValue: oldValue });\n                }\n                return (mode === 3 ? ilast + 1 : ilast);\n        }\n    }\n    else {\n        var value = values[index];\n        added.push({ index: index, value: value });\n        list.push(value);\n        return index + 1;\n    }\n};\nvar SListBaseMemory = /** @class */ (function (_super) {\n    __extends(SListBaseMemory, _super);\n    function SListBaseMemory(parent, name, properties, lock, wrapperConstructor, patches) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, patches) || this;\n    }\n    SListBaseMemory.prototype.makeInitValues_ = function () {\n        return [];\n    };\n    SListBaseMemory.prototype.onAdd_ = function (index, value) {\n        this._patches.add(this.getRevision_(), index, value);\n        this.toUpdated_();\n        return true;\n    };\n    SListBaseMemory.prototype.onAddAll_ = function (index, values) {\n        this._patches.addAll(this.getRevision_(), index, values);\n        this.toUpdated_();\n        return isNotEmptyArray(values);\n    };\n    SListBaseMemory.prototype.onRemove_ = function (index) {\n        this._patches.remove(this.getRevision_(), index);\n        this.toUpdated_();\n    };\n    SListBaseMemory.prototype.onClear_ = function () {\n        this._patches.clear_(this.getRevision_());\n        this.toUpdated_();\n    };\n    SListBaseMemory.prototype.onSet_ = function (index, newValue) {\n        this._patches.set(this.getRevision_(), index, newValue);\n        this.toUpdated_();\n    };\n    SListBaseMemory.prototype.toEventData_ = function (added, removed, updated) {\n        return [\n            null,\n            added || [],\n            removed || [],\n            updated || []\n        ];\n    };\n    SListBaseMemory.prototype.newInitArgs_ = function () {\n        return [null, this.toArrayObject_()];\n    };\n    SListBaseMemory.prototype.newValueArgs_ = function (initArgs) {\n        return this.toEventData_(initArgs[1]);\n    };\n    SListBaseMemory.prototype.patchReset_ = function (values, list, added, removed, updated) {\n        removed.length = 0;\n        added.length = 0;\n        updated.length = 0;\n        for (var i = 0, imax = values.length; i < imax;) {\n            i = patchReset(i, values, list, added, removed, updated);\n        }\n        for (var imin = values.length, i = imin, imax = list.length; i < imax; ++i) {\n            removed.push({ index: imin + removed.length - added.length, value: list.splice(imin, 1)[0] });\n        }\n    };\n    SListBaseMemory.prototype.size_ = function () {\n        return this._values.length;\n    };\n    SListBaseMemory.prototype.isEmpty_ = function () {\n        return isEmptyArray(this._values);\n    };\n    SListBaseMemory.prototype.indexOf_ = function (value, comparator, thisArg) {\n        var values = this._values;\n        for (var i = 0, imax = values.length; i < imax; ++i) {\n            if (comparator.call(thisArg, values[i], value)) {\n                return i;\n            }\n        }\n        return -1;\n    };\n    SListBaseMemory.prototype.lastIndexOf_ = function (value, comparator, thisArg) {\n        var values = this._values;\n        for (var i = values.length - 1; 0 <= i; --i) {\n            if (comparator.call(thisArg, values[i], value)) {\n                return i;\n            }\n        }\n        return -1;\n    };\n    SListBaseMemory.prototype.contains_ = function (value, comparator, thisArg) {\n        return 0 <= this.indexOf_(value, comparator, thisArg);\n    };\n    SListBaseMemory.prototype.containsAll_ = function (values, comparator, thisArg) {\n        if (values != null && isNotEmptyArray(values)) {\n            for (var i = 0, imax = values.length; i < imax; ++i) {\n                if (this.indexOf_(values[i], comparator, thisArg) < 0) {\n                    return false;\n                }\n            }\n        }\n        return true;\n    };\n    SListBaseMemory.prototype.each_ = function (iteratee, thisArg, reverse) {\n        var values = this._values;\n        var wrapper = this.getWrapper_();\n        if (reverse) {\n            for (var i = values.length - 1; 0 <= i; --i) {\n                if (iteratee.call(thisArg, values[i], i, wrapper) === false) {\n                    return this;\n                }\n            }\n        }\n        else {\n            for (var i = 0, imax = values.length; i < imax; ++i) {\n                if (iteratee.call(thisArg, values[i], i, wrapper) === false) {\n                    return this;\n                }\n            }\n        }\n        return this;\n    };\n    SListBaseMemory.prototype.add_ = function (index, value) {\n        checkSupported(this);\n        checkNonNullValue(this, value);\n        checkNonNull(index);\n        checkRange(index, 0, this.size_() + 1);\n        this.lock_();\n        try {\n            return this.add__(index, value);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SListBaseMemory.prototype.add__ = function (index, value) {\n        var added = [{ index: index, value: value }];\n        this._values.splice(index, 0, value);\n        this.onAdd_(index, value);\n        this.getAndIncrementRevision_();\n        this.pushChangeEvent_(added, this.toEventData_(added));\n        return true;\n    };\n    SListBaseMemory.prototype.filter_ = function (iteratee, thisArg) {\n        checkSupported(this);\n        this.lock_();\n        try {\n            this.filter__(iteratee, thisArg);\n        }\n        finally {\n            this.unlock_();\n        }\n        return this;\n    };\n    SListBaseMemory.prototype.filter__ = function (iteratee, thisArg) {\n        var values = this._values;\n        var wrapper = this.getWrapper_();\n        var removed = [];\n        for (var i = 0, imax = values.length; i < imax; ++i) {\n            var value = values[i];\n            if (iteratee.call(thisArg, value, i, wrapper) === true) {\n                continue;\n            }\n            removed.push({ index: i, value: value });\n        }\n        if (isNotEmptyArray(removed)) {\n            for (var i = removed.length - 1; 0 <= i; --i) {\n                var index = removed[i].index;\n                values.splice(index, 1);\n                this.onRemove_(index);\n            }\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_([], this.toEventData_(null, removed));\n        }\n    };\n    SListBaseMemory.prototype.find_ = function (predicate, thisArg, reverse) {\n        var values = this._values;\n        var wrapper = this.getWrapper_();\n        if (reverse) {\n            for (var i = values.length - 1; 0 <= i; --i) {\n                if (predicate.call(thisArg, values[i], i, wrapper) === true) {\n                    return values[i];\n                }\n            }\n        }\n        else {\n            for (var i = 0, imax = values.length; i < imax; ++i) {\n                if (predicate.call(thisArg, values[i], i, wrapper) === true) {\n                    return values[i];\n                }\n            }\n        }\n        return null;\n    };\n    SListBaseMemory.prototype.get_ = function (index) {\n        return this._values[index];\n    };\n    SListBaseMemory.prototype.set_ = function (index, value) {\n        checkSupported(this);\n        checkNonNullValue(this, value);\n        checkNonNull(index);\n        checkRange(index, 0, this.size_());\n        this.lock_();\n        try {\n            return this.set__(index, value);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SListBaseMemory.prototype.set__ = function (index, value) {\n        var oldValue = this._values[index];\n        this._values[index] = value;\n        this.onSet_(index, value);\n        this.getAndIncrementRevision_();\n        this.pushChangeEvent_(null, this.toEventData_(null, null, [{ index: index, newValue: value, oldValue: oldValue }]));\n        return oldValue;\n    };\n    SListBaseMemory.prototype.reset_ = function (index) {\n        checkSupported(this);\n        checkNonNull(index);\n        checkRange(index, 0, this.size_());\n        this.lock_();\n        try {\n            return this.reset__(index);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SListBaseMemory.prototype.reset__ = function (index) {\n        var value = this._values[index];\n        this.onSet_(index, value);\n        this.getAndIncrementRevision_();\n        this.pushChangeEvent_(null, this.toEventData_(null, null, [{ index: index, newValue: value, oldValue: value }]));\n        return value;\n    };\n    SListBaseMemory.prototype.addAll_ = function (index, values) {\n        checkSupported(this);\n        checkNonNullValues(this, values);\n        checkNonNull(index);\n        checkRange(index, 0, this.size_() + 1);\n        this.lock_();\n        try {\n            return this.addAll__(index, values);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SListBaseMemory.prototype.addAll__ = function (index, values) {\n        var added = [];\n        for (var i = 0, imax = values.length; i < imax; ++i) {\n            var newValue = values[i];\n            added.push({ index: index + i, value: newValue });\n            this._values.splice(index + i, 0, newValue);\n        }\n        if (isNotEmptyArray(added)) {\n            this.onAddAll_(index, values);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(added, this.toEventData_(added));\n            return true;\n        }\n        return false;\n    };\n    SListBaseMemory.prototype.clearAndAdd_ = function (value) {\n        checkSupported(this);\n        checkNonNullValue(this, value);\n        this.lock_();\n        try {\n            return this.clearAndAdd__(value);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SListBaseMemory.prototype.clearAndAdd__ = function (newValue) {\n        var values = this._values;\n        var added = [{ index: 0, value: newValue }];\n        var removed = [];\n        for (var i = 0, imax = values.length; i < imax; ++i) {\n            removed.push({ index: i, value: values[i] });\n        }\n        values.splice(0, values.length, newValue);\n        this.onClear_();\n        this.onAdd_(0, newValue);\n        this.getAndIncrementRevision_();\n        this.pushChangeEvent_(added, this.toEventData_(added, removed));\n        return true;\n    };\n    SListBaseMemory.prototype.clearAndAddAll_ = function (values) {\n        checkSupported(this);\n        checkNonNullValues(this, values);\n        this.lock_();\n        try {\n            return this.clearAndAddAll__(values);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SListBaseMemory.prototype.clearAndAddAll__ = function (newValues) {\n        var values = this._values;\n        var removed = [];\n        for (var i = 0, imax = values.length; i < imax; ++i) {\n            removed.push({ index: i, value: values[i] });\n        }\n        values.splice(0, values.length);\n        var added = [];\n        for (var i = 0, imax = newValues.length; i < imax; ++i) {\n            var newValue = newValues[i];\n            added.push({ index: values.length, value: newValue });\n            values.push(newValue);\n        }\n        if (isNotEmptyArray(added) || isNotEmptyArray(removed)) {\n            this.onClear_();\n            this.onAddAll_(0, newValues);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(added, this.toEventData_(added, removed));\n            return true;\n        }\n        return false;\n    };\n    SListBaseMemory.prototype.remove_ = function (index) {\n        checkSupported(this);\n        checkRange(index, 0, this.size_());\n        this.lock_();\n        try {\n            return this.remove__(index);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SListBaseMemory.prototype.remove__ = function (index) {\n        var oldValue = this._values.splice(index, 1)[0];\n        var removed = [{ index: index, value: oldValue }];\n        this.onRemove_(index);\n        this.getAndIncrementRevision_();\n        this.pushChangeEvent_([], this.toEventData_(null, removed));\n        return oldValue;\n    };\n    SListBaseMemory.prototype.clear_ = function () {\n        checkSupported(this);\n        this.lock_();\n        try {\n            this.clear__();\n        }\n        finally {\n            this.unlock_();\n        }\n        return this;\n    };\n    SListBaseMemory.prototype.clear__ = function () {\n        var removed = [];\n        var values = this._values;\n        for (var i = 0, imax = values.length; i < imax; ++i) {\n            removed.push({ index: i, value: values[i] });\n        }\n        values.splice(0, values.length);\n        if (isNotEmptyArray(removed)) {\n            this.onClear_();\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_([], this.toEventData_(null, removed));\n        }\n    };\n    SListBaseMemory.prototype.toArrayObject_ = function () {\n        var result = [];\n        var values = this._values;\n        for (var i = 0, imax = values.length; i < imax; ++i) {\n            result.push({ index: i, value: values[i] });\n        }\n        return result;\n    };\n    SListBaseMemory.prototype.toArray_ = function () {\n        return this._values;\n    };\n    SListBaseMemory.prototype.toJson_ = function () {\n        return this._values;\n    };\n    SListBaseMemory.prototype.fromJson_ = function (json) {\n        if (isArray(json)) {\n            this.clearAndAddAll_(json);\n        }\n    };\n    return SListBaseMemory;\n}(SContainerMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar moveKey1 = function (list, from, to, delta) {\n    for (var i = list.length - 2; 0 <= i; i -= 2) {\n        var index = list[i];\n        if (from == null || from <= index) {\n            if (to == null || index < to) {\n                list[i] = list[i] + delta;\n            }\n        }\n        else {\n            return i;\n        }\n    }\n    return -1;\n};\nvar moveKey2 = function (list, from, to, delta) {\n    for (var i = list.length - 1; 0 <= i; i -= 1) {\n        var e = list[i];\n        if (from == null || from <= e.index) {\n            if (to == null || e.index < to) {\n                e.index += delta;\n            }\n        }\n        else {\n            return i;\n        }\n    }\n    return -1;\n};\nvar vindexOf1 = function (array, value) {\n    var i0 = 0;\n    var i1 = (array.length >> 1) - 1;\n    while (i0 <= i1) {\n        var i2 = i0 + ((i1 - i0) >> 1);\n        var v2 = array[i2 << 1];\n        if (value < v2) {\n            i1 = i2 - 1;\n        }\n        else if (v2 < value) {\n            i0 = i2 + 1;\n        }\n        else {\n            return (i2 << 1);\n        }\n    }\n    return -1;\n};\nvar vindexOf2 = function (array, value) {\n    var i0 = 0;\n    var i1 = array.length - 1;\n    while (i0 <= i1) {\n        var i2 = i0 + ((i1 - i0) >> 1);\n        var v2 = array[i2].index;\n        if (value < v2) {\n            i1 = i2 - 1;\n        }\n        else if (v2 < value) {\n            i0 = i2 + 1;\n        }\n        else {\n            return i2;\n        }\n    }\n    return -1;\n};\nvar vceilingIndex1 = function (array, value) {\n    var i0 = 0;\n    var i1 = (array.length >> 1) - 1;\n    while (i0 <= i1) {\n        var i2 = i0 + ((i1 - i0) >> 1);\n        var v2 = array[i2 << 1];\n        if (value < v2) {\n            i1 = i2 - 1;\n        }\n        else if (v2 < value) {\n            i0 = i2 + 1;\n        }\n        else {\n            return (i2 << 1);\n        }\n    }\n    return (Math.max(i0, i1) << 1);\n};\nvar vceilingIndex2 = function (array, value) {\n    var i0 = 0;\n    var i1 = array.length - 1;\n    while (i0 <= i1) {\n        var i2 = i0 + ((i1 - i0) >> 1);\n        var v2 = array[i2].index;\n        if (value < v2) {\n            i1 = i2 - 1;\n        }\n        else if (v2 < value) {\n            i0 = i2 + 1;\n        }\n        else {\n            return i2;\n        }\n    }\n    return Math.max(i0, i1);\n};\nvar vput1 = function (list, index, value) {\n    for (var i = list.length - 2; 0 <= i; i -= 2) {\n        var ikey = list[i];\n        if (ikey === index) {\n            list[i + 1] = value;\n            return;\n        }\n        else if (ikey < index) {\n            list.splice(i + 2, 0, index, value);\n            return;\n        }\n    }\n    list.splice(0, 0, index, value);\n};\nvar vput2 = function (list, index, value) {\n    for (var i = list.length - 1; 0 <= i; i -= 1) {\n        var e = list[i];\n        if (e.index === index) {\n            e.value = value;\n            return;\n        }\n        else if (e.index < index) {\n            list.splice(i + 1, 0, { index: index, value: value });\n            return;\n        }\n    }\n    list.splice(0, 0, { index: index, value: value });\n};\nvar visNotEmpty1 = function (list) {\n    return isNotEmptyArray(list);\n};\nvar vremoveByIndex1 = function (list, index) {\n    return list.splice(index, 2)[1];\n};\nvar vremoveByIndex2 = function (list, index) {\n    return list.splice(index, 1)[0];\n};\nvar vadd1 = function (list, value) {\n    for (var i = list.length - 1; 0 <= i; i -= 1) {\n        if (list[i] < value) {\n            list.splice(i + 1, 0, value);\n            return;\n        }\n    }\n    list.splice(0, 0, value);\n};\nvar addToAdded1 = function (index, value, added) {\n    moveKey1(added, index, null, 1);\n    vput1(added, index, value);\n};\nvar addToAdded2 = function (index, value, added) {\n    moveKey2(added, index, null, 1);\n    vput2(added, index, value);\n};\nvar addAllToAdded1 = function (index, values, added) {\n    if (values != null && isNotEmptyArray(values)) {\n        moveKey1(added, index, null, values.length);\n        for (var i = 0, imax = values.length; i < imax; ++i) {\n            vput1(added, index + i, values[i]);\n        }\n    }\n};\nvar removeToAddedToRemoved1 = function (index, added, removed) {\n    var i = vindexOf1(added, index);\n    if (0 <= i) {\n        vremoveByIndex1(added, i);\n        moveKey1(added, index, null, -1);\n    }\n    else {\n        moveKey1(added, index, null, -1);\n        index -= (vceilingIndex1(added, index) >> 1);\n        removeToRemoved1(index, removed);\n    }\n};\nvar removeToAddedToRemoved2 = function (index, value, added, removed) {\n    var i = vindexOf2(added, index);\n    if (0 <= i) {\n        vremoveByIndex2(added, i);\n        moveKey2(added, index, null, -1);\n    }\n    else {\n        moveKey2(added, index, null, -1);\n        index -= vceilingIndex2(added, index);\n        removeToRemoved2(index, value, removed);\n    }\n};\nvar removeToRemoved1 = function (index, removed) {\n    vadd1(removed, findRemoveIndex1(index, removed));\n};\nvar removeToRemoved2 = function (index, value, removed) {\n    vput2(removed, findRemoveIndex2(index, removed), value);\n};\nvar findRemoveIndex1 = function (index, removed) {\n    var result = index;\n    for (var i = 0, imax = removed.length; i < imax; ++i) {\n        if (result < removed[i]) {\n            break;\n        }\n        result += 1;\n    }\n    return result;\n};\nvar findRemoveIndex2 = function (index, removed) {\n    var result = index;\n    for (var i = 0, imax = removed.length; i < imax; ++i) {\n        if (result < removed[i].index) {\n            break;\n        }\n        result += 1;\n    }\n    return result;\n};\nvar removeToUpdated1 = function (index, updated) {\n    if (visNotEmpty1(updated)) {\n        var i = moveKey1(updated, index + 1, null, -1);\n        if (0 <= i && updated[i] === index) {\n            vremoveByIndex1(updated, i);\n        }\n    }\n};\nvar removeToUpdatedAll = function (index, value, updated) {\n    for (var i = updated.length - 1; 0 <= i; --i) {\n        var update = updated[i];\n        if (index + 1 <= update.index) {\n            update.index -= 1;\n        }\n        else if (update.index === index) {\n            updated.splice(i, 1);\n            value = update.oldValue;\n        }\n    }\n    return value;\n};\nvar addToUpdated1 = function (index, size, updated) {\n    if (visNotEmpty1(updated)) {\n        moveKey1(updated, index, null, size);\n    }\n};\nvar addToUpdatedAll = function (index, size, updated) {\n    for (var i = 0, imax = updated.length; i < imax; ++i) {\n        var update = updated[i];\n        if (index <= update.index) {\n            update.index += size;\n        }\n    }\n};\nvar updateToUpdated1 = function (index, newValue, updated) {\n    vput1(updated, index, newValue);\n};\nvar SListBasePatchMaps = /** @class */ (function () {\n    function SListBasePatchMaps() {\n    }\n    SListBasePatchMaps.add = function (index, value, padded, pupdated) {\n        addToUpdated1(index, 1, pupdated);\n        addToAdded1(index, value, padded);\n    };\n    SListBasePatchMaps.addAll = function (index, values, padded, pupdated) {\n        if (values != null && isNotEmptyArray(values)) {\n            addToUpdated1(index, values.length, pupdated);\n            addAllToAdded1(index, values, padded);\n        }\n    };\n    SListBasePatchMaps.remove = function (index, padded, premoved, pupdated) {\n        removeToUpdated1(index, pupdated);\n        removeToAddedToRemoved1(index, padded, premoved);\n    };\n    SListBasePatchMaps.set = function (index, value, pupdated) {\n        updateToUpdated1(index, value, pupdated);\n    };\n    SListBasePatchMaps.merge = function (cadded, cremoved, cupdated, padded, premoved, pupdated) {\n        // Operation order is as follows:\n        //   Previous Removed\n        //   Previous Added\n        //   Previous updated\n        //   Current removed\n        //   Current added\n        //   Current updated\n        // Remove\n        for (var i = cremoved.length - 1; 0 <= i; --i) {\n            var cr = cremoved[i];\n            var value = removeToUpdatedAll(cr.index, cr.value, pupdated);\n            removeToAddedToRemoved2(cr.index, value, padded, premoved);\n        }\n        // Add\n        for (var i = 0, imax = cadded.length; i < imax; ++i) {\n            var ca = cadded[i];\n            addToUpdatedAll(ca.index, 1, pupdated);\n            addToAdded2(ca.index, ca.value, padded);\n        }\n        // Update\n        for (var i = 0, imax = cupdated.length; i < imax; ++i) {\n            pupdated.push(cupdated[i]);\n        }\n    };\n    SListBasePatchMaps.patch = function (cadded, cremoved, cupdated, list, padded, premoved, pupdated) {\n        // Remove\n        for (var i = cremoved.length - 1; 0 <= i; --i) {\n            var index = cremoved[i];\n            var value = list.splice(index, 1)[0];\n            value = removeToUpdatedAll(index, value, pupdated);\n            removeToAddedToRemoved2(index, value, padded, premoved);\n        }\n        // Add\n        for (var i = 0, imax = cadded.length; i < imax; i += 2) {\n            var index = cadded[i + 0];\n            var value = cadded[i + 1];\n            list.splice(index, 0, value);\n            addToUpdatedAll(index, 1, pupdated);\n            addToAdded2(index, value, padded);\n        }\n        // Update\n        for (var i = 0, imax = cupdated.length; i < imax; i += 2) {\n            var index = cupdated[i + 0];\n            var newValue = cupdated[i + 1];\n            var oldValue = list[index];\n            list[index] = newValue;\n            pupdated.push({ index: index, newValue: newValue, oldValue: oldValue });\n        }\n    };\n    return SListBasePatchMaps;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar lastIndexOf = function (revisions, target) {\n    for (var i = revisions.length - 1; 0 <= i; --i) {\n        var revision = revisions[i];\n        if (target < revision) {\n            continue;\n        }\n        return (revision === target ? i : -1);\n    }\n    return -1;\n};\nvar SPatches = /** @class */ (function () {\n    function SPatches(properties) {\n        this._isLocal = properties.isLocal_();\n        this._revisions = [];\n        this._patches = [];\n    }\n    SPatches.prototype.getOrCreate_ = function (revision) {\n        var patches = this._patches;\n        var revisions = this._revisions;\n        var index = lastIndexOf(revisions, revision);\n        if (0 <= index) {\n            return patches[index];\n        }\n        else {\n            if (this._isLocal) {\n                if (revisions.length === 0) {\n                    var result = this.newPatchReset_();\n                    revisions.push(revision);\n                    patches.push(result);\n                    return result;\n                }\n                else {\n                    revisions[0] = revision;\n                    return patches[0];\n                }\n            }\n            else {\n                if (isNotEmptyArray(patches)) {\n                    var length_1 = patches.length;\n                    var dummy = this.getPatchMapDummy_();\n                    var lastPatch = patches[length_1 - 1];\n                    if (lastPatch != null && lastPatch !== dummy) {\n                        if (1 < length_1) {\n                            var secondLastPatch = patches[length_1 - 2];\n                            if (secondLastPatch != null) {\n                                revisions[length_1 - 1] = revision;\n                            }\n                            else {\n                                patches[length_1 - 1] = dummy;\n                                revisions.push(revision);\n                                patches.push(lastPatch);\n                            }\n                        }\n                        else {\n                            patches[length_1 - 1] = dummy;\n                            revisions.push(revision);\n                            patches.push(lastPatch);\n                        }\n                        return lastPatch;\n                    }\n                }\n                var result = this.newPatchMap_();\n                revisions.push(revision);\n                patches.push(result);\n                return result;\n            }\n        }\n    };\n    SPatches.prototype.clear_ = function (revision) {\n        this._revisions.length = 0;\n        this._patches.length = 0;\n        if (revision != null) {\n            this._revisions.push(revision);\n            this._patches.push(this.newPatchReset_());\n        }\n    };\n    SPatches.prototype.compact_ = function (authorizedRevision) {\n        for (var i = 0, imax = this._revisions.length; i < imax; ++i) {\n            var revision = this._revisions[0];\n            if (authorizedRevision <= revision) {\n                break;\n            }\n            this._revisions.splice(0, 1);\n            this._patches.splice(0, 1);\n        }\n    };\n    SPatches.prototype.resetIfTooHeavy_ = function (weightCriteria) {\n        var revisions = this._revisions;\n        if (isEmptyArray(revisions)) {\n            return;\n        }\n        var weight = 0;\n        var patches = this._patches;\n        for (var i = 0, imax = patches.length; i < imax; ++i) {\n            var patch = patches[i];\n            if (patch != null) {\n                weight += patch.getWeight_();\n            }\n        }\n        if (weight <= weightCriteria) {\n            return;\n        }\n        this.clear_(revisions[revisions.length - 1]);\n    };\n    SPatches.prototype.containsReset_ = function () {\n        for (var i = 0, imax = this._patches.length; i < imax; ++i) {\n            var patch = this._patches[i];\n            if (patch != null && patch.isReset_()) {\n                return true;\n            }\n        }\n        return false;\n    };\n    SPatches.prototype.pack_ = function (authorizedRevision, forceReset, revision, data, isSoft) {\n        var dataSize = size(data);\n        this.resetIfTooHeavy_(dataSize);\n        var revisions = this._revisions;\n        var patches = this._patches;\n        if (isSoft || forceReset || dataSize <= 0 ||\n            (isNotEmptyArray(revisions) && authorizedRevision < revisions[0]) || this.containsReset_()) {\n            for (var i = 0, imax = patches.length; i < imax; ++i) {\n                if (revision <= revisions[i]) {\n                    break;\n                }\n                patches[i] = null;\n            }\n            return this.packReset_(authorizedRevision, revision, data);\n        }\n        else {\n            var isEmpty = true;\n            var firstRevision = 0;\n            var dummy = this.getPatchMapDummy_();\n            var result = [0, 0, 1];\n            for (var i = 0, imax = patches.length; i < imax; ++i) {\n                var r = revisions[i];\n                if (revision <= r) {\n                    break;\n                }\n                var patch = patches[i];\n                if (patch != null) {\n                    patches[i] = null;\n                    if (isEmpty) {\n                        isEmpty = false;\n                        firstRevision = r;\n                    }\n                    if (patch !== dummy) {\n                        result.push(r - firstRevision);\n                        patch.serialize_(result);\n                    }\n                }\n            }\n            if (isEmpty) {\n                result[0] = revision;\n                result[1] = 0;\n            }\n            else {\n                result[0] = firstRevision;\n                result[1] = revision - firstRevision;\n            }\n            return result;\n        }\n    };\n    SPatches.prototype.packReset_ = function (authorizedRevision, revision, data) {\n        return [authorizedRevision, revision - authorizedRevision, 0, data];\n    };\n    SPatches.prototype.isEmpty_ = function () {\n        return isEmptyArray(this._revisions);\n    };\n    return SPatches;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SListBasePatches = /** @class */ (function (_super) {\n    __extends(SListBasePatches, _super);\n    function SListBasePatches() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    SListBasePatches.prototype.add = function (revision, index, value) {\n        this.getOrCreate_(revision).add_(index, value);\n    };\n    SListBasePatches.prototype.addAll = function (revision, index, values) {\n        this.getOrCreate_(revision).addAll_(index, values);\n    };\n    SListBasePatches.prototype.remove = function (revision, index) {\n        this.getOrCreate_(revision).remove_(index);\n    };\n    SListBasePatches.prototype.set = function (revision, index, value) {\n        this.getOrCreate_(revision).set_(index, value);\n    };\n    return SListBasePatches;\n}(SPatches));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SListBasePatchMap = /** @class */ (function () {\n    function SListBasePatchMap() {\n        this._added = [];\n        this._removed = [];\n        this._updated = [];\n    }\n    SListBasePatchMap.prototype.add_ = function (index, value) {\n        SListBasePatchMaps.add(index, value, this._added, this._updated);\n    };\n    SListBasePatchMap.prototype.addAll_ = function (index, values) {\n        SListBasePatchMaps.addAll(index, values, this._added, this._updated);\n    };\n    SListBasePatchMap.prototype.remove_ = function (index) {\n        SListBasePatchMaps.remove(index, this._added, this._removed, this._updated);\n    };\n    SListBasePatchMap.prototype.set_ = function (index, value) {\n        SListBasePatchMaps.set(index, value, this._updated);\n    };\n    SListBasePatchMap.prototype.getWeight_ = function () {\n        return (this._added.length >> 1) + (this._updated.length >> 1);\n    };\n    SListBasePatchMap.prototype.isReset_ = function () {\n        return false;\n    };\n    SListBasePatchMap.prototype.serialize_ = function (result) {\n        result.push(this._added, this._removed, this._updated);\n    };\n    return SListBasePatchMap;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SListPatchMap = /** @class */ (function (_super) {\n    __extends(SListPatchMap, _super);\n    function SListPatchMap() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    return SListPatchMap;\n}(SListBasePatchMap));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SListBasePatchReset = /** @class */ (function () {\n    function SListBasePatchReset() {\n    }\n    SListBasePatchReset.prototype.add_ = function () {\n        // DO NOTHING\n    };\n    SListBasePatchReset.prototype.addAll_ = function () {\n        // DO NOTHING\n    };\n    SListBasePatchReset.prototype.remove_ = function () {\n        // DO NOTHING\n    };\n    SListBasePatchReset.prototype.set_ = function () {\n        // DO NOTHING\n    };\n    SListBasePatchReset.prototype.getWeight_ = function () {\n        return 1;\n    };\n    SListBasePatchReset.prototype.isReset_ = function () {\n        return true;\n    };\n    SListBasePatchReset.prototype.serialize_ = function (result) {\n        // DO NOTHING\n    };\n    return SListBasePatchReset;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SListPatchReset = /** @class */ (function (_super) {\n    __extends(SListPatchReset, _super);\n    function SListPatchReset() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    return SListPatchReset;\n}(SListBasePatchReset));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SLIST_PATCH_RESET_INSTANCE = new SListPatchReset();\nvar SLIST_PATCH_MAP_DUMMY = new SListPatchMap();\nvar SListPatches = /** @class */ (function (_super) {\n    __extends(SListPatches, _super);\n    function SListPatches() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    SListPatches.prototype.newPatchMap_ = function () {\n        return new SListPatchMap();\n    };\n    SListPatches.prototype.newPatchReset_ = function () {\n        return SLIST_PATCH_RESET_INSTANCE;\n    };\n    SListPatches.prototype.getPatchMapDummy_ = function () {\n        return SLIST_PATCH_MAP_DUMMY;\n    };\n    return SListPatches;\n}(SListBasePatches));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SListMemory = /** @class */ (function (_super) {\n    __extends(SListMemory, _super);\n    function SListMemory(parent, name, properties, lock, newWrapper) {\n        return _super.call(this, parent, name, properties, lock, newWrapper, new SListPatches(properties)) || this;\n    }\n    SListMemory.prototype.mergeEvents_ = function (current, previous, isFirst) {\n        SListBasePatchMaps.merge(current[1], current[2], current[3], previous[1], previous[2], previous[3]);\n    };\n    SListMemory.prototype.onMergedEvent_ = function (mergedEvent) {\n        mergedEvent[3] = mergeAndSortUpdated(mergedEvent[3]);\n    };\n    SListMemory.prototype.patch_ = function (patches) {\n        var revision = this.getRevision_();\n        var list = this._values;\n        var added = [];\n        var removed = [];\n        var updated = [];\n        var type = patches[2];\n        if (type === 0) {\n            this.patchReset_(patches[3], list, added, removed, updated);\n        }\n        else {\n            var startRevision = patches[0];\n            var ceilingRevision = Math.max(revision - startRevision, 0);\n            for (var i = 3, imax = patches.length; i < imax; i += 4) {\n                if (ceilingRevision <= patches[i + 0]) {\n                    SListBasePatchMaps.patch(patches[i + 1], patches[i + 2], patches[i + 3], list, added, removed, updated);\n                }\n            }\n            if (7 < patches.length) {\n                updated = mergeAndSortUpdated(updated);\n            }\n        }\n        if (isEmptyArray(added) && isEmptyArray(removed) && isEmptyArray(updated)) {\n            return null;\n        }\n        else {\n            return [null, added, removed, updated];\n        }\n    };\n    return SListMemory;\n}(SListBaseMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized list.\n *\n * @param V a value type\n */\nvar SList = /** @class */ (function (_super) {\n    __extends(SList, _super);\n    function SList(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return SList;\n}(SListBase));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SListMemory(parent, name, properties, lock, SList);\n    },\n    getConstructor_: function () {\n        return SList;\n    },\n    getType_: function () {\n        return 9 /* LIST */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A map entry (key-value pair).\n *\n * @param V a value type\n */\nvar SMapEntry = /** @class */ (function () {\n    function SMapEntry(key, value) {\n        this.__mem__ = {\n            _key: key,\n            _value: value\n        };\n    }\n    /**\n     * Returns a key of this entry.\n     *\n     * @returns a key of this entry\n     */\n    SMapEntry.prototype.getKey = function () {\n        return this.__mem__._key;\n    };\n    /**\n     * Returns a value of this entry.\n     *\n     * @returns a value of this entry\n     */\n    SMapEntry.prototype.getValue = function () {\n        return this.__mem__._value;\n    };\n    return SMapEntry;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Represents a map.\n */\nvar SMapBase = /** @class */ (function (_super) {\n    __extends(SMapBase, _super);\n    function SMapBase(memory) {\n        return _super.call(this, memory) || this;\n    }\n    /**\n     * Returns the size of this map.\n     *\n     * @returns the size of this map\n     */\n    SMapBase.prototype.size = function () {\n        return this.__mem__.size_();\n    };\n    /**\n     * Returns true if this map is empty.\n     *\n     * @returns true if this map is empty\n     */\n    SMapBase.prototype.isEmpty = function () {\n        return this.__mem__.isEmpty_();\n    };\n    /**\n     * Returns true if the specified key is in this map.\n     *\n     * @param key the key to be tested\n     * @returns true if the specified key is in this map\n     */\n    SMapBase.prototype.containsKey = function (key) {\n        return this.__mem__.containsKey_(key);\n    };\n    /**\n     * Returns true if the specified value is in this map.\n     *\n     * @param element the value to be tested\n     * @param comparator comparator\n     * @param thisArg context for the comparator\n     * @returns true if the specified value is in this map.\n     */\n    SMapBase.prototype.containsValue = function (element, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.containsValue_(element, comparator, thisArg);\n    };\n    /**\n     * Iterates over elements of this map, calling the iteratee for each element.\n     * The iteratee is bound to the thisArg and invoked with three arguments: value, key and this map.\n     * The iteratee may exit iteration early by explicitly returning false.\n     *\n     * @param iteratee the function called per iteration\n     * @param thisArg the this binding of the iteratee\n     * @returns this\n     */\n    SMapBase.prototype.each = function (iteratee, thisArg) {\n        if (thisArg === void 0) { thisArg = this; }\n        this.__mem__.each_(iteratee, thisArg);\n        return this;\n    };\n    /**\n     * Iterates elements of this map, calling the iteratee for each element,\n     * removing all elements the iteratee does not return true.\n     * The iteratee is bound to the thisArg and invoked with three arguments: value, key and this map.\n     *\n     * @param iteratee the function called per iteration\n     * @param thisArg the this binding of the iteratee\n     * @throws Error if this is read-only\n     * @returns this\n     */\n    SMapBase.prototype.filter = function (iteratee, thisArg) {\n        if (thisArg === void 0) { thisArg = this; }\n        this.__mem__.filter_(iteratee, thisArg);\n        return this;\n    };\n    /**\n     * Returns the first field value which the specified predicate returns true, or null if there is no such field.\n     * The predicate is bound to the thisArg and invoked with three arguments: field value, field name and this map.\n     *\n     * @param predicate the function called per iteration\n     * @param thisArg the this binding of the predicate\n     * @returns the first field value which the specified predicate returns true, or null if there is no such field.\n     */\n    SMapBase.prototype.find = function (predicate, thisArg) {\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.find_(predicate, thisArg);\n    };\n    /**\n     * Returns the array of the values in this map.\n     *\n     * @returns the array of the values in this map\n     */\n    SMapBase.prototype.values = function () {\n        return this.__mem__.values_();\n    };\n    /**\n     * Returns the value of the specified key.\n     * Returns null if this map does not contains the specified key.\n     *\n     * @param key the key of the value\n     * @returns the value of the specified key\n     */\n    SMapBase.prototype.get = function (key) {\n        return this.__mem__.get_(key);\n    };\n    /**\n     * Associates the specified value with the specified key.\n     * If this map contained the specified key previously, the old value is replaced by the specified value.\n     *\n     * @param key the key with which the specified value is to be associated\n     * @param element the value to be associated with the specified key\n     * @returns the old value or null if this map did not contain the specified key previously\n     * @throws Error if this is read-only\n     * @throws Error if the specified key is null\n     * @throws Error if the specified value is null and this does not support a null value\n     */\n    SMapBase.prototype.put = function (key, element) {\n        return this.__mem__.put_(key, element);\n    };\n    /**\n     * Reassociates the value of the specified key.\n     *\n     * @param key the key which is to be reassociated\n     * @returns the value of the specified key or null if this map did not contain the specified key previously\n     * @throws Error if this is read-only\n     * @throws Error if the specified key is null\n     */\n    SMapBase.prototype.reput = function (key) {\n        return this.__mem__.reput_(key);\n    };\n    /**\n     * Copies all the mappings of the specified mapping to this map.\n     *\n     * @param mappings mappings to be stored in this map\n     * @throws Error if this is read-only\n     * @throws Error if the specified mappings is null\n     * @throws Error if the specified mappings contains a null value and this does not support a null value\n     * @returns this\n     */\n    SMapBase.prototype.putAll = function (mappings) {\n        this.__mem__.putAll_(mappings);\n        return this;\n    };\n    /**\n     * Clear this map and then associates the specified value with the specified key.\n     *\n     * @param key the key with which the specified value is to be associated\n     * @param element the value to be associated with the specified key\n     * @returns null\n     * @throws Error if this is read-only\n     * @throws Error if the specified key is null\n     * @throws Error if the specified value is null and this does not support a null value\n     */\n    SMapBase.prototype.clearAndPut = function (key, element) {\n        return this.__mem__.clearAndPut_(key, element);\n    };\n    /**\n     * Clear this map and then copies all the mappings of the specified mapping to this map.\n     *\n     * @param mappings mappings to be stored in this map\n     * @throws Error if this is read-only\n     * @throws Error if the specified mappings is null\n     * @throws Error if the specified mappings contains a null value and this does not support a null value\n     * @returns this\n     */\n    SMapBase.prototype.clearAndPutAll = function (mappings) {\n        this.__mem__.clearAndPutAll_(mappings);\n        return this;\n    };\n    /**\n     * Removes the mapping of the specified key.\n     *\n     * @param key the key of the mapping to be removed\n     * @returns the old value or null if this map did not contain the specified key\n     * @throws Error if this is read-only\n     */\n    SMapBase.prototype.remove = function (key) {\n        return this.__mem__.remove_(key);\n    };\n    /**\n     * Removes all of the mappings in this map.\n     *\n     * @throws Error if this is read-only\n     * @returns this\n     */\n    SMapBase.prototype.clear = function () {\n        this.__mem__.clear_();\n        return this;\n    };\n    /**\n     * Returns the JSON representation of this map.\n     * Must not change the returned JSON.\n     *\n     * @returns the JSON representation of this map\n     */\n    SMapBase.prototype.toJson = function () {\n        return this.__mem__.toJson_();\n    };\n    /**\n     * Sets to the specified JSON object.\n     *\n     * @param json JSON object to be set\n     * @returns this\n     */\n    SMapBase.prototype.fromJson = function (json) {\n        this.__mem__.fromJson_(json);\n        return this;\n    };\n    /**\n     * Sets to the specified string.\n     *\n     * @param str string to be set\n     * @returns this\n     */\n    SMapBase.prototype.fromString = function (str) {\n        this.__mem__.fromString_(str);\n        return this;\n    };\n    /**\n     * Returns the object representation of this map.\n     * Must not change the returned object.\n     *\n     * @returns the object representation of this map\n     */\n    SMapBase.prototype.toObject = function () {\n        return this.__mem__.toObject_();\n    };\n    SMapBase.Entry = SMapEntry;\n    return SMapBase;\n}(SContainer));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SMapBaseMemory = /** @class */ (function (_super) {\n    __extends(SMapBaseMemory, _super);\n    function SMapBaseMemory(parent, name, properties, lock, wrapperConstructor, patches) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, patches) || this;\n    }\n    SMapBaseMemory.prototype.makeInitValues_ = function () {\n        return {};\n    };\n    SMapBaseMemory.prototype.onPut_ = function (key, value) {\n        this._patches.put_(this.getRevision_(), key, value);\n        this.toUpdated_();\n        return true;\n    };\n    SMapBaseMemory.prototype.onPutAll_ = function (values) {\n        this._patches.putAll_(this.getRevision_(), values);\n        this.toUpdated_();\n    };\n    SMapBaseMemory.prototype.onRemove_ = function (key) {\n        this._patches.remove_(this.getRevision_(), key);\n        this.toUpdated_();\n    };\n    SMapBaseMemory.prototype.onRemoveAll_ = function (values) {\n        this._patches.removeAll_(this.getRevision_(), values);\n        this.toUpdated_();\n    };\n    SMapBaseMemory.prototype.onClear_ = function () {\n        this._patches.clear_(this.getRevision_());\n        this.toUpdated_();\n    };\n    SMapBaseMemory.prototype.newInitArgs_ = function () {\n        return [null, this._values];\n    };\n    SMapBaseMemory.prototype.newValueArgs_ = function (initArgs) {\n        return [null, initArgs[1], {}, {}];\n    };\n    SMapBaseMemory.prototype.toEventData_ = function (added, removed, updated) {\n        return [\n            null,\n            added || {},\n            removed || {},\n            updated || {}\n        ];\n    };\n    SMapBaseMemory.prototype.mergeEvents_ = function (current, previous, isFirst) {\n        var cadded = current[1];\n        var cremoved = current[2];\n        var cupdated = current[3];\n        var padded = previous[1];\n        var premoved = previous[2];\n        var pupdated = previous[3];\n        // Operation order is as follows:\n        //   Previous removed\n        //   Previous added\n        //   Previous updated\n        //   Current removed\n        //   Current added\n        //   Current updated\n        // Current removed -> previous updated -> previous added -> previous removed\n        for (var key in cremoved) {\n            delete pupdated[key];\n            if (key in padded) {\n                delete padded[key];\n            }\n            else {\n                if ((key in premoved) !== true) {\n                    premoved[key] = cremoved[key];\n                }\n            }\n        }\n        // Current added -> previous updated -> previous added\n        for (var key in cadded) {\n            padded[key] = cadded[key];\n        }\n        // Current updated -> previous updated\n        for (var key in cupdated) {\n            var update = pupdated[key];\n            if (update != null) {\n                update.newValue = cupdated[key].newValue;\n            }\n            else {\n                pupdated[key] = cupdated[key];\n            }\n        }\n    };\n    SMapBaseMemory.prototype.size_ = function () {\n        return sizeObject(this._values);\n    };\n    SMapBaseMemory.prototype.isEmpty_ = function () {\n        return isEmptyObject(this._values);\n    };\n    SMapBaseMemory.prototype.containsKey_ = function (key) {\n        return (key in this._values);\n    };\n    SMapBaseMemory.prototype.containsValue_ = function (value, comparator, thisArg) {\n        var values = this._values;\n        for (var key in values) {\n            if (comparator.call(thisArg, values[key], value)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    SMapBaseMemory.prototype.each_ = function (iteratee, thisArg) {\n        var values = this._values;\n        var wrapper = this.getWrapper_();\n        for (var key in values) {\n            if (iteratee.call(thisArg, values[key], key, wrapper) === false) {\n                return;\n            }\n        }\n    };\n    SMapBaseMemory.prototype.filter_ = function (iteratee, thisArg) {\n        checkSupported(this);\n        this.lock_();\n        try {\n            this.filter__(iteratee, thisArg);\n        }\n        finally {\n            this.unlock_();\n        }\n        return this;\n    };\n    SMapBaseMemory.prototype.find_ = function (predicate, thisArg) {\n        var values = this._values;\n        var wrapper = this.getWrapper_();\n        for (var key in values) {\n            if (predicate.call(thisArg, values[key], key, wrapper) === true) {\n                return values[key];\n            }\n        }\n        return null;\n    };\n    SMapBaseMemory.prototype.values_ = function () {\n        var result = [];\n        var values = this._values;\n        for (var key in values) {\n            result.push(values[key]);\n        }\n        return result;\n    };\n    SMapBaseMemory.prototype.get_ = function (key) {\n        var values = this._values;\n        if (key in values) {\n            return values[key];\n        }\n        else {\n            return null;\n        }\n    };\n    SMapBaseMemory.prototype.put_ = function (key, value) {\n        checkSupported(this);\n        checkNonNull(key);\n        checkNonNullValue(this, value);\n        this.lock_();\n        try {\n            return this.put__(key, value);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SMapBaseMemory.prototype.reput_ = function (key) {\n        checkSupported(this);\n        checkNonNull(key);\n        this.lock_();\n        try {\n            return this.reput__(key);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SMapBaseMemory.prototype.putAll_ = function (mappings) {\n        checkSupported(this);\n        checkNonNullValues(this, mappings);\n        this.lock_();\n        try {\n            this.putAll__(mappings);\n        }\n        finally {\n            this.unlock_();\n        }\n        return this;\n    };\n    SMapBaseMemory.prototype.clearAndPut_ = function (key, value) {\n        checkSupported(this);\n        checkNonNull(key);\n        checkNonNullValue(this, value);\n        this.lock_();\n        try {\n            return this.clearAndPut__(key, value);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SMapBaseMemory.prototype.clearAndPutAll_ = function (mappings) {\n        checkSupported(this);\n        checkNonNullValues(this, mappings);\n        this.lock_();\n        try {\n            this.clearAndPutAll__(mappings);\n        }\n        finally {\n            this.unlock_();\n        }\n        return this;\n    };\n    SMapBaseMemory.prototype.remove_ = function (key) {\n        checkSupported(this);\n        this.lock_();\n        try {\n            return this.remove__(key);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SMapBaseMemory.prototype.clear_ = function () {\n        checkSupported(this);\n        this.lock_();\n        try {\n            this.clear__();\n        }\n        finally {\n            this.unlock_();\n        }\n        return this;\n    };\n    SMapBaseMemory.prototype.toJson_ = function () {\n        return this._values;\n    };\n    SMapBaseMemory.prototype.fromJson_ = function (json) {\n        this.lock_();\n        try {\n            this.clear__();\n            this.putAll__(json);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SMapBaseMemory.prototype.toObject_ = function () {\n        return this._values;\n    };\n    SMapBaseMemory.prototype.fromString_ = function (str) {\n        this.fromJson_(JSON.parse(str));\n    };\n    return SMapBaseMemory;\n}(SContainerMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SMapBasePatches = /** @class */ (function (_super) {\n    __extends(SMapBasePatches, _super);\n    function SMapBasePatches() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    SMapBasePatches.prototype.put_ = function (revision, key, value) {\n        this.getOrCreate_(revision).put_(key, value);\n    };\n    SMapBasePatches.prototype.putAll_ = function (revision, values) {\n        this.getOrCreate_(revision).putAll_(values);\n    };\n    SMapBasePatches.prototype.remove_ = function (revision, key) {\n        this.getOrCreate_(revision).remove_(key);\n    };\n    SMapBasePatches.prototype.removeAll_ = function (revision, values) {\n        this.getOrCreate_(revision).removeAll_(values);\n    };\n    return SMapBasePatches;\n}(SPatches));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SMapBasePatchMap = /** @class */ (function () {\n    function SMapBasePatchMap() {\n        this._added = {};\n        this._removed = {};\n        this._addedLength = 0;\n    }\n    SMapBasePatchMap.prototype.put_ = function (key, value) {\n        delete this._removed[key];\n        if (!(key in this._added)) {\n            this._addedLength += 1;\n        }\n        this._added[key] = value;\n    };\n    SMapBasePatchMap.prototype.putAll_ = function (values) {\n        if (values != null) {\n            var added = this._added;\n            var addedLength = 0;\n            var removed = this._removed;\n            for (var key in values) {\n                if (hasOwn(values, key)) {\n                    var value = values[key];\n                    delete removed[key];\n                    if (!(key in added)) {\n                        addedLength += 1;\n                    }\n                    added[key] = value;\n                }\n            }\n            this._addedLength += addedLength;\n        }\n    };\n    SMapBasePatchMap.prototype.remove_ = function (key) {\n        if (key in this._added) {\n            delete this._added[key];\n            this._addedLength -= 1;\n        }\n        this._removed[key] = 0;\n    };\n    SMapBasePatchMap.prototype.removeAll_ = function (values) {\n        if (values != null) {\n            var added = this._added;\n            var addedLength = 0;\n            var removed = this._removed;\n            for (var key in values) {\n                if (hasOwn(values, key)) {\n                    if (key in added) {\n                        delete added[key];\n                        addedLength -= 1;\n                    }\n                    removed[key] = 0;\n                }\n            }\n            this._addedLength += addedLength;\n        }\n    };\n    SMapBasePatchMap.prototype.getWeight_ = function () {\n        return this._addedLength;\n    };\n    SMapBasePatchMap.prototype.isReset_ = function () {\n        return false;\n    };\n    SMapBasePatchMap.prototype.serialize_ = function (result) {\n        result.push(this._added, Object.keys(this._removed));\n    };\n    return SMapBasePatchMap;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SMapPatchMap = /** @class */ (function (_super) {\n    __extends(SMapPatchMap, _super);\n    function SMapPatchMap() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    return SMapPatchMap;\n}(SMapBasePatchMap));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SMapBasePatchReset = /** @class */ (function () {\n    function SMapBasePatchReset() {\n    }\n    SMapBasePatchReset.prototype.put_ = function () {\n        // DO NOTHING\n    };\n    SMapBasePatchReset.prototype.putAll_ = function () {\n        // DO NOTHING\n    };\n    SMapBasePatchReset.prototype.remove_ = function () {\n        // DO NOTHING\n    };\n    SMapBasePatchReset.prototype.removeAll_ = function () {\n        // DO NOTHING\n    };\n    SMapBasePatchReset.prototype.getWeight_ = function () {\n        return 1;\n    };\n    SMapBasePatchReset.prototype.isReset_ = function () {\n        return true;\n    };\n    SMapBasePatchReset.prototype.serialize_ = function (result) {\n        // DO NOTHING\n    };\n    return SMapBasePatchReset;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SMapPatchReset = /** @class */ (function (_super) {\n    __extends(SMapPatchReset, _super);\n    function SMapPatchReset() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    return SMapPatchReset;\n}(SMapBasePatchReset));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SMAP_PATCH_RESET_INSTANCE = new SMapPatchReset();\nvar SMAP_PATCH_MAP_DUMMY = new SMapPatchMap();\nvar SMapPatches = /** @class */ (function (_super) {\n    __extends(SMapPatches, _super);\n    function SMapPatches() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    SMapPatches.prototype.newPatchMap_ = function () {\n        return new SMapPatchMap();\n    };\n    SMapPatches.prototype.newPatchReset_ = function () {\n        return SMAP_PATCH_RESET_INSTANCE;\n    };\n    SMapPatches.prototype.getPatchMapDummy_ = function () {\n        return SMAP_PATCH_MAP_DUMMY;\n    };\n    return SMapPatches;\n}(SMapBasePatches));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar patchMap = function (cadded, cremoved, map, padded, premoved, pupdated) {\n    // Removed\n    for (var i = 0, imax = cremoved.length; i < imax; ++i) {\n        var key = cremoved[i];\n        if (key in map) {\n            var value = map[key];\n            delete map[key];\n            delete pupdated[key];\n            if (key in padded) {\n                delete padded[key];\n            }\n            else {\n                premoved[key] = value;\n            }\n        }\n    }\n    // Added\n    for (var key in cadded) {\n        var newValue = cadded[key];\n        if (key in map) {\n            var oldValue = map[key];\n            var update = pupdated[key];\n            if (update != null) {\n                update.newValue = newValue;\n            }\n            else {\n                pupdated[key] = { newValue: newValue, oldValue: oldValue };\n            }\n        }\n        else {\n            padded[key] = newValue;\n        }\n        map[key] = newValue;\n    }\n};\nvar patchReset$1 = function (values, map, added, removed, updated) {\n    for (var key in map) {\n        var oldValue = map[key];\n        if (key in values) {\n            var newValue = values[key];\n            if (isEqual(newValue, oldValue) !== true) {\n                updated[key] = { newValue: newValue, oldValue: oldValue };\n                map[key] = newValue;\n            }\n        }\n        else {\n            removed[key] = oldValue;\n            delete map[key];\n        }\n    }\n    for (var key in values) {\n        if (!(key in map)) {\n            map[key] = added[key] = values[key];\n        }\n    }\n};\nvar SMapMemory = /** @class */ (function (_super) {\n    __extends(SMapMemory, _super);\n    function SMapMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, new SMapPatches(properties)) || this;\n    }\n    SMapMemory.prototype.filter__ = function (iteratee, thisArg) {\n        var isChanged = false;\n        var values = this._values;\n        var wrapper = this.getWrapper_();\n        var removed = {};\n        for (var key in values) {\n            var value = values[key];\n            if (iteratee.call(thisArg, value, key, wrapper) !== true) {\n                removed[key] = value;\n                isChanged = true;\n            }\n        }\n        if (isChanged) {\n            for (var key in removed) {\n                delete values[key];\n            }\n            var eventData = this.toEventData_(null, removed, null);\n            this.onRemoveAll_(removed);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(eventData[1], eventData);\n        }\n    };\n    SMapMemory.prototype.put__ = function (key, value) {\n        var values = this._values;\n        var eventData = null;\n        var oldValue = null;\n        if (key in values) {\n            oldValue = values[key];\n            var updated = {};\n            updated[key] = { newValue: value, oldValue: oldValue };\n            eventData = this.toEventData_(null, null, updated);\n        }\n        else {\n            var added = {};\n            added[key] = value;\n            eventData = this.toEventData_(added, null, null);\n        }\n        values[key] = value;\n        this.onPut_(key, value);\n        this.getAndIncrementRevision_();\n        this.pushChangeEvent_(eventData[1], eventData);\n        return oldValue;\n    };\n    SMapMemory.prototype.reput__ = function (key) {\n        var value = null;\n        var values = this._values;\n        if (key in values) {\n            value = values[key];\n            var updated = {};\n            updated[key] = { newValue: value, oldValue: value };\n            var eventData = this.toEventData_(null, null, updated);\n            this.onPut_(key, value);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(eventData[1], eventData);\n        }\n        return value;\n    };\n    SMapMemory.prototype.putAll__ = function (mappings) {\n        var isChanged = false;\n        var values = this._values;\n        var added = {};\n        var updated = {};\n        for (var key in mappings) {\n            if (hasOwn(mappings, key)) {\n                var newValue = mappings[key];\n                if (key in values) {\n                    updated[key] = { newValue: newValue, oldValue: values[key] };\n                }\n                else {\n                    added[key] = newValue;\n                }\n                values[key] = newValue;\n                isChanged = true;\n            }\n        }\n        if (isChanged) {\n            var eventData = this.toEventData_(added, null, updated);\n            this.onPutAll_(mappings);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(eventData[1], eventData);\n        }\n    };\n    SMapMemory.prototype.clearAndPut__ = function (key, value) {\n        var values = this._values;\n        var removed = {};\n        for (var rkey in values) {\n            if (rkey !== key) {\n                removed[rkey] = values[rkey];\n                delete values[rkey];\n            }\n        }\n        var eventData = null;\n        if (key in values) {\n            var updated = {};\n            updated[key] = { newValue: value, oldValue: values[key] };\n            eventData = this.toEventData_(null, removed, updated);\n        }\n        else {\n            var added = {};\n            added[key] = value;\n            eventData = this.toEventData_(added, removed, null);\n        }\n        values[key] = value;\n        this.onClear_();\n        this.onPut_(key, value);\n        this.getAndIncrementRevision_();\n        this.pushChangeEvent_(eventData[1], eventData);\n        return null;\n    };\n    SMapMemory.prototype.clearAndPutAll__ = function (mappings) {\n        var isChanged = false;\n        var values = this._values;\n        var removed = {};\n        for (var key in values) {\n            if (!(key in mappings)) {\n                removed[key] = values[key];\n                delete values[key];\n                isChanged = true;\n            }\n        }\n        var added = {};\n        var updated = {};\n        for (var key in mappings) {\n            if (hasOwn(mappings, key)) {\n                var newValue = mappings[key];\n                if (key in values) {\n                    updated[key] = { newValue: newValue, oldValue: values[key] };\n                }\n                else {\n                    added[key] = newValue;\n                }\n                values[key] = newValue;\n                isChanged = true;\n            }\n        }\n        if (isChanged) {\n            var eventData = this.toEventData_(added, removed, updated);\n            this.onClear_();\n            this.onPutAll_(mappings);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(eventData[1], eventData);\n        }\n    };\n    SMapMemory.prototype.remove__ = function (key) {\n        var values = this._values;\n        var result = null;\n        if (key in values) {\n            var removed = {};\n            result = removed[key] = values[key];\n            delete values[key];\n            var eventData = this.toEventData_(null, removed, null);\n            this.onRemove_(key);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(eventData[1], eventData);\n        }\n        return result;\n    };\n    SMapMemory.prototype.clear__ = function () {\n        var values = this._values;\n        var isChanged = false;\n        var removed = {};\n        for (var key in values) {\n            removed[key] = values[key];\n            delete values[key];\n            isChanged = true;\n        }\n        if (isChanged) {\n            var eventData = this.toEventData_(null, removed, null);\n            this.onClear_();\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(eventData[1], eventData);\n        }\n    };\n    SMapMemory.prototype.patch_ = function (patches) {\n        var revision = this.getRevision_();\n        var map = this._values;\n        var added = {};\n        var removed = {};\n        var updated = {};\n        var type = patches[2];\n        if (type === 0) {\n            patchReset$1(patches[3], map, added, removed, updated);\n        }\n        else {\n            var startRevision = patches[0];\n            var ceilingRevision = Math.max(revision - startRevision, 0);\n            for (var i = 3, imax = patches.length; i < imax; i += 3) {\n                if (ceilingRevision <= patches[i + 0]) {\n                    patchMap(patches[i + 1], patches[i + 2], map, added, removed, updated);\n                }\n            }\n        }\n        if (isEmptyObject(added) && isEmptyObject(removed) && isEmptyObject(updated)) {\n            return null;\n        }\n        else {\n            return [null, added, removed, updated];\n        }\n    };\n    return SMapMemory;\n}(SMapBaseMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized map.\n *\n * @param V a value type\n */\nvar SMap = /** @class */ (function (_super) {\n    __extends(SMap, _super);\n    function SMap(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return SMap;\n}(SMapBase));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SMapMemory(parent, name, properties, lock, SMap);\n    },\n    getConstructor_: function () {\n        return SMap;\n    },\n    getType_: function () {\n        return 10 /* MAP */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar vlength1 = function (list) {\n    return (list.length >> 1);\n};\nvar vlength2 = function (list) {\n    return list.length;\n};\nvar visEmpty1 = function (list) {\n    return isEmptyArray(list);\n};\nvar visEmpty2 = function (list) {\n    return isEmptyArray(list);\n};\nvar visNotEmpty2 = function (list) {\n    return isNotEmptyArray(list);\n};\nvar toOldIndexToAdd1 = function (newIndex, newMoved) {\n    for (var i = newIndex; 0 <= i; i -= 1) {\n        var oldIndex = toOldIndex1(i, newMoved, false);\n        if (0 <= oldIndex) {\n            return oldIndex + (i === newIndex ? 0 : 1);\n        }\n    }\n    return 0;\n};\nvar toOldIndexToAdd2 = function (newIndex, newMoved) {\n    for (var i = newIndex; 0 <= i; i -= 1) {\n        var oldIndex = toOldIndex2(i, newMoved, false);\n        if (0 <= oldIndex) {\n            return oldIndex + (i === newIndex ? 0 : 1);\n        }\n    }\n    return 0;\n};\nvar countNewIndex1 = function (newIndex, moveds) {\n    var result = 0;\n    for (var i = moveds.length - 2; 0 <= i; i -= 2) {\n        var movedNewIndex = moveds[i];\n        if (newIndex === movedNewIndex) {\n            return -i - 1;\n        }\n        else if (movedNewIndex < newIndex) {\n            result += 1;\n        }\n    }\n    return result;\n};\nvar countNewIndex2 = function (newIndex, moveds) {\n    var result = 0;\n    for (var i = moveds.length - 1; 0 <= i; i -= 1) {\n        var moved = moveds[i];\n        var movedNewIndex = moved.newIndex;\n        if (newIndex === movedNewIndex) {\n            return -i - 1;\n        }\n        else if (movedNewIndex < newIndex) {\n            result += 1;\n        }\n    }\n    return result;\n};\nvar countOldIndex1 = function (oldIndex, moveds) {\n    var result = 0;\n    for (var i = moveds.length - 2; 0 <= i; i -= 2) {\n        var movedOldIndex = moveds[i + 1];\n        if (oldIndex === movedOldIndex) {\n            return -i - 1;\n        }\n        else if (movedOldIndex < oldIndex) {\n            result += 1;\n        }\n    }\n    return result;\n};\nvar countOldIndex2 = function (oldIndex, moveds) {\n    var result = 0;\n    for (var i = moveds.length - 1; 0 <= i; i -= 1) {\n        var moved = moveds[i];\n        var movedOldIndex = moved.oldIndex;\n        if (oldIndex === movedOldIndex) {\n            return -i - 1;\n        }\n        else if (movedOldIndex < oldIndex) {\n            result += 1;\n        }\n    }\n    return result;\n};\nvar toOldIndex1 = function (newIndex, newMoved, allowDirect) {\n    var newCount = countNewIndex1(newIndex, newMoved);\n    if (newCount < 0) {\n        return (allowDirect ? newMoved[-newCount] : newCount);\n    }\n    var newPosition = newIndex - newCount;\n    for (var i = newIndex; 0 <= i; i -= 1) {\n        var oldCount = countOldIndex1(i, newMoved);\n        if (oldCount < 0) {\n            continue;\n        }\n        var oldPosition = i - oldCount;\n        if (oldPosition === newPosition) {\n            return i;\n        }\n        else if (oldPosition < newPosition) {\n            break;\n        }\n        else {\n            continue;\n        }\n    }\n    for (var i = newIndex + 1;; ++i) {\n        var oldCount = countOldIndex1(i, newMoved);\n        if (oldCount < 0) {\n            continue;\n        }\n        var oldPosition = i - oldCount;\n        if (oldPosition === newPosition) {\n            return i;\n        }\n        else if (oldPosition < newPosition) {\n            continue;\n        }\n        else {\n            break;\n        }\n    }\n    return newIndex;\n};\nvar toOldIndex2 = function (newIndex, newMoved, allowDirect) {\n    var newCount = countNewIndex2(newIndex, newMoved);\n    if (newCount < 0) {\n        return (allowDirect ? newMoved[-newCount - 1].oldIndex : newCount);\n    }\n    var newPosition = newIndex - newCount;\n    for (var i = newIndex; 0 <= i; i -= 1) {\n        var oldCount = countOldIndex2(i, newMoved);\n        if (oldCount < 0) {\n            continue;\n        }\n        var oldPosition = i - oldCount;\n        if (oldPosition === newPosition) {\n            return i;\n        }\n        else if (oldPosition < newPosition) {\n            break;\n        }\n        else {\n            continue;\n        }\n    }\n    for (var i = newIndex + 1;; ++i) {\n        var oldCount = countOldIndex2(i, newMoved);\n        if (oldCount < 0) {\n            continue;\n        }\n        var oldPosition = i - oldCount;\n        if (oldPosition === newPosition) {\n            return i;\n        }\n        else if (oldPosition < newPosition) {\n            continue;\n        }\n        else {\n            break;\n        }\n    }\n    return newIndex;\n};\nvar addToNewMoved1 = function (index, size, newMoved) {\n    if (visNotEmpty1(newMoved)) {\n        var newIndex = index;\n        var oldIndex = toOldIndexToAdd1(newIndex, newMoved);\n        for (var i = newMoved.length - 2; 0 <= i; i -= 2) {\n            var moveNewIndex = newMoved[i + 0];\n            var moveOldIndex = newMoved[i + 1];\n            if (newIndex <= moveNewIndex) {\n                newMoved[i + 0] += size;\n            }\n            if (oldIndex <= moveOldIndex) {\n                newMoved[i + 1] += size;\n            }\n        }\n        return oldIndex;\n    }\n    else {\n        return index;\n    }\n};\nvar addToNewMoved2 = function (index, size, newMoved) {\n    if (visNotEmpty2(newMoved)) {\n        var newIndex = index;\n        var oldIndex = toOldIndexToAdd2(newIndex, newMoved);\n        for (var i = newMoved.length - 1; 0 <= i; i -= 1) {\n            var move = newMoved[i];\n            if (newIndex <= move.newIndex) {\n                move.newIndex += size;\n            }\n            if (oldIndex <= move.oldIndex) {\n                move.oldIndex += size;\n            }\n        }\n        return oldIndex;\n    }\n    else {\n        return index;\n    }\n};\nvar removeToNewMoved2 = function (index, newMoved) {\n    if (visNotEmpty2(newMoved)) {\n        var newIndex = index;\n        var oldIndex = toOldIndex2(newIndex, newMoved, true);\n        for (var i = newMoved.length - 1; 0 <= i; i -= 1) {\n            var move = newMoved[i];\n            if (newIndex === move.newIndex) {\n                newMoved.splice(i, 1);\n                continue;\n            }\n            if (newIndex < move.newIndex) {\n                move.newIndex -= 1;\n            }\n            if (oldIndex < move.oldIndex) {\n                move.oldIndex -= 1;\n            }\n        }\n        return oldIndex;\n    }\n    else {\n        return index;\n    }\n};\nvar removeToNewMoved1 = function (index, newMoved) {\n    if (visNotEmpty1(newMoved)) {\n        var newIndex = index;\n        var oldIndex = toOldIndex1(newIndex, newMoved, true);\n        for (var i = newMoved.length - 2; 0 <= i; i -= 2) {\n            var moveNewIndex = newMoved[i + 0];\n            var moveOldIndex = newMoved[i + 1];\n            if (newIndex === moveNewIndex) {\n                newMoved.splice(i, 2);\n                continue;\n            }\n            if (newIndex < moveNewIndex) {\n                newMoved[i + 0] -= 1;\n            }\n            if (oldIndex < moveOldIndex) {\n                newMoved[i + 1] -= 1;\n            }\n        }\n        return oldIndex;\n    }\n    else {\n        return index;\n    }\n};\nvar moveToUpdatedAll = function (oldIndex, newIndex, value, updated) {\n    if (oldIndex <= newIndex) {\n        for (var i = updated.length - 1; 0 <= i; --i) {\n            var update = updated[i];\n            var index = update.index;\n            if (index === oldIndex) {\n                update.index = newIndex;\n                value = update.oldValue;\n            }\n            else if (oldIndex < index && index <= newIndex) {\n                update.index -= 1;\n            }\n        }\n    }\n    else {\n        for (var i = updated.length - 1; 0 <= i; --i) {\n            var update = updated[i];\n            var index = update.index;\n            if (index === oldIndex) {\n                update.index = newIndex;\n                value = update.oldValue;\n            }\n            else if (newIndex <= index && index < oldIndex) {\n                update.index += 1;\n            }\n        }\n    }\n    return value;\n};\nvar moveToUpdated1_ = function (oldIndex, newIndex, updated) {\n    if (oldIndex <= newIndex) {\n        moveKey1(updated, oldIndex + 1, newIndex + 1, -1);\n    }\n    else {\n        moveKey1(updated, newIndex, oldIndex, +1);\n    }\n};\nvar moveToUpdated1 = function (oldIndex, newIndex, updated) {\n    if (visNotEmpty1(updated)) {\n        var index = vindexOf1(updated, oldIndex);\n        if (0 <= index) {\n            var newValue = vremoveByIndex1(updated, index);\n            moveToUpdated1_(oldIndex, newIndex, updated);\n            vput1(updated, newIndex, newValue);\n        }\n        else {\n            moveToUpdated1_(oldIndex, newIndex, updated);\n        }\n    }\n};\nvar moveToNewMoved2 = function (oldIndex, newIndex, value, newMoved) {\n    if (visEmpty2(newMoved)) {\n        newMoved.splice(0, 0, { newIndex: newIndex, oldIndex: oldIndex, value: value });\n    }\n    else {\n        var found = null;\n        var oldOldIndex = toOldIndex2(oldIndex, newMoved, false);\n        if (oldOldIndex < 0) {\n            var foundIndex = -(oldOldIndex + 1);\n            found = newMoved.splice(foundIndex, 1)[0];\n            found.newIndex = newIndex;\n        }\n        else {\n            found = { newIndex: newIndex, oldIndex: oldOldIndex, value: value };\n        }\n        if (oldIndex <= newIndex) {\n            for (var i = vlength2(newMoved) - 1; 0 <= i; i -= 1) {\n                var move = newMoved[i];\n                if (move.newIndex <= oldIndex) {\n                    break;\n                }\n                if (move.newIndex <= newIndex) {\n                    move.newIndex -= 1;\n                }\n            }\n        }\n        else {\n            for (var i = vlength2(newMoved) - 1; 0 <= i; i -= 1) {\n                var move = newMoved[i];\n                if (move.newIndex < newIndex) {\n                    break;\n                }\n                if (move.newIndex < oldIndex) {\n                    move.newIndex += 1;\n                }\n            }\n        }\n        for (var i = vlength2(newMoved) - 1; 0 <= i; i -= 1) {\n            var move = newMoved[i];\n            if (newIndex < move.newIndex) {\n                continue;\n            }\n            newMoved.splice(i + 1, 0, found);\n            return;\n        }\n        newMoved.splice(0, 0, found);\n    }\n};\nvar moveToNewMoved1 = function (oldIndex, newIndex, value, newMoved) {\n    if (visEmpty1(newMoved)) {\n        newMoved.splice(0, 0, newIndex, oldIndex);\n    }\n    else {\n        var found = null;\n        var oldOldIndex = toOldIndex1(oldIndex, newMoved, false);\n        if (oldOldIndex < 0) {\n            var foundIndex = (-(oldOldIndex + 1)) << 1;\n            found = newMoved.splice(foundIndex, 2);\n            found[0] = newIndex;\n        }\n        else {\n            found = [newIndex, oldOldIndex];\n        }\n        if (oldIndex <= newIndex) {\n            for (var i = newMoved.length - 2; 0 <= i; i -= 2) {\n                var moveNewIndex = newMoved[i];\n                if (moveNewIndex <= oldIndex) {\n                    break;\n                }\n                if (moveNewIndex <= newIndex) {\n                    newMoved[i] -= 1;\n                }\n            }\n        }\n        else {\n            for (var i = newMoved.length - 2; 0 <= i; i -= 2) {\n                var moveNewIndex = newMoved[i];\n                if (moveNewIndex < newIndex) {\n                    break;\n                }\n                if (moveNewIndex < oldIndex) {\n                    newMoved[i] += 1;\n                }\n            }\n        }\n        for (var i = newMoved.length - 2; 0 <= i; i -= 2) {\n            var moveNewIndex = newMoved[i];\n            if (newIndex < moveNewIndex) {\n                continue;\n            }\n            newMoved.splice(i + 2, 0, found[0], found[1]);\n            return;\n        }\n        newMoved.splice(0, 0, found[0], found[1]);\n    }\n};\nvar findNewIndex = function (targetCount, sortedOldIndices) {\n    var count = 0;\n    var previous = -1;\n    for (var i = 0, imax = sortedOldIndices.length; i < imax; ++i) {\n        var oldIndex = sortedOldIndices[i];\n        var diff = oldIndex - previous - 1;\n        if (targetCount <= count + diff) {\n            return previous + 1 + (targetCount - count);\n        }\n        else {\n            count += diff;\n            previous = oldIndex;\n        }\n    }\n    return previous + 1 + (targetCount - count);\n};\nvar vindexOf3 = function (array, value) {\n    var i0 = 0;\n    var i1 = (array.length) - 1;\n    while (i0 <= i1) {\n        var i2 = i0 + ((i1 - i0) >> 1);\n        var v2 = array[i2];\n        if (value < v2) {\n            i1 = i2 - 1;\n        }\n        else if (v2 < value) {\n            i0 = i2 + 1;\n        }\n        else {\n            return i2;\n        }\n    }\n    return -1;\n};\nvar findNewIndex1 = function (newIndex, oldIndex, index, sortedOldIndices, moved) {\n    var result = findNewIndex(newIndex - index, sortedOldIndices);\n    for (var i = result;; ++i) {\n        if (vindexOf3(sortedOldIndices, i) < 0) {\n            result = i;\n            break;\n        }\n    }\n    for (var i = 0, imax = moved.length; i < imax; i += 2) {\n        var otherNewIndex = moved[i + 0];\n        var otherOldIndex = moved[i + 1];\n        if (otherNewIndex <= otherOldIndex) {\n            if (otherNewIndex <= result && result < otherOldIndex) {\n                result += 1;\n            }\n        }\n        else {\n            if (otherOldIndex < result && result <= otherNewIndex) {\n                result -= 1;\n            }\n        }\n    }\n    if (oldIndex < result) {\n        result -= 1;\n    }\n    return result;\n};\nvar findNewIndex2 = function (newIndex, oldIndex, index, sortedOldIndices, moved) {\n    var result = findNewIndex(newIndex - index, sortedOldIndices);\n    for (var i = result;; ++i) {\n        if (vindexOf3(sortedOldIndices, i) < 0) {\n            result = i;\n            break;\n        }\n    }\n    for (var i = 0, imax = moved.length; i < imax; ++i) {\n        var move = moved[i];\n        var otherNewIndex = move.newIndex;\n        var otherOldIndex = move.oldIndex;\n        if (otherNewIndex <= otherOldIndex) {\n            if (otherNewIndex <= result && result < otherOldIndex) {\n                result += 1;\n            }\n        }\n        else {\n            if (otherOldIndex < result && result <= otherNewIndex) {\n                result -= 1;\n            }\n        }\n    }\n    if (oldIndex < result) {\n        result -= 1;\n    }\n    return result;\n};\nvar findOldIndex1 = function (targetOldIndex, moved) {\n    var result = targetOldIndex;\n    for (var i = 0, imax = moved.length; i < imax; i += 2) {\n        var newIndex = moved[i + 0];\n        var oldIndex = moved[i + 1];\n        if (newIndex <= oldIndex) {\n            if (newIndex <= result && result < oldIndex) {\n                result += 1;\n            }\n        }\n        else {\n            if (oldIndex < result && result <= newIndex) {\n                result -= 1;\n            }\n        }\n    }\n    return result;\n};\nvar findOldIndex2 = function (targetOldIndex, moved) {\n    var result = targetOldIndex;\n    for (var i = 0, imax = moved.length; i < imax; ++i) {\n        var move = moved[i];\n        var newIndex = move.newIndex;\n        var oldIndex = move.oldIndex;\n        if (newIndex <= oldIndex) {\n            if (newIndex <= result && result < oldIndex) {\n                result += 1;\n            }\n        }\n        else {\n            if (oldIndex < result && result <= newIndex) {\n                result -= 1;\n            }\n        }\n    }\n    return result;\n};\nvar oldIndexComparator = function (a, b) {\n    return a - b;\n};\nvar toMoved1 = function (newMoved) {\n    if (vlength1(newMoved) <= 1) {\n        return newMoved;\n    }\n    var result = [];\n    var sortedOldIndices = [];\n    for (var i = 0, imax = newMoved.length; i < imax; i += 2) {\n        sortedOldIndices.push(newMoved[i + 1]);\n    }\n    sortedOldIndices.sort(oldIndexComparator);\n    for (var i = 0, imax = newMoved.length; i < imax; i += 2) {\n        var oldIndex = findOldIndex1(newMoved[i + 1], result);\n        var newIndex = findNewIndex1(newMoved[i + 0], oldIndex, (i >> 1), sortedOldIndices, result);\n        if (newIndex !== oldIndex) {\n            result.push(newIndex, oldIndex);\n        }\n    }\n    return result;\n};\nvar toMoved2 = function (newMoved) {\n    if (vlength2(newMoved) <= 1) {\n        return newMoved;\n    }\n    var result = [];\n    var sortedOldIndices = [];\n    for (var i = 0, imax = newMoved.length; i < imax; ++i) {\n        sortedOldIndices.push(newMoved[i].oldIndex);\n    }\n    sortedOldIndices.sort(oldIndexComparator);\n    for (var i = 0, imax = newMoved.length; i < imax; ++i) {\n        var newMove = newMoved[i];\n        var oldIndex = findOldIndex2(newMove.oldIndex, result);\n        var newIndex = findNewIndex2(newMove.newIndex, oldIndex, i, sortedOldIndices, result);\n        if (newIndex !== oldIndex) {\n            result.push({ newIndex: newIndex, oldIndex: oldIndex, value: newMove.value });\n        }\n    }\n    return result;\n};\nvar oldMovedComparator = function (a, b) {\n    return a.oldIndex - b.oldIndex;\n};\nvar makeOldMoved = function (newMoved) {\n    return newMoved.slice(0).sort(oldMovedComparator);\n};\nvar SMovableListPatchMaps = /** @class */ (function () {\n    function SMovableListPatchMaps() {\n    }\n    SMovableListPatchMaps.add = function (index, value, padded, pupdated, pnewMoved) {\n        addToUpdated1(index, 1, pupdated);\n        index = addToNewMoved1(index, 1, pnewMoved);\n        addToAdded1(index, value, padded);\n    };\n    SMovableListPatchMaps.addAll = function (index, values, padded, pupdated, pnewMoved) {\n        if (values != null && isNotEmptyArray(values)) {\n            addToUpdated1(index, values.length, pupdated);\n            index = addToNewMoved1(index, values.length, pnewMoved);\n            addAllToAdded1(index, values, padded);\n        }\n    };\n    SMovableListPatchMaps.remove = function (index, padded, premoved, pupdated, pnewMoved) {\n        removeToUpdated1(index, pupdated);\n        index = removeToNewMoved1(index, pnewMoved);\n        removeToAddedToRemoved1(index, padded, premoved);\n    };\n    SMovableListPatchMaps.set = function (index, value, pupdated) {\n        updateToUpdated1(index, value, pupdated);\n    };\n    SMovableListPatchMaps.move = function (oldIndex, newIndex, pupdated, pnewMoved) {\n        moveToUpdated1(oldIndex, newIndex, pupdated);\n        moveToNewMoved1(oldIndex, newIndex, null, pnewMoved);\n    };\n    SMovableListPatchMaps.merge = function (cadded, cremoved, cupdated, cmoved, padded, premoved, pupdated, pmoved) {\n        // Operation order is as follows:\n        //   Previous Removed\n        //   Previous Added\n        //   Previous moved\n        //   Previous updated\n        //   Current removed\n        //   Current added\n        //   Current moved\n        //   Current updated\n        // Remove\n        for (var i = cremoved.length - 1; 0 <= i; --i) {\n            var cr = cremoved[i];\n            var value = removeToUpdatedAll(cr.index, cr.value, pupdated);\n            var index = removeToNewMoved2(cr.index, pmoved);\n            removeToAddedToRemoved2(index, value, padded, premoved);\n        }\n        // Add\n        for (var i = 0, imax = cadded.length; i < imax; ++i) {\n            var ca = cadded[i];\n            addToUpdatedAll(ca.index, 1, pupdated);\n            var index = addToNewMoved2(ca.index, 1, pmoved);\n            addToAdded2(index, ca.value, padded);\n        }\n        // New move\n        var moved = toMoved2(cmoved);\n        for (var i = 0, imax = moved.length; i < imax; ++i) {\n            var move = moved[i];\n            var newIndex = move.newIndex;\n            var oldIndex = move.oldIndex;\n            var value = moveToUpdatedAll(oldIndex, newIndex, move.value, pupdated);\n            moveToNewMoved2(oldIndex, newIndex, value, pmoved);\n        }\n        // Update\n        for (var i = 0, imax = cupdated.length; i < imax; ++i) {\n            pupdated.push(cupdated[i]);\n        }\n    };\n    SMovableListPatchMaps.patch = function (cadded, cremoved, cupdated, cmoved, list, padded, premoved, pupdated, pmoved) {\n        // Remove\n        for (var i = cremoved.length - 1; 0 <= i; --i) {\n            var index = cremoved[i];\n            var value = list.splice(index, 1)[0];\n            value = removeToUpdatedAll(index, value, pupdated);\n            index = removeToNewMoved2(index, pmoved);\n            removeToAddedToRemoved2(index, value, padded, premoved);\n        }\n        // Add\n        for (var i = 0, imax = cadded.length; i < imax; i += 2) {\n            var index = cadded[i + 0];\n            var value = cadded[i + 1];\n            list.splice(index, 0, value);\n            addToUpdatedAll(index, 1, pupdated);\n            index = addToNewMoved2(index, 1, pmoved);\n            addToAdded2(index, value, padded);\n        }\n        // New move\n        var moved = toMoved1(cmoved);\n        for (var i = 0, imax = moved.length; i < imax; i += 2) {\n            var newIndex = moved[i + 0];\n            var oldIndex = moved[i + 1];\n            var value = list.splice(oldIndex, 1)[0];\n            list.splice(newIndex, 0, value);\n            value = moveToUpdatedAll(oldIndex, newIndex, value, pupdated);\n            moveToNewMoved2(oldIndex, newIndex, value, pmoved);\n        }\n        // Update\n        for (var i = 0, imax = cupdated.length; i < imax; i += 2) {\n            var index = cupdated[i + 0];\n            var newValue = cupdated[i + 1];\n            var oldValue = list[index];\n            list[index] = newValue;\n            pupdated.push({ index: index, newValue: newValue, oldValue: oldValue });\n        }\n    };\n    return SMovableListPatchMaps;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SMovableListPatchMap = /** @class */ (function (_super) {\n    __extends(SMovableListPatchMap, _super);\n    function SMovableListPatchMap() {\n        var _this = _super !== null && _super.apply(this, arguments) || this;\n        _this._newMoved = [];\n        return _this;\n    }\n    SMovableListPatchMap.prototype.add_ = function (index, value) {\n        SMovableListPatchMaps.add(index, value, this._added, this._updated, this._newMoved);\n    };\n    SMovableListPatchMap.prototype.addAll_ = function (index, values) {\n        SMovableListPatchMaps.addAll(index, values, this._added, this._updated, this._newMoved);\n    };\n    SMovableListPatchMap.prototype.remove_ = function (index) {\n        SMovableListPatchMaps.remove(index, this._added, this._removed, this._updated, this._newMoved);\n    };\n    SMovableListPatchMap.prototype.set_ = function (index, value) {\n        SMovableListPatchMaps.set(index, value, this._updated);\n    };\n    SMovableListPatchMap.prototype.move_ = function (oldIndex, newIndex) {\n        SMovableListPatchMaps.move(oldIndex, newIndex, this._updated, this._newMoved);\n    };\n    SMovableListPatchMap.prototype.serialize_ = function (result) {\n        result.push(this._added, this._removed, this._updated, this._newMoved);\n    };\n    return SMovableListPatchMap;\n}(SListBasePatchMap));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SMovableListPatchReset = /** @class */ (function (_super) {\n    __extends(SMovableListPatchReset, _super);\n    function SMovableListPatchReset() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    SMovableListPatchReset.prototype.move_ = function () {\n        // DO NOTHING\n    };\n    return SMovableListPatchReset;\n}(SListBasePatchReset));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SMOVABLELIST_PATCH_RESET_INSTANCE = new SMovableListPatchReset();\nvar SMOVABLELIST_PATCH_MAP_DUMMY = new SMovableListPatchMap();\nvar SMovableListPatches = /** @class */ (function (_super) {\n    __extends(SMovableListPatches, _super);\n    function SMovableListPatches() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    SMovableListPatches.prototype.newPatchMap_ = function () {\n        return new SMovableListPatchMap();\n    };\n    SMovableListPatches.prototype.newPatchReset_ = function () {\n        return SMOVABLELIST_PATCH_RESET_INSTANCE;\n    };\n    SMovableListPatches.prototype.getPatchMapDummy_ = function () {\n        return SMOVABLELIST_PATCH_MAP_DUMMY;\n    };\n    SMovableListPatches.prototype.move_ = function (revision, oldIndex, newIndex) {\n        this.getOrCreate_(revision).move_(oldIndex, newIndex);\n    };\n    return SMovableListPatches;\n}(SListBasePatches));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SMovableListMemory = /** @class */ (function (_super) {\n    __extends(SMovableListMemory, _super);\n    function SMovableListMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, new SMovableListPatches(properties)) || this;\n    }\n    SMovableListMemory.prototype.onMove_ = function (oldIndex, newIndex) {\n        this._patches.move_(this.getRevision_(), oldIndex, newIndex);\n        this.toUpdated_();\n    };\n    SMovableListMemory.prototype.toEventData_ = function (added, removed, updated, newMoved, oldMoved) {\n        return [\n            null,\n            added || [],\n            removed || [],\n            updated || [],\n            newMoved || [],\n            oldMoved || []\n        ];\n    };\n    SMovableListMemory.prototype.mergeEvents_ = function (current, previous, isFirst) {\n        SMovableListPatchMaps.merge(current[1], current[2], current[3], current[4], previous[1], previous[2], previous[3], previous[4]);\n    };\n    SMovableListMemory.prototype.onMergedEvent_ = function (mergedEvent) {\n        mergedEvent[3] = mergeAndSortUpdated(mergedEvent[3]);\n        mergedEvent[5] = makeOldMoved(mergedEvent[4]);\n    };\n    SMovableListMemory.prototype.patch_ = function (patches) {\n        var revision = this.getRevision_();\n        var list = this._values;\n        var added = [];\n        var removed = [];\n        var updated = [];\n        var newMoved = [];\n        var type = patches[2];\n        if (type === 0) {\n            this.patchReset_(patches[3], list, added, removed, updated);\n        }\n        else {\n            var startRevision = patches[0];\n            var ceilingRevision = Math.max(revision - startRevision, 0);\n            for (var i = 3, imax = patches.length; i < imax; i += 5) {\n                if (ceilingRevision <= patches[i + 0]) {\n                    SMovableListPatchMaps.patch(patches[i + 1], patches[i + 2], patches[i + 3], patches[i + 4], list, added, removed, updated, newMoved);\n                }\n            }\n            if (8 < patches.length) {\n                updated = mergeAndSortUpdated(updated);\n            }\n        }\n        if (isEmptyArray(added) && isEmptyArray(removed) && isEmptyArray(updated) && isEmptyArray(newMoved)) {\n            return null;\n        }\n        else {\n            var oldMoved = makeOldMoved(newMoved);\n            return [null, added, removed, updated, newMoved, oldMoved];\n        }\n    };\n    SMovableListMemory.prototype.move_ = function (oldIndex, newIndex) {\n        this.lock_();\n        try {\n            this.move__(oldIndex, newIndex);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SMovableListMemory.prototype.move__ = function (oldIndex, newIndex) {\n        var values = this._values;\n        checkRange(oldIndex, 0, values.length);\n        checkRange(newIndex, 0, values.length);\n        if (oldIndex !== newIndex) {\n            var value = values.splice(oldIndex, 1)[0];\n            values.splice(newIndex, 0, value);\n            this.onMove_(oldIndex, newIndex);\n            this.getAndIncrementRevision_();\n            var moved = [{ newIndex: newIndex, oldIndex: oldIndex, value: value }];\n            this.pushChangeEvent_(null, this.toEventData_(null, null, null, moved, moved));\n        }\n    };\n    return SMovableListMemory;\n}(SListBaseMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized movable list.\n *\n * @param V a value type\n */\nvar SMovableList = /** @class */ (function (_super) {\n    __extends(SMovableList, _super);\n    function SMovableList(memory) {\n        return _super.call(this, memory) || this;\n    }\n    /**\n     * Moves the element at the index `oldIndex` to the index `newIndex`.\n     *\n     * @param oldIndex index of the element to be moved\n     * @param newIndex index where the element is moved to\n     * @throws Error if the one of the indices is out of range (index < 0 || size() <= index)\n     * @returns this\n     */\n    SMovableList.prototype.move = function (oldIndex, newIndex) {\n        this.__mem__.move_(oldIndex, newIndex);\n        return this;\n    };\n    return SMovableList;\n}(SListBase));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SMovableListMemory(parent, name, properties, lock, SMovableList);\n    },\n    getConstructor_: function () {\n        return SMovableList;\n    },\n    getType_: function () {\n        return 15 /* MOVABLE_LIST */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar sortedIndex = function (target, value) {\n    var i0 = 0;\n    var i1 = target.length - 1;\n    while (i0 <= i1) {\n        var i2 = i0 + ((i1 - i0) >> 1);\n        var v2 = target[i2];\n        if (value < v2) {\n            i1 = i2 - 1;\n        }\n        else if (v2 < value) {\n            i0 = i2 + 1;\n        }\n        else {\n            return i2;\n        }\n    }\n    return Math.max(i0, i1);\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Thrown to indicate that there are no element.\n *\n *     throw NoSuchElementException.create();\n *\n * Must use `isInstance` static method instead of the `instanceof` to check\n * whether an error is an instance of this class.\n * This limitation comes from the fact that the custom exceptions inheriting\n * from the Error class are not printed well in the console.\n *\n *     const e = NoSuchElementException.create();\n *\n *     console.log( e instanceof NoSuchElementException ); // => false\n *     console.log( NoSuchElementException.isInstance( e ) ); // => true\n */\nvar NoSuchElementException = /** @class */ (function (_super) {\n    __extends(NoSuchElementException, _super);\n    function NoSuchElementException() {\n        return _super.call(this) || this;\n    }\n    NoSuchElementException.getId = function () {\n        return \"NoSuchElementException\";\n    };\n    NoSuchElementException.getMessage = function () {\n        return \"no such element\";\n    };\n    return NoSuchElementException;\n}(Exception));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar checkNoSuchElement = function (expectTrue) {\n    if (!expectTrue) {\n        throw NoSuchElementException.create();\n    }\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Thrown to indicate that a method has been invoked with an illegal argument.\n *\n *     throw IllegalArgumentException.create();\n *\n * Must use `isInstance` static method instead of the `instanceof` to check\n * whether an error is an instance of this class.\n * This limitation comes from the fact that the custom exceptions inheriting\n * from the Error class are not printed well in the console.\n *\n *     const e = IllegalArgumentException.create();\n *\n *     console.log( e instanceof IllegalArgumentException ); // => false\n *     console.log( IllegalArgumentException.isInstance( e ) ); // => true\n */\nvar IllegalArgumentException = /** @class */ (function (_super) {\n    __extends(IllegalArgumentException, _super);\n    function IllegalArgumentException() {\n        return _super.call(this) || this;\n    }\n    IllegalArgumentException.getId = function () {\n        return \"IllegalArgumentException\";\n    };\n    IllegalArgumentException.getMessage = function () {\n        return \"illegal argument\";\n    };\n    return IllegalArgumentException;\n}(Exception));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar checkArgument = function (expectTrue) {\n    if (!expectTrue) {\n        throw IllegalArgumentException.create();\n    }\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar checkSubMapRange = function (fromKey, toKey) {\n    if (fromKey != null && toKey != null) {\n        checkArgument(fromKey <= toKey);\n    }\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SNavigableMapPatchMap = /** @class */ (function (_super) {\n    __extends(SNavigableMapPatchMap, _super);\n    function SNavigableMapPatchMap() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    return SNavigableMapPatchMap;\n}(SMapBasePatchMap));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SNavigableMapPatchReset = /** @class */ (function (_super) {\n    __extends(SNavigableMapPatchReset, _super);\n    function SNavigableMapPatchReset() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    return SNavigableMapPatchReset;\n}(SMapBasePatchReset));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SNAVIGABLEMAP_PATCH_RESET_INSTANCE = new SNavigableMapPatchReset();\nvar SNAVIGABLEMAP_PATCH_MAP_DUMMY = new SNavigableMapPatchMap();\nvar SNavigableMapPatches = /** @class */ (function (_super) {\n    __extends(SNavigableMapPatches, _super);\n    function SNavigableMapPatches() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    SNavigableMapPatches.prototype.newPatchMap_ = function () {\n        return new SNavigableMapPatchMap();\n    };\n    SNavigableMapPatches.prototype.newPatchReset_ = function () {\n        return SNAVIGABLEMAP_PATCH_RESET_INSTANCE;\n    };\n    SNavigableMapPatches.prototype.getPatchMapDummy_ = function () {\n        return SNAVIGABLEMAP_PATCH_MAP_DUMMY;\n    };\n    return SNavigableMapPatches;\n}(SMapBasePatches));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar ViewMemory = /** @class */ (function () {\n    function ViewMemory(target, wrapperConstructor) {\n        this._target = target;\n        this._wrapper = new wrapperConstructor(this);\n    }\n    ViewMemory.prototype.getTarget_ = function () {\n        return this._target;\n    };\n    ViewMemory.prototype.getWrapper_ = function () {\n        return this._wrapper;\n    };\n    ViewMemory.prototype.isReadOnly_ = function () {\n        return this._target.isReadOnly_();\n    };\n    ViewMemory.prototype.isNonNull_ = function () {\n        return this._target.isNonNull_();\n    };\n    ViewMemory.prototype.isInitialized_ = function () {\n        return this._target.isInitialized_();\n    };\n    ViewMemory.prototype.lock_ = function () {\n        return this._target.lock_();\n    };\n    ViewMemory.prototype.isLocked_ = function () {\n        return this._target.isLocked_();\n    };\n    ViewMemory.prototype.unlock_ = function () {\n        return this._target.unlock_();\n    };\n    return ViewMemory;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar compare = function (a, b) {\n    if (a < b) {\n        return -1;\n    }\n    else if (a === b) {\n        return 0;\n    }\n    else {\n        return +1;\n    }\n};\nvar SNavigableMapSubMapMemory = /** @class */ (function (_super) {\n    __extends(SNavigableMapSubMapMemory, _super);\n    function SNavigableMapSubMapMemory(target, wrapperConstructor, fromKey, includeFrom, toKey, includeTo, reverse) {\n        var _this = _super.call(this, target, wrapperConstructor) || this;\n        _this._fromKey = fromKey;\n        _this._includeFrom = includeFrom;\n        _this._toKey = toKey;\n        _this._includeTo = includeTo;\n        _this._reverse = reverse;\n        _this._wrapperConstructor = wrapperConstructor;\n        // Init/Value/Change event handling\n        var wrapper = _this.getWrapper_();\n        var targetWrapper = target.getWrapper_();\n        var onInitBound = function (e, mappings) {\n            wrapper.triggerDirect(EVENT_INIT, null, [null, _this.toMapping_(mappings)], null);\n        };\n        var onValueBound = function (e, added, removed) {\n            wrapper.triggerDirect(EVENT_VALUE, null, [null, _this.toMapping_(added), _this.toMapping_(removed)], null);\n        };\n        var onChangeBound = function (e, added, removed) {\n            wrapper.triggerDirect(EVENT_CHANGE, null, [null, _this.toMapping_(added), _this.toMapping_(removed)], null);\n        };\n        wrapper.onon(EVENT_INIT, function (connection, isFirst) {\n            if (isFirst) {\n                targetWrapper.on(EVENT_INIT, onInitBound);\n            }\n            else if (_this.isInitialized_()) {\n                connection.triggerDirect(_this, null, [null, _this.toObject_()]);\n            }\n        });\n        wrapper.onon(EVENT_VALUE, function (connection, isFirst) {\n            if (isFirst) {\n                targetWrapper.on(EVENT_VALUE, onValueBound);\n            }\n            else if (_this.isInitialized_()) {\n                connection.triggerDirect(_this, null, [null, _this.toObject_(), {}]);\n            }\n        });\n        wrapper.onon(EVENT_CHANGE, function (connection, isFirst) {\n            if (isFirst) {\n                targetWrapper.on(EVENT_CHANGE, onChangeBound);\n            }\n        });\n        wrapper.onoff(EVENT_INIT, function (connection, isLast) {\n            if (isLast) {\n                targetWrapper.off(EVENT_INIT, onInitBound);\n            }\n        });\n        wrapper.onoff(EVENT_VALUE, function (connection, isLast) {\n            if (isLast) {\n                targetWrapper.off(EVENT_VALUE, onValueBound);\n            }\n        });\n        wrapper.onoff(EVENT_CHANGE, function (connection, isLast) {\n            if (isLast) {\n                targetWrapper.off(EVENT_CHANGE, onChangeBound);\n            }\n        });\n        return _this;\n    }\n    SNavigableMapSubMapMemory.prototype.tooLow_ = function (key, include) {\n        if (this._fromKey != null) {\n            if (key != null) {\n                var c = compare(key, this._fromKey);\n                if (c < 0 || (include && this._includeFrom !== true && c === 0)) {\n                    return true;\n                }\n            }\n            else {\n                return true;\n            }\n        }\n        return false;\n    };\n    SNavigableMapSubMapMemory.prototype.tooHigh_ = function (key, include) {\n        if (this._toKey != null) {\n            if (key != null) {\n                var c = compare(key, this._toKey);\n                if (0 < c || (include && this._includeTo !== true && c === 0)) {\n                    return true;\n                }\n            }\n            else {\n                return true;\n            }\n        }\n        return false;\n    };\n    SNavigableMapSubMapMemory.prototype.inRange_ = function (key, include) {\n        return !this.tooLow_(key, include) && !this.tooHigh_(key, include);\n    };\n    SNavigableMapSubMapMemory.prototype.checkKeyArgument_ = function (key, include) {\n        checkArgument(this.inRange_(key, include));\n    };\n    SNavigableMapSubMapMemory.prototype.checkKeyArguments_ = function (mappings) {\n        for (var key in mappings) {\n            if (hasOwn(mappings, key)) {\n                this.checkKeyArgument_(key, true);\n            }\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.findFromIndex_ = function () {\n        var keys = this._target.getKeys_();\n        var key = this._fromKey;\n        if (key == null) {\n            return 0;\n        }\n        else {\n            if (this._includeFrom === true) {\n                return sortedIndex(keys, key);\n            }\n            else {\n                var index = sortedIndex(keys, key);\n                for (var i = index, imax = keys.length; i < imax; ++i) {\n                    if (keys[i] !== key) {\n                        return i;\n                    }\n                }\n                return keys.length;\n            }\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.findToIndex_ = function () {\n        var keys = this._target.getKeys_();\n        var key = this._toKey;\n        if (key == null) {\n            return keys.length;\n        }\n        else {\n            if (this._includeTo !== true) {\n                return sortedIndex(keys, key);\n            }\n            else {\n                var index = sortedIndex(keys, key);\n                for (var i = index, imax = keys.length; i < imax; ++i) {\n                    if (keys[i] !== key) {\n                        return i;\n                    }\n                }\n                return keys.length;\n            }\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.toMapping_ = function (mapping) {\n        var result = {};\n        for (var key in mapping) {\n            if (hasOwn(mapping, key) && this.inRange_(key, true)) {\n                result[key] = mapping[key];\n            }\n        }\n        return result;\n    };\n    SNavigableMapSubMapMemory.prototype.size_ = function () {\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        return toIndex - fromIndex;\n    };\n    SNavigableMapSubMapMemory.prototype.isEmpty_ = function () {\n        return this.size_() <= 0;\n    };\n    SNavigableMapSubMapMemory.prototype.containsKey_ = function (key) {\n        if (this.inRange_(key, true)) {\n            return (key in this._target.getValues_());\n        }\n        else {\n            return false;\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.containsValue_ = function (value, comparator, thisArg) {\n        var target = this._target;\n        var values = target.getValues_();\n        var keys = target.getKeys_();\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        for (var i = fromIndex; i < toIndex; ++i) {\n            var key = keys[i];\n            if (comparator.call(thisArg, values[key], value)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    SNavigableMapSubMapMemory.prototype.each_ = function (iteratee, thisArg, reverse) {\n        var target = this._target;\n        var values = target.getValues_();\n        var keys = target.getKeys_();\n        var wrapper = this._wrapper;\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        if (reverse ? !this._reverse : this._reverse) {\n            for (var i = toIndex - 1; fromIndex <= i; --i) {\n                var key = keys[i];\n                if (iteratee.call(thisArg, values[key], key, wrapper) === false) {\n                    return;\n                }\n            }\n        }\n        else {\n            for (var i = fromIndex; i < toIndex; ++i) {\n                var key = keys[i];\n                if (iteratee.call(thisArg, values[key], key, wrapper) === false) {\n                    return;\n                }\n            }\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.get_ = function (key) {\n        if (this.inRange_(key, true)) {\n            var values = this._target.getValues_();\n            if (key in values) {\n                return values[key];\n            }\n            else {\n                return null;\n            }\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.filter_ = function (iteratee, thisArg) {\n        var target = this._target;\n        checkSupported(target);\n        target.lock_();\n        try {\n            var isChanged = false;\n            var values = target.getValues_();\n            var keys = target.getKeys_();\n            var wrapper = this._wrapper;\n            var fromIndex = this.findFromIndex_();\n            var toIndex = this.findToIndex_();\n            var removed = {};\n            var removedIndices = [];\n            if (this._reverse) {\n                for (var i = toIndex - 1; fromIndex <= i; --i) {\n                    var key = keys[i];\n                    var value = values[key];\n                    if (iteratee.call(thisArg, value, key, wrapper) === true) {\n                        continue;\n                    }\n                    removed[key] = value;\n                    removedIndices.push(i);\n                    isChanged = true;\n                }\n            }\n            else {\n                for (var i = fromIndex; i < toIndex; ++i) {\n                    var key = keys[i];\n                    var value = values[key];\n                    if (iteratee.call(thisArg, value, key, wrapper) === true) {\n                        continue;\n                    }\n                    removed[key] = value;\n                    removedIndices.push(i);\n                    isChanged = true;\n                }\n            }\n            if (isChanged) {\n                var eventData = target.toEventData_(null, removed, null);\n                for (var i = removedIndices.length - 1; 0 <= i; --i) {\n                    var index = removedIndices[i];\n                    var key = keys.splice(index, 1)[0];\n                    delete values[key];\n                }\n                target.onRemoveAll_(removed);\n                target.getAndIncrementRevision_();\n                target.pushChangeEvent_(eventData[1], eventData);\n            }\n        }\n        finally {\n            target.unlock_();\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.find_ = function (predicate, thisArg, reverse) {\n        var target = this._target;\n        var values = target.getValues_();\n        var keys = target.getKeys_();\n        var wrapper = this._wrapper;\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        if (reverse ? !this._reverse : this._reverse) {\n            for (var i = toIndex - 1; fromIndex <= i; --i) {\n                var key = keys[i];\n                if (predicate.call(thisArg, values[key], key, wrapper) === true) {\n                    return values[key];\n                }\n            }\n        }\n        else {\n            for (var i = fromIndex; i < toIndex; ++i) {\n                var key = keys[i];\n                if (predicate.call(thisArg, values[key], key, wrapper) === true) {\n                    return values[key];\n                }\n            }\n        }\n        return null;\n    };\n    SNavigableMapSubMapMemory.prototype.values_ = function () {\n        var target = this._target;\n        var result = [];\n        var values = target.getValues_();\n        var keys = target.getKeys_();\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        if (this._reverse) {\n            for (var i = toIndex - 1; fromIndex <= i; --i) {\n                var key = keys[i];\n                result.push(values[key]);\n            }\n        }\n        else {\n            for (var i = fromIndex; i < toIndex; ++i) {\n                var key = keys[i];\n                result.push(values[key]);\n            }\n        }\n        return result;\n    };\n    SNavigableMapSubMapMemory.prototype.firstKey_ = function () {\n        return (this._reverse ? this.lastKey__() : this.firstKey__());\n    };\n    SNavigableMapSubMapMemory.prototype.lastKey_ = function () {\n        return (this._reverse ? this.firstKey__() : this.lastKey__());\n    };\n    SNavigableMapSubMapMemory.prototype.firstEntry_ = function () {\n        return (this._reverse ? this.lastEntry__() : this.firstEntry__());\n    };\n    SNavigableMapSubMapMemory.prototype.lastEntry_ = function () {\n        return (this._reverse ? this.firstEntry__() : this.lastEntry__());\n    };\n    SNavigableMapSubMapMemory.prototype.floorEntry_ = function (key) {\n        return (this._reverse ? this.ceilingEntry__(key) : this.floorEntry__(key));\n    };\n    SNavigableMapSubMapMemory.prototype.ceilingEntry_ = function (key) {\n        return (this._reverse ? this.floorEntry__(key) : this.ceilingEntry__(key));\n    };\n    SNavigableMapSubMapMemory.prototype.floorKey_ = function (key) {\n        return (this._reverse ? this.ceilingKey__(key) : this.floorKey__(key));\n    };\n    SNavigableMapSubMapMemory.prototype.ceilingKey_ = function (key) {\n        return (this._reverse ? this.floorKey__(key) : this.ceilingKey__(key));\n    };\n    SNavigableMapSubMapMemory.prototype.lowerEntry_ = function (key) {\n        return (this._reverse ? this.higherEntry__(key) : this.lowerEntry__(key));\n    };\n    SNavigableMapSubMapMemory.prototype.higherEntry_ = function (key) {\n        return (this._reverse ? this.lowerEntry__(key) : this.higherEntry__(key));\n    };\n    SNavigableMapSubMapMemory.prototype.lowerKey_ = function (key) {\n        return (this._reverse ? this.higherKey__(key) : this.lowerKey__(key));\n    };\n    SNavigableMapSubMapMemory.prototype.higherKey_ = function (key) {\n        return (this._reverse ? this.lowerKey__(key) : this.higherKey__(key));\n    };\n    SNavigableMapSubMapMemory.prototype.firstKey__ = function () {\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        checkNoSuchElement(fromIndex < toIndex);\n        return this._target.getKeys_()[fromIndex];\n    };\n    SNavigableMapSubMapMemory.prototype.lastKey__ = function () {\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        checkNoSuchElement(fromIndex < toIndex);\n        return this._target.getKeys_()[toIndex - 1];\n    };\n    SNavigableMapSubMapMemory.prototype.firstEntry__ = function () {\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        var target = this._target;\n        var keys = target.getKeys_();\n        var values = target.getValues_();\n        if (fromIndex < toIndex) {\n            var key = keys[fromIndex];\n            var value = values[key];\n            return new SMapEntry(key, value);\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.lastEntry__ = function () {\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        var target = this._target;\n        var keys = target.getKeys_();\n        var values = target.getValues_();\n        if (fromIndex < toIndex) {\n            var key = keys[toIndex - 1];\n            var value = values[key];\n            return new SMapEntry(key, value);\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.floorEntry__ = function (key) {\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        var target = this._target;\n        var keys = target.getKeys_();\n        var values = target.getValues_();\n        var index = sortedIndex(keys, key);\n        if (fromIndex <= index && index < toIndex) {\n            var fkey = keys[index];\n            if (fkey <= key) {\n                var value = values[fkey];\n                return new SMapEntry(fkey, value);\n            }\n            else if (fromIndex <= index - 1) {\n                fkey = keys[index - 1];\n                var value = values[fkey];\n                return new SMapEntry(fkey, value);\n            }\n            else {\n                return null;\n            }\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.ceilingEntry__ = function (key) {\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        var target = this._target;\n        var keys = target.getKeys_();\n        var values = target.getValues_();\n        var index = sortedIndex(keys, key);\n        if (fromIndex <= index && index < toIndex) {\n            var fkey = keys[index];\n            var value = values[fkey];\n            return new SMapEntry(fkey, value);\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.floorKey__ = function (key) {\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        var target = this._target;\n        var keys = target.getKeys_();\n        var index = sortedIndex(keys, key);\n        if (fromIndex <= index && index < toIndex) {\n            var fkey = keys[index];\n            if (fkey <= key) {\n                return fkey;\n            }\n            else if (fromIndex <= index - 1) {\n                return keys[index - 1];\n            }\n            else {\n                return null;\n            }\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.ceilingKey__ = function (key) {\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        var target = this._target;\n        var keys = target.getKeys_();\n        var index = sortedIndex(keys, key);\n        if (fromIndex <= index && index < toIndex) {\n            var fkey = keys[index];\n            return fkey;\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.lowerEntry__ = function (key) {\n        var fromIndex = this.findFromIndex_();\n        var target = this._target;\n        var keys = target.getKeys_();\n        var values = target.getValues_();\n        var index = sortedIndex(keys, key);\n        if (fromIndex <= index - 1) {\n            var fkey = keys[index - 1];\n            var value = values[fkey];\n            return new SMapEntry(fkey, value);\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.higherEntry__ = function (key) {\n        var toIndex = this.findToIndex_();\n        var target = this._target;\n        var keys = target.getKeys_();\n        var values = target.getValues_();\n        var index = sortedIndex(keys, key);\n        if (index < toIndex) {\n            var fkey = keys[index];\n            if (key < fkey) {\n                var value = values[fkey];\n                return new SMapEntry(fkey, value);\n            }\n            else if (index + 1 < toIndex) {\n                fkey = keys[index + 1];\n                var value = values[fkey];\n                return new SMapEntry(fkey, value);\n            }\n            else {\n                return null;\n            }\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.lowerKey__ = function (key) {\n        var fromIndex = this.findFromIndex_();\n        var target = this._target;\n        var keys = target.getKeys_();\n        var index = sortedIndex(keys, key);\n        if (fromIndex <= index - 1) {\n            return keys[index - 1];\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.higherKey__ = function (key) {\n        var toIndex = this.findToIndex_();\n        var target = this._target;\n        var keys = target.getKeys_();\n        var index = sortedIndex(keys, key);\n        if (index < toIndex) {\n            var fkey = keys[index];\n            if (key < fkey) {\n                return fkey;\n            }\n            else if (index + 1 < toIndex) {\n                return keys[index + 1];\n            }\n            else {\n                return null;\n            }\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.headMap_ = function (toKey, inclusive) {\n        if (inclusive === void 0) { inclusive = false; }\n        this.checkKeyArgument_(toKey, inclusive);\n        if (this._reverse) {\n            return new SNavigableMapSubMapMemory(this._target, this._wrapperConstructor, toKey, inclusive, this._toKey, this._includeTo, this._reverse);\n        }\n        else {\n            return new SNavigableMapSubMapMemory(this._target, this._wrapperConstructor, this._fromKey, this._includeFrom, toKey, inclusive, this._reverse);\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.tailMap_ = function (fromKey, inclusive) {\n        if (inclusive === void 0) { inclusive = true; }\n        this.checkKeyArgument_(fromKey, inclusive);\n        if (this._reverse) {\n            return new SNavigableMapSubMapMemory(this._target, this._wrapperConstructor, this._fromKey, this._includeFrom, fromKey, inclusive, this._reverse);\n        }\n        else {\n            return new SNavigableMapSubMapMemory(this._target, this._wrapperConstructor, fromKey, inclusive, this._toKey, this._includeTo, this._reverse);\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.subMap_ = function (fromKey, includeFrom, toKey, includeTo) {\n        this.checkKeyArgument_(fromKey, includeFrom);\n        this.checkKeyArgument_(toKey, includeTo);\n        if (this._reverse) {\n            checkSubMapRange(toKey, fromKey);\n            return new SNavigableMapSubMapMemory(this._target, this._wrapperConstructor, toKey, includeTo, fromKey, includeFrom, this._reverse);\n        }\n        else {\n            checkSubMapRange(fromKey, toKey);\n            return new SNavigableMapSubMapMemory(this._target, this._wrapperConstructor, fromKey, includeFrom, toKey, includeTo, this._reverse);\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.descendingMap_ = function () {\n        return new SNavigableMapSubMapMemory(this._target, this._wrapperConstructor, this._fromKey, this._includeFrom, this._toKey, this._includeTo, !this._reverse);\n    };\n    SNavigableMapSubMapMemory.prototype.put_ = function (key, value) {\n        this.checkKeyArgument_(key, true);\n        return this._target.put_(key, value);\n    };\n    SNavigableMapSubMapMemory.prototype.reput_ = function (key) {\n        this.checkKeyArgument_(key, true);\n        return this._target.reput_(key);\n    };\n    SNavigableMapSubMapMemory.prototype.putAll_ = function (mappings) {\n        this.checkKeyArguments_(mappings);\n        this._target.putAll_(mappings);\n        return this;\n    };\n    SNavigableMapSubMapMemory.prototype.remove_ = function (key) {\n        if (this.inRange_(key, false)) { // TODO: CHECK THIS\n            return this._target.remove_(key);\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.clear_ = function () {\n        var target = this._target;\n        checkSupported(target);\n        target.lock_();\n        try {\n            var isChanged = false;\n            var keys = target.getKeys_();\n            var values = target.getValues_();\n            var fromIndex = this.findFromIndex_();\n            var toIndex = this.findToIndex_();\n            var removed = {};\n            for (var i = toIndex - 1; fromIndex <= i; --i) {\n                var key = keys[i];\n                var value = values[key];\n                removed[key] = value;\n                delete values[key];\n                keys.splice(i, 1);\n                isChanged = true;\n            }\n            if (isChanged) {\n                var eventData = target.toEventData_(null, removed, null);\n                target.onRemoveAll_(removed);\n                target.getAndIncrementRevision_();\n                target.pushChangeEvent_(eventData[1], eventData);\n            }\n        }\n        finally {\n            target.unlock_();\n        }\n    };\n    SNavigableMapSubMapMemory.prototype.toJson_ = function () {\n        return this.toObject_();\n    };\n    SNavigableMapSubMapMemory.prototype.fromJson_ = function (json) {\n        var plainObject = json;\n        this.checkKeyArguments_(plainObject);\n        this._target.lock_();\n        try {\n            this.clear_();\n            this.putAll_(plainObject);\n        }\n        finally {\n            this._target.unlock_();\n        }\n        return this;\n    };\n    SNavigableMapSubMapMemory.prototype.toObject_ = function () {\n        var target = this._target;\n        var result = {};\n        var values = target.getValues_();\n        var keys = target.getKeys_();\n        var fromIndex = this.findFromIndex_();\n        var toIndex = this.findToIndex_();\n        if (this._reverse) {\n            for (var i = toIndex - 1; fromIndex <= i; --i) {\n                var key = keys[i];\n                result[key] = values[key];\n            }\n        }\n        else {\n            for (var i = fromIndex; i < toIndex; ++i) {\n                var key = keys[i];\n                result[key] = values[key];\n            }\n        }\n        return result;\n    };\n    SNavigableMapSubMapMemory.prototype.toString_ = function () {\n        return JSON.stringify(this.toObject_());\n    };\n    return SNavigableMapSubMapMemory;\n}(ViewMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar patchReset$2 = function (values, map, keys, added, removed, updated) {\n    for (var key in map) {\n        var oldValue = map[key];\n        if (key in values) {\n            var newValue = values[key];\n            if (isEqual(newValue, oldValue) !== true) {\n                updated[key] = { newValue: newValue, oldValue: oldValue };\n                map[key] = newValue;\n            }\n        }\n        else {\n            removed[key] = oldValue;\n            delete map[key];\n            keys.splice(sortedIndex(keys, key), 1);\n        }\n    }\n    for (var key in values) {\n        if (!(key in map)) {\n            map[key] = added[key] = values[key];\n            keys.splice(sortedIndex(keys, key), 0, key);\n        }\n    }\n};\nvar patchMap$1 = function (cadded, cremoved, map, keys, padded, premoved, pupdated) {\n    var isDirty = false;\n    // Removed\n    for (var i = 0, imax = cremoved.length; i < imax; ++i) {\n        var key = cremoved[i];\n        if (key in map) {\n            var value = map[key];\n            delete map[key];\n            delete pupdated[key];\n            isDirty = true;\n            if (key in padded) {\n                delete padded[key];\n            }\n            else {\n                premoved[key] = value;\n            }\n        }\n    }\n    // Added\n    for (var key in cadded) {\n        var newValue = cadded[key];\n        if (key in map) {\n            var oldValue = map[key];\n            var update = pupdated[key];\n            if (update != null) {\n                update.newValue = newValue;\n            }\n            else {\n                pupdated[key] = { newValue: newValue, oldValue: oldValue };\n            }\n        }\n        else {\n            padded[key] = newValue;\n            isDirty = true;\n        }\n        map[key] = newValue;\n    }\n    // Sort keys\n    if (isDirty) {\n        var i = 0;\n        for (var key in map) {\n            keys[i++] = key;\n        }\n        keys.length = i;\n        keys.sort();\n    }\n};\nvar SNavigableMapMemory = /** @class */ (function (_super) {\n    __extends(SNavigableMapMemory, _super);\n    function SNavigableMapMemory(parent, name, properties, lock, wrapperConstructor, type) {\n        var _this = _super.call(this, parent, name, properties, lock, wrapperConstructor, new SNavigableMapPatches(properties)) || this;\n        _this._keys = [];\n        _this._reverse = (type === 14 /* DESCENDING_MAP */);\n        return _this;\n    }\n    SNavigableMapMemory.prototype.getValues_ = function () {\n        return this._values;\n    };\n    SNavigableMapMemory.prototype.getKeys_ = function () {\n        return this._keys;\n    };\n    SNavigableMapMemory.prototype.size_ = function () {\n        return this._keys.length;\n    };\n    SNavigableMapMemory.prototype.each_ = function (iteratee, thisArg, reverse) {\n        if (reverse === void 0) { reverse = false; }\n        var values = this._values;\n        var keys = this._keys;\n        var wrapper = this.getWrapper_();\n        if (reverse ? !this._reverse : this._reverse) {\n            for (var i = keys.length - 1; 0 <= i; --i) {\n                var key = keys[i];\n                if (iteratee.call(thisArg, values[key], key, wrapper) === false) {\n                    return;\n                }\n            }\n        }\n        else {\n            for (var i = 0, imax = keys.length; i < imax; ++i) {\n                var key = keys[i];\n                if (iteratee.call(thisArg, values[key], key, wrapper) === false) {\n                    return;\n                }\n            }\n        }\n    };\n    SNavigableMapMemory.prototype.find_ = function (predicate, thisArg, reverse) {\n        if (reverse === void 0) { reverse = false; }\n        var values = this._values;\n        var keys = this._keys;\n        var wrapper = this.getWrapper_();\n        if (reverse ? !this._reverse : this._reverse) {\n            for (var i = keys.length - 1; 0 <= i; --i) {\n                var key = keys[i];\n                if (predicate.call(thisArg, values[key], key, wrapper) === true) {\n                    return values[key];\n                }\n            }\n        }\n        else {\n            for (var i = 0, imax = keys.length; i < imax; ++i) {\n                var key = keys[i];\n                if (predicate.call(thisArg, values[key], key, wrapper) === true) {\n                    return values[key];\n                }\n            }\n        }\n        return null;\n    };\n    SNavigableMapMemory.prototype.values_ = function () {\n        var result = [];\n        var values = this._values;\n        var keys = this._keys;\n        if (this._reverse) {\n            for (var i = keys.length - 1; 0 <= i; --i) {\n                var key = keys[i];\n                result.push(values[key]);\n            }\n        }\n        else {\n            for (var i = 0, imax = keys.length; i < imax; ++i) {\n                var key = keys[i];\n                result.push(values[key]);\n            }\n        }\n        return result;\n    };\n    SNavigableMapMemory.prototype.firstKey_ = function () {\n        return (this._reverse ? this.lastKey__() : this.firstKey__());\n    };\n    SNavigableMapMemory.prototype.lastKey_ = function () {\n        return (this._reverse ? this.firstKey__() : this.lastKey__());\n    };\n    SNavigableMapMemory.prototype.firstEntry_ = function () {\n        return (this._reverse ? this.lastEntry__() : this.firstEntry__());\n    };\n    SNavigableMapMemory.prototype.lastEntry_ = function () {\n        return (this._reverse ? this.firstEntry__() : this.lastEntry__());\n    };\n    SNavigableMapMemory.prototype.floorEntry_ = function (key) {\n        return (this._reverse ? this.ceilingEntry__(key) : this.floorEntry__(key));\n    };\n    SNavigableMapMemory.prototype.ceilingEntry_ = function (key) {\n        return (this._reverse ? this.floorEntry__(key) : this.ceilingEntry__(key));\n    };\n    SNavigableMapMemory.prototype.floorKey_ = function (key) {\n        return (this._reverse ? this.ceilingKey__(key) : this.floorKey__(key));\n    };\n    SNavigableMapMemory.prototype.ceilingKey_ = function (key) {\n        return (this._reverse ? this.floorKey__(key) : this.ceilingKey__(key));\n    };\n    SNavigableMapMemory.prototype.lowerEntry_ = function (key) {\n        return (this._reverse ? this.higherEntry__(key) : this.lowerEntry__(key));\n    };\n    SNavigableMapMemory.prototype.higherEntry_ = function (key) {\n        return (this._reverse ? this.lowerEntry__(key) : this.higherEntry__(key));\n    };\n    SNavigableMapMemory.prototype.lowerKey_ = function (key) {\n        return (this._reverse ? this.higherKey__(key) : this.lowerKey__(key));\n    };\n    SNavigableMapMemory.prototype.higherKey_ = function (key) {\n        return (this._reverse ? this.lowerKey__(key) : this.higherKey__(key));\n    };\n    SNavigableMapMemory.prototype.headMap_ = function (toKey, inclusive, wrapperConstructor) {\n        if (this._reverse) {\n            return new SNavigableMapSubMapMemory(this, wrapperConstructor, toKey, inclusive, null, false, this._reverse);\n        }\n        else {\n            return new SNavigableMapSubMapMemory(this, wrapperConstructor, null, true, toKey, inclusive, this._reverse);\n        }\n    };\n    SNavigableMapMemory.prototype.tailMap_ = function (fromKey, inclusive, wrapperConstructor) {\n        if (this._reverse) {\n            return new SNavigableMapSubMapMemory(this, wrapperConstructor, null, true, fromKey, inclusive, this._reverse);\n        }\n        else {\n            return new SNavigableMapSubMapMemory(this, wrapperConstructor, fromKey, inclusive, null, false, this._reverse);\n        }\n    };\n    SNavigableMapMemory.prototype.subMap_ = function (fromKey, includeFrom, toKey, includeTo, wrapperConstructor) {\n        if (this._reverse) {\n            checkSubMapRange(toKey, fromKey);\n            return new SNavigableMapSubMapMemory(this, wrapperConstructor, toKey, includeTo, fromKey, includeFrom, this._reverse);\n        }\n        else {\n            checkSubMapRange(fromKey, toKey);\n            return new SNavigableMapSubMapMemory(this, wrapperConstructor, fromKey, includeFrom, toKey, includeTo, this._reverse);\n        }\n    };\n    SNavigableMapMemory.prototype.descendingMap_ = function (wrapperConstructor) {\n        return new SNavigableMapSubMapMemory(this, wrapperConstructor, null, true, null, false, !this._reverse);\n    };\n    SNavigableMapMemory.prototype.firstKey__ = function () {\n        var keys = this._keys;\n        checkNoSuchElement(isNotEmptyArray(keys));\n        return keys[0];\n    };\n    SNavigableMapMemory.prototype.lastKey__ = function () {\n        var keys = this._keys;\n        checkNoSuchElement(isNotEmptyArray(keys));\n        return keys[keys.length - 1];\n    };\n    SNavigableMapMemory.prototype.firstEntry__ = function () {\n        var values = this._values;\n        var keys = this._keys;\n        if (isNotEmptyArray(keys)) {\n            var key = keys[0];\n            var value = values[key];\n            return new SMapEntry(key, value);\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapMemory.prototype.lastEntry__ = function () {\n        var values = this._values;\n        var keys = this._keys;\n        if (isNotEmptyArray(keys)) {\n            var key = keys[keys.length - 1];\n            var value = values[key];\n            return new SMapEntry(key, value);\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapMemory.prototype.floorEntry__ = function (key) {\n        var values = this._values;\n        var keys = this._keys;\n        var index = sortedIndex(keys, key);\n        if (index < keys.length) {\n            var fkey = keys[index];\n            if (fkey <= key) {\n                var value = values[fkey];\n                return new SMapEntry(fkey, value);\n            }\n            else if (0 <= index - 1) {\n                fkey = keys[index - 1];\n                var value = values[fkey];\n                return new SMapEntry(fkey, value);\n            }\n            else {\n                return null;\n            }\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapMemory.prototype.ceilingEntry__ = function (key) {\n        var values = this._values;\n        var keys = this._keys;\n        var index = sortedIndex(keys, key);\n        if (index < keys.length) {\n            var fkey = keys[index];\n            var value = values[fkey];\n            return new SMapEntry(fkey, value);\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapMemory.prototype.floorKey__ = function (key) {\n        var keys = this._keys;\n        var index = sortedIndex(keys, key);\n        if (index < keys.length) {\n            var fkey = keys[index];\n            if (fkey <= key) {\n                return fkey;\n            }\n            else if (0 <= index - 1) {\n                return keys[index - 1];\n            }\n            else {\n                return null;\n            }\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapMemory.prototype.ceilingKey__ = function (key) {\n        var keys = this._keys;\n        var index = sortedIndex(keys, key);\n        if (index < keys.length) {\n            return keys[index];\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapMemory.prototype.lowerEntry__ = function (key) {\n        var values = this._values;\n        var keys = this._keys;\n        var index = sortedIndex(keys, key);\n        if (0 <= index - 1) {\n            var fkey = keys[index - 1];\n            var value = values[fkey];\n            return new SMapEntry(fkey, value);\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapMemory.prototype.higherEntry__ = function (key) {\n        var values = this._values;\n        var keys = this._keys;\n        var index = sortedIndex(keys, key);\n        if (index < keys.length) {\n            var fkey = keys[index];\n            if (key < fkey) {\n                var value = values[fkey];\n                return new SMapEntry(fkey, value);\n            }\n            else if (index + 1 < keys.length) {\n                fkey = keys[index + 1];\n                var value = values[fkey];\n                return new SMapEntry(fkey, value);\n            }\n            else {\n                return null;\n            }\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapMemory.prototype.lowerKey__ = function (key) {\n        var keys = this._keys;\n        var index = sortedIndex(keys, key);\n        if (0 <= index - 1) {\n            return keys[index - 1];\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapMemory.prototype.higherKey__ = function (key) {\n        var keys = this._keys;\n        var index = sortedIndex(keys, key);\n        if (index < keys.length) {\n            var fkey = keys[index];\n            if (key < fkey) {\n                return fkey;\n            }\n            else if (index + 1 < keys.length) {\n                return keys[index + 1];\n            }\n            else {\n                return null;\n            }\n        }\n        else {\n            return null;\n        }\n    };\n    SNavigableMapMemory.prototype.filter__ = function (iteratee, thisArg) {\n        var isChanged = false;\n        var values = this._values;\n        var keys = this._keys;\n        var wrapper = this.getWrapper_();\n        var removed = {};\n        var removedIndices = [];\n        if (this._reverse) {\n            for (var i = keys.length - 1; 0 <= i; --i) {\n                var key = keys[i];\n                var value = values[key];\n                if (iteratee.call(thisArg, value, key, wrapper) === true) {\n                    continue;\n                }\n                removed[key] = value;\n                removedIndices.push(i);\n                isChanged = true;\n            }\n        }\n        else {\n            for (var i = 0, imax = keys.length; i < imax; ++i) {\n                var key = keys[i];\n                var value = values[key];\n                if (iteratee.call(thisArg, value, key, wrapper) === true) {\n                    continue;\n                }\n                removed[key] = value;\n                removedIndices.push(i);\n                isChanged = true;\n            }\n        }\n        if (isChanged) {\n            var eventData = this.toEventData_(null, removed, null);\n            for (var i = removedIndices.length - 1; 0 <= i; --i) {\n                var index = removedIndices[i];\n                var key = keys.splice(index, 1)[0];\n                delete values[key];\n            }\n            this.onRemoveAll_(removed);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(eventData[1], eventData);\n        }\n    };\n    SNavigableMapMemory.prototype.put__ = function (key, value) {\n        var values = this._values;\n        var keys = this._keys;\n        var eventData = null;\n        var oldValue = null;\n        var index = sortedIndex(keys, key);\n        if (index < keys.length && keys[index] === key) {\n            oldValue = values[key];\n            var updated = {};\n            updated[key] = { newValue: value, oldValue: oldValue };\n            eventData = this.toEventData_(null, null, updated);\n        }\n        else {\n            keys.splice(index, 0, key);\n            var added = {};\n            added[key] = value;\n            eventData = this.toEventData_(added, null, null);\n        }\n        values[key] = value;\n        this.onPut_(key, value);\n        this.getAndIncrementRevision_();\n        this.pushChangeEvent_(eventData[1], eventData);\n        return oldValue;\n    };\n    SNavigableMapMemory.prototype.reput__ = function (key) {\n        var values = this._values;\n        var keys = this._keys;\n        var value = null;\n        var index = sortedIndex(keys, key);\n        if (index < keys.length && keys[index] === key) {\n            value = values[key];\n            var updated = {};\n            updated[key] = { newValue: value, oldValue: value };\n            var eventData = this.toEventData_(null, null, updated);\n            this.onPut_(key, value);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(eventData[1], eventData);\n        }\n        return value;\n    };\n    SNavigableMapMemory.prototype.putAll__ = function (mappings) {\n        var isChanged = false;\n        var values = this._values;\n        var keys = this._keys;\n        var added = {};\n        var updated = {};\n        for (var key in mappings) {\n            if (hasOwn(mappings, key)) {\n                var newValue = mappings[key];\n                var index = sortedIndex(keys, key);\n                if (index < keys.length && keys[index] === key) {\n                    updated[key] = { newValue: newValue, oldValue: values[key] };\n                }\n                else {\n                    keys.splice(index, 0, key);\n                    added[key] = newValue;\n                }\n                values[key] = newValue;\n                isChanged = true;\n            }\n        }\n        if (isChanged) {\n            var eventData = this.toEventData_(added, null, updated);\n            this.onPutAll_(mappings);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(eventData[1], eventData);\n        }\n    };\n    SNavigableMapMemory.prototype.clearAndPut__ = function (key, value) {\n        var values = this._values;\n        var keys = this._keys;\n        var removed = {};\n        for (var rkey in values) {\n            if (rkey !== key) {\n                removed[rkey] = values[rkey];\n                delete values[rkey];\n            }\n        }\n        keys.splice(0, keys.length);\n        var added = {};\n        var updated = {};\n        if (key in values) {\n            updated[key] = { newValue: value, oldValue: values[key] };\n        }\n        else {\n            added[key] = value;\n        }\n        keys.push(key);\n        values[key] = value;\n        var eventData = this.toEventData_(added, removed, updated);\n        this.onClear_();\n        this.onPut_(key, value);\n        this.getAndIncrementRevision_();\n        this.pushChangeEvent_(eventData[1], eventData);\n        return null;\n    };\n    SNavigableMapMemory.prototype.clearAndPutAll__ = function (mappings) {\n        var isChanged = false;\n        var values = this._values;\n        var keys = this._keys;\n        var removed = {};\n        for (var key in values) {\n            if (!(key in mappings)) {\n                removed[key] = values[key];\n                delete values[key];\n                isChanged = true;\n            }\n        }\n        keys.splice(0, keys.length);\n        var added = {};\n        var updated = {};\n        for (var key in mappings) {\n            if (hasOwn(mappings, key)) {\n                var newValue = mappings[key];\n                var index = sortedIndex(keys, key);\n                keys.splice(index, 0, key);\n                if (key in values) {\n                    updated[key] = { newValue: newValue, oldValue: values[key] };\n                }\n                else {\n                    added[key] = newValue;\n                }\n                values[key] = newValue;\n                isChanged = true;\n            }\n        }\n        if (isChanged) {\n            var eventData = this.toEventData_(added, removed, updated);\n            this.onClear_();\n            this.onPutAll_(mappings);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(eventData[1], eventData);\n        }\n    };\n    SNavigableMapMemory.prototype.remove__ = function (key) {\n        var result = null;\n        var removed = {};\n        var keys = this._keys;\n        var index = sortedIndex(keys, key);\n        if (index < keys.length && keys[index] === key) {\n            result = removed[key] = this._values[key];\n            delete this._values[key];\n            keys.splice(index, 1);\n            var eventData = this.toEventData_(null, removed, null);\n            this.onRemove_(key);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(eventData[1], eventData);\n        }\n        return result;\n    };\n    SNavigableMapMemory.prototype.clear__ = function () {\n        var isChanged = false;\n        var removed = {};\n        var values = this._values;\n        for (var key in values) {\n            removed[key] = values[key];\n            delete values[key];\n            isChanged = true;\n        }\n        this._keys.splice(0, this._keys.length);\n        if (isChanged) {\n            var eventData = this.toEventData_(null, removed, null);\n            this.onClear_();\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(eventData[1], eventData);\n        }\n    };\n    SNavigableMapMemory.prototype.patch_ = function (patches) {\n        var revision = this.getRevision_();\n        var map = this._values;\n        var keys = this._keys;\n        var added = {};\n        var removed = {};\n        var updated = {};\n        var type = patches[2];\n        if (type === 0) {\n            patchReset$2(patches[3], map, keys, added, removed, updated);\n        }\n        else {\n            var startRevision = patches[0];\n            var ceilingRevision = Math.max(revision - startRevision, 0);\n            for (var i = 3, imax = patches.length; i < imax; i += 3) {\n                if (ceilingRevision <= patches[i + 0]) {\n                    patchMap$1(patches[i + 1], patches[i + 2], map, keys, added, removed, updated);\n                }\n            }\n        }\n        if (isEmptyObject(added) && isEmptyObject(removed) && isEmptyObject(updated)) {\n            return null;\n        }\n        else {\n            return [null, added, removed, updated];\n        }\n    };\n    return SNavigableMapMemory;\n}(SMapBaseMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SAscendingMapMemory = /** @class */ (function (_super) {\n    __extends(SAscendingMapMemory, _super);\n    function SAscendingMapMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, 13 /* ASCENDING_MAP */) || this;\n    }\n    return SAscendingMapMemory;\n}(SNavigableMapMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SDescendingMapMemory = /** @class */ (function (_super) {\n    __extends(SDescendingMapMemory, _super);\n    function SDescendingMapMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, 14 /* DESCENDING_MAP */) || this;\n    }\n    return SDescendingMapMemory;\n}(SNavigableMapMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A base class for all view classes.\n */\nvar View = /** @class */ (function (_super) {\n    __extends(View, _super);\n    function View(__mem__) {\n        var _this = _super.call(this) || this;\n        _this.__mem__ = __mem__;\n        return _this;\n    }\n    /**\n     * Returns true if this is read-only.\n     *\n     * @returns true if this is read-only\n     */\n    View.prototype.isReadOnly = function () {\n        return this.__mem__.isReadOnly_();\n    };\n    /**\n     * Returns true if this is non-null.\n     *\n     * @returns true if this is non-null.\n     */\n    View.prototype.isNonNull = function () {\n        return this.__mem__.isNonNull_();\n    };\n    /**\n     * Returns true if this is initialized.\n     *\n     * @returns true if this is initialized.\n     */\n    View.prototype.isInitialized = function () {\n        return this.__mem__.isInitialized_();\n    };\n    /**\n     * Locks this data.\n     *\n     * @returns this\n     */\n    View.prototype.lock = function () {\n        return this.__mem__.lock_();\n    };\n    /**\n     * Returns true if this data is locked.\n     *\n     * @returns true if this data is locked\n     */\n    View.prototype.isLocked = function () {\n        return this.__mem__.isLocked_();\n    };\n    /**\n     * Unlocks this data.\n     *\n     * @returns this\n     */\n    View.prototype.unlock = function () {\n        return this.__mem__.unlock_();\n    };\n    return View;\n}(Connectable));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A view of a navigable map.\n */\nvar SNavigableMapSubMap = /** @class */ (function (_super) {\n    __extends(SNavigableMapSubMap, _super);\n    function SNavigableMapSubMap(memory) {\n        return _super.call(this, memory) || this;\n    }\n    /**\n     * Returns the size of this map.\n     *\n     * @returns the size of this map\n     */\n    SNavigableMapSubMap.prototype.size = function () {\n        return this.__mem__.size_();\n    };\n    /**\n     * Returns true if this map is empty.\n     *\n     * @returns true if this map is empty\n     */\n    SNavigableMapSubMap.prototype.isEmpty = function () {\n        return this.__mem__.isEmpty_();\n    };\n    /**\n     * Returns true if the specified key is in this map.\n     *\n     * @param key the key to be tested\n     * @returns true if the specified key is in this map\n     */\n    SNavigableMapSubMap.prototype.containsKey = function (key) {\n        return this.__mem__.containsKey_(key);\n    };\n    /**\n     * Returns true if the specified value is in this map.\n     *\n     * @param element the value to be tested\n     * @param comparator comparator\n     * @param thisArg context for the comparator\n     * @returns true if the specified value is in this map.\n     */\n    SNavigableMapSubMap.prototype.containsValue = function (value, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.containsValue_(value, comparator, thisArg);\n    };\n    /**\n     * Iterates over elements of this map, calling the iteratee for each element.\n     * The iteratee is bound to the thisArg and invoked with three arguments: value, key and this map.\n     * The iteratee may exit iteration early by explicitly returning false.\n     *\n     * @param iteratee the function called per iteration\n     * @param thisArg the this binding of the iteratee\n     * @returns this\n     */\n    SNavigableMapSubMap.prototype.each = function (iteratee, thisArg, reverse) {\n        if (thisArg === void 0) { thisArg = this; }\n        if (reverse === void 0) { reverse = false; }\n        this.__mem__.each_(iteratee, thisArg, reverse);\n        return this;\n    };\n    /**\n     * Returns the value of the specified key.\n     * Returns null if this map does not contains the specified key.\n     *\n     * @param key the key of the value\n     * @returns the value of the specified key\n     */\n    SNavigableMapSubMap.prototype.get = function (key) {\n        return this.__mem__.get_(key);\n    };\n    /**\n     * Iterates elements of this map, calling the iteratee for each element,\n     * removing all elements the iteratee does not return true.\n     * The iteratee is bound to the thisArg and invoked with three arguments: value, key and this map.\n     *\n     * @param iteratee the function called per iteration\n     * @param thisArg the this binding of the iteratee\n     * @throws Error if this is read-only\n     * @returns this\n     */\n    SNavigableMapSubMap.prototype.filter = function (iteratee, thisArg) {\n        if (thisArg === void 0) { thisArg = this; }\n        this.__mem__.filter_(iteratee, thisArg);\n        return this;\n    };\n    /**\n     * Returns the first field value which the specified predicate returns true, or null if there is no such field.\n     * The predicate is bound to the thisArg and invoked with three arguments: field value, field name and this map.\n     *\n     * @param predicate the function called per iteration\n     * @param thisArg the this binding of the predicate\n     * @returns the first field value which the specified predicate returns true, or null if there is no such field.\n     */\n    SNavigableMapSubMap.prototype.find = function (predicate, thisArg, reverse) {\n        if (thisArg === void 0) { thisArg = this; }\n        if (reverse === void 0) { reverse = false; }\n        return this.__mem__.find_(predicate, thisArg, reverse);\n    };\n    /**\n     * Returns the array of the values in this map.\n     *\n     * @returns the array of the values in this map\n     */\n    SNavigableMapSubMap.prototype.values = function () {\n        return this.__mem__.values_();\n    };\n    /**\n     * Returns the lowest key in this map.\n     *\n     * @returns the lowest key in this map\n     * @throws Error if this map is empty\n     */\n    SNavigableMapSubMap.prototype.firstKey = function () {\n        return this.__mem__.firstKey_();\n    };\n    /**\n     * Returns the highest key in this map.\n     *\n     * @returns the highest key in this map\n     * @throws Error if this map is empty\n     */\n    SNavigableMapSubMap.prototype.lastKey = function () {\n        return this.__mem__.lastKey_();\n    };\n    /**\n     * Returns a key-value mapping of the lowest key in this map, or null if this map is empty.\n     *\n     * @returns a key-value mapping of the lowest key in this map, or null if this map is empty\n     */\n    SNavigableMapSubMap.prototype.firstEntry = function () {\n        return this.__mem__.firstEntry_();\n    };\n    /**\n     * Returns a key-value mapping of the highest key in this map, or null if this map is empty.\n     *\n     * @returns a key-value mapping of the highest key in this map, or null if this map is empty\n     */\n    SNavigableMapSubMap.prototype.lastEntry = function () {\n        return this.__mem__.lastEntry_();\n    };\n    /**\n     * Returns a key-value mapping of the highest key lower than or equal to the specified key,\n     * or null if there is no such key.\n     *\n     * @param key a key\n     * @returns a key-value mapping of the highest key lower than or equal to the specified key,\n     * or null if there is no such key\n     */\n    SNavigableMapSubMap.prototype.floorEntry = function (key) {\n        return this.__mem__.floorEntry_(key);\n    };\n    /**\n     * Returns a key-value mapping of the lowest key higher than or equal to the specified key,\n     * or null if there is no such key.\n     *\n     * @param key a key\n     * @returns a key-value mapping of the lowest key higher than or equal to the specified key,\n     * or null if there is no such key\n     */\n    SNavigableMapSubMap.prototype.ceilingEntry = function (key) {\n        return this.__mem__.ceilingEntry_(key);\n    };\n    /**\n     * Returns the highest key lower than or equal to the specified key, or null if there is no such key.\n     *\n     * @param key a key\n     * @returns the highest key lower than or equal to the specified key, or null if there is no such key.\n     */\n    SNavigableMapSubMap.prototype.floorKey = function (key) {\n        return this.__mem__.floorKey_(key);\n    };\n    /**\n     * Returns the lowest key higher than or equal to the specified key, or null if there is no such key.\n     *\n     * @param key a key\n     * @returns the lowest key higher than or equal to the specified key, or null if there is no such key\n     */\n    SNavigableMapSubMap.prototype.ceilingKey = function (key) {\n        return this.__mem__.ceilingKey_(key);\n    };\n    /**\n     * Returns a key-value mapping of the highest key lower than the specified key,\n     * or null if there is no such key.\n     *\n     * @param key a key\n     * @returns a key-value mapping of the highest key lower than the specified key,\n     * or null if there is no such key\n     */\n    SNavigableMapSubMap.prototype.lowerEntry = function (key) {\n        return this.__mem__.lowerEntry_(key);\n    };\n    /**\n     * Returns a key-value mapping of the lowest key higher than the specified key,\n     * or null if there is no such key.\n     *\n     * @param key a key\n     * @returns a key-value mapping of the lowest key higher than the specified key,\n     * or null if there is no such key\n     */\n    SNavigableMapSubMap.prototype.higherEntry = function (key) {\n        return this.__mem__.higherEntry_(key);\n    };\n    /**\n     * Returns the highest key lower than the specified key, or null if there is no such key.\n     *\n     * @param key a key\n     * @returns the highest key lower than the specified key, or null if there is no such key.\n     */\n    SNavigableMapSubMap.prototype.lowerKey = function (key) {\n        return this.__mem__.lowerKey_(key);\n    };\n    /**\n     * Returns the lowest key higher than the specified key, or null if there is no such key.\n     *\n     * @param key a key\n     * @returns the lowest key higher than the specified key, or null if there is no such key\n     */\n    SNavigableMapSubMap.prototype.higherKey = function (key) {\n        return this.__mem__.higherKey_(key);\n    };\n    /**\n     * Returns a view of the portion of this map whose keys are lower than (or equal to,\n     * if inclusive is true) the specified key `toKey`.\n     *\n     * @param toKey high endpoint of the keys in the view\n     * @param inclusive true if the specified key `toKey` is to be included in the view\n     * @returns a view of the specified portion of this map\n     * @throws Error `toKey` lies outside the bounds of this view\n     */\n    SNavigableMapSubMap.prototype.headMap = function (toKey, inclusive) {\n        if (inclusive === void 0) { inclusive = false; }\n        return this.__mem__.headMap_(toKey, inclusive).getWrapper_();\n    };\n    /**\n     * Returns a view of the portion of this map whose keys are higher than (or equal to,\n     * if inclusive is true) the specified key `fromKey`.\n     *\n     * @param fromKey low endpoint of the keys in the view\n     * @param inclusive true if the specified key `fromKey` is to be included in the view\n     * @returns a view of the specified portion of this map\n     * @throws Error `fromKey` lies outside the bounds of this view\n     */\n    SNavigableMapSubMap.prototype.tailMap = function (fromKey, inclusive) {\n        if (inclusive === void 0) { inclusive = true; }\n        return this.__mem__.tailMap_(fromKey, inclusive).getWrapper_();\n    };\n    SNavigableMapSubMap.prototype.subMap = function (fromKey, includeFromOrToKey, toKeyOrIncludeTo, includeTo) {\n        var includeFrom = true;\n        var toKey = null;\n        if (arguments.length <= 2) {\n            toKey = includeFromOrToKey;\n            includeTo = false;\n        }\n        else if (arguments.length === 3) {\n            if (isBoolean(toKeyOrIncludeTo)) {\n                includeTo = toKeyOrIncludeTo;\n                toKey = includeFromOrToKey;\n            }\n            else {\n                includeTo = includeFromOrToKey;\n                toKey = toKeyOrIncludeTo;\n            }\n        }\n        else {\n            includeFrom = includeFromOrToKey;\n            toKey = toKeyOrIncludeTo;\n        }\n        if (includeFrom == null) {\n            includeFrom = true;\n        }\n        if (includeTo == null) {\n            includeTo = false;\n        }\n        return this.__mem__.subMap_(fromKey, includeFrom, toKey, includeTo).getWrapper_();\n    };\n    /**\n     * Returns a reverse-order view of this map.\n     *\n     * @returns reverse-order view of this map\n     */\n    SNavigableMapSubMap.prototype.descendingMap = function () {\n        return this.__mem__.descendingMap_().getWrapper_();\n    };\n    /**\n     * Associates the specified value with the specified key.\n     * If this map contained the specified key previously, the old value is replaced by the specified value.\n     *\n     * @param key the key with which the specified value is to be associated\n     * @param element the value to be associated with the specified key\n     * @returns the old value or null if this map did not contain the specified key previously\n     * @throws Error if this is read-only\n     * @throws Error if the specified key is null\n     * @throws Error if the specified value is null and this does not support a null value\n     * @throws Error the specified key lies outside the bounds of this view\n     */\n    SNavigableMapSubMap.prototype.put = function (key, value) {\n        return this.__mem__.put_(key, value);\n    };\n    /**\n     * Reassociates the value of the specified key.\n     *\n     * @param key the key which is to be reassociated\n     * @returns the value of the specified key or null if this map did not contain the specified key previously\n     * @throws Error if this is read-only\n     * @throws Error if the specified key is null\n     * @throws Error the specified key lies outside the bounds of this view\n     */\n    SNavigableMapSubMap.prototype.reput = function (key) {\n        return this.__mem__.reput_(key);\n    };\n    /**\n     * Copies all the mappings of the specified mapping to this map.\n     *\n     * @param mappings mappings to be stored in this map\n     * @throws Error if this is read-only\n     * @throws Error if the specified mappings is null\n     * @throws Error if the specified mappings contains a null value and this does not support a null value\n     * @throws Error the specified key lies outside the bounds of this view\n     * @returns this\n     */\n    SNavigableMapSubMap.prototype.putAll = function (mappings) {\n        this.__mem__.putAll_(mappings);\n        return this;\n    };\n    /**\n     * Removes the mapping of the specified key.\n     *\n     * @param key the key of the mapping to be removed\n     * @returns the old value or null if this map did not contain the specified key\n     * @throws Error if this is read-only\n     */\n    SNavigableMapSubMap.prototype.remove = function (key) {\n        return this.__mem__.remove_(key);\n    };\n    /**\n     * Removes all of the mappings in this map.\n     *\n     * @throws Error if this is read-only\n     * @returns this\n     */\n    SNavigableMapSubMap.prototype.clear = function () {\n        this.__mem__.clear_();\n        return this;\n    };\n    /**\n     * Returns the JSON representation of this map.\n     * Must not change the returned JSON.\n     *\n     * @returns the JSON representation of this map\n     */\n    SNavigableMapSubMap.prototype.toJson = function () {\n        return this.__mem__.toObject_();\n    };\n    /**\n     * Sets to the specified JSON object.\n     *\n     * @param json JSON object to be set\n     * @returns this\n     */\n    SNavigableMapSubMap.prototype.fromJson = function (json) {\n        this.__mem__.fromJson_(json);\n        return this;\n    };\n    /**\n     * Returns the string representation of this container.\n     *\n     * @returns the string representation of this container\n     */\n    SNavigableMapSubMap.prototype.toString = function () {\n        return this.__mem__.toString_();\n    };\n    /**\n     * Returns the object representation of this map.\n     * Must not change the returned object.\n     *\n     * @returns the object representation of this map\n     */\n    SNavigableMapSubMap.prototype.toObject = function () {\n        return this.__mem__.toObject_();\n    };\n    return SNavigableMapSubMap;\n}(View));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized map that further provides an ordering on its keys.\n *\n * @param V a value type\n */\nvar SNavigableMap = /** @class */ (function (_super) {\n    __extends(SNavigableMap, _super);\n    function SNavigableMap(memory) {\n        return _super.call(this, memory) || this;\n    }\n    /**\n     * Iterates over elements of this map, calling the iteratee for each element.\n     * The iteratee is bound to the thisArg and invoked with three arguments: value, key and this map.\n     * The iteratee may exit iteration early by explicitly returning false.\n     *\n     * @param iteratee the function called per iteration\n     * @param thisArg the this binding of the iteratee\n     * @param reverse true to iterate in the reverse order\n     * @returns this\n     */\n    SNavigableMap.prototype.each = function (iteratee, thisArg, reverse) {\n        if (thisArg === void 0) { thisArg = this; }\n        if (reverse === void 0) { reverse = false; }\n        this.__mem__.each_(iteratee, thisArg, reverse);\n        return this;\n    };\n    SNavigableMap.prototype.filter = function (iteratee, thisArg) {\n        if (thisArg === void 0) { thisArg = this; }\n        this.__mem__.filter_(iteratee, thisArg);\n        return this;\n    };\n    /**\n     * Returns the first field value which the specified predicate returns true, or null if there is no such field.\n     * The predicate is bound to the thisArg and invoked with three arguments: field value, field name and this map.\n     *\n     * @param predicate the function called per iteration\n     * @param thisArg the this binding of the predicate\n     * @param reverse true to iterate in the reverse order\n     * @returns the first field value which the specified predicate returns true, or null if there is no such field.\n     */\n    SNavigableMap.prototype.find = function (predicate, thisArg, reverse) {\n        if (thisArg === void 0) { thisArg = this; }\n        if (reverse === void 0) { reverse = false; }\n        return this.__mem__.find_(predicate, thisArg, reverse);\n    };\n    /**\n     * Returns the lowest key in this map.\n     *\n     * @returns the lowest key in this map\n     * @throws Error if this map is empty\n     */\n    SNavigableMap.prototype.firstKey = function () {\n        return this.__mem__.firstKey_();\n    };\n    /**\n     * Returns the highest key in this map.\n     *\n     * @returns the highest key in this map\n     * @throws Error if this map is empty\n     */\n    SNavigableMap.prototype.lastKey = function () {\n        return this.__mem__.lastKey_();\n    };\n    /**\n     * Returns a key-value mapping of the lowest key in this map, or null if this map is empty.\n     *\n     * @returns a key-value mapping of the lowest key in this map, or null if this map is empty\n     */\n    SNavigableMap.prototype.firstEntry = function () {\n        return this.__mem__.firstEntry_();\n    };\n    /**\n     * Returns a key-value mapping of the highest key in this map, or null if this map is empty.\n     *\n     * @returns a key-value mapping of the highest key in this map, or null if this map is empty\n     */\n    SNavigableMap.prototype.lastEntry = function () {\n        return this.__mem__.lastEntry_();\n    };\n    /**\n     * Returns a key-value mapping of the highest key lower than or equal to the specified key,\n     * or null if there is no such key.\n     *\n     * @param key a key\n     * @returns a key-value mapping of the highest key lower than or equal to the specified key,\n     * or null if there is no such key\n     */\n    SNavigableMap.prototype.floorEntry = function (key) {\n        return this.__mem__.floorEntry_(key);\n    };\n    /**\n     * Returns a key-value mapping of the lowest key higher than or equal to the specified key,\n     * or null if there is no such key.\n     *\n     * @param key a key\n     * @returns a key-value mapping of the lowest key higher than or equal to the specified key,\n     * or null if there is no such key\n     */\n    SNavigableMap.prototype.ceilingEntry = function (key) {\n        return this.__mem__.ceilingEntry_(key);\n    };\n    /**\n     * Returns the highest key lower than or equal to the specified key, or null if there is no such key.\n     *\n     * @param key a key\n     * @returns the highest key lower than or equal to the specified key, or null if there is no such key.\n     */\n    SNavigableMap.prototype.floorKey = function (key) {\n        return this.__mem__.floorKey_(key);\n    };\n    /**\n     * Returns the lowest key higher than or equal to the specified key, or null if there is no such key.\n     *\n     * @param key a key\n     * @returns the lowest key higher than or equal to the specified key, or null if there is no such key\n     */\n    SNavigableMap.prototype.ceilingKey = function (key) {\n        return this.__mem__.ceilingKey_(key);\n    };\n    /**\n     * Returns a key-value mapping of the highest key lower than the specified key,\n     * or null if there is no such key.\n     *\n     * @param key a key\n     * @returns a key-value mapping of the highest key lower than the specified key,\n     * or null if there is no such key\n     */\n    SNavigableMap.prototype.lowerEntry = function (key) {\n        return this.__mem__.lowerEntry_(key);\n    };\n    /**\n     * Returns a key-value mapping of the lowest key higher than the specified key,\n     * or null if there is no such key.\n     *\n     * @param key a key\n     * @returns a key-value mapping of the lowest key higher than the specified key,\n     * or null if there is no such key\n     */\n    SNavigableMap.prototype.higherEntry = function (key) {\n        return this.__mem__.higherEntry_(key);\n    };\n    /**\n     * Returns the highest key lower than the specified key, or null if there is no such key.\n     *\n     * @param key a key\n     * @returns the highest key lower than the specified key, or null if there is no such key.\n     */\n    SNavigableMap.prototype.lowerKey = function (key) {\n        return this.__mem__.lowerKey_(key);\n    };\n    /**\n     * Returns the lowest key higher than the specified key, or null if there is no such key.\n     *\n     * @param key a key\n     * @returns the lowest key higher than the specified key, or null if there is no such key\n     */\n    SNavigableMap.prototype.higherKey = function (key) {\n        return this.__mem__.higherKey_(key);\n    };\n    /**\n     * Returns a view of the portion of this map whose keys are lower than (or equal to,\n     * if inclusive is true) the specified key `toKey`.\n     *\n     * @param toKey high endpoint of the keys in the view\n     * @param inclusive true if the specified key `toKey` is to be included in the view\n     * @returns a view of the specified portion of this map\n     */\n    SNavigableMap.prototype.headMap = function (toKey, inclusive) {\n        if (inclusive === void 0) { inclusive = false; }\n        return this.__mem__.headMap_(toKey, inclusive, SNavigableMapSubMap).getWrapper_();\n    };\n    /**\n     * Returns a view of the portion of this map whose keys are higher than (or equal to,\n     * if inclusive is true) the specified key `fromKey`.\n     *\n     * @param fromKey low endpoint of the keys in the view\n     * @param inclusive true if the specified key `fromKey` is to be included in the view\n     * @returns a view of the specified portion of this map\n     */\n    SNavigableMap.prototype.tailMap = function (fromKey, inclusive) {\n        if (inclusive === void 0) { inclusive = true; }\n        return this.__mem__.tailMap_(fromKey, inclusive, SNavigableMapSubMap).getWrapper_();\n    };\n    SNavigableMap.prototype.subMap = function (fromKey, includeFromOrToKey, toKeyOrIncludeTo, includeTo) {\n        var includeFrom = true;\n        var toKey = null;\n        if (arguments.length === 2) {\n            toKey = includeFromOrToKey;\n            includeTo = false;\n        }\n        else if (arguments.length === 3) {\n            if (isString(includeFromOrToKey)) {\n                toKey = includeFromOrToKey;\n                includeTo = toKeyOrIncludeTo;\n            }\n            else {\n                toKey = toKeyOrIncludeTo;\n                includeFrom = includeFromOrToKey;\n            }\n        }\n        else {\n            includeFrom = includeFromOrToKey;\n            toKey = toKeyOrIncludeTo;\n        }\n        if (includeFrom == null) {\n            includeFrom = true;\n        }\n        if (includeTo == null) {\n            includeTo = false;\n        }\n        return this.__mem__.subMap_(fromKey, includeFrom, toKey, includeTo, SNavigableMapSubMap).getWrapper_();\n    };\n    /**\n     * Returns a reverse-order view of this map.\n     *\n     * @returns reverse-order view of this map\n     */\n    SNavigableMap.prototype.descendingMap = function () {\n        return this.__mem__.descendingMap_(SNavigableMapSubMap).getWrapper_();\n    };\n    SNavigableMap.SubMap = SNavigableMapSubMap;\n    return SNavigableMap;\n}(SMapBase));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SAscendingMapMemory(parent, name, properties, lock, SNavigableMap);\n    },\n    getConstructor_: function () {\n        return SNavigableMap;\n    },\n    getType_: function () {\n        return 13 /* ASCENDING_MAP */;\n    }\n});\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SDescendingMapMemory(parent, name, properties, lock, SNavigableMap);\n    },\n    getConstructor_: function () {\n        return SNavigableMap;\n    },\n    getType_: function () {\n        return 14 /* DESCENDING_MAP */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SObjectNodeMemory = /** @class */ (function (_super) {\n    __extends(SObjectNodeMemory, _super);\n    function SObjectNodeMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, 7 /* OBJECT_NODE */) || this;\n    }\n    SObjectNodeMemory.prototype.cast_ = function (value) {\n        if (isPlainObject(value)) {\n            return value;\n        }\n        return null;\n    };\n    return SObjectNodeMemory;\n}(SScalarMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized object node.\n */\nvar SObjectNode = /** @class */ (function (_super) {\n    __extends(SObjectNode, _super);\n    function SObjectNode(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return SObjectNode;\n}(SScalar));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SObjectNodeMemory(parent, name, properties, lock, SObjectNode);\n    },\n    getConstructor_: function () {\n        return SObjectNode;\n    },\n    getType_: function () {\n        return 7 /* OBJECT_NODE */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SQueueData = /** @class */ (function () {\n    function SQueueData(queue, capacity) {\n        if (queue === void 0) { queue = []; }\n        if (capacity === void 0) { capacity = 2147483647; }\n        this._queue = queue;\n        this._capacity = capacity;\n    }\n    return SQueueData;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SQueuePatchMap = /** @class */ (function () {\n    function SQueuePatchMap() {\n        this._added = [];\n        this._removed = 0;\n        this._capacity = -1;\n    }\n    SQueuePatchMap.prototype.add_ = function (value) {\n        this._added.push(value);\n    };\n    SQueuePatchMap.prototype.addAll_ = function (values) {\n        for (var i = 0, imax = values.length; i < imax; ++i) {\n            this._added.push(values[i]);\n        }\n    };\n    SQueuePatchMap.prototype.remove_ = function () {\n        this._removed += 1;\n    };\n    SQueuePatchMap.prototype.capacity_ = function (capacity) {\n        this._capacity = capacity;\n    };\n    SQueuePatchMap.prototype.getWeight_ = function () {\n        return this._added.length;\n    };\n    SQueuePatchMap.prototype.isReset_ = function () {\n        return false;\n    };\n    SQueuePatchMap.prototype.serialize_ = function (result) {\n        result.push(this._added, this._removed, this._capacity);\n    };\n    return SQueuePatchMap;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SQueuePatchReset = /** @class */ (function () {\n    function SQueuePatchReset() {\n    }\n    SQueuePatchReset.prototype.add_ = function () {\n        // DO NOTHING\n    };\n    SQueuePatchReset.prototype.addAll_ = function () {\n        // DO NOTHING\n    };\n    SQueuePatchReset.prototype.remove_ = function () {\n        // DO NOTHING\n    };\n    SQueuePatchReset.prototype.capacity_ = function () {\n        // DO NOTHING\n    };\n    SQueuePatchReset.prototype.getWeight_ = function () {\n        return 1;\n    };\n    SQueuePatchReset.prototype.isReset_ = function () {\n        return true;\n    };\n    SQueuePatchReset.prototype.serialize_ = function (result) {\n        // DO NOTHING\n    };\n    return SQueuePatchReset;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SQUEUE_PATCH_RESET_INSTANCE = new SQueuePatchReset();\nvar SQUEUE_PATCH_MAP_DUMMY = new SQueuePatchMap();\nvar SQueuePatches = /** @class */ (function (_super) {\n    __extends(SQueuePatches, _super);\n    function SQueuePatches() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    SQueuePatches.prototype.newPatchMap_ = function () {\n        return new SQueuePatchMap();\n    };\n    SQueuePatches.prototype.newPatchReset_ = function () {\n        return SQUEUE_PATCH_RESET_INSTANCE;\n    };\n    SQueuePatches.prototype.getPatchMapDummy_ = function () {\n        return SQUEUE_PATCH_MAP_DUMMY;\n    };\n    SQueuePatches.prototype.add_ = function (revision, value) {\n        this.getOrCreate_(revision).add_(value);\n    };\n    SQueuePatches.prototype.addAll_ = function (revision, values) {\n        this.getOrCreate_(revision).addAll_(values);\n    };\n    SQueuePatches.prototype.remove_ = function (revision) {\n        this.getOrCreate_(revision).remove_();\n    };\n    SQueuePatches.prototype.capacity_ = function (revision, capacity) {\n        this.getOrCreate_(revision).capacity_(capacity);\n    };\n    SQueuePatches.prototype.packReset_ = function (authorizedRevision, revision, data) {\n        return [authorizedRevision, revision - authorizedRevision, 0, data._queue, data._capacity];\n    };\n    return SQueuePatches;\n}(SPatches));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar checkCapacity = function (capacity) {\n    if (isNumber(capacity) !== true || capacity < 0) {\n        throw IllegalArgumentException.create();\n    }\n};\nvar removeHead = function (queue, size, removed) {\n    for (var i = 0; i < size; ++i) {\n        removed.push(queue[i]);\n    }\n    queue.splice(0, size);\n};\nvar removeTail = function (queue, from, removed) {\n    for (var i = from, imax = queue.length; i < imax; ++i) {\n        removed.push(queue[i]);\n    }\n    queue.splice(from, queue.length - from);\n};\nvar addTail = function (queue, from, values, added) {\n    for (var i = from, imax = values.length; i < imax; ++i) {\n        var value = values[i];\n        queue.push(value);\n        added.push(value);\n    }\n};\nvar patchReset$3 = function (values, capacity, data, added, removed) {\n    removed.length = 0;\n    added.length = 0;\n    if (0 <= capacity) {\n        data._capacity = capacity;\n    }\n    var queue = data._queue;\n    if (isEmptyArray(values)) {\n        removeHead(queue, queue.length, removed);\n    }\n    else {\n        var first = values[0];\n        for (var i = 0, imax = queue.length; i < imax; ++i) {\n            var value = queue[i];\n            if (isEqual(first, value) !== true) {\n                continue;\n            }\n            // REMOVE THE HEAD\n            removeHead(queue, i, removed);\n            // SEARCH AND REMOVE THE TAIL\n            i = 1;\n            imax = queue.length;\n            for (; i < imax; ++i) {\n                if (i < values.length && isEqual(values[i], queue[i])) {\n                    continue;\n                }\n                removeTail(queue, i, removed);\n                break;\n            }\n            // ADD THE REST\n            if (i < values.length) {\n                addTail(queue, i, values, added);\n            }\n            return;\n        }\n        removeHead(queue, queue.length, removed);\n        addTail(queue, 0, values, added);\n    }\n};\nvar patchMap$2 = function (cadded, cremoved, ccapacity, data, padded, premoved) {\n    var queue = data._queue;\n    for (var i = 0, imax = cadded.length; i < imax; ++i) {\n        var value = cadded[i];\n        queue.push(value);\n        padded.push(value);\n    }\n    for (var i = 0; i < cremoved; ++i) {\n        premoved.push(queue[i]);\n    }\n    queue.splice(0, cremoved);\n    if (0 <= ccapacity) {\n        data._capacity = ccapacity;\n    }\n};\nvar SQueueMemory = /** @class */ (function (_super) {\n    __extends(SQueueMemory, _super);\n    function SQueueMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, new SQueuePatches(properties)) || this;\n    }\n    SQueueMemory.prototype.makeInitValues_ = function () {\n        return new SQueueData();\n    };\n    SQueueMemory.prototype.newInitArgs_ = function () {\n        return [null, this._values._queue];\n    };\n    SQueueMemory.prototype.newValueArgs_ = function (initArgs) {\n        return [null, initArgs[1], []];\n    };\n    SQueueMemory.prototype.mergeEvents_ = function (current, previous) {\n        var cadded = current[1];\n        var cremoved = current[2];\n        var padded = previous[1];\n        var premoved = previous[2];\n        padded.push.apply(padded, cadded);\n        premoved.push.apply(premoved, cremoved);\n    };\n    SQueueMemory.prototype.toEventData_ = function (added, removed) {\n        return [null, added, removed];\n    };\n    SQueueMemory.prototype.getFirst_ = function (throwWhenFailed) {\n        if (isEmptyArray(this._values._queue)) {\n            if (throwWhenFailed) {\n                throw NoSuchElementException.create();\n            }\n            else {\n                return null;\n            }\n        }\n        return this._values._queue[0];\n    };\n    SQueueMemory.prototype.onAdd_ = function (value) {\n        this._patches.add_(this.getRevision_(), value);\n        this.toUpdated_();\n        return true;\n    };\n    SQueueMemory.prototype.onAddAll_ = function (values) {\n        this._patches.addAll_(this.getRevision_(), values);\n        this.toUpdated_();\n        return isNotEmptyArray(values);\n    };\n    SQueueMemory.prototype.onRemove_ = function () {\n        this._patches.remove_(this.getRevision_());\n        this.toUpdated_();\n    };\n    SQueueMemory.prototype.onClear_ = function () {\n        this._patches.clear_(this.getRevision_());\n        this.toUpdated_();\n    };\n    SQueueMemory.prototype.onCapacity_ = function (capacity) {\n        this._patches.capacity_(this.getRevision_(), capacity);\n        this.toUpdated_();\n    };\n    SQueueMemory.prototype.trimToCapacity_ = function (removed) {\n        var queue = this._values._queue;\n        var size = queue.length - this._values._capacity;\n        if (0 < size) {\n            for (var i = 0; i < size; ++i) {\n                removed.push(queue[i]);\n                this.onRemove_();\n            }\n            queue.splice(0, size);\n        }\n    };\n    SQueueMemory.prototype.add_ = function (element) {\n        checkSupported(this);\n        checkNonNullValue(this, element);\n        this.lock_();\n        try {\n            return this.add__(element);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SQueueMemory.prototype.addAll_ = function (elements) {\n        checkSupported(this);\n        checkNonNullValues(this, elements);\n        this.lock_();\n        try {\n            return this.addAll__(elements);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SQueueMemory.prototype.remove_ = function () {\n        checkSupported(this);\n        this.lock_();\n        try {\n            return this.remove__(true);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SQueueMemory.prototype.poll_ = function () {\n        checkSupported(this);\n        this.lock_();\n        try {\n            return this.remove__(false);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SQueueMemory.prototype.clear_ = function () {\n        checkSupported(this);\n        this.lock_();\n        try {\n            this.clear__();\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SQueueMemory.prototype.add__ = function (value) {\n        var added = [value];\n        var removed = [];\n        this._values._queue.push(value);\n        this.onAdd_(value);\n        this.trimToCapacity_(removed);\n        this.getAndIncrementRevision_();\n        this.pushChangeEvent_(added, this.toEventData_(added, removed));\n        return true;\n    };\n    SQueueMemory.prototype.addAll__ = function (values) {\n        var added = [];\n        var removed = [];\n        for (var i = 0, imax = values.length; i < imax; ++i) {\n            var newValue = values[i];\n            added.push(newValue);\n            this._values._queue.push(newValue);\n        }\n        if (isNotEmptyArray(added)) {\n            this.onAddAll_(values);\n            this.trimToCapacity_(removed);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(added, this.toEventData_(added, removed));\n            return true;\n        }\n        return false;\n    };\n    SQueueMemory.prototype.remove__ = function (throwWhenFailed) {\n        if (isEmptyArray(this._values._queue)) {\n            if (throwWhenFailed) {\n                throw NoSuchElementException.create();\n            }\n            else {\n                return null;\n            }\n        }\n        var added = [];\n        var removed = this._values._queue.splice(0, 1);\n        this.onRemove_();\n        this.getAndIncrementRevision_();\n        this.pushChangeEvent_(added, this.toEventData_(added, removed));\n        return removed[0];\n    };\n    SQueueMemory.prototype.clear__ = function () {\n        var added = [];\n        var removed = [];\n        var queue = this._values._queue;\n        for (var i = 0, imax = queue.length; i < imax; ++i) {\n            removed.push(queue[i]);\n        }\n        queue.splice(0, queue.length);\n        if (isNotEmptyArray(removed)) {\n            this.onClear_();\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(added, this.toEventData_(added, removed));\n        }\n    };\n    SQueueMemory.prototype.clearAndAdd_ = function (element) {\n        checkSupported(this);\n        checkNonNullValue(this, element);\n        this.lock_();\n        try {\n            return this.clearAndAdd__(element);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SQueueMemory.prototype.clearAndAdd__ = function (newValue) {\n        var queue = this._values._queue;\n        var added = [newValue];\n        var removed = [];\n        for (var i = 0, imax = queue.length; i < imax; ++i) {\n            removed.push(queue[i]);\n        }\n        queue.splice(0, queue.length);\n        this.onClear_();\n        queue.push(newValue);\n        this.onAdd_(newValue);\n        this.trimToCapacity_(removed);\n        this.getAndIncrementRevision_();\n        this.pushChangeEvent_(added, this.toEventData_(added, removed));\n        return true;\n    };\n    SQueueMemory.prototype.clearAndAddAll_ = function (elements) {\n        checkSupported(this);\n        checkNonNullValues(this, elements);\n        this.lock_();\n        try {\n            return this.clearAndAddAll__(elements);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SQueueMemory.prototype.clearAndAddAll__ = function (newValues) {\n        var values = this._values._queue;\n        var removed = [];\n        for (var i = 0, imax = values.length; i < imax; ++i) {\n            removed.push(values[i]);\n        }\n        values.splice(0, values.length);\n        var added = [];\n        for (var i = 0, imax = newValues.length; i < imax; ++i) {\n            var newValue = newValues[i];\n            added.push(newValue);\n            values.push(newValue);\n        }\n        if (isNotEmptyArray(added) || isNotEmptyArray(removed)) {\n            this.onClear_();\n            this.onAddAll_(newValues);\n            this.trimToCapacity_(removed);\n            this.getAndIncrementRevision_();\n            this.pushChangeEvent_(added, this.toEventData_(added, removed));\n            return true;\n        }\n        return false;\n    };\n    SQueueMemory.prototype.getCapacity_ = function () {\n        return this._values._capacity;\n    };\n    SQueueMemory.prototype.setCapacity_ = function (capacity) {\n        checkSupported(this);\n        checkNonNull(capacity);\n        checkCapacity(capacity);\n        this.lock_();\n        try {\n            return this.setCapacity__(capacity);\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    SQueueMemory.prototype.setCapacity__ = function (newCapacity) {\n        var oldCapacity = this._values._capacity;\n        if (newCapacity !== oldCapacity) {\n            this._values._capacity = newCapacity;\n            this.onCapacity_(newCapacity);\n            var removed = [];\n            this.trimToCapacity_(removed);\n            this.getAndIncrementRevision_();\n            if (isNotEmptyArray(removed)) {\n                var added = [];\n                this.pushChangeEvent_(added, this.toEventData_(added, removed));\n            }\n        }\n        return oldCapacity;\n    };\n    SQueueMemory.prototype.get_ = function (index) {\n        var queue = this._values._queue;\n        checkRange(index, 0, queue.length);\n        return queue[index];\n    };\n    SQueueMemory.prototype.size_ = function () {\n        return this._values._queue.length;\n    };\n    SQueueMemory.prototype.isEmpty_ = function () {\n        return isEmptyArray(this._values._queue);\n    };\n    SQueueMemory.prototype.each_ = function (iteratee, thisArg, reverse) {\n        var queue = this._values._queue;\n        var wrapper = this.getWrapper_();\n        if (reverse) {\n            for (var i = queue.length - 1; 0 <= i; --i) {\n                if (iteratee.call(thisArg, queue[i], i, wrapper) === false) {\n                    return;\n                }\n            }\n        }\n        else {\n            for (var i = 0, imax = queue.length; i < imax; ++i) {\n                if (iteratee.call(thisArg, queue[i], i, wrapper) === false) {\n                    return;\n                }\n            }\n        }\n    };\n    SQueueMemory.prototype.find_ = function (predicate, thisArg, reverse) {\n        var queue = this._values._queue;\n        var wrapper = this.getWrapper_();\n        if (reverse) {\n            for (var i = queue.length - 1; 0 <= i; --i) {\n                if (predicate.call(thisArg, queue[i], i, wrapper) === true) {\n                    return queue[i];\n                }\n            }\n        }\n        else {\n            for (var i = 0, imax = queue.length; i < imax; ++i) {\n                if (predicate.call(thisArg, queue[i], i, wrapper) === true) {\n                    return queue[i];\n                }\n            }\n        }\n        return null;\n    };\n    SQueueMemory.prototype.indexOf_ = function (value, comparator, thisArg) {\n        var queue = this._values._queue;\n        for (var i = 0, imax = queue.length; i < imax; ++i) {\n            if (comparator.call(thisArg, queue[i], value)) {\n                return i;\n            }\n        }\n        return -1;\n    };\n    SQueueMemory.prototype.lastIndexOf_ = function (value, comparator, thisArg) {\n        var queue = this._values._queue;\n        for (var i = queue.length; 0 <= i; --i) {\n            if (comparator.call(thisArg, queue[i], value)) {\n                return i;\n            }\n        }\n        return -1;\n    };\n    SQueueMemory.prototype.contains_ = function (value, comparator, thisArg) {\n        return 0 <= this.indexOf_(value, comparator, thisArg);\n    };\n    SQueueMemory.prototype.containsAll_ = function (values, comparator, thisArg) {\n        if (values != null && isNotEmptyArray(values)) {\n            for (var i = 0, imax = values.length; i < imax; ++i) {\n                if (this.indexOf_(values[i], comparator, thisArg) < 0) {\n                    return false;\n                }\n            }\n        }\n        return true;\n    };\n    SQueueMemory.prototype.patch_ = function (patches) {\n        var revision = this.getRevision_();\n        var data = this._values;\n        var added = [];\n        var removed = [];\n        var type = patches[2];\n        if (type === 0) {\n            patchReset$3(patches[3], patches[4], data, added, removed);\n        }\n        else {\n            var startRevision = patches[0];\n            var ceilingRevision = Math.max(revision - startRevision, 0);\n            for (var i = 3, imax = patches.length; i < imax; i += 4) {\n                if (ceilingRevision <= patches[i + 0]) {\n                    patchMap$2(patches[i + 1], patches[i + 2], patches[i + 3], data, added, removed);\n                }\n            }\n        }\n        if (isEmptyArray(added) && isEmptyArray(removed)) {\n            return null;\n        }\n        else {\n            return [null, added, removed];\n        }\n    };\n    SQueueMemory.prototype.toArray_ = function () {\n        return this._values._queue;\n    };\n    SQueueMemory.prototype.toJson_ = function () {\n        return this._values._queue;\n    };\n    SQueueMemory.prototype.toString_ = function () {\n        return JSON.stringify(this._values._queue);\n    };\n    SQueueMemory.prototype.fromJson_ = function (json) {\n        if (isArray(json)) {\n            this.clearAndAddAll_(json);\n        }\n    };\n    return SQueueMemory;\n}(SContainerMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized read-only queue.\n *\n * @param V a value type\n */\nvar SROQueue = /** @class */ (function (_super) {\n    __extends(SROQueue, _super);\n    function SROQueue(memory) {\n        return _super.call(this, memory) || this;\n    }\n    /**\n     * Returns the capacity.\n     *\n     * @returns {number} the capacity\n     */\n    SROQueue.prototype.getCapacity = function () {\n        return this.__mem__.getCapacity_();\n    };\n    /** @hidden */\n    SROQueue.prototype.capacity = function () {\n        return this.__mem__.getCapacity_();\n    };\n    /**\n     * Returns an element at the specified index.\n     *\n     * @param {number} index an index of the element\n     * @returns {*} the element at the specified index\n     * @throws Error if the index is out of bounds (index < 0 || size() <= index)\n     */\n    SROQueue.prototype.get = function (index) {\n        return this.__mem__.get_(index);\n    };\n    /**\n     * Returns the head of this queue, or returns null if this queue is empty.\n     *\n     * @returns the head of this queue, or returns null if this queue is empty\n     */\n    SROQueue.prototype.element = function () {\n        return this.__mem__.getFirst_(true);\n    };\n    /**\n     * Returns the head of this queue, or returns null if this queue is empty.\n     *\n     * @returns the head of this queue, or returns null if this queue is empty\n     */\n    SROQueue.prototype.peek = function () {\n        return this.__mem__.getFirst_(false);\n    };\n    /**\n     * Returns the size.\n     *\n     * @returns the size\n     */\n    SROQueue.prototype.size = function () {\n        return this.__mem__.size_();\n    };\n    /**\n     * Returns true if this queue is empty.\n     *\n     * @returns {boolean} true if this queue is empty\n     */\n    SROQueue.prototype.isEmpty = function () {\n        return this.__mem__.isEmpty_();\n    };\n    /**\n     * Iterates over elements of this queue, calling the iteratee for each element.\n     * The iteratee is bound to the thisArg and invoked with three arguments: value, key, this queue.\n     * The iteratee may exit iteration early by explicitly returning false.\n     *\n     * @param iteratee the function called per iteration\n     * @param thisArg the this binding of the iteratee\n     * @param reverse true to iterate in the reverse order\n     * @returns this\n     */\n    SROQueue.prototype.each = function (iteratee, thisArg, reverse) {\n        if (thisArg === void 0) { thisArg = this; }\n        if (reverse === void 0) { reverse = false; }\n        this.__mem__.each_(iteratee, thisArg, reverse);\n        return this;\n    };\n    /**\n     * Returns the first element which the specified predicate returns true, or null if there is no such element.\n     * The predicate is bound to the thisArg and invoked with three arguments: element, index and this instance.\n     *\n     * @param predicate the function called per iteration\n     * @param thisArg the this binding of the predicate\n     * @param reverse true to iterate in the reverse order\n     * @returns the first element which the predicate returns true, or null if there is no such element\n     */\n    SROQueue.prototype.find = function (predicate, thisArg, reverse) {\n        if (thisArg === void 0) { thisArg = this; }\n        if (reverse === void 0) { reverse = false; }\n        return this.__mem__.find_(predicate, thisArg, reverse);\n    };\n    /**\n     * Returns the index of the specified value.\n     *\n     * @param element value to search for\n     * @param comparator comparator\n     * @param thisArg context of the comparator\n     * @returns the index of the specified value or -1 if this queue does not contain the specified value\n     */\n    SROQueue.prototype.indexOf = function (element, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.indexOf_(element, comparator, thisArg);\n    };\n    /**\n     * Returns the last index of the specified value.\n     *\n     * @param element value to search for\n     * @param comparator comparator\n     * @param thisArg context of the comparator\n     * @returns the last index of the specified value or -1 if this queue does not contain the specified value\n     */\n    SROQueue.prototype.lastIndexOf = function (element, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.lastIndexOf_(element, comparator, thisArg);\n    };\n    /**\n     * Returns true if this queue contains the specified value.\n     *\n     * @param element value to search for\n     * @param comparator comparator\n     * @param thisArg context of the comparator\n     * @returns true if this queue contains the specified value\n     */\n    SROQueue.prototype.contains = function (element, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.contains_(element, comparator, thisArg);\n    };\n    /**\n     * Returns true if this queue contains all the specified values.\n     *\n     * @param elements values to search for\n     * @param comparator comparator\n     * @param thisArg context of the comparator\n     * @returns true if this queue contains all the specified values\n     */\n    SROQueue.prototype.containsAll = function (elements, comparator, thisArg) {\n        if (comparator === void 0) { comparator = defaultComparator; }\n        if (thisArg === void 0) { thisArg = this; }\n        return this.__mem__.containsAll_(elements, comparator, thisArg);\n    };\n    /**\n     * Returns the array representing this queue.\n     * Must not change the returned array.\n     *\n     * @returns the array representing this queue\n     */\n    SROQueue.prototype.toArray = function () {\n        return this.__mem__.toArray_();\n    };\n    SROQueue.prototype.toJson = function () {\n        return this.__mem__.toJson_();\n    };\n    SROQueue.prototype.toString = function () {\n        return this.__mem__.toString_();\n    };\n    return SROQueue;\n}(SContainer));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SQueueMemory(parent, name, properties, lock, SROQueue);\n    },\n    getConstructor_: function () {\n        return SROQueue;\n    },\n    getType_: function () {\n        return 12 /* RO_QUEUE */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized queue.\n *\n * @param V a value type\n */\nvar SQueue = /** @class */ (function (_super) {\n    __extends(SQueue, _super);\n    function SQueue(memory) {\n        return _super.call(this, memory) || this;\n    }\n    /**\n     * Adds the specified element to this queue.\n     *\n     * @param element the element to be added\n     * @throws Error if this is read-only\n     * @throws Error if the specified element is null and this does not support a null element\n     * @returns true\n     */\n    SQueue.prototype.add = function (element) {\n        return this.__mem__.add_(element);\n    };\n    /**\n     * Adds all the elements of the specified array to this queue.\n     *\n     * @param elements the array of elements to be inserted\n     * @throws Error if this is read-only\n     * @throws Error if the specified array is null\n     * @throws Error if the specified array contains null and this does not support a null value\n     * @returns true if this queue is changed as a result of the call\n     */\n    SQueue.prototype.addAll = function (elements) {\n        return this.__mem__.addAll_(elements);\n    };\n    /**\n     * Adds the specified element to this queue.\n     *\n     * @param element the element to be added\n     * @throws Error if this is read-only\n     * @throws Error if the specified element is null and this does not support a null element\n     * @returns true\n     */\n    SQueue.prototype.offer = function (element) {\n        return this.__mem__.add_(element);\n    };\n    /**\n     * Removes and returns the first value.\n     *\n     * @returns the removed first element\n     * @throws Error if this is read-only\n     * @throws Error if this queue is empty\n     */\n    SQueue.prototype.remove = function () {\n        return this.__mem__.remove_();\n    };\n    /**\n     * Removes and returns the first value.\n     *\n     * @returns the removed first element, or null if this queue is empty\n     * @throws Error if this is read-only\n     */\n    SQueue.prototype.poll = function () {\n        return this.__mem__.poll_();\n    };\n    /**\n     * Removes all of the elements in this queue.\n     *\n     * @throws Error if this is read-only\n     * @returns this\n     */\n    SQueue.prototype.clear = function () {\n        this.__mem__.clear_();\n        return this;\n    };\n    /**\n     * Clear this queue and then appends the specified element at the end of this queue.\n     *\n     * @param element element to be pushed\n     * @throws Error if this is read-only\n     * @throws Error if the specified element is null and this does not support a null\n     * @returns true\n     */\n    SQueue.prototype.clearAndAdd = function (element) {\n        return this.__mem__.clearAndAdd_(element);\n    };\n    /**\n     * Clear this queue and then appends all of the elements in the specified array to the end of this queue.\n     *\n     * @param elements the array of elements to be appended\n     * @throws Error if this is read-only\n     * @throws Error if the specified array is null\n     * @throws Error if the specified array contains null and this does not support a null\n     * @returns true if this list is changed as a result of the call\n     */\n    SQueue.prototype.clearAndAddAll = function (elements) {\n        return this.__mem__.clearAndAddAll_(elements);\n    };\n    /**\n     * Clear this queue and then appends the specified element to this queue without raising an exception.\n     *\n     * @param element element to be appended to this queue\n     * @returns true if the specified element is successfully appended\n     * @throws Error if this queue does not permit null, and the specified element is null\n     */\n    SQueue.prototype.clearAndOffer = function (element) {\n        return this.__mem__.clearAndAdd_(element);\n    };\n    /**\n     * Clear this queue and then appends the specified elements to this queue.\n     *\n     * @param elements elements to be appended to this queue\n     * @returns true if this queue is changed as a result of the call\n     * @throws Error  if the specified collection is null, or if this queue does not permit null,\n     * and the specified collection contains null elements\n     */\n    SQueue.prototype.clearAndOfferAll = function (elements) {\n        return this.__mem__.clearAndAddAll_(elements);\n    };\n    /**\n     * Sets to the specified capacity.\n     * Older elements are removed to fit to the specified capacity\n     * if the number of elements this queue has is larger than the specified capacity.\n     *\n     * @param capacity the new capacity\n     * @returns the previous capacity\n     * @throws Error if this is read-only\n     * @throws Error if the specified capacity is null or negative\n     */\n    SQueue.prototype.setCapacity = function (capacity) {\n        return this.__mem__.setCapacity_(capacity);\n    };\n    /** @hidden */\n    SQueue.prototype.capacity = function (capacity) {\n        if (isNumber(capacity)) {\n            return this.__mem__.setCapacity_(capacity);\n        }\n        else {\n            return this.__mem__.getCapacity_();\n        }\n    };\n    /**\n     * Sets to the specified JSON array.\n     *\n     * @param json JSON array to be set\n     * @returns this\n     */\n    SQueue.prototype.fromJson = function (json) {\n        this.__mem__.fromJson_(json);\n        return this;\n    };\n    return SQueue;\n}(SROQueue));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SQueueMemory(parent, name, properties, lock, SQueue);\n    },\n    getConstructor_: function () {\n        return SQueue;\n    },\n    getType_: function () {\n        return 16 /* QUEUE */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SStringMemory = /** @class */ (function (_super) {\n    __extends(SStringMemory, _super);\n    function SStringMemory(parent, name, properties, lock, wrapperConstructor) {\n        return _super.call(this, parent, name, properties, lock, wrapperConstructor, 8 /* STRING */) || this;\n    }\n    SStringMemory.prototype.cast_ = function (value) {\n        if (isString(value)) {\n            return value;\n        }\n        return null;\n    };\n    SStringMemory.prototype.compareToIgnoreCase_ = function (other) {\n        var value = this.get_();\n        if (value != null) {\n            if (other != null) {\n                var a = value.toLowerCase();\n                var b = other.toLowerCase();\n                return (a < b ? -1 : (a > b ? +1 : 0));\n            }\n            else {\n                return +1;\n            }\n        }\n        else {\n            if (other != null) {\n                return -1;\n            }\n            else {\n                return 0;\n            }\n        }\n    };\n    SStringMemory.prototype.concat_ = function (string) {\n        var value = this.get_();\n        if (value == null) {\n            return null;\n        }\n        if (string != null) {\n            return value + string;\n        }\n        else {\n            return value;\n        }\n    };\n    SStringMemory.prototype.contains_ = function (sequence) {\n        return 0 <= this.indexOfString_(sequence, 0);\n    };\n    SStringMemory.prototype.endsWith_ = function (suffix) {\n        var value = this.get_();\n        if (value == null) {\n            return false;\n        }\n        var length = value.length;\n        return (value.substring(length - suffix.length, length) === suffix);\n    };\n    SStringMemory.prototype.equalsIgnoreCase_ = function (other) {\n        var value = this.get_();\n        if (other != null) {\n            if (value != null) {\n                return value.toLowerCase() === other.toLowerCase();\n            }\n            else {\n                return value === other;\n            }\n        }\n        else {\n            return value === other;\n        }\n    };\n    SStringMemory.prototype.indexOfString_ = function (substring, fromIndex) {\n        var value = this.get_();\n        if (value == null) {\n            return -1;\n        }\n        return value.indexOf(substring, fromIndex);\n    };\n    SStringMemory.prototype.isEmpty_ = function () {\n        return this.length_() <= 0;\n    };\n    SStringMemory.prototype.lastIndexOfString_ = function (substring, fromIndex) {\n        var value = this.get_();\n        if (value == null) {\n            return -1;\n        }\n        return value.lastIndexOf(substring, fromIndex);\n    };\n    SStringMemory.prototype.length_ = function () {\n        var value = this.get_();\n        if (value == null) {\n            return -1;\n        }\n        return value.length;\n    };\n    SStringMemory.prototype.matches_ = function (regex) {\n        var value = this.get_();\n        if (value == null) {\n            return false;\n        }\n        return value.match(regex) != null;\n    };\n    SStringMemory.prototype.startsWith_ = function (prefix, offset) {\n        var value = this.get_();\n        if (value == null) {\n            return false;\n        }\n        return (value.substring(offset, offset + prefix.length) === prefix);\n    };\n    SStringMemory.prototype.substring_ = function (beginIndex, endIndex) {\n        var value = this.get_();\n        if (value == null) {\n            throw IndexOutOfBoundsException.create();\n        }\n        if (beginIndex < 0 || endIndex < beginIndex) {\n            throw IndexOutOfBoundsException.create();\n        }\n        return value.substring(beginIndex, endIndex);\n    };\n    SStringMemory.prototype.toLowerCase_ = function () {\n        var value = this.get_();\n        if (value == null) {\n            return null;\n        }\n        return value.toLowerCase();\n    };\n    SStringMemory.prototype.toUpperCase_ = function () {\n        var value = this.get_();\n        if (value == null) {\n            return null;\n        }\n        return value.toUpperCase();\n    };\n    SStringMemory.prototype.trim_ = function () {\n        var value = this.get_();\n        if (value == null) {\n            return null;\n        }\n        return value.trim();\n    };\n    SStringMemory.prototype.toString_ = function () {\n        return String(this.get_());\n    };\n    SStringMemory.prototype.fromString_ = function (str) {\n        this.set_(str, false);\n    };\n    return SStringMemory;\n}(SScalarMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A synchronized string.\n */\nvar SString = /** @class */ (function (_super) {\n    __extends(SString, _super);\n    function SString(memory) {\n        return _super.call(this, memory) || this;\n    }\n    SString.prototype.compareToIgnoreCase = function (stringOrSScalar) {\n        return this.__mem__.compareToIgnoreCase_(toSScalarValue(stringOrSScalar));\n    };\n    /**\n     * Concatenates the specified string to the end of this string and returns a concatenated string.\n     * Returns null if this string is null.\n     *\n     * @param string string to be concatenated\n     * @returns concatenated string\n     */\n    SString.prototype.concat = function (string) {\n        return this.__mem__.concat_(string);\n    };\n    /**\n     * Returns true if this string contains the specified string.\n     *\n     * @param sequence sequence to search for\n     * @returns true if this string contains the specified string\n     */\n    SString.prototype.contains = function (sequence) {\n        return this.__mem__.contains_(sequence);\n    };\n    /**\n     * Returns true if this string ends with the specified suffix.\n     *\n     * @param suffix suffix to search for\n     * @returns true if this string ends with the specified suffix\n     */\n    SString.prototype.endsWith = function (suffix) {\n        return this.__mem__.endsWith_(suffix);\n    };\n    SString.prototype.equalsIgnoreCase = function (stringOrSScalar) {\n        return this.__mem__.equalsIgnoreCase_(toSScalarValue(stringOrSScalar));\n    };\n    SString.prototype.indexOf = function (substringOrValue, fromIndexOrComparator, thisArg) {\n        var m = this.__mem__;\n        if (fromIndexOrComparator == null) {\n            return m.indexOfString_(substringOrValue, 0);\n        }\n        else if (isNumber(fromIndexOrComparator)) {\n            return m.indexOfString_(substringOrValue, fromIndexOrComparator);\n        }\n        else {\n            return m.indexOf_(substringOrValue, fromIndexOrComparator, thisArg);\n        }\n    };\n    /**\n     * Returns true if length() is less than or equal to 0.\n     *\n     * @returns true if length() is less than or equal to 0\n     */\n    SString.prototype.isEmpty = function () {\n        return this.__mem__.isEmpty_();\n    };\n    SString.prototype.lastIndexOf = function (substringOrValue, fromIndexOrComparator, thisArg) {\n        var m = this.__mem__;\n        if (fromIndexOrComparator == null) {\n            return m.lastIndexOfString_(substringOrValue, +Infinity);\n        }\n        else if (isNumber(fromIndexOrComparator)) {\n            return m.lastIndexOfString_(substringOrValue, fromIndexOrComparator);\n        }\n        else {\n            return m.lastIndexOf_(substringOrValue, fromIndexOrComparator, thisArg);\n        }\n    };\n    /**\n     * Returns the length of this string.\n     * Returns -1 if this string is null.\n     *\n     * @returns length of this string\n     */\n    SString.prototype.length = function () {\n        return this.__mem__.length_();\n    };\n    SString.prototype.matches = function (regex) {\n        return this.__mem__.matches_(regex);\n    };\n    /**\n     * Returns true if the substring of this string beginning at the specified index starts with the specified prefix.\n     * Returns false if this string is null.\n     *\n     * @param prefix prefix to search for\n     * @param offset where to begin looking in this string\n     * @returns true if the substring of this string beginning at the specified index starts with the specified prefix\n     */\n    SString.prototype.startsWith = function (prefix, offset) {\n        if (offset === void 0) { offset = 0; }\n        return this.__mem__.startsWith_(prefix, offset);\n    };\n    /**\n     * Returns a new string that is a substring of this string.\n     *\n     * @param beginIndex beginning index (inclusive)\n     * @param endIndex ending index (exclusive)\n     * @returns substring of this string\n     * @throws Error if beginIndex is negative or larger than the length of this string object\n     */\n    SString.prototype.substring = function (beginIndex, endIndex) {\n        if (endIndex === void 0) { endIndex = this.length(); }\n        return this.__mem__.substring_(beginIndex, endIndex);\n    };\n    /**\n     * Converts all of the characters in this string to lower case using the rules of the default locale and returns it.\n     * Returns null if this string is null.\n     *\n     * @returns string converted to lowercase\n     */\n    SString.prototype.toLowerCase = function () {\n        return this.__mem__.toLowerCase_();\n    };\n    /**\n     * Converts all of the characters in this string to upper case using the rules of the default locale and returns it.\n     * Returns null if this string is null.\n     *\n     * @returns string converted to uppercase\n     */\n    SString.prototype.toUpperCase = function () {\n        return this.__mem__.toUpperCase_();\n    };\n    /**\n     * Returns a copy of this string, with leading and trailing whitespace omitted.\n     * Returns null if this string is null.\n     *\n     * @returns a copy of this string without leading and trailing whitespace\n     */\n    SString.prototype.trim = function () {\n        return this.__mem__.trim_();\n    };\n    SString.prototype.toString = function () {\n        return this.__mem__.toString_();\n    };\n    SString.prototype.fromString = function (str) {\n        this.__mem__.fromString_(str);\n        return this;\n    };\n    return SString;\n}(SScalar));\nSTypeToClass.put_({\n    create_: function (parent, name, properties, lock) {\n        return new SStringMemory(parent, name, properties, lock, SString);\n    },\n    getConstructor_: function () {\n        return SString;\n    },\n    getType_: function () {\n        return 8 /* STRING */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar data;\n(function (data) {\n    data.internal = internal;\n    data.SArrayNode = SArrayNode;\n    data.SBoolean = SBoolean;\n    data.SClass = SClass;\n    data.SDouble = SDouble;\n    data.SFloat = SFloat;\n    data.SInteger = SInteger;\n    data.SJsonNode = SJsonNode;\n    data.SList = SList;\n    data.SLong = SLong;\n    data.SMap = SMap;\n    data.SMovableList = SMovableList;\n    data.SNavigableMap = SNavigableMap;\n    data.SObjectNode = SObjectNode;\n    data.SQueue = SQueue;\n    data.SROQueue = SROQueue;\n    data.SString = SString;\n})(data || (data = {}));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar MessageEmitter = /** @class */ (function (_super) {\n    __extends(MessageEmitter, _super);\n    function MessageEmitter() {\n        var _this = _super.call(this) || this;\n        _this._handlers = [];\n        return _this;\n    }\n    MessageEmitter.prototype.addHandler = function (handler) {\n        this._handlers.push(handler);\n        return this;\n    };\n    MessageEmitter.prototype.removeHandler = function (handler) {\n        var handlers = this._handlers;\n        var index = handlers.indexOf(handler);\n        if (0 < index) {\n            handlers.splice(index, 1);\n        }\n        return this;\n    };\n    MessageEmitter.prototype.triggerHandlers = function (message) {\n        var handlers = this._handlers;\n        for (var i = 0, imax = handlers.length; i < imax; ++i) {\n            handlers[i](message);\n        }\n        return this;\n    };\n    return MessageEmitter;\n}(Connectable));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar isBFCached = function (settings) {\n    var storage = window.sessionStorage;\n    if (storage != null) {\n        var key = \"wcardinal-bfcache-\" + settings.path.content;\n        var storedSsid = storage.getItem(key);\n        if (storedSsid === settings.ssid) {\n            return true;\n        }\n        else {\n            storage.setItem(key, settings.ssid);\n            return false;\n        }\n    }\n    return false;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar IO_EVENT_CONNECTED = \"connected\";\nvar IO_EVENT_DISCONNECTED = \"disconnected\";\nvar IO_EVENT_FAILED = \"failed\";\nvar IO_EVENT_OPEN = \"open\";\nvar IO_EVENT_CLOSE = \"close\";\nvar IO_EVENT_ERROR = \"error\";\nvar IO_EVENT_MESSAGE = \"message\";\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * IO factory class\n */\nvar Ios = /** @class */ (function () {\n    function Ios() {\n        this._nameToIoConstructor = {};\n    }\n    /**\n     * Add the specified protocol and the specified IO class to this factory.\n     *\n     * @param protocol Protocol name.\n     * @param io IO class of the specified protocol.\n     * @returns this\n     */\n    Ios.prototype.add = function (protocol, ioConstructor) {\n        this._nameToIoConstructor[protocol] = ioConstructor;\n        return this;\n    };\n    /**\n     * Returns the IO class of the specified protocol.\n     *\n     * @param protocol Protocol name.\n     * @returns IO class providing communication methods of the specified protocol.\n     */\n    Ios.prototype.get = function (protocol) {\n        return this._nameToIoConstructor[protocol];\n    };\n    Ios.getInstance = function () {\n        if (this.INSTANCE == null) {\n            this.INSTANCE = new Ios();\n        }\n        return this.INSTANCE;\n    };\n    Ios.INSTANCE = null;\n    return Ios;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar now = Date.now || (function () { return new Date().getTime(); });\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar Ajax = /** @class */ (function () {\n    function Ajax() {\n        this._n = now();\n    }\n    Ajax.prototype.send = function (method, settings) {\n        var isCompleted = false;\n        var makeOnError = function (reason) {\n            return function () {\n                if (!isCompleted) {\n                    isCompleted = true;\n                    if (settings.error != null) {\n                        try {\n                            settings.error.call(settings.context, reason, xhr);\n                        }\n                        catch (e) {\n                            // DO NOTHING\n                        }\n                    }\n                    if (settings.complete != null) {\n                        settings.complete.call(settings.context, xhr);\n                    }\n                }\n            };\n        };\n        // XHR\n        var xhr = new XMLHttpRequest();\n        // Open\n        var url = settings.url;\n        if (settings.cache === false) {\n            url += (0 <= url.lastIndexOf(\"?\") ? \"&\" : \"?\") + \"_=\" + (this._n++);\n        }\n        xhr.open(method, url, true);\n        // Load\n        xhr.onload = function () {\n            if (!isCompleted) {\n                isCompleted = true;\n                var status_1 = xhr.status;\n                if ((200 <= status_1 && status_1 < 300) || status_1 === 0 || status_1 === 304 || status_1 === 1223) {\n                    if (settings.success != null) {\n                        if (settings.dataType === \"json\") {\n                            var json = null;\n                            try {\n                                json = JSON.parse(xhr.responseText);\n                            }\n                            catch (e) {\n                                if (settings.error != null) {\n                                    try {\n                                        settings.error.call(settings.context, \"parseerror\", xhr);\n                                    }\n                                    catch (e) {\n                                        // DO NOTHING\n                                    }\n                                }\n                                json = null;\n                            }\n                            if (json != null) {\n                                try {\n                                    settings.success.call(settings.context, json, xhr);\n                                }\n                                catch (e) {\n                                    // DO NOTHING\n                                }\n                            }\n                        }\n                        else {\n                            try {\n                                settings.success.call(settings.context, xhr.responseText, xhr);\n                            }\n                            catch (e) {\n                                // DO NOTHING\n                            }\n                        }\n                    }\n                }\n                else {\n                    if (settings.error != null) {\n                        try {\n                            settings.error.call(settings.context, xhr.statusText, xhr);\n                        }\n                        catch (e) {\n                            // DO NOTHING\n                        }\n                    }\n                }\n                if (settings.complete != null) {\n                    settings.complete.call(settings.context, xhr);\n                }\n            }\n        };\n        // Error\n        var onError = xhr.onerror = makeOnError(\"error\");\n        // Abort\n        xhr.onabort = makeOnError(\"abort\");\n        // Headers\n        var headers = settings.headers;\n        if (headers != null) {\n            for (var name_1 in headers) {\n                var header = headers[name_1];\n                if (header != null) {\n                    xhr.setRequestHeader(name_1, header);\n                }\n            }\n        }\n        xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n        // Timeout\n        if (settings.timeout != null) {\n            xhr.timeout = settings.timeout;\n            xhr.ontimeout = makeOnError(\"timeout\");\n            if (0 < settings.timeout) {\n                // For browsers which do not support the `timeout`\n                self.setTimeout(function () {\n                    xhr.abort();\n                }, settings.timeout);\n            }\n        }\n        // Send\n        try {\n            if (settings.data != null) {\n                xhr.send(settings.data);\n            }\n            else {\n                xhr.send();\n            }\n        }\n        catch (e) {\n            onError();\n        }\n        return this;\n    };\n    Ajax.prototype.get = function (settings) {\n        return this.send(\"GET\", settings);\n    };\n    Ajax.prototype.post = function (settings) {\n        return this.send(\"POST\", settings);\n    };\n    Ajax.prototype.delete = function (settings) {\n        return this.send(\"DELETE\", settings);\n    };\n    Ajax.prototype.patch = function (settings) {\n        return this.send(\"PATCH\", settings);\n    };\n    Ajax.prototype.encode = function (data) {\n        var parameters = [];\n        var euc = encodeURIComponent;\n        for (var key in data) {\n            if (hasOwn(data, key)) {\n                parameters.push(euc(key) + \"=\" + euc(String(data[key])));\n            }\n        }\n        return parameters.join(\"&\");\n    };\n    // Instance\n    Ajax.getInstance = function () {\n        if (this.INSTANCE == null) {\n            this.INSTANCE = new Ajax();\n        }\n        return this.INSTANCE;\n    };\n    Ajax.INSTANCE = null;\n    return Ajax;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar checkConnectingResults = function (results) {\n    if (results != null) {\n        for (var i = 0, imax = results.length; i < imax; ++i) {\n            var result = results[i];\n            if (result === false) {\n                return false;\n            }\n        }\n    }\n    return true;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar makeServerUrl = function (settings) {\n    var path = settings.path;\n    var href = location.protocol + \"//\" + location.host + location.pathname;\n    return href.substr(0, href.lastIndexOf(\"/\")) + path.content + path.query;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar toServerHeaders = function (mode, ssid, headers) {\n    var result = {\n        \"X-WCardinal-Mode\": mode,\n        \"X-WCardinal-SSID\": ssid\n    };\n    if (headers != null) {\n        for (var key in headers) {\n            if (Object.prototype.hasOwnProperty.call(headers, key)) {\n                result[key] = headers[key];\n            }\n        }\n    }\n    return result;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar sendAjaxRequest = function (settings, mode, data, timeout, headers, onSuccess, onError, context) {\n    Ajax.getInstance().post({\n        url: makeServerUrl(settings),\n        dataType: \"json\",\n        headers: toServerHeaders(mode, settings.ssid, headers),\n        timeout: timeout,\n        context: context,\n        data: data,\n        success: onSuccess,\n        error: onError\n    });\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar WEBSOCKET_PROTOCOL = \"websocket\";\nvar POLLING_PROTOCOL = \"polling\";\nvar SHARED_PROTOCOL = \"shared-\";\nvar SHARED_WEBSOCKET_PROTOCOL = SHARED_PROTOCOL + WEBSOCKET_PROTOCOL;\nvar SHARED_POLLING_PROTOCOL = SHARED_PROTOCOL + POLLING_PROTOCOL;\nvar ServerBase = /** @class */ (function () {\n    function ServerBase(settings, triggers) {\n        var _this = this;\n        LoggerImpl.getInstance().info(\"Server: \" + settings.ssid + \" **\" + settings.path.content);\n        this._triggers = triggers;\n        this._sttgs = settings;\n        this._unsentMessages = [];\n        this._unsentMessageId = 0;\n        this._isFirst = true;\n        this._keepAliveTimeoutId = null;\n        this._pingTimeoutId = null;\n        this._checkServerTimeoutId = null;\n        this._io = null;\n        this._protocol = null;\n        // For the back-forward cache issue\n        if (settings.bfcached === true) {\n            LoggerImpl.getInstance().info(\"Server: Detected back-forward cache\");\n            this._isFirst = false;\n            settings.ssid = \"_\";\n        }\n        // Bound functions\n        this._checkServerBound = function () {\n            return _this.checkServer_();\n        };\n        this._keepServerBound = function () {\n            return _this.keepServer_();\n        };\n        this._keepServerAlwaysBound = function () {\n            _this._keepAliveTimeoutId = self.setTimeout(_this._keepServerBound, _this.toRandomizedInterval_(settings.keep_alive.interval));\n            _this.callNext_(ServerBase._keepingServers, _this.sendKeepRequest_);\n        };\n        this._pingServerBound = function () {\n            return _this.pingServer_();\n        };\n        this._pingServerAlwaysBound = function () {\n            return _this.pingServerAlways_();\n        };\n        this._onConnectedBound = function () {\n            var io = _this._io;\n            if (io != null) {\n                _this.sendUnsents_(_this._unsentMessages, io);\n            }\n            _this._triggers._trigger(IO_EVENT_CONNECTED);\n        };\n        this._onDisconnectedBound = function () {\n            _this._triggers._trigger(IO_EVENT_DISCONNECTED);\n        };\n        this._onMessageBound = this.makeOnMessageBound_(settings.sync.process.interval);\n        this._onFailBound = function () {\n            _this._checkServerTimeoutId = self.setTimeout(_this._checkServerBound, _this.toRandomizedInterval_(settings.retry.delay));\n        };\n    }\n    ServerBase.prototype.getIo_ = function () {\n        return this._io;\n    };\n    ServerBase.prototype.getSettings_ = function () {\n        return this._sttgs;\n    };\n    ServerBase.prototype.connect_ = function () {\n        this.disconnect_();\n        var io = this._io;\n        var settings = this._sttgs;\n        if (io == null) {\n            var protocol = this.getProtocol_(settings.protocols);\n            if (protocol != null) {\n                var ioConstructor = Ios.getInstance().get(protocol);\n                if (ioConstructor != null) {\n                    io = this._io = new ioConstructor(settings.protocols[protocol]);\n                }\n                else {\n                    LoggerImpl.getInstance().info(\"No I/O class found for the protocol: \" + protocol);\n                    return this;\n                }\n            }\n            else {\n                LoggerImpl.getInstance().info(\"No protocols found\", settings.protocols);\n                return this;\n            }\n        }\n        io.on(IO_EVENT_CONNECTED, this._onConnectedBound);\n        io.on(IO_EVENT_DISCONNECTED, this._onDisconnectedBound);\n        io.addHandler(this._onMessageBound);\n        io.on(IO_EVENT_DISCONNECTED, this._onFailBound);\n        io.on(IO_EVENT_FAILED, this._onFailBound);\n        // Establish the connection\n        io.init();\n        if (this._isFirst) {\n            this._isFirst = false;\n            io.connect(settings.ssid);\n        }\n        else {\n            this._checkServerBound();\n        }\n        this._keepServerBound();\n        this._pingServerBound();\n        return this;\n    };\n    ServerBase.prototype.disconnect_ = function () {\n        var io = this._io;\n        if (io != null) {\n            this._io = null;\n            if (io.isConnected()) {\n                this._onDisconnectedBound();\n            }\n            io.off(IO_EVENT_CONNECTED, this._onConnectedBound);\n            io.off(IO_EVENT_DISCONNECTED, this._onDisconnectedBound);\n            io.removeHandler(this._onMessageBound);\n            io.off(IO_EVENT_DISCONNECTED, this._onFailBound);\n            io.off(IO_EVENT_FAILED, this._onFailBound);\n            io.disconnect();\n            io.destroy();\n        }\n        if (this._keepAliveTimeoutId != null) {\n            self.clearTimeout(this._keepAliveTimeoutId);\n            this._keepAliveTimeoutId = null;\n        }\n        this.keepServerRemove_();\n        if (this._pingTimeoutId != null) {\n            self.clearTimeout(this._pingTimeoutId);\n            this._pingTimeoutId = null;\n        }\n        this.pingServerRemove_();\n        return this;\n    };\n    ServerBase.prototype.isConnected_ = function () {\n        if (this._io == null) {\n            return false;\n        }\n        return this._io.isConnected();\n    };\n    ServerBase.prototype.setProtocol_ = function (protocol) {\n        if (Ios.getInstance().get(protocol) != null) {\n            this._protocol = protocol;\n        }\n        else {\n            LoggerImpl.getInstance().info(\"No such protocol: \" + protocol);\n        }\n        return this;\n    };\n    ServerBase.prototype.getProtocol_ = function (allowedProtocols) {\n        return ServerBase.findProtocol_(this._protocol, allowedProtocols);\n    };\n    ServerBase.prototype.send_ = function (type, content) {\n        var messageString = ServerBase.toMessageString_(type, content);\n        if (messageString != null) {\n            this.send__(messageString);\n        }\n        return this;\n    };\n    ServerBase.prototype.send__ = function (data) {\n        if (data != null) {\n            var io = this._io;\n            if (io == null || !io.isConnected() || io.send(\"[\" + data + \"]\") !== true) {\n                this.addUnsent_(this._unsentMessageId++, this._unsentMessages, data);\n            }\n        }\n        return this;\n    };\n    ServerBase.prototype.ajax_ = function (mode, data, timeout, headers, onSuccess, onError, context) {\n        sendAjaxRequest(this._sttgs, mode, data, timeout, headers, onSuccess, onError, context);\n    };\n    ServerBase.prototype.stopServerCheck_ = function () {\n        var checkServerTimeoutId = this._checkServerTimeoutId;\n        if (checkServerTimeoutId != null) {\n            self.clearTimeout(checkServerTimeoutId);\n        }\n    };\n    ServerBase.prototype.preprocessMessage_ = function (message, messageQueue, ackInfo) {\n        var type = message[0];\n        switch (type) {\n            case \"c\": // Connect message with a dynamic info\n            case \"u\": // Update message\n            case \"x\": // Update and ack messages\n                {\n                    var index = message.indexOf(type, 1);\n                    if (0 <= index) {\n                        var senderId = +message.substring(1, index);\n                        // AckInfo\n                        if (type === \"c\") {\n                            ackInfo[0] = \"b\";\n                        }\n                        else if (ackInfo[0] !== \"b\") {\n                            ackInfo[0] = \"a\";\n                        }\n                        ackInfo[1].push(senderId);\n                        // Message queue\n                        messageQueue.push(message.substring(index, message.length));\n                    }\n                }\n                break;\n            case \"d\": // Connect message without a dynamic info\n                ackInfo[0] = \"b\";\n                messageQueue.push(message);\n                break;\n            case \"a\": // Ack message\n                messageQueue.push(message);\n                break;\n        }\n    };\n    ServerBase.prototype.flush_ = function (messageQueue, ackInfo) {\n        if (isNotEmptyArray(messageQueue)) {\n            // Send ackInfo\n            var type = ackInfo[0];\n            if (type != null) {\n                var senderIds = ackInfo[1];\n                this.send_(type, senderIds);\n                ackInfo[0] = null;\n                senderIds.length = 0;\n            }\n            // Trigger handlers\n            this._triggers._triggerHandlers(messageQueue);\n            messageQueue.length = 0;\n        }\n    };\n    ServerBase.prototype.makeOnMessageBound_ = function (interval) {\n        var _this = this;\n        var ackInfo = [null, []];\n        var messageQueue = [];\n        if (0 < interval) {\n            var processMessageQueue_1 = function () {\n                _this.flush_(messageQueue, ackInfo);\n                self.setTimeout(processMessageQueue_1, interval);\n            };\n            processMessageQueue_1();\n            var MAXIMUM_MESSAGE_QUEUE_SIZE_1 = 10;\n            return function (message) {\n                _this.preprocessMessage_(message, messageQueue, ackInfo);\n                if (MAXIMUM_MESSAGE_QUEUE_SIZE_1 <= messageQueue.length) {\n                    _this.flush_(messageQueue, ackInfo);\n                }\n            };\n        }\n        else {\n            return function (message) {\n                _this.preprocessMessage_(message, messageQueue, ackInfo);\n                _this.flush_(messageQueue, ackInfo);\n            };\n        }\n    };\n    ServerBase.prototype.sendUnsents_ = function (unsents, io) {\n        if (isNotEmptyArray(unsents)) {\n            var messages = [];\n            for (var i = 0, imax = unsents.length; i < imax; ++i) {\n                messages.push(unsents[i].message);\n            }\n            if (io.send(\"[\" + messages.join(\",\") + \"]\")) {\n                unsents.length = 0;\n            }\n        }\n    };\n    ServerBase.prototype.addUnsent_ = function (id, unsents, messageString) {\n        var _this = this;\n        unsents.push({ message: messageString, id: id });\n        self.setTimeout(function () {\n            _this.cleanupUnsents_(unsents, id);\n        }, 10000);\n    };\n    ServerBase.prototype.cleanupUnsents_ = function (unsents, id) {\n        var size = unsents.length;\n        if (size <= 0) {\n            return;\n        }\n        for (var i = 0, imax = unsents.length; i < imax; ++i) {\n            var unsent = unsents[i];\n            if (id < unsent.id) {\n                size = i;\n                break;\n            }\n        }\n        if (0 < size) {\n            unsents.splice(0, size);\n        }\n    };\n    ServerBase.prototype.toRandomizedInterval_ = function (interval) {\n        var half = interval * 0.5;\n        return half + Math.round(Math.random() * half);\n    };\n    ServerBase.prototype.callNext_ = function (servers, method) {\n        servers.splice(0, 1);\n        if (isNotEmptyArray(servers)) {\n            method.call(servers[0]);\n        }\n    };\n    ServerBase.prototype.sendPingRequest_ = function () {\n        var io = this._io;\n        if (io != null && io.isConnected()) {\n            io.ping();\n        }\n        this._pingServerAlwaysBound();\n    };\n    ServerBase.prototype.pingServer_ = function () {\n        var pingServers = ServerBase._pingServers;\n        pingServers.push(this);\n        if (1 < ServerBase._pingServers.length) {\n            return;\n        }\n        this.sendPingRequest_();\n    };\n    ServerBase.prototype.pingServerAlways_ = function () {\n        var settings = this._sttgs;\n        this._pingTimeoutId = self.setTimeout(this._pingServerBound, this.toRandomizedInterval_(settings.keep_alive.ping));\n        this.callNext_(ServerBase._pingServers, this.sendPingRequest_);\n    };\n    ServerBase.prototype.pingServerRemove_ = function () {\n        var pingServers = ServerBase._pingServers;\n        for (var i = pingServers.length - 1; 0 <= i; --i) {\n            if (pingServers[i] === this) {\n                pingServers.splice(i, 1);\n            }\n        }\n    };\n    ServerBase.prototype.sendKeepRequest_ = function () {\n        var io = this._io;\n        if (io == null || !io.isConnected()) {\n            this._keepServerAlwaysBound();\n            return;\n        }\n        var settings = this._sttgs;\n        Ajax.getInstance().get({\n            url: makeServerUrl(settings),\n            cache: false,\n            headers: toServerHeaders(\"keep-alive\", settings.ssid, null),\n            timeout: settings.keep_alive.timeout,\n            complete: this._keepServerAlwaysBound\n        });\n    };\n    ServerBase.prototype.keepServer_ = function () {\n        var keepingServers = ServerBase._keepingServers;\n        keepingServers.push(this);\n        if (1 < keepingServers.length) {\n            return;\n        }\n        this.sendKeepRequest_();\n    };\n    ServerBase.prototype.keepServerRemove_ = function () {\n        var keepingServers = ServerBase._keepingServers;\n        for (var i = keepingServers.length - 1; 0 <= i; --i) {\n            if (keepingServers[i] === this) {\n                keepingServers.splice(i, 1);\n            }\n        }\n    };\n    ServerBase.prototype.sendRetryRequest_ = function () {\n        var _this = this;\n        this._checkServerTimeoutId = null;\n        var settings = this._sttgs;\n        Ajax.getInstance().get({\n            url: makeServerUrl(settings),\n            dataType: \"json\",\n            cache: false,\n            headers: toServerHeaders(\"retry\", settings.ssid, null),\n            timeout: settings.retry.timeout,\n            success: function (s) {\n                settings.ssid = s.ssid;\n                var io = _this._io;\n                if (io != null) {\n                    io.connect(settings.ssid);\n                }\n            },\n            error: function (reason, xhr) {\n                var results = _this._triggers._triggerAndGet(\"connecting\", null, [null, reason, xhr.status]);\n                if (checkConnectingResults(results)) {\n                    _this._checkServerTimeoutId = self.setTimeout(_this._checkServerBound, _this.toRandomizedInterval_(settings.retry.interval));\n                }\n            },\n            complete: function () {\n                _this.callNext_(ServerBase._checkingServers, _this.sendRetryRequest_);\n            }\n        });\n    };\n    ServerBase.prototype.checkServer_ = function () {\n        var checkingServers = ServerBase._checkingServers;\n        checkingServers.push(this);\n        if (1 < checkingServers.length) {\n            return;\n        }\n        this.sendRetryRequest_();\n    };\n    ServerBase.toMessageString_ = function (type, content) {\n        try {\n            return \"[\\\"\" + type + \"\\\",[\" + JSON.stringify(content) + \"]]\";\n        }\n        catch (e) {\n            LoggerImpl.getInstance().error(e);\n        }\n        return null;\n    };\n    ServerBase.findProtocol_ = function (protocol, allowedProtocols) {\n        if (protocol == null) {\n            var hasWebSocket = (typeof WebSocket !== \"undefined\");\n            if (allowedProtocols == null) {\n                if (hasWebSocket) {\n                    return WEBSOCKET_PROTOCOL;\n                }\n                else {\n                    return POLLING_PROTOCOL;\n                }\n            }\n            else {\n                if (hasWebSocket) {\n                    if (WEBSOCKET_PROTOCOL in allowedProtocols) {\n                        return WEBSOCKET_PROTOCOL;\n                    }\n                    if (SHARED_WEBSOCKET_PROTOCOL in allowedProtocols) {\n                        return SHARED_WEBSOCKET_PROTOCOL;\n                    }\n                }\n                if (POLLING_PROTOCOL in allowedProtocols) {\n                    return POLLING_PROTOCOL;\n                }\n                if (SHARED_POLLING_PROTOCOL in allowedProtocols) {\n                    return SHARED_POLLING_PROTOCOL;\n                }\n                return null;\n            }\n        }\n        else {\n            return protocol;\n        }\n    };\n    ServerBase._checkingServers = [];\n    ServerBase._keepingServers = [];\n    ServerBase._pingServers = [];\n    return ServerBase;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar ServerImpl = /** @class */ (function (_super) {\n    __extends(ServerImpl, _super);\n    function ServerImpl(settings) {\n        var _this = _super.call(this) || this;\n        settings.bfcached = isBFCached(settings);\n        _this._serverBase = new ServerBase(settings, {\n            _trigger: function (name) {\n                _this.triggerDirect(name, null, null, null);\n            },\n            _triggerAndGet: function (name, type, data) {\n                return _this.triggerDirect(name, type, data, []);\n            },\n            _triggerHandlers: function (messages) {\n                _this.triggerHandlers(messages);\n            }\n        });\n        return _this;\n    }\n    ServerImpl.prototype.getIo = function () {\n        return this._serverBase.getIo_();\n    };\n    ServerImpl.prototype.connect = function () {\n        this._serverBase.connect_();\n        return this;\n    };\n    ServerImpl.prototype.disconnect = function () {\n        this._serverBase.disconnect_();\n        return this;\n    };\n    ServerImpl.prototype.isConnected = function () {\n        return this._serverBase.isConnected_();\n    };\n    ServerImpl.prototype.setProtocol = function (protocol) {\n        this._serverBase.setProtocol_(protocol);\n        return this;\n    };\n    ServerImpl.prototype.getProtocol = function (allowedProtocols) {\n        return this._serverBase.getProtocol_(allowedProtocols);\n    };\n    ServerImpl.prototype.getSettings = function () {\n        return this._serverBase.getSettings_();\n    };\n    ServerImpl.prototype.send = function (type, content) {\n        this._serverBase.send_(type, content);\n        return this;\n    };\n    ServerImpl.prototype.ajax = function (mode, data, timeout, headers, onSuccess, onError, context) {\n        this._serverBase.ajax_(mode, data, timeout, headers, onSuccess, onError, context);\n    };\n    return ServerImpl;\n}(MessageEmitter));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar ServerConstructorImpl = ServerImpl;\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar inherit = (Object.create != null ?\n    function (target, superClass) {\n        target.superClass = superClass;\n        target.prototype = Object.create(superClass.prototype, {\n            constructor: {\n                value: target,\n                enumerable: false,\n                writable: true,\n                configurable: true\n            }\n        });\n    } :\n    function (target, superClass) {\n        target.superClass = superClass;\n        var TempClass = function () { };\n        TempClass.prototype = superClass.prototype;\n        target.prototype = new TempClass();\n        target.prototype.constructor = target;\n    });\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/** @hidden */\nvar globalCache = null;\nvar getGlobal = function () {\n    if (globalCache == null) {\n        if (typeof self !== \"undefined\") {\n            globalCache = self;\n        }\n        else if (typeof window !== \"undefined\") {\n            globalCache = window;\n        }\n        else if (typeof global !== \"undefined\") {\n            globalCache = global;\n        }\n    }\n    return globalCache;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar register = function (path, instance, lowerCase, root) {\n    if (lowerCase === void 0) { lowerCase = false; }\n    if (root === void 0) { root = getGlobal(); }\n    var splittedPath = path.trim().split(\".\");\n    var cd = root;\n    for (var i = 0, imax = splittedPath.length - 1; i < imax; ++i) {\n        var j = splittedPath[i];\n        cd[j] = cd[j] || {};\n        cd = cd[j];\n    }\n    var last = splittedPath[splittedPath.length - 1];\n    if (lowerCase) {\n        last = last[0].toLowerCase() + last.slice(1);\n    }\n    cd[last] = instance;\n    return instance;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar ControllerImpl = /** @class */ (function (_super) {\n    __extends(ControllerImpl, _super);\n    function ControllerImpl(__mem__) {\n        var _this = _super.call(this) || this;\n        _this.__mem__ = __mem__;\n        return _this;\n    }\n    ControllerImpl.prototype.isReadOnly = function () {\n        return this.__mem__.isReadOnly_();\n    };\n    ControllerImpl.prototype.isNonNull = function () {\n        return this.__mem__.isNonNull_();\n    };\n    ControllerImpl.prototype.isHistorical = function () {\n        return this.__mem__.isHistorical_();\n    };\n    ControllerImpl.prototype.getPages = function () {\n        return this.__mem__.getCtrlrWrappers_(1 /* PAGE */);\n    };\n    ControllerImpl.prototype.getPage = function (name) {\n        return this.__mem__.getCtrlrWrapper_(name, 1 /* PAGE */);\n    };\n    ControllerImpl.prototype.getActivePage = function () {\n        return this.__mem__.getActivePageWrapper_();\n    };\n    ControllerImpl.prototype.getPopups = function () {\n        return this.__mem__.getCtrlrWrappers_(2 /* POPUP */);\n    };\n    ControllerImpl.prototype.getPopup = function (name) {\n        return this.__mem__.getCtrlrWrapper_(name, 2 /* POPUP */);\n    };\n    ControllerImpl.prototype.getComponents = function () {\n        return this.__mem__.getCtrlrWrappers_(3 /* COMPONENT */);\n    };\n    ControllerImpl.prototype.getComponent = function (name) {\n        return this.__mem__.getCtrlrWrapper_(name, 3 /* COMPONENT */);\n    };\n    ControllerImpl.prototype.getPageFactories = function () {\n        return this.__mem__.getCtrlrWrappers_(5 /* PAGE_FACTORY */);\n    };\n    ControllerImpl.prototype.getPageFactory = function (name) {\n        return this.__mem__.getCtrlrWrapper_(name, 5 /* PAGE_FACTORY */);\n    };\n    ControllerImpl.prototype.getPopupFactories = function () {\n        return this.__mem__.getCtrlrWrappers_(6 /* POPUP_FACTORY */);\n    };\n    ControllerImpl.prototype.getPopupFactory = function (name) {\n        return this.__mem__.getCtrlrWrapper_(name, 6 /* POPUP_FACTORY */);\n    };\n    ControllerImpl.prototype.getComponentFactories = function () {\n        return this.__mem__.getCtrlrWrappers_(7 /* COMPONENT_FACTORY */);\n    };\n    ControllerImpl.prototype.getComponentFactory = function (name) {\n        return this.__mem__.getCtrlrWrapper_(name, 7 /* COMPONENT_FACTORY */);\n    };\n    ControllerImpl.prototype.getName = function () {\n        return this.__mem__.getName_();\n    };\n    ControllerImpl.prototype.getParent = function () {\n        var parent = this.__mem__.getParent_();\n        if (parent != null) {\n            return parent.getWrapper_();\n        }\n        return null;\n    };\n    ControllerImpl.prototype.show = function () {\n        this.__mem__.show_();\n        return this;\n    };\n    ControllerImpl.prototype.hide = function () {\n        this.__mem__.hide_();\n        return this;\n    };\n    ControllerImpl.prototype.isShown = function () {\n        return this.__mem__.isShown_();\n    };\n    ControllerImpl.prototype.isHidden = function () {\n        return !this.isShown();\n    };\n    ControllerImpl.prototype.uninitialize = function () {\n        this.__mem__.uninitialize_();\n        return this;\n    };\n    ControllerImpl.prototype.isInitialized = function () {\n        return this.__mem__.isInitialized_();\n    };\n    ControllerImpl.prototype.initialize = function () {\n        this.__mem__.initialize_();\n        return this;\n    };\n    ControllerImpl.prototype.lock = function () {\n        this.__mem__.lock_();\n        return this;\n    };\n    ControllerImpl.prototype.isLocked = function () {\n        return this.__mem__.isLocked_();\n    };\n    ControllerImpl.prototype.unlock = function () {\n        this.__mem__.unlock_();\n        return this;\n    };\n    ControllerImpl.prototype.each = function (iteratee, thisArg) {\n        if (thisArg === void 0) { thisArg = this; }\n        this.__mem__.each_(iteratee, thisArg);\n        return this;\n    };\n    ControllerImpl.prototype.toJson = function () {\n        return this.__mem__.toJson_();\n    };\n    ControllerImpl.prototype.toString = function () {\n        return this.__mem__.toString_();\n    };\n    return ControllerImpl;\n}(Connectable));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar RootControllerImpl = /** @class */ (function (_super) {\n    __extends(RootControllerImpl, _super);\n    function RootControllerImpl(__mem__) {\n        return _super.call(this, __mem__) || this;\n    }\n    RootControllerImpl.prototype.getServer = function () {\n        return this.__mem__.getServer_();\n    };\n    return RootControllerImpl;\n}(ControllerImpl));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar addEventListener = function (element, type, handler) {\n    element.addEventListener(type, handler, false);\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar Lock = /** @class */ (function () {\n    function Lock() {\n        this._count = 0;\n    }\n    Lock.prototype.lock = function () {\n        this._count += 1;\n        return this;\n    };\n    Lock.prototype.isLocked = function () {\n        return 0 < this._count;\n    };\n    Lock.prototype.unlock = function () {\n        this._count -= 1;\n        return this;\n    };\n    Lock.prototype.getHoldCount = function () {\n        return this._count;\n    };\n    return Lock;\n}());\n\n/**\n * @this {Promise}\n */\nfunction finallyConstructor(callback) {\n  var constructor = this.constructor;\n  return this.then(\n    function(value) {\n      // @ts-ignore\n      return constructor.resolve(callback()).then(function() {\n        return value;\n      });\n    },\n    function(reason) {\n      // @ts-ignore\n      return constructor.resolve(callback()).then(function() {\n        // @ts-ignore\n        return constructor.reject(reason);\n      });\n    }\n  );\n}\n\n// Store setTimeout reference so promise-polyfill will be unaffected by\n// other code modifying setTimeout (like sinon.useFakeTimers())\nvar setTimeoutFunc = setTimeout;\n\nfunction isArray$1(x) {\n  return Boolean(x && typeof x.length !== 'undefined');\n}\n\nfunction noop() {}\n\n// Polyfill for Function.prototype.bind\nfunction bind(fn, thisArg) {\n  return function() {\n    fn.apply(thisArg, arguments);\n  };\n}\n\n/**\n * @constructor\n * @param {Function} fn\n */\nfunction Promise$1(fn) {\n  if (!(this instanceof Promise$1))\n    throw new TypeError('Promises must be constructed via new');\n  if (typeof fn !== 'function') throw new TypeError('not a function');\n  /** @type {!number} */\n  this._state = 0;\n  /** @type {!boolean} */\n  this._handled = false;\n  /** @type {Promise|undefined} */\n  this._value = undefined;\n  /** @type {!Array<!Function>} */\n  this._deferreds = [];\n\n  doResolve(fn, this);\n}\n\nfunction handle(self, deferred) {\n  while (self._state === 3) {\n    self = self._value;\n  }\n  if (self._state === 0) {\n    self._deferreds.push(deferred);\n    return;\n  }\n  self._handled = true;\n  Promise$1._immediateFn(function() {\n    var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n    if (cb === null) {\n      (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n      return;\n    }\n    var ret;\n    try {\n      ret = cb(self._value);\n    } catch (e) {\n      reject(deferred.promise, e);\n      return;\n    }\n    resolve(deferred.promise, ret);\n  });\n}\n\nfunction resolve(self, newValue) {\n  try {\n    // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n    if (newValue === self)\n      throw new TypeError('A promise cannot be resolved with itself.');\n    if (\n      newValue &&\n      (typeof newValue === 'object' || typeof newValue === 'function')\n    ) {\n      var then = newValue.then;\n      if (newValue instanceof Promise$1) {\n        self._state = 3;\n        self._value = newValue;\n        finale(self);\n        return;\n      } else if (typeof then === 'function') {\n        doResolve(bind(then, newValue), self);\n        return;\n      }\n    }\n    self._state = 1;\n    self._value = newValue;\n    finale(self);\n  } catch (e) {\n    reject(self, e);\n  }\n}\n\nfunction reject(self, newValue) {\n  self._state = 2;\n  self._value = newValue;\n  finale(self);\n}\n\nfunction finale(self) {\n  if (self._state === 2 && self._deferreds.length === 0) {\n    Promise$1._immediateFn(function() {\n      if (!self._handled) {\n        Promise$1._unhandledRejectionFn(self._value);\n      }\n    });\n  }\n\n  for (var i = 0, len = self._deferreds.length; i < len; i++) {\n    handle(self, self._deferreds[i]);\n  }\n  self._deferreds = null;\n}\n\n/**\n * @constructor\n */\nfunction Handler(onFulfilled, onRejected, promise) {\n  this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n  this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n  this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, self) {\n  var done = false;\n  try {\n    fn(\n      function(value) {\n        if (done) return;\n        done = true;\n        resolve(self, value);\n      },\n      function(reason) {\n        if (done) return;\n        done = true;\n        reject(self, reason);\n      }\n    );\n  } catch (ex) {\n    if (done) return;\n    done = true;\n    reject(self, ex);\n  }\n}\n\nPromise$1.prototype['catch'] = function(onRejected) {\n  return this.then(null, onRejected);\n};\n\nPromise$1.prototype.then = function(onFulfilled, onRejected) {\n  // @ts-ignore\n  var prom = new this.constructor(noop);\n\n  handle(this, new Handler(onFulfilled, onRejected, prom));\n  return prom;\n};\n\nPromise$1.prototype['finally'] = finallyConstructor;\n\nPromise$1.all = function(arr) {\n  return new Promise$1(function(resolve, reject) {\n    if (!isArray$1(arr)) {\n      return reject(new TypeError('Promise.all accepts an array'));\n    }\n\n    var args = Array.prototype.slice.call(arr);\n    if (args.length === 0) return resolve([]);\n    var remaining = args.length;\n\n    function res(i, val) {\n      try {\n        if (val && (typeof val === 'object' || typeof val === 'function')) {\n          var then = val.then;\n          if (typeof then === 'function') {\n            then.call(\n              val,\n              function(val) {\n                res(i, val);\n              },\n              reject\n            );\n            return;\n          }\n        }\n        args[i] = val;\n        if (--remaining === 0) {\n          resolve(args);\n        }\n      } catch (ex) {\n        reject(ex);\n      }\n    }\n\n    for (var i = 0; i < args.length; i++) {\n      res(i, args[i]);\n    }\n  });\n};\n\nPromise$1.resolve = function(value) {\n  if (value && typeof value === 'object' && value.constructor === Promise$1) {\n    return value;\n  }\n\n  return new Promise$1(function(resolve) {\n    resolve(value);\n  });\n};\n\nPromise$1.reject = function(value) {\n  return new Promise$1(function(resolve, reject) {\n    reject(value);\n  });\n};\n\nPromise$1.race = function(arr) {\n  return new Promise$1(function(resolve, reject) {\n    if (!isArray$1(arr)) {\n      return reject(new TypeError('Promise.race accepts an array'));\n    }\n\n    for (var i = 0, len = arr.length; i < len; i++) {\n      Promise$1.resolve(arr[i]).then(resolve, reject);\n    }\n  });\n};\n\n// Use polyfill for setImmediate for performance gains\nPromise$1._immediateFn =\n  // @ts-ignore\n  (typeof setImmediate === 'function' &&\n    function(fn) {\n      // @ts-ignore\n      setImmediate(fn);\n    }) ||\n  function(fn) {\n    setTimeoutFunc(fn, 0);\n  };\n\nPromise$1._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n  if (typeof console !== 'undefined' && console) {\n    console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n  }\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/** @hidden */\nvar PromiseClass = (typeof Promise !== \"undefined\" ? Promise : Promise$1);\nObject.defineProperties(PromiseClass.prototype, {\n    timeout: {\n        value: function (timeout, onTimeoutOrReason) {\n            var _this = this;\n            return new Promise(function (resolve, reject) {\n                var timeoutId = self.setTimeout(function () {\n                    if (isFunction(onTimeoutOrReason)) {\n                        reject(onTimeoutOrReason());\n                    }\n                    else {\n                        reject(onTimeoutOrReason || \"timeout\");\n                    }\n                }, timeout || 0);\n                _this.then(function (result) {\n                    self.clearTimeout(timeoutId);\n                    resolve(result);\n                }, function (reason) {\n                    self.clearTimeout(timeoutId);\n                    reject(reason);\n                });\n            });\n        }\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A central class for callble methods.\n *\n * @param RESULT a return type\n * @param ARGUMENTS argument types\n */\nvar Callable = /** @class */ (function (_super) {\n    __extends(Callable, _super);\n    function Callable(__mem__) {\n        var _this = _super.call(this) || this;\n        _this.__mem__ = __mem__;\n        return _this;\n    }\n    Callable.prototype.timeout = function (timeout) {\n        this.__mem__.timeout_(timeout);\n        return this;\n    };\n    Callable.prototype.headers = function (headers) {\n        this.__mem__.headers_(headers);\n        return this;\n    };\n    Callable.prototype.ajax = function () {\n        this.__mem__.ajax_();\n        return this;\n    };\n    Callable.prototype.unajax = function () {\n        this.__mem__.unajax_();\n        return this;\n    };\n    Callable.prototype.safe = function () {\n        return this;\n    };\n    Callable.prototype.unsafe = function () {\n        return this;\n    };\n    Callable.prototype.call = function () {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        return this.invoke(args);\n    };\n    Callable.prototype.invoke = function (args) {\n        return this.__mem__.call_(args);\n    };\n    return Callable;\n}(Connectable));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * A central class for task methods.\n *\n * @param RESULT a result type\n * @param ARGUMENTS argument types\n */\nvar Task = /** @class */ (function (_super) {\n    __extends(Task, _super);\n    function Task(__mem__) {\n        var _this = _super.call(this) || this;\n        _this.__mem__ = __mem__;\n        return _this;\n    }\n    Task.prototype.getArguments = function () {\n        return this.__mem__.getArguments_();\n    };\n    Task.prototype.getArgument = function (index) {\n        return this.__mem__.getArgument_(index);\n    };\n    Task.prototype.getResult = function () {\n        return this.__mem__.getResult_();\n    };\n    Task.prototype.getReason = function () {\n        return this.__mem__.getReason_();\n    };\n    Task.prototype.create = function (args) {\n        this.__mem__.create_(args);\n        return this;\n    };\n    Task.prototype.isCanceled = function () {\n        return this.__mem__.isCanceled_();\n    };\n    Task.prototype.isSucceeded = function () {\n        return this.__mem__.isSucceeded_();\n    };\n    Task.prototype.isFailed = function () {\n        return this.__mem__.isFailed_();\n    };\n    Task.prototype.isDone = function () {\n        return this.__mem__.isDone_();\n    };\n    Task.prototype.cancel = function () {\n        this.__mem__.cancel_();\n        return this;\n    };\n    Task.prototype.isReadOnly = function () {\n        return this.__mem__.isReadOnly_();\n    };\n    Task.prototype.isNonNull = function () {\n        return this.__mem__.isNonNull_();\n    };\n    Task.prototype.uninitialize = function () {\n        this.__mem__.uninitialize_();\n        return this;\n    };\n    Task.prototype.isInitialized = function () {\n        return this.__mem__.isInitialized_();\n    };\n    Task.prototype.initialize = function () {\n        this.__mem__.initialize_();\n        return this;\n    };\n    Task.prototype.lock = function () {\n        this.__mem__.lock_();\n        return this;\n    };\n    Task.prototype.isLocked = function () {\n        return this.__mem__.isLocked_();\n    };\n    Task.prototype.unlock = function () {\n        this.__mem__.unlock_();\n        return this;\n    };\n    Task.prototype.toJson = function () {\n        return this.__mem__.toJson_();\n    };\n    Task.prototype.toString = function () {\n        return this.__mem__.toString_();\n    };\n    return Task;\n}(Connectable));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar isThenable = function (target) {\n    return (target != null && isFunction(target.then));\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar CallableMemory = /** @class */ (function () {\n    function CallableMemory(parent, name, timeout, properties, makeWrapper) {\n        this._wrapper = makeWrapper(this);\n        this._name = name;\n        this._parent = parent;\n        this._timeout = timeout;\n        this._headers = null;\n        this._properties = properties;\n    }\n    CallableMemory.prototype.getWrapper_ = function () {\n        return this._wrapper;\n    };\n    CallableMemory.prototype.timeout_ = function (timeout) {\n        this._timeout = timeout;\n        return this;\n    };\n    CallableMemory.prototype.headers_ = function (headers) {\n        this._headers = headers;\n        return this;\n    };\n    CallableMemory.prototype.ajax_ = function () {\n        this._properties.add_(128 /* AJAX */);\n    };\n    CallableMemory.prototype.unajax_ = function () {\n        this._properties.remove_(128 /* AJAX */);\n    };\n    CallableMemory.prototype.call_ = function (args) {\n        if (this._properties.isLocal_()) {\n            args.unshift(null);\n            var wrapper_1 = this._wrapper;\n            var timeout_1 = this._timeout;\n            return new PromiseClass(function (resolve, reject) {\n                var results = wrapper_1.triggerDirect(EVENT_CALL, null, args, []);\n                if (isNotEmptyArray(results)) {\n                    var result = results[0];\n                    if (isThenable(result)) {\n                        result.then(resolve, reject);\n                    }\n                    else {\n                        resolve(result);\n                    }\n                }\n                else {\n                    resolve();\n                }\n                if (0 <= timeout_1) {\n                    self.setTimeout(function () {\n                        reject(\"timeout\");\n                    }, timeout_1);\n                }\n            });\n        }\n        else {\n            return this._parent.call_([this._name, args], this._timeout, this._headers, this._properties.isAjax_());\n        }\n    };\n    return CallableMemory;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar mapping$1 = {};\nvar ControllerTypeToClass = /** @class */ (function () {\n    function ControllerTypeToClass() {\n    }\n    ControllerTypeToClass.put_ = function (factory) {\n        mapping$1[factory.getType_()] = factory;\n    };\n    ControllerTypeToClass.getFactory_ = function (type) {\n        return mapping$1[type];\n    };\n    ControllerTypeToClass.getType_ = function (constructor) {\n        for (var type in mapping$1) {\n            var factory = mapping$1[type];\n            if (factory.getConstructor_() === constructor) {\n                return factory.getType_();\n            }\n        }\n        return null;\n    };\n    return ControllerTypeToClass;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar mergeHistoryTitle = function (title, piece, separator) {\n    if (piece != null && isNotEmptyArray(piece)) {\n        if (isNotEmptyArray(title)) {\n            return title + separator + piece;\n        }\n        else {\n            return piece;\n        }\n    }\n    return title;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar Properties = /** @class */ (function () {\n    function Properties(properties) {\n        this._properties = properties;\n    }\n    Properties.prototype.isReadOnly_ = function () {\n        return this.contains_(4 /* READ_ONLY */);\n    };\n    Properties.prototype.isNonNull_ = function () {\n        return this.contains_(16 /* NON_NULL */);\n    };\n    Properties.prototype.isSoft_ = function () {\n        return this.contains_(64 /* SOFT */);\n    };\n    Properties.prototype.isLocal_ = function () {\n        return this.contains_(256 /* LOCAL */);\n    };\n    Properties.prototype.isHistorical_ = function () {\n        return this.contains_(8 /* HISTORICAL */);\n    };\n    Properties.prototype.isAjax_ = function () {\n        return this.contains_(128 /* AJAX */);\n    };\n    Properties.prototype.add_ = function (properties) {\n        this._properties |= properties;\n        return this;\n    };\n    Properties.prototype.remove_ = function (properties) {\n        this._properties &= ~properties;\n        return this;\n    };\n    Properties.prototype.retain_ = function (properties) {\n        this._properties &= properties;\n        return this;\n    };\n    Properties.prototype.toggle_ = function (isOn, property) {\n        return (isOn ? this.add_(property) : this.remove_(property));\n    };\n    Properties.prototype.contains_ = function (property) {\n        return Properties.contains_(this._properties, property);\n    };\n    Properties.prototype.clone_ = function () {\n        return new Properties(this._properties);\n    };\n    Properties.nonOf_ = function () {\n        return new Properties(0 /* NONE */);\n    };\n    Properties.of_ = function (a) {\n        var args = arguments;\n        var properties = a;\n        for (var i = 1, imax = args.length; i < imax; ++i) {\n            properties |= args[i];\n        }\n        return new Properties(properties);\n    };\n    Properties.contains_ = function (properties, property) {\n        return (properties & property) !== 0;\n    };\n    return Properties;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar TASK_TYPE_TASK = \"TASK\";\nvar TASK_TYPE_CANCEL = \"CANCEL\";\nvar TASK_RESULT_TYPE_SUCCEEDED = \"succeeded\";\nvar TASK_RESULT_TYPE_CANCELED = \"canceled\";\nvar dummyEventOrigin = {\n    triggerEvents_: function () {\n        // DO NOTHING\n    }\n};\nvar TaskMemory = /** @class */ (function () {\n    function TaskMemory(parent, name, ssinfo, lock, makeWrapper) {\n        var _this = this;\n        this._isInitialized = false;\n        this._wrapper = this.initWrapper_(makeWrapper(this));\n        this._parent = parent;\n        this._name = name;\n        this._properties = new Properties(ssinfo[1]);\n        var $idn = this._$idn = \"$id@\" + name;\n        var $vtn = this._$vtn = \"$vt@\" + name;\n        var $vn = this._$vn = \"$v@\" + name;\n        var $pidn = this._$pidn = \"$pid@\" + name;\n        var $rtn = this._$rtn = \"$rt@\" + name;\n        var $rn = this._$rn = \"$r@\" + name;\n        var cp = this._properties.clone_().retain_(4 /* READ_ONLY */ | 256 /* LOCAL */);\n        var cpn = cp.clone_().add_(16 /* NON_NULL */);\n        var $id = this._$id = newMemory(SLongMemory, SLong, parent, $idn, cpn, lock);\n        var $vt = this._$vt = newMemory(SClassMemory, SClass, parent, $vtn, cpn, lock);\n        var $v = this._$v = newMemory(SArrayNodeMemory, SArrayNode, parent, $vn, cp, lock);\n        var $pid = this._$pid = newMemory(SLongMemory, SLong, parent, $pidn, cpn, lock);\n        var $rt = this._$rt = newMemory(SStringMemory, SString, parent, $rtn, cpn, lock);\n        var $r = this._$r = newMemory(SClassMemory, SClass, parent, $rn, cp, lock);\n        parent.addDataEventHandler_(function (nameToEvents) {\n            _this.dataEventHandler_(nameToEvents);\n        });\n        $vt.stopEvent_();\n        if (this._properties.isHistorical_()) {\n            parent.putHistoricalData_($vn, $v);\n            parent.putDataHistoryHook_($vn, function (_, part) {\n                _this.dataHistoryHook_(part);\n            });\n        }\n        else {\n            $v.stopEvent_();\n        }\n        $rt.stopEvent_();\n        $r.stopEvent_();\n    }\n    TaskMemory.prototype.initWrapper_ = function (wrapper) {\n        var _this = this;\n        wrapper.onon(EVENT_INIT, function (connection) {\n            connection.triggerDirect(wrapper, null, [null, wrapper]);\n        });\n        wrapper.onon(EVENT_VALUE, function (connection) {\n            connection.triggerDirect(wrapper, null, [null, wrapper]);\n        });\n        wrapper.onon(EVENT_SUCCESS, function (connection) {\n            if (_this.isDone_()) {\n                var type = _this._$rt.get_();\n                if (type != null) {\n                    if (type === TASK_RESULT_TYPE_SUCCEEDED) {\n                        connection.triggerDirect(wrapper, null, [null, _this._$r.get_(), wrapper]);\n                    }\n                }\n            }\n        });\n        wrapper.onon(EVENT_FAIL, function (connection) {\n            if (_this.isDone_()) {\n                var type = _this._$rt.get_();\n                if (type != null) {\n                    if (type !== TASK_RESULT_TYPE_SUCCEEDED) {\n                        connection.triggerDirect(wrapper, null, [null, type, wrapper]);\n                    }\n                }\n            }\n        });\n        return wrapper;\n    };\n    TaskMemory.prototype.getWrapper_ = function () {\n        return this._wrapper;\n    };\n    TaskMemory.prototype.isReadOnly_ = function () {\n        return this._properties.isReadOnly_();\n    };\n    TaskMemory.prototype.isNonNull_ = function () {\n        return this._properties.isNonNull_();\n    };\n    TaskMemory.prototype.create_ = function (args) {\n        checkSupported(this);\n        checkNonNullValues(this, args);\n        this._parent.lock_();\n        try {\n            this._$id.incrementAndGet_();\n            this._$vt.set_(TASK_TYPE_TASK, false);\n            this._$v.set_(args, true);\n        }\n        finally {\n            this._parent.unlock_();\n        }\n    };\n    TaskMemory.prototype.dataHistoryHook_ = function (part) {\n        try {\n            var str = decodeURIComponent(part);\n            var args = JSON.parse(str);\n            if (this._$v.equals_(args) !== true) {\n                this.create_(args);\n            }\n        }\n        catch (e) {\n            // DO NOTHING\n        }\n    };\n    // Event\n    TaskMemory.prototype.dataEventHandler_ = function (nameToEvents) {\n        if (this._$idn in nameToEvents) {\n            nameToEvents[this._$idn][0] = dummyEventOrigin;\n            this.dataEventHandlerId_(nameToEvents);\n        }\n        if (this._$pidn in nameToEvents) {\n            nameToEvents[this._$pidn][0] = dummyEventOrigin;\n            this.dataEventHandlerPid_(nameToEvents);\n        }\n    };\n    TaskMemory.prototype.getEvents_ = function (nameToEvents) {\n        var name = this._name;\n        if (name in nameToEvents) {\n            return nameToEvents[name][2];\n        }\n        else {\n            var result = [];\n            nameToEvents[name] = [this, {}, result, false];\n            return result;\n        }\n    };\n    TaskMemory.prototype.dataEventHandlerId_ = function (nameToEvents) {\n        var _this = this;\n        if (this.isDone_() !== true) {\n            var type1 = this._$vt.get_();\n            if (type1 != null) {\n                if (type1 === TASK_TYPE_TASK) {\n                    var args = this._$v.get_();\n                    var result = this._$r.get_();\n                    var events = this.getEvents_(nameToEvents);\n                    events.push([EVENT_CREATE, [null, args, this._wrapper]]);\n                    var changeValueEventArgs = [null, args, result, this._wrapper];\n                    events.push([EVENT_CHANGE, changeValueEventArgs]);\n                    events.push([EVENT_VALUE, changeValueEventArgs]);\n                }\n                if (this._properties.isLocal_()) {\n                    var id_1 = this._$id.get_();\n                    var type2 = this._$vt.get_();\n                    if (type2 === TASK_TYPE_TASK) {\n                        var args = [null].concat(this._$v.get_());\n                        var results = this._wrapper.triggerDirect(EVENT_CALL, null, args, []);\n                        if (isNotEmptyArray(results)) {\n                            var result = results[0];\n                            if (isThenable(result)) {\n                                result.then(function (newResult) { _this.completeWith_(id_1, newResult); }, function (reason) { _this.cancelWith_(id_1, reason); });\n                            }\n                            else {\n                                this.completeWith_(id_1, result);\n                            }\n                        }\n                    }\n                    else if (type2 === TASK_TYPE_CANCEL) {\n                        this.cancelWith_(id_1, TASK_RESULT_TYPE_CANCELED);\n                    }\n                }\n            }\n        }\n    };\n    TaskMemory.prototype.dataEventHandlerPid_ = function (nameToEvents) {\n        if (this.isDone_()) {\n            var type = this._$rt.get_();\n            if (type != null) {\n                var args = this._$v.get_();\n                var result = this._$r.get_();\n                var events = this.getEvents_(nameToEvents);\n                if (type === TASK_RESULT_TYPE_SUCCEEDED) {\n                    events.push([EVENT_SUCCESS, [null, result, this._wrapper]]);\n                }\n                else {\n                    events.push([EVENT_FAIL, [null, type, this._wrapper]]);\n                }\n                var changeValueEventArgs = [null, args, result, this._wrapper];\n                events.push([EVENT_CHANGE, changeValueEventArgs]);\n                events.push([EVENT_VALUE, changeValueEventArgs]);\n            }\n        }\n    };\n    TaskMemory.prototype.completeWith_ = function (id, result) {\n        if (this._$id.equals_(id)) {\n            this._parent.lock_();\n            try {\n                this._$pid.set_(id, false);\n                this._$rt.set_(TASK_RESULT_TYPE_SUCCEEDED, false);\n                this._$r.set_(result, false);\n            }\n            finally {\n                this._parent.unlock_();\n            }\n        }\n    };\n    TaskMemory.prototype.cancel_ = function () {\n        checkSupported(this);\n        this._parent.lock_();\n        try {\n            if (this._$id.equals_(this._$pid.get_()) !== true) {\n                var type = this._$vt.get_();\n                if (type === TASK_TYPE_TASK) {\n                    this._$id.incrementAndGet_();\n                    this._$vt.set_(TASK_TYPE_CANCEL, false);\n                }\n            }\n        }\n        finally {\n            this._parent.unlock_();\n        }\n    };\n    TaskMemory.prototype.cancelWith_ = function (id, reason) {\n        if (this._$id.equals_(id)) {\n            this._parent.lock_();\n            try {\n                this._$pid.set_(id, false);\n                this._$rt.set_(reason, false);\n            }\n            finally {\n                this._parent.unlock_();\n            }\n        }\n    };\n    TaskMemory.prototype.triggerEvents_ = function (eventMap, eventList, isFirst) {\n        for (var i = 0, imax = eventList.length; i < imax; ++i) {\n            var event_1 = eventList[i];\n            this._wrapper.triggerDirect(event_1[0], null, event_1[1], null);\n        }\n    };\n    TaskMemory.prototype.getArguments_ = function () {\n        return this._$v.get_();\n    };\n    TaskMemory.prototype.getArgument_ = function (index) {\n        var args = this._$v.get_();\n        if (args != null && 0 <= index && index < args.length) {\n            return args[index];\n        }\n        else {\n            return null;\n        }\n    };\n    TaskMemory.prototype.getResult_ = function () {\n        if (this._$rt.get_() === TASK_RESULT_TYPE_SUCCEEDED) {\n            return this._$r.get_();\n        }\n        else {\n            return null;\n        }\n    };\n    TaskMemory.prototype.getReason_ = function () {\n        var type = this._$rt.get_();\n        return ((type != null && type !== TASK_RESULT_TYPE_SUCCEEDED) ? type : null);\n    };\n    TaskMemory.prototype.isCanceled_ = function () {\n        if (this._$id.equals_(this._$pid.get_())) {\n            return (this._$rt.get_() === TASK_RESULT_TYPE_CANCELED);\n        }\n        else {\n            return false;\n        }\n    };\n    TaskMemory.prototype.isSucceeded_ = function () {\n        if (this._$id.equals_(this._$pid.get_())) {\n            return (this._$rt.get_() === TASK_RESULT_TYPE_SUCCEEDED);\n        }\n        else {\n            return false;\n        }\n    };\n    TaskMemory.prototype.isFailed_ = function () {\n        if (this._$id.equals_(this._$pid.get_())) {\n            var type = this._$rt.get_();\n            if (type != null && type !== TASK_RESULT_TYPE_SUCCEEDED) {\n                return true;\n            }\n            else {\n                return false;\n            }\n        }\n        else {\n            return false;\n        }\n    };\n    TaskMemory.prototype.isDone_ = function () {\n        return this._$id.equals_(this._$pid.get_());\n    };\n    TaskMemory.prototype.uninitialize_ = function () {\n        this._$id.uninitialize_();\n        this._$vt.uninitialize_();\n        this._$v.uninitialize_();\n        this._$pid.uninitialize_();\n        this._$rt.uninitialize_();\n        this._$r.uninitialize_();\n    };\n    TaskMemory.prototype.isInitialized_ = function () {\n        return (this._$vt.isInitialized_() &&\n            this._$v.isInitialized_() &&\n            this._$pid.isInitialized_() &&\n            this._$rt.isInitialized_() &&\n            this._$r.isInitialized_());\n    };\n    TaskMemory.prototype.initialize_ = function () {\n        this._$id.initialize_();\n        this._$vt.initialize_();\n        this._$v.initialize_();\n        this._$pid.initialize_();\n        this._$rt.initialize_();\n        this._$r.initialize_();\n    };\n    TaskMemory.prototype.toJson_ = function () {\n        return {\n            arguments: this.getArguments_(),\n            result: this.getResult_(),\n            isDone: this.isDone_(),\n            isSucceeded: this.isSucceeded_(),\n            reason: this.getReason_()\n        };\n    };\n    TaskMemory.prototype.toString_ = function () {\n        return JSON.stringify(this.toJson_());\n    };\n    TaskMemory.prototype.lock_ = function () {\n        this._parent.lock_();\n    };\n    TaskMemory.prototype.isLocked_ = function () {\n        return this._parent.isLocked_();\n    };\n    TaskMemory.prototype.unlock_ = function () {\n        this._parent.unlock_();\n    };\n    return TaskMemory;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar rejectOrResolveCallResult = function (result, resolve, reject) {\n    if (result == null) {\n        reject(\"unknown\");\n    }\n    else if (isString(result)) {\n        reject(result);\n    }\n    else if (isArray(result) && isNotEmptyArray(result)) {\n        resolve(result[0]);\n    }\n    else {\n        resolve();\n    }\n};\nvar isInSenderIds = function (senderIds, senderId) {\n    for (var i = 0, imax = senderIds.length; i < imax; ++i) {\n        if (senderIds[i] === senderId) {\n            return true;\n        }\n    }\n    return false;\n};\nvar ControllerMemory = /** @class */ (function () {\n    function ControllerMemory(name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, type) {\n        var _this = this;\n        this._isChanged = false;\n        this._visibility = true;\n        this._isInitialized = false;\n        this._data = {};\n        this._hdata = {};\n        this._hnames = [];\n        this._hasHData = false;\n        this._ctrlrs = {};\n        this._isEventStopped = false;\n        this._events = null;\n        this._dataHistoryHooks = {};\n        this._dataEventHandlers = [];\n        this._dataNameToHandlerName = {};\n        this._dynamicInfoHandlers = {};\n        this._callId = 0;\n        this._callCallbacks = {};\n        this._constants = {};\n        this._wrapper = this.initWrapper_(new wrapperConstructor(this));\n        this._parent = parent;\n        this._name = name;\n        this._lock = lock;\n        this._properties = new Properties(staticInfo[4]);\n        this._type = type;\n        // Create controller/data/constants\n        this.createControllers_(staticInfo, staticInstanceInfo);\n        // Callable\n        var cp = this._properties.clone_().retain_(256 /* LOCAL */);\n        this._callRequests = newMemory(SMapMemory, SMap, this, \"$cq\", cp, lock);\n        this._callResults = newMemory(SMapMemory, SMap, this, \"$cr\", cp, lock);\n        this._callResults.getWrapper_().on(EVENT_CHANGE, function (e, added, removed, updated) {\n            _this.onCallResultsChange_(added, removed, updated);\n        });\n        // Show/hide\n        this._pageActive = newMemory(SStringMemory, SString, this, \"$pa\", cp, lock);\n        this._pageActive.getWrapper_().on(EVENT_CHANGE, function (e, newValue, oldValue) {\n            _this.onPageActiveChange_(newValue, oldValue);\n        });\n        // Trigger\n        this._triggerRequests = newMemory(SMapMemory, SMap, this, \"$tq\", cp, lock);\n        this._triggerResults = newMemory(SMapMemory, SMap, this, \"$tr\", cp, lock);\n        this._triggerRequests.getWrapper_().on(EVENT_CHANGE, function (e, added, removed) {\n            _this.onTriggerRequestsChange_(added, removed);\n        });\n        this._triggerDirects = newMemory(SClassMemory, SClass, this, \"$td\", cp, lock);\n        this._triggerDirects.unpack_ = function (origin, value, revision) {\n            _this.triggerDirectUnpack_(_this._triggerDirects, origin, value, revision);\n        };\n    }\n    ControllerMemory.prototype.initWrapper_ = function (wrapper) {\n        var _this = this;\n        wrapper.onon(EVENT_SHOW, function (connection) {\n            if (_this._visibility) {\n                connection.triggerDirect(wrapper, null, [null, _this._name]);\n            }\n        });\n        wrapper.onon(EVENT_HIDE, function (connection) {\n            if (_this._visibility !== true) {\n                connection.triggerDirect(wrapper, null, [null, _this._name]);\n            }\n        });\n        wrapper.onon(EVENT_PAGE, function (connection) {\n            if (_this._pageActive.isInitialized_()) {\n                var pageName = _this._pageActive.get_();\n                connection.triggerDirect(wrapper, null, [null, pageName, pageName]);\n            }\n        });\n        wrapper.onon(EVENT_INIT, function (connection) {\n            if (_this.isInitialized_()) {\n                connection.triggerDirect(wrapper, null, [null, _this]);\n            }\n        });\n        wrapper.onon(EVENT_VALUE, function (connection) {\n            if (_this.isInitialized_()) {\n                connection.triggerDirect(wrapper, null, [null, _this]);\n            }\n        });\n        return wrapper;\n    };\n    ControllerMemory.prototype.getWrapper_ = function () {\n        return this._wrapper;\n    };\n    ControllerMemory.prototype.getType_ = function () {\n        return this._type;\n    };\n    ControllerMemory.prototype.getParent_ = function () {\n        return this._parent;\n    };\n    ControllerMemory.prototype.getName_ = function () {\n        return this._name;\n    };\n    ControllerMemory.prototype.putData_ = function (name, data) {\n        this._data[name] = data;\n    };\n    ControllerMemory.prototype.putHistoricalData_ = function (name, data) {\n        this._hnames.push(name);\n        this._hdata[name] = data;\n    };\n    ControllerMemory.prototype.putDataHistoryHook_ = function (name, hook) {\n        this._dataHistoryHooks[name] = hook;\n    };\n    ControllerMemory.prototype.putDynamicInfoHandlerDataName_ = function (dataName, handlerName) {\n        this._dataNameToHandlerName[dataName] = handlerName;\n    };\n    ControllerMemory.prototype.putDynamicInfoHandler_ = function (name, handler) {\n        this._dynamicInfoHandlers[name] = handler;\n    };\n    ControllerMemory.prototype.addDataEventHandler_ = function (eventHandler) {\n        this._dataEventHandlers.push(eventHandler);\n    };\n    ControllerMemory.prototype.getEventInfo_ = function () {\n        if (this.isEventStopped_()) {\n            return null;\n        }\n        var parent = this._parent;\n        if (parent != null) {\n            var parentEventInfo = parent.getEventInfo_();\n            if (parentEventInfo == null) {\n                return null;\n            }\n            var eventInfoMap = parentEventInfo.ctrlr;\n            if (eventInfoMap == null) {\n                eventInfoMap = {};\n                parentEventInfo.ctrlr = eventInfoMap;\n            }\n            var eventInfo = eventInfoMap[this._name];\n            if (eventInfo == null) {\n                eventInfo = {};\n                eventInfoMap[this._name] = eventInfo;\n            }\n            return eventInfo;\n        }\n        else if (this._events != null) {\n            return this._events;\n        }\n        else {\n            return this._events = {};\n        }\n    };\n    ControllerMemory.prototype.startEvent_ = function () {\n        this._isEventStopped = false;\n        return this;\n    };\n    ControllerMemory.prototype.isEventStopped_ = function () {\n        return this._isEventStopped;\n    };\n    ControllerMemory.prototype.stopEvent_ = function () {\n        this._isEventStopped = true;\n        return this;\n    };\n    ControllerMemory.prototype.isReadOnly_ = function () {\n        return this._properties.isReadOnly_();\n    };\n    ControllerMemory.prototype.isNonNull_ = function () {\n        return this._properties.isNonNull_();\n    };\n    ControllerMemory.prototype.isHistorical_ = function () {\n        return this._properties.isHistorical_();\n    };\n    ControllerMemory.prototype.isLocal_ = function () {\n        return this._properties.isLocal_();\n    };\n    ControllerMemory.prototype.lock_ = function () {\n        this._lock.lock();\n    };\n    ControllerMemory.prototype.isLocked_ = function () {\n        return this._lock.isLocked();\n    };\n    ControllerMemory.prototype.unlock_ = function () {\n        // Propagate the change flag\n        if (this._isChanged) {\n            this._isChanged = false;\n            this.update_();\n        }\n        // Unlock\n        var count = this._lock.getHoldCount();\n        if (count <= 1) {\n            // The last unlock\n            this.onUnlock_();\n        }\n        else {\n            // Otherwise\n            this._lock.unlock();\n        }\n    };\n    ControllerMemory.prototype.update_ = function () {\n        var parent = this._parent;\n        if (parent != null) {\n            parent.update_();\n        }\n    };\n    ControllerMemory.prototype.onUnlock_ = function () {\n        var parent = this._parent;\n        if (parent != null) {\n            parent.onUnlock_();\n        }\n    };\n    ControllerMemory.prototype.show_ = function () {\n        checkSupported(this);\n    };\n    ControllerMemory.prototype.hide_ = function () {\n        checkSupported(this);\n    };\n    ControllerMemory.prototype.showChild_ = function (child) {\n        this._pageActive.set_(child.getName_(), false);\n    };\n    ControllerMemory.prototype.hideChild_ = function (child) {\n        this._pageActive.compareAndSet_(child.getName_(), null, false);\n    };\n    ControllerMemory.prototype.each_ = function (iteratee, thisArg) {\n        var wrapper = this._wrapper;\n        return this.eachConstant_(function (constant, name) {\n            return iteratee.call(thisArg, constant, name, wrapper);\n        }) && this.eachDataAndCtrlrWrapper_(function (dataOrCtrlrWrapper, name) {\n            return iteratee.call(thisArg, dataOrCtrlrWrapper, name, wrapper);\n        });\n    };\n    ControllerMemory.prototype.eachDataAndCtrlrWrapper_ = function (iteratee, thisArg) {\n        var wrapper = this._wrapper;\n        return this.eachData_(function (data, name) {\n            return iteratee.call(thisArg, data.getWrapper_(), name, wrapper);\n        }) && this.eachCtrlr_(function (ctrlr, name) {\n            return iteratee.call(thisArg, ctrlr.getWrapper_(), name, wrapper);\n        });\n    };\n    ControllerMemory.prototype.eachConstant_ = function (iteratee) {\n        var constants = this._constants;\n        for (var name_1 in constants) {\n            var constant = constants[name_1];\n            if (iteratee(constant, name_1, this) === false) {\n                return false;\n            }\n        }\n        return true;\n    };\n    ControllerMemory.prototype.eachData_ = function (iteratee) {\n        var nameToData = this._data;\n        for (var name_2 in nameToData) {\n            if (name_2[0] !== \"$\") {\n                var data = nameToData[name_2];\n                if (data != null) {\n                    if (iteratee(data, name_2, this) === false) {\n                        return false;\n                    }\n                }\n            }\n        }\n        return true;\n    };\n    ControllerMemory.prototype.eachCtrlr_ = function (iteratee) {\n        var ctrlrs = this._ctrlrs;\n        for (var name_3 in ctrlrs) {\n            var ctrlr = ctrlrs[name_3];\n            if (ctrlr != null) {\n                if (iteratee(ctrlr, name_3, this) === false) {\n                    return false;\n                }\n            }\n        }\n        return true;\n    };\n    ControllerMemory.prototype.onShow_ = function () {\n        this._wrapper.triggerDirect(EVENT_SHOW, null, [null, this._name], null);\n    };\n    ControllerMemory.prototype.onHide_ = function () {\n        this._wrapper.triggerDirect(EVENT_HIDE, null, [null, this._name], null);\n    };\n    ControllerMemory.prototype.isShown_ = function () {\n        var parent = this._parent;\n        return (parent != null ? parent.isShown_() : true);\n    };\n    ControllerMemory.prototype.isHidden_ = function () {\n        return !this.isShown_();\n    };\n    ControllerMemory.prototype.checkVisibility_ = function () {\n        var newVisibility = this.isShown_();\n        var oldVisibility = this._visibility;\n        if (oldVisibility !== newVisibility) {\n            this._visibility = newVisibility;\n            if (newVisibility) {\n                this.onShow_();\n            }\n            else {\n                this.onHide_();\n            }\n        }\n        // Controllers\n        var ctrlrs = this._ctrlrs;\n        for (var name_4 in ctrlrs) {\n            ctrlrs[name_4].checkVisibility_();\n        }\n    };\n    ControllerMemory.prototype.initialize_ = function () {\n        if (this._isInitialized !== true) {\n            this.eachData_(function (data) {\n                data.initialize_();\n            });\n            this.eachCtrlr_(function (ctrlr) {\n                ctrlr.initialize_();\n            });\n        }\n    };\n    ControllerMemory.prototype.isInitialized_ = function () {\n        if (this._isInitialized) {\n            return true;\n        }\n        return this._isInitialized = this.eachData_(function (field) {\n            return field.isInitialized_();\n        }) && this.eachCtrlr_(function (ctrlr) {\n            return ctrlr.isInitialized_();\n        });\n    };\n    ControllerMemory.prototype.uninitialize_ = function () {\n        this._isInitialized = false;\n        if (this._parent != null) {\n            this._parent.uninitialize_();\n        }\n    };\n    ControllerMemory.prototype.getCtrlr_ = function (name, type) {\n        var ctrlr = this._ctrlrs[name];\n        return (ctrlr != null && ctrlr.getType_() === type ? ctrlr : null);\n    };\n    ControllerMemory.prototype.getCtrlrWrapper_ = function (name, type) {\n        var ctrlr = this._ctrlrs[name];\n        if (ctrlr != null && ctrlr.getType_() === type) {\n            return ctrlr.getWrapper_();\n        }\n        else {\n            return null;\n        }\n    };\n    ControllerMemory.prototype.getCtrlrWrappers_ = function (type) {\n        var result = [];\n        var ctrlrs = this._ctrlrs;\n        for (var name_5 in ctrlrs) {\n            var ctrlr = ctrlrs[name_5];\n            if (ctrlr.getType_() === type) {\n                result.push(ctrlr.getWrapper_());\n            }\n        }\n        return result;\n    };\n    ControllerMemory.prototype.getActivePage_ = function () {\n        var pageActive = this._pageActive.get_();\n        if (pageActive != null) {\n            return this._ctrlrs[pageActive];\n        }\n        else {\n            return null;\n        }\n    };\n    ControllerMemory.prototype.getActivePageWrapper_ = function () {\n        var page = this.getActivePage_();\n        return (page != null ? page.getWrapper_() : null);\n    };\n    ControllerMemory.prototype.pushEvent_ = function (name, type, args) {\n        var eventInfo = this.getEventInfo_();\n        if (eventInfo != null) {\n            var event_1 = [name, type, args];\n            if (eventInfo.self != null) {\n                eventInfo.self.push(event_1);\n            }\n            else {\n                eventInfo.self = [event_1];\n            }\n        }\n    };\n    ControllerMemory.prototype.handleEvents_ = function (eventInfo) {\n        if (eventInfo != null) {\n            // Data\n            var nameToData = eventInfo.data;\n            if (nameToData != null) {\n                var handlers = this._dataEventHandlers;\n                for (var i = 0, imax = handlers.length; i < imax; ++i) {\n                    handlers[i](nameToData, eventInfo);\n                }\n            }\n            // Ctrlr\n            var nameToInfo = eventInfo.ctrlr;\n            if (nameToInfo != null) {\n                for (var name_6 in nameToInfo) {\n                    var ctrlr = this._ctrlrs[name_6];\n                    if (ctrlr != null) {\n                        ctrlr.handleEvents_(nameToInfo[name_6]);\n                    }\n                }\n            }\n        }\n    };\n    ControllerMemory.prototype.triggerEventsData_ = function (nameToData) {\n        var result = false;\n        if (nameToData != null) {\n            for (var name_7 in nameToData) {\n                var data = nameToData[name_7];\n                if (data != null) {\n                    data[0].triggerEvents_(data[1], data[2], data[3]);\n                    result = true;\n                }\n            }\n        }\n        return result;\n    };\n    ControllerMemory.prototype.triggerEventsCtrlr_ = function (nameToInfo) {\n        var result = false;\n        if (nameToInfo != null) {\n            var ctrlrs = this._ctrlrs;\n            for (var name_8 in nameToInfo) {\n                var ctrlr = ctrlrs[name_8];\n                if (ctrlr != null && ctrlr.triggerEvents_(nameToInfo[name_8])) {\n                    result = true;\n                }\n            }\n        }\n        return result;\n    };\n    ControllerMemory.prototype.triggerEventsSelf_ = function (events) {\n        var wrapper = this.getWrapper_();\n        for (var i = 0, imax = events.length; i < imax; ++i) {\n            var event_2 = events[i];\n            wrapper.triggerDirect(event_2[0], event_2[1], event_2[2], null);\n        }\n    };\n    ControllerMemory.prototype.triggerEvents_ = function (eventInfo) {\n        if (eventInfo == null) {\n            return false;\n        }\n        var hasDataChanges = this.triggerEventsData_(eventInfo.data);\n        var hasCtrlrChanges = this.triggerEventsCtrlr_(eventInfo.ctrlr);\n        var hasChanges = hasDataChanges || hasCtrlrChanges;\n        if (eventInfo.self != null) {\n            this.triggerEventsSelf_(eventInfo.self);\n        }\n        if (this.isHistoryChanged_(eventInfo)) {\n            this.pushHistory_();\n        }\n        if (hasChanges && this.isInitialized_()) {\n            var wrapper = this.getWrapper_();\n            var args = [null, wrapper];\n            wrapper.triggerDirect(EVENT_CHANGE, null, args, null);\n            wrapper.triggerDirect(EVENT_VALUE, null, args, null);\n        }\n        return hasChanges;\n    };\n    ControllerMemory.prototype.isHistoryChanged_ = function (eventInfo) {\n        if (eventInfo.data != null) {\n            for (var name_9 in eventInfo.data) {\n                if (name_9 in this._hdata) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    };\n    ControllerMemory.prototype.destroyController_ = function () {\n        var ctrlrs = this._ctrlrs;\n        for (var name_10 in ctrlrs) {\n            var ctrlr = ctrlrs[name_10];\n            ctrlr.destroy_();\n        }\n    };\n    ControllerMemory.prototype.destroy_ = function () {\n        this.lock_();\n        try {\n            this.destroyController_();\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    // HISTORY\n    ControllerMemory.prototype.pushHistory_ = function () {\n        var parent = this._parent;\n        if (parent != null) {\n            parent.pushHistory_();\n        }\n    };\n    // HISTORY TITLE\n    ControllerMemory.prototype.getHistoryTitleCtrlr_ = function (separator) {\n        var result = \"\";\n        var ctrlrs = this._ctrlrs;\n        for (var name_11 in ctrlrs) {\n            var ctrlr = ctrlrs[name_11];\n            var type = ctrlr.getType_();\n            if (type !== 1 /* PAGE */ && type !== 2 /* POPUP */) {\n                result = mergeHistoryTitle(result, ctrlr.getHistoryTitle_(separator), separator);\n            }\n        }\n        return result;\n    };\n    ControllerMemory.prototype.getHistoryTitlePage_ = function (separator) {\n        var result = \"\";\n        var page = this.getActivePage_();\n        if (page != null) {\n            result = mergeHistoryTitle(result, page.getHistoryTitle_(separator), separator);\n        }\n        return result;\n    };\n    ControllerMemory.prototype.getHistoryTitlePopup_ = function (separator) {\n        var result = \"\";\n        var ctrlrs = this._ctrlrs;\n        for (var name_12 in ctrlrs) {\n            var ctrlr = ctrlrs[name_12];\n            if (ctrlr.getType_() === 2 /* POPUP */) {\n                result = mergeHistoryTitle(result, ctrlr.getHistoryTitle_(separator), separator);\n            }\n        }\n        return result;\n    };\n    ControllerMemory.prototype.getHistoryTitle_ = function (separator) {\n        var pageAndPopupTitle = mergeHistoryTitle(this.getHistoryTitlePage_(separator), this.getHistoryTitlePopup_(separator), separator);\n        return mergeHistoryTitle(pageAndPopupTitle, this.getHistoryTitleCtrlr_(separator), separator);\n    };\n    // HISTORY STATE\n    ControllerMemory.prototype.setHistoricalData__ = function (index, parts) {\n        var hnames = this._hnames;\n        var hdata = this._hdata;\n        var imax = Math.min(hnames.length, parts.length - index);\n        for (var i = 0; i < imax; ++i) {\n            var name_13 = hnames[i];\n            var data = hdata[name_13];\n            var hook = this._dataHistoryHooks[name_13];\n            if (hook != null) {\n                hook(data, parts[index + i]);\n            }\n            else {\n                data.fromString_(decodeURIComponent(parts[index + i]));\n            }\n        }\n        return index + imax;\n    };\n    ControllerMemory.prototype.setHistoryStateData_ = function (index, parts) {\n        if (parts.length <= index || this._hasHData !== true) {\n            return index;\n        }\n        try {\n            return this.setHistoricalData__(index, parts);\n        }\n        catch (e) {\n            return -1;\n        }\n    };\n    ControllerMemory.prototype.setHistoryStateController_ = function (index, parts) {\n        if (parts.length <= index) {\n            return index;\n        }\n        var ctrlrs = this._ctrlrs;\n        for (var imax = parts.length; index < imax;) {\n            var ctrlr = ctrlrs[parts[index]];\n            if (ctrlr == null || ctrlr.getType_() === 1 /* PAGE */ || ctrlr.getType_() === 2 /* POPUP */) {\n                return index;\n            }\n            index = ctrlr.setHistoryState_(index + 1, parts);\n            if (index < 0) {\n                return -1;\n            }\n        }\n        return index;\n    };\n    ControllerMemory.prototype.setHistoryStatePage_ = function (index, parts) {\n        if (parts.length <= index) {\n            var activePage = this.getActivePage_();\n            if (activePage != null) {\n                activePage.hide_();\n            }\n        }\n        else {\n            var ctrlr = this._ctrlrs[parts[index]];\n            if (ctrlr == null || ctrlr.getType_() !== 1 /* PAGE */) {\n                var activePage = this.getActivePage_();\n                if (activePage != null) {\n                    activePage.hide_();\n                }\n            }\n            else {\n                index = ctrlr.setHistoryState_(index + 1, parts);\n                if (0 <= index) {\n                    ctrlr.show_();\n                }\n            }\n        }\n        return index;\n    };\n    ControllerMemory.prototype.setHistoryStatePopup_ = function (index, parts) {\n        var ctrlrs = this._ctrlrs;\n        if (parts.length <= index) {\n            for (var name_14 in ctrlrs) {\n                var ctrlr = ctrlrs[name_14];\n                if (ctrlr.getType_() === 2 /* POPUP */) {\n                    ctrlr.hide_();\n                }\n            }\n        }\n        else {\n            var visibles = {};\n            for (var imax = parts.length; index < imax;) {\n                var name_15 = parts[index];\n                var ctrlr = ctrlrs[name_15];\n                if (ctrlr == null || ctrlr.getType_() !== 2 /* POPUP */) {\n                    return index;\n                }\n                index = ctrlr.setHistoryState_(index + 1, parts);\n                if (index < 0) {\n                    return -1;\n                }\n                ctrlr.show_();\n                visibles[name_15] = null;\n            }\n            for (var name_16 in ctrlrs) {\n                if (!(name_16 in visibles)) {\n                    var ctrlr = ctrlrs[name_16];\n                    if (ctrlr.getType_() === 2 /* POPUP */) {\n                        ctrlr.hide_();\n                    }\n                }\n            }\n        }\n        return index;\n    };\n    ControllerMemory.prototype.setHistoryState_ = function (index, parts) {\n        index = this.setHistoryStateData_(index, parts);\n        if (index < 0) {\n            return -1;\n        }\n        index = this.setHistoryStatePage_(index, parts);\n        if (index < 0) {\n            return -1;\n        }\n        index = this.setHistoryStatePopup_(index, parts);\n        if (index < 0) {\n            return -1;\n        }\n        return this.setHistoryStateController_(index, parts);\n    };\n    ControllerMemory.prototype.getHistoryStateData_ = function () {\n        var result = \"\";\n        var hnames = this._hnames;\n        var hdata = this._hdata;\n        for (var i = 0, imax = hnames.length; i < imax; ++i) {\n            result += \"/\" + encodeURIComponent(hdata[hnames[i]].toString_());\n        }\n        return result;\n    };\n    ControllerMemory.prototype.getHistoryStateController_ = function () {\n        var result = \"\";\n        var ctrlrs = this._ctrlrs;\n        for (var name_17 in ctrlrs) {\n            var ctrlr = ctrlrs[name_17];\n            if (ctrlr.getType_() !== 1 /* PAGE */ && ctrlr.getType_() !== 2 /* POPUP */) {\n                var state = ctrlr.getHistoryState_();\n                if (isNotEmptyArray(state)) {\n                    result += \"/\" + ctrlr._name + state;\n                }\n            }\n        }\n        return result;\n    };\n    ControllerMemory.prototype.getHistoryStatePage_ = function () {\n        var page = this.getActivePage_();\n        if (page == null) {\n            return \"\";\n        }\n        var state = page.getHistoryState_();\n        if (isNotEmptyArray(state)) {\n            return \"/\" + page._name + state;\n        }\n        else {\n            return \"/\" + page._name;\n        }\n    };\n    ControllerMemory.prototype.getHistoryStatePopup_ = function () {\n        var result = \"\";\n        var ctrlrs = this._ctrlrs;\n        for (var name_18 in ctrlrs) {\n            var ctrlr = ctrlrs[name_18];\n            if (ctrlr.getType_() === 2 /* POPUP */) {\n                if (ctrlr.isShown_()) {\n                    var state = ctrlr.getHistoryState_();\n                    if (isNotEmptyArray(state)) {\n                        result += \"/\" + ctrlr._name + state;\n                    }\n                    else {\n                        result += \"/\" + ctrlr._name;\n                    }\n                }\n            }\n        }\n        return result;\n    };\n    ControllerMemory.prototype.getHistoryState_ = function () {\n        return this.getHistoryStateData_()\n            + this.getHistoryStatePage_()\n            + this.getHistoryStatePopup_()\n            + this.getHistoryStateController_();\n    };\n    ControllerMemory.prototype.toJson_ = function () {\n        var result = {};\n        this.eachConstant_(function (constant, name) {\n            result[name] = constant;\n        });\n        this.eachData_(function (data, name) {\n            result[name] = data.toJson_();\n        });\n        this.eachCtrlr_(function (ctrlr, name) {\n            result[name] = ctrlr.toJson_();\n        });\n        return result;\n    };\n    ControllerMemory.prototype.toString_ = function () {\n        var parts = [];\n        this.eachConstant_(function (constant, name) {\n            parts.push(\"\\\"\" + name + \"\\\":\" + JSON.stringify(constant));\n        });\n        this.eachData_(function (data, name) {\n            parts.push(\"\\\"\" + name + \"\\\":\" + data.toString_());\n        });\n        this.eachCtrlr_(function (ctrlr, name) {\n            parts.push(\"\\\"\" + name + \"\\\":\" + ctrlr.toString_());\n        });\n        return \"{\" + parts.join(\",\") + \"}\";\n    };\n    ControllerMemory.prototype.makeCallableWrapper_ = function (memory) {\n        var callable = new Callable(memory);\n        var result = (function () {\n            var args = [];\n            for (var _i = 0; _i < arguments.length; _i++) {\n                args[_i] = arguments[_i];\n            }\n            return callable.invoke(args);\n        });\n        Connectable.extend(result);\n        result.call = function () {\n            var args = [];\n            for (var _i = 0; _i < arguments.length; _i++) {\n                args[_i] = arguments[_i];\n            }\n            return callable.invoke(args);\n        };\n        result.ajax = function () {\n            return callable.ajax();\n        };\n        result.unajax = function () {\n            return callable.unajax();\n        };\n        result.safe = function () {\n            return callable.safe();\n        };\n        result.unsafe = function () {\n            return callable.unsafe();\n        };\n        result.timeout = function (timeout) {\n            return callable.timeout(timeout);\n        };\n        return result;\n    };\n    ControllerMemory.prototype.createCallable_ = function (name, callableStaticData) {\n        var timeout = callableStaticData[1];\n        var properties = new Properties(callableStaticData[2]);\n        return new CallableMemory(this, name, timeout, properties, this.makeCallableWrapper_).getWrapper_();\n    };\n    ControllerMemory.prototype.makeTaskWrapper_ = function (memory) {\n        var task = new Task(memory);\n        var wrapper = function () {\n            var args = [];\n            for (var _i = 0; _i < arguments.length; _i++) {\n                args[_i] = arguments[_i];\n            }\n            task.create(args);\n            return this;\n        };\n        Connectable.extend(wrapper);\n        wrapper.create = function (args) {\n            task.create(args);\n            return this;\n        };\n        wrapper.getArguments = function () {\n            return task.getArguments();\n        };\n        wrapper.getArgument = function (index) {\n            return task.getArgument(index);\n        };\n        wrapper.getResult = function () {\n            return task.getResult();\n        };\n        wrapper.getReason = function () {\n            return task.getReason();\n        };\n        wrapper.isCanceled = function () {\n            return task.isCanceled();\n        };\n        wrapper.isSucceeded = function () {\n            return task.isSucceeded();\n        };\n        wrapper.isFailed = function () {\n            return task.isFailed();\n        };\n        wrapper.isDone = function () {\n            return task.isDone();\n        };\n        wrapper.isReadOnly = function () {\n            return task.isReadOnly();\n        };\n        wrapper.isNonNull = function () {\n            return task.isNonNull();\n        };\n        wrapper.cancel = function () {\n            task.cancel();\n            return this;\n        };\n        wrapper.lock = function () {\n            task.lock();\n            return this;\n        };\n        wrapper.isLocked = function () {\n            return task.isLocked();\n        };\n        wrapper.unlock = function () {\n            task.unlock();\n            return this;\n        };\n        wrapper.toJson = function () {\n            return task.toJson();\n        };\n        wrapper.toString = function () {\n            return task.toString();\n        };\n        return wrapper;\n    };\n    ControllerMemory.prototype.createTask_ = function (name, taskStaticData) {\n        return new TaskMemory(this, name, taskStaticData, this._lock, this.makeTaskWrapper_).getWrapper_();\n    };\n    ControllerMemory.prototype.createConstants_ = function (constants) {\n        if (constants != null) {\n            var names = constants[0];\n            var values = constants[1];\n            var wrapper = this.getWrapper_();\n            for (var i = 0, imax = names.length; i < imax; ++i) {\n                var name_19 = names[i];\n                wrapper[name_19] = this._constants[name_19] = values[i];\n            }\n        }\n    };\n    ControllerMemory.prototype.createCallablesAndVariables_ = function (nameToData) {\n        if (nameToData != null) {\n            var names = nameToData[0];\n            var staticDatas = nameToData[1];\n            var wrapper = this.getWrapper_();\n            for (var i = 0, imax = names.length; i < imax; ++i) {\n                var name_20 = names[i];\n                var staticData = staticDatas[i];\n                if (isCallableStaticData(staticData)) {\n                    wrapper[name_20] = this.createCallable_(name_20, staticData);\n                }\n                else if (isTaskStaticData(staticData)) {\n                    wrapper[name_20] = this.createTask_(name_20, staticData);\n                }\n                else {\n                    var factory = STypeToClass.getFactory_(staticData[1]);\n                    if (factory != null) {\n                        var properties = new Properties(staticData[2]);\n                        var variable = factory.create_(this, name_20, properties, this._lock);\n                        if (variable != null) {\n                            this.putData_(name_20, variable);\n                            wrapper[name_20] = variable.getWrapper_();\n                            if (properties.isHistorical_()) {\n                                this.putHistoricalData_(name_20, variable);\n                            }\n                        }\n                    }\n                }\n            }\n            this._hnames = this._hnames.sort();\n            this._hasHData = isNotEmptyArray(this._hnames);\n        }\n    };\n    ControllerMemory.prototype.createController_ = function (nameToInfo, instanceNameToInfo) {\n        if (nameToInfo != null) {\n            var lock = this._lock;\n            var wrapper = this.getWrapper_();\n            var ctrlrs = this._ctrlrs;\n            var names = nameToInfo[0];\n            var staticInfos = nameToInfo[1];\n            var staticInstanceInfos = (instanceNameToInfo != null ? instanceNameToInfo[1] : null);\n            for (var i = 0, imax = names.length; i < imax; ++i) {\n                var name_21 = names[i];\n                var staticInfo = staticInfos[i];\n                var factory = ControllerTypeToClass.getFactory_(staticInfo[3]);\n                if (factory != null) {\n                    var staticInstanceInfo = (staticInstanceInfos != null ? staticInstanceInfos[i] : null);\n                    var controller = factory.create_(this, name_21, staticInfo, staticInstanceInfo, lock);\n                    ctrlrs[name_21] = controller;\n                    wrapper[name_21] = controller.getWrapper_();\n                }\n            }\n        }\n    };\n    ControllerMemory.prototype.createControllers_ = function (staticInfo, staticInstanceInfo) {\n        if (staticInfo != null) {\n            this.createConstants_(staticInfo[2]);\n            if (staticInstanceInfo != null) {\n                this.createConstants_(staticInstanceInfo[2]);\n            }\n            this.createCallablesAndVariables_(staticInfo[0]);\n            this.createController_(staticInfo[1], (staticInstanceInfo != null ? staticInstanceInfo[1] : null));\n        }\n    };\n    ControllerMemory.prototype.getCallPath_ = function () {\n        var result = [];\n        var memory = this;\n        for (;;) {\n            var parent_1 = memory._parent;\n            if (parent_1 == null) {\n                break;\n            }\n            result.unshift(memory._name);\n            memory = parent_1;\n        }\n        return result;\n    };\n    ControllerMemory.prototype.getServer_ = function () {\n        var parent = this._parent;\n        if (parent != null) {\n            return parent.getServer_();\n        }\n        throw UnsupportedOperationException.create();\n    };\n    ControllerMemory.prototype.call_ = function (data, timeout, headers, isAjaxMode) {\n        var _this = this;\n        return new PromiseClass(function (resolve, reject) {\n            if (isAjaxMode) {\n                var ajaxData = JSON.stringify({\n                    path: _this.getCallPath_(),\n                    request: data\n                });\n                _this.getServer_().ajax(\"call\", ajaxData, timeout, headers, function (result) {\n                    rejectOrResolveCallResult(result, resolve, reject);\n                }, function (xhr, reason) {\n                    reject(reason);\n                });\n            }\n            else {\n                _this._callId += 1;\n                var cid_1 = String(_this._callId);\n                _this._callCallbacks[cid_1] = { resolve: resolve, reject: reject };\n                _this._callRequests.put_(cid_1, data);\n                self.setTimeout(function () {\n                    delete _this._callCallbacks[cid_1];\n                    if (_this._callRequests.remove_(cid_1) != null) {\n                        reject(\"timeout\");\n                    }\n                }, timeout);\n            }\n        });\n    };\n    ControllerMemory.prototype.onCallResultChange_ = function (key, result) {\n        var data = this._callRequests.remove_(key);\n        var callback = this._callCallbacks[key];\n        delete this._callCallbacks[key];\n        if (data != null && callback != null) {\n            rejectOrResolveCallResult(result, callback.resolve, callback.reject);\n        }\n    };\n    ControllerMemory.prototype.onCallResultsChange_ = function (added, removed, updated) {\n        for (var key in added) {\n            this.onCallResultChange_(key, added[key]);\n        }\n        for (var key in updated) {\n            this.onCallResultChange_(key, updated[key].newValue);\n        }\n    };\n    ControllerMemory.prototype.getDynamicInfoData_ = function (senderId) {\n        var result = null;\n        for (var name_22 in this._data) {\n            var data = this._data[name_22];\n            if (data instanceof SScalarMemory) {\n                if (!data.isReadOnly_() && !data.isLocal_() && data.isInitialized_() &&\n                    data.getAuthorizedRevision_() < data.getRevision_()) {\n                    result = data.pack_(result, senderId);\n                }\n            }\n        }\n        return result;\n    };\n    ControllerMemory.prototype.getDynamicInfoController_ = function (senderId) {\n        var result = null;\n        var ctrlrs = this._ctrlrs;\n        for (var name_23 in ctrlrs) {\n            var ctrlr = ctrlrs[name_23];\n            if (!ctrlr.isLocal_()) {\n                var dynamicInfo = ctrlr.getDynamicInfo_(senderId);\n                if (dynamicInfo != null) {\n                    if (result == null) {\n                        result = [[name_23], [dynamicInfo]];\n                    }\n                    else {\n                        result[0].push(name_23);\n                        result[1].push(dynamicInfo);\n                    }\n                }\n            }\n        }\n        return result;\n    };\n    ControllerMemory.prototype.getDynamicInfo_ = function (senderId) {\n        var nameToData = this.getDynamicInfoData_(senderId);\n        var nameToInfo = this.getDynamicInfoController_(senderId);\n        if (nameToData != null || nameToInfo != null) {\n            return [nameToData, nameToInfo];\n        }\n        else {\n            return null;\n        }\n    };\n    ControllerMemory.prototype.resetAuthorizedRevisionData_ = function () {\n        for (var name_24 in this._data) {\n            var data = this._data[name_24];\n            data.resetAuthorizedRevision_();\n        }\n    };\n    ControllerMemory.prototype.resetAuthorizedRevisionController_ = function () {\n        var ctrlrs = this._ctrlrs;\n        for (var name_25 in ctrlrs) {\n            var ctrlr = ctrlrs[name_25];\n            ctrlr.resetAuthorizedRevision_();\n        }\n    };\n    ControllerMemory.prototype.resetAuthorizedRevision_ = function () {\n        this.resetAuthorizedRevisionData_();\n        this.resetAuthorizedRevisionController_();\n    };\n    ControllerMemory.prototype.setAuthorizedRevisionData_ = function (senderIds) {\n        for (var name_26 in this._data) {\n            var data = this._data[name_26];\n            if (data instanceof SScalarMemory) {\n                if (0 <= data.getSentSenderId_() && isInSenderIds(senderIds, data.getSentSenderId_())) {\n                    data.resetSentSenderId_();\n                }\n            }\n        }\n    };\n    ControllerMemory.prototype.setAuthorizedRevisionController_ = function (senderIds) {\n        var ctrlrs = this._ctrlrs;\n        for (var name_27 in ctrlrs) {\n            ctrlrs[name_27].setAuthorizedRevision_(senderIds);\n        }\n    };\n    ControllerMemory.prototype.setAuthorizedRevision_ = function (senderIds) {\n        if (senderIds != null) {\n            this.setAuthorizedRevisionData_(senderIds);\n            this.setAuthorizedRevisionController_(senderIds);\n        }\n    };\n    ControllerMemory.prototype.setDynamicInfoData_ = function (nameToData) {\n        if (nameToData != null) {\n            var names = nameToData[0];\n            var dynamicDatas = nameToData[1];\n            for (var i = 0, imax = names.length; i < imax; ++i) {\n                var name_28 = names[i];\n                var dynamicData = dynamicDatas[i];\n                if (dynamicData != null) {\n                    var data = this._data[name_28];\n                    if (data instanceof SScalarMemory) {\n                        var revision = dynamicData[0];\n                        var type = dynamicData[1];\n                        if (data.getType_() === type && data.getRevision_() <= revision) {\n                            data.unpack_(this._wrapper, dynamicData[2], revision);\n                        }\n                    }\n                }\n            }\n        }\n    };\n    ControllerMemory.prototype.setDynamicInfoController_ = function (nameToInfo) {\n        if (nameToInfo != null) {\n            var names = nameToInfo[0];\n            var dynamicInfos = nameToInfo[1];\n            var ctrlrs = this._ctrlrs;\n            for (var i = 0, imax = names.length; i < imax; ++i) {\n                var name_29 = names[i];\n                var ctrlr = ctrlrs[name_29];\n                if (ctrlr != null) {\n                    ctrlr.setDynamicInfo_(dynamicInfos[i]);\n                }\n            }\n        }\n    };\n    ControllerMemory.prototype.setDynamicInfo_ = function (dynamicInfo) {\n        if (dynamicInfo != null) {\n            this.lock_();\n            try {\n                this.setDynamicInfoData_(dynamicInfo[0]);\n                this.setDynamicInfoController_(dynamicInfo[1]);\n            }\n            finally {\n                this.unlock_();\n            }\n        }\n    };\n    ControllerMemory.prototype.setSContainerDynamicInfoData_ = function (nameToData, hasNonSContainer) {\n        var result = null;\n        var handlerNameToData = null;\n        if (nameToData != null) {\n            var names = nameToData[0];\n            var dynamicDatas = nameToData[1];\n            for (var i = 0, imax = names.length; i < imax; ++i) {\n                var name_30 = names[i];\n                if (isSContainerId(name_30)) {\n                    var dynamicData = dynamicDatas[i];\n                    if (dynamicData != null) {\n                        var data = this._data[name_30];\n                        if (data instanceof SScalarMemory) {\n                            var revision = dynamicData[0];\n                            var type = dynamicData[1];\n                            if (data.getType_() === type && data.getRevision_() <= revision) {\n                                dynamicDatas[i] = null;\n                                data.unpack_(this._wrapper, dynamicData[2], revision);\n                            }\n                            // Handler\n                            var handlerName = this._dataNameToHandlerName[name_30];\n                            if (handlerName != null) {\n                                if (handlerNameToData == null) {\n                                    handlerNameToData = {};\n                                }\n                                var handlerData = handlerNameToData[handlerName];\n                                if (handlerData == null) {\n                                    handlerData = {};\n                                    handlerNameToData[handlerName] = handlerData;\n                                }\n                                handlerData[name_30] = null;\n                            }\n                        }\n                    }\n                }\n                else {\n                    hasNonSContainer[0] = true;\n                }\n            }\n            // CALL HANDLERS\n            if (handlerNameToData != null) {\n                for (var handlerName in handlerNameToData) {\n                    var rejectedDataName = this._dynamicInfoHandlers[handlerName](handlerNameToData[handlerName]);\n                    if (rejectedDataName != null) {\n                        result = ArrayMaps.put_(result, rejectedDataName, true);\n                    }\n                }\n            }\n        }\n        return result;\n    };\n    ControllerMemory.prototype.setSContainerDynamicInfoController_ = function (nameToInfo, hasNonSContainer) {\n        var result = null;\n        if (nameToInfo != null) {\n            var names = nameToInfo[0];\n            var dynamicInfos = nameToInfo[1];\n            var ctrlrs = this._ctrlrs;\n            for (var i = 0, imax = names.length; i < imax; ++i) {\n                var name_31 = names[i];\n                var ctrlr = ctrlrs[name_31];\n                if (ctrlr != null) {\n                    var rejectionInfo = ctrlr.setSContainerDynamicInfo_(dynamicInfos[i], hasNonSContainer);\n                    if (rejectionInfo != null) {\n                        result = ArrayMaps.put_(result, name_31, rejectionInfo);\n                    }\n                }\n            }\n        }\n        return result;\n    };\n    ControllerMemory.prototype.setSContainerDynamicInfo_ = function (dynamicInfo, hasNonSContainer) {\n        if (dynamicInfo != null) {\n            this.lock_();\n            try {\n                return ArrayMaps.merge_(this.setSContainerDynamicInfoData_(dynamicInfo[0], hasNonSContainer), this.setSContainerDynamicInfoController_(dynamicInfo[1], hasNonSContainer));\n            }\n            finally {\n                this.unlock_();\n            }\n        }\n        return null;\n    };\n    ControllerMemory.prototype.setPartialDynamicInfo_ = function (senderId, dynamicInfo) {\n        var parent = this._parent;\n        if (parent != null) {\n            parent.setPartialDynamicInfo_(senderId, [null, [[this._name], [dynamicInfo]]]);\n        }\n    };\n    ControllerMemory.prototype.onTriggerRequestChange_ = function (request) {\n        var results = [];\n        if (request != null) {\n            var types = request[0];\n            for (var i = 0, imax = types.length; i < imax; ++i) {\n                var type = types[i];\n                this._wrapper.triggerDirect(type[0], type, request[1], results);\n                request[1][0] = null;\n            }\n        }\n        return results;\n    };\n    ControllerMemory.prototype.onTriggerRequestsChange_ = function (added, removed) {\n        for (var key in removed) {\n            this._triggerResults.remove_(key);\n        }\n        for (var key in added) {\n            var request = added[key];\n            this._triggerResults.put_(key, this.onTriggerRequestChange_(request));\n        }\n    };\n    ControllerMemory.prototype.triggerDirectUnpack_ = function (sclassMemory, origin, value, revision) {\n        sclassMemory.forceRevision_(revision);\n        sclassMemory.forceInitilized_();\n        if (value != null) {\n            for (var i = 0, imax = value.length; i < imax; ++i) {\n                var request = value[i];\n                var types = request[0];\n                for (var j = 0, jmax = types.length; j < jmax; ++j) {\n                    var type = types[j];\n                    this.pushEvent_(type[0], type, request[1]);\n                }\n            }\n        }\n    };\n    ControllerMemory.prototype.onPageActiveChange_ = function (newValue, oldValue) {\n        var ctrlrs = this._ctrlrs;\n        var oldPage = (oldValue != null ? ctrlrs[oldValue] : null);\n        var newPage = (newValue != null ? ctrlrs[newValue] : null);\n        this._wrapper.triggerDirect(EVENT_PAGE, null, [null, newValue, oldValue], null);\n        if (oldPage != null) {\n            oldPage.checkVisibility_();\n        }\n        if (newPage != null) {\n            newPage.checkVisibility_();\n        }\n        // History\n        this.pushHistory_();\n    };\n    ControllerMemory.prototype.isApplicable_ = function (rejectionInfo) {\n        // DATA\n        var nameToData = rejectionInfo[0];\n        if (nameToData != null) {\n            var names = nameToData[0];\n            for (var i = 0, imax = names.length; i < imax; ++i) {\n                var data = this._data[names[i]];\n                if (data instanceof SScalarMemory && data.get_() !== 0) {\n                    return false;\n                }\n            }\n        }\n        // INFO\n        var nameToInfo = rejectionInfo[1];\n        if (nameToInfo != null) {\n            var names = nameToInfo[0];\n            var rejectionInfos = nameToInfo[1];\n            for (var i = 0, imax = names.length; i < imax; ++i) {\n                var ctrlr = this._ctrlrs[names[i]];\n                if (ctrlr.isApplicable_(rejectionInfos[i]) !== true) {\n                    return false;\n                }\n            }\n        }\n        return true;\n    };\n    return ControllerMemory;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar RejectedDynamicInfo = /** @class */ (function () {\n    function RejectedDynamicInfo(rejectionInfo, dynamicInfo) {\n        this._rejectionInfo = rejectionInfo;\n        this._dynamicInfo = dynamicInfo;\n        this._createdAt = now();\n    }\n    return RejectedDynamicInfo;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar LocalRootControllerMemory = /** @class */ (function (_super) {\n    __extends(LocalRootControllerMemory, _super);\n    function LocalRootControllerMemory(name, settings, wrapperConstructor) {\n        var _this = _super.call(this, name, null, settings.info.static, settings.info.instance, new Lock(), wrapperConstructor, 0 /* CONTROLLER */) || this;\n        _this._hasUpdate = false;\n        _this._rejectedDynamicInfos = [];\n        return _this;\n    }\n    LocalRootControllerMemory.prototype.init_ = function (settings) {\n        if (settings.info.dynamic != null) {\n            this.lock_();\n            try {\n                this.setDynamicInfo_(settings.info.dynamic, false, false);\n            }\n            finally {\n                this.unlock_();\n            }\n        }\n        return this;\n    };\n    LocalRootControllerMemory.prototype.unlock_ = function () {\n        var count = this._lock.getHoldCount();\n        if (count <= 1) {\n            // The last unlock\n            this.onUnlock_();\n        }\n        else {\n            // Otherwise\n            this._lock.unlock();\n        }\n    };\n    LocalRootControllerMemory.prototype.update_ = function () {\n        this._isChanged = true;\n    };\n    LocalRootControllerMemory.prototype.onUnlock_ = function () {\n        var events = this._events;\n        this._events = null;\n        if (this._isChanged) {\n            this._isChanged = false;\n            this._lock.unlock();\n            if (!this.isLocal_()) {\n                this._hasUpdate = true;\n            }\n        }\n        else {\n            this._lock.unlock();\n        }\n        if (events != null) {\n            this.handleEvents_(events);\n            this.triggerEvents_(events);\n        }\n    };\n    LocalRootControllerMemory.prototype.setDynamicInfo_ = function (receivedDynamicInfo, sendUpdate, processRejectedInfos) {\n        var rejectedDynamicInfos = this._rejectedDynamicInfos;\n        var hasNonSContainer = [false];\n        var rejectionInfo = _super.prototype.setSContainerDynamicInfo_.call(this, receivedDynamicInfo, hasNonSContainer);\n        if (rejectionInfo != null && hasNonSContainer[0]) {\n            if (sendUpdate) {\n                this._hasUpdate = true;\n            }\n            rejectedDynamicInfos.push(new RejectedDynamicInfo(rejectionInfo, receivedDynamicInfo));\n        }\n        else {\n            if (sendUpdate) {\n                this._hasUpdate = true;\n            }\n            if (processRejectedInfos) {\n                for (var i = 0, imax = rejectedDynamicInfos.length, ioffset = 0; i < imax; ++i) {\n                    var rejectedDynamicInfo = rejectedDynamicInfos[i - ioffset];\n                    if (this.isApplicable_(rejectedDynamicInfo._rejectionInfo)) {\n                        _super.prototype.setDynamicInfo_.call(this, rejectedDynamicInfo._dynamicInfo);\n                        rejectedDynamicInfos.splice(i - ioffset, 1);\n                        ioffset += 1;\n                    }\n                }\n            }\n            _super.prototype.setDynamicInfo_.call(this, receivedDynamicInfo);\n        }\n    };\n    return LocalRootControllerMemory;\n}(ControllerMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar RootControllerMemory = /** @class */ (function (_super) {\n    __extends(RootControllerMemory, _super);\n    function RootControllerMemory(name, server, settings, wrapperConstructor) {\n        var _this = _super.call(this, name, settings, wrapperConstructor) || this;\n        _this._lastSendTime = 0;\n        _this._runTimeoutId = null;\n        _this._senderId = -1;\n        _this._sendUpdateTimeoutId = null;\n        _this._server = server;\n        _this._sync = settings.sync;\n        _this._runBound = function () { _this.run(); };\n        // Init\n        _this.init_(settings);\n        // Requests handling\n        var interval = settings.sync.process.interval;\n        _this._onRequestBound = function (messages) {\n            _this.lock_();\n            try {\n                for (var i = 0, imax = messages.length; i < imax; ++i) {\n                    _this.processRequest(messages[i]);\n                }\n            }\n            finally {\n                _this.unlock_();\n            }\n        };\n        _this._server.addHandler(_this._onRequestBound);\n        _this._sendUpdateBound = function () {\n            _this.sendUpdate();\n            _this._sendUpdateTimeoutId = self.setTimeout(_this._sendUpdateBound, interval);\n        };\n        _this._sendUpdateTimeoutId = null;\n        // History handling\n        _this._baseTitle = document.title;\n        _this._separators = settings.title.separators;\n        _this._isHistoryReady = settings.info.historical && (typeof window !== \"undefined\");\n        if (_this._isHistoryReady) {\n            _this.popHistory();\n            _this.pushHistory_();\n            addEventListener(window, \"hashchange\", function () { _this.popHistory(); });\n        }\n        // Send an ack\n        if (settings.info.senderId != null) {\n            _this._server.send(\"a\", settings.info.senderId);\n        }\n        // Establish a connection\n        _this.connect();\n        return _this;\n    }\n    RootControllerMemory.prototype.connect = function () {\n        if (this._runTimeoutId == null) {\n            this._runTimeoutId = self.setTimeout(this._runBound, this._sync.update.interval);\n            this._sendUpdateBound();\n        }\n    };\n    RootControllerMemory.prototype.sendUpdate = function () {\n        if (this._hasUpdate) {\n            this._hasUpdate = false;\n            this._lastSendTime = now();\n            var senderId = ++this._senderId;\n            var dynamicInfo = this.getDynamicInfo_(senderId);\n            if (dynamicInfo != null) {\n                this._server.send(\"u\", [senderId, dynamicInfo]);\n            }\n        }\n    };\n    RootControllerMemory.prototype.destroy_ = function () {\n        _super.prototype.destroy_.call(this);\n        if (this._runTimeoutId != null) {\n            self.clearTimeout(this._runTimeoutId);\n            this._runTimeoutId = null;\n        }\n        if (this._sendUpdateTimeoutId != null) {\n            self.clearTimeout(this._sendUpdateTimeoutId);\n            this._sendUpdateTimeoutId = null;\n        }\n        if (this._server != null) {\n            if (this._onRequestBound != null) {\n                this._server.removeHandler(this._onRequestBound);\n            }\n        }\n    };\n    RootControllerMemory.prototype.run = function () {\n        var current = now();\n        // Cleanup rejections\n        var rejectedDynamicInfos = this._rejectedDynamicInfos;\n        for (var i = 0, imax = rejectedDynamicInfos.length, ioffset = 0; i < imax; ++i) {\n            var rejectedInfo = rejectedDynamicInfos[i - ioffset];\n            if (this._sync.update.interval <= current - rejectedInfo._createdAt) {\n                rejectedDynamicInfos.splice(i - ioffset, 1);\n                ioffset += 1;\n            }\n        }\n        // Send update requests\n        var elapsedTime = current - this._lastSendTime;\n        if (this._sync.update.interval <= elapsedTime) {\n            this._hasUpdate = true;\n        }\n        var next = Math.max(0, this._lastSendTime + this._sync.update.interval - now());\n        self.setTimeout(this._runBound, next);\n    };\n    RootControllerMemory.prototype.pushHistoryState_ = function () {\n        var state = this.getHistoryState_();\n        var title = this.getHistoryTitle_(this._separators[1]);\n        return {\n            url: (isNotEmptyArray(state) ? \"#!\" + state : \"#!/\"),\n            title: (isNotEmptyArray(title) ? this._baseTitle + this._separators[0] + title : this._baseTitle)\n        };\n    };\n    RootControllerMemory.prototype.popHistoryState_ = function (state) {\n        var parts = state.split(\"/\");\n        if (isNotEmptyArray(parts) && parts[0] === \"#!\") {\n            var index = this.setHistoryState_(1, parts);\n            if (index < parts.length) {\n                this.pushHistory_();\n            }\n        }\n        else {\n            this.pushHistory_();\n        }\n    };\n    RootControllerMemory.prototype.pushHistory_ = function () {\n        if (this._isHistoryReady) {\n            var state = this.pushHistoryState_();\n            if (state.url != null && state.url !== window.location.hash) {\n                window.location.hash = state.url;\n            }\n            if (state.title != null && state.title !== document.title) {\n                document.title = state.title;\n            }\n        }\n    };\n    RootControllerMemory.prototype.popHistory = function () {\n        if (this._isHistoryReady) {\n            this.lock_();\n            try {\n                this.popHistoryState_(window.location.hash);\n            }\n            finally {\n                this.unlock_();\n            }\n        }\n    };\n    RootControllerMemory.prototype.getServer_ = function () {\n        return this._server;\n    };\n    RootControllerMemory.prototype.setPartialDynamicInfo_ = function (senderId, receivedDynamicInfo) {\n        this._server.send(\"a\", senderId);\n        this.lock_();\n        try {\n            this.setDynamicInfo_(receivedDynamicInfo, false, false);\n        }\n        finally {\n            try {\n                if (this._events != null) {\n                    var events = this._events;\n                    this._events = null;\n                    this.handleEvents_(events);\n                }\n            }\n            finally {\n                this.unlock_();\n            }\n        }\n    };\n    RootControllerMemory.prototype.processRequest = function (message) {\n        var type = message[0];\n        var content = message.substring(1, message.length);\n        switch (type) {\n            case \"c\":\n                this.resetAuthorizedRevision_();\n                this.setDynamicInfo_(JSON.parse(content), true, true);\n                break;\n            case \"d\":\n                this.resetAuthorizedRevision_();\n                this._hasUpdate = true;\n                break;\n            case \"a\":\n                this.setAuthorizedRevision_(JSON.parse(content));\n                break;\n            case \"u\":\n                this.setDynamicInfo_(JSON.parse(content), false, true);\n                break;\n            case \"x\":\n                {\n                    var args = JSON.parse(content);\n                    this.setAuthorizedRevision_(args[0]);\n                    this.setDynamicInfo_(args[1], false, true);\n                }\n                break;\n        }\n    };\n    return RootControllerMemory;\n}(LocalRootControllerMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Central class for making controllers received from a server.\n */\nvar ControllerMaker = /** @class */ (function () {\n    function ControllerMaker(wrapperConstructor, name, settings) {\n        inherit(wrapperConstructor, RootControllerImpl);\n        var server = new ServerConstructorImpl(settings);\n        var instance = new RootControllerMemory(name, server, settings, wrapperConstructor).getWrapper_();\n        register(name, wrapperConstructor);\n        register(name, instance, true);\n        server.connect();\n    }\n    ControllerMaker.init = function (instance, memory) {\n        RootControllerImpl.call(instance, memory);\n    };\n    return ControllerMaker;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar internal$1;\n(function (internal) {\n    internal.ControllerMaker = ControllerMaker;\n})(internal$1 || (internal$1 = {}));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar TaskType = -1;\nvar CallableType = -2;\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar toValue = function (name, colonIndex) {\n    var valueString = name.substring(colonIndex + 1, name.length);\n    try {\n        return JSON.parse(valueString);\n    }\n    catch (e) {\n        throw IllegalArgumentException.create(\"Malformed default value '\" + valueString + \"' for field '\" + name + \"'\");\n    }\n};\nvar toTypes = function (typesString) {\n    return typesString.trim().toLowerCase().split(/\\s+/);\n};\nvar toTypesAndValue = function (name) {\n    var colonIndex = name.indexOf(\":\");\n    if (0 <= colonIndex) {\n        return {\n            types: toTypes(name.substring(0, colonIndex)),\n            value: toValue(name, colonIndex)\n        };\n    }\n    else {\n        return {\n            types: toTypes(name)\n        };\n    }\n};\nvar toType = function (typeName) {\n    switch (typeName) {\n        case \"sarraynode\":\n            return 0 /* ARRAY_NODE */;\n        case \"sboolean\":\n            return 1 /* BOOLEAN */;\n        case \"sdouble\":\n            return 2 /* DOUBLE */;\n        case \"sjsonnode\":\n            return 3 /* JSON_NODE */;\n        case \"sfloat\":\n            return 4 /* FLOAT */;\n        case \"sinteger\":\n            return 5 /* INTEGER */;\n        case \"slong\":\n            return 6 /* LONG */;\n        case \"sobjectnode\":\n            return 7 /* OBJECT_NODE */;\n        case \"sstring\":\n            return 8 /* STRING */;\n        case \"slist\":\n            return 9 /* LIST */;\n        case \"smap\":\n            return 10 /* MAP */;\n        case \"sclass\":\n            return 11 /* CLASS */;\n        case \"squeue\":\n            return 16 /* QUEUE */;\n        case \"sroqueue\":\n            return 12 /* RO_QUEUE */;\n        case \"snavigablemap\":\n        case \"sascendingmap\":\n            return 13 /* ASCENDING_MAP */;\n        case \"sdescendingmap\":\n            return 14 /* DESCENDING_MAP */;\n        case \"smovablelist\":\n            return 15 /* MOVABLE_LIST */;\n        case \"@callable\":\n            return CallableType;\n        case \"@task\":\n            return TaskType;\n    }\n    return null;\n};\nvar findTypeByName = function (name) {\n    var typesAndValue = toTypesAndValue(name);\n    var types = typesAndValue.types;\n    var type = toType(types[types.length - 1]);\n    if (type != null) {\n        var properties = (0 <= types.indexOf(\"@nonnull\") ? 16 /* NON_NULL */ : 0 /* NONE */)\n            | (0 <= types.indexOf(\"@uninitialized\") ? 32 /* UNINITIALIZED */ : 0 /* NONE */)\n            | 256 /* LOCAL */;\n        if (\"value\" in typesAndValue) {\n            return {\n                type: type,\n                value: typesAndValue.value,\n                properties: properties\n            };\n        }\n        else {\n            return {\n                type: type,\n                properties: properties\n            };\n        }\n    }\n    else {\n        return null;\n    }\n};\nvar findTypeByConstructor = function (constructor) {\n    var type = STypeToClass.getType_(constructor);\n    if (type != null) {\n        if (type === 14 /* DESCENDING_MAP */) {\n            type = 13 /* ASCENDING_MAP */;\n        }\n    }\n    else if (Callable === constructor) {\n        type = CallableType;\n    }\n    else if (Task === constructor) {\n        type = TaskType;\n    }\n    if (type != null) {\n        return {\n            type: type,\n            properties: 256 /* LOCAL */\n        };\n    }\n    else {\n        return null;\n    }\n};\nvar findType = function (nameOrConstructor) {\n    if (isString(nameOrConstructor)) {\n        return findTypeByName(nameOrConstructor);\n    }\n    else if (isFunction(nameOrConstructor)) {\n        return findTypeByConstructor(nameOrConstructor);\n    }\n    else {\n        return null;\n    }\n};\nvar findControllerByName = function (name) {\n    var type = null;\n    var types = name.trim().toLowerCase().split(/\\s+/);\n    switch (types[types.length - 1]) {\n        case \"page\":\n            type = 1 /* PAGE */;\n            break;\n        case \"popup\":\n            type = 2 /* POPUP */;\n            break;\n        case \"component\":\n            type = 3 /* COMPONENT */;\n            break;\n        case \"pagefactory\":\n            type = 5 /* PAGE_FACTORY */;\n            break;\n        case \"popupfactory\":\n            type = 6 /* POPUP_FACTORY */;\n            break;\n        case \"componentfactory\":\n            type = 7 /* COMPONENT_FACTORY */;\n            break;\n    }\n    if (type != null) {\n        var properties = (0 <= types.indexOf(\"@nonnull\") ? 16 /* NON_NULL */ : 0 /* NONE */)\n            | (0 <= types.indexOf(\"@uninitialized\") ? 32 /* UNINITIALIZED */ : 0 /* NONE */)\n            | 256 /* LOCAL */;\n        return {\n            type: type,\n            properties: properties\n        };\n    }\n    else {\n        return null;\n    }\n};\nvar findControllerByConstructor = function (constructor) {\n    var type = ControllerTypeToClass.getType_(constructor);\n    if (type != null) {\n        return {\n            type: type,\n            properties: 256 /* LOCAL */\n        };\n    }\n    else {\n        return null;\n    }\n};\nvar findController = function (nameOrConstructor) {\n    if (isString(nameOrConstructor)) {\n        return findControllerByName(nameOrConstructor);\n    }\n    else if (isFunction(nameOrConstructor)) {\n        return findControllerByConstructor(nameOrConstructor);\n    }\n    else {\n        return null;\n    }\n};\nvar addSContainerData = function (dynamicInfoDataMap, name, $aValue) {\n    ArrayMaps.put_(dynamicInfoDataMap, toSContainerId(name, \"ar\"), [1, 6 /* LONG */, 0]);\n    ArrayMaps.put_(dynamicInfoDataMap, toSContainerId(name, \"af\"), [1, 5 /* INTEGER */, 0]);\n    ArrayMaps.put_(dynamicInfoDataMap, toSContainerId(name, \"a\"), [1, 11 /* CLASS */, $aValue]);\n    ArrayMaps.put_(dynamicInfoDataMap, toSContainerId(name, \"br\"), [1, 6 /* LONG */, 0]);\n    ArrayMaps.put_(dynamicInfoDataMap, toSContainerId(name, \"bf\"), [1, 5 /* INTEGER */, 0]);\n    ArrayMaps.put_(dynamicInfoDataMap, toSContainerId(name, \"b\"), [1, 11 /* CLASS */, null]);\n};\nvar getDynamicInfoDataMap = function (dynamicInfo) {\n    var dynamicInfoDataMap = dynamicInfo[0];\n    if (dynamicInfoDataMap != null) {\n        return dynamicInfoDataMap;\n    }\n    var newDynamicInfoDataMap = [[], []];\n    dynamicInfo[0] = newDynamicInfoDataMap;\n    return newDynamicInfoDataMap;\n};\nvar getDynamicInfoMap = function (dynamicInfo) {\n    var dynamicInfoMap = dynamicInfo[1];\n    if (dynamicInfoMap != null) {\n        return dynamicInfoMap;\n    }\n    var newDynamicInfoMap = [[], []];\n    dynamicInfo[1] = newDynamicInfoMap;\n    return newDynamicInfoMap;\n};\nvar toStaticInfoVariable = function (type, name, staticInfo, dynamicInfo, properties, variableType) {\n    var staticInfoDataMap = staticInfo[0];\n    var dynamicInfoDataMap = getDynamicInfoDataMap(dynamicInfo);\n    if (type === CallableType) {\n        ArrayMaps.put_(staticInfoDataMap, name, [0, 5000, properties]);\n    }\n    else if (type === TaskType) {\n        ArrayMaps.put_(staticInfoDataMap, name, [1, properties]);\n        ArrayMaps.put_(dynamicInfoDataMap, \"$id@\" + name, [1, 6 /* LONG */, 0]);\n        ArrayMaps.put_(dynamicInfoDataMap, \"$pid@\" + name, [1, 6 /* LONG */, 0]);\n    }\n    else {\n        ArrayMaps.put_(staticInfoDataMap, name, [2, type, properties]);\n    }\n    var isNonNull = Properties.contains_(properties, 16 /* NON_NULL */);\n    var isUninitialized = Properties.contains_(properties, 32 /* UNINITIALIZED */);\n    if (\"value\" in variableType) {\n        var value = variableType.value;\n        if (isNonNull && value == null) {\n            throw NullPointerException.create(\"'\" + value + \"' for non-null field '\" + name + \"'\");\n        }\n        switch (type) {\n            case 0 /* ARRAY_NODE */:\n                if (value == null || isArray(value)) {\n                    ArrayMaps.put_(dynamicInfoDataMap, name, [1, type, value]);\n                    return;\n                }\n                break;\n            case 9 /* LIST */:\n            case 15 /* MOVABLE_LIST */:\n                if (isArray(value)) {\n                    addSContainerData(dynamicInfoDataMap, name, [0, 1, 0, value]);\n                    return;\n                }\n                break;\n            case 10 /* MAP */:\n            case 13 /* ASCENDING_MAP */:\n            case 14 /* DESCENDING_MAP */:\n                if (isPlainObject(value)) {\n                    addSContainerData(dynamicInfoDataMap, name, [0, 1, 0, value]);\n                    return;\n                }\n                break;\n            case 16 /* QUEUE */:\n            case 12 /* RO_QUEUE */:\n                if (isArray(value)) {\n                    addSContainerData(dynamicInfoDataMap, name, [0, 1, 0, value, -1]);\n                    return;\n                }\n                break;\n            case 1 /* BOOLEAN */:\n                if (value == null || isBoolean(value)) {\n                    ArrayMaps.put_(dynamicInfoDataMap, name, [1, type, value]);\n                    return;\n                }\n                break;\n            case 2 /* DOUBLE */:\n            case 4 /* FLOAT */:\n            case 5 /* INTEGER */:\n            case 6 /* LONG */:\n                if (value == null || isNumber(value)) {\n                    ArrayMaps.put_(dynamicInfoDataMap, name, [1, type, value]);\n                    return;\n                }\n                break;\n            case 11 /* CLASS */:\n            case 3 /* JSON_NODE */:\n                if (value == null || isNumber(value) || isString(value) || isPlainObject(value) || isArray(value)) {\n                    ArrayMaps.put_(dynamicInfoDataMap, name, [1, type, value]);\n                }\n                return;\n            case 8 /* STRING */:\n                if (value == null || isString(value)) {\n                    ArrayMaps.put_(dynamicInfoDataMap, name, [1, type, value]);\n                    return;\n                }\n                break;\n            case 7 /* OBJECT_NODE */:\n                if (value == null || isPlainObject(value)) {\n                    ArrayMaps.put_(dynamicInfoDataMap, name, [1, type, value]);\n                    return;\n                }\n                break;\n        }\n        throw IllegalArgumentException.create(\"Illegal value '\" + value + \"' for field '\" + name + \"'\");\n    }\n    else if (!isUninitialized) {\n        switch (type) {\n            case 0 /* ARRAY_NODE */:\n                ArrayMaps.put_(dynamicInfoDataMap, name, [1, type, isNonNull ? [] : null]);\n                break;\n            case 1 /* BOOLEAN */:\n                ArrayMaps.put_(dynamicInfoDataMap, name, [1, type, isNonNull ? false : null]);\n                break;\n            case 2 /* DOUBLE */:\n            case 4 /* FLOAT */:\n                ArrayMaps.put_(dynamicInfoDataMap, name, [1, type, isNonNull ? 0.0 : null]);\n                break;\n            case 11 /* CLASS */:\n            case 3 /* JSON_NODE */:\n                if (!isNonNull) {\n                    ArrayMaps.put_(dynamicInfoDataMap, name, [1, type, null]);\n                }\n                break;\n            case 5 /* INTEGER */:\n            case 6 /* LONG */:\n                ArrayMaps.put_(dynamicInfoDataMap, name, [1, type, isNonNull ? 0 : null]);\n                break;\n            case 7 /* OBJECT_NODE */:\n                ArrayMaps.put_(dynamicInfoDataMap, name, [1, type, isNonNull ? {} : null]);\n                break;\n            case 8 /* STRING */:\n                ArrayMaps.put_(dynamicInfoDataMap, name, [1, type, isNonNull ? \"\" : null]);\n                break;\n            case 9 /* LIST */:\n            case 15 /* MOVABLE_LIST */:\n                addSContainerData(dynamicInfoDataMap, name, [0, 1, 0, []]);\n                break;\n            case 16 /* QUEUE */:\n            case 12 /* RO_QUEUE */:\n                addSContainerData(dynamicInfoDataMap, name, [0, 1, 0, [], -1]);\n                break;\n            case 10 /* MAP */:\n            case 13 /* ASCENDING_MAP */:\n            case 14 /* DESCENDING_MAP */:\n                addSContainerData(dynamicInfoDataMap, name, [0, 1, 0, {}]);\n                break;\n        }\n    }\n};\nvar getReserved = function (from, name) {\n    var escapedName = \"@\" + name;\n    if (hasOwn(from, escapedName)) {\n        return from[escapedName];\n    }\n    if (hasOwn(from, name)) {\n        return from[name];\n    }\n    return null;\n};\nvar toProperties = function (value) {\n    return 256 /* LOCAL */\n        | (getReserved(value, \"nonnull\") === true ? 16 /* NON_NULL */ : 0 /* NONE */)\n        | (getReserved(value, \"uninitialized\") === true ? 32 /* UNINITIALIZED */ : 0 /* NONE */);\n};\nvar isNotReserved = function (name, object) {\n    switch (name) {\n        case \"type\":\n            return hasOwn(object, \"@\" + name);\n        case \"nonnull\":\n            return hasOwn(object, \"@\" + name);\n        case \"uninitialized\":\n            return hasOwn(object, \"@\" + name);\n        default:\n            return (name == null || isEmptyArray(name) || name[0] !== \"@\");\n    }\n};\nvar isFactoryType = function (type) {\n    return (type === 5 /* PAGE_FACTORY */ ||\n        type === 6 /* POPUP_FACTORY */ ||\n        type === 7 /* COMPONENT_FACTORY */);\n};\nvar toStaticAndDynamicInfo = function (type, structure, properties, ignoreReserved) {\n    var staticInfo = [\n        [[], []],\n        [[], []],\n        [[], []],\n        type,\n        properties\n    ];\n    var dynamicInfo = [\n        [[], []],\n        [[], []]\n    ];\n    for (var name_1 in structure) {\n        if (hasOwn(structure, name_1) && (!ignoreReserved || isNotReserved(name_1, structure))) {\n            var substructure = structure[name_1];\n            if (isPlainObject(substructure)) {\n                var substructureType = getReserved(substructure, \"type\");\n                if (substructureType != null) {\n                    var variableType = findType(substructureType);\n                    if (variableType == null) {\n                        var controllerType = findController(substructureType);\n                        if (controllerType == null) {\n                            throw UnsupportedOperationException.create(\"Unsupported type '\" + substructureType + \"'\");\n                        }\n                        else {\n                            var staticAndDynamicInfo = toStaticAndDynamicInfo(controllerType.type, substructure, controllerType.properties | toProperties(substructure) | properties, true);\n                            if (isFactoryType(controllerType.type)) {\n                                var staticInfoMap = staticInfo[1];\n                                ArrayMaps.put_(staticInfoMap, name_1, [\n                                    [[], []],\n                                    [[], []],\n                                    [[], []],\n                                    controllerType.type,\n                                    staticAndDynamicInfo[0][4]\n                                ]);\n                                var dynamicInfoMap = getDynamicInfoMap(dynamicInfo);\n                                ArrayMaps.put_(dynamicInfoMap, name_1, [\n                                    [[\"$si\"], [[1, 11 /* CLASS */, staticAndDynamicInfo[0]]]],\n                                    [[], []]\n                                ]);\n                            }\n                            else {\n                                var staticInfoMap = staticInfo[1];\n                                ArrayMaps.put_(staticInfoMap, name_1, staticAndDynamicInfo[0]);\n                                var dynamicInfoMap = getDynamicInfoMap(dynamicInfo);\n                                ArrayMaps.put_(dynamicInfoMap, name_1, staticAndDynamicInfo[1]);\n                            }\n                        }\n                    }\n                    else {\n                        if (\"value\" in substructure) {\n                            variableType.value = substructure.value;\n                        }\n                        toStaticInfoVariable(variableType.type, name_1, staticInfo, dynamicInfo, variableType.properties | toProperties(substructure) | properties, variableType);\n                    }\n                }\n                else {\n                    var staticAndDynamicInfo = toStaticAndDynamicInfo(3 /* COMPONENT */, substructure, toProperties(substructure) | properties, true);\n                    var staticInfoMap = staticInfo[1];\n                    ArrayMaps.put_(staticInfoMap, name_1, staticAndDynamicInfo[0]);\n                    var dynamicInfoMap = getDynamicInfoMap(dynamicInfo);\n                    ArrayMaps.put_(dynamicInfoMap, name_1, staticAndDynamicInfo[1]);\n                }\n            }\n            else {\n                var variableType = findType(substructure);\n                if (variableType == null) {\n                    var controllerType = findController(substructure);\n                    if (controllerType == null) {\n                        var staticNameToConstants = staticInfo[2];\n                        ArrayMaps.put_(staticNameToConstants, name_1, substructure);\n                    }\n                    else {\n                        var staticAndDynamicInfo = toStaticAndDynamicInfo(controllerType.type, {}, controllerType.properties | properties, true);\n                        if (isFactoryType(controllerType.type)) {\n                            var staticInfoMap = staticInfo[1];\n                            ArrayMaps.put_(staticInfoMap, name_1, [\n                                [[], []],\n                                [[], []],\n                                [[], []],\n                                controllerType.type,\n                                staticAndDynamicInfo[0][4]\n                            ]);\n                            var dynamicInfoMap = getDynamicInfoMap(dynamicInfo);\n                            ArrayMaps.put_(dynamicInfoMap, name_1, [\n                                [[\"$si\"], [[1, 11 /* CLASS */, staticAndDynamicInfo[0]]]],\n                                [[], []]\n                            ]);\n                        }\n                        else {\n                            var staticInfoMap = staticInfo[1];\n                            ArrayMaps.put_(staticInfoMap, name_1, staticAndDynamicInfo[0]);\n                            var dynamicInfoMap = getDynamicInfoMap(dynamicInfo);\n                            ArrayMaps.put_(dynamicInfoMap, name_1, staticAndDynamicInfo[1]);\n                        }\n                    }\n                }\n                else {\n                    toStaticInfoVariable(variableType.type, name_1, staticInfo, dynamicInfo, variableType.properties | properties, variableType);\n                }\n            }\n        }\n    }\n    return [staticInfo, dynamicInfo];\n};\nvar ControllersImpl = /** @class */ (function () {\n    function ControllersImpl() {\n    }\n    ControllersImpl.create = function (structure) {\n        var staticAndDynamicInfo = toStaticAndDynamicInfo(0 /* CONTROLLER */, structure, 256 /* LOCAL */, false);\n        var settings = {\n            info: {\n                static: staticAndDynamicInfo[0],\n                instance: [],\n                dynamic: staticAndDynamicInfo[1]\n            }\n        };\n        return new LocalRootControllerMemory(\"\", settings, ControllerImpl)\n            .init_(settings).getWrapper_();\n    };\n    return ControllersImpl;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * An utility class for controllers.\n */\nvar Controllers = /** @class */ (function () {\n    function Controllers() {\n    }\n    /**\n     * Returns a controller of the specified structure.\n     *\n     *     var controller = Controllers.create({\n     *         foo: \"SString\"\n     *         component: {\n     *             bar: \"@NonNull SClass\",\n     *         }\n     *     });\n     *\n     *     console.log( controller.foo.get() ); // prints \"null\"\n     *\n     *     controller.component.bar.set({ name: \"Cardinal\" });\n     *     console.log( controller.component.bar.get().name ); // prints \"Cardinal\"\n     *\n     * @param {Object} structure a controller structure\n     * @returns a created controller\n     * @throws Error if the specified structure contains unsupported type.\n     */\n    Controllers.create = function (structure) {\n        return ControllersImpl.create(structure);\n    };\n    return Controllers;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar ComponentMemory = /** @class */ (function (_super) {\n    __extends(ComponentMemory, _super);\n    function ComponentMemory(name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, type) {\n        if (type === void 0) { type = 3 /* COMPONENT */; }\n        return _super.call(this, name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, type) || this;\n    }\n    return ComponentMemory;\n}(ControllerMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar STATIC_INFO_NAME = \"$si\";\nvar LIST_NAME = \"$d\";\nvar pushEvent_ = function (eventInfo, name, type, args) {\n    var event = [name, type, args];\n    if (eventInfo.self != null) {\n        eventInfo.self.push(event);\n    }\n    else {\n        eventInfo.self = [event];\n    }\n};\nvar FactoryMemory = /** @class */ (function (_super) {\n    __extends(FactoryMemory, _super);\n    function FactoryMemory(name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, newCtrlr, type) {\n        var _this = _super.call(this, name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, type) || this;\n        _this._newCtrlr = newCtrlr;\n        var cp = _this._properties.clone_().retain_(256 /* LOCAL */);\n        var cpr = cp.clone_().add_(4 /* READ_ONLY */);\n        _this._staticInfo = newMemory(SClassMemory, SClass, _this, STATIC_INFO_NAME, cpr, lock);\n        _this._list = newMemory(SListMemory, SList, _this, LIST_NAME, cp, lock);\n        _this.addDataEventHandler_(function (nameToEvents, typeToEvents) {\n            _this.dataEventHandler_(nameToEvents, typeToEvents);\n        });\n        return _this;\n    }\n    FactoryMemory.prototype.create_ = function (parameters) {\n        checkSupported(this);\n        this.lock_();\n        try {\n            var data = {\n                name: this.nextName_(),\n                args: parameters\n            };\n            // We must suppress events of the list `$d` to prevent the unnecessary creation of controller instances.\n            // However, suppressing the events of the list also stops `change`/`value` events on parent controllers\n            // of this factory. This is why an dummy event is pushed as shown below.\n            this.stopEvent_();\n            this._list.add_(this._list.size_(), data);\n            this.startEvent_();\n            this._list.pushEvent_(\"dummy\", []);\n            // Create and register a controller instance.\n            var ctrlr = this._newCtrlr(data.name, this, this._staticInfo.get_(), null, this._lock);\n            this._ctrlrs[data.name] = ctrlr;\n            this.uninitialize_();\n            var wrapper = ctrlr.getWrapper_();\n            this.pushEvent_(EVENT_CREATE, null, [null, wrapper, data.args]);\n            return wrapper;\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    FactoryMemory.prototype.eachWrapper_ = function (iteratee, thisArg) {\n        var ctrlrs = this._ctrlrs;\n        var wrapper = this.getWrapper_();\n        this._list.each_(function (data, index) {\n            if (data != null) {\n                var ctrlr = ctrlrs[data.name];\n                return iteratee.call(thisArg, ctrlr.getWrapper_(), index, wrapper);\n            }\n        }, null, false);\n    };\n    FactoryMemory.prototype.toWrapperArray_ = function () {\n        var result = [];\n        var ctrlrs = this._ctrlrs;\n        this._list.each_(function (data) {\n            if (data != null) {\n                result.push(ctrlrs[data.name].getWrapper_());\n            }\n        }, null, false);\n        return result;\n    };\n    FactoryMemory.prototype.size_ = function () {\n        return this._list.size_();\n    };\n    FactoryMemory.prototype.getCtrlrAt_ = function (index) {\n        var data = this._list.get_(index);\n        if (data == null) {\n            return null;\n        }\n        return this._ctrlrs[data.name];\n    };\n    FactoryMemory.prototype.getWrapperAt_ = function (index) {\n        var ctrlr = this.getCtrlrAt_(index);\n        return (ctrlr != null ? ctrlr.getWrapper_() : null);\n    };\n    FactoryMemory.prototype.isEmpty_ = function () {\n        return this._list.isEmpty_();\n    };\n    FactoryMemory.prototype.indexOf_ = function (wrapper) {\n        var result = -1;\n        var ctrlrs = this._ctrlrs;\n        this._list.each_(function (data, index) {\n            if (data != null && ctrlrs[data.name].getWrapper_() === wrapper) {\n                result = index;\n                return false;\n            }\n            return true;\n        }, null, false);\n        return result;\n    };\n    FactoryMemory.prototype.containsOf_ = function (wrapper) {\n        var ctrlrs = this._ctrlrs;\n        for (var name_1 in ctrlrs) {\n            if (ctrlrs[name_1].getWrapper_() === wrapper) {\n                return true;\n            }\n        }\n        return false;\n    };\n    FactoryMemory.prototype.removeCtrlrAt_ = function (index) {\n        checkSupported(this);\n        var ctrlr = this.getCtrlrAt_(index);\n        if (ctrlr != null) {\n            if (this.destroyCtrlr_(ctrlr)) {\n                return ctrlr;\n            }\n        }\n        return null;\n    };\n    FactoryMemory.prototype.removeWrapperAt_ = function (index) {\n        var ctrlr = this.removeCtrlrAt_(index);\n        if (ctrlr != null) {\n            return ctrlr.getWrapper_();\n        }\n        return null;\n    };\n    FactoryMemory.prototype.filter_ = function (iteratee, thisArg) {\n        checkSupported(this);\n        this.lock_();\n        try {\n            var ctrlrs_1 = this._ctrlrs;\n            var wrapper_1 = this.getWrapper_();\n            var nameAndCtrlrs_1 = [];\n            this._list.filter_(function (data, index) {\n                if (data != null) {\n                    var ctrlr = ctrlrs_1[data.name];\n                    if (iteratee.call(thisArg, ctrlr.getWrapper_(), index, wrapper_1) === true) {\n                        return true;\n                    }\n                    else {\n                        nameAndCtrlrs_1.push([data.name, ctrlr]);\n                        return false;\n                    }\n                }\n                else {\n                    return true;\n                }\n            }, null);\n            for (var i = 0, imax = nameAndCtrlrs_1.length; i < imax; ++i) {\n                var nameAndCtrlr = nameAndCtrlrs_1[i];\n                var name_2 = nameAndCtrlr[0];\n                var ctrlr = nameAndCtrlr[1];\n                delete ctrlrs_1[name_2];\n                ctrlr.hide_();\n                this.pushEvent_(EVENT_DESTROY, null, [null, ctrlr.getWrapper_()]);\n                ctrlr.destroy_();\n            }\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    FactoryMemory.prototype.destroyWrapper_ = function (wrapper) {\n        var ctrlr = this.findCtrlrOf_(wrapper);\n        if (ctrlr != null) {\n            return this.destroyCtrlr_(ctrlr);\n        }\n        return false;\n    };\n    FactoryMemory.prototype.destroyCtrlr_ = function (ctrlr) {\n        checkSupported(this);\n        this.lock_();\n        try {\n            if (ctrlr != null) {\n                var name_3 = ctrlr.getName_();\n                delete this._ctrlrs[name_3];\n                this._list.filter_(function (data) {\n                    return data == null || name_3 !== data.name;\n                }, null);\n                ctrlr.hide_();\n                this.pushEvent_(EVENT_DESTROY, null, [null, ctrlr.getWrapper_()]);\n                ctrlr.destroy_();\n                return true;\n            }\n        }\n        finally {\n            this.unlock_();\n        }\n        return false;\n    };\n    FactoryMemory.prototype.findCtrlrOf_ = function (wrapper) {\n        var ctrlrs = this._ctrlrs;\n        for (var name_4 in ctrlrs) {\n            var ctrlr = ctrlrs[name_4];\n            if (ctrlr.getWrapper_() === wrapper) {\n                return ctrlr;\n            }\n        }\n        return null;\n    };\n    FactoryMemory.prototype.clearCtrlrs_ = function () {\n        checkSupported(this);\n        this.lock_();\n        try {\n            var ctrlrs = this._ctrlrs;\n            this._ctrlrs = {};\n            this._list.clear_();\n            for (var name_5 in ctrlrs) {\n                var ctrlr = ctrlrs[name_5];\n                ctrlr.hide_();\n                this.pushEvent_(EVENT_DESTROY, null, [null, ctrlr.getWrapper_()]);\n                ctrlr.destroy_();\n            }\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    FactoryMemory.prototype.toJson_ = function () {\n        var result = [];\n        var ctrlrs = this._ctrlrs;\n        this._list.each_(function (data) {\n            if (data != null) {\n                result.push(ctrlrs[data.name].toJson_());\n            }\n        }, null, false);\n        return result;\n    };\n    FactoryMemory.prototype.toString_ = function () {\n        var parts = [];\n        var ctrlrs = this._ctrlrs;\n        this._list.each_(function (data) {\n            if (data != null) {\n                parts.push(ctrlrs[data.name].toString_());\n            }\n        }, null, false);\n        return \"[\" + parts.join(\",\") + \"]\";\n    };\n    FactoryMemory.prototype.dataEventHandler_ = function (nameToEvents, typeToEvents) {\n        if (nameToEvents != null && LIST_NAME in nameToEvents) {\n            var nameToArgs = nameToEvents[LIST_NAME][1];\n            var args = (nameToArgs[EVENT_VALUE] || nameToArgs[EVENT_CHANGE_VALUE]);\n            if (args != null) {\n                this.dataEventHandlerList_(typeToEvents, args[1], args[2], args[3]);\n            }\n            nameToArgs[LIST_NAME] = null;\n        }\n    };\n    FactoryMemory.prototype.dataEventHandlerList_ = function (typeToEvents, added, removed, updated) {\n        added = added || [];\n        removed = removed || [];\n        updated = updated || [];\n        // Removed\n        for (var i = 0, imax = removed.length; i < imax; ++i) {\n            var data = removed[i].value;\n            this.destroyByData_(typeToEvents, data);\n        }\n        // Added\n        for (var i = 0, imax = added.length; i < imax; ++i) {\n            var data = added[i].value;\n            this.createByData_(typeToEvents, data);\n        }\n        // Updated\n        for (var i = 0, imax = updated.length; i < imax; ++i) {\n            var update = updated[i];\n            this.destroyByData_(typeToEvents, update.oldValue);\n            this.createByData_(typeToEvents, update.newValue);\n        }\n    };\n    FactoryMemory.prototype.createByData_ = function (typeToEvents, data) {\n        var staticInfo = this._staticInfo.get_();\n        if (staticInfo == null) {\n            return null;\n        }\n        var ctrlr = this._newCtrlr(data.name, this, staticInfo, null, this._lock);\n        this._ctrlrs[data.name] = ctrlr;\n        this.uninitialize_();\n        if (data.dynamic != null) {\n            ctrlr.setPartialDynamicInfo_(data.senderId, data.dynamic);\n            // Without this, browsers send back dynamic data to servers.\n            data.dynamic = null;\n        }\n        pushEvent_(typeToEvents, EVENT_CREATE, null, [null, ctrlr.getWrapper_(), data.args]);\n        return ctrlr;\n    };\n    FactoryMemory.prototype.destroyByData_ = function (typeToEvents, data) {\n        this.lock_();\n        try {\n            var ctrlr = this._ctrlrs[data.name];\n            if (ctrlr != null) {\n                delete this._ctrlrs[data.name];\n                ctrlr.hide_();\n                pushEvent_(typeToEvents, EVENT_DESTROY, null, [null, ctrlr.getWrapper_()]);\n                ctrlr.destroy_();\n                return ctrlr;\n            }\n            return null;\n        }\n        finally {\n            this.unlock_();\n        }\n    };\n    FactoryMemory.prototype.getFactoryData_ = function (name) {\n        var result = null;\n        this._list.each_(function (data) {\n            if (data != null && name === data.name) {\n                result = name;\n                return false;\n            }\n            return true;\n        }, null, false);\n        return result;\n    };\n    FactoryMemory.prototype.nextName_ = function () {\n        var result = null;\n        do {\n            result = \"b\" + now().toString(32) + Math.round(Math.random() * 9007199254740991).toString(32);\n        } while (this.getFactoryData_(result) != null);\n        return result;\n    };\n    return FactoryMemory;\n}(ComponentMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar ComponentFactoryMemory = /** @class */ (function (_super) {\n    __extends(ComponentFactoryMemory, _super);\n    function ComponentFactoryMemory(name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, newCtrlr) {\n        return _super.call(this, name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, newCtrlr, 7 /* COMPONENT_FACTORY */) || this;\n    }\n    return ComponentFactoryMemory;\n}(FactoryMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar ComponentImpl = /** @class */ (function (_super) {\n    __extends(ComponentImpl, _super);\n    function ComponentImpl(__mem__) {\n        return _super.call(this, __mem__) || this;\n    }\n    return ComponentImpl;\n}(ControllerImpl));\nControllerTypeToClass.put_({\n    create_: function (parent, name, staticInfo, staticInstanceInfo, lock) {\n        return new ComponentMemory(name, parent, staticInfo, staticInstanceInfo, lock, ComponentImpl);\n    },\n    getConstructor_: function () {\n        return ComponentImpl;\n    },\n    getType_: function () {\n        return 3 /* COMPONENT */;\n    }\n});\nControllerTypeToClass.put_({\n    create_: function (parent, name, staticInfo, staticInstanceInfo, lock) {\n        return new ComponentMemory(name, parent, staticInfo, staticInstanceInfo, lock, ComponentImpl);\n    },\n    getConstructor_: function () {\n        return ComponentImpl;\n    },\n    getType_: function () {\n        return 4 /* SHARED_COMPONENT */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar FactoryImpl = /** @class */ (function (_super) {\n    __extends(FactoryImpl, _super);\n    function FactoryImpl(__mem__) {\n        return _super.call(this, __mem__) || this;\n    }\n    FactoryImpl.prototype.create = function () {\n        var parameters = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            parameters[_i] = arguments[_i];\n        }\n        return this.__mem__.create_(parameters);\n    };\n    FactoryImpl.prototype.each = function (iteratee, thisArg) {\n        if (thisArg === void 0) { thisArg = this; }\n        this.__mem__.eachWrapper_(iteratee, thisArg);\n        return this;\n    };\n    FactoryImpl.prototype.toArray = function () {\n        return this.__mem__.toWrapperArray_();\n    };\n    FactoryImpl.prototype.size = function () {\n        return this.__mem__.size_();\n    };\n    FactoryImpl.prototype.get = function (index) {\n        return this.__mem__.getWrapperAt_(index);\n    };\n    FactoryImpl.prototype.isEmpty = function () {\n        return this.__mem__.isEmpty_();\n    };\n    FactoryImpl.prototype.indexOf = function (instance) {\n        return this.__mem__.indexOf_(instance);\n    };\n    FactoryImpl.prototype.contains = function (instance) {\n        return this.__mem__.containsOf_(instance);\n    };\n    FactoryImpl.prototype.remove = function (index) {\n        return this.__mem__.removeWrapperAt_(index);\n    };\n    FactoryImpl.prototype.filter = function (iteratee, thisArg) {\n        if (thisArg === void 0) { thisArg = this; }\n        this.__mem__.filter_(iteratee, thisArg);\n        return this;\n    };\n    FactoryImpl.prototype.destroy = function (instance) {\n        return this.__mem__.destroyWrapper_(instance);\n    };\n    FactoryImpl.prototype.clear = function () {\n        this.__mem__.clearCtrlrs_();\n        return this;\n    };\n    FactoryImpl.prototype.toJson = function () {\n        return this.__mem__.toJson_();\n    };\n    FactoryImpl.prototype.toString = function () {\n        return this.__mem__.toString_();\n    };\n    return FactoryImpl;\n}(ComponentImpl));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar ComponentFactoryImpl = /** @class */ (function (_super) {\n    __extends(ComponentFactoryImpl, _super);\n    function ComponentFactoryImpl(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return ComponentFactoryImpl;\n}(FactoryImpl));\nvar newComponent = function (name, parent, staticInfo, staticInstanceInfo, lock) {\n    return new ComponentMemory(name, parent, staticInfo, staticInstanceInfo, lock, ComponentImpl);\n};\nControllerTypeToClass.put_({\n    create_: function (parent, name, staticInfo, staticInstanceInfo, lock) {\n        return new ComponentFactoryMemory(name, parent, staticInfo, staticInstanceInfo, lock, ComponentFactoryImpl, newComponent);\n    },\n    getConstructor_: function () {\n        return ComponentFactoryImpl;\n    },\n    getType_: function () {\n        return 7 /* COMPONENT_FACTORY */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar PageFactoryMemory = /** @class */ (function (_super) {\n    __extends(PageFactoryMemory, _super);\n    function PageFactoryMemory(name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, newCtrlr) {\n        return _super.call(this, name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, newCtrlr, 5 /* PAGE_FACTORY */) || this;\n    }\n    return PageFactoryMemory;\n}(FactoryMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar VisibilityControllerMemory = /** @class */ (function (_super) {\n    __extends(VisibilityControllerMemory, _super);\n    function VisibilityControllerMemory(name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, type) {\n        var _this = _super.call(this, name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, type) || this;\n        _this._visibility = false;\n        var cp = _this._properties.clone_().retain_(256 /* LOCAL */);\n        _this._displayName = newMemory(SStringMemory, SString, _this, \"$dn\", cp, _this._lock);\n        return _this;\n    }\n    VisibilityControllerMemory.prototype.getDisplayName_ = function () {\n        return this._displayName.get_();\n    };\n    VisibilityControllerMemory.prototype.setDisplayName_ = function (displayName) {\n        this._displayName.set_(displayName, false);\n    };\n    VisibilityControllerMemory.prototype.getHistoryTitle_ = function (separator) {\n        var result = \"\";\n        result = mergeHistoryTitle(result, this.getDisplayName_(), separator);\n        result = mergeHistoryTitle(result, _super.prototype.getHistoryTitle_.call(this, separator), separator);\n        return result;\n    };\n    VisibilityControllerMemory.prototype.isHistoryChanged_ = function (eventInfo) {\n        if (eventInfo.data != null && this._displayName.getName_() in eventInfo.data) {\n            return true;\n        }\n        return _super.prototype.isHistoryChanged_.call(this, eventInfo);\n    };\n    return VisibilityControllerMemory;\n}(ControllerMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar PageMemory = /** @class */ (function (_super) {\n    __extends(PageMemory, _super);\n    function PageMemory(name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor) {\n        return _super.call(this, name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, 1 /* PAGE */) || this;\n    }\n    PageMemory.prototype.show_ = function () {\n        checkSupported(this);\n        var parent = this.getParent_();\n        if (parent != null) {\n            parent.showChild_(this);\n        }\n    };\n    PageMemory.prototype.hide_ = function () {\n        checkSupported(this);\n        var parent = this.getParent_();\n        if (parent != null) {\n            parent.hideChild_(this);\n        }\n    };\n    PageMemory.prototype.isShown_ = function () {\n        var parent = this.getParent_();\n        return (parent != null && parent.getActivePage_() === this && parent.isShown_());\n    };\n    return PageMemory;\n}(VisibilityControllerMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar VisibilityControllerImpl = /** @class */ (function (_super) {\n    __extends(VisibilityControllerImpl, _super);\n    function VisibilityControllerImpl() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    VisibilityControllerImpl.prototype.getDisplayName = function () {\n        return this.__mem__.getDisplayName_();\n    };\n    VisibilityControllerImpl.prototype.setDisplayName = function (displayName) {\n        this.__mem__.setDisplayName_(displayName);\n        return this;\n    };\n    return VisibilityControllerImpl;\n}(ControllerImpl));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar PageImpl = /** @class */ (function (_super) {\n    __extends(PageImpl, _super);\n    function PageImpl(__mem__) {\n        return _super.call(this, __mem__) || this;\n    }\n    PageImpl.prototype.show = function () {\n        this.__mem__.show_();\n        return this;\n    };\n    PageImpl.prototype.hide = function () {\n        this.__mem__.hide_();\n        return this;\n    };\n    PageImpl.prototype.isShown = function () {\n        return this.__mem__.isShown_();\n    };\n    return PageImpl;\n}(VisibilityControllerImpl));\nControllerTypeToClass.put_({\n    create_: function (parent, name, staticInfo, staticInstanceInfo, lock) {\n        return new PageMemory(name, parent, staticInfo, staticInstanceInfo, lock, PageImpl);\n    },\n    getConstructor_: function () {\n        return PageImpl;\n    },\n    getType_: function () {\n        return 1 /* PAGE */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar PageFactoryImpl = /** @class */ (function (_super) {\n    __extends(PageFactoryImpl, _super);\n    function PageFactoryImpl(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return PageFactoryImpl;\n}(FactoryImpl));\nvar newPage = function (name, parent, staticInfo, staticInstanceInfo, lock) {\n    return new PageMemory(name, parent, staticInfo, staticInstanceInfo, lock, PageImpl);\n};\nControllerTypeToClass.put_({\n    create_: function (parent, name, staticInfo, staticInstanceInfo, lock) {\n        return new PageFactoryMemory(name, parent, staticInfo, staticInstanceInfo, lock, PageFactoryImpl, newPage);\n    },\n    getConstructor_: function () {\n        return PageFactoryImpl;\n    },\n    getType_: function () {\n        return 5 /* PAGE_FACTORY */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar PopupFactoryMemory = /** @class */ (function (_super) {\n    __extends(PopupFactoryMemory, _super);\n    function PopupFactoryMemory(name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, newCtrlr) {\n        return _super.call(this, name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, newCtrlr, 6 /* POPUP_FACTORY */) || this;\n    }\n    return PopupFactoryMemory;\n}(FactoryMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar PopupMemory = /** @class */ (function (_super) {\n    __extends(PopupMemory, _super);\n    function PopupMemory(name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor) {\n        var _this = _super.call(this, name, parent, staticInfo, staticInstanceInfo, lock, wrapperConstructor, 2 /* POPUP */) || this;\n        var cp = _this._properties.clone_().retain_(256 /* LOCAL */);\n        _this._isShown = newMemory(SBooleanMemory, SBoolean, _this, \"$is\", cp, lock);\n        _this._isShown.getWrapper_().on(EVENT_CHANGE, function () {\n            _this.checkVisibility_();\n        });\n        return _this;\n    }\n    PopupMemory.prototype.show_ = function () {\n        checkSupported(this);\n        this._isShown.set_(true, false);\n    };\n    PopupMemory.prototype.hide_ = function () {\n        checkSupported(this);\n        this._isShown.set_(false, false);\n    };\n    PopupMemory.prototype.isShown_ = function () {\n        var parent = this.getParent_();\n        return (this._isShown.get_() === true && parent != null && parent.isShown_());\n    };\n    PopupMemory.prototype.getHistoryTitle_ = function (separator) {\n        return (this._isShown.get_() ? _super.prototype.getHistoryTitle_.call(this, separator) : \"\");\n    };\n    PopupMemory.prototype.isHistoryChanged_ = function (eventInfo) {\n        if (eventInfo.data != null && this._isShown.getName_() in eventInfo.data) {\n            return true;\n        }\n        return _super.prototype.isHistoryChanged_.call(this, eventInfo);\n    };\n    return PopupMemory;\n}(VisibilityControllerMemory));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar PopupImpl = /** @class */ (function (_super) {\n    __extends(PopupImpl, _super);\n    function PopupImpl(__mem__) {\n        return _super.call(this, __mem__) || this;\n    }\n    PopupImpl.prototype.show = function () {\n        this.__mem__.show_();\n        return this;\n    };\n    PopupImpl.prototype.hide = function () {\n        this.__mem__.hide_();\n        return this;\n    };\n    PopupImpl.prototype.isShown = function () {\n        return this.__mem__.isShown_();\n    };\n    return PopupImpl;\n}(VisibilityControllerImpl));\nControllerTypeToClass.put_({\n    create_: function (parent, name, staticInfo, staticInstanceInfo, lock) {\n        return new PopupMemory(name, parent, staticInfo, staticInstanceInfo, lock, PopupImpl);\n    },\n    getConstructor_: function () {\n        return PopupImpl;\n    },\n    getType_: function () {\n        return 2 /* POPUP */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar PopupFactoryImpl = /** @class */ (function (_super) {\n    __extends(PopupFactoryImpl, _super);\n    function PopupFactoryImpl(memory) {\n        return _super.call(this, memory) || this;\n    }\n    return PopupFactoryImpl;\n}(FactoryImpl));\nvar newPopup = function (name, parent, staticInfo, staticInstanceInfo, lock) {\n    return new PopupMemory(name, parent, staticInfo, staticInstanceInfo, lock, PopupImpl);\n};\nControllerTypeToClass.put_({\n    create_: function (parent, name, staticInfo, staticInstanceInfo, lock) {\n        return new PopupFactoryMemory(name, parent, staticInfo, staticInstanceInfo, lock, PopupFactoryImpl, newPopup);\n    },\n    getConstructor_: function () {\n        return PopupFactoryImpl;\n    },\n    getType_: function () {\n        return 6 /* POPUP_FACTORY */;\n    }\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n(function (controller) {\n    controller.data = data;\n    controller.internal = internal$1;\n    controller.Callable = Callable;\n    controller.ComponentFactory = ComponentFactoryImpl;\n    controller.Component = ComponentImpl;\n    controller.Controller = ControllerImpl;\n    controller.Controllers = Controllers;\n    controller.Factory = FactoryImpl;\n    controller.PageFactory = PageFactoryImpl;\n    controller.Page = PageImpl;\n    controller.PopupFactory = PopupFactoryImpl;\n    controller.Popup = PopupImpl;\n    controller.RootController = RootControllerImpl;\n    controller.Task = Task;\n    controller.VisibilityController = VisibilityControllerImpl;\n})(exports.controller || (exports.controller = {}));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n(function (event) {\n    event.Event = Event;\n    event.Connection = Connection;\n    event.Connectable = Connectable;\n})(exports.event || (exports.event = {}));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Thrown to indicate that a method has been invoked with a null argument which is not supported.\n *\n *     throw NullArgumentException.create();\n *\n * Must use `isInstance` static method instead of the `instanceof` to check\n * whether an error is an instance of this class.\n * This limitation comes from the fact that the custom exceptions inheriting\n * from the Error class are not printed well in the console.\n *\n *     const e = NullArgumentException.create();\n *\n *     console.log( e instanceof NullArgumentException ); // => false\n *     console.log( NullArgumentException.isInstance( e ) ); // => true\n */\nvar NullArgumentException = /** @class */ (function (_super) {\n    __extends(NullArgumentException, _super);\n    function NullArgumentException() {\n        return _super.call(this) || this;\n    }\n    NullArgumentException.getId = function () {\n        return \"NullArgumentException\";\n    };\n    NullArgumentException.getMessage = function () {\n        return \"unexpected null argument\";\n    };\n    return NullArgumentException;\n}(Exception));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n(function (exception) {\n    exception.Exception = Exception;\n    exception.IllegalArgumentException = IllegalArgumentException;\n    exception.IndexOutOfBoundsException = IndexOutOfBoundsException;\n    exception.NoSuchElementException = NoSuchElementException;\n    exception.NullArgumentException = NullArgumentException;\n    exception.NullPointerException = NullPointerException;\n    exception.UnsupportedOperationException = UnsupportedOperationException;\n})(exports.exception || (exports.exception = {}));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar State;\n(function (State) {\n    State[State[\"INITIAL\"] = 0] = \"INITIAL\";\n    State[State[\"CONNECTING\"] = 1] = \"CONNECTING\";\n    State[State[\"CONNECTED\"] = 2] = \"CONNECTED\";\n    State[State[\"DISCONNECTED\"] = 3] = \"DISCONNECTED\";\n})(State || (State = {}));\nvar InternalIo = /** @class */ (function (_super) {\n    __extends(InternalIo, _super);\n    function InternalIo(baseUrl) {\n        var _this = _super.call(this) || this;\n        _this._baseUrl = baseUrl;\n        _this._url = null;\n        _this._state = 0 /* INITIAL */;\n        _this._subSessions = {};\n        return _this;\n    }\n    InternalIo.prototype.init_ = function () {\n        if (this._state !== 0 /* INITIAL */) {\n            return false;\n        }\n        this._state = 1 /* CONNECTING */;\n        var subSessions = this._subSessions;\n        for (var ssid in subSessions) {\n            subSessions[ssid].state = 1 /* CONNECTING */;\n        }\n        this.init__();\n        return true;\n    };\n    InternalIo.prototype.onOpen_ = function () {\n        if (this._state !== 1 /* CONNECTING */) {\n            return;\n        }\n        this._state = 2 /* CONNECTED */;\n        var subSessions = this._subSessions;\n        for (var ssid in subSessions) {\n            var subSession = subSessions[ssid];\n            if (subSession.state === 0 /* INITIAL */) {\n                subSession.state = 2 /* CONNECTED */;\n                this.add__(ssid);\n            }\n            else if (subSession.state === 1 /* CONNECTING */) {\n                subSession.state = 2 /* CONNECTED */;\n            }\n            this.triggerDirect(IO_EVENT_OPEN, [\"\", ssid], null, null);\n        }\n    };\n    InternalIo.prototype.add_ = function (io) {\n        if (this._state === 3 /* DISCONNECTED */) {\n            return false;\n        }\n        var ssid = io.getSsid();\n        if (ssid == null) {\n            return false;\n        }\n        // Add/update sub session\n        var subSession = this._subSessions[ssid];\n        if (subSession == null) {\n            subSession = { io: io, state: 0 /* INITIAL */ };\n            this._subSessions[ssid] = subSession;\n        }\n        else {\n            subSession.io = io;\n        }\n        // Initialize sub session\n        switch (this._state) {\n            case 0 /* INITIAL */:\n                this.init_();\n                break;\n            case 2 /* CONNECTED */:\n                subSession.state = 2 /* CONNECTED */;\n                this.add__(ssid);\n                this.triggerDirect(IO_EVENT_OPEN, [\"\", ssid], null, null);\n                break;\n        }\n        return true;\n    };\n    InternalIo.prototype.add__ = function (ssid) {\n        this.send_(0, ssid);\n    };\n    InternalIo.prototype.remove_ = function (io) {\n        var ssid = io.getSsid();\n        if (ssid == null) {\n            return false;\n        }\n        var subSessions = this._subSessions;\n        if (ssid in subSessions) {\n            delete subSessions[ssid];\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    InternalIo.prototype.updateUrl_ = function () {\n        var ssids = Object.keys(this._subSessions);\n        this._url = this._baseUrl + \"?ssids=\" + ssids.join(\",\");\n        return this._url;\n    };\n    InternalIo.prototype.onError_ = function () {\n        this.triggerDirect(IO_EVENT_ERROR, null, null, null);\n    };\n    InternalIo.prototype.onClose_ = function () {\n        if (this._state === 3 /* DISCONNECTED */) {\n            return;\n        }\n        this._state = 3 /* DISCONNECTED */;\n        this._subSessions = {};\n        this.cleanup_();\n        this.triggerDirect(IO_EVENT_CLOSE, null, null, null);\n    };\n    InternalIo.prototype.isOpened_ = function () {\n        return (this._state === 2 /* CONNECTED */);\n    };\n    InternalIo.prototype.isClosed_ = function () {\n        return (this._state === 3 /* DISCONNECTED */);\n    };\n    InternalIo.prototype.onMessage_ = function (message) {\n        try {\n            var index = message.indexOf(\":\");\n            var ssid = message.substring(0, index);\n            this.triggerDirect(IO_EVENT_MESSAGE, [\"\", ssid], [null, message.substring(index + 1, message.length)], null);\n        }\n        catch (e) {\n            LoggerImpl.getInstance().error(e);\n        }\n    };\n    return InternalIo;\n}(Connectable));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar InternalPollingIo = /** @class */ (function (_super) {\n    __extends(InternalPollingIo, _super);\n    function InternalPollingIo(baseUrl, parameters) {\n        var _this = this;\n        parameters = parameters || {};\n        var interval = (parameters.interval != null ? parameters.interval : 100);\n        var timeout = (parameters.timeout != null ? parameters.timeout : 15000);\n        _this = _super.call(this, baseUrl) || this;\n        _this._interval = interval;\n        _this._timeout = timeout;\n        _this._timeoutId = null;\n        _this._poller = function () { _this.poll_(); };\n        return _this;\n    }\n    InternalPollingIo.prototype.init__ = function () {\n        this.poll_();\n    };\n    InternalPollingIo.prototype.cleanup_ = function () {\n        if (this._timeoutId != null) {\n            self.clearTimeout(this._timeoutId);\n            this._timeoutId = null;\n        }\n    };\n    InternalPollingIo.prototype.poll_ = function () {\n        var _this = this;\n        var url = this.updateUrl_();\n        Ajax.getInstance().get({\n            url: url,\n            timeout: this._timeout,\n            success: function (data) {\n                if (!_this.isOpened_()) {\n                    _this.onOpen_();\n                }\n                if (data != null && isNotEmptyArray(data)) {\n                    _this.onMessage_(data);\n                }\n                if (_this.isOpened_()) {\n                    _this._timeoutId = self.setTimeout(_this._poller, _this._interval);\n                }\n            },\n            error: function () {\n                if (_this.isOpened_()) {\n                    _this.onClose_();\n                }\n            }\n        });\n    };\n    InternalPollingIo.prototype.ping_ = function (ssid) {\n        // DO NOTHING\n        return true;\n    };\n    InternalPollingIo.prototype.send_ = function (message, ssid) {\n        var _this = this;\n        if (!this.isOpened_()) {\n            return false;\n        }\n        var url = this.updateUrl_();\n        try {\n            Ajax.getInstance().post({\n                url: url,\n                cache: false,\n                headers: {\n                    \"Content-Type\": \"application/json\"\n                },\n                data: JSON.stringify([ssid, message]),\n                timeout: this._timeout,\n                success: function (data) {\n                    if (!_this.isOpened_()) {\n                        _this.onOpen_();\n                    }\n                    if (data != null && isNotEmptyArray(data)) {\n                        _this.onMessage_(data);\n                    }\n                },\n                error: function () {\n                    if (_this.isOpened_()) {\n                        _this.onClose_();\n                    }\n                }\n            });\n        }\n        catch (e) {\n            LoggerImpl.getInstance().error(e);\n            return false;\n        }\n        return true;\n    };\n    return InternalPollingIo;\n}(InternalIo));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar InternalWebSocketIo = /** @class */ (function (_super) {\n    __extends(InternalWebSocketIo, _super);\n    function InternalWebSocketIo(baseUrl) {\n        var _this = _super.call(this, baseUrl) || this;\n        _this._ws = null;\n        return _this;\n    }\n    InternalWebSocketIo.prototype.init__ = function () {\n        var _this = this;\n        var url = this.updateUrl_();\n        try {\n            var ws = this._ws = new WebSocket(url);\n            ws.onopen = function () { return _this.onOpen_(); };\n            ws.onerror = function () { return _this.onError_(); };\n            ws.onclose = function () { return _this.onClose_(); };\n            ws.onmessage = function (message) { return _this.onMessage_(message.data); };\n        }\n        catch (e) {\n            LoggerImpl.getInstance().error(e);\n        }\n    };\n    InternalWebSocketIo.prototype.cleanup_ = function () {\n        var ws = this._ws;\n        if (ws != null) {\n            this._ws = null;\n            ws.onopen = null;\n            ws.onerror = null;\n            ws.onclose = null;\n            ws.onmessage = null;\n        }\n    };\n    InternalWebSocketIo.prototype.ping_ = function (ssid) {\n        return this.send_(\"[]\", ssid);\n    };\n    InternalWebSocketIo.prototype.send_ = function (message, ssid) {\n        if (!this.isOpened_()) {\n            return false;\n        }\n        try {\n            this._ws.send(JSON.stringify([ssid, message]));\n        }\n        catch (e) {\n            LoggerImpl.getInstance().error(e);\n            return false;\n        }\n        return true;\n    };\n    return InternalWebSocketIo;\n}(InternalIo));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar removeEventListener = function (element, type, handler) {\n    element.removeEventListener(type, handler, false);\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar makeBaseUrl = function (protocol, contentPath) {\n    protocol = protocol + (location.protocol === \"https:\" ? \"s\" : \"\");\n    var host = location.host;\n    var pathname = location.pathname;\n    var basePath = pathname.substr(0, pathname.lastIndexOf(\"/\"));\n    return protocol + \"://\" + host + basePath + contentPath;\n};\nvar makeUrl = function (baseUrl, ssid) {\n    return baseUrl + \"?ssid=\" + ssid;\n};\n/**\n * Provides methods for communicating with a server.\n */\nvar Io = /** @class */ (function (_super) {\n    __extends(Io, _super);\n    function Io(name, protocol, contentPath) {\n        var _this = _super.call(this) || this;\n        if (typeof window !== \"undefined\") {\n            _this._onUnloadBound = function () { _this.onUnload(); };\n            addEventListener(window, \"pagehide\", _this._onUnloadBound);\n        }\n        else {\n            _this._onUnloadBound = null;\n        }\n        _this._ssid = null;\n        _this._name = name;\n        _this._protocol = protocol;\n        _this._contentPath = contentPath;\n        _this._url = null;\n        _this._baseUrl = null;\n        _this._isConnected = false;\n        return _this;\n    }\n    Io.prototype.getProtocol = function () {\n        return this._protocol;\n    };\n    Io.prototype.getContentPath = function () {\n        return this._contentPath;\n    };\n    Io.prototype.getSsid = function () {\n        return this._ssid;\n    };\n    Io.prototype.getBaseUrl = function () {\n        return this._baseUrl;\n    };\n    Io.prototype.getUrl = function () {\n        return this._url;\n    };\n    Io.prototype.updateUrl_ = function () {\n        return this._url = makeUrl(this._baseUrl, this._ssid);\n    };\n    /**\n     * Initializes this instance.\n     *\n     * @returns true if the initialization is finished successfully\n     */\n    Io.prototype.init = function () {\n        this._baseUrl = makeBaseUrl(this._protocol, this._contentPath);\n        return true;\n    };\n    /**\n     * Starts to connect to the server.\n     *\n     * @param ssid SSID of the connection\n     * @returns true if it started the connection successfully\n     */\n    Io.prototype.connect = function (ssid) {\n        if (this._baseUrl == null) {\n            return false;\n        }\n        this._ssid = ssid;\n        this.updateUrl_();\n        LoggerImpl.getInstance().info(this._name + \" connection: \" + this._url);\n        return this.connect_();\n    };\n    /**\n     * Destroys this instance.\n     *\n     * @returns this\n     */\n    Io.prototype.destroy = function () {\n        if (this._onUnloadBound != null) {\n            if (typeof window !== \"undefined\") {\n                removeEventListener(window, \"pagehide\", this._onUnloadBound);\n            }\n            this._onUnloadBound = null;\n        }\n        return this;\n    };\n    /**\n     * Starts to disconnect from the server.\n     *\n     * @returns {boolean} true if started to disconnect from the server successfully.\n     */\n    Io.prototype.disconnect = function () {\n        if (!this._isConnected) {\n            return false;\n        }\n        return this.disconnect_();\n    };\n    /**\n     * Called when the connection is established.\n     *\n     * @returns\n     */\n    Io.prototype.onOpen = function () {\n        if (this._isConnected) {\n            return;\n        }\n        LoggerImpl.getInstance().info(this._name + \" opened\");\n        this._isConnected = true;\n        this.triggerDirect(IO_EVENT_CONNECTED, null, null, null);\n    };\n    /**\n     * Called when the connection is completed with errors.\n     *\n     * @returns\n     */\n    Io.prototype.onError = function () {\n        LoggerImpl.getInstance().error(this._name + \" error\", arguments);\n        this.triggerDirect(IO_EVENT_ERROR, null, null, null);\n    };\n    /**\n     * Returns true if the connection is established.\n     *\n     * @returns true if the connection is established\n     */\n    Io.prototype.isConnected = function () {\n        return this._isConnected;\n    };\n    /**\n     * Called when the connection is closed.\n     *\n     * @returns\n     */\n    Io.prototype.onClose = function () {\n        if (this._isConnected) {\n            LoggerImpl.getInstance().info(this._name + \" closed\");\n            this._isConnected = false;\n            this.triggerDirect(IO_EVENT_DISCONNECTED, null, null, null);\n        }\n        else {\n            LoggerImpl.getInstance().info(this._name + \" failed\");\n            this.triggerDirect(IO_EVENT_FAILED, null, null, null);\n        }\n    };\n    /**\n     * Called when about to be unloaded.\n     * @returns\n     */\n    Io.prototype.onUnload = function () {\n        LoggerImpl.getInstance().info(this._name + \" unloaded\");\n        this.disconnect_();\n    };\n    /**\n     * Sends the ping message to the server.\n     *\n     * @returns\n     */\n    Io.prototype.ping = function () {\n        return true;\n    };\n    /**\n     * Sends the specified message to the server.\n     *\n     * @param message the message to be sended\n     * @returns true if succeeded\n     */\n    Io.prototype.send = function (message) {\n        return true;\n    };\n    /**\n     * Called when received a message.\n     *\n     * @param thisObj the target\n     * @param message the received message\n     * @returns\n     */\n    Io.onMessage = function (io, message) {\n        io.triggerHandlers(message);\n    };\n    return Io;\n}(MessageEmitter));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Provides the polling-based connection.\n */\nvar PollingIo = /** @class */ (function (_super) {\n    __extends(PollingIo, _super);\n    function PollingIo(parameters) {\n        var _this = this;\n        parameters = parameters || {};\n        var interval = (parameters.interval != null ? parameters.interval : 100);\n        var timeout = (parameters.timeout != null ? parameters.timeout : 15000);\n        _this = _super.call(this, \"Polling-\" + interval, \"http\", \"/wcardinal-polling\") || this;\n        _this._interval = interval;\n        _this._timeout = timeout;\n        _this._timeoutId = null;\n        _this._poller = function () { _this.poll_(); };\n        _this._stop = false;\n        return _this;\n    }\n    PollingIo.prototype.disconnect_ = function () {\n        if (this._stop) {\n            return false;\n        }\n        this._stop = true;\n        if (this._timeoutId != null) {\n            self.clearTimeout(this._timeoutId);\n            this._timeoutId = null;\n        }\n        return true;\n    };\n    PollingIo.prototype.connect_ = function () {\n        if (this._stop) {\n            return false;\n        }\n        try {\n            this._poller();\n        }\n        catch (e) {\n            LoggerImpl.getInstance().error(e);\n            return false;\n        }\n        return true;\n    };\n    PollingIo.prototype.poll_ = function () {\n        var _this = this;\n        var url = this.updateUrl_();\n        Ajax.getInstance().get({\n            url: url,\n            timeout: this._timeout,\n            success: function (data) {\n                if (!_this._isConnected) {\n                    _this.onOpen();\n                }\n                if (data != null && isNotEmptyArray(data)) {\n                    Io.onMessage(_this, data);\n                }\n                if (_this._isConnected) {\n                    if (!_this._stop) {\n                        _this._timeoutId = self.setTimeout(_this._poller, _this._interval);\n                    }\n                    else {\n                        _this._stop = false;\n                        _this._timeoutId = null;\n                        _this.onClose();\n                    }\n                }\n            },\n            error: function () {\n                if (_this._isConnected) {\n                    _this.onClose();\n                }\n            }\n        });\n    };\n    PollingIo.prototype.send = function (message) {\n        var _this = this;\n        if (!this._isConnected) {\n            return false;\n        }\n        try {\n            var url = this.updateUrl_();\n            Ajax.getInstance().post({\n                url: url,\n                cache: false,\n                headers: {\n                    \"Content-Type\": \"application/json\"\n                },\n                data: message,\n                timeout: this._timeout,\n                success: function (data) {\n                    if (!_this._isConnected) {\n                        _this.onOpen();\n                    }\n                    if (data != null && isNotEmptyArray(data)) {\n                        Io.onMessage(_this, data);\n                    }\n                },\n                error: function () {\n                    if (_this._isConnected) {\n                        _this.onClose();\n                    }\n                }\n            });\n        }\n        catch (e) {\n            LoggerImpl.getInstance().error(e);\n            return false;\n        }\n        return true;\n    };\n    return PollingIo;\n}(Io));\nIos.getInstance().add(\"polling\", PollingIo);\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Provides the shared connection.\n */\nvar SharedIo = /** @class */ (function (_super) {\n    __extends(SharedIo, _super);\n    function SharedIo(name, protocol, contentPath, internalIoFactory, internalIoInstances) {\n        var _this = _super.call(this, name, protocol, contentPath) || this;\n        _this._internalIoFactory = internalIoFactory;\n        _this._internalIoInstances = internalIoInstances;\n        return _this;\n    }\n    SharedIo.prototype.disconnect_ = function () {\n        var baseUrl = this.getBaseUrl();\n        if (baseUrl == null) {\n            return false;\n        }\n        var internal = this._internalIoInstances[baseUrl];\n        if (internal == null) {\n            return false;\n        }\n        var ssid = this.getSsid();\n        internal.off(\".\" + ssid);\n        return internal.remove_(this);\n    };\n    SharedIo.prototype.connect_ = function () {\n        var _this = this;\n        var baseUrl = this.getBaseUrl();\n        if (baseUrl == null) {\n            return false;\n        }\n        var internals = this._internalIoInstances;\n        var internal = internals[baseUrl];\n        if (internal == null || internal.isClosed_()) {\n            this.disconnect_();\n            internal = this._internalIoFactory(baseUrl);\n            internals[baseUrl] = internal;\n        }\n        var ssid = this.getSsid();\n        internal.on(IO_EVENT_OPEN + \".\" + ssid, function () { return _this.onOpen(); });\n        internal.on(IO_EVENT_ERROR + \".\" + ssid, function () { return _this.onError(); });\n        internal.on(IO_EVENT_CLOSE + \".\" + ssid, function () { return _this.onClose(); });\n        internal.on(IO_EVENT_MESSAGE + \".\" + ssid, function (e, message) { return Io.onMessage(_this, message); });\n        return internal.add_(this);\n    };\n    SharedIo.prototype.ping = function () {\n        if (!this._isConnected) {\n            return false;\n        }\n        var baseUrl = this.getBaseUrl();\n        if (baseUrl == null) {\n            return false;\n        }\n        var ssid = this.getSsid();\n        if (ssid == null) {\n            return false;\n        }\n        var internal = this._internalIoInstances[baseUrl];\n        if (internal == null) {\n            return false;\n        }\n        try {\n            return internal.ping_(ssid);\n        }\n        catch (e) {\n            LoggerImpl.getInstance().error(e);\n            return false;\n        }\n    };\n    SharedIo.prototype.send = function (message) {\n        if (!this._isConnected) {\n            return false;\n        }\n        var baseUrl = this.getBaseUrl();\n        if (baseUrl == null) {\n            return false;\n        }\n        var ssid = this.getSsid();\n        if (ssid == null) {\n            return false;\n        }\n        var internal = this._internalIoInstances[baseUrl];\n        if (internal == null) {\n            return false;\n        }\n        try {\n            return internal.send_(message, ssid);\n        }\n        catch (e) {\n            LoggerImpl.getInstance().error(e);\n            return false;\n        }\n    };\n    return SharedIo;\n}(Io));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SharedPollingInstances = {};\n/**\n * Provides the shared polling connection.\n */\nvar SharedPollingIo = /** @class */ (function (_super) {\n    __extends(SharedPollingIo, _super);\n    function SharedPollingIo(parameters) {\n        var _this = this;\n        parameters = parameters || {};\n        _this = _super.call(this, \"SharedPolling-\" + parameters.interval, \"http\", \"/wcardinal-polling\", function (baseUrl) {\n            return new InternalPollingIo(baseUrl, parameters);\n        }, SharedPollingInstances) || this;\n        return _this;\n    }\n    return SharedPollingIo;\n}(SharedIo));\nIos.getInstance().add(\"shared-polling\", SharedPollingIo);\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar SharedWebSocketInstances = {};\n/**\n * Provides the shared WebSocket connection.\n */\nvar SharedWebSocketIo = /** @class */ (function (_super) {\n    __extends(SharedWebSocketIo, _super);\n    function SharedWebSocketIo(parameters) {\n        return _super.call(this, \"SharedWebSocket\", \"ws\", \"/wcardinal-websocket\", function (baseUrl) {\n            return new InternalWebSocketIo(baseUrl);\n        }, SharedWebSocketInstances) || this;\n    }\n    return SharedWebSocketIo;\n}(SharedIo));\nIos.getInstance().add(\"shared-websocket\", SharedWebSocketIo);\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Provides the WebSocket connection.\n */\nvar WebSocketIo = /** @class */ (function (_super) {\n    __extends(WebSocketIo, _super);\n    function WebSocketIo(parameters) {\n        var _this = _super.call(this, \"WebSocket\", \"ws\", \"/wcardinal-websocket\") || this;\n        _this._ws = null;\n        return _this;\n    }\n    WebSocketIo.prototype.disconnect_ = function () {\n        var ws = this._ws;\n        if (ws == null) {\n            return false;\n        }\n        ws.close();\n        this._ws = null;\n        return true;\n    };\n    WebSocketIo.prototype.connect_ = function () {\n        var _this = this;\n        var ws1 = this._ws;\n        if (ws1 != null) {\n            if (ws1.readyState !== WebSocket.CLOSED) {\n                return true;\n            }\n            else {\n                ws1.onopen = null;\n                ws1.onerror = null;\n                ws1.onclose = null;\n                ws1.onmessage = null;\n            }\n        }\n        var url = this.getUrl();\n        if (url != null) {\n            try {\n                var ws2 = this._ws = new WebSocket(url);\n                ws2.onopen = function () { return _this.onOpen(); };\n                ws2.onerror = function () { return _this.onError(); };\n                ws2.onclose = function () { return _this.onClose(); };\n                ws2.onmessage = function (message) { return Io.onMessage(_this, message.data); };\n                return true;\n            }\n            catch (e) {\n                LoggerImpl.getInstance().error(e);\n            }\n        }\n        return false;\n    };\n    WebSocketIo.prototype.ping = function () {\n        return this.send(\"[]\");\n    };\n    WebSocketIo.prototype.send = function (message) {\n        if (!this._isConnected) {\n            return false;\n        }\n        var ws = this._ws;\n        if (ws == null) {\n            return false;\n        }\n        try {\n            ws.send(message);\n            return true;\n        }\n        catch (e) {\n            LoggerImpl.getInstance().error(e);\n            return false;\n        }\n    };\n    return WebSocketIo;\n}(Io));\nIos.getInstance().add(\"websocket\", WebSocketIo);\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n(function (io) {\n    io.InternalIo = InternalIo;\n    io.InternalPollingIo = InternalPollingIo;\n    io.InternalWebSocketIo = InternalWebSocketIo;\n    io.Io = Io;\n    io.Ios = Ios;\n    io.MessageEmitter = MessageEmitter;\n    io.PollingIo = PollingIo;\n    io.SharedIo = SharedIo;\n    io.SharedPollingIo = SharedPollingIo;\n    io.SharedWebSocketIo = SharedWebSocketIo;\n    io.WebSocketIo = WebSocketIo;\n})(exports.io || (exports.io = {}));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n(function (server) {\n    server.Server = ServerConstructorImpl;\n})(exports.server || (exports.server = {}));\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar stringToBase64 = function (string) {\n    return btoa(unescape(encodeURIComponent(string)));\n};\nvar base64ToString = function (base64) {\n    return decodeURIComponent(escape(atob(base64)));\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n// tslint:disable: only-arrow-functions\nvar bind$1 = function (targetFunction, thisArg) {\n    if (2 < arguments.length) {\n        var args_1 = Array.prototype.slice.call(arguments, 2);\n        return function () {\n            var newArgs = args_1.slice(0);\n            for (var i = 0, imax = arguments.length; i < imax; ++i) {\n                newArgs.push(arguments[i]);\n            }\n            return targetFunction.apply(thisArg, newArgs);\n        };\n    }\n    else {\n        return function () {\n            return targetFunction.apply(thisArg, arguments);\n        };\n    }\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar cloneArray = function (target) {\n    var result = [];\n    for (var i = 0, imax = target.length; i < imax; ++i) {\n        result.push(target[i]);\n    }\n    return result;\n};\nvar cloneObject = function (target) {\n    var result = {};\n    for (var key in target) {\n        if (hasOwn(target, key)) {\n            result[key] = target[key];\n        }\n    }\n    return result;\n};\nvar clone = function (target) {\n    if (isArray(target)) {\n        return cloneArray(target);\n    }\n    else if (isPlainObject(target)) {\n        return cloneObject(target);\n    }\n    return target;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar mergeCloneDeep = function (target) {\n    if (isArray(target)) {\n        return mergeArray([], target);\n    }\n    else if (isPlainObject(target)) {\n        return mergeObject({}, target);\n    }\n    return target;\n};\nvar mergeArray = function (a, b) {\n    var imin = Math.min(a.length, b.length);\n    for (var i = 0; i < imin; ++i) {\n        var bi = b[i];\n        if (isArray(bi)) {\n            var ai = a[i];\n            if (isArray(ai)) {\n                mergeArray(ai, bi);\n            }\n            else {\n                a[i] = mergeArray([], bi);\n            }\n        }\n        else if (isPlainObject(bi)) {\n            var ai = a[i];\n            if (isPlainObject(ai)) {\n                mergeObject(ai, bi);\n            }\n            else {\n                a[i] = mergeObject({}, bi);\n            }\n        }\n        else if (bi !== undefined) {\n            a[i] = bi;\n        }\n    }\n    for (var i = imin, imax = b.length; i < imax; ++i) {\n        a[i] = mergeCloneDeep(b[i]);\n    }\n    return a;\n};\nvar mergeObject = function (a, b) {\n    for (var key in b) {\n        if (hasOwn(b, key)) {\n            var bv = b[key];\n            if (key in a) {\n                if (isArray(bv)) {\n                    var av = a[key];\n                    if (isArray(av)) {\n                        mergeArray(av, bv);\n                    }\n                    else {\n                        a[key] = mergeArray([], bv);\n                    }\n                }\n                else if (isPlainObject(bv)) {\n                    var av = a[key];\n                    if (isPlainObject(av)) {\n                        mergeObject(av, bv);\n                    }\n                    else {\n                        a[key] = mergeObject({}, bv);\n                    }\n                }\n                else if (bv !== undefined) {\n                    a[key] = bv;\n                }\n            }\n            else {\n                a[key] = mergeCloneDeep(bv);\n            }\n        }\n    }\n    return a;\n};\n// tslint:disable-next-line:only-arrow-functions\nvar merge = function (a) {\n    var args = arguments;\n    for (var i = 1, imax = args.length; i < imax; ++i) {\n        mergeObject(a, args[i]);\n    }\n    return a;\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar cloneDeep = function (target) {\n    return mergeCloneDeep(target);\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nfunction eachRightArray(target, iteratee, thisArg) {\n    for (var i = target.length - 1; 0 <= i; --i) {\n        if (iteratee.call(thisArg, target[i], i, target) === false) {\n            break;\n        }\n    }\n    return target;\n}\nfunction eachRight(target, iteratee, thisArg) {\n    if (isArrayLike(target)) {\n        return eachRightArray(target, iteratee, thisArg);\n    }\n    else if (target != null) {\n        return eachObject(target, iteratee, thisArg);\n    }\n    return target;\n}\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar escapeHandler = function (character) {\n    switch (character) {\n        case \"&\": return \"&amp;\";\n        case \"<\": return \"&lt;\";\n        case \">\": return \"&gt;\";\n        case '\"': return \"&quot;\";\n        case \"'\": return \"&#39;\";\n        default: return \"\";\n    }\n};\nvar escapeRegEx = /[&<>\"']/g;\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar escape$1 = function (target) {\n    return String(target).replace(escapeRegEx, escapeHandler);\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar isNaN = (typeof Number.isNaN !== \"undefined\" ? Number.isNaN : function (target) {\n    return isNumber(target) && target !== target;\n});\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar UtilImpl = /** @class */ (function () {\n    function UtilImpl() {\n        this.register = register;\n        this.getGlobal = getGlobal;\n        this.btoa = stringToBase64;\n        this.atob = base64ToString;\n        this.bind = bind$1;\n        this.now = now;\n        this.isNumber = isNumber;\n        this.isNaN = isNaN;\n        this.isString = isString;\n        this.isFunction = isFunction;\n        this.isThenable = isThenable;\n        this.isBoolean = isBoolean;\n        this.isArray = isArray;\n        this.isArrayLike = isArrayLike;\n        this.isPlainObject = isPlainObject;\n        this.isEmpty = isEmpty;\n        this.size = size;\n        this.isEqual = isEqual;\n        this.equals = isEqual;\n        this.sortedIndex = sortedIndex;\n        this.each = each;\n        this.eachRight = eachRight;\n        this.merge = merge;\n        this.clone = clone;\n        this.cloneDeep = cloneDeep;\n        this.hasOwn = hasOwn;\n        this.escape = escape$1;\n    }\n    UtilImpl.getInstance = function () {\n        if (this.INSTANCE == null) {\n            this.INSTANCE = new UtilImpl();\n        }\n        return this.INSTANCE;\n    };\n    UtilImpl.INSTANCE = null;\n    return UtilImpl;\n}());\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\nvar doFormat = function (formatString, parameters) {\n    return formatString.replace(/\\{(\\w+)\\}/g, function (i, j) {\n        return String(parameters[parseInt(j, 10)]);\n    });\n};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Provides methods for retrieving messages.\n *\n * #### Step 1: Replace the MessageSource class\n *\n * To use this class, the MessageSource on a server must implement the interface\n * `org.wcardinal.util.message.ExposableMessageSource`. There are the two out-of-the-box\n * implementations of this interface: `ExposableReloadableResourceBundleMessageSource`\n * and `ExposableResourceBundleMessageSource` in the package `org.wcardinal.util.message`.\n *\n * ```java\n * // Java\n * import org.springframework.context.MessageSource;\n * import org.springframework.context.annotation.Bean;\n * import org.springframework.context.annotation.Configuration;\n * import org.wcardinal.util.message.ExposableReloadableResourceBundleMessageSource;\n *\n * @Configuration\n * public class MessageSourceConfig {\n *     @Bean\n *     public MessageSource messageSource(){\n *         final ExposableReloadableResourceBundleMessageSource result\n *             = new ExposableReloadableResourceBundleMessageSource();\n *         result.setBasename(\"classpath:/i18n/messages\");\n *         result.setDefaultEncoding(\"UTF-8\");\n *         return result;\n *     }\n * }\n * ```\n * &NewLine;\n * #### Step 2: Embed a script\n *\n * And then embed a message script obtained by `ExposableMessages#getScript` as follows:\n *\n * ```java\n * // Java\n * import org.wcardinal.util.message.ExposableMessages;\n *\n * @Controller\n * public class MessageMvcController {\n *     @Autowired\n *     ExposableMessages messages;\n *\n *     @RequestMapping( \"/\" )\n *     ModelAndView en( final HttpServletRequest req ) {\n *         final ModelAndView mav = new ModelAndView();\n *         mav.addObject( \"messageScript\", messages.getScript( Locale.ENGLISH ) );\n *         mav.setViewName(\"sample-view\");\n *         return mav;\n *     }\n * }\n * ```\n * &NewLine;\n * ```html\n * <!-- HTML Template (sample-view.html) -->\n * <!-- Must be placed after the wcardinal script -->\n * <script th:utext=\"${ messageScript }\"></script>\n * ```\n *\n * Please note that the message script must be loaded after the `wcardinal.min.js`.\n *\n * Now, translated messages can be obtained by calling `MessageSource#get` with message IDs.\n *\n * ```javascript\n * // JavaScript\n * messageSource.get( \"foo.bar.1\" );\n * ```\n *\n * For parameterized messages, pass parameters to the get method.\n *\n * ```javascript\n * // JavaScript\n * messageSource.get( \"foo.bar.1\", 123, \"William\" );\n * ```\n */\nvar MessageSource = /** @class */ (function () {\n    function MessageSource() {\n    }\n    /**\n     * Returns the message of the specified message ID.\n     *\n     * @method get\n     * @param id message ID\n     * @param parameters message parameters\n     * @returns message of the specified message ID\n     */\n    MessageSource.prototype.get = function (id) {\n        var parameter0 = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            parameter0[_i - 1] = arguments[_i];\n        }\n        var translated = this.source[id];\n        if (translated == null) {\n            return id;\n        }\n        if (parameter0.length <= 0) {\n            return translated;\n        }\n        return doFormat(translated, parameter0);\n    };\n    MessageSource.getInstance = function () {\n        if (this.INSTANCE == null) {\n            this.INSTANCE = new MessageSource();\n        }\n        return this.INSTANCE;\n    };\n    MessageSource.INSTANCE = null;\n    return MessageSource;\n}());\nMessageSource.prototype.source = {};\n\n/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n(function (util_1) {\n    util_1.Util = UtilImpl;\n    // tslint:disable-next-line:no-shadowed-variable\n    util_1.util = UtilImpl.getInstance();\n    util_1.Ajax = Ajax;\n    util_1.ajax = Ajax.getInstance();\n    util_1.Thenable = PromiseClass;\n    util_1.MessageSource = MessageSource;\n    util_1.messageSource = MessageSource.getInstance();\n    util_1.Logger = LoggerImpl;\n    util_1.logger = LoggerImpl.getInstance();\n})(exports.util || (exports.util = {}));\n"]}