/*
YUI 3.13.0 (build 508226d)
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/

if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
if (!__coverage__['build/autocomplete-sources/autocomplete-sources.js']) {
   __coverage__['build/autocomplete-sources/autocomplete-sources.js'] = {"path":"build/autocomplete-sources/autocomplete-sources.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,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[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],"28":[0,0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[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,"20":0,"21":0,"22":0,"23":0,"24":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":32},"end":{"line":1,"column":51}}},"2":{"name":"(anonymous_2)","line":40,"loc":{"start":{"line":40,"column":31},"end":{"line":40,"column":49}}},"3":{"name":"(anonymous_3)","line":69,"loc":{"start":{"line":69,"column":21},"end":{"line":69,"column":39}}},"4":{"name":"_sendRequest","line":76,"loc":{"start":{"line":76,"column":8},"end":{"line":76,"column":39}}},"5":{"name":"(anonymous_5)","line":92,"loc":{"start":{"line":92,"column":29},"end":{"line":92,"column":54}}},"6":{"name":"(anonymous_6)","line":110,"loc":{"start":{"line":110,"column":31},"end":{"line":110,"column":50}}},"7":{"name":"(anonymous_7)","line":123,"loc":{"start":{"line":123,"column":43},"end":{"line":123,"column":55}}},"8":{"name":"(anonymous_8)","line":142,"loc":{"start":{"line":142,"column":24},"end":{"line":142,"column":42}}},"9":{"name":"_sendRequest","line":147,"loc":{"start":{"line":147,"column":8},"end":{"line":147,"column":39}}},"10":{"name":"(anonymous_10)","line":164,"loc":{"start":{"line":164,"column":40},"end":{"line":164,"column":56}}},"11":{"name":"(anonymous_11)","line":172,"loc":{"start":{"line":172,"column":34},"end":{"line":172,"column":53}}},"12":{"name":"(anonymous_12)","line":184,"loc":{"start":{"line":184,"column":27},"end":{"line":184,"column":39}}},"13":{"name":"(anonymous_13)","line":211,"loc":{"start":{"line":211,"column":25},"end":{"line":211,"column":43}}},"14":{"name":"(anonymous_14)","line":216,"loc":{"start":{"line":216,"column":25},"end":{"line":216,"column":44}}},"15":{"name":"(anonymous_15)","line":219,"loc":{"start":{"line":219,"column":43},"end":{"line":219,"column":61}}},"16":{"name":"(anonymous_16)","line":249,"loc":{"start":{"line":249,"column":25},"end":{"line":249,"column":43}}},"17":{"name":"(anonymous_17)","line":275,"loc":{"start":{"line":275,"column":22},"end":{"line":275,"column":40}}},"18":{"name":"_sendRequest","line":284,"loc":{"start":{"line":284,"column":8},"end":{"line":284,"column":39}}},"19":{"name":"(anonymous_19)","line":301,"loc":{"start":{"line":301,"column":23},"end":{"line":301,"column":39}}},"20":{"name":"(anonymous_20)","line":329,"loc":{"start":{"line":329,"column":32},"end":{"line":329,"column":51}}},"21":{"name":"(anonymous_21)","line":340,"loc":{"start":{"line":340,"column":29},"end":{"line":340,"column":41}}},"22":{"name":"(anonymous_22)","line":360,"loc":{"start":{"line":360,"column":24},"end":{"line":360,"column":44}}},"23":{"name":"(anonymous_23)","line":394,"loc":{"start":{"line":394,"column":16},"end":{"line":394,"column":40}}},"24":{"name":"(anonymous_24)","line":419,"loc":{"start":{"line":419,"column":21},"end":{"line":419,"column":50}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":475,"column":105}},"2":{"start":{"line":10,"column":0},"end":{"line":17,"column":46}},"3":{"start":{"line":20,"column":0},"end":{"line":433,"column":3}},"4":{"start":{"line":43,"column":8},"end":{"line":47,"column":9}},"5":{"start":{"line":46,"column":12},"end":{"line":46,"column":52}},"6":{"start":{"line":51,"column":8},"end":{"line":53,"column":9}},"7":{"start":{"line":52,"column":12},"end":{"line":52,"column":51}},"8":{"start":{"line":56,"column":8},"end":{"line":56,"column":48}},"9":{"start":{"line":70,"column":8},"end":{"line":72,"column":44}},"10":{"start":{"line":76,"column":8},"end":{"line":108,"column":9}},"11":{"start":{"line":77,"column":12},"end":{"line":77,"column":43}},"12":{"start":{"line":80,"column":12},"end":{"line":83,"column":13}},"13":{"start":{"line":81,"column":16},"end":{"line":81,"column":70}},"14":{"start":{"line":82,"column":16},"end":{"line":82,"column":23}},"15":{"start":{"line":86,"column":12},"end":{"line":88,"column":13}},"16":{"start":{"line":87,"column":16},"end":{"line":87,"column":34}},"17":{"start":{"line":90,"column":12},"end":{"line":107,"column":15}},"18":{"start":{"line":93,"column":24},"end":{"line":93,"column":33}},"19":{"start":{"line":95,"column":24},"end":{"line":99,"column":25}},"20":{"start":{"line":96,"column":28},"end":{"line":96,"column":71}},"21":{"start":{"line":98,"column":28},"end":{"line":98,"column":60}},"22":{"start":{"line":101,"column":24},"end":{"line":104,"column":25}},"23":{"start":{"line":102,"column":28},"end":{"line":102,"column":74}},"24":{"start":{"line":103,"column":28},"end":{"line":103,"column":65}},"25":{"start":{"line":110,"column":8},"end":{"line":127,"column":10}},"26":{"start":{"line":114,"column":12},"end":{"line":114,"column":34}},"27":{"start":{"line":116,"column":12},"end":{"line":116,"column":36}},"28":{"start":{"line":116,"column":27},"end":{"line":116,"column":34}},"29":{"start":{"line":118,"column":12},"end":{"line":118,"column":27}},"30":{"start":{"line":123,"column":12},"end":{"line":126,"column":15}},"31":{"start":{"line":124,"column":16},"end":{"line":124,"column":52}},"32":{"start":{"line":125,"column":16},"end":{"line":125,"column":42}},"33":{"start":{"line":129,"column":8},"end":{"line":129,"column":24}},"34":{"start":{"line":143,"column":8},"end":{"line":145,"column":33}},"35":{"start":{"line":147,"column":8},"end":{"line":170,"column":9}},"36":{"start":{"line":148,"column":12},"end":{"line":149,"column":41}},"37":{"start":{"line":151,"column":12},"end":{"line":154,"column":13}},"38":{"start":{"line":152,"column":16},"end":{"line":152,"column":70}},"39":{"start":{"line":153,"column":16},"end":{"line":153,"column":23}},"40":{"start":{"line":164,"column":12},"end":{"line":167,"column":14}},"41":{"start":{"line":165,"column":16},"end":{"line":165,"column":62}},"42":{"start":{"line":166,"column":16},"end":{"line":166,"column":53}},"43":{"start":{"line":169,"column":12},"end":{"line":169,"column":31}},"44":{"start":{"line":172,"column":8},"end":{"line":196,"column":10}},"45":{"start":{"line":176,"column":12},"end":{"line":176,"column":34}},"46":{"start":{"line":178,"column":12},"end":{"line":178,"column":36}},"47":{"start":{"line":178,"column":27},"end":{"line":178,"column":34}},"48":{"start":{"line":180,"column":12},"end":{"line":180,"column":27}},"49":{"start":{"line":184,"column":12},"end":{"line":195,"column":15}},"50":{"start":{"line":187,"column":16},"end":{"line":191,"column":17}},"51":{"start":{"line":188,"column":20},"end":{"line":190,"column":23}},"52":{"start":{"line":193,"column":16},"end":{"line":193,"column":55}},"53":{"start":{"line":194,"column":16},"end":{"line":194,"column":42}},"54":{"start":{"line":198,"column":8},"end":{"line":198,"column":27}},"55":{"start":{"line":212,"column":8},"end":{"line":212,"column":24}},"56":{"start":{"line":214,"column":8},"end":{"line":232,"column":10}},"57":{"start":{"line":217,"column":16},"end":{"line":217,"column":33}},"58":{"start":{"line":219,"column":16},"end":{"line":228,"column":19}},"59":{"start":{"line":220,"column":20},"end":{"line":227,"column":23}},"60":{"start":{"line":230,"column":16},"end":{"line":230,"column":56}},"61":{"start":{"line":250,"column":8},"end":{"line":260,"column":9}},"62":{"start":{"line":252,"column":12},"end":{"line":252,"column":49}},"63":{"start":{"line":253,"column":15},"end":{"line":260,"column":9}},"64":{"start":{"line":256,"column":12},"end":{"line":256,"column":51}},"65":{"start":{"line":259,"column":12},"end":{"line":259,"column":48}},"66":{"start":{"line":276,"column":8},"end":{"line":278,"column":45}},"67":{"start":{"line":280,"column":8},"end":{"line":282,"column":9}},"68":{"start":{"line":281,"column":12},"end":{"line":281,"column":67}},"69":{"start":{"line":284,"column":8},"end":{"line":327,"column":9}},"70":{"start":{"line":285,"column":12},"end":{"line":288,"column":41}},"71":{"start":{"line":290,"column":12},"end":{"line":294,"column":15}},"72":{"start":{"line":296,"column":12},"end":{"line":299,"column":13}},"73":{"start":{"line":297,"column":16},"end":{"line":297,"column":70}},"74":{"start":{"line":298,"column":16},"end":{"line":298,"column":23}},"75":{"start":{"line":301,"column":12},"end":{"line":304,"column":14}},"76":{"start":{"line":302,"column":16},"end":{"line":302,"column":62}},"77":{"start":{"line":303,"column":16},"end":{"line":303,"column":53}},"78":{"start":{"line":306,"column":12},"end":{"line":306,"column":52}},"79":{"start":{"line":311,"column":12},"end":{"line":324,"column":13}},"80":{"start":{"line":312,"column":16},"end":{"line":312,"column":50}},"81":{"start":{"line":313,"column":16},"end":{"line":313,"column":46}},"82":{"start":{"line":314,"column":16},"end":{"line":314,"column":50}},"83":{"start":{"line":316,"column":16},"end":{"line":318,"column":17}},"84":{"start":{"line":317,"column":20},"end":{"line":317,"column":49}},"85":{"start":{"line":320,"column":16},"end":{"line":323,"column":50}},"86":{"start":{"line":326,"column":12},"end":{"line":326,"column":30}},"87":{"start":{"line":329,"column":8},"end":{"line":345,"column":10}},"88":{"start":{"line":333,"column":12},"end":{"line":333,"column":34}},"89":{"start":{"line":335,"column":12},"end":{"line":344,"column":13}},"90":{"start":{"line":338,"column":16},"end":{"line":338,"column":31}},"91":{"start":{"line":340,"column":16},"end":{"line":343,"column":19}},"92":{"start":{"line":341,"column":20},"end":{"line":341,"column":57}},"93":{"start":{"line":342,"column":20},"end":{"line":342,"column":46}},"94":{"start":{"line":347,"column":8},"end":{"line":347,"column":25}},"95":{"start":{"line":361,"column":8},"end":{"line":362,"column":19}},"96":{"start":{"line":364,"column":8},"end":{"line":377,"column":9}},"97":{"start":{"line":369,"column":12},"end":{"line":369,"column":53}},"98":{"start":{"line":370,"column":12},"end":{"line":370,"column":63}},"99":{"start":{"line":372,"column":12},"end":{"line":374,"column":13}},"100":{"start":{"line":373,"column":16},"end":{"line":373,"column":36}},"101":{"start":{"line":376,"column":12},"end":{"line":376,"column":25}},"102":{"start":{"line":379,"column":8},"end":{"line":379,"column":23}},"103":{"start":{"line":395,"column":8},"end":{"line":395,"column":47}},"104":{"start":{"line":397,"column":8},"end":{"line":400,"column":9}},"105":{"start":{"line":399,"column":12},"end":{"line":399,"column":35}},"106":{"start":{"line":402,"column":8},"end":{"line":405,"column":11}},"107":{"start":{"line":420,"column":8},"end":{"line":421,"column":57}},"108":{"start":{"line":423,"column":8},"end":{"line":425,"column":9}},"109":{"start":{"line":424,"column":12},"end":{"line":424,"column":42}},"110":{"start":{"line":427,"column":8},"end":{"line":431,"column":11}},"111":{"start":{"line":436,"column":0},"end":{"line":462,"column":3}},"112":{"start":{"line":465,"column":0},"end":{"line":472,"column":9}}},"branchMap":{"1":{"line":43,"type":"if","locations":[{"start":{"line":43,"column":8},"end":{"line":43,"column":8}},{"start":{"line":43,"column":8},"end":{"line":43,"column":8}}]},"2":{"line":43,"type":"binary-expr","locations":[{"start":{"line":43,"column":12},"end":{"line":43,"column":36}},{"start":{"line":44,"column":16},"end":{"line":44,"column":65}}]},"3":{"line":51,"type":"if","locations":[{"start":{"line":51,"column":8},"end":{"line":51,"column":8}},{"start":{"line":51,"column":8},"end":{"line":51,"column":8}}]},"4":{"line":51,"type":"binary-expr","locations":[{"start":{"line":51,"column":12},"end":{"line":51,"column":26}},{"start":{"line":51,"column":30},"end":{"line":51,"column":62}}]},"5":{"line":80,"type":"if","locations":[{"start":{"line":80,"column":12},"end":{"line":80,"column":12}},{"start":{"line":80,"column":12},"end":{"line":80,"column":12}}]},"6":{"line":80,"type":"binary-expr","locations":[{"start":{"line":80,"column":16},"end":{"line":80,"column":27}},{"start":{"line":80,"column":31},"end":{"line":80,"column":54}}]},"7":{"line":86,"type":"if","locations":[{"start":{"line":86,"column":12},"end":{"line":86,"column":12}},{"start":{"line":86,"column":12},"end":{"line":86,"column":12}}]},"8":{"line":86,"type":"binary-expr","locations":[{"start":{"line":86,"column":16},"end":{"line":86,"column":25}},{"start":{"line":86,"column":29},"end":{"line":86,"column":53}}]},"9":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":24},"end":{"line":101,"column":24}},{"start":{"line":101,"column":24},"end":{"line":101,"column":24}}]},"10":{"line":102,"type":"binary-expr","locations":[{"start":{"line":102,"column":28},"end":{"line":102,"column":39}},{"start":{"line":102,"column":44},"end":{"line":102,"column":72}}]},"11":{"line":116,"type":"if","locations":[{"start":{"line":116,"column":12},"end":{"line":116,"column":12}},{"start":{"line":116,"column":12},"end":{"line":116,"column":12}}]},"12":{"line":151,"type":"if","locations":[{"start":{"line":151,"column":12},"end":{"line":151,"column":12}},{"start":{"line":151,"column":12},"end":{"line":151,"column":12}}]},"13":{"line":151,"type":"binary-expr","locations":[{"start":{"line":151,"column":16},"end":{"line":151,"column":27}},{"start":{"line":151,"column":31},"end":{"line":151,"column":54}}]},"14":{"line":165,"type":"binary-expr","locations":[{"start":{"line":165,"column":16},"end":{"line":165,"column":27}},{"start":{"line":165,"column":32},"end":{"line":165,"column":60}}]},"15":{"line":178,"type":"if","locations":[{"start":{"line":178,"column":12},"end":{"line":178,"column":12}},{"start":{"line":178,"column":12},"end":{"line":178,"column":12}}]},"16":{"line":187,"type":"if","locations":[{"start":{"line":187,"column":16},"end":{"line":187,"column":16}},{"start":{"line":187,"column":16},"end":{"line":187,"column":16}}]},"17":{"line":250,"type":"if","locations":[{"start":{"line":250,"column":8},"end":{"line":250,"column":8}},{"start":{"line":250,"column":8},"end":{"line":250,"column":8}}]},"18":{"line":253,"type":"if","locations":[{"start":{"line":253,"column":15},"end":{"line":253,"column":15}},{"start":{"line":253,"column":15},"end":{"line":253,"column":15}}]},"19":{"line":280,"type":"if","locations":[{"start":{"line":280,"column":8},"end":{"line":280,"column":8}},{"start":{"line":280,"column":8},"end":{"line":280,"column":8}}]},"20":{"line":291,"type":"cond-expr","locations":[{"start":{"line":291,"column":45},"end":{"line":291,"column":55}},{"start":{"line":291,"column":58},"end":{"line":291,"column":62}}]},"21":{"line":296,"type":"if","locations":[{"start":{"line":296,"column":12},"end":{"line":296,"column":12}},{"start":{"line":296,"column":12},"end":{"line":296,"column":12}}]},"22":{"line":296,"type":"binary-expr","locations":[{"start":{"line":296,"column":16},"end":{"line":296,"column":27}},{"start":{"line":296,"column":31},"end":{"line":296,"column":54}}]},"23":{"line":302,"type":"binary-expr","locations":[{"start":{"line":302,"column":16},"end":{"line":302,"column":27}},{"start":{"line":302,"column":32},"end":{"line":302,"column":60}}]},"24":{"line":311,"type":"if","locations":[{"start":{"line":311,"column":12},"end":{"line":311,"column":12}},{"start":{"line":311,"column":12},"end":{"line":311,"column":12}}]},"25":{"line":316,"type":"if","locations":[{"start":{"line":316,"column":16},"end":{"line":316,"column":16}},{"start":{"line":316,"column":16},"end":{"line":316,"column":16}}]},"26":{"line":323,"type":"cond-expr","locations":[{"start":{"line":323,"column":25},"end":{"line":323,"column":35}},{"start":{"line":323,"column":38},"end":{"line":323,"column":42}}]},"27":{"line":335,"type":"if","locations":[{"start":{"line":335,"column":12},"end":{"line":335,"column":12}},{"start":{"line":335,"column":12},"end":{"line":335,"column":12}}]},"28":{"line":361,"type":"binary-expr","locations":[{"start":{"line":361,"column":22},"end":{"line":361,"column":30}},{"start":{"line":361,"column":34},"end":{"line":361,"column":48}},{"start":{"line":361,"column":52},"end":{"line":361,"column":74}}]},"29":{"line":364,"type":"if","locations":[{"start":{"line":364,"column":8},"end":{"line":364,"column":8}},{"start":{"line":364,"column":8},"end":{"line":364,"column":8}}]},"30":{"line":364,"type":"binary-expr","locations":[{"start":{"line":364,"column":12},"end":{"line":364,"column":19}},{"start":{"line":364,"column":23},"end":{"line":364,"column":45}}]},"31":{"line":369,"type":"binary-expr","locations":[{"start":{"line":369,"column":22},"end":{"line":369,"column":46}},{"start":{"line":369,"column":50},"end":{"line":369,"column":52}}]},"32":{"line":370,"type":"cond-expr","locations":[{"start":{"line":370,"column":44},"end":{"line":370,"column":53}},{"start":{"line":370,"column":56},"end":{"line":370,"column":62}}]},"33":{"line":372,"type":"if","locations":[{"start":{"line":372,"column":12},"end":{"line":372,"column":12}},{"start":{"line":372,"column":12},"end":{"line":372,"column":12}}]},"34":{"line":397,"type":"if","locations":[{"start":{"line":397,"column":8},"end":{"line":397,"column":8}},{"start":{"line":397,"column":8},"end":{"line":397,"column":8}}]},"35":{"line":403,"type":"cond-expr","locations":[{"start":{"line":403,"column":41},"end":{"line":403,"column":51}},{"start":{"line":403,"column":54},"end":{"line":403,"column":58}}]},"36":{"line":423,"type":"if","locations":[{"start":{"line":423,"column":8},"end":{"line":423,"column":8}},{"start":{"line":423,"column":8},"end":{"line":423,"column":8}}]},"37":{"line":429,"type":"cond-expr","locations":[{"start":{"line":429,"column":41},"end":{"line":429,"column":51}},{"start":{"line":429,"column":54},"end":{"line":429,"column":58}}]}},"code":["(function () { YUI.add('autocomplete-sources', function (Y, NAME) {","","/**","Mixes support for JSONP and YQL result sources into AutoCompleteBase.","","@module autocomplete","@submodule autocomplete-sources","**/","","var ACBase = Y.AutoCompleteBase,","    Lang   = Y.Lang,","","    _SOURCE_SUCCESS = '_sourceSuccess',","","    MAX_RESULTS         = 'maxResults',","    REQUEST_TEMPLATE    = 'requestTemplate',","    RESULT_LIST_LOCATOR = 'resultListLocator';","","// Add prototype properties and methods to AutoCompleteBase.","Y.mix(ACBase.prototype, {","    /**","    Regular expression used to determine whether a String source is a YQL query.","","    @property _YQL_SOURCE_REGEX","    @type RegExp","    @protected","    @for AutoCompleteBase","    **/","    _YQL_SOURCE_REGEX: /^(?:select|set|use)\\s+/i,","","    /**","    Runs before AutoCompleteBase's `_createObjectSource()` method and augments","    it to support additional object-based source types.","","    @method _beforeCreateObjectSource","    @param {String} source","    @protected","    @for AutoCompleteBase","    **/","    _beforeCreateObjectSource: function (source) {","        // If the object is a <select> node, use the options as the result","        // source.","        if (source instanceof Y.Node &&","                source.get('nodeName').toLowerCase() === 'select') {","","            return this._createSelectSource(source);","        }","","        // If the object is a JSONPRequest instance, try to use it as a JSONP","        // source.","        if (Y.JSONPRequest && source instanceof Y.JSONPRequest) {","            return this._createJSONPSource(source);","        }","","        // Fall back to a basic object source.","        return this._createObjectSource(source);","    },","","    /**","    Creates a DataSource-like object that uses `Y.io` as a source. See the","    `source` attribute for more details.","","    @method _createIOSource","    @param {String} source URL.","    @return {Object} DataSource-like object.","    @protected","    @for AutoCompleteBase","    **/","    _createIOSource: function (source) {","        var ioSource = {type: 'io'},","            that     = this,","            ioRequest, lastRequest, loading;","","        // Private internal _sendRequest method that will be assigned to","        // ioSource.sendRequest once io-base and json-parse are available.","        function _sendRequest(request) {","            var cacheKey = request.request;","","            // Return immediately on a cached response.","            if (that._cache && cacheKey in that._cache) {","                that[_SOURCE_SUCCESS](that._cache[cacheKey], request);","                return;","            }","","            // Cancel any outstanding requests.","            if (ioRequest && ioRequest.isInProgress()) {","                ioRequest.abort();","            }","","            ioRequest = Y.io(that._getXHRUrl(source, request), {","                on: {","                    success: function (tid, response) {","                        var data;","","                        try {","                            data = Y.JSON.parse(response.responseText);","                        } catch (ex) {","                            Y.error('JSON parse error', ex);","                        }","","                        if (data) {","                            that._cache && (that._cache[cacheKey] = data);","                            that[_SOURCE_SUCCESS](data, request);","                        }","                    }","                }","            });","        }","","        ioSource.sendRequest = function (request) {","            // Keep track of the most recent request in case there are multiple","            // requests while we're waiting for the IO module to load. Only the","            // most recent request will be sent.","            lastRequest = request;","","            if (loading) { return; }","","            loading = true;","","            // Lazy-load the io-base and json-parse modules if necessary,","            // then overwrite the sendRequest method to bypass this check in","            // the future.","            Y.use('io-base', 'json-parse', function () {","                ioSource.sendRequest = _sendRequest;","                _sendRequest(lastRequest);","            });","        };","","        return ioSource;","    },","","    /**","    Creates a DataSource-like object that uses the specified JSONPRequest","    instance as a source. See the `source` attribute for more details.","","    @method _createJSONPSource","    @param {JSONPRequest|String} source URL string or JSONPRequest instance.","    @return {Object} DataSource-like object.","    @protected","    @for AutoCompleteBase","    **/","    _createJSONPSource: function (source) {","        var jsonpSource = {type: 'jsonp'},","            that        = this,","            lastRequest, loading;","","        function _sendRequest(request) {","            var cacheKey = request.request,","                query    = request.query;","","            if (that._cache && cacheKey in that._cache) {","                that[_SOURCE_SUCCESS](that._cache[cacheKey], request);","                return;","            }","","            // Hack alert: JSONPRequest currently doesn't support","            // per-request callbacks, so we're reaching into the protected","            // _config object to make it happen.","            //","            // This limitation is mentioned in the following JSONP","            // enhancement ticket:","            //","            // http://yuilibrary.com/projects/yui3/ticket/2529371","            source._config.on.success = function (data) {","                that._cache && (that._cache[cacheKey] = data);","                that[_SOURCE_SUCCESS](data, request);","            };","","            source.send(query);","        }","","        jsonpSource.sendRequest = function (request) {","            // Keep track of the most recent request in case there are multiple","            // requests while we're waiting for the JSONP module to load. Only","            // the most recent request will be sent.","            lastRequest = request;","","            if (loading) { return; }","","            loading = true;","","            // Lazy-load the JSONP module if necessary, then overwrite the","            // sendRequest method to bypass this check in the future.","            Y.use('jsonp', function () {","                // Turn the source into a JSONPRequest instance if it isn't","                // one already.","                if (!(source instanceof Y.JSONPRequest)) {","                    source = new Y.JSONPRequest(source, {","                        format: Y.bind(that._jsonpFormatter, that)","                    });","                }","","                jsonpSource.sendRequest = _sendRequest;","                _sendRequest(lastRequest);","            });","        };","","        return jsonpSource;","    },","","    /**","    Creates a DataSource-like object that uses the specified `<select>` node as","    a source.","","    @method _createSelectSource","    @param {Node} source YUI Node instance wrapping a `<select>` node.","    @return {Object} DataSource-like object.","    @protected","    @for AutoCompleteBase","    **/","    _createSelectSource: function (source) {","        var that = this;","","        return {","            type: 'select',","            sendRequest: function (request) {","                var options = [];","","                source.get('options').each(function (option) {","                    options.push({","                        html    : option.get('innerHTML'),","                        index   : option.get('index'),","                        node    : option,","                        selected: option.get('selected'),","                        text    : option.get('text'),","                        value   : option.get('value')","                    });","                });","","                that[_SOURCE_SUCCESS](options, request);","            }","        };","    },","","    /**","    Creates a DataSource-like object that calls the specified  URL or executes","    the specified YQL query for results. If the string starts with \"select \",","    \"use \", or \"set \" (case-insensitive), it's assumed to be a YQL query;","    otherwise, it's assumed to be a URL (which may be absolute or relative).","    URLs containing a \"{callback}\" placeholder are assumed to be JSONP URLs; all","    others will use XHR. See the `source` attribute for more details.","","    @method _createStringSource","    @param {String} source URL or YQL query.","    @return {Object} DataSource-like object.","    @protected","    @for AutoCompleteBase","    **/","    _createStringSource: function (source) {","        if (this._YQL_SOURCE_REGEX.test(source)) {","            // Looks like a YQL query.","            return this._createYQLSource(source);","        } else if (source.indexOf('{callback}') !== -1) {","            // Contains a {callback} param and isn't a YQL query, so it must be","            // JSONP.","            return this._createJSONPSource(source);","        } else {","            // Not a YQL query or JSONP, so we'll assume it's an XHR URL.","            return this._createIOSource(source);","        }","    },","","    /**","    Creates a DataSource-like object that uses the specified YQL query string to","    create a YQL-based source. See the `source` attribute for details. If no","    `resultListLocator` is defined, this method will set a best-guess locator","    that might work for many typical YQL queries.","","    @method _createYQLSource","    @param {String} source YQL query.","    @return {Object} DataSource-like object.","    @protected","    @for AutoCompleteBase","    **/","    _createYQLSource: function (source) {","        var that      = this,","            yqlSource = {type: 'yql'},","            lastRequest, loading, yqlRequest;","","        if (!that.get(RESULT_LIST_LOCATOR)) {","            that.set(RESULT_LIST_LOCATOR, that._defaultYQLLocator);","        }","","        function _sendRequest(request) {","            var query      = request.query,","                env        = that.get('yqlEnv'),","                maxResults = that.get(MAX_RESULTS),","                callback, opts, yqlQuery;","","            yqlQuery = Lang.sub(source, {","                maxResults: maxResults > 0 ? maxResults : 1000,","                request   : request.request,","                query     : query","            });","","            if (that._cache && yqlQuery in that._cache) {","                that[_SOURCE_SUCCESS](that._cache[yqlQuery], request);","                return;","            }","","            callback = function (data) {","                that._cache && (that._cache[yqlQuery] = data);","                that[_SOURCE_SUCCESS](data, request);","            };","","            opts = {proto: that.get('yqlProtocol')};","","            // Only create a new YQLRequest instance if this is the","            // first request. For subsequent requests, we'll reuse the","            // original instance.","            if (yqlRequest) {","                yqlRequest._callback   = callback;","                yqlRequest._opts       = opts;","                yqlRequest._params.q   = yqlQuery;","","                if (env) {","                    yqlRequest._params.env = env;","                }","            } else {","                yqlRequest = new Y.YQLRequest(yqlQuery, {","                    on: {success: callback},","                    allowCache: false // temp workaround until JSONP has per-URL callback proxies","                }, env ? {env: env} : null, opts);","            }","","            yqlRequest.send();","        }","","        yqlSource.sendRequest = function (request) {","            // Keep track of the most recent request in case there are multiple","            // requests while we're waiting for the YQL module to load. Only the","            // most recent request will be sent.","            lastRequest = request;","","            if (!loading) {","                // Lazy-load the YQL module if necessary, then overwrite the","                // sendRequest method to bypass this check in the future.","                loading = true;","","                Y.use('yql', function () {","                    yqlSource.sendRequest = _sendRequest;","                    _sendRequest(lastRequest);","                });","            }","        };","","        return yqlSource;","    },","","    /**","    Default resultListLocator used when a string-based YQL source is set and the","    implementer hasn't already specified one.","","    @method _defaultYQLLocator","    @param {Object} response YQL response object.","    @return {Array}","    @protected","    @for AutoCompleteBase","    **/","    _defaultYQLLocator: function (response) {","        var results = response && response.query && response.query.results,","            values;","","        if (results && Lang.isObject(results)) {","            // If there's only a single value on YQL's results object, that","            // value almost certainly contains the array of results we want. If","            // there are 0 or 2+ values, then the values themselves are most","            // likely the results we want.","            values  = Y.Object.values(results) || [];","            results = values.length === 1 ? values[0] : values;","","            if (!Lang.isArray(results)) {","                results = [results];","            }","        } else {","            results = [];","        }","","        return results;","    },","","    /**","    Returns a formatted XHR URL based on the specified base _url_, _query_, and","    the current _requestTemplate_ if any.","","    @method _getXHRUrl","    @param {String} url Base URL.","    @param {Object} request Request object containing `query` and `request`","      properties.","    @return {String} Formatted URL.","    @protected","    @for AutoCompleteBase","    **/","    _getXHRUrl: function (url, request) {","        var maxResults = this.get(MAX_RESULTS);","","        if (request.query !== request.request) {","            // Append the request template to the URL.","            url += request.request;","        }","","        return Lang.sub(url, {","            maxResults: maxResults > 0 ? maxResults : 1000,","            query     : encodeURIComponent(request.query)","        });","    },","","    /**","    URL formatter passed to `JSONPRequest` instances.","","    @method _jsonpFormatter","    @param {String} url","    @param {String} proxy","    @param {String} query","    @return {String} Formatted URL","    @protected","    @for AutoCompleteBase","    **/","    _jsonpFormatter: function (url, proxy, query) {","        var maxResults      = this.get(MAX_RESULTS),","            requestTemplate = this.get(REQUEST_TEMPLATE);","","        if (requestTemplate) {","            url += requestTemplate(query);","        }","","        return Lang.sub(url, {","            callback  : proxy,","            maxResults: maxResults > 0 ? maxResults : 1000,","            query     : encodeURIComponent(query)","        });","    }","});","","// Add attributes to AutoCompleteBase.","Y.mix(ACBase.ATTRS, {","    /**","    YQL environment file URL to load when the `source` is set to a YQL query.","    Set this to `null` to use the default Open Data Tables environment file","    (http://datatables.org/alltables.env).","","    @attribute yqlEnv","    @type String","    @default null","    @for AutoCompleteBase","    **/","    yqlEnv: {","        value: null","    },","","    /**","    URL protocol to use when the `source` is set to a YQL query.","","    @attribute yqlProtocol","    @type String","    @default 'http'","    @for AutoCompleteBase","    **/","    yqlProtocol: {","        value: 'http'","    }","});","","// Tell AutoCompleteBase about the new source types it can now support.","Y.mix(ACBase.SOURCE_TYPES, {","    io    : '_createIOSource',","    jsonp : '_createJSONPSource',","    object: '_beforeCreateObjectSource', // Run our version before the base version.","    select: '_createSelectSource',","    string: '_createStringSource',","    yql   : '_createYQLSource'","}, true);","","","}, '3.13.0', {\"optional\": [\"io-base\", \"json-parse\", \"jsonp\", \"yql\"], \"requires\": [\"autocomplete-base\"]});","","}());"]};
}
var __cov_5L4z6UpcINcrbeBDq4u9cw = __coverage__['build/autocomplete-sources/autocomplete-sources.js'];
__cov_5L4z6UpcINcrbeBDq4u9cw.s['1']++;YUI.add('autocomplete-sources',function(Y,NAME){__cov_5L4z6UpcINcrbeBDq4u9cw.f['1']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['2']++;var ACBase=Y.AutoCompleteBase,Lang=Y.Lang,_SOURCE_SUCCESS='_sourceSuccess',MAX_RESULTS='maxResults',REQUEST_TEMPLATE='requestTemplate',RESULT_LIST_LOCATOR='resultListLocator';__cov_5L4z6UpcINcrbeBDq4u9cw.s['3']++;Y.mix(ACBase.prototype,{_YQL_SOURCE_REGEX:/^(?:select|set|use)\s+/i,_beforeCreateObjectSource:function(source){__cov_5L4z6UpcINcrbeBDq4u9cw.f['2']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['4']++;if((__cov_5L4z6UpcINcrbeBDq4u9cw.b['2'][0]++,source instanceof Y.Node)&&(__cov_5L4z6UpcINcrbeBDq4u9cw.b['2'][1]++,source.get('nodeName').toLowerCase()==='select')){__cov_5L4z6UpcINcrbeBDq4u9cw.b['1'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['5']++;return this._createSelectSource(source);}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['1'][1]++;}__cov_5L4z6UpcINcrbeBDq4u9cw.s['6']++;if((__cov_5L4z6UpcINcrbeBDq4u9cw.b['4'][0]++,Y.JSONPRequest)&&(__cov_5L4z6UpcINcrbeBDq4u9cw.b['4'][1]++,source instanceof Y.JSONPRequest)){__cov_5L4z6UpcINcrbeBDq4u9cw.b['3'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['7']++;return this._createJSONPSource(source);}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['3'][1]++;}__cov_5L4z6UpcINcrbeBDq4u9cw.s['8']++;return this._createObjectSource(source);},_createIOSource:function(source){__cov_5L4z6UpcINcrbeBDq4u9cw.f['3']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['9']++;var ioSource={type:'io'},that=this,ioRequest,lastRequest,loading;__cov_5L4z6UpcINcrbeBDq4u9cw.s['10']++;function _sendRequest(request){__cov_5L4z6UpcINcrbeBDq4u9cw.f['4']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['11']++;var cacheKey=request.request;__cov_5L4z6UpcINcrbeBDq4u9cw.s['12']++;if((__cov_5L4z6UpcINcrbeBDq4u9cw.b['6'][0]++,that._cache)&&(__cov_5L4z6UpcINcrbeBDq4u9cw.b['6'][1]++,cacheKey in that._cache)){__cov_5L4z6UpcINcrbeBDq4u9cw.b['5'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['13']++;that[_SOURCE_SUCCESS](that._cache[cacheKey],request);__cov_5L4z6UpcINcrbeBDq4u9cw.s['14']++;return;}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['5'][1]++;}__cov_5L4z6UpcINcrbeBDq4u9cw.s['15']++;if((__cov_5L4z6UpcINcrbeBDq4u9cw.b['8'][0]++,ioRequest)&&(__cov_5L4z6UpcINcrbeBDq4u9cw.b['8'][1]++,ioRequest.isInProgress())){__cov_5L4z6UpcINcrbeBDq4u9cw.b['7'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['16']++;ioRequest.abort();}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['7'][1]++;}__cov_5L4z6UpcINcrbeBDq4u9cw.s['17']++;ioRequest=Y.io(that._getXHRUrl(source,request),{on:{success:function(tid,response){__cov_5L4z6UpcINcrbeBDq4u9cw.f['5']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['18']++;var data;__cov_5L4z6UpcINcrbeBDq4u9cw.s['19']++;try{__cov_5L4z6UpcINcrbeBDq4u9cw.s['20']++;data=Y.JSON.parse(response.responseText);}catch(ex){__cov_5L4z6UpcINcrbeBDq4u9cw.s['21']++;Y.error('JSON parse error',ex);}__cov_5L4z6UpcINcrbeBDq4u9cw.s['22']++;if(data){__cov_5L4z6UpcINcrbeBDq4u9cw.b['9'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['23']++;(__cov_5L4z6UpcINcrbeBDq4u9cw.b['10'][0]++,that._cache)&&(__cov_5L4z6UpcINcrbeBDq4u9cw.b['10'][1]++,that._cache[cacheKey]=data);__cov_5L4z6UpcINcrbeBDq4u9cw.s['24']++;that[_SOURCE_SUCCESS](data,request);}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['9'][1]++;}}}});}__cov_5L4z6UpcINcrbeBDq4u9cw.s['25']++;ioSource.sendRequest=function(request){__cov_5L4z6UpcINcrbeBDq4u9cw.f['6']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['26']++;lastRequest=request;__cov_5L4z6UpcINcrbeBDq4u9cw.s['27']++;if(loading){__cov_5L4z6UpcINcrbeBDq4u9cw.b['11'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['28']++;return;}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['11'][1]++;}__cov_5L4z6UpcINcrbeBDq4u9cw.s['29']++;loading=true;__cov_5L4z6UpcINcrbeBDq4u9cw.s['30']++;Y.use('io-base','json-parse',function(){__cov_5L4z6UpcINcrbeBDq4u9cw.f['7']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['31']++;ioSource.sendRequest=_sendRequest;__cov_5L4z6UpcINcrbeBDq4u9cw.s['32']++;_sendRequest(lastRequest);});};__cov_5L4z6UpcINcrbeBDq4u9cw.s['33']++;return ioSource;},_createJSONPSource:function(source){__cov_5L4z6UpcINcrbeBDq4u9cw.f['8']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['34']++;var jsonpSource={type:'jsonp'},that=this,lastRequest,loading;__cov_5L4z6UpcINcrbeBDq4u9cw.s['35']++;function _sendRequest(request){__cov_5L4z6UpcINcrbeBDq4u9cw.f['9']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['36']++;var cacheKey=request.request,query=request.query;__cov_5L4z6UpcINcrbeBDq4u9cw.s['37']++;if((__cov_5L4z6UpcINcrbeBDq4u9cw.b['13'][0]++,that._cache)&&(__cov_5L4z6UpcINcrbeBDq4u9cw.b['13'][1]++,cacheKey in that._cache)){__cov_5L4z6UpcINcrbeBDq4u9cw.b['12'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['38']++;that[_SOURCE_SUCCESS](that._cache[cacheKey],request);__cov_5L4z6UpcINcrbeBDq4u9cw.s['39']++;return;}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['12'][1]++;}__cov_5L4z6UpcINcrbeBDq4u9cw.s['40']++;source._config.on.success=function(data){__cov_5L4z6UpcINcrbeBDq4u9cw.f['10']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['41']++;(__cov_5L4z6UpcINcrbeBDq4u9cw.b['14'][0]++,that._cache)&&(__cov_5L4z6UpcINcrbeBDq4u9cw.b['14'][1]++,that._cache[cacheKey]=data);__cov_5L4z6UpcINcrbeBDq4u9cw.s['42']++;that[_SOURCE_SUCCESS](data,request);};__cov_5L4z6UpcINcrbeBDq4u9cw.s['43']++;source.send(query);}__cov_5L4z6UpcINcrbeBDq4u9cw.s['44']++;jsonpSource.sendRequest=function(request){__cov_5L4z6UpcINcrbeBDq4u9cw.f['11']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['45']++;lastRequest=request;__cov_5L4z6UpcINcrbeBDq4u9cw.s['46']++;if(loading){__cov_5L4z6UpcINcrbeBDq4u9cw.b['15'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['47']++;return;}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['15'][1]++;}__cov_5L4z6UpcINcrbeBDq4u9cw.s['48']++;loading=true;__cov_5L4z6UpcINcrbeBDq4u9cw.s['49']++;Y.use('jsonp',function(){__cov_5L4z6UpcINcrbeBDq4u9cw.f['12']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['50']++;if(!(source instanceof Y.JSONPRequest)){__cov_5L4z6UpcINcrbeBDq4u9cw.b['16'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['51']++;source=new Y.JSONPRequest(source,{format:Y.bind(that._jsonpFormatter,that)});}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['16'][1]++;}__cov_5L4z6UpcINcrbeBDq4u9cw.s['52']++;jsonpSource.sendRequest=_sendRequest;__cov_5L4z6UpcINcrbeBDq4u9cw.s['53']++;_sendRequest(lastRequest);});};__cov_5L4z6UpcINcrbeBDq4u9cw.s['54']++;return jsonpSource;},_createSelectSource:function(source){__cov_5L4z6UpcINcrbeBDq4u9cw.f['13']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['55']++;var that=this;__cov_5L4z6UpcINcrbeBDq4u9cw.s['56']++;return{type:'select',sendRequest:function(request){__cov_5L4z6UpcINcrbeBDq4u9cw.f['14']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['57']++;var options=[];__cov_5L4z6UpcINcrbeBDq4u9cw.s['58']++;source.get('options').each(function(option){__cov_5L4z6UpcINcrbeBDq4u9cw.f['15']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['59']++;options.push({html:option.get('innerHTML'),index:option.get('index'),node:option,selected:option.get('selected'),text:option.get('text'),value:option.get('value')});});__cov_5L4z6UpcINcrbeBDq4u9cw.s['60']++;that[_SOURCE_SUCCESS](options,request);}};},_createStringSource:function(source){__cov_5L4z6UpcINcrbeBDq4u9cw.f['16']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['61']++;if(this._YQL_SOURCE_REGEX.test(source)){__cov_5L4z6UpcINcrbeBDq4u9cw.b['17'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['62']++;return this._createYQLSource(source);}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['17'][1]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['63']++;if(source.indexOf('{callback}')!==-1){__cov_5L4z6UpcINcrbeBDq4u9cw.b['18'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['64']++;return this._createJSONPSource(source);}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['18'][1]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['65']++;return this._createIOSource(source);}}},_createYQLSource:function(source){__cov_5L4z6UpcINcrbeBDq4u9cw.f['17']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['66']++;var that=this,yqlSource={type:'yql'},lastRequest,loading,yqlRequest;__cov_5L4z6UpcINcrbeBDq4u9cw.s['67']++;if(!that.get(RESULT_LIST_LOCATOR)){__cov_5L4z6UpcINcrbeBDq4u9cw.b['19'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['68']++;that.set(RESULT_LIST_LOCATOR,that._defaultYQLLocator);}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['19'][1]++;}__cov_5L4z6UpcINcrbeBDq4u9cw.s['69']++;function _sendRequest(request){__cov_5L4z6UpcINcrbeBDq4u9cw.f['18']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['70']++;var query=request.query,env=that.get('yqlEnv'),maxResults=that.get(MAX_RESULTS),callback,opts,yqlQuery;__cov_5L4z6UpcINcrbeBDq4u9cw.s['71']++;yqlQuery=Lang.sub(source,{maxResults:maxResults>0?(__cov_5L4z6UpcINcrbeBDq4u9cw.b['20'][0]++,maxResults):(__cov_5L4z6UpcINcrbeBDq4u9cw.b['20'][1]++,1000),request:request.request,query:query});__cov_5L4z6UpcINcrbeBDq4u9cw.s['72']++;if((__cov_5L4z6UpcINcrbeBDq4u9cw.b['22'][0]++,that._cache)&&(__cov_5L4z6UpcINcrbeBDq4u9cw.b['22'][1]++,yqlQuery in that._cache)){__cov_5L4z6UpcINcrbeBDq4u9cw.b['21'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['73']++;that[_SOURCE_SUCCESS](that._cache[yqlQuery],request);__cov_5L4z6UpcINcrbeBDq4u9cw.s['74']++;return;}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['21'][1]++;}__cov_5L4z6UpcINcrbeBDq4u9cw.s['75']++;callback=function(data){__cov_5L4z6UpcINcrbeBDq4u9cw.f['19']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['76']++;(__cov_5L4z6UpcINcrbeBDq4u9cw.b['23'][0]++,that._cache)&&(__cov_5L4z6UpcINcrbeBDq4u9cw.b['23'][1]++,that._cache[yqlQuery]=data);__cov_5L4z6UpcINcrbeBDq4u9cw.s['77']++;that[_SOURCE_SUCCESS](data,request);};__cov_5L4z6UpcINcrbeBDq4u9cw.s['78']++;opts={proto:that.get('yqlProtocol')};__cov_5L4z6UpcINcrbeBDq4u9cw.s['79']++;if(yqlRequest){__cov_5L4z6UpcINcrbeBDq4u9cw.b['24'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['80']++;yqlRequest._callback=callback;__cov_5L4z6UpcINcrbeBDq4u9cw.s['81']++;yqlRequest._opts=opts;__cov_5L4z6UpcINcrbeBDq4u9cw.s['82']++;yqlRequest._params.q=yqlQuery;__cov_5L4z6UpcINcrbeBDq4u9cw.s['83']++;if(env){__cov_5L4z6UpcINcrbeBDq4u9cw.b['25'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['84']++;yqlRequest._params.env=env;}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['25'][1]++;}}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['24'][1]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['85']++;yqlRequest=new Y.YQLRequest(yqlQuery,{on:{success:callback},allowCache:false},env?(__cov_5L4z6UpcINcrbeBDq4u9cw.b['26'][0]++,{env:env}):(__cov_5L4z6UpcINcrbeBDq4u9cw.b['26'][1]++,null),opts);}__cov_5L4z6UpcINcrbeBDq4u9cw.s['86']++;yqlRequest.send();}__cov_5L4z6UpcINcrbeBDq4u9cw.s['87']++;yqlSource.sendRequest=function(request){__cov_5L4z6UpcINcrbeBDq4u9cw.f['20']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['88']++;lastRequest=request;__cov_5L4z6UpcINcrbeBDq4u9cw.s['89']++;if(!loading){__cov_5L4z6UpcINcrbeBDq4u9cw.b['27'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['90']++;loading=true;__cov_5L4z6UpcINcrbeBDq4u9cw.s['91']++;Y.use('yql',function(){__cov_5L4z6UpcINcrbeBDq4u9cw.f['21']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['92']++;yqlSource.sendRequest=_sendRequest;__cov_5L4z6UpcINcrbeBDq4u9cw.s['93']++;_sendRequest(lastRequest);});}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['27'][1]++;}};__cov_5L4z6UpcINcrbeBDq4u9cw.s['94']++;return yqlSource;},_defaultYQLLocator:function(response){__cov_5L4z6UpcINcrbeBDq4u9cw.f['22']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['95']++;var results=(__cov_5L4z6UpcINcrbeBDq4u9cw.b['28'][0]++,response)&&(__cov_5L4z6UpcINcrbeBDq4u9cw.b['28'][1]++,response.query)&&(__cov_5L4z6UpcINcrbeBDq4u9cw.b['28'][2]++,response.query.results),values;__cov_5L4z6UpcINcrbeBDq4u9cw.s['96']++;if((__cov_5L4z6UpcINcrbeBDq4u9cw.b['30'][0]++,results)&&(__cov_5L4z6UpcINcrbeBDq4u9cw.b['30'][1]++,Lang.isObject(results))){__cov_5L4z6UpcINcrbeBDq4u9cw.b['29'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['97']++;values=(__cov_5L4z6UpcINcrbeBDq4u9cw.b['31'][0]++,Y.Object.values(results))||(__cov_5L4z6UpcINcrbeBDq4u9cw.b['31'][1]++,[]);__cov_5L4z6UpcINcrbeBDq4u9cw.s['98']++;results=values.length===1?(__cov_5L4z6UpcINcrbeBDq4u9cw.b['32'][0]++,values[0]):(__cov_5L4z6UpcINcrbeBDq4u9cw.b['32'][1]++,values);__cov_5L4z6UpcINcrbeBDq4u9cw.s['99']++;if(!Lang.isArray(results)){__cov_5L4z6UpcINcrbeBDq4u9cw.b['33'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['100']++;results=[results];}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['33'][1]++;}}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['29'][1]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['101']++;results=[];}__cov_5L4z6UpcINcrbeBDq4u9cw.s['102']++;return results;},_getXHRUrl:function(url,request){__cov_5L4z6UpcINcrbeBDq4u9cw.f['23']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['103']++;var maxResults=this.get(MAX_RESULTS);__cov_5L4z6UpcINcrbeBDq4u9cw.s['104']++;if(request.query!==request.request){__cov_5L4z6UpcINcrbeBDq4u9cw.b['34'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['105']++;url+=request.request;}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['34'][1]++;}__cov_5L4z6UpcINcrbeBDq4u9cw.s['106']++;return Lang.sub(url,{maxResults:maxResults>0?(__cov_5L4z6UpcINcrbeBDq4u9cw.b['35'][0]++,maxResults):(__cov_5L4z6UpcINcrbeBDq4u9cw.b['35'][1]++,1000),query:encodeURIComponent(request.query)});},_jsonpFormatter:function(url,proxy,query){__cov_5L4z6UpcINcrbeBDq4u9cw.f['24']++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['107']++;var maxResults=this.get(MAX_RESULTS),requestTemplate=this.get(REQUEST_TEMPLATE);__cov_5L4z6UpcINcrbeBDq4u9cw.s['108']++;if(requestTemplate){__cov_5L4z6UpcINcrbeBDq4u9cw.b['36'][0]++;__cov_5L4z6UpcINcrbeBDq4u9cw.s['109']++;url+=requestTemplate(query);}else{__cov_5L4z6UpcINcrbeBDq4u9cw.b['36'][1]++;}__cov_5L4z6UpcINcrbeBDq4u9cw.s['110']++;return Lang.sub(url,{callback:proxy,maxResults:maxResults>0?(__cov_5L4z6UpcINcrbeBDq4u9cw.b['37'][0]++,maxResults):(__cov_5L4z6UpcINcrbeBDq4u9cw.b['37'][1]++,1000),query:encodeURIComponent(query)});}});__cov_5L4z6UpcINcrbeBDq4u9cw.s['111']++;Y.mix(ACBase.ATTRS,{yqlEnv:{value:null},yqlProtocol:{value:'http'}});__cov_5L4z6UpcINcrbeBDq4u9cw.s['112']++;Y.mix(ACBase.SOURCE_TYPES,{io:'_createIOSource',jsonp:'_createJSONPSource',object:'_beforeCreateObjectSource',select:'_createSelectSource',string:'_createStringSource',yql:'_createYQLSource'},true);},'3.13.0',{'optional':['io-base','json-parse','jsonp','yql'],'requires':['autocomplete-base']});
