if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
if (!__coverage__['build/uploader-html5/uploader-html5.js']) {
__coverage__['build/uploader-html5/uploader-html5.js'] = {"path":"build/uploader-html5/uploader-html5.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,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":0,"163":0,"164":0,"165":0,"166":0,"167":0,"168":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0,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,0,0,0,0,0,0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0,0,0],"32":[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,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":26},"end":{"line":1,"column":45}}},"2":{"name":"UploaderHTML5","line":23,"loc":{"start":{"line":23,"column":0},"end":{"line":23,"column":25}}},"3":{"name":"(anonymous_3)","line":71,"loc":{"start":{"line":71,"column":18},"end":{"line":71,"column":30}}},"4":{"name":"(anonymous_4)","line":248,"loc":{"start":{"line":248,"column":15},"end":{"line":248,"column":27}}},"5":{"name":"(anonymous_5)","line":264,"loc":{"start":{"line":264,"column":13},"end":{"line":264,"column":25}}},"6":{"name":"(anonymous_6)","line":277,"loc":{"start":{"line":277,"column":37},"end":{"line":277,"column":49}}},"7":{"name":"(anonymous_7)","line":281,"loc":{"start":{"line":281,"column":41},"end":{"line":281,"column":57}}},"8":{"name":"(anonymous_8)","line":296,"loc":{"start":{"line":296,"column":23},"end":{"line":296,"column":35}}},"9":{"name":"(anonymous_9)","line":313,"loc":{"start":{"line":313,"column":20},"end":{"line":313,"column":37}}},"10":{"name":"(anonymous_10)","line":339,"loc":{"start":{"line":339,"column":24},"end":{"line":339,"column":36}}},"11":{"name":"(anonymous_11)","line":350,"loc":{"start":{"line":350,"column":22},"end":{"line":350,"column":39}}},"12":{"name":"(anonymous_12)","line":375,"loc":{"start":{"line":375,"column":41},"end":{"line":375,"column":58}}},"13":{"name":"(anonymous_13)","line":383,"loc":{"start":{"line":383,"column":41},"end":{"line":383,"column":58}}},"14":{"name":"(anonymous_14)","line":410,"loc":{"start":{"line":410,"column":22},"end":{"line":410,"column":44}}},"15":{"name":"(anonymous_15)","line":426,"loc":{"start":{"line":426,"column":24},"end":{"line":426,"column":36}}},"16":{"name":"(anonymous_16)","line":442,"loc":{"start":{"line":442,"column":22},"end":{"line":442,"column":34}}},"17":{"name":"(anonymous_17)","line":459,"loc":{"start":{"line":459,"column":22},"end":{"line":459,"column":34}}},"18":{"name":"(anonymous_18)","line":479,"loc":{"start":{"line":479,"column":19},"end":{"line":479,"column":31}}},"19":{"name":"(anonymous_19)","line":489,"loc":{"start":{"line":489,"column":19},"end":{"line":489,"column":34}}},"20":{"name":"(anonymous_20)","line":504,"loc":{"start":{"line":504,"column":22},"end":{"line":504,"column":36}}},"21":{"name":"(anonymous_21)","line":511,"loc":{"start":{"line":511,"column":29},"end":{"line":511,"column":46}}},"22":{"name":"(anonymous_22)","line":519,"loc":{"start":{"line":519,"column":29},"end":{"line":519,"column":46}}},"23":{"name":"(anonymous_23)","line":544,"loc":{"start":{"line":544,"column":26},"end":{"line":544,"column":43}}},"24":{"name":"(anonymous_24)","line":580,"loc":{"start":{"line":580,"column":27},"end":{"line":580,"column":39}}},"25":{"name":"(anonymous_25)","line":596,"loc":{"start":{"line":596,"column":13},"end":{"line":596,"column":44}}},"26":{"name":"(anonymous_26)","line":624,"loc":{"start":{"line":624,"column":16},"end":{"line":624,"column":41}}},"27":{"name":"(anonymous_27)","line":637,"loc":{"start":{"line":637,"column":18},"end":{"line":637,"column":50}}},"28":{"name":"(anonymous_28)","line":667,"loc":{"start":{"line":667,"column":26},"end":{"line":667,"column":42}}},"29":{"name":"(anonymous_29)","line":777,"loc":{"start":{"line":777,"column":20},"end":{"line":777,"column":35}}},"30":{"name":"(anonymous_30)","line":809,"loc":{"start":{"line":809,"column":23},"end":{"line":809,"column":38}}},"31":{"name":"(anonymous_31)","line":926,"loc":{"start":{"line":926,"column":21},"end":{"line":926,"column":33}}},"32":{"name":"(anonymous_32)","line":946,"loc":{"start":{"line":946,"column":23},"end":{"line":946,"column":38}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1006,"column":97}},"2":{"start":{"line":13,"column":0},"end":{"line":14,"column":38}},"3":{"start":{"line":23,"column":0},"end":{"line":25,"column":1}},"4":{"start":{"line":24,"column":4},"end":{"line":24,"column":67}},"5":{"start":{"line":29,"column":0},"end":{"line":1000,"column":3}},"6":{"start":{"line":73,"column":8},"end":{"line":73,"column":36}},"7":{"start":{"line":74,"column":8},"end":{"line":74,"column":26}},"8":{"start":{"line":75,"column":8},"end":{"line":75,"column":35}},"9":{"start":{"line":76,"column":8},"end":{"line":76,"column":28}},"10":{"start":{"line":92,"column":8},"end":{"line":92,"column":35}},"11":{"start":{"line":100,"column":8},"end":{"line":100,"column":36}},"12":{"start":{"line":115,"column":8},"end":{"line":115,"column":40}},"13":{"start":{"line":136,"column":8},"end":{"line":136,"column":39}},"14":{"start":{"line":153,"column":8},"end":{"line":153,"column":44}},"15":{"start":{"line":170,"column":8},"end":{"line":170,"column":39}},"16":{"start":{"line":178,"column":8},"end":{"line":178,"column":43}},"17":{"start":{"line":197,"column":8},"end":{"line":197,"column":36}},"18":{"start":{"line":205,"column":8},"end":{"line":205,"column":34}},"19":{"start":{"line":213,"column":8},"end":{"line":213,"column":33}},"20":{"start":{"line":221,"column":8},"end":{"line":221,"column":34}},"21":{"start":{"line":235,"column":8},"end":{"line":235,"column":29}},"22":{"start":{"line":249,"column":8},"end":{"line":250,"column":54}},"23":{"start":{"line":252,"column":8},"end":{"line":252,"column":59}},"24":{"start":{"line":253,"column":8},"end":{"line":253,"column":37}},"25":{"start":{"line":254,"column":8},"end":{"line":254,"column":84}},"26":{"start":{"line":255,"column":8},"end":{"line":255,"column":48}},"27":{"start":{"line":266,"column":8},"end":{"line":266,"column":33}},"28":{"start":{"line":267,"column":8},"end":{"line":267,"column":33}},"29":{"start":{"line":268,"column":8},"end":{"line":268,"column":31}},"30":{"start":{"line":269,"column":8},"end":{"line":269,"column":29}},"31":{"start":{"line":270,"column":8},"end":{"line":270,"column":31}},"32":{"start":{"line":272,"column":8},"end":{"line":272,"column":72}},"33":{"start":{"line":273,"column":8},"end":{"line":273,"column":68}},"34":{"start":{"line":274,"column":8},"end":{"line":274,"column":64}},"35":{"start":{"line":275,"column":8},"end":{"line":275,"column":76}},"36":{"start":{"line":276,"column":8},"end":{"line":276,"column":70}},"37":{"start":{"line":277,"column":8},"end":{"line":279,"column":17}},"38":{"start":{"line":278,"column":12},"end":{"line":278,"column":80}},"39":{"start":{"line":280,"column":8},"end":{"line":280,"column":70}},"40":{"start":{"line":281,"column":8},"end":{"line":283,"column":17}},"41":{"start":{"line":282,"column":12},"end":{"line":282,"column":36}},"42":{"start":{"line":285,"column":8},"end":{"line":285,"column":76}},"43":{"start":{"line":297,"column":8},"end":{"line":297,"column":42}},"44":{"start":{"line":298,"column":8},"end":{"line":298,"column":84}},"45":{"start":{"line":299,"column":8},"end":{"line":299,"column":60}},"46":{"start":{"line":300,"column":8},"end":{"line":300,"column":70}},"47":{"start":{"line":301,"column":8},"end":{"line":301,"column":33}},"48":{"start":{"line":302,"column":8},"end":{"line":302,"column":31}},"49":{"start":{"line":314,"column":8},"end":{"line":315,"column":49}},"50":{"start":{"line":317,"column":8},"end":{"line":322,"column":9}},"51":{"start":{"line":318,"column":12},"end":{"line":318,"column":60}},"52":{"start":{"line":319,"column":12},"end":{"line":319,"column":65}},"53":{"start":{"line":320,"column":12},"end":{"line":320,"column":64}},"54":{"start":{"line":321,"column":12},"end":{"line":321,"column":65}},"55":{"start":{"line":324,"column":8},"end":{"line":329,"column":9}},"56":{"start":{"line":325,"column":12},"end":{"line":325,"column":58}},"57":{"start":{"line":326,"column":12},"end":{"line":326,"column":63}},"58":{"start":{"line":327,"column":12},"end":{"line":327,"column":62}},"59":{"start":{"line":328,"column":12},"end":{"line":328,"column":63}},"60":{"start":{"line":340,"column":7},"end":{"line":340,"column":104}},"61":{"start":{"line":353,"column":8},"end":{"line":353,"column":32}},"62":{"start":{"line":354,"column":8},"end":{"line":354,"column":31}},"63":{"start":{"line":356,"column":8},"end":{"line":398,"column":9}},"64":{"start":{"line":357,"column":12},"end":{"line":397,"column":13}},"65":{"start":{"line":359,"column":20},"end":{"line":359,"column":43}},"66":{"start":{"line":360,"column":20},"end":{"line":360,"column":26}},"67":{"start":{"line":362,"column":20},"end":{"line":362,"column":42}},"68":{"start":{"line":363,"column":20},"end":{"line":363,"column":26}},"69":{"start":{"line":365,"column":20},"end":{"line":365,"column":43}},"70":{"start":{"line":366,"column":20},"end":{"line":366,"column":26}},"71":{"start":{"line":369,"column":20},"end":{"line":372,"column":33}},"72":{"start":{"line":374,"column":20},"end":{"line":386,"column":21}},"73":{"start":{"line":375,"column":24},"end":{"line":380,"column":27}},"74":{"start":{"line":376,"column":28},"end":{"line":376,"column":65}},"75":{"start":{"line":377,"column":28},"end":{"line":379,"column":29}},"76":{"start":{"line":378,"column":32},"end":{"line":378,"column":58}},"77":{"start":{"line":383,"column":24},"end":{"line":385,"column":27}},"78":{"start":{"line":384,"column":28},"end":{"line":384,"column":69}},"79":{"start":{"line":388,"column":20},"end":{"line":393,"column":21}},"80":{"start":{"line":389,"column":24},"end":{"line":389,"column":56}},"81":{"start":{"line":390,"column":24},"end":{"line":391,"column":97}},"82":{"start":{"line":392,"column":24},"end":{"line":392,"column":73}},"83":{"start":{"line":395,"column":20},"end":{"line":395,"column":63}},"84":{"start":{"line":396,"column":20},"end":{"line":396,"column":26}},"85":{"start":{"line":411,"column":8},"end":{"line":416,"column":9}},"86":{"start":{"line":412,"column":12},"end":{"line":412,"column":88}},"87":{"start":{"line":415,"column":12},"end":{"line":415,"column":91}},"88":{"start":{"line":427,"column":8},"end":{"line":432,"column":9}},"89":{"start":{"line":428,"column":12},"end":{"line":428,"column":61}},"90":{"start":{"line":431,"column":12},"end":{"line":431,"column":53}},"91":{"start":{"line":443,"column":8},"end":{"line":448,"column":9}},"92":{"start":{"line":444,"column":12},"end":{"line":444,"column":82}},"93":{"start":{"line":447,"column":12},"end":{"line":447,"column":51}},"94":{"start":{"line":460,"column":8},"end":{"line":470,"column":9}},"95":{"start":{"line":461,"column":12},"end":{"line":461,"column":37}},"96":{"start":{"line":462,"column":12},"end":{"line":462,"column":52}},"97":{"start":{"line":463,"column":12},"end":{"line":463,"column":81}},"98":{"start":{"line":465,"column":13},"end":{"line":470,"column":9}},"99":{"start":{"line":466,"column":12},"end":{"line":466,"column":41}},"100":{"start":{"line":467,"column":12},"end":{"line":467,"column":39}},"101":{"start":{"line":468,"column":12},"end":{"line":468,"column":51}},"102":{"start":{"line":469,"column":12},"end":{"line":469,"column":80}},"103":{"start":{"line":480,"column":8},"end":{"line":480,"column":39}},"104":{"start":{"line":490,"column":8},"end":{"line":490,"column":38}},"105":{"start":{"line":491,"column":8},"end":{"line":491,"column":39}},"106":{"start":{"line":505,"column":8},"end":{"line":508,"column":21}},"107":{"start":{"line":510,"column":8},"end":{"line":522,"column":9}},"108":{"start":{"line":511,"column":12},"end":{"line":516,"column":15}},"109":{"start":{"line":512,"column":16},"end":{"line":512,"column":53}},"110":{"start":{"line":513,"column":16},"end":{"line":515,"column":17}},"111":{"start":{"line":514,"column":20},"end":{"line":514,"column":46}},"112":{"start":{"line":519,"column":12},"end":{"line":521,"column":15}},"113":{"start":{"line":520,"column":16},"end":{"line":520,"column":57}},"114":{"start":{"line":524,"column":8},"end":{"line":531,"column":9}},"115":{"start":{"line":525,"column":12},"end":{"line":525,"column":44}},"116":{"start":{"line":527,"column":12},"end":{"line":528,"column":94}},"117":{"start":{"line":530,"column":12},"end":{"line":530,"column":61}},"118":{"start":{"line":533,"column":8},"end":{"line":533,"column":32}},"119":{"start":{"line":546,"column":8},"end":{"line":571,"column":9}},"120":{"start":{"line":548,"column":16},"end":{"line":548,"column":52}},"121":{"start":{"line":549,"column":16},"end":{"line":549,"column":22}},"122":{"start":{"line":551,"column":16},"end":{"line":551,"column":51}},"123":{"start":{"line":552,"column":16},"end":{"line":552,"column":22}},"124":{"start":{"line":554,"column":16},"end":{"line":554,"column":56}},"125":{"start":{"line":555,"column":16},"end":{"line":555,"column":22}},"126":{"start":{"line":557,"column":16},"end":{"line":557,"column":51}},"127":{"start":{"line":558,"column":16},"end":{"line":558,"column":22}},"128":{"start":{"line":560,"column":16},"end":{"line":560,"column":34}},"129":{"start":{"line":561,"column":16},"end":{"line":561,"column":55}},"130":{"start":{"line":562,"column":16},"end":{"line":562,"column":22}},"131":{"start":{"line":565,"column":16},"end":{"line":565,"column":48}},"132":{"start":{"line":566,"column":16},"end":{"line":566,"column":22}},"133":{"start":{"line":569,"column":16},"end":{"line":569,"column":49}},"134":{"start":{"line":570,"column":16},"end":{"line":570,"column":22}},"135":{"start":{"line":581,"column":8},"end":{"line":581,"column":60}},"136":{"start":{"line":582,"column":8},"end":{"line":584,"column":9}},"137":{"start":{"line":583,"column":12},"end":{"line":583,"column":32}},"138":{"start":{"line":598,"column":8},"end":{"line":600,"column":36}},"139":{"start":{"line":602,"column":8},"end":{"line":602,"column":81}},"140":{"start":{"line":604,"column":8},"end":{"line":613,"column":9}},"141":{"start":{"line":606,"column":12},"end":{"line":606,"column":67}},"142":{"start":{"line":607,"column":12},"end":{"line":607,"column":70}},"143":{"start":{"line":608,"column":12},"end":{"line":608,"column":70}},"144":{"start":{"line":609,"column":12},"end":{"line":609,"column":67}},"145":{"start":{"line":610,"column":12},"end":{"line":610,"column":68}},"146":{"start":{"line":612,"column":12},"end":{"line":612,"column":77}},"147":{"start":{"line":625,"column":8},"end":{"line":625,"column":62}},"148":{"start":{"line":638,"column":8},"end":{"line":670,"column":8}},"149":{"start":{"line":639,"column":12},"end":{"line":640,"column":67}},"150":{"start":{"line":642,"column":12},"end":{"line":652,"column":15}},"151":{"start":{"line":654,"column":12},"end":{"line":654,"column":73}},"152":{"start":{"line":655,"column":12},"end":{"line":655,"column":76}},"153":{"start":{"line":656,"column":12},"end":{"line":656,"column":81}},"154":{"start":{"line":657,"column":12},"end":{"line":657,"column":76}},"155":{"start":{"line":658,"column":12},"end":{"line":658,"column":80}},"156":{"start":{"line":659,"column":12},"end":{"line":659,"column":74}},"157":{"start":{"line":660,"column":12},"end":{"line":660,"column":73}},"158":{"start":{"line":661,"column":12},"end":{"line":661,"column":37}},"159":{"start":{"line":663,"column":12},"end":{"line":663,"column":37}},"160":{"start":{"line":665,"column":12},"end":{"line":670,"column":8}},"161":{"start":{"line":666,"column":12},"end":{"line":666,"column":77}},"162":{"start":{"line":667,"column":12},"end":{"line":669,"column":21}},"163":{"start":{"line":668,"column":16},"end":{"line":668,"column":50}},"164":{"start":{"line":778,"column":16},"end":{"line":778,"column":34}},"165":{"start":{"line":810,"column":16},"end":{"line":815,"column":18}},"166":{"start":{"line":927,"column":16},"end":{"line":930,"column":20}},"167":{"start":{"line":947,"column":16},"end":{"line":947,"column":46}},"168":{"start":{"line":1002,"column":0},"end":{"line":1002,"column":38}}},"branchMap":{"1":{"line":314,"type":"binary-expr","locations":[{"start":{"line":314,"column":17},"end":{"line":314,"column":22}},{"start":{"line":314,"column":26},"end":{"line":314,"column":41}}]},"2":{"line":317,"type":"if","locations":[{"start":{"line":317,"column":8},"end":{"line":317,"column":8}},{"start":{"line":317,"column":8},"end":{"line":317,"column":8}}]},"3":{"line":324,"type":"if","locations":[{"start":{"line":324,"column":8},"end":{"line":324,"column":8}},{"start":{"line":324,"column":8},"end":{"line":324,"column":8}}]},"4":{"line":356,"type":"if","locations":[{"start":{"line":356,"column":8},"end":{"line":356,"column":8}},{"start":{"line":356,"column":8},"end":{"line":356,"column":8}}]},"5":{"line":357,"type":"switch","locations":[{"start":{"line":358,"column":16},"end":{"line":360,"column":26}},{"start":{"line":361,"column":16},"end":{"line":363,"column":26}},{"start":{"line":364,"column":16},"end":{"line":366,"column":26}},{"start":{"line":367,"column":16},"end":{"line":396,"column":26}}]},"6":{"line":374,"type":"if","locations":[{"start":{"line":374,"column":20},"end":{"line":374,"column":20}},{"start":{"line":374,"column":20},"end":{"line":374,"column":20}}]},"7":{"line":377,"type":"if","locations":[{"start":{"line":377,"column":28},"end":{"line":377,"column":28}},{"start":{"line":377,"column":28},"end":{"line":377,"column":28}}]},"8":{"line":388,"type":"if","locations":[{"start":{"line":388,"column":20},"end":{"line":388,"column":20}},{"start":{"line":388,"column":20},"end":{"line":388,"column":20}}]},"9":{"line":391,"type":"cond-expr","locations":[{"start":{"line":391,"column":53},"end":{"line":391,"column":81}},{"start":{"line":391,"column":84},"end":{"line":391,"column":95}}]},"10":{"line":411,"type":"if","locations":[{"start":{"line":411,"column":8},"end":{"line":411,"column":8}},{"start":{"line":411,"column":8},"end":{"line":411,"column":8}}]},"11":{"line":427,"type":"if","locations":[{"start":{"line":427,"column":8},"end":{"line":427,"column":8}},{"start":{"line":427,"column":8},"end":{"line":427,"column":8}}]},"12":{"line":443,"type":"if","locations":[{"start":{"line":443,"column":8},"end":{"line":443,"column":8}},{"start":{"line":443,"column":8},"end":{"line":443,"column":8}}]},"13":{"line":460,"type":"if","locations":[{"start":{"line":460,"column":8},"end":{"line":460,"column":8}},{"start":{"line":460,"column":8},"end":{"line":460,"column":8}}]},"14":{"line":460,"type":"binary-expr","locations":[{"start":{"line":460,"column":12},"end":{"line":460,"column":31}},{"start":{"line":460,"column":35},"end":{"line":460,"column":63}}]},"15":{"line":465,"type":"if","locations":[{"start":{"line":465,"column":13},"end":{"line":465,"column":13}},{"start":{"line":465,"column":13},"end":{"line":465,"column":13}}]},"16":{"line":465,"type":"binary-expr","locations":[{"start":{"line":465,"column":17},"end":{"line":465,"column":37}},{"start":{"line":465,"column":41},"end":{"line":465,"column":60}}]},"17":{"line":510,"type":"if","locations":[{"start":{"line":510,"column":8},"end":{"line":510,"column":8}},{"start":{"line":510,"column":8},"end":{"line":510,"column":8}}]},"18":{"line":513,"type":"if","locations":[{"start":{"line":513,"column":16},"end":{"line":513,"column":16}},{"start":{"line":513,"column":16},"end":{"line":513,"column":16}}]},"19":{"line":524,"type":"if","locations":[{"start":{"line":524,"column":8},"end":{"line":524,"column":8}},{"start":{"line":524,"column":8},"end":{"line":524,"column":8}}]},"20":{"line":528,"type":"cond-expr","locations":[{"start":{"line":528,"column":49},"end":{"line":528,"column":77}},{"start":{"line":528,"column":80},"end":{"line":528,"column":91}}]},"21":{"line":546,"type":"switch","locations":[{"start":{"line":547,"column":12},"end":{"line":549,"column":22}},{"start":{"line":550,"column":12},"end":{"line":552,"column":22}},{"start":{"line":553,"column":12},"end":{"line":555,"column":22}},{"start":{"line":556,"column":12},"end":{"line":558,"column":22}},{"start":{"line":559,"column":12},"end":{"line":562,"column":22}},{"start":{"line":563,"column":12},"end":{"line":563,"column":36}},{"start":{"line":564,"column":12},"end":{"line":566,"column":22}},{"start":{"line":567,"column":12},"end":{"line":567,"column":37}},{"start":{"line":568,"column":12},"end":{"line":570,"column":22}}]},"22":{"line":582,"type":"if","locations":[{"start":{"line":582,"column":8},"end":{"line":582,"column":8}},{"start":{"line":582,"column":8},"end":{"line":582,"column":8}}]},"23":{"line":598,"type":"binary-expr","locations":[{"start":{"line":598,"column":24},"end":{"line":598,"column":27}},{"start":{"line":598,"column":31},"end":{"line":598,"column":52}}]},"24":{"line":599,"type":"binary-expr","locations":[{"start":{"line":599,"column":23},"end":{"line":599,"column":31}},{"start":{"line":599,"column":35},"end":{"line":599,"column":62}}]},"25":{"line":602,"type":"cond-expr","locations":[{"start":{"line":602,"column":53},"end":{"line":602,"column":69}},{"start":{"line":602,"column":72},"end":{"line":602,"column":80}}]},"26":{"line":604,"type":"if","locations":[{"start":{"line":604,"column":8},"end":{"line":604,"column":8}},{"start":{"line":604,"column":8},"end":{"line":604,"column":8}}]},"27":{"line":638,"type":"if","locations":[{"start":{"line":638,"column":8},"end":{"line":638,"column":8}},{"start":{"line":638,"column":8},"end":{"line":638,"column":8}}]},"28":{"line":639,"type":"binary-expr","locations":[{"start":{"line":639,"column":28},"end":{"line":639,"column":31}},{"start":{"line":639,"column":35},"end":{"line":639,"column":56}}]},"29":{"line":640,"type":"binary-expr","locations":[{"start":{"line":640,"column":27},"end":{"line":640,"column":35}},{"start":{"line":640,"column":39},"end":{"line":640,"column":66}}]},"30":{"line":665,"type":"if","locations":[{"start":{"line":665,"column":12},"end":{"line":665,"column":12}},{"start":{"line":665,"column":12},"end":{"line":665,"column":12}}]},"31":{"line":811,"type":"binary-expr","locations":[{"start":{"line":811,"column":20},"end":{"line":811,"column":50}},{"start":{"line":812,"column":20},"end":{"line":812,"column":46}},{"start":{"line":813,"column":20},"end":{"line":813,"column":54}},{"start":{"line":814,"column":20},"end":{"line":814,"column":55}}]},"32":{"line":947,"type":"binary-expr","locations":[{"start":{"line":947,"column":24},"end":{"line":947,"column":32}},{"start":{"line":947,"column":36},"end":{"line":947,"column":44}}]}},"code":["(function () { YUI.add('uploader-html5', function (Y, NAME) {","","/**","* This module provides a UI for file selection and multiple file upload capability using","* HTML5 XMLHTTPRequest Level 2 as a transport engine.","* The supported features include: automatic upload queue management, upload progress","* tracking, drag-and-drop support, server response retrieval and error reporting.","*","* @module uploader-html5","*/","","// Shorthands for the external modules","var substitute = Y.Lang.sub,"," UploaderQueue = Y.Uploader.Queue;","","/**","* This module provides a UI for file selection and multiple file upload capability using","* HTML5 XMLHTTPRequest Level 2 as a transport engine.","* @class UploaderHTML5","* @extends Widget","* @constructor","*/","function UploaderHTML5() {"," UploaderHTML5.superclass.constructor.apply ( this, arguments );","}","","","","Y.UploaderHTML5 = Y.extend( UploaderHTML5, Y.Widget, {",""," /**"," * Stored reference to the instance of the file input field used to"," * initiate the file selection dialog."," *"," * @property _fileInputField"," * @type {Node}"," * @protected"," */"," _fileInputField: null,",""," /**"," * Stored reference to the click event binding of the `Select Files`"," * button."," *"," * @property _buttonBinding"," * @type {EventHandle}"," * @protected"," */"," _buttonBinding: null,",""," /**"," * Stored reference to the instance of Uploader.Queue used to manage"," * the upload process. This is a read-only property that only exists"," * during an active upload process. Only one queue can be active at"," * a time; if an upload start is attempted while a queue is active,"," * it will be ignored."," *"," * @property queue"," * @type {Uploader.Queue}"," */"," queue: null,",""," // Y.UploaderHTML5 prototype",""," /**"," * Construction logic executed during UploaderHTML5 instantiation."," *"," * @method initializer"," * @protected"," */"," initializer : function () {",""," this._fileInputField = null;"," this.queue = null;"," this._buttonBinding = null;"," this._fileList = [];",""," // Publish available events",""," /**"," * Signals that files have been selected."," *"," * @event fileselect"," * @param event {Event} The event object for the `fileselect` with the"," * following payload:"," *
"," *
fileList
"," *
An `Array` of files selected by the user, encapsulated"," * in Y.FileHTML5 objects.
"," *
"," */"," this.publish(\"fileselect\");",""," /**"," * Signals that an upload of multiple files has been started."," *"," * @event uploadstart"," * @param event {Event} The event object for the `uploadstart`."," */"," this.publish(\"uploadstart\");",""," /**"," * Signals that an upload of a specific file has started."," *"," * @event fileuploadstart"," * @param event {Event} The event object for the `fileuploadstart` with the"," * following payload:"," *
"," *
file
"," *
A reference to the Y.File that dispatched the event.
"," *
originEvent
"," *
The original event dispatched by Y.File.
"," *
"," */"," this.publish(\"fileuploadstart\");",""," /**"," * Reports on upload progress of a specific file."," *"," * @event uploadprogress"," * @param event {Event} The event object for the `uploadprogress` with the"," * following payload:"," *
"," *
file
"," *
The pointer to the instance of `Y.File` that dispatched the event.
"," *
bytesLoaded
"," *
The number of bytes of the file that has been uploaded
"," *
bytesTotal
"," *
The total number of bytes in the file
"," *
percentLoaded
"," *
The fraction of the file that has been uploaded, out of 100
"," *
originEvent
"," *
The original event dispatched by the HTML5 uploader
"," *
"," */"," this.publish(\"uploadprogress\");",""," /**"," * Reports on the total upload progress of the file list."," *"," * @event totaluploadprogress"," * @param event {Event} The event object for the `totaluploadprogress` with the"," * following payload:"," *
"," *
bytesLoaded
"," *
The number of bytes of the file list that has been uploaded
"," *
bytesTotal
"," *
The total number of bytes in the file list
"," *
percentLoaded
"," *
The fraction of the file list that has been uploaded, out of 100
"," *
"," */"," this.publish(\"totaluploadprogress\");",""," /**"," * Signals that a single file upload has been completed."," *"," * @event uploadcomplete"," * @param event {Event} The event object for the `uploadcomplete` with the"," * following payload:"," *
"," *
file
"," *
The pointer to the instance of `Y.File` whose upload has been completed.
"," *
originEvent
"," *
The original event fired by the SWF Uploader
"," *
data
"," *
Data returned by the server.
"," *
"," */"," this.publish(\"uploadcomplete\");",""," /**"," * Signals that the upload process of the entire file list has been completed."," *"," * @event alluploadscomplete"," * @param event {Event} The event object for the `alluploadscomplete`."," */"," this.publish(\"alluploadscomplete\");",""," /**"," * Signals that a error has occurred in a specific file's upload process."," *"," * @event uploaderror"," * @param event {Event} The event object for the `uploaderror` with the"," * following payload:"," *
"," *
originEvent
"," *
The original error event fired by the HTML5 Uploader.
"," *
file
"," *
The pointer at the instance of Y.File that returned the error.
"," *
status
"," *
The status reported by the XMLHttpRequest object.
"," *
statusText
"," *
The statusText reported by the XMLHttpRequest object.
"," *
"," */"," this.publish(\"uploaderror\");",""," /**"," * Signals that a dragged object has entered into the uploader's associated drag-and-drop area."," *"," * @event dragenter"," * @param event {Event} The event object for the `dragenter`."," */"," this.publish(\"dragenter\");",""," /**"," * Signals that an object has been dragged over the uploader's associated drag-and-drop area."," *"," * @event dragover"," * @param event {Event} The event object for the `dragover`."," */"," this.publish(\"dragover\");",""," /**"," * Signals that an object has been dragged off of the uploader's associated drag-and-drop area."," *"," * @event dragleave"," * @param event {Event} The event object for the `dragleave`."," */"," this.publish(\"dragleave\");",""," /**"," * Signals that an object has been dropped over the uploader's associated drag-and-drop area."," *"," * @event drop"," * @param event {Event} The event object for the `drop` with the"," * following payload:"," *
"," *
fileList
"," *
An `Array` of files dropped by the user, encapsulated"," * in Y.FileHTML5 objects.
"," *
"," */"," this.publish(\"drop\");",""," },",""," /**"," * Create the DOM structure for the UploaderHTML5."," * UploaderHTML5's DOM structure consists of a \"Select Files\" button that can"," * be replaced by the developer's widget of choice; and a hidden file input field"," * that is used to instantiate the File Select dialog."," *"," * @method renderUI"," * @protected"," */"," renderUI : function () {"," var contentBox = this.get('contentBox'),"," selButton = this.get(\"selectFilesButton\");",""," selButton.setStyles({width:\"100%\", height:\"100%\"});"," contentBox.append(selButton);"," this._fileInputField = Y.Node.create(UploaderHTML5.HTML5FILEFIELD_TEMPLATE);"," contentBox.append(this._fileInputField);"," },",""," /**"," * Binds to the UploaderHTML5 UI and subscribes to the necessary events."," *"," * @method bindUI"," * @protected"," */"," bindUI : function () {",""," this._bindSelectButton();"," this._setMultipleFiles();"," this._setFileFilters();"," this._bindDropArea();"," this._triggerEnabled();",""," this.after(\"multipleFilesChange\", this._setMultipleFiles, this);"," this.after(\"fileFiltersChange\", this._setFileFilters, this);"," this.after(\"enabledChange\", this._triggerEnabled, this);"," this.after(\"selectFilesButtonChange\", this._bindSelectButton, this);"," this.after(\"dragAndDropAreaChange\", this._bindDropArea, this);"," this.after(\"tabIndexChange\", function () {"," this.get(\"selectFilesButton\").set(\"tabIndex\", this.get(\"tabIndex\"));"," }, this);"," this._fileInputField.on(\"change\", this._updateFileList, this);"," this._fileInputField.on(\"click\", function(event) {"," event.stopPropagation();"," }, this);",""," this.get(\"selectFilesButton\").set(\"tabIndex\", this.get(\"tabIndex\"));"," },","",""," /**"," * Recreates the file field to null out the previous list of files and"," * thus allow for an identical file list selection."," *"," * @method _rebindFileField"," * @protected"," */"," _rebindFileField : function () {"," this._fileInputField.remove(true);"," this._fileInputField = Y.Node.create(UploaderHTML5.HTML5FILEFIELD_TEMPLATE);"," this.get(\"contentBox\").append(this._fileInputField);"," this._fileInputField.on(\"change\", this._updateFileList, this);"," this._setMultipleFiles();"," this._setFileFilters();"," },","",""," /**"," * Binds the specified drop area's drag and drop events to the"," * uploader's custom handler."," *"," * @method _bindDropArea"," * @protected"," */"," _bindDropArea : function (event) {"," var ev = event || {prevVal: null},"," ddArea = this.get(\"dragAndDropArea\");",""," if (ev.prevVal !== null) {"," ev.prevVal.detach('drop', this._ddEventHandler);"," ev.prevVal.detach('dragenter', this._ddEventHandler);"," ev.prevVal.detach('dragover', this._ddEventHandler);"," ev.prevVal.detach('dragleave', this._ddEventHandler);"," }",""," if (ddArea !== null) {"," ddArea.on('drop', this._ddEventHandler, this);"," ddArea.on('dragenter', this._ddEventHandler, this);"," ddArea.on('dragover', this._ddEventHandler, this);"," ddArea.on('dragleave', this._ddEventHandler, this);"," }"," },",""," /**"," * Binds the instantiation of the file select dialog to the current file select"," * control."," *"," * @method _bindSelectButton"," * @protected"," */"," _bindSelectButton : function () {"," this._buttonBinding = this.get(\"selectFilesButton\").on(\"click\", this.openFileSelectDialog, this);"," },",""," /**"," * Handles the drag and drop events from the uploader's specified drop"," * area."," *"," * @method _ddEventHandler"," * @protected"," */"," _ddEventHandler : function (event) {","",""," event.stopPropagation();"," event.preventDefault();",""," if (Y.Array.indexOf(event._event.dataTransfer.types, 'Files') > -1) {"," switch (event.type) {"," case \"dragenter\":"," this.fire(\"dragenter\");"," break;"," case \"dragover\":"," this.fire(\"dragover\");"," break;"," case \"dragleave\":"," this.fire(\"dragleave\");"," break;"," case \"drop\":",""," var newfiles = event._event.dataTransfer.files,"," parsedFiles = [],"," filterFunc = this.get(\"fileFilterFunction\"),"," oldfiles;",""," if (filterFunc) {"," Y.each(newfiles, function (value) {"," var newfile = new Y.FileHTML5(value);"," if (filterFunc(newfile)) {"," parsedFiles.push(newfile);"," }"," });"," }"," else {"," Y.each(newfiles, function (value) {"," parsedFiles.push(new Y.FileHTML5(value));"," });"," }",""," if (parsedFiles.length > 0) {"," oldfiles = this.get(\"fileList\");"," this.set(\"fileList\","," this.get(\"appendNewFiles\") ? oldfiles.concat(parsedFiles) : parsedFiles);"," this.fire(\"fileselect\", {fileList: parsedFiles});"," }",""," this.fire(\"drop\", {fileList: parsedFiles});"," break;"," }"," }"," },",""," /**"," * Adds or removes a specified state CSS class to the underlying uploader button."," *"," * @method _setButtonClass"," * @protected"," * @param state {String} The name of the state enumerated in `buttonClassNames` attribute"," * from which to derive the needed class name."," * @param add {Boolean} A Boolean indicating whether to add or remove the class."," */"," _setButtonClass : function (state, add) {"," if (add) {"," this.get(\"selectFilesButton\").addClass(this.get(\"buttonClassNames\")[state]);"," }"," else {"," this.get(\"selectFilesButton\").removeClass(this.get(\"buttonClassNames\")[state]);"," }"," },",""," /**"," * Syncs the state of the `multipleFiles` attribute between this class"," * and the file input field."," *"," * @method _setMultipleFiles"," * @protected"," */"," _setMultipleFiles : function () {"," if (this.get(\"multipleFiles\") === true) {"," this._fileInputField.set(\"multiple\", \"multiple\");"," }"," else {"," this._fileInputField.set(\"multiple\", \"\");"," }"," },",""," /**"," * Syncs the state of the `fileFilters` attribute between this class"," * and the file input field."," *"," * @method _setFileFilters"," * @protected"," */"," _setFileFilters : function () {"," if (this.get(\"fileFilters\").length > 0) {"," this._fileInputField.set(\"accept\", this.get(\"fileFilters\").join(\",\"));"," }"," else {"," this._fileInputField.set(\"accept\", \"\");"," }"," },","",""," /**"," * Syncs the state of the `enabled` attribute between this class"," * and the underlying button."," *"," * @method _triggerEnabled"," * @private"," */"," _triggerEnabled : function () {"," if (this.get(\"enabled\") && this._buttonBinding === null) {"," this._bindSelectButton();"," this._setButtonClass(\"disabled\", false);"," this.get(\"selectFilesButton\").setAttribute(\"aria-disabled\", \"false\");"," }"," else if (!this.get(\"enabled\") && this._buttonBinding) {"," this._buttonBinding.detach();"," this._buttonBinding = null;"," this._setButtonClass(\"disabled\", true);"," this.get(\"selectFilesButton\").setAttribute(\"aria-disabled\", \"true\");"," }"," },",""," /**"," * Getter for the `fileList` attribute"," *"," * @method _getFileList"," * @private"," */"," _getFileList : function () {"," return this._fileList.concat();"," },",""," /**"," * Setter for the `fileList` attribute"," *"," * @method _setFileList"," * @private"," */"," _setFileList : function (val) {"," this._fileList = val.concat();"," return this._fileList.concat();"," },",""," /**"," * Adjusts the content of the `fileList` based on the results of file selection"," * and the `appendNewFiles` attribute. If the `appendNewFiles` attribute is true,"," * then selected files are appended to the existing list; otherwise, the list is"," * cleared and populated with the newly selected files."," *"," * @method _updateFileList"," * @param ev {Event} The file selection event received from the uploader."," * @protected"," */"," _updateFileList : function (ev) {"," var newfiles = ev.target.getDOMNode().files,"," parsedFiles = [],"," filterFunc = this.get(\"fileFilterFunction\"),"," oldfiles;",""," if (filterFunc) {"," Y.each(newfiles, function (value) {"," var newfile = new Y.FileHTML5(value);"," if (filterFunc(newfile)) {"," parsedFiles.push(newfile);"," }"," });"," }"," else {"," Y.each(newfiles, function (value) {"," parsedFiles.push(new Y.FileHTML5(value));"," });"," }",""," if (parsedFiles.length > 0) {"," oldfiles = this.get(\"fileList\");",""," this.set(\"fileList\","," this.get(\"appendNewFiles\") ? oldfiles.concat(parsedFiles) : parsedFiles );",""," this.fire(\"fileselect\", {fileList: parsedFiles});"," }",""," this._rebindFileField();"," },","",""," /**"," * Handles and retransmits events fired by `Y.File` and `Y.Uploader.Queue`."," *"," * @method _uploadEventHandler"," * @param event The event dispatched during the upload process."," * @protected"," */"," _uploadEventHandler : function (event) {",""," switch (event.type) {"," case \"file:uploadstart\":"," this.fire(\"fileuploadstart\", event);"," break;"," case \"file:uploadprogress\":"," this.fire(\"uploadprogress\", event);"," break;"," case \"uploaderqueue:totaluploadprogress\":"," this.fire(\"totaluploadprogress\", event);"," break;"," case \"file:uploadcomplete\":"," this.fire(\"uploadcomplete\", event);"," break;"," case \"uploaderqueue:alluploadscomplete\":"," this.queue = null;"," this.fire(\"alluploadscomplete\", event);"," break;"," case \"file:uploaderror\": // overflow intentional"," case \"uploaderqueue:uploaderror\":"," this.fire(\"uploaderror\", event);"," break;"," case \"file:uploadcancel\": // overflow intentional"," case \"uploaderqueue:uploadcancel\":"," this.fire(\"uploadcancel\", event);"," break;"," }",""," },",""," /**"," * Opens the File Selection dialog by simulating a click on the file input field."," *"," * @method openFileSelectDialog"," */"," openFileSelectDialog : function () {"," var fileDomNode = this._fileInputField.getDOMNode();"," if (fileDomNode.click) {"," fileDomNode.click();"," }"," },",""," /**"," * Starts the upload of a specific file."," *"," * @method upload"," * @param file {File} Reference to the instance of the file to be uploaded."," * @param url {String} The URL to upload the file to."," * @param postVars {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request."," * If not specified, the values from the attribute `postVarsPerFile` are used instead."," */"," upload : function (file, url, postvars) {",""," var uploadURL = url || this.get(\"uploadURL\"),"," postVars = postvars || this.get(\"postVarsPerFile\"),"," fileId = file.get(\"id\");",""," postVars = postVars.hasOwnProperty(fileId) ? postVars[fileId] : postVars;",""," if (file instanceof Y.FileHTML5) {",""," file.on(\"uploadstart\", this._uploadEventHandler, this);"," file.on(\"uploadprogress\", this._uploadEventHandler, this);"," file.on(\"uploadcomplete\", this._uploadEventHandler, this);"," file.on(\"uploaderror\", this._uploadEventHandler, this);"," file.on(\"uploadcancel\", this._uploadEventHandler, this);",""," file.startUpload(uploadURL, postVars, this.get(\"fileFieldName\"));"," }"," },",""," /**"," * Starts the upload of all files on the file list, using an automated queue."," *"," * @method uploadAll"," * @param url {String} The URL to upload the files to."," * @param [postVars] {Object} A set of key-value pairs to send as variables along with the file upload HTTP request."," * If not specified, the values from the attribute `postVarsPerFile` are used instead."," */"," uploadAll : function (url, postvars) {"," this.uploadThese(this.get(\"fileList\"), url, postvars);"," },",""," /**"," * Starts the upload of the files specified in the first argument, using an automated queue."," *"," * @method uploadThese"," * @param files {Array} The list of files to upload."," * @param url {String} The URL to upload the files to."," * @param [postVars] {Object} A set of key-value pairs to send as variables along with the file upload HTTP request."," * If not specified, the values from the attribute `postVarsPerFile` are used instead."," */"," uploadThese : function (files, url, postvars) {"," if (!this.queue) {"," var uploadURL = url || this.get(\"uploadURL\"),"," postVars = postvars || this.get(\"postVarsPerFile\");",""," this.queue = new UploaderQueue({"," simUploads: this.get(\"simLimit\"),"," errorAction: this.get(\"errorAction\"),"," fileFieldName: this.get(\"fileFieldName\"),"," fileList: files,"," uploadURL: uploadURL,"," perFileParameters: postVars,"," retryCount: this.get(\"retryCount\"),"," uploadHeaders: this.get(\"uploadHeaders\"),"," withCredentials: this.get(\"withCredentials\")"," });",""," this.queue.on(\"uploadstart\", this._uploadEventHandler, this);"," this.queue.on(\"uploadprogress\", this._uploadEventHandler, this);"," this.queue.on(\"totaluploadprogress\", this._uploadEventHandler, this);"," this.queue.on(\"uploadcomplete\", this._uploadEventHandler, this);"," this.queue.on(\"alluploadscomplete\", this._uploadEventHandler, this);"," this.queue.on(\"uploadcancel\", this._uploadEventHandler, this);"," this.queue.on(\"uploaderror\", this._uploadEventHandler, this);"," this.queue.startUpload();",""," this.fire(\"uploadstart\");"," }"," else if (this.queue._currentState === UploaderQueue.UPLOADING) {"," this.queue.set(\"perFileParameters\", this.get(\"postVarsPerFile\"));"," Y.each(files, function (file) {"," this.queue.addToQueueBottom(file);"," }, this);"," }"," }","}, {",""," /**"," * The template for the hidden file input field container. The file input field will only"," * accept clicks if its visibility is set to hidden (and will not if it's `display` value"," * is set to `none`)"," *"," * @property HTML5FILEFIELD_TEMPLATE"," * @type {String}"," * @static"," */"," HTML5FILEFIELD_TEMPLATE: \"\",",""," /**"," * The template for the \"Select Files\" button."," *"," * @property SELECT_FILES_BUTTON"," * @type {String}"," * @static"," * @default ''"," */"," SELECT_FILES_BUTTON: '',",""," /**"," * The static property reflecting the type of uploader that `Y.Uploader`"," * aliases. The UploaderHTML5 value is `\"html5\"`."," *"," * @property TYPE"," * @type {String}"," * @static"," */"," TYPE: \"html5\",",""," /**"," * The identity of the widget."," *"," * @property NAME"," * @type String"," * @default 'uploader'"," * @readOnly"," * @protected"," * @static"," */"," NAME: \"uploader\",",""," /**"," * Static property used to define the default attribute configuration of"," * the Widget."," *"," * @property ATTRS"," * @type {Object}"," * @protected"," * @static"," */"," ATTRS: {",""," /**"," * A Boolean indicating whether newly selected files should be appended"," * to the existing file list, or whether they should replace it."," *"," * @attribute appendNewFiles"," * @type {Boolean}"," * @default true"," */"," appendNewFiles : {"," value: true"," },",""," /**"," * The names of CSS classes that correspond to different button states"," * of the \"Select Files\" control. These classes are assigned to the"," * \"Select Files\" control based on the configuration of the uploader."," * Currently, the only class name used is that corresponding to the"," * `disabled` state of the uploader. Other button states should be managed"," * directly via CSS selectors."," *
"," *
`disabled`: the class corresponding to the disabled state"," * of the \"Select Files\" button.
"," *
"," * @attribute buttonClassNames"," * @type {Object}"," * @default {"," * disabled: \"yui3-button-disabled\""," * }"," */"," buttonClassNames: {"," value: {"," \"hover\": \"yui3-button-hover\","," \"active\": \"yui3-button-active\","," \"disabled\": \"yui3-button-disabled\","," \"focus\": \"yui3-button-selected\""," }"," },",""," /**"," * The node that serves as the drop target for files."," *"," * @attribute dragAndDropArea"," * @type {Node}"," * @default null"," */"," dragAndDropArea: {"," value: null,"," setter: function (val) {"," return Y.one(val);"," }"," },",""," /**"," * A Boolean indicating whether the uploader is enabled or disabled for user input."," *"," * @attribute enabled"," * @type {Boolean}"," * @default true"," */"," enabled : {"," value: true"," },",""," /**"," * The action performed when an upload error occurs for a specific file being uploaded."," * The possible values are:"," *
"," *
`UploaderQueue.CONTINUE`: the error is ignored and the upload process is continued.
"," *
`UploaderQueue.STOP`: the upload process is stopped as soon as any other parallel file"," * uploads are finished.
"," *
`UploaderQueue.RESTART_ASAP`: the file is added back to the front of the queue.
"," *
`UploaderQueue.RESTART_AFTER`: the file is added to the back of the queue.
"," *
"," * @attribute errorAction"," * @type {String}"," * @default UploaderQueue.CONTINUE"," */"," errorAction: {"," value: \"continue\","," validator: function (val) {"," return ("," val === UploaderQueue.CONTINUE ||"," val === UploaderQueue.STOP ||"," val === UploaderQueue.RESTART_ASAP ||"," val === UploaderQueue.RESTART_AFTER"," );"," }"," },",""," /**"," * An array indicating what fileFilters should be applied to the file"," * selection dialog. Each element in the array should be a string"," * indicating the Media (MIME) type for the files that should be supported"," * for selection. The Media type strings should be properly formatted"," * or this parameter will be ignored. Examples of valid strings include:"," * \"audio/*\", \"video/*\", \"application/pdf\", etc. More information"," * on valid Media type strings is available here:"," * http://www.iana.org/assignments/media-types/index.html"," * @attribute fileFilters"," * @type {Array}"," * @default []"," */"," fileFilters: {"," value: []"," },",""," /**"," * A filtering function that is applied to every file selected by the user."," * The function receives the `Y.File` object and must return a Boolean value."," * If a `false` value is returned, the file in question is not added to the"," * list of files to be uploaded."," * Use this function to put limits on file sizes or check the file names for"," * correct extension, but make sure that a server-side check is also performed,"," * since any client-side restrictions are only advisory and can be circumvented."," *"," * @attribute fileFilterFunction"," * @type {Function}"," * @default null"," */"," fileFilterFunction: {"," value: null"," },",""," /**"," * A String specifying what should be the POST field name for the file"," * content in the upload request."," *"," * @attribute fileFieldName"," * @type {String}"," * @default Filedata"," */"," fileFieldName: {"," value: \"Filedata\""," },",""," /**"," * The array of files to be uploaded. All elements in the array"," * must be instances of `Y.File` and be instantiated with an instance"," * of native JavaScript File() class."," *"," * @attribute fileList"," * @type {Array}"," * @default []"," */"," fileList: {"," value: [],"," getter: \"_getFileList\","," setter: \"_setFileList\""," },",""," /**"," * A Boolean indicating whether multiple file selection is enabled."," *"," * @attribute multipleFiles"," * @type {Boolean}"," * @default false"," */"," multipleFiles: {"," value: false"," },",""," /**"," * An object, keyed by `fileId`, containing sets of key-value pairs"," * that should be passed as POST variables along with each corresponding"," * file. This attribute is only used if no POST variables are specifed"," * in the upload method call."," *"," * @attribute postVarsPerFile"," * @type {Object}"," * @default {}"," */"," postVarsPerFile: {"," value: {}"," },",""," /**"," * The label for the \"Select Files\" widget. This is the value that replaces the"," * `{selectButtonLabel}` token in the `SELECT_FILES_BUTTON` template."," *"," * @attribute selectButtonLabel"," * @type {String}"," * @default \"Select Files\""," */"," selectButtonLabel: {"," value: \"Select Files\""," },",""," /**"," * The widget that serves as the \"Select Files control for the file uploader"," *"," *"," * @attribute selectFilesButton"," * @type {Node | Widget}"," * @default A standard HTML button with YUI CSS Button skin."," */"," selectFilesButton : {"," valueFn: function () {"," return Y.Node.create(substitute(Y.UploaderHTML5.SELECT_FILES_BUTTON, {"," selectButtonLabel: this.get(\"selectButtonLabel\"),"," tabIndex: this.get(\"tabIndex\")"," }));"," }"," },",""," /**"," * The number of files that can be uploaded"," * simultaneously if the automatic queue management"," * is used. This value can be in the range between 2"," * and 5."," *"," * @attribute simLimit"," * @type {Number}"," * @default 2"," */"," simLimit: {"," value: 2,"," validator: function (val) {"," return (val >= 1 && val <= 5);"," }"," },",""," /**"," * The URL to which file upload requested are POSTed. Only used if a different url is not passed to the upload method call."," *"," * @attribute uploadURL"," * @type {String}"," * @default \"\""," */"," uploadURL: {"," value: \"\""," },",""," /**"," * Additional HTTP headers that should be included"," * in the upload request."," *"," *"," * @attribute uploadHeaders"," * @type {Object}"," * @default {}"," */"," uploadHeaders: {"," value: {}"," },",""," /**"," * A Boolean that specifies whether the file should be"," * uploaded with the appropriate user credentials for the"," * domain."," *"," * @attribute withCredentials"," * @type {Boolean}"," * @default true"," */"," withCredentials: {"," value: true"," },",""," /**"," * The number of times to try re-uploading a file that failed to upload before"," * cancelling its upload."," *"," * @attribute retryCount"," * @type {Number}"," * @default 3"," */"," retryCount: {"," value: 3"," }"," }","});","","Y.UploaderHTML5.Queue = UploaderQueue;","","","","}, '@VERSION@', {\"requires\": [\"widget\", \"node-event-simulate\", \"file-html5\", \"uploader-queue\"]});","","}());"]};
}
var __cov_zwf1_QVq8mCq9AZuBcyV_g = __coverage__['build/uploader-html5/uploader-html5.js'];
__cov_zwf1_QVq8mCq9AZuBcyV_g.s['1']++;YUI.add('uploader-html5',function(Y,NAME){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['1']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['2']++;var substitute=Y.Lang.sub,UploaderQueue=Y.Uploader.Queue;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['3']++;function UploaderHTML5(){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['2']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['4']++;UploaderHTML5.superclass.constructor.apply(this,arguments);}__cov_zwf1_QVq8mCq9AZuBcyV_g.s['5']++;Y.UploaderHTML5=Y.extend(UploaderHTML5,Y.Widget,{_fileInputField:null,_buttonBinding:null,queue:null,initializer:function(){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['3']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['6']++;this._fileInputField=null;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['7']++;this.queue=null;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['8']++;this._buttonBinding=null;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['9']++;this._fileList=[];__cov_zwf1_QVq8mCq9AZuBcyV_g.s['10']++;this.publish('fileselect');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['11']++;this.publish('uploadstart');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['12']++;this.publish('fileuploadstart');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['13']++;this.publish('uploadprogress');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['14']++;this.publish('totaluploadprogress');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['15']++;this.publish('uploadcomplete');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['16']++;this.publish('alluploadscomplete');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['17']++;this.publish('uploaderror');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['18']++;this.publish('dragenter');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['19']++;this.publish('dragover');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['20']++;this.publish('dragleave');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['21']++;this.publish('drop');},renderUI:function(){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['4']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['22']++;var contentBox=this.get('contentBox'),selButton=this.get('selectFilesButton');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['23']++;selButton.setStyles({width:'100%',height:'100%'});__cov_zwf1_QVq8mCq9AZuBcyV_g.s['24']++;contentBox.append(selButton);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['25']++;this._fileInputField=Y.Node.create(UploaderHTML5.HTML5FILEFIELD_TEMPLATE);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['26']++;contentBox.append(this._fileInputField);},bindUI:function(){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['5']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['27']++;this._bindSelectButton();__cov_zwf1_QVq8mCq9AZuBcyV_g.s['28']++;this._setMultipleFiles();__cov_zwf1_QVq8mCq9AZuBcyV_g.s['29']++;this._setFileFilters();__cov_zwf1_QVq8mCq9AZuBcyV_g.s['30']++;this._bindDropArea();__cov_zwf1_QVq8mCq9AZuBcyV_g.s['31']++;this._triggerEnabled();__cov_zwf1_QVq8mCq9AZuBcyV_g.s['32']++;this.after('multipleFilesChange',this._setMultipleFiles,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['33']++;this.after('fileFiltersChange',this._setFileFilters,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['34']++;this.after('enabledChange',this._triggerEnabled,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['35']++;this.after('selectFilesButtonChange',this._bindSelectButton,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['36']++;this.after('dragAndDropAreaChange',this._bindDropArea,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['37']++;this.after('tabIndexChange',function(){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['6']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['38']++;this.get('selectFilesButton').set('tabIndex',this.get('tabIndex'));},this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['39']++;this._fileInputField.on('change',this._updateFileList,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['40']++;this._fileInputField.on('click',function(event){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['7']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['41']++;event.stopPropagation();},this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['42']++;this.get('selectFilesButton').set('tabIndex',this.get('tabIndex'));},_rebindFileField:function(){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['8']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['43']++;this._fileInputField.remove(true);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['44']++;this._fileInputField=Y.Node.create(UploaderHTML5.HTML5FILEFIELD_TEMPLATE);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['45']++;this.get('contentBox').append(this._fileInputField);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['46']++;this._fileInputField.on('change',this._updateFileList,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['47']++;this._setMultipleFiles();__cov_zwf1_QVq8mCq9AZuBcyV_g.s['48']++;this._setFileFilters();},_bindDropArea:function(event){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['9']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['49']++;var ev=(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['1'][0]++,event)||(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['1'][1]++,{prevVal:null}),ddArea=this.get('dragAndDropArea');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['50']++;if(ev.prevVal!==null){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['2'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['51']++;ev.prevVal.detach('drop',this._ddEventHandler);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['52']++;ev.prevVal.detach('dragenter',this._ddEventHandler);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['53']++;ev.prevVal.detach('dragover',this._ddEventHandler);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['54']++;ev.prevVal.detach('dragleave',this._ddEventHandler);}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['2'][1]++;}__cov_zwf1_QVq8mCq9AZuBcyV_g.s['55']++;if(ddArea!==null){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['3'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['56']++;ddArea.on('drop',this._ddEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['57']++;ddArea.on('dragenter',this._ddEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['58']++;ddArea.on('dragover',this._ddEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['59']++;ddArea.on('dragleave',this._ddEventHandler,this);}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['3'][1]++;}},_bindSelectButton:function(){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['10']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['60']++;this._buttonBinding=this.get('selectFilesButton').on('click',this.openFileSelectDialog,this);},_ddEventHandler:function(event){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['11']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['61']++;event.stopPropagation();__cov_zwf1_QVq8mCq9AZuBcyV_g.s['62']++;event.preventDefault();__cov_zwf1_QVq8mCq9AZuBcyV_g.s['63']++;if(Y.Array.indexOf(event._event.dataTransfer.types,'Files')>-1){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['4'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['64']++;switch(event.type){case'dragenter':__cov_zwf1_QVq8mCq9AZuBcyV_g.b['5'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['65']++;this.fire('dragenter');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['66']++;break;case'dragover':__cov_zwf1_QVq8mCq9AZuBcyV_g.b['5'][1]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['67']++;this.fire('dragover');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['68']++;break;case'dragleave':__cov_zwf1_QVq8mCq9AZuBcyV_g.b['5'][2]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['69']++;this.fire('dragleave');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['70']++;break;case'drop':__cov_zwf1_QVq8mCq9AZuBcyV_g.b['5'][3]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['71']++;var newfiles=event._event.dataTransfer.files,parsedFiles=[],filterFunc=this.get('fileFilterFunction'),oldfiles;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['72']++;if(filterFunc){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['6'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['73']++;Y.each(newfiles,function(value){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['12']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['74']++;var newfile=new Y.FileHTML5(value);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['75']++;if(filterFunc(newfile)){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['7'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['76']++;parsedFiles.push(newfile);}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['7'][1]++;}});}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['6'][1]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['77']++;Y.each(newfiles,function(value){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['13']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['78']++;parsedFiles.push(new Y.FileHTML5(value));});}__cov_zwf1_QVq8mCq9AZuBcyV_g.s['79']++;if(parsedFiles.length>0){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['8'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['80']++;oldfiles=this.get('fileList');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['81']++;this.set('fileList',this.get('appendNewFiles')?(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['9'][0]++,oldfiles.concat(parsedFiles)):(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['9'][1]++,parsedFiles));__cov_zwf1_QVq8mCq9AZuBcyV_g.s['82']++;this.fire('fileselect',{fileList:parsedFiles});}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['8'][1]++;}__cov_zwf1_QVq8mCq9AZuBcyV_g.s['83']++;this.fire('drop',{fileList:parsedFiles});__cov_zwf1_QVq8mCq9AZuBcyV_g.s['84']++;break;}}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['4'][1]++;}},_setButtonClass:function(state,add){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['14']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['85']++;if(add){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['10'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['86']++;this.get('selectFilesButton').addClass(this.get('buttonClassNames')[state]);}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['10'][1]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['87']++;this.get('selectFilesButton').removeClass(this.get('buttonClassNames')[state]);}},_setMultipleFiles:function(){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['15']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['88']++;if(this.get('multipleFiles')===true){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['11'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['89']++;this._fileInputField.set('multiple','multiple');}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['11'][1]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['90']++;this._fileInputField.set('multiple','');}},_setFileFilters:function(){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['16']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['91']++;if(this.get('fileFilters').length>0){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['12'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['92']++;this._fileInputField.set('accept',this.get('fileFilters').join(','));}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['12'][1]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['93']++;this._fileInputField.set('accept','');}},_triggerEnabled:function(){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['17']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['94']++;if((__cov_zwf1_QVq8mCq9AZuBcyV_g.b['14'][0]++,this.get('enabled'))&&(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['14'][1]++,this._buttonBinding===null)){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['13'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['95']++;this._bindSelectButton();__cov_zwf1_QVq8mCq9AZuBcyV_g.s['96']++;this._setButtonClass('disabled',false);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['97']++;this.get('selectFilesButton').setAttribute('aria-disabled','false');}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['13'][1]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['98']++;if((__cov_zwf1_QVq8mCq9AZuBcyV_g.b['16'][0]++,!this.get('enabled'))&&(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['16'][1]++,this._buttonBinding)){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['15'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['99']++;this._buttonBinding.detach();__cov_zwf1_QVq8mCq9AZuBcyV_g.s['100']++;this._buttonBinding=null;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['101']++;this._setButtonClass('disabled',true);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['102']++;this.get('selectFilesButton').setAttribute('aria-disabled','true');}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['15'][1]++;}}},_getFileList:function(){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['18']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['103']++;return this._fileList.concat();},_setFileList:function(val){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['19']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['104']++;this._fileList=val.concat();__cov_zwf1_QVq8mCq9AZuBcyV_g.s['105']++;return this._fileList.concat();},_updateFileList:function(ev){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['20']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['106']++;var newfiles=ev.target.getDOMNode().files,parsedFiles=[],filterFunc=this.get('fileFilterFunction'),oldfiles;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['107']++;if(filterFunc){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['17'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['108']++;Y.each(newfiles,function(value){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['21']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['109']++;var newfile=new Y.FileHTML5(value);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['110']++;if(filterFunc(newfile)){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['18'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['111']++;parsedFiles.push(newfile);}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['18'][1]++;}});}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['17'][1]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['112']++;Y.each(newfiles,function(value){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['22']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['113']++;parsedFiles.push(new Y.FileHTML5(value));});}__cov_zwf1_QVq8mCq9AZuBcyV_g.s['114']++;if(parsedFiles.length>0){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['19'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['115']++;oldfiles=this.get('fileList');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['116']++;this.set('fileList',this.get('appendNewFiles')?(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['20'][0]++,oldfiles.concat(parsedFiles)):(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['20'][1]++,parsedFiles));__cov_zwf1_QVq8mCq9AZuBcyV_g.s['117']++;this.fire('fileselect',{fileList:parsedFiles});}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['19'][1]++;}__cov_zwf1_QVq8mCq9AZuBcyV_g.s['118']++;this._rebindFileField();},_uploadEventHandler:function(event){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['23']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['119']++;switch(event.type){case'file:uploadstart':__cov_zwf1_QVq8mCq9AZuBcyV_g.b['21'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['120']++;this.fire('fileuploadstart',event);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['121']++;break;case'file:uploadprogress':__cov_zwf1_QVq8mCq9AZuBcyV_g.b['21'][1]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['122']++;this.fire('uploadprogress',event);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['123']++;break;case'uploaderqueue:totaluploadprogress':__cov_zwf1_QVq8mCq9AZuBcyV_g.b['21'][2]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['124']++;this.fire('totaluploadprogress',event);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['125']++;break;case'file:uploadcomplete':__cov_zwf1_QVq8mCq9AZuBcyV_g.b['21'][3]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['126']++;this.fire('uploadcomplete',event);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['127']++;break;case'uploaderqueue:alluploadscomplete':__cov_zwf1_QVq8mCq9AZuBcyV_g.b['21'][4]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['128']++;this.queue=null;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['129']++;this.fire('alluploadscomplete',event);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['130']++;break;case'file:uploaderror':__cov_zwf1_QVq8mCq9AZuBcyV_g.b['21'][5]++;case'uploaderqueue:uploaderror':__cov_zwf1_QVq8mCq9AZuBcyV_g.b['21'][6]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['131']++;this.fire('uploaderror',event);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['132']++;break;case'file:uploadcancel':__cov_zwf1_QVq8mCq9AZuBcyV_g.b['21'][7]++;case'uploaderqueue:uploadcancel':__cov_zwf1_QVq8mCq9AZuBcyV_g.b['21'][8]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['133']++;this.fire('uploadcancel',event);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['134']++;break;}},openFileSelectDialog:function(){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['24']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['135']++;var fileDomNode=this._fileInputField.getDOMNode();__cov_zwf1_QVq8mCq9AZuBcyV_g.s['136']++;if(fileDomNode.click){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['22'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['137']++;fileDomNode.click();}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['22'][1]++;}},upload:function(file,url,postvars){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['25']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['138']++;var uploadURL=(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['23'][0]++,url)||(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['23'][1]++,this.get('uploadURL')),postVars=(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['24'][0]++,postvars)||(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['24'][1]++,this.get('postVarsPerFile')),fileId=file.get('id');__cov_zwf1_QVq8mCq9AZuBcyV_g.s['139']++;postVars=postVars.hasOwnProperty(fileId)?(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['25'][0]++,postVars[fileId]):(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['25'][1]++,postVars);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['140']++;if(file instanceof Y.FileHTML5){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['26'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['141']++;file.on('uploadstart',this._uploadEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['142']++;file.on('uploadprogress',this._uploadEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['143']++;file.on('uploadcomplete',this._uploadEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['144']++;file.on('uploaderror',this._uploadEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['145']++;file.on('uploadcancel',this._uploadEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['146']++;file.startUpload(uploadURL,postVars,this.get('fileFieldName'));}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['26'][1]++;}},uploadAll:function(url,postvars){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['26']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['147']++;this.uploadThese(this.get('fileList'),url,postvars);},uploadThese:function(files,url,postvars){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['27']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['148']++;if(!this.queue){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['27'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['149']++;var uploadURL=(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['28'][0]++,url)||(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['28'][1]++,this.get('uploadURL')),postVars=(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['29'][0]++,postvars)||(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['29'][1]++,this.get('postVarsPerFile'));__cov_zwf1_QVq8mCq9AZuBcyV_g.s['150']++;this.queue=new UploaderQueue({simUploads:this.get('simLimit'),errorAction:this.get('errorAction'),fileFieldName:this.get('fileFieldName'),fileList:files,uploadURL:uploadURL,perFileParameters:postVars,retryCount:this.get('retryCount'),uploadHeaders:this.get('uploadHeaders'),withCredentials:this.get('withCredentials')});__cov_zwf1_QVq8mCq9AZuBcyV_g.s['151']++;this.queue.on('uploadstart',this._uploadEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['152']++;this.queue.on('uploadprogress',this._uploadEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['153']++;this.queue.on('totaluploadprogress',this._uploadEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['154']++;this.queue.on('uploadcomplete',this._uploadEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['155']++;this.queue.on('alluploadscomplete',this._uploadEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['156']++;this.queue.on('uploadcancel',this._uploadEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['157']++;this.queue.on('uploaderror',this._uploadEventHandler,this);__cov_zwf1_QVq8mCq9AZuBcyV_g.s['158']++;this.queue.startUpload();__cov_zwf1_QVq8mCq9AZuBcyV_g.s['159']++;this.fire('uploadstart');}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['27'][1]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['160']++;if(this.queue._currentState===UploaderQueue.UPLOADING){__cov_zwf1_QVq8mCq9AZuBcyV_g.b['30'][0]++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['161']++;this.queue.set('perFileParameters',this.get('postVarsPerFile'));__cov_zwf1_QVq8mCq9AZuBcyV_g.s['162']++;Y.each(files,function(file){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['28']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['163']++;this.queue.addToQueueBottom(file);},this);}else{__cov_zwf1_QVq8mCq9AZuBcyV_g.b['30'][1]++;}}}},{HTML5FILEFIELD_TEMPLATE:'',SELECT_FILES_BUTTON:'',TYPE:'html5',NAME:'uploader',ATTRS:{appendNewFiles:{value:true},buttonClassNames:{value:{'hover':'yui3-button-hover','active':'yui3-button-active','disabled':'yui3-button-disabled','focus':'yui3-button-selected'}},dragAndDropArea:{value:null,setter:function(val){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['29']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['164']++;return Y.one(val);}},enabled:{value:true},errorAction:{value:'continue',validator:function(val){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['30']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['165']++;return(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['31'][0]++,val===UploaderQueue.CONTINUE)||(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['31'][1]++,val===UploaderQueue.STOP)||(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['31'][2]++,val===UploaderQueue.RESTART_ASAP)||(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['31'][3]++,val===UploaderQueue.RESTART_AFTER);}},fileFilters:{value:[]},fileFilterFunction:{value:null},fileFieldName:{value:'Filedata'},fileList:{value:[],getter:'_getFileList',setter:'_setFileList'},multipleFiles:{value:false},postVarsPerFile:{value:{}},selectButtonLabel:{value:'Select Files'},selectFilesButton:{valueFn:function(){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['31']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['166']++;return Y.Node.create(substitute(Y.UploaderHTML5.SELECT_FILES_BUTTON,{selectButtonLabel:this.get('selectButtonLabel'),tabIndex:this.get('tabIndex')}));}},simLimit:{value:2,validator:function(val){__cov_zwf1_QVq8mCq9AZuBcyV_g.f['32']++;__cov_zwf1_QVq8mCq9AZuBcyV_g.s['167']++;return(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['32'][0]++,val>=1)&&(__cov_zwf1_QVq8mCq9AZuBcyV_g.b['32'][1]++,val<=5);}},uploadURL:{value:''},uploadHeaders:{value:{}},withCredentials:{value:true},retryCount:{value:3}}});__cov_zwf1_QVq8mCq9AZuBcyV_g.s['168']++;Y.UploaderHTML5.Queue=UploaderQueue;},'@VERSION@',{'requires':['widget','node-event-simulate','file-html5','uploader-queue']});