src/cm/media/js/lib/yui/yui_3.10.3/build/event-valuechange/event-valuechange-coverage.js
changeset 525 89ef5ed3c48b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cm/media/js/lib/yui/yui_3.10.3/build/event-valuechange/event-valuechange-coverage.js	Tue Jul 16 14:29:46 2013 +0200
@@ -0,0 +1,13 @@
+/*
+YUI 3.10.3 (build 2fb5187)
+Copyright 2013 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
+if (!__coverage__['build/event-valuechange/event-valuechange.js']) {
+   __coverage__['build/event-valuechange/event-valuechange.js'] = {"path":"build/event-valuechange/event-valuechange.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0,0],"7":[0,0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":29},"end":{"line":1,"column":48}}},"2":{"name":"(anonymous_2)","line":81,"loc":{"start":{"line":81,"column":11},"end":{"line":81,"column":36}}},"3":{"name":"(anonymous_3)","line":106,"loc":{"start":{"line":106,"column":44},"end":{"line":106,"column":64}}},"4":{"name":"(anonymous_4)","line":123,"loc":{"start":{"line":123,"column":21},"end":{"line":123,"column":47}}},"5":{"name":"(anonymous_5)","line":136,"loc":{"start":{"line":136,"column":36},"end":{"line":136,"column":48}}},"6":{"name":"(anonymous_6)","line":160,"loc":{"start":{"line":160,"column":19},"end":{"line":160,"column":54}}},"7":{"name":"(anonymous_7)","line":191,"loc":{"start":{"line":191,"column":38},"end":{"line":191,"column":50}}},"8":{"name":"(anonymous_8)","line":209,"loc":{"start":{"line":209,"column":18},"end":{"line":209,"column":44}}},"9":{"name":"(anonymous_9)","line":239,"loc":{"start":{"line":239,"column":18},"end":{"line":239,"column":34}}},"10":{"name":"(anonymous_10)","line":257,"loc":{"start":{"line":257,"column":13},"end":{"line":257,"column":36}}},"11":{"name":"(anonymous_11)","line":270,"loc":{"start":{"line":270,"column":14},"end":{"line":270,"column":37}}},"12":{"name":"(anonymous_12)","line":293,"loc":{"start":{"line":293,"column":16},"end":{"line":293,"column":39}}},"13":{"name":"(anonymous_13)","line":306,"loc":{"start":{"line":306,"column":14},"end":{"line":306,"column":37}}},"14":{"name":"(anonymous_14)","line":326,"loc":{"start":{"line":326,"column":18},"end":{"line":326,"column":41}}},"15":{"name":"(anonymous_15)","line":342,"loc":{"start":{"line":342,"column":18},"end":{"line":342,"column":57}}},"16":{"name":"(anonymous_16)","line":363,"loc":{"start":{"line":363,"column":36},"end":{"line":363,"column":48}}},"17":{"name":"(anonymous_17)","line":369,"loc":{"start":{"line":369,"column":41},"end":{"line":369,"column":58}}},"18":{"name":"(anonymous_18)","line":402,"loc":{"start":{"line":402,"column":20},"end":{"line":402,"column":60}}},"19":{"name":"(anonymous_19)","line":408,"loc":{"start":{"line":408,"column":41},"end":{"line":408,"column":58}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":461,"column":63}},"2":{"start":{"line":33,"column":0},"end":{"line":415,"column":2}},"3":{"start":{"line":82,"column":8},"end":{"line":86,"column":28}},"4":{"start":{"line":88,"column":8},"end":{"line":91,"column":9}},"5":{"start":{"line":89,"column":12},"end":{"line":89,"column":34}},"6":{"start":{"line":90,"column":12},"end":{"line":90,"column":19}},"7":{"start":{"line":93,"column":8},"end":{"line":93,"column":33}},"8":{"start":{"line":95,"column":8},"end":{"line":111,"column":9}},"9":{"start":{"line":96,"column":12},"end":{"line":96,"column":36}},"10":{"start":{"line":98,"column":12},"end":{"line":104,"column":14}},"11":{"start":{"line":106,"column":12},"end":{"line":108,"column":15}},"12":{"start":{"line":107,"column":16},"end":{"line":107,"column":38}},"13":{"start":{"line":110,"column":12},"end":{"line":110,"column":37}},"14":{"start":{"line":126,"column":8},"end":{"line":128,"column":9}},"15":{"start":{"line":127,"column":12},"end":{"line":127,"column":19}},"16":{"start":{"line":130,"column":8},"end":{"line":130,"column":44}},"17":{"start":{"line":132,"column":8},"end":{"line":132,"column":30}},"18":{"start":{"line":136,"column":8},"end":{"line":138,"column":23}},"19":{"start":{"line":137,"column":12},"end":{"line":137,"column":44}},"20":{"start":{"line":161,"column":8},"end":{"line":163,"column":9}},"21":{"start":{"line":162,"column":12},"end":{"line":162,"column":19}},"22":{"start":{"line":165,"column":8},"end":{"line":165,"column":44}},"23":{"start":{"line":167,"column":8},"end":{"line":170,"column":9}},"24":{"start":{"line":168,"column":12},"end":{"line":168,"column":48}},"25":{"start":{"line":169,"column":12},"end":{"line":169,"column":43}},"26":{"start":{"line":172,"column":8},"end":{"line":172,"column":52}},"27":{"start":{"line":176,"column":8},"end":{"line":183,"column":9}},"28":{"start":{"line":177,"column":12},"end":{"line":182,"column":13}},"29":{"start":{"line":178,"column":16},"end":{"line":178,"column":48}},"30":{"start":{"line":180,"column":16},"end":{"line":180,"column":63}},"31":{"start":{"line":181,"column":16},"end":{"line":181,"column":23}},"32":{"start":{"line":189,"column":8},"end":{"line":189,"column":55}},"33":{"start":{"line":191,"column":8},"end":{"line":193,"column":29}},"34":{"start":{"line":192,"column":12},"end":{"line":192,"column":44}},"35":{"start":{"line":196,"column":8},"end":{"line":196,"column":43}},"36":{"start":{"line":212,"column":8},"end":{"line":214,"column":9}},"37":{"start":{"line":213,"column":12},"end":{"line":213,"column":19}},"38":{"start":{"line":216,"column":8},"end":{"line":216,"column":50}},"39":{"start":{"line":218,"column":8},"end":{"line":218,"column":39}},"40":{"start":{"line":219,"column":8},"end":{"line":219,"column":31}},"41":{"start":{"line":221,"column":8},"end":{"line":221,"column":30}},"42":{"start":{"line":223,"column":8},"end":{"line":227,"column":9}},"43":{"start":{"line":224,"column":12},"end":{"line":224,"column":75}},"44":{"start":{"line":226,"column":12},"end":{"line":226,"column":34}},"45":{"start":{"line":240,"column":8},"end":{"line":240,"column":50}},"46":{"start":{"line":242,"column":8},"end":{"line":242,"column":37}},"47":{"start":{"line":243,"column":8},"end":{"line":243,"column":30}},"48":{"start":{"line":258,"column":8},"end":{"line":258,"column":51}},"49":{"start":{"line":271,"column":8},"end":{"line":272,"column":44}},"50":{"start":{"line":274,"column":8},"end":{"line":277,"column":9}},"51":{"start":{"line":275,"column":12},"end":{"line":275,"column":24}},"52":{"start":{"line":276,"column":12},"end":{"line":276,"column":43}},"53":{"start":{"line":279,"column":8},"end":{"line":279,"column":41}},"54":{"start":{"line":281,"column":8},"end":{"line":281,"column":49}},"55":{"start":{"line":294,"column":8},"end":{"line":294,"column":60}},"56":{"start":{"line":309,"column":8},"end":{"line":314,"column":9}},"57":{"start":{"line":310,"column":12},"end":{"line":313,"column":15}},"58":{"start":{"line":327,"column":8},"end":{"line":327,"column":60}},"59":{"start":{"line":343,"column":8},"end":{"line":343,"column":43}},"60":{"start":{"line":345,"column":8},"end":{"line":351,"column":10}},"61":{"start":{"line":355,"column":8},"end":{"line":355,"column":50}},"62":{"start":{"line":357,"column":8},"end":{"line":389,"column":9}},"63":{"start":{"line":359,"column":12},"end":{"line":359,"column":42}},"64":{"start":{"line":363,"column":12},"end":{"line":365,"column":14}},"65":{"start":{"line":364,"column":16},"end":{"line":364,"column":65}},"66":{"start":{"line":369,"column":12},"end":{"line":373,"column":15}},"67":{"start":{"line":370,"column":16},"end":{"line":372,"column":17}},"68":{"start":{"line":371,"column":20},"end":{"line":371,"column":73}},"69":{"start":{"line":375,"column":12},"end":{"line":376,"column":26}},"70":{"start":{"line":380,"column":12},"end":{"line":382,"column":13}},"71":{"start":{"line":381,"column":16},"end":{"line":381,"column":23}},"72":{"start":{"line":384,"column":12},"end":{"line":386,"column":13}},"73":{"start":{"line":385,"column":16},"end":{"line":385,"column":67}},"74":{"start":{"line":388,"column":12},"end":{"line":388,"column":73}},"75":{"start":{"line":403,"column":8},"end":{"line":403,"column":49}},"76":{"start":{"line":405,"column":8},"end":{"line":405,"column":56}},"77":{"start":{"line":407,"column":8},"end":{"line":413,"column":9}},"78":{"start":{"line":408,"column":12},"end":{"line":410,"column":15}},"79":{"start":{"line":409,"column":16},"end":{"line":409,"column":49}},"80":{"start":{"line":412,"column":12},"end":{"line":412,"column":44}},"81":{"start":{"line":443,"column":0},"end":{"line":453,"column":2}},"82":{"start":{"line":455,"column":0},"end":{"line":455,"column":38}},"83":{"start":{"line":456,"column":0},"end":{"line":456,"column":38}},"84":{"start":{"line":458,"column":0},"end":{"line":458,"column":19}}},"branchMap":{"1":{"line":84,"type":"binary-expr","locations":[{"start":{"line":84,"column":22},"end":{"line":84,"column":29}},{"start":{"line":84,"column":33},"end":{"line":84,"column":46}}]},"2":{"line":85,"type":"binary-expr","locations":[{"start":{"line":85,"column":22},"end":{"line":85,"column":32}},{"start":{"line":85,"column":36},"end":{"line":85,"column":56}}]},"3":{"line":88,"type":"if","locations":[{"start":{"line":88,"column":8},"end":{"line":88,"column":8}},{"start":{"line":88,"column":8},"end":{"line":88,"column":8}}]},"4":{"line":88,"type":"binary-expr","locations":[{"start":{"line":88,"column":12},"end":{"line":88,"column":20}},{"start":{"line":88,"column":24},"end":{"line":88,"column":31}}]},"5":{"line":95,"type":"if","locations":[{"start":{"line":95,"column":8},"end":{"line":95,"column":8}},{"start":{"line":95,"column":8},"end":{"line":95,"column":8}}]},"6":{"line":100,"type":"binary-expr","locations":[{"start":{"line":100,"column":32},"end":{"line":100,"column":37}},{"start":{"line":100,"column":41},"end":{"line":100,"column":60}},{"start":{"line":100,"column":65},"end":{"line":100,"column":69}}]},"7":{"line":103,"type":"binary-expr","locations":[{"start":{"line":103,"column":32},"end":{"line":103,"column":37}},{"start":{"line":103,"column":41},"end":{"line":103,"column":53}},{"start":{"line":103,"column":58},"end":{"line":103,"column":62}}]},"8":{"line":126,"type":"if","locations":[{"start":{"line":126,"column":8},"end":{"line":126,"column":8}},{"start":{"line":126,"column":8},"end":{"line":126,"column":8}}]},"9":{"line":161,"type":"if","locations":[{"start":{"line":161,"column":8},"end":{"line":161,"column":8}},{"start":{"line":161,"column":8},"end":{"line":161,"column":8}}]},"10":{"line":167,"type":"if","locations":[{"start":{"line":167,"column":8},"end":{"line":167,"column":8}},{"start":{"line":167,"column":8},"end":{"line":167,"column":8}}]},"11":{"line":172,"type":"binary-expr","locations":[{"start":{"line":172,"column":8},"end":{"line":172,"column":24}},{"start":{"line":172,"column":29},"end":{"line":172,"column":50}}]},"12":{"line":176,"type":"if","locations":[{"start":{"line":176,"column":8},"end":{"line":176,"column":8}},{"start":{"line":176,"column":8},"end":{"line":176,"column":8}}]},"13":{"line":177,"type":"if","locations":[{"start":{"line":177,"column":12},"end":{"line":177,"column":12}},{"start":{"line":177,"column":12},"end":{"line":177,"column":12}}]},"14":{"line":212,"type":"if","locations":[{"start":{"line":212,"column":8},"end":{"line":212,"column":8}},{"start":{"line":212,"column":8},"end":{"line":212,"column":8}}]},"15":{"line":216,"type":"binary-expr","locations":[{"start":{"line":216,"column":21},"end":{"line":216,"column":43}},{"start":{"line":216,"column":47},"end":{"line":216,"column":49}}]},"16":{"line":223,"type":"if","locations":[{"start":{"line":223,"column":8},"end":{"line":223,"column":8}},{"start":{"line":223,"column":8},"end":{"line":223,"column":8}}]},"17":{"line":224,"type":"binary-expr","locations":[{"start":{"line":224,"column":12},"end":{"line":224,"column":28}},{"start":{"line":224,"column":32},"end":{"line":224,"column":74}}]},"18":{"line":240,"type":"binary-expr","locations":[{"start":{"line":240,"column":21},"end":{"line":240,"column":43}},{"start":{"line":240,"column":47},"end":{"line":240,"column":49}}]},"19":{"line":274,"type":"if","locations":[{"start":{"line":274,"column":8},"end":{"line":274,"column":8}},{"start":{"line":274,"column":8},"end":{"line":274,"column":8}}]},"20":{"line":309,"type":"if","locations":[{"start":{"line":309,"column":8},"end":{"line":309,"column":8}},{"start":{"line":309,"column":8},"end":{"line":309,"column":8}}]},"21":{"line":309,"type":"binary-expr","locations":[{"start":{"line":309,"column":12},"end":{"line":309,"column":30}},{"start":{"line":309,"column":34},"end":{"line":309,"column":52}}]},"22":{"line":357,"type":"if","locations":[{"start":{"line":357,"column":8},"end":{"line":357,"column":8}},{"start":{"line":357,"column":8},"end":{"line":357,"column":8}}]},"23":{"line":370,"type":"if","locations":[{"start":{"line":370,"column":16},"end":{"line":370,"column":16}},{"start":{"line":370,"column":16},"end":{"line":370,"column":16}}]},"24":{"line":380,"type":"if","locations":[{"start":{"line":380,"column":12},"end":{"line":380,"column":12}},{"start":{"line":380,"column":12},"end":{"line":380,"column":12}}]},"25":{"line":384,"type":"if","locations":[{"start":{"line":384,"column":12},"end":{"line":384,"column":12}},{"start":{"line":384,"column":12},"end":{"line":384,"column":12}}]},"26":{"line":405,"type":"binary-expr","locations":[{"start":{"line":405,"column":8},"end":{"line":405,"column":25}},{"start":{"line":405,"column":29},"end":{"line":405,"column":55}}]},"27":{"line":407,"type":"if","locations":[{"start":{"line":407,"column":8},"end":{"line":407,"column":8}},{"start":{"line":407,"column":8},"end":{"line":407,"column":8}}]}},"code":["(function () { YUI.add('event-valuechange', function (Y, NAME) {","","/**","Adds a synthetic `valuechange` event that fires when the `value` property of an","`<input>` or `<textarea>` node changes as a result of a keystroke, mouse","operation, or input method editor (IME) input event.","","Usage:","","    YUI().use('event-valuechange', function (Y) {","        Y.one('#my-input').on('valuechange', function (e) {","        });","    });","","@module event-valuechange","**/","","/**","Provides the implementation for the synthetic `valuechange` event. This class","isn't meant to be used directly, but is public to make monkeypatching possible.","","Usage:","","    YUI().use('event-valuechange', function (Y) {","        Y.one('#my-input').on('valuechange', function (e) {","        });","    });","","@class ValueChange","@static","*/","","var DATA_KEY = '_valuechange',","    VALUE    = 'value',","","    config, // defined at the end of this file","","// Just a simple namespace to make methods overridable.","VC = {","    // -- Static Constants -----------------------------------------------------","","    /**","    Interval (in milliseconds) at which to poll for changes to the value of an","    element with one or more `valuechange` subscribers when the user is likely","    to be interacting with it.","","    @property POLL_INTERVAL","    @type Number","    @default 50","    @static","    **/","    POLL_INTERVAL: 50,","","    /**","    Timeout (in milliseconds) after which to stop polling when there hasn't been","    any new activity (keypresses, mouse clicks, etc.) on an element.","","    @property TIMEOUT","    @type Number","    @default 10000","    @static","    **/","    TIMEOUT: 10000,","","    // -- Protected Static Methods ---------------------------------------------","","    /**","    Called at an interval to poll for changes to the value of the specified","    node.","","    @method _poll","    @param {Node} node Node to poll.","","    @param {Object} options Options object.","        @param {EventFacade} [options.e] Event facade of the event that","            initiated the polling.","","    @protected","    @static","    **/","    _poll: function (node, options) {","        var domNode = node._node, // performance cheat; getValue() is a big hit when polling","            event   = options.e,","            newVal  = domNode && domNode.value,","            vcData  = node._data && node._data[DATA_KEY], // another perf cheat","            facade, prevVal;","","        if (!domNode || !vcData) {","            VC._stopPolling(node);","            return;","        }","","        prevVal = vcData.prevVal;","","        if (newVal !== prevVal) {","            vcData.prevVal = newVal;","","            facade = {","                _event       : event,","                currentTarget: (event && event.currentTarget) || node,","                newVal       : newVal,","                prevVal      : prevVal,","                target       : (event && event.target) || node","            };","","            Y.Object.each(vcData.notifiers, function (notifier) {","                notifier.fire(facade);","            });","","            VC._refreshTimeout(node);","        }","    },","","    /**","    Restarts the inactivity timeout for the specified node.","","    @method _refreshTimeout","    @param {Node} node Node to refresh.","    @param {SyntheticEvent.Notifier} notifier","    @protected","    @static","    **/","    _refreshTimeout: function (node, notifier) {","        // The node may have been destroyed, so check that it still exists","        // before trying to get its data. Otherwise an error will occur.","        if (!node._node) {","            return;","        }","","        var vcData = node.getData(DATA_KEY);","","        VC._stopTimeout(node); // avoid dupes","","        // If we don't see any changes within the timeout period (10 seconds by","        // default), stop polling.","        vcData.timeout = setTimeout(function () {","            VC._stopPolling(node, notifier);","        }, VC.TIMEOUT);","","    },","","    /**","    Begins polling for changes to the `value` property of the specified node. If","    polling is already underway for the specified node, it will not be restarted","    unless the `force` option is `true`","","    @method _startPolling","    @param {Node} node Node to watch.","    @param {SyntheticEvent.Notifier} notifier","","    @param {Object} options Options object.","        @param {EventFacade} [options.e] Event facade of the event that","            initiated the polling.","        @param {Boolean} [options.force=false] If `true`, polling will be","            restarted even if we're already polling this node.","","    @protected","    @static","    **/","    _startPolling: function (node, notifier, options) {","        if (!node.test('input,textarea')) {","            return;","        }","","        var vcData = node.getData(DATA_KEY);","","        if (!vcData) {","            vcData = {prevVal: node.get(VALUE)};","            node.setData(DATA_KEY, vcData);","        }","","        vcData.notifiers || (vcData.notifiers = {});","","        // Don't bother continuing if we're already polling this node, unless","        // `options.force` is true.","        if (vcData.interval) {","            if (options.force) {","                VC._stopPolling(node, notifier); // restart polling, but avoid dupe polls","            } else {","                vcData.notifiers[Y.stamp(notifier)] = notifier;","                return;","            }","        }","","        // Poll for changes to the node's value. We can't rely on keyboard","        // events for this, since the value may change due to a mouse-initiated","        // paste event, an IME input event, or for some other reason that","        // doesn't trigger a key event.","        vcData.notifiers[Y.stamp(notifier)] = notifier;","","        vcData.interval = setInterval(function () {","            VC._poll(node, vcData, options);","        }, VC.POLL_INTERVAL);","","","        VC._refreshTimeout(node, notifier);","    },","","    /**","    Stops polling for changes to the specified node's `value` attribute.","","    @method _stopPolling","    @param {Node} node Node to stop polling on.","    @param {SyntheticEvent.Notifier} [notifier] Notifier to remove from the","        node. If not specified, all notifiers will be removed.","    @protected","    @static","    **/","    _stopPolling: function (node, notifier) {","        // The node may have been destroyed, so check that it still exists","        // before trying to get its data. Otherwise an error will occur.","        if (!node._node) {","            return;","        }","","        var vcData = node.getData(DATA_KEY) || {};","","        clearInterval(vcData.interval);","        delete vcData.interval;","","        VC._stopTimeout(node);","","        if (notifier) {","            vcData.notifiers && delete vcData.notifiers[Y.stamp(notifier)];","        } else {","            vcData.notifiers = {};","        }","","    },","","    /**","    Clears the inactivity timeout for the specified node, if any.","","    @method _stopTimeout","    @param {Node} node","    @protected","    @static","    **/","    _stopTimeout: function (node) {","        var vcData = node.getData(DATA_KEY) || {};","","        clearTimeout(vcData.timeout);","        delete vcData.timeout;","    },","","    // -- Protected Static Event Handlers --------------------------------------","","    /**","    Stops polling when a node's blur event fires.","","    @method _onBlur","    @param {EventFacade} e","    @param {SyntheticEvent.Notifier} notifier","    @protected","    @static","    **/","    _onBlur: function (e, notifier) {","        VC._stopPolling(e.currentTarget, notifier);","    },","","    /**","    Resets a node's history and starts polling when a focus event occurs.","","    @method _onFocus","    @param {EventFacade} e","    @param {SyntheticEvent.Notifier} notifier","    @protected","    @static","    **/","    _onFocus: function (e, notifier) {","        var node   = e.currentTarget,","            vcData = node.getData(DATA_KEY);","","        if (!vcData) {","            vcData = {};","            node.setData(DATA_KEY, vcData);","        }","","        vcData.prevVal = node.get(VALUE);","","        VC._startPolling(node, notifier, {e: e});","    },","","    /**","    Starts polling when a node receives a keyDown event.","","    @method _onKeyDown","    @param {EventFacade} e","    @param {SyntheticEvent.Notifier} notifier","    @protected","    @static","    **/","    _onKeyDown: function (e, notifier) {","        VC._startPolling(e.currentTarget, notifier, {e: e});","    },","","    /**","    Starts polling when an IME-related keyUp event occurs on a node.","","    @method _onKeyUp","    @param {EventFacade} e","    @param {SyntheticEvent.Notifier} notifier","    @protected","    @static","    **/","    _onKeyUp: function (e, notifier) {","        // These charCodes indicate that an IME has started. We'll restart","        // polling and give the IME up to 10 seconds (by default) to finish.","        if (e.charCode === 229 || e.charCode === 197) {","            VC._startPolling(e.currentTarget, notifier, {","                e    : e,","                force: true","            });","        }","    },","","    /**","    Starts polling when a node receives a mouseDown event.","","    @method _onMouseDown","    @param {EventFacade} e","    @param {SyntheticEvent.Notifier} notifier","    @protected","    @static","    **/","    _onMouseDown: function (e, notifier) {","        VC._startPolling(e.currentTarget, notifier, {e: e});","    },","","    /**","    Called when the `valuechange` event receives a new subscriber.","","    @method _onSubscribe","    @param {Node} node","    @param {Subscription} sub","    @param {SyntheticEvent.Notifier} notifier","    @param {Function|String} [filter] Filter function or selector string. Only","        provided for delegate subscriptions.","    @protected","    @static","    **/","    _onSubscribe: function (node, sub, notifier, filter) {","        var _valuechange, callbacks, nodes;","","        callbacks = {","            blur     : VC._onBlur,","            focus    : VC._onFocus,","            keydown  : VC._onKeyDown,","            keyup    : VC._onKeyUp,","            mousedown: VC._onMouseDown","        };","","        // Store a utility object on the notifier to hold stuff that needs to be","        // passed around to trigger event handlers, polling handlers, etc.","        _valuechange = notifier._valuechange = {};","","        if (filter) {","            // If a filter is provided, then this is a delegated subscription.","            _valuechange.delegated = true;","","            // Add a function to the notifier that we can use to find all","            // nodes that pass the delegate filter.","            _valuechange.getNodes = function () {","                return node.all('input,textarea').filter(filter);","            };","","            // Store the initial values for each descendant of the container","            // node that passes the delegate filter.","            _valuechange.getNodes().each(function (child) {","                if (!child.getData(DATA_KEY)) {","                    child.setData(DATA_KEY, {prevVal: child.get(VALUE)});","                }","            });","","            notifier._handles = Y.delegate(callbacks, node, filter, null,","                notifier);","        } else {","            // This is a normal (non-delegated) event subscription.","","            if (!node.test('input,textarea')) {","                return;","            }","","            if (!node.getData(DATA_KEY)) {","                node.setData(DATA_KEY, {prevVal: node.get(VALUE)});","            }","","            notifier._handles = node.on(callbacks, null, null, notifier);","        }","    },","","    /**","    Called when the `valuechange` event loses a subscriber.","","    @method _onUnsubscribe","    @param {Node} node","    @param {Subscription} subscription","    @param {SyntheticEvent.Notifier} notifier","    @protected","    @static","    **/","    _onUnsubscribe: function (node, subscription, notifier) {","        var _valuechange = notifier._valuechange;","","        notifier._handles && notifier._handles.detach();","","        if (_valuechange.delegated) {","            _valuechange.getNodes().each(function (child) {","                VC._stopPolling(child, notifier);","            });","        } else {","            VC._stopPolling(node, notifier);","        }","    }","};","","/**","Synthetic event that fires when the `value` property of an `<input>` or","`<textarea>` node changes as a result of a user-initiated keystroke, mouse","operation, or input method editor (IME) input event.","","Unlike the `onchange` event, this event fires when the value actually changes","and not when the element loses focus. This event also reports IME and","multi-stroke input more reliably than `oninput` or the various key events across","browsers.","","For performance reasons, only focused nodes are monitored for changes, so","programmatic value changes on nodes that don't have focus won't be detected.","","@example","","    YUI().use('event-valuechange', function (Y) {","        Y.one('#my-input').on('valuechange', function (e) {","        });","    });","","@event valuechange","@param {String} prevVal Previous value prior to the latest change.","@param {String} newVal New value after the latest change.","@for YUI","**/","","config = {","    detach: VC._onUnsubscribe,","    on    : VC._onSubscribe,","","    delegate      : VC._onSubscribe,","    detachDelegate: VC._onUnsubscribe,","","    publishConfig: {","        emitFacade: true","    }","};","","Y.Event.define('valuechange', config);","Y.Event.define('valueChange', config); // deprecated, but supported for backcompat","","Y.ValueChange = VC;","","","}, '3.10.3', {\"requires\": [\"event-focus\", \"event-synthetic\"]});","","}());"]};
+}
+var __cov_SxfTeDmnzkYORA3oeYvbEw = __coverage__['build/event-valuechange/event-valuechange.js'];
+__cov_SxfTeDmnzkYORA3oeYvbEw.s['1']++;YUI.add('event-valuechange',function(Y,NAME){__cov_SxfTeDmnzkYORA3oeYvbEw.f['1']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['2']++;var DATA_KEY='_valuechange',VALUE='value',config,VC={POLL_INTERVAL:50,TIMEOUT:10000,_poll:function(node,options){__cov_SxfTeDmnzkYORA3oeYvbEw.f['2']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['3']++;var domNode=node._node,event=options.e,newVal=(__cov_SxfTeDmnzkYORA3oeYvbEw.b['1'][0]++,domNode)&&(__cov_SxfTeDmnzkYORA3oeYvbEw.b['1'][1]++,domNode.value),vcData=(__cov_SxfTeDmnzkYORA3oeYvbEw.b['2'][0]++,node._data)&&(__cov_SxfTeDmnzkYORA3oeYvbEw.b['2'][1]++,node._data[DATA_KEY]),facade,prevVal;__cov_SxfTeDmnzkYORA3oeYvbEw.s['4']++;if((__cov_SxfTeDmnzkYORA3oeYvbEw.b['4'][0]++,!domNode)||(__cov_SxfTeDmnzkYORA3oeYvbEw.b['4'][1]++,!vcData)){__cov_SxfTeDmnzkYORA3oeYvbEw.b['3'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['5']++;VC._stopPolling(node);__cov_SxfTeDmnzkYORA3oeYvbEw.s['6']++;return;}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['3'][1]++;}__cov_SxfTeDmnzkYORA3oeYvbEw.s['7']++;prevVal=vcData.prevVal;__cov_SxfTeDmnzkYORA3oeYvbEw.s['8']++;if(newVal!==prevVal){__cov_SxfTeDmnzkYORA3oeYvbEw.b['5'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['9']++;vcData.prevVal=newVal;__cov_SxfTeDmnzkYORA3oeYvbEw.s['10']++;facade={_event:event,currentTarget:(__cov_SxfTeDmnzkYORA3oeYvbEw.b['6'][0]++,event)&&(__cov_SxfTeDmnzkYORA3oeYvbEw.b['6'][1]++,event.currentTarget)||(__cov_SxfTeDmnzkYORA3oeYvbEw.b['6'][2]++,node),newVal:newVal,prevVal:prevVal,target:(__cov_SxfTeDmnzkYORA3oeYvbEw.b['7'][0]++,event)&&(__cov_SxfTeDmnzkYORA3oeYvbEw.b['7'][1]++,event.target)||(__cov_SxfTeDmnzkYORA3oeYvbEw.b['7'][2]++,node)};__cov_SxfTeDmnzkYORA3oeYvbEw.s['11']++;Y.Object.each(vcData.notifiers,function(notifier){__cov_SxfTeDmnzkYORA3oeYvbEw.f['3']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['12']++;notifier.fire(facade);});__cov_SxfTeDmnzkYORA3oeYvbEw.s['13']++;VC._refreshTimeout(node);}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['5'][1]++;}},_refreshTimeout:function(node,notifier){__cov_SxfTeDmnzkYORA3oeYvbEw.f['4']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['14']++;if(!node._node){__cov_SxfTeDmnzkYORA3oeYvbEw.b['8'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['15']++;return;}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['8'][1]++;}__cov_SxfTeDmnzkYORA3oeYvbEw.s['16']++;var vcData=node.getData(DATA_KEY);__cov_SxfTeDmnzkYORA3oeYvbEw.s['17']++;VC._stopTimeout(node);__cov_SxfTeDmnzkYORA3oeYvbEw.s['18']++;vcData.timeout=setTimeout(function(){__cov_SxfTeDmnzkYORA3oeYvbEw.f['5']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['19']++;VC._stopPolling(node,notifier);},VC.TIMEOUT);},_startPolling:function(node,notifier,options){__cov_SxfTeDmnzkYORA3oeYvbEw.f['6']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['20']++;if(!node.test('input,textarea')){__cov_SxfTeDmnzkYORA3oeYvbEw.b['9'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['21']++;return;}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['9'][1]++;}__cov_SxfTeDmnzkYORA3oeYvbEw.s['22']++;var vcData=node.getData(DATA_KEY);__cov_SxfTeDmnzkYORA3oeYvbEw.s['23']++;if(!vcData){__cov_SxfTeDmnzkYORA3oeYvbEw.b['10'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['24']++;vcData={prevVal:node.get(VALUE)};__cov_SxfTeDmnzkYORA3oeYvbEw.s['25']++;node.setData(DATA_KEY,vcData);}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['10'][1]++;}__cov_SxfTeDmnzkYORA3oeYvbEw.s['26']++;(__cov_SxfTeDmnzkYORA3oeYvbEw.b['11'][0]++,vcData.notifiers)||(__cov_SxfTeDmnzkYORA3oeYvbEw.b['11'][1]++,vcData.notifiers={});__cov_SxfTeDmnzkYORA3oeYvbEw.s['27']++;if(vcData.interval){__cov_SxfTeDmnzkYORA3oeYvbEw.b['12'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['28']++;if(options.force){__cov_SxfTeDmnzkYORA3oeYvbEw.b['13'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['29']++;VC._stopPolling(node,notifier);}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['13'][1]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['30']++;vcData.notifiers[Y.stamp(notifier)]=notifier;__cov_SxfTeDmnzkYORA3oeYvbEw.s['31']++;return;}}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['12'][1]++;}__cov_SxfTeDmnzkYORA3oeYvbEw.s['32']++;vcData.notifiers[Y.stamp(notifier)]=notifier;__cov_SxfTeDmnzkYORA3oeYvbEw.s['33']++;vcData.interval=setInterval(function(){__cov_SxfTeDmnzkYORA3oeYvbEw.f['7']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['34']++;VC._poll(node,vcData,options);},VC.POLL_INTERVAL);__cov_SxfTeDmnzkYORA3oeYvbEw.s['35']++;VC._refreshTimeout(node,notifier);},_stopPolling:function(node,notifier){__cov_SxfTeDmnzkYORA3oeYvbEw.f['8']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['36']++;if(!node._node){__cov_SxfTeDmnzkYORA3oeYvbEw.b['14'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['37']++;return;}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['14'][1]++;}__cov_SxfTeDmnzkYORA3oeYvbEw.s['38']++;var vcData=(__cov_SxfTeDmnzkYORA3oeYvbEw.b['15'][0]++,node.getData(DATA_KEY))||(__cov_SxfTeDmnzkYORA3oeYvbEw.b['15'][1]++,{});__cov_SxfTeDmnzkYORA3oeYvbEw.s['39']++;clearInterval(vcData.interval);__cov_SxfTeDmnzkYORA3oeYvbEw.s['40']++;delete vcData.interval;__cov_SxfTeDmnzkYORA3oeYvbEw.s['41']++;VC._stopTimeout(node);__cov_SxfTeDmnzkYORA3oeYvbEw.s['42']++;if(notifier){__cov_SxfTeDmnzkYORA3oeYvbEw.b['16'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['43']++;(__cov_SxfTeDmnzkYORA3oeYvbEw.b['17'][0]++,vcData.notifiers)&&(__cov_SxfTeDmnzkYORA3oeYvbEw.b['17'][1]++,delete vcData.notifiers[Y.stamp(notifier)]);}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['16'][1]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['44']++;vcData.notifiers={};}},_stopTimeout:function(node){__cov_SxfTeDmnzkYORA3oeYvbEw.f['9']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['45']++;var vcData=(__cov_SxfTeDmnzkYORA3oeYvbEw.b['18'][0]++,node.getData(DATA_KEY))||(__cov_SxfTeDmnzkYORA3oeYvbEw.b['18'][1]++,{});__cov_SxfTeDmnzkYORA3oeYvbEw.s['46']++;clearTimeout(vcData.timeout);__cov_SxfTeDmnzkYORA3oeYvbEw.s['47']++;delete vcData.timeout;},_onBlur:function(e,notifier){__cov_SxfTeDmnzkYORA3oeYvbEw.f['10']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['48']++;VC._stopPolling(e.currentTarget,notifier);},_onFocus:function(e,notifier){__cov_SxfTeDmnzkYORA3oeYvbEw.f['11']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['49']++;var node=e.currentTarget,vcData=node.getData(DATA_KEY);__cov_SxfTeDmnzkYORA3oeYvbEw.s['50']++;if(!vcData){__cov_SxfTeDmnzkYORA3oeYvbEw.b['19'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['51']++;vcData={};__cov_SxfTeDmnzkYORA3oeYvbEw.s['52']++;node.setData(DATA_KEY,vcData);}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['19'][1]++;}__cov_SxfTeDmnzkYORA3oeYvbEw.s['53']++;vcData.prevVal=node.get(VALUE);__cov_SxfTeDmnzkYORA3oeYvbEw.s['54']++;VC._startPolling(node,notifier,{e:e});},_onKeyDown:function(e,notifier){__cov_SxfTeDmnzkYORA3oeYvbEw.f['12']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['55']++;VC._startPolling(e.currentTarget,notifier,{e:e});},_onKeyUp:function(e,notifier){__cov_SxfTeDmnzkYORA3oeYvbEw.f['13']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['56']++;if((__cov_SxfTeDmnzkYORA3oeYvbEw.b['21'][0]++,e.charCode===229)||(__cov_SxfTeDmnzkYORA3oeYvbEw.b['21'][1]++,e.charCode===197)){__cov_SxfTeDmnzkYORA3oeYvbEw.b['20'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['57']++;VC._startPolling(e.currentTarget,notifier,{e:e,force:true});}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['20'][1]++;}},_onMouseDown:function(e,notifier){__cov_SxfTeDmnzkYORA3oeYvbEw.f['14']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['58']++;VC._startPolling(e.currentTarget,notifier,{e:e});},_onSubscribe:function(node,sub,notifier,filter){__cov_SxfTeDmnzkYORA3oeYvbEw.f['15']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['59']++;var _valuechange,callbacks,nodes;__cov_SxfTeDmnzkYORA3oeYvbEw.s['60']++;callbacks={blur:VC._onBlur,focus:VC._onFocus,keydown:VC._onKeyDown,keyup:VC._onKeyUp,mousedown:VC._onMouseDown};__cov_SxfTeDmnzkYORA3oeYvbEw.s['61']++;_valuechange=notifier._valuechange={};__cov_SxfTeDmnzkYORA3oeYvbEw.s['62']++;if(filter){__cov_SxfTeDmnzkYORA3oeYvbEw.b['22'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['63']++;_valuechange.delegated=true;__cov_SxfTeDmnzkYORA3oeYvbEw.s['64']++;_valuechange.getNodes=function(){__cov_SxfTeDmnzkYORA3oeYvbEw.f['16']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['65']++;return node.all('input,textarea').filter(filter);};__cov_SxfTeDmnzkYORA3oeYvbEw.s['66']++;_valuechange.getNodes().each(function(child){__cov_SxfTeDmnzkYORA3oeYvbEw.f['17']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['67']++;if(!child.getData(DATA_KEY)){__cov_SxfTeDmnzkYORA3oeYvbEw.b['23'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['68']++;child.setData(DATA_KEY,{prevVal:child.get(VALUE)});}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['23'][1]++;}});__cov_SxfTeDmnzkYORA3oeYvbEw.s['69']++;notifier._handles=Y.delegate(callbacks,node,filter,null,notifier);}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['22'][1]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['70']++;if(!node.test('input,textarea')){__cov_SxfTeDmnzkYORA3oeYvbEw.b['24'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['71']++;return;}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['24'][1]++;}__cov_SxfTeDmnzkYORA3oeYvbEw.s['72']++;if(!node.getData(DATA_KEY)){__cov_SxfTeDmnzkYORA3oeYvbEw.b['25'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['73']++;node.setData(DATA_KEY,{prevVal:node.get(VALUE)});}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['25'][1]++;}__cov_SxfTeDmnzkYORA3oeYvbEw.s['74']++;notifier._handles=node.on(callbacks,null,null,notifier);}},_onUnsubscribe:function(node,subscription,notifier){__cov_SxfTeDmnzkYORA3oeYvbEw.f['18']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['75']++;var _valuechange=notifier._valuechange;__cov_SxfTeDmnzkYORA3oeYvbEw.s['76']++;(__cov_SxfTeDmnzkYORA3oeYvbEw.b['26'][0]++,notifier._handles)&&(__cov_SxfTeDmnzkYORA3oeYvbEw.b['26'][1]++,notifier._handles.detach());__cov_SxfTeDmnzkYORA3oeYvbEw.s['77']++;if(_valuechange.delegated){__cov_SxfTeDmnzkYORA3oeYvbEw.b['27'][0]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['78']++;_valuechange.getNodes().each(function(child){__cov_SxfTeDmnzkYORA3oeYvbEw.f['19']++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['79']++;VC._stopPolling(child,notifier);});}else{__cov_SxfTeDmnzkYORA3oeYvbEw.b['27'][1]++;__cov_SxfTeDmnzkYORA3oeYvbEw.s['80']++;VC._stopPolling(node,notifier);}}};__cov_SxfTeDmnzkYORA3oeYvbEw.s['81']++;config={detach:VC._onUnsubscribe,on:VC._onSubscribe,delegate:VC._onSubscribe,detachDelegate:VC._onUnsubscribe,publishConfig:{emitFacade:true}};__cov_SxfTeDmnzkYORA3oeYvbEw.s['82']++;Y.Event.define('valuechange',config);__cov_SxfTeDmnzkYORA3oeYvbEw.s['83']++;Y.Event.define('valueChange',config);__cov_SxfTeDmnzkYORA3oeYvbEw.s['84']++;Y.ValueChange=VC;},'3.10.3',{'requires':['event-focus','event-synthetic']});