diff --git a/lib/yuilib/3.13.0/widget-modality/widget-modality-coverage.js b/lib/yuilib/3.13.0/widget-modality/widget-modality-coverage.js index 1db71685051be..52eb29ceb98e3 100644 --- a/lib/yuilib/3.13.0/widget-modality/widget-modality-coverage.js +++ b/lib/yuilib/3.13.0/widget-modality/widget-modality-coverage.js @@ -7,7 +7,7 @@ http://yuilibrary.com/license/ if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } if (!__coverage__['build/widget-modality/widget-modality.js']) { - __coverage__['build/widget-modality/widget-modality.js'] = {"path":"build/widget-modality/widget-modality.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},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0,0,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,0],"23":[0,0],"24":[0,0,0],"25":[0,0],"26":[0,0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0,0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[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},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":27},"end":{"line":1,"column":46}}},"2":{"name":"(anonymous_2)","line":25,"loc":{"start":{"line":25,"column":24},"end":{"line":25,"column":34}}},"3":{"name":"WidgetModal","line":57,"loc":{"start":{"line":57,"column":4},"end":{"line":57,"column":33}}},"4":{"name":"(anonymous_4)","line":110,"loc":{"start":{"line":110,"column":25},"end":{"line":110,"column":36}}},"5":{"name":"(anonymous_5)","line":141,"loc":{"start":{"line":141,"column":28},"end":{"line":141,"column":39}}},"6":{"name":"(anonymous_6)","line":184,"loc":{"start":{"line":184,"column":21},"end":{"line":184,"column":33}}},"7":{"name":"(anonymous_7)","line":190,"loc":{"start":{"line":190,"column":20},"end":{"line":190,"column":32}}},"8":{"name":"(anonymous_8)","line":209,"loc":{"start":{"line":209,"column":25},"end":{"line":209,"column":37}}},"9":{"name":"(anonymous_9)","line":234,"loc":{"start":{"line":234,"column":23},"end":{"line":234,"column":35}}},"10":{"name":"(anonymous_10)","line":262,"loc":{"start":{"line":262,"column":23},"end":{"line":262,"column":35}}},"11":{"name":"(anonymous_11)","line":275,"loc":{"start":{"line":275,"column":17},"end":{"line":275,"column":30}}},"12":{"name":"(anonymous_12)","line":288,"loc":{"start":{"line":288,"column":16},"end":{"line":288,"column":28}}},"13":{"name":"(anonymous_13)","line":299,"loc":{"start":{"line":299,"column":23},"end":{"line":299,"column":35}}},"14":{"name":"(anonymous_14)","line":310,"loc":{"start":{"line":310,"column":33},"end":{"line":310,"column":52}}},"15":{"name":"(anonymous_15)","line":318,"loc":{"start":{"line":318,"column":36},"end":{"line":318,"column":51}}},"16":{"name":"(anonymous_16)","line":376,"loc":{"start":{"line":376,"column":32},"end":{"line":376,"column":50}}},"17":{"name":"(anonymous_17)","line":391,"loc":{"start":{"line":391,"column":32},"end":{"line":391,"column":44}}},"18":{"name":"(anonymous_18)","line":435,"loc":{"start":{"line":435,"column":64},"end":{"line":435,"column":75}}},"19":{"name":"(anonymous_19)","line":448,"loc":{"start":{"line":448,"column":32},"end":{"line":448,"column":44}}},"20":{"name":"(anonymous_20)","line":449,"loc":{"start":{"line":449,"column":41},"end":{"line":449,"column":52}}},"21":{"name":"(anonymous_21)","line":461,"loc":{"start":{"line":461,"column":39},"end":{"line":461,"column":52}}},"22":{"name":"(anonymous_22)","line":472,"loc":{"start":{"line":472,"column":38},"end":{"line":472,"column":51}}},"23":{"name":"(anonymous_23)","line":484,"loc":{"start":{"line":484,"column":18},"end":{"line":484,"column":29}}},"24":{"name":"(anonymous_24)","line":496,"loc":{"start":{"line":496,"column":25},"end":{"line":496,"column":44}}},"25":{"name":"(anonymous_25)","line":531,"loc":{"start":{"line":531,"column":21},"end":{"line":531,"column":34}}},"26":{"name":"(anonymous_26)","line":552,"loc":{"start":{"line":552,"column":30},"end":{"line":552,"column":42}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":565,"column":89}},"2":{"start":{"line":9,"column":0},"end":{"line":48,"column":9}},"3":{"start":{"line":29,"column":8},"end":{"line":31,"column":21}},"4":{"start":{"line":33,"column":8},"end":{"line":45,"column":9}},"5":{"start":{"line":34,"column":12},"end":{"line":34,"column":42}},"6":{"start":{"line":35,"column":12},"end":{"line":44,"column":13}},"7":{"start":{"line":36,"column":16},"end":{"line":36,"column":44}},"8":{"start":{"line":37,"column":16},"end":{"line":37,"column":38}},"9":{"start":{"line":38,"column":16},"end":{"line":38,"column":32}},"10":{"start":{"line":39,"column":16},"end":{"line":43,"column":17}},"11":{"start":{"line":40,"column":20},"end":{"line":40,"column":41}},"12":{"start":{"line":41,"column":20},"end":{"line":41,"column":56}},"13":{"start":{"line":42,"column":20},"end":{"line":42,"column":41}},"14":{"start":{"line":47,"column":8},"end":{"line":47,"column":27}},"15":{"start":{"line":57,"column":4},"end":{"line":57,"column":35}},"16":{"start":{"line":59,"column":4},"end":{"line":64,"column":10}},"17":{"start":{"line":74,"column":4},"end":{"line":126,"column":6}},"18":{"start":{"line":111,"column":20},"end":{"line":120,"column":22}},"19":{"start":{"line":129,"column":4},"end":{"line":129,"column":40}},"20":{"start":{"line":141,"column":4},"end":{"line":173,"column":6}},"21":{"start":{"line":143,"column":8},"end":{"line":144,"column":32}},"22":{"start":{"line":146,"column":8},"end":{"line":148,"column":9}},"23":{"start":{"line":147,"column":12},"end":{"line":147,"column":24}},"24":{"start":{"line":150,"column":8},"end":{"line":150,"column":73}},"25":{"start":{"line":152,"column":8},"end":{"line":170,"column":9}},"26":{"start":{"line":153,"column":12},"end":{"line":160,"column":15}},"27":{"start":{"line":162,"column":12},"end":{"line":169,"column":15}},"28":{"start":{"line":172,"column":8},"end":{"line":172,"column":20}},"29":{"start":{"line":179,"column":4},"end":{"line":179,"column":27}},"30":{"start":{"line":182,"column":4},"end":{"line":559,"column":6}},"31":{"start":{"line":185,"column":12},"end":{"line":185,"column":58}},"32":{"start":{"line":186,"column":12},"end":{"line":186,"column":54}},"33":{"start":{"line":187,"column":12},"end":{"line":187,"column":54}},"34":{"start":{"line":192,"column":12},"end":{"line":192,"column":47}},"35":{"start":{"line":211,"column":12},"end":{"line":211,"column":44}},"36":{"start":{"line":219,"column":12},"end":{"line":219,"column":39}},"37":{"start":{"line":220,"column":12},"end":{"line":220,"column":45}},"38":{"start":{"line":236,"column":12},"end":{"line":236,"column":74}},"39":{"start":{"line":237,"column":12},"end":{"line":237,"column":73}},"40":{"start":{"line":238,"column":12},"end":{"line":238,"column":66}},"41":{"start":{"line":245,"column":12},"end":{"line":250,"column":13}},"42":{"start":{"line":249,"column":16},"end":{"line":249,"column":66}},"43":{"start":{"line":266,"column":12},"end":{"line":266,"column":59}},"44":{"start":{"line":277,"column":12},"end":{"line":278,"column":39}},"45":{"start":{"line":280,"column":12},"end":{"line":280,"column":55}},"46":{"start":{"line":281,"column":12},"end":{"line":281,"column":25}},"47":{"start":{"line":290,"column":12},"end":{"line":290,"column":24}},"48":{"start":{"line":301,"column":12},"end":{"line":301,"column":43}},"49":{"start":{"line":311,"column":12},"end":{"line":314,"column":32}},"50":{"start":{"line":316,"column":12},"end":{"line":367,"column":13}},"51":{"start":{"line":318,"column":16},"end":{"line":321,"column":19}},"52":{"start":{"line":319,"column":20},"end":{"line":319,"column":50}},"53":{"start":{"line":320,"column":20},"end":{"line":320,"column":34}},"54":{"start":{"line":324,"column":16},"end":{"line":324,"column":36}},"55":{"start":{"line":326,"column":16},"end":{"line":326,"column":43}},"56":{"start":{"line":327,"column":16},"end":{"line":327,"column":62}},"57":{"start":{"line":329,"column":16},"end":{"line":333,"column":17}},"58":{"start":{"line":330,"column":20},"end":{"line":330,"column":36}},"59":{"start":{"line":331,"column":20},"end":{"line":331,"column":62}},"60":{"start":{"line":332,"column":20},"end":{"line":332,"column":34}},"61":{"start":{"line":338,"column":16},"end":{"line":338,"column":53}},"62":{"start":{"line":339,"column":16},"end":{"line":342,"column":17}},"63":{"start":{"line":341,"column":20},"end":{"line":341,"column":43}},"64":{"start":{"line":344,"column":16},"end":{"line":344,"column":45}},"65":{"start":{"line":345,"column":16},"end":{"line":345,"column":29}},"66":{"start":{"line":347,"column":16},"end":{"line":365,"column":17}},"67":{"start":{"line":348,"column":20},"end":{"line":348,"column":40}},"68":{"start":{"line":349,"column":20},"end":{"line":349,"column":51}},"69":{"start":{"line":351,"column":20},"end":{"line":351,"column":74}},"70":{"start":{"line":353,"column":20},"end":{"line":357,"column":21}},"71":{"start":{"line":355,"column":24},"end":{"line":355,"column":70}},"72":{"start":{"line":356,"column":24},"end":{"line":356,"column":42}},"73":{"start":{"line":361,"column":20},"end":{"line":363,"column":21}},"74":{"start":{"line":362,"column":24},"end":{"line":362,"column":40}},"75":{"start":{"line":378,"column":12},"end":{"line":380,"column":13}},"76":{"start":{"line":379,"column":16},"end":{"line":379,"column":68}},"77":{"start":{"line":393,"column":12},"end":{"line":397,"column":13}},"78":{"start":{"line":396,"column":16},"end":{"line":396,"column":23}},"79":{"start":{"line":399,"column":12},"end":{"line":404,"column":26}},"80":{"start":{"line":406,"column":12},"end":{"line":432,"column":13}},"81":{"start":{"line":408,"column":16},"end":{"line":408,"column":23}},"82":{"start":{"line":409,"column":16},"end":{"line":409,"column":41}},"83":{"start":{"line":410,"column":16},"end":{"line":410,"column":44}},"84":{"start":{"line":411,"column":16},"end":{"line":411,"column":47}},"85":{"start":{"line":414,"column":16},"end":{"line":430,"column":17}},"86":{"start":{"line":415,"column":20},"end":{"line":415,"column":55}},"87":{"start":{"line":419,"column":21},"end":{"line":430,"column":17}},"88":{"start":{"line":420,"column":20},"end":{"line":420,"column":59}},"89":{"start":{"line":424,"column":21},"end":{"line":430,"column":17}},"90":{"start":{"line":425,"column":20},"end":{"line":425,"column":70}},"91":{"start":{"line":429,"column":20},"end":{"line":429,"column":103}},"92":{"start":{"line":434,"column":12},"end":{"line":438,"column":13}},"93":{"start":{"line":435,"column":16},"end":{"line":437,"column":27}},"94":{"start":{"line":436,"column":20},"end":{"line":436,"column":73}},"95":{"start":{"line":440,"column":12},"end":{"line":440,"column":45}},"96":{"start":{"line":449,"column":12},"end":{"line":451,"column":15}},"97":{"start":{"line":450,"column":16},"end":{"line":450,"column":27}},"98":{"start":{"line":452,"column":12},"end":{"line":452,"column":40}},"99":{"start":{"line":463,"column":12},"end":{"line":463,"column":50}},"100":{"start":{"line":474,"column":12},"end":{"line":474,"column":49}},"101":{"start":{"line":485,"column":12},"end":{"line":486,"column":49}},"102":{"start":{"line":487,"column":12},"end":{"line":487,"column":26}},"103":{"start":{"line":498,"column":12},"end":{"line":501,"column":29}},"104":{"start":{"line":504,"column":12},"end":{"line":520,"column":13}},"105":{"start":{"line":506,"column":16},"end":{"line":506,"column":34}},"106":{"start":{"line":507,"column":16},"end":{"line":507,"column":36}},"107":{"start":{"line":511,"column":17},"end":{"line":520,"column":13}},"108":{"start":{"line":514,"column":16},"end":{"line":514,"column":34}},"109":{"start":{"line":515,"column":16},"end":{"line":515,"column":36}},"110":{"start":{"line":516,"column":16},"end":{"line":516,"column":48}},"111":{"start":{"line":517,"column":16},"end":{"line":517,"column":65}},"112":{"start":{"line":518,"column":16},"end":{"line":518,"column":70}},"113":{"start":{"line":519,"column":16},"end":{"line":519,"column":36}},"114":{"start":{"line":532,"column":12},"end":{"line":537,"column":47}},"115":{"start":{"line":539,"column":12},"end":{"line":544,"column":15}},"116":{"start":{"line":553,"column":12},"end":{"line":553,"column":41}},"117":{"start":{"line":555,"column":12},"end":{"line":557,"column":13}},"118":{"start":{"line":556,"column":16},"end":{"line":556,"column":45}},"119":{"start":{"line":561,"column":4},"end":{"line":561,"column":35}}},"branchMap":{"1":{"line":33,"type":"if","locations":[{"start":{"line":33,"column":8},"end":{"line":33,"column":8}},{"start":{"line":33,"column":8},"end":{"line":33,"column":8}}]},"2":{"line":35,"type":"if","locations":[{"start":{"line":35,"column":12},"end":{"line":35,"column":12}},{"start":{"line":35,"column":12},"end":{"line":35,"column":12}}]},"3":{"line":35,"type":"binary-expr","locations":[{"start":{"line":35,"column":16},"end":{"line":35,"column":18}},{"start":{"line":35,"column":22},"end":{"line":35,"column":30}}]},"4":{"line":39,"type":"if","locations":[{"start":{"line":39,"column":16},"end":{"line":39,"column":16}},{"start":{"line":39,"column":16},"end":{"line":39,"column":16}}]},"5":{"line":39,"type":"binary-expr","locations":[{"start":{"line":39,"column":20},"end":{"line":39,"column":24}},{"start":{"line":39,"column":28},"end":{"line":39,"column":44}},{"start":{"line":39,"column":48},"end":{"line":39,"column":64}}]},"6":{"line":146,"type":"if","locations":[{"start":{"line":146,"column":8},"end":{"line":146,"column":8}},{"start":{"line":146,"column":8},"end":{"line":146,"column":8}}]},"7":{"line":152,"type":"if","locations":[{"start":{"line":152,"column":8},"end":{"line":152,"column":8}},{"start":{"line":152,"column":8},"end":{"line":152,"column":8}}]},"8":{"line":245,"type":"if","locations":[{"start":{"line":245,"column":12},"end":{"line":245,"column":12}},{"start":{"line":245,"column":12},"end":{"line":245,"column":12}}]},"9":{"line":245,"type":"binary-expr","locations":[{"start":{"line":245,"column":16},"end":{"line":245,"column":33}},{"start":{"line":246,"column":21},"end":{"line":246,"column":29}},{"start":{"line":246,"column":33},"end":{"line":246,"column":45}},{"start":{"line":247,"column":21},"end":{"line":247,"column":33}},{"start":{"line":247,"column":37},"end":{"line":247,"column":53}}]},"10":{"line":280,"type":"cond-expr","locations":[{"start":{"line":280,"column":44},"end":{"line":280,"column":49}},{"start":{"line":280,"column":52},"end":{"line":280,"column":53}}]},"11":{"line":316,"type":"if","locations":[{"start":{"line":316,"column":12},"end":{"line":316,"column":12}},{"start":{"line":316,"column":12},"end":{"line":316,"column":12}}]},"12":{"line":329,"type":"if","locations":[{"start":{"line":329,"column":16},"end":{"line":329,"column":16}},{"start":{"line":329,"column":16},"end":{"line":329,"column":16}}]},"13":{"line":339,"type":"if","locations":[{"start":{"line":339,"column":16},"end":{"line":339,"column":16}},{"start":{"line":339,"column":16},"end":{"line":339,"column":16}}]},"14":{"line":347,"type":"if","locations":[{"start":{"line":347,"column":16},"end":{"line":347,"column":16}},{"start":{"line":347,"column":16},"end":{"line":347,"column":16}}]},"15":{"line":353,"type":"if","locations":[{"start":{"line":353,"column":20},"end":{"line":353,"column":20}},{"start":{"line":353,"column":20},"end":{"line":353,"column":20}}]},"16":{"line":361,"type":"if","locations":[{"start":{"line":361,"column":20},"end":{"line":361,"column":20}},{"start":{"line":361,"column":20},"end":{"line":361,"column":20}}]},"17":{"line":378,"type":"if","locations":[{"start":{"line":378,"column":12},"end":{"line":378,"column":12}},{"start":{"line":378,"column":12},"end":{"line":378,"column":12}}]},"18":{"line":379,"type":"binary-expr","locations":[{"start":{"line":379,"column":55},"end":{"line":379,"column":61}},{"start":{"line":379,"column":65},"end":{"line":379,"column":66}}]},"19":{"line":393,"type":"if","locations":[{"start":{"line":393,"column":12},"end":{"line":393,"column":12}},{"start":{"line":393,"column":12},"end":{"line":393,"column":12}}]},"20":{"line":393,"type":"binary-expr","locations":[{"start":{"line":393,"column":16},"end":{"line":393,"column":36}},{"start":{"line":393,"column":40},"end":{"line":393,"column":69}}]},"21":{"line":414,"type":"if","locations":[{"start":{"line":414,"column":16},"end":{"line":414,"column":16}},{"start":{"line":414,"column":16},"end":{"line":414,"column":16}}]},"22":{"line":414,"type":"binary-expr","locations":[{"start":{"line":414,"column":20},"end":{"line":414,"column":27}},{"start":{"line":414,"column":31},"end":{"line":414,"column":41}},{"start":{"line":414,"column":45},"end":{"line":414,"column":49}}]},"23":{"line":419,"type":"if","locations":[{"start":{"line":419,"column":21},"end":{"line":419,"column":21}},{"start":{"line":419,"column":21},"end":{"line":419,"column":21}}]},"24":{"line":419,"type":"binary-expr","locations":[{"start":{"line":419,"column":25},"end":{"line":419,"column":31}},{"start":{"line":419,"column":35},"end":{"line":419,"column":45}},{"start":{"line":419,"column":49},"end":{"line":419,"column":53}}]},"25":{"line":424,"type":"if","locations":[{"start":{"line":424,"column":21},"end":{"line":424,"column":21}},{"start":{"line":424,"column":21},"end":{"line":424,"column":21}}]},"26":{"line":424,"type":"binary-expr","locations":[{"start":{"line":424,"column":25},"end":{"line":424,"column":31}},{"start":{"line":424,"column":35},"end":{"line":424,"column":44}},{"start":{"line":424,"column":48},"end":{"line":424,"column":52}}]},"27":{"line":434,"type":"if","locations":[{"start":{"line":434,"column":12},"end":{"line":434,"column":12}},{"start":{"line":434,"column":12},"end":{"line":434,"column":12}}]},"28":{"line":486,"type":"cond-expr","locations":[{"start":{"line":486,"column":36},"end":{"line":486,"column":40}},{"start":{"line":486,"column":43},"end":{"line":486,"column":48}}]},"29":{"line":504,"type":"if","locations":[{"start":{"line":504,"column":12},"end":{"line":504,"column":12}},{"start":{"line":504,"column":12},"end":{"line":504,"column":12}}]},"30":{"line":504,"type":"binary-expr","locations":[{"start":{"line":504,"column":16},"end":{"line":504,"column":28}},{"start":{"line":504,"column":32},"end":{"line":504,"column":42}}]},"31":{"line":511,"type":"if","locations":[{"start":{"line":511,"column":17},"end":{"line":511,"column":17}},{"start":{"line":511,"column":17},"end":{"line":511,"column":17}}]},"32":{"line":511,"type":"binary-expr","locations":[{"start":{"line":511,"column":22},"end":{"line":511,"column":35}},{"start":{"line":511,"column":39},"end":{"line":511,"column":48}},{"start":{"line":511,"column":54},"end":{"line":511,"column":66}},{"start":{"line":511,"column":70},"end":{"line":511,"column":79}}]},"33":{"line":517,"type":"binary-expr","locations":[{"start":{"line":517,"column":27},"end":{"line":517,"column":47}},{"start":{"line":517,"column":51},"end":{"line":517,"column":64}}]},"34":{"line":535,"type":"binary-expr","locations":[{"start":{"line":535,"column":26},"end":{"line":535,"column":45}},{"start":{"line":535,"column":49},"end":{"line":535,"column":66}}]},"35":{"line":536,"type":"binary-expr","locations":[{"start":{"line":536,"column":26},"end":{"line":536,"column":46}},{"start":{"line":536,"column":50},"end":{"line":536,"column":68}}]},"36":{"line":555,"type":"if","locations":[{"start":{"line":555,"column":12},"end":{"line":555,"column":12}},{"start":{"line":555,"column":12},"end":{"line":555,"column":12}}]}},"code":["(function () { YUI.add('widget-modality', function (Y, NAME) {","","/**"," * Provides modality support for Widgets, though an extension"," *"," * @module widget-modality"," */","","var WIDGET = 'widget',"," RENDER_UI = 'renderUI',"," BIND_UI = 'bindUI',"," SYNC_UI = 'syncUI',"," BOUNDING_BOX = 'boundingBox',"," CONTENT_BOX = 'contentBox',"," VISIBLE = 'visible',"," Z_INDEX = 'zIndex',"," CHANGE = 'Change',"," isBoolean = Y.Lang.isBoolean,"," getCN = Y.ClassNameManager.getClassName,"," MaskShow = \"maskShow\","," MaskHide = \"maskHide\","," ClickOutside = \"clickoutside\","," FocusOutside = \"focusoutside\",",""," supportsPosFixed = (function(){",""," /*! IS_POSITION_FIXED_SUPPORTED - Juriy Zaytsev (kangax) - http://yura.thinkweb2.com/cft/ */",""," var doc = Y.config.doc,"," isSupported = null,"," el, root;",""," if (doc.createElement) {"," el = doc.createElement('div');"," if (el && el.style) {"," el.style.position = 'fixed';"," el.style.top = '10px';"," root = doc.body;"," if (root && root.appendChild && root.removeChild) {"," root.appendChild(el);"," isSupported = (el.offsetTop === 10);"," root.removeChild(el);"," }"," }"," }",""," return isSupported;"," }());",""," /**"," * Widget extension, which can be used to add modality support to the base Widget class,"," * through the Base.create method."," *"," * @class WidgetModality"," * @param {Object} config User configuration object"," */"," function WidgetModal(config) {}",""," var MODAL = 'modal',"," MASK = 'mask',"," MODAL_CLASSES = {"," modal : getCN(WIDGET, MODAL),"," mask : getCN(WIDGET, MASK)"," };",""," /**"," * Static property used to define the default attribute"," * configuration introduced by WidgetModality."," *"," * @property ATTRS"," * @static"," * @type Object"," */"," WidgetModal.ATTRS = {"," /**"," * @attribute maskNode"," * @type Y.Node"," *"," * @description Returns a Y.Node instance of the node being used as the mask."," */"," maskNode : {"," getter : '_getMaskNode',"," readOnly : true"," },","",""," /**"," * @attribute modal"," * @type boolean"," *"," * @description Whether the widget should be modal or not."," */"," modal: {"," value:false,"," validator: isBoolean"," },",""," /**"," * @attribute focusOn"," * @type array"," *"," * @description An array of objects corresponding to the nodes and events that will trigger a re-focus back on the widget."," * The implementer can supply an array of objects, with each object having the following properties:"," *
eventName: (string, required): The eventName to listen to.
"," *node: (Y.Node, optional): The Y.Node that will fire the event (defaults to the boundingBox of the widget)
"," *By default, this attribute consists of two objects which will cause the widget to re-focus if anything"," * outside the widget is clicked on or focussed upon.
"," */"," focusOn: {"," valueFn: function() {"," return ["," {"," // node: this.get(BOUNDING_BOX),"," eventName: ClickOutside"," },"," {"," //node: this.get(BOUNDING_BOX),"," eventName: FocusOutside"," }"," ];"," },",""," validator: Y.Lang.isArray"," }",""," };","",""," WidgetModal.CLASSES = MODAL_CLASSES;","",""," /**"," * Returns the mask if it exists on the page - otherwise creates a mask. There's only"," * one mask on a page at a given time."," *"," * This method in invoked internally by the getter of the maskNode ATTR."," *
"," * @method _GET_MASK"," * @static"," */"," WidgetModal._GET_MASK = function() {",""," var mask = Y.one('.' + MODAL_CLASSES.mask),"," win = Y.one('win');",""," if (mask) {"," return mask;"," }",""," mask = Y.Node.create('').addClass(MODAL_CLASSES.mask);",""," if (supportsPosFixed) {"," mask.setStyles({"," position: 'fixed',"," width : '100%',"," height : '100%',"," top : '0',"," left : '0',"," display : 'block'"," });"," } else {"," mask.setStyles({"," position: 'absolute',"," width : win.get('winWidth') +'px',"," height : win.get('winHeight') + 'px',"," top : '0',"," left : '0',"," display : 'block'"," });"," }",""," return mask;"," };",""," /**"," * A stack of Y.Widget objects representing the current hierarchy of modal widgets presently displayed on the screen"," * @property STACK"," */"," WidgetModal.STACK = [];","",""," WidgetModal.prototype = {",""," initializer: function () {"," Y.after(this._renderUIModal, this, RENDER_UI);"," Y.after(this._syncUIModal, this, SYNC_UI);"," Y.after(this._bindUIModal, this, BIND_UI);"," },",""," destructor: function () {"," // Hack to remove this thing from the STACK."," this._uiSetHostVisibleModal(false);"," },",""," // *** Instance Members *** //",""," _uiHandlesModal: null,","",""," /**"," * Adds modal class to the bounding box of the widget"," *"," * This method in invoked after renderUI is invoked for the Widget class"," * using YUI's aop infrastructure."," *
"," * @method _renderUIModal"," * @protected"," */"," _renderUIModal : function () {",""," var bb = this.get(BOUNDING_BOX);"," //cb = this.get(CONTENT_BOX);",""," //this makes the content box content appear over the mask"," // cb.setStyles({"," // position: \"\""," // });",""," this._repositionMask(this);"," bb.addClass(MODAL_CLASSES.modal);",""," },","",""," /**"," * Hooks up methods to be executed when the widget's visibility or z-index changes"," *"," * This method in invoked after bindUI is invoked for the Widget class"," * using YUI's aop infrastructure."," *
"," * @method _bindUIModal"," * @protected"," */"," _bindUIModal : function () {",""," this.after(VISIBLE+CHANGE, this._afterHostVisibleChangeModal);"," this.after(Z_INDEX+CHANGE, this._afterHostZIndexChangeModal);"," this.after(\"focusOnChange\", this._afterFocusOnChange);",""," // Re-align the mask in the viewport if `position: fixed;` is not"," // supported. iOS < 5 and Android < 3 don't actually support it even"," // though they both pass the feature test; the UA sniff is here to"," // account for that. Ideally this should be replaced with a better"," // feature test."," if (!supportsPosFixed ||"," (Y.UA.ios && Y.UA.ios < 5) ||"," (Y.UA.android && Y.UA.android < 3)) {",""," Y.one('win').on('scroll', this._resyncMask, this);"," }"," },",""," /**"," * Syncs the mask with the widget's current state, namely the visibility and z-index of the widget"," *"," * This method in invoked after syncUI is invoked for the Widget class"," * using YUI's aop infrastructure."," *
"," * @method _syncUIModal"," * @protected"," */"," _syncUIModal : function () {",""," //var host = this.get(HOST);",""," this._uiSetHostVisibleModal(this.get(VISIBLE));",""," },",""," /**"," * Provides mouse and tab focus to the widget's bounding box."," *"," * @method _focus"," */"," _focus : function (e) {",""," var bb = this.get(BOUNDING_BOX),"," oldTI = bb.get('tabIndex');",""," bb.set('tabIndex', oldTI >= 0 ? oldTI : 0);"," this.focus();"," },"," /**"," * Blurs the widget."," *"," * @method _blur"," */"," _blur : function () {",""," this.blur();"," },",""," /**"," * Returns the Y.Node instance of the maskNode"," *"," * @method _getMaskNode"," * @return {Node} The Y.Node instance of the mask, as returned from WidgetModal._GET_MASK"," */"," _getMaskNode : function () {",""," return WidgetModal._GET_MASK();"," },",""," /**"," * Performs events attaching/detaching, stack shifting and mask repositioning based on the visibility of the widget"," *"," * @method _uiSetHostVisibleModal"," * @param {boolean} Whether the widget is visible or not"," */"," _uiSetHostVisibleModal : function (visible) {"," var stack = WidgetModal.STACK,"," maskNode = this.get('maskNode'),"," isModal = this.get('modal'),"," topModal, index;",""," if (visible) {",""," Y.Array.each(stack, function(modal){"," modal._detachUIHandlesModal();"," modal._blur();"," });",""," // push on top of stack"," stack.unshift(this);",""," this._repositionMask(this);"," this._uiSetHostZIndexModal(this.get(Z_INDEX));",""," if (isModal) {"," maskNode.show();"," Y.later(1, this, '_attachUIHandlesModal');"," this._focus();"," }","",""," } else {",""," index = Y.Array.indexOf(stack, this);"," if (index >= 0) {"," // Remove modal widget from global stack."," stack.splice(index, 1);"," }",""," this._detachUIHandlesModal();"," this._blur();",""," if (stack.length) {"," topModal = stack[0];"," this._repositionMask(topModal);"," //topModal._attachUIHandlesModal();"," topModal._uiSetHostZIndexModal(topModal.get(Z_INDEX));",""," if (topModal.get('modal')) {"," //topModal._attachUIHandlesModal();"," Y.later(1, topModal, '_attachUIHandlesModal');"," topModal._focus();"," }",""," } else {",""," if (maskNode.getStyle('display') === 'block') {"," maskNode.hide();"," }",""," }",""," }"," },",""," /**"," * Sets the z-index of the mask node."," *"," * @method _uiSetHostZIndexModal"," * @param {Number} Z-Index of the widget"," */"," _uiSetHostZIndexModal : function (zIndex) {",""," if (this.get('modal')) {"," this.get('maskNode').setStyle(Z_INDEX, zIndex || 0);"," }",""," },",""," /**"," * Attaches UI Listeners for \"clickoutside\" and \"focusoutside\" on the"," * widget. When these events occur, and the widget is modal, focus is"," * shifted back onto the widget."," *"," * @method _attachUIHandlesModal"," */"," _attachUIHandlesModal : function () {",""," if (this._uiHandlesModal || WidgetModal.STACK[0] !== this) {"," // Quit early if we have ui handles, or if we not at the top"," // of the global stack."," return;"," }",""," var bb = this.get(BOUNDING_BOX),"," maskNode = this.get('maskNode'),"," focusOn = this.get('focusOn'),"," focus = Y.bind(this._focus, this),"," uiHandles = [],"," i, len, o;",""," for (i = 0, len = focusOn.length; i < len; i++) {",""," o = {};"," o.node = focusOn[i].node;"," o.ev = focusOn[i].eventName;"," o.keyCode = focusOn[i].keyCode;",""," //no keycode or node defined"," if (!o.node && !o.keyCode && o.ev) {"," uiHandles.push(bb.on(o.ev, focus));"," }",""," //node defined, no keycode (not a keypress)"," else if (o.node && !o.keyCode && o.ev) {"," uiHandles.push(o.node.on(o.ev, focus));"," }",""," //node defined, keycode defined, event defined (its a key press)"," else if (o.node && o.keyCode && o.ev) {"," uiHandles.push(o.node.on(o.ev, focus, o.keyCode));"," }",""," else {"," Y.Log('focusOn ATTR Error: The event with name \"'+o.ev+'\" could not be attached.');"," }",""," }",""," if ( ! supportsPosFixed) {"," uiHandles.push(Y.one('win').on('scroll', Y.bind(function(e){"," maskNode.setStyle('top', maskNode.get('docScrollY'));"," }, this)));"," }",""," this._uiHandlesModal = uiHandles;"," },",""," /**"," * Detaches all UI Listeners that were set in _attachUIHandlesModal from the widget."," *"," * @method _detachUIHandlesModal"," */"," _detachUIHandlesModal : function () {"," Y.each(this._uiHandlesModal, function(h){"," h.detach();"," });"," this._uiHandlesModal = null;"," },",""," /**"," * Default function that is called when visibility is changed on the widget."," *"," * @method _afterHostVisibleChangeModal"," * @param {EventFacade} e The event facade of the change"," */"," _afterHostVisibleChangeModal : function (e) {",""," this._uiSetHostVisibleModal(e.newVal);"," },",""," /**"," * Default function that is called when z-index is changed on the widget."," *"," * @method _afterHostZIndexChangeModal"," * @param {EventFacade} e The event facade of the change"," */"," _afterHostZIndexChangeModal : function (e) {",""," this._uiSetHostZIndexModal(e.newVal);"," },",""," /**"," * Returns a boolean representing whether the current widget is in a \"nested modality\" state."," * This is done by checking the number of widgets currently on the stack."," *"," * @method isNested"," * @public"," */"," isNested: function() {"," var length = WidgetModal.STACK.length,"," retval = (length > 1) ? true : false;"," return retval;"," },",""," /**"," * Repositions the mask in the DOM for nested modality cases."," *"," * @method _repositionMask"," * @param {Widget} nextElem The Y.Widget instance that will be visible in the stack once the current widget is closed."," */"," _repositionMask: function(nextElem) {",""," var currentModal = this.get('modal'),"," nextModal = nextElem.get('modal'),"," maskNode = this.get('maskNode'),"," bb, bbParent;",""," //if this is modal and host is not modal"," if (currentModal && !nextModal) {"," //leave the mask where it is, since the host is not modal."," maskNode.remove();"," this.fire(MaskHide);"," }",""," //if the main widget is not modal but the host is modal, or both of them are modal"," else if ((!currentModal && nextModal) || (currentModal && nextModal)) {",""," //then remove the mask off DOM, reposition it, and reinsert it into the DOM"," maskNode.remove();"," this.fire(MaskHide);"," bb = nextElem.get(BOUNDING_BOX);"," bbParent = bb.get('parentNode') || Y.one('body');"," bbParent.insert(maskNode, bbParent.get('firstChild'));"," this.fire(MaskShow);"," }",""," },",""," /**"," * Resyncs the mask in the viewport for browsers that don't support fixed positioning"," *"," * @method _resyncMask"," * @param {Y.Widget} nextElem The Y.Widget instance that will be visible in the stack once the current widget is closed."," * @private"," */"," _resyncMask: function (e) {"," var o = e.currentTarget,"," offsetX = o.get('docScrollX'),"," offsetY = o.get('docScrollY'),"," w = o.get('innerWidth') || o.get('winWidth'),"," h = o.get('innerHeight') || o.get('winHeight'),"," mask = this.get('maskNode');",""," mask.setStyles({"," \"top\": offsetY + \"px\","," \"left\": offsetX + \"px\","," \"width\": w + 'px',"," \"height\": h + 'px'"," });"," },",""," /**"," * Default function called when focusOn Attribute is changed. Remove existing listeners and create new listeners."," *"," * @method _afterFocusOnChange"," */"," _afterFocusOnChange : function(e) {"," this._detachUIHandlesModal();",""," if (this.get(VISIBLE)) {"," this._attachUIHandlesModal();"," }"," }"," };",""," Y.WidgetModality = WidgetModal;","","","","}, '3.13.0', {\"requires\": [\"base-build\", \"event-outside\", \"widget\"], \"skinnable\": true});","","}());"]}; + __coverage__['build/widget-modality/widget-modality.js'] = {"path":"build/widget-modality/widget-modality.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},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0,0,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,0],"24":[0,0],"25":[0,0,0],"26":[0,0],"27":[0,0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0,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,"25":0,"26":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":27},"end":{"line":1,"column":46}}},"2":{"name":"(anonymous_2)","line":26,"loc":{"start":{"line":26,"column":24},"end":{"line":26,"column":34}}},"3":{"name":"WidgetModal","line":58,"loc":{"start":{"line":58,"column":4},"end":{"line":58,"column":33}}},"4":{"name":"(anonymous_4)","line":111,"loc":{"start":{"line":111,"column":25},"end":{"line":111,"column":36}}},"5":{"name":"(anonymous_5)","line":142,"loc":{"start":{"line":142,"column":28},"end":{"line":142,"column":39}}},"6":{"name":"(anonymous_6)","line":185,"loc":{"start":{"line":185,"column":21},"end":{"line":185,"column":33}}},"7":{"name":"(anonymous_7)","line":191,"loc":{"start":{"line":191,"column":20},"end":{"line":191,"column":32}}},"8":{"name":"(anonymous_8)","line":210,"loc":{"start":{"line":210,"column":25},"end":{"line":210,"column":37}}},"9":{"name":"(anonymous_9)","line":235,"loc":{"start":{"line":235,"column":23},"end":{"line":235,"column":35}}},"10":{"name":"(anonymous_10)","line":263,"loc":{"start":{"line":263,"column":23},"end":{"line":263,"column":35}}},"11":{"name":"(anonymous_11)","line":276,"loc":{"start":{"line":276,"column":17},"end":{"line":276,"column":30}}},"12":{"name":"(anonymous_12)","line":289,"loc":{"start":{"line":289,"column":16},"end":{"line":289,"column":28}}},"13":{"name":"(anonymous_13)","line":300,"loc":{"start":{"line":300,"column":23},"end":{"line":300,"column":35}}},"14":{"name":"(anonymous_14)","line":311,"loc":{"start":{"line":311,"column":33},"end":{"line":311,"column":52}}},"15":{"name":"(anonymous_15)","line":319,"loc":{"start":{"line":319,"column":36},"end":{"line":319,"column":51}}},"16":{"name":"(anonymous_16)","line":379,"loc":{"start":{"line":379,"column":32},"end":{"line":379,"column":50}}},"17":{"name":"(anonymous_17)","line":394,"loc":{"start":{"line":394,"column":32},"end":{"line":394,"column":44}}},"18":{"name":"(anonymous_18)","line":438,"loc":{"start":{"line":438,"column":64},"end":{"line":438,"column":75}}},"19":{"name":"(anonymous_19)","line":451,"loc":{"start":{"line":451,"column":32},"end":{"line":451,"column":44}}},"20":{"name":"(anonymous_20)","line":452,"loc":{"start":{"line":452,"column":41},"end":{"line":452,"column":52}}},"21":{"name":"(anonymous_21)","line":464,"loc":{"start":{"line":464,"column":39},"end":{"line":464,"column":52}}},"22":{"name":"(anonymous_22)","line":475,"loc":{"start":{"line":475,"column":38},"end":{"line":475,"column":51}}},"23":{"name":"(anonymous_23)","line":487,"loc":{"start":{"line":487,"column":18},"end":{"line":487,"column":29}}},"24":{"name":"(anonymous_24)","line":499,"loc":{"start":{"line":499,"column":25},"end":{"line":499,"column":44}}},"25":{"name":"(anonymous_25)","line":534,"loc":{"start":{"line":534,"column":21},"end":{"line":534,"column":34}}},"26":{"name":"(anonymous_26)","line":555,"loc":{"start":{"line":555,"column":30},"end":{"line":555,"column":42}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":568,"column":89}},"2":{"start":{"line":9,"column":0},"end":{"line":49,"column":9}},"3":{"start":{"line":30,"column":8},"end":{"line":32,"column":21}},"4":{"start":{"line":34,"column":8},"end":{"line":46,"column":9}},"5":{"start":{"line":35,"column":12},"end":{"line":35,"column":42}},"6":{"start":{"line":36,"column":12},"end":{"line":45,"column":13}},"7":{"start":{"line":37,"column":16},"end":{"line":37,"column":44}},"8":{"start":{"line":38,"column":16},"end":{"line":38,"column":38}},"9":{"start":{"line":39,"column":16},"end":{"line":39,"column":32}},"10":{"start":{"line":40,"column":16},"end":{"line":44,"column":17}},"11":{"start":{"line":41,"column":20},"end":{"line":41,"column":41}},"12":{"start":{"line":42,"column":20},"end":{"line":42,"column":56}},"13":{"start":{"line":43,"column":20},"end":{"line":43,"column":41}},"14":{"start":{"line":48,"column":8},"end":{"line":48,"column":27}},"15":{"start":{"line":58,"column":4},"end":{"line":58,"column":35}},"16":{"start":{"line":60,"column":4},"end":{"line":65,"column":10}},"17":{"start":{"line":75,"column":4},"end":{"line":127,"column":6}},"18":{"start":{"line":112,"column":20},"end":{"line":121,"column":22}},"19":{"start":{"line":130,"column":4},"end":{"line":130,"column":40}},"20":{"start":{"line":142,"column":4},"end":{"line":174,"column":6}},"21":{"start":{"line":144,"column":8},"end":{"line":145,"column":32}},"22":{"start":{"line":147,"column":8},"end":{"line":149,"column":9}},"23":{"start":{"line":148,"column":12},"end":{"line":148,"column":24}},"24":{"start":{"line":151,"column":8},"end":{"line":151,"column":73}},"25":{"start":{"line":153,"column":8},"end":{"line":171,"column":9}},"26":{"start":{"line":154,"column":12},"end":{"line":161,"column":15}},"27":{"start":{"line":163,"column":12},"end":{"line":170,"column":15}},"28":{"start":{"line":173,"column":8},"end":{"line":173,"column":20}},"29":{"start":{"line":180,"column":4},"end":{"line":180,"column":27}},"30":{"start":{"line":183,"column":4},"end":{"line":562,"column":6}},"31":{"start":{"line":186,"column":12},"end":{"line":186,"column":58}},"32":{"start":{"line":187,"column":12},"end":{"line":187,"column":54}},"33":{"start":{"line":188,"column":12},"end":{"line":188,"column":54}},"34":{"start":{"line":193,"column":12},"end":{"line":193,"column":47}},"35":{"start":{"line":212,"column":12},"end":{"line":212,"column":44}},"36":{"start":{"line":220,"column":12},"end":{"line":220,"column":39}},"37":{"start":{"line":221,"column":12},"end":{"line":221,"column":45}},"38":{"start":{"line":237,"column":12},"end":{"line":237,"column":74}},"39":{"start":{"line":238,"column":12},"end":{"line":238,"column":73}},"40":{"start":{"line":239,"column":12},"end":{"line":239,"column":66}},"41":{"start":{"line":246,"column":12},"end":{"line":251,"column":13}},"42":{"start":{"line":250,"column":16},"end":{"line":250,"column":66}},"43":{"start":{"line":267,"column":12},"end":{"line":267,"column":59}},"44":{"start":{"line":278,"column":12},"end":{"line":279,"column":39}},"45":{"start":{"line":281,"column":12},"end":{"line":281,"column":55}},"46":{"start":{"line":282,"column":12},"end":{"line":282,"column":25}},"47":{"start":{"line":291,"column":12},"end":{"line":291,"column":24}},"48":{"start":{"line":302,"column":12},"end":{"line":302,"column":43}},"49":{"start":{"line":312,"column":12},"end":{"line":315,"column":32}},"50":{"start":{"line":317,"column":12},"end":{"line":370,"column":13}},"51":{"start":{"line":319,"column":16},"end":{"line":322,"column":19}},"52":{"start":{"line":320,"column":20},"end":{"line":320,"column":50}},"53":{"start":{"line":321,"column":20},"end":{"line":321,"column":34}},"54":{"start":{"line":325,"column":16},"end":{"line":325,"column":36}},"55":{"start":{"line":327,"column":16},"end":{"line":327,"column":43}},"56":{"start":{"line":328,"column":16},"end":{"line":328,"column":62}},"57":{"start":{"line":330,"column":16},"end":{"line":336,"column":17}},"58":{"start":{"line":331,"column":20},"end":{"line":331,"column":36}},"59":{"start":{"line":332,"column":20},"end":{"line":332,"column":62}},"60":{"start":{"line":333,"column":20},"end":{"line":335,"column":21}},"61":{"start":{"line":334,"column":24},"end":{"line":334,"column":38}},"62":{"start":{"line":341,"column":16},"end":{"line":341,"column":53}},"63":{"start":{"line":342,"column":16},"end":{"line":345,"column":17}},"64":{"start":{"line":344,"column":20},"end":{"line":344,"column":43}},"65":{"start":{"line":347,"column":16},"end":{"line":347,"column":45}},"66":{"start":{"line":348,"column":16},"end":{"line":348,"column":29}},"67":{"start":{"line":350,"column":16},"end":{"line":368,"column":17}},"68":{"start":{"line":351,"column":20},"end":{"line":351,"column":40}},"69":{"start":{"line":352,"column":20},"end":{"line":352,"column":51}},"70":{"start":{"line":354,"column":20},"end":{"line":354,"column":74}},"71":{"start":{"line":356,"column":20},"end":{"line":360,"column":21}},"72":{"start":{"line":358,"column":24},"end":{"line":358,"column":70}},"73":{"start":{"line":359,"column":24},"end":{"line":359,"column":42}},"74":{"start":{"line":364,"column":20},"end":{"line":366,"column":21}},"75":{"start":{"line":365,"column":24},"end":{"line":365,"column":40}},"76":{"start":{"line":381,"column":12},"end":{"line":383,"column":13}},"77":{"start":{"line":382,"column":16},"end":{"line":382,"column":68}},"78":{"start":{"line":396,"column":12},"end":{"line":400,"column":13}},"79":{"start":{"line":399,"column":16},"end":{"line":399,"column":23}},"80":{"start":{"line":402,"column":12},"end":{"line":407,"column":26}},"81":{"start":{"line":409,"column":12},"end":{"line":435,"column":13}},"82":{"start":{"line":411,"column":16},"end":{"line":411,"column":23}},"83":{"start":{"line":412,"column":16},"end":{"line":412,"column":41}},"84":{"start":{"line":413,"column":16},"end":{"line":413,"column":44}},"85":{"start":{"line":414,"column":16},"end":{"line":414,"column":47}},"86":{"start":{"line":417,"column":16},"end":{"line":433,"column":17}},"87":{"start":{"line":418,"column":20},"end":{"line":418,"column":55}},"88":{"start":{"line":422,"column":21},"end":{"line":433,"column":17}},"89":{"start":{"line":423,"column":20},"end":{"line":423,"column":59}},"90":{"start":{"line":427,"column":21},"end":{"line":433,"column":17}},"91":{"start":{"line":428,"column":20},"end":{"line":428,"column":70}},"92":{"start":{"line":432,"column":20},"end":{"line":432,"column":103}},"93":{"start":{"line":437,"column":12},"end":{"line":441,"column":13}},"94":{"start":{"line":438,"column":16},"end":{"line":440,"column":27}},"95":{"start":{"line":439,"column":20},"end":{"line":439,"column":73}},"96":{"start":{"line":443,"column":12},"end":{"line":443,"column":45}},"97":{"start":{"line":452,"column":12},"end":{"line":454,"column":15}},"98":{"start":{"line":453,"column":16},"end":{"line":453,"column":27}},"99":{"start":{"line":455,"column":12},"end":{"line":455,"column":40}},"100":{"start":{"line":466,"column":12},"end":{"line":466,"column":50}},"101":{"start":{"line":477,"column":12},"end":{"line":477,"column":49}},"102":{"start":{"line":488,"column":12},"end":{"line":489,"column":49}},"103":{"start":{"line":490,"column":12},"end":{"line":490,"column":26}},"104":{"start":{"line":501,"column":12},"end":{"line":504,"column":29}},"105":{"start":{"line":507,"column":12},"end":{"line":523,"column":13}},"106":{"start":{"line":509,"column":16},"end":{"line":509,"column":34}},"107":{"start":{"line":510,"column":16},"end":{"line":510,"column":36}},"108":{"start":{"line":514,"column":17},"end":{"line":523,"column":13}},"109":{"start":{"line":517,"column":16},"end":{"line":517,"column":34}},"110":{"start":{"line":518,"column":16},"end":{"line":518,"column":36}},"111":{"start":{"line":519,"column":16},"end":{"line":519,"column":48}},"112":{"start":{"line":520,"column":16},"end":{"line":520,"column":65}},"113":{"start":{"line":521,"column":16},"end":{"line":521,"column":70}},"114":{"start":{"line":522,"column":16},"end":{"line":522,"column":36}},"115":{"start":{"line":535,"column":12},"end":{"line":540,"column":47}},"116":{"start":{"line":542,"column":12},"end":{"line":547,"column":15}},"117":{"start":{"line":556,"column":12},"end":{"line":556,"column":41}},"118":{"start":{"line":558,"column":12},"end":{"line":560,"column":13}},"119":{"start":{"line":559,"column":16},"end":{"line":559,"column":45}},"120":{"start":{"line":564,"column":4},"end":{"line":564,"column":35}}},"branchMap":{"1":{"line":34,"type":"if","locations":[{"start":{"line":34,"column":8},"end":{"line":34,"column":8}},{"start":{"line":34,"column":8},"end":{"line":34,"column":8}}]},"2":{"line":36,"type":"if","locations":[{"start":{"line":36,"column":12},"end":{"line":36,"column":12}},{"start":{"line":36,"column":12},"end":{"line":36,"column":12}}]},"3":{"line":36,"type":"binary-expr","locations":[{"start":{"line":36,"column":16},"end":{"line":36,"column":18}},{"start":{"line":36,"column":22},"end":{"line":36,"column":30}}]},"4":{"line":40,"type":"if","locations":[{"start":{"line":40,"column":16},"end":{"line":40,"column":16}},{"start":{"line":40,"column":16},"end":{"line":40,"column":16}}]},"5":{"line":40,"type":"binary-expr","locations":[{"start":{"line":40,"column":20},"end":{"line":40,"column":24}},{"start":{"line":40,"column":28},"end":{"line":40,"column":44}},{"start":{"line":40,"column":48},"end":{"line":40,"column":64}}]},"6":{"line":147,"type":"if","locations":[{"start":{"line":147,"column":8},"end":{"line":147,"column":8}},{"start":{"line":147,"column":8},"end":{"line":147,"column":8}}]},"7":{"line":153,"type":"if","locations":[{"start":{"line":153,"column":8},"end":{"line":153,"column":8}},{"start":{"line":153,"column":8},"end":{"line":153,"column":8}}]},"8":{"line":246,"type":"if","locations":[{"start":{"line":246,"column":12},"end":{"line":246,"column":12}},{"start":{"line":246,"column":12},"end":{"line":246,"column":12}}]},"9":{"line":246,"type":"binary-expr","locations":[{"start":{"line":246,"column":16},"end":{"line":246,"column":33}},{"start":{"line":247,"column":21},"end":{"line":247,"column":29}},{"start":{"line":247,"column":33},"end":{"line":247,"column":45}},{"start":{"line":248,"column":21},"end":{"line":248,"column":33}},{"start":{"line":248,"column":37},"end":{"line":248,"column":53}}]},"10":{"line":281,"type":"cond-expr","locations":[{"start":{"line":281,"column":44},"end":{"line":281,"column":49}},{"start":{"line":281,"column":52},"end":{"line":281,"column":53}}]},"11":{"line":317,"type":"if","locations":[{"start":{"line":317,"column":12},"end":{"line":317,"column":12}},{"start":{"line":317,"column":12},"end":{"line":317,"column":12}}]},"12":{"line":330,"type":"if","locations":[{"start":{"line":330,"column":16},"end":{"line":330,"column":16}},{"start":{"line":330,"column":16},"end":{"line":330,"column":16}}]},"13":{"line":333,"type":"if","locations":[{"start":{"line":333,"column":20},"end":{"line":333,"column":20}},{"start":{"line":333,"column":20},"end":{"line":333,"column":20}}]},"14":{"line":342,"type":"if","locations":[{"start":{"line":342,"column":16},"end":{"line":342,"column":16}},{"start":{"line":342,"column":16},"end":{"line":342,"column":16}}]},"15":{"line":350,"type":"if","locations":[{"start":{"line":350,"column":16},"end":{"line":350,"column":16}},{"start":{"line":350,"column":16},"end":{"line":350,"column":16}}]},"16":{"line":356,"type":"if","locations":[{"start":{"line":356,"column":20},"end":{"line":356,"column":20}},{"start":{"line":356,"column":20},"end":{"line":356,"column":20}}]},"17":{"line":364,"type":"if","locations":[{"start":{"line":364,"column":20},"end":{"line":364,"column":20}},{"start":{"line":364,"column":20},"end":{"line":364,"column":20}}]},"18":{"line":381,"type":"if","locations":[{"start":{"line":381,"column":12},"end":{"line":381,"column":12}},{"start":{"line":381,"column":12},"end":{"line":381,"column":12}}]},"19":{"line":382,"type":"binary-expr","locations":[{"start":{"line":382,"column":55},"end":{"line":382,"column":61}},{"start":{"line":382,"column":65},"end":{"line":382,"column":66}}]},"20":{"line":396,"type":"if","locations":[{"start":{"line":396,"column":12},"end":{"line":396,"column":12}},{"start":{"line":396,"column":12},"end":{"line":396,"column":12}}]},"21":{"line":396,"type":"binary-expr","locations":[{"start":{"line":396,"column":16},"end":{"line":396,"column":36}},{"start":{"line":396,"column":40},"end":{"line":396,"column":69}}]},"22":{"line":417,"type":"if","locations":[{"start":{"line":417,"column":16},"end":{"line":417,"column":16}},{"start":{"line":417,"column":16},"end":{"line":417,"column":16}}]},"23":{"line":417,"type":"binary-expr","locations":[{"start":{"line":417,"column":20},"end":{"line":417,"column":27}},{"start":{"line":417,"column":31},"end":{"line":417,"column":41}},{"start":{"line":417,"column":45},"end":{"line":417,"column":49}}]},"24":{"line":422,"type":"if","locations":[{"start":{"line":422,"column":21},"end":{"line":422,"column":21}},{"start":{"line":422,"column":21},"end":{"line":422,"column":21}}]},"25":{"line":422,"type":"binary-expr","locations":[{"start":{"line":422,"column":25},"end":{"line":422,"column":31}},{"start":{"line":422,"column":35},"end":{"line":422,"column":45}},{"start":{"line":422,"column":49},"end":{"line":422,"column":53}}]},"26":{"line":427,"type":"if","locations":[{"start":{"line":427,"column":21},"end":{"line":427,"column":21}},{"start":{"line":427,"column":21},"end":{"line":427,"column":21}}]},"27":{"line":427,"type":"binary-expr","locations":[{"start":{"line":427,"column":25},"end":{"line":427,"column":31}},{"start":{"line":427,"column":35},"end":{"line":427,"column":44}},{"start":{"line":427,"column":48},"end":{"line":427,"column":52}}]},"28":{"line":437,"type":"if","locations":[{"start":{"line":437,"column":12},"end":{"line":437,"column":12}},{"start":{"line":437,"column":12},"end":{"line":437,"column":12}}]},"29":{"line":489,"type":"cond-expr","locations":[{"start":{"line":489,"column":36},"end":{"line":489,"column":40}},{"start":{"line":489,"column":43},"end":{"line":489,"column":48}}]},"30":{"line":507,"type":"if","locations":[{"start":{"line":507,"column":12},"end":{"line":507,"column":12}},{"start":{"line":507,"column":12},"end":{"line":507,"column":12}}]},"31":{"line":507,"type":"binary-expr","locations":[{"start":{"line":507,"column":16},"end":{"line":507,"column":28}},{"start":{"line":507,"column":32},"end":{"line":507,"column":42}}]},"32":{"line":514,"type":"if","locations":[{"start":{"line":514,"column":17},"end":{"line":514,"column":17}},{"start":{"line":514,"column":17},"end":{"line":514,"column":17}}]},"33":{"line":514,"type":"binary-expr","locations":[{"start":{"line":514,"column":22},"end":{"line":514,"column":35}},{"start":{"line":514,"column":39},"end":{"line":514,"column":48}},{"start":{"line":514,"column":54},"end":{"line":514,"column":66}},{"start":{"line":514,"column":70},"end":{"line":514,"column":79}}]},"34":{"line":520,"type":"binary-expr","locations":[{"start":{"line":520,"column":27},"end":{"line":520,"column":47}},{"start":{"line":520,"column":51},"end":{"line":520,"column":64}}]},"35":{"line":538,"type":"binary-expr","locations":[{"start":{"line":538,"column":26},"end":{"line":538,"column":45}},{"start":{"line":538,"column":49},"end":{"line":538,"column":66}}]},"36":{"line":539,"type":"binary-expr","locations":[{"start":{"line":539,"column":26},"end":{"line":539,"column":46}},{"start":{"line":539,"column":50},"end":{"line":539,"column":68}}]},"37":{"line":558,"type":"if","locations":[{"start":{"line":558,"column":12},"end":{"line":558,"column":12}},{"start":{"line":558,"column":12},"end":{"line":558,"column":12}}]}},"code":["(function () { YUI.add('widget-modality', function (Y, NAME) {","","/**"," * Provides modality support for Widgets, though an extension"," *"," * @module widget-modality"," */","","var WIDGET = 'widget',"," RENDER_UI = 'renderUI',"," BIND_UI = 'bindUI',"," SYNC_UI = 'syncUI',"," BOUNDING_BOX = 'boundingBox',"," CONTENT_BOX = 'contentBox',"," RENDERED = 'rendered',"," VISIBLE = 'visible',"," Z_INDEX = 'zIndex',"," CHANGE = 'Change',"," isBoolean = Y.Lang.isBoolean,"," getCN = Y.ClassNameManager.getClassName,"," MaskShow = \"maskShow\","," MaskHide = \"maskHide\","," ClickOutside = \"clickoutside\","," FocusOutside = \"focusoutside\",",""," supportsPosFixed = (function(){",""," /*! IS_POSITION_FIXED_SUPPORTED - Juriy Zaytsev (kangax) - http://yura.thinkweb2.com/cft/ */",""," var doc = Y.config.doc,"," isSupported = null,"," el, root;",""," if (doc.createElement) {"," el = doc.createElement('div');"," if (el && el.style) {"," el.style.position = 'fixed';"," el.style.top = '10px';"," root = doc.body;"," if (root && root.appendChild && root.removeChild) {"," root.appendChild(el);"," isSupported = (el.offsetTop === 10);"," root.removeChild(el);"," }"," }"," }",""," return isSupported;"," }());",""," /**"," * Widget extension, which can be used to add modality support to the base Widget class,"," * through the Base.create method."," *"," * @class WidgetModality"," * @param {Object} config User configuration object"," */"," function WidgetModal(config) {}",""," var MODAL = 'modal',"," MASK = 'mask',"," MODAL_CLASSES = {"," modal : getCN(WIDGET, MODAL),"," mask : getCN(WIDGET, MASK)"," };",""," /**"," * Static property used to define the default attribute"," * configuration introduced by WidgetModality."," *"," * @property ATTRS"," * @static"," * @type Object"," */"," WidgetModal.ATTRS = {"," /**"," * @attribute maskNode"," * @type Y.Node"," *"," * @description Returns a Y.Node instance of the node being used as the mask."," */"," maskNode : {"," getter : '_getMaskNode',"," readOnly : true"," },","",""," /**"," * @attribute modal"," * @type boolean"," *"," * @description Whether the widget should be modal or not."," */"," modal: {"," value:false,"," validator: isBoolean"," },",""," /**"," * @attribute focusOn"," * @type array"," *"," * @description An array of objects corresponding to the nodes and events that will trigger a re-focus back on the widget."," * The implementer can supply an array of objects, with each object having the following properties:"," *eventName: (string, required): The eventName to listen to.
"," *node: (Y.Node, optional): The Y.Node that will fire the event (defaults to the boundingBox of the widget)
"," *By default, this attribute consists of two objects which will cause the widget to re-focus if anything"," * outside the widget is clicked on or focussed upon.
"," */"," focusOn: {"," valueFn: function() {"," return ["," {"," // node: this.get(BOUNDING_BOX),"," eventName: ClickOutside"," },"," {"," //node: this.get(BOUNDING_BOX),"," eventName: FocusOutside"," }"," ];"," },",""," validator: Y.Lang.isArray"," }",""," };","",""," WidgetModal.CLASSES = MODAL_CLASSES;","",""," /**"," * Returns the mask if it exists on the page - otherwise creates a mask. There's only"," * one mask on a page at a given time."," *"," * This method in invoked internally by the getter of the maskNode ATTR."," *
"," * @method _GET_MASK"," * @static"," */"," WidgetModal._GET_MASK = function() {",""," var mask = Y.one('.' + MODAL_CLASSES.mask),"," win = Y.one('win');",""," if (mask) {"," return mask;"," }",""," mask = Y.Node.create('').addClass(MODAL_CLASSES.mask);",""," if (supportsPosFixed) {"," mask.setStyles({"," position: 'fixed',"," width : '100%',"," height : '100%',"," top : '0',"," left : '0',"," display : 'block'"," });"," } else {"," mask.setStyles({"," position: 'absolute',"," width : win.get('winWidth') +'px',"," height : win.get('winHeight') + 'px',"," top : '0',"," left : '0',"," display : 'block'"," });"," }",""," return mask;"," };",""," /**"," * A stack of Y.Widget objects representing the current hierarchy of modal widgets presently displayed on the screen"," * @property STACK"," */"," WidgetModal.STACK = [];","",""," WidgetModal.prototype = {",""," initializer: function () {"," Y.after(this._renderUIModal, this, RENDER_UI);"," Y.after(this._syncUIModal, this, SYNC_UI);"," Y.after(this._bindUIModal, this, BIND_UI);"," },",""," destructor: function () {"," // Hack to remove this thing from the STACK."," this._uiSetHostVisibleModal(false);"," },",""," // *** Instance Members *** //",""," _uiHandlesModal: null,","",""," /**"," * Adds modal class to the bounding box of the widget"," *"," * This method in invoked after renderUI is invoked for the Widget class"," * using YUI's aop infrastructure."," *
"," * @method _renderUIModal"," * @protected"," */"," _renderUIModal : function () {",""," var bb = this.get(BOUNDING_BOX);"," //cb = this.get(CONTENT_BOX);",""," //this makes the content box content appear over the mask"," // cb.setStyles({"," // position: \"\""," // });",""," this._repositionMask(this);"," bb.addClass(MODAL_CLASSES.modal);",""," },","",""," /**"," * Hooks up methods to be executed when the widget's visibility or z-index changes"," *"," * This method in invoked after bindUI is invoked for the Widget class"," * using YUI's aop infrastructure."," *
"," * @method _bindUIModal"," * @protected"," */"," _bindUIModal : function () {",""," this.after(VISIBLE+CHANGE, this._afterHostVisibleChangeModal);"," this.after(Z_INDEX+CHANGE, this._afterHostZIndexChangeModal);"," this.after(\"focusOnChange\", this._afterFocusOnChange);",""," // Re-align the mask in the viewport if `position: fixed;` is not"," // supported. iOS < 5 and Android < 3 don't actually support it even"," // though they both pass the feature test; the UA sniff is here to"," // account for that. Ideally this should be replaced with a better"," // feature test."," if (!supportsPosFixed ||"," (Y.UA.ios && Y.UA.ios < 5) ||"," (Y.UA.android && Y.UA.android < 3)) {",""," Y.one('win').on('scroll', this._resyncMask, this);"," }"," },",""," /**"," * Syncs the mask with the widget's current state, namely the visibility and z-index of the widget"," *"," * This method in invoked after syncUI is invoked for the Widget class"," * using YUI's aop infrastructure."," *
"," * @method _syncUIModal"," * @protected"," */"," _syncUIModal : function () {",""," //var host = this.get(HOST);",""," this._uiSetHostVisibleModal(this.get(VISIBLE));",""," },",""," /**"," * Provides mouse and tab focus to the widget's bounding box."," *"," * @method _focus"," */"," _focus : function (e) {",""," var bb = this.get(BOUNDING_BOX),"," oldTI = bb.get('tabIndex');",""," bb.set('tabIndex', oldTI >= 0 ? oldTI : 0);"," this.focus();"," },"," /**"," * Blurs the widget."," *"," * @method _blur"," */"," _blur : function () {",""," this.blur();"," },",""," /**"," * Returns the Y.Node instance of the maskNode"," *"," * @method _getMaskNode"," * @return {Node} The Y.Node instance of the mask, as returned from WidgetModal._GET_MASK"," */"," _getMaskNode : function () {",""," return WidgetModal._GET_MASK();"," },",""," /**"," * Performs events attaching/detaching, stack shifting and mask repositioning based on the visibility of the widget"," *"," * @method _uiSetHostVisibleModal"," * @param {boolean} Whether the widget is visible or not"," */"," _uiSetHostVisibleModal : function (visible) {"," var stack = WidgetModal.STACK,"," maskNode = this.get('maskNode'),"," isModal = this.get('modal'),"," topModal, index;",""," if (visible) {",""," Y.Array.each(stack, function(modal){"," modal._detachUIHandlesModal();"," modal._blur();"," });",""," // push on top of stack"," stack.unshift(this);",""," this._repositionMask(this);"," this._uiSetHostZIndexModal(this.get(Z_INDEX));",""," if (isModal) {"," maskNode.show();"," Y.later(1, this, '_attachUIHandlesModal');"," if (this.get(RENDERED)) {"," this._focus();"," }"," }","",""," } else {",""," index = Y.Array.indexOf(stack, this);"," if (index >= 0) {"," // Remove modal widget from global stack."," stack.splice(index, 1);"," }",""," this._detachUIHandlesModal();"," this._blur();",""," if (stack.length) {"," topModal = stack[0];"," this._repositionMask(topModal);"," //topModal._attachUIHandlesModal();"," topModal._uiSetHostZIndexModal(topModal.get(Z_INDEX));",""," if (topModal.get('modal')) {"," //topModal._attachUIHandlesModal();"," Y.later(1, topModal, '_attachUIHandlesModal');"," topModal._focus();"," }",""," } else {",""," if (maskNode.getStyle('display') === 'block') {"," maskNode.hide();"," }",""," }",""," }"," },",""," /**"," * Sets the z-index of the mask node."," *"," * @method _uiSetHostZIndexModal"," * @param {Number} Z-Index of the widget"," */"," _uiSetHostZIndexModal : function (zIndex) {",""," if (this.get('modal')) {"," this.get('maskNode').setStyle(Z_INDEX, zIndex || 0);"," }",""," },",""," /**"," * Attaches UI Listeners for \"clickoutside\" and \"focusoutside\" on the"," * widget. When these events occur, and the widget is modal, focus is"," * shifted back onto the widget."," *"," * @method _attachUIHandlesModal"," */"," _attachUIHandlesModal : function () {",""," if (this._uiHandlesModal || WidgetModal.STACK[0] !== this) {"," // Quit early if we have ui handles, or if we not at the top"," // of the global stack."," return;"," }",""," var bb = this.get(BOUNDING_BOX),"," maskNode = this.get('maskNode'),"," focusOn = this.get('focusOn'),"," focus = Y.bind(this._focus, this),"," uiHandles = [],"," i, len, o;",""," for (i = 0, len = focusOn.length; i < len; i++) {",""," o = {};"," o.node = focusOn[i].node;"," o.ev = focusOn[i].eventName;"," o.keyCode = focusOn[i].keyCode;",""," //no keycode or node defined"," if (!o.node && !o.keyCode && o.ev) {"," uiHandles.push(bb.on(o.ev, focus));"," }",""," //node defined, no keycode (not a keypress)"," else if (o.node && !o.keyCode && o.ev) {"," uiHandles.push(o.node.on(o.ev, focus));"," }",""," //node defined, keycode defined, event defined (its a key press)"," else if (o.node && o.keyCode && o.ev) {"," uiHandles.push(o.node.on(o.ev, focus, o.keyCode));"," }",""," else {"," Y.Log('focusOn ATTR Error: The event with name \"'+o.ev+'\" could not be attached.');"," }",""," }",""," if ( ! supportsPosFixed) {"," uiHandles.push(Y.one('win').on('scroll', Y.bind(function(e){"," maskNode.setStyle('top', maskNode.get('docScrollY'));"," }, this)));"," }",""," this._uiHandlesModal = uiHandles;"," },",""," /**"," * Detaches all UI Listeners that were set in _attachUIHandlesModal from the widget."," *"," * @method _detachUIHandlesModal"," */"," _detachUIHandlesModal : function () {"," Y.each(this._uiHandlesModal, function(h){"," h.detach();"," });"," this._uiHandlesModal = null;"," },",""," /**"," * Default function that is called when visibility is changed on the widget."," *"," * @method _afterHostVisibleChangeModal"," * @param {EventFacade} e The event facade of the change"," */"," _afterHostVisibleChangeModal : function (e) {",""," this._uiSetHostVisibleModal(e.newVal);"," },",""," /**"," * Default function that is called when z-index is changed on the widget."," *"," * @method _afterHostZIndexChangeModal"," * @param {EventFacade} e The event facade of the change"," */"," _afterHostZIndexChangeModal : function (e) {",""," this._uiSetHostZIndexModal(e.newVal);"," },",""," /**"," * Returns a boolean representing whether the current widget is in a \"nested modality\" state."," * This is done by checking the number of widgets currently on the stack."," *"," * @method isNested"," * @public"," */"," isNested: function() {"," var length = WidgetModal.STACK.length,"," retval = (length > 1) ? true : false;"," return retval;"," },",""," /**"," * Repositions the mask in the DOM for nested modality cases."," *"," * @method _repositionMask"," * @param {Widget} nextElem The Y.Widget instance that will be visible in the stack once the current widget is closed."," */"," _repositionMask: function(nextElem) {",""," var currentModal = this.get('modal'),"," nextModal = nextElem.get('modal'),"," maskNode = this.get('maskNode'),"," bb, bbParent;",""," //if this is modal and host is not modal"," if (currentModal && !nextModal) {"," //leave the mask where it is, since the host is not modal."," maskNode.remove();"," this.fire(MaskHide);"," }",""," //if the main widget is not modal but the host is modal, or both of them are modal"," else if ((!currentModal && nextModal) || (currentModal && nextModal)) {",""," //then remove the mask off DOM, reposition it, and reinsert it into the DOM"," maskNode.remove();"," this.fire(MaskHide);"," bb = nextElem.get(BOUNDING_BOX);"," bbParent = bb.get('parentNode') || Y.one('body');"," bbParent.insert(maskNode, bbParent.get('firstChild'));"," this.fire(MaskShow);"," }",""," },",""," /**"," * Resyncs the mask in the viewport for browsers that don't support fixed positioning"," *"," * @method _resyncMask"," * @param {Y.Widget} nextElem The Y.Widget instance that will be visible in the stack once the current widget is closed."," * @private"," */"," _resyncMask: function (e) {"," var o = e.currentTarget,"," offsetX = o.get('docScrollX'),"," offsetY = o.get('docScrollY'),"," w = o.get('innerWidth') || o.get('winWidth'),"," h = o.get('innerHeight') || o.get('winHeight'),"," mask = this.get('maskNode');",""," mask.setStyles({"," \"top\": offsetY + \"px\","," \"left\": offsetX + \"px\","," \"width\": w + 'px',"," \"height\": h + 'px'"," });"," },",""," /**"," * Default function called when focusOn Attribute is changed. Remove existing listeners and create new listeners."," *"," * @method _afterFocusOnChange"," */"," _afterFocusOnChange : function(e) {"," this._detachUIHandlesModal();",""," if (this.get(VISIBLE)) {"," this._attachUIHandlesModal();"," }"," }"," };",""," Y.WidgetModality = WidgetModal;","","","","}, '3.13.0', {\"requires\": [\"base-build\", \"event-outside\", \"widget\"], \"skinnable\": true});","","}());"]}; } var __cov_3t8wDvjOucpJBP6BEEqjTg = __coverage__['build/widget-modality/widget-modality.js']; -__cov_3t8wDvjOucpJBP6BEEqjTg.s['1']++;YUI.add('widget-modality',function(Y,NAME){__cov_3t8wDvjOucpJBP6BEEqjTg.f['1']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['2']++;var WIDGET='widget',RENDER_UI='renderUI',BIND_UI='bindUI',SYNC_UI='syncUI',BOUNDING_BOX='boundingBox',CONTENT_BOX='contentBox',VISIBLE='visible',Z_INDEX='zIndex',CHANGE='Change',isBoolean=Y.Lang.isBoolean,getCN=Y.ClassNameManager.getClassName,MaskShow='maskShow',MaskHide='maskHide',ClickOutside='clickoutside',FocusOutside='focusoutside',supportsPosFixed=function(){__cov_3t8wDvjOucpJBP6BEEqjTg.f['2']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['3']++;var doc=Y.config.doc,isSupported=null,el,root;__cov_3t8wDvjOucpJBP6BEEqjTg.s['4']++;if(doc.createElement){__cov_3t8wDvjOucpJBP6BEEqjTg.b['1'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['5']++;el=doc.createElement('div');__cov_3t8wDvjOucpJBP6BEEqjTg.s['6']++;if((__cov_3t8wDvjOucpJBP6BEEqjTg.b['3'][0]++,el)&&(__cov_3t8wDvjOucpJBP6BEEqjTg.b['3'][1]++,el.style)){__cov_3t8wDvjOucpJBP6BEEqjTg.b['2'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['7']++;el.style.position='fixed';__cov_3t8wDvjOucpJBP6BEEqjTg.s['8']++;el.style.top='10px';__cov_3t8wDvjOucpJBP6BEEqjTg.s['9']++;root=doc.body;__cov_3t8wDvjOucpJBP6BEEqjTg.s['10']++;if((__cov_3t8wDvjOucpJBP6BEEqjTg.b['5'][0]++,root)&&(__cov_3t8wDvjOucpJBP6BEEqjTg.b['5'][1]++,root.appendChild)&&(__cov_3t8wDvjOucpJBP6BEEqjTg.b['5'][2]++,root.removeChild)){__cov_3t8wDvjOucpJBP6BEEqjTg.b['4'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['11']++;root.appendChild(el);__cov_3t8wDvjOucpJBP6BEEqjTg.s['12']++;isSupported=el.offsetTop===10;__cov_3t8wDvjOucpJBP6BEEqjTg.s['13']++;root.removeChild(el);}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['4'][1]++;}}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['2'][1]++;}}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['1'][1]++;}__cov_3t8wDvjOucpJBP6BEEqjTg.s['14']++;return isSupported;}();__cov_3t8wDvjOucpJBP6BEEqjTg.s['15']++;function WidgetModal(config){__cov_3t8wDvjOucpJBP6BEEqjTg.f['3']++;}__cov_3t8wDvjOucpJBP6BEEqjTg.s['16']++;var MODAL='modal',MASK='mask',MODAL_CLASSES={modal:getCN(WIDGET,MODAL),mask:getCN(WIDGET,MASK)};__cov_3t8wDvjOucpJBP6BEEqjTg.s['17']++;WidgetModal.ATTRS={maskNode:{getter:'_getMaskNode',readOnly:true},modal:{value:false,validator:isBoolean},focusOn:{valueFn:function(){__cov_3t8wDvjOucpJBP6BEEqjTg.f['4']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['18']++;return[{eventName:ClickOutside},{eventName:FocusOutside}];},validator:Y.Lang.isArray}};__cov_3t8wDvjOucpJBP6BEEqjTg.s['19']++;WidgetModal.CLASSES=MODAL_CLASSES;__cov_3t8wDvjOucpJBP6BEEqjTg.s['20']++;WidgetModal._GET_MASK=function(){__cov_3t8wDvjOucpJBP6BEEqjTg.f['5']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['21']++;var mask=Y.one('.'+MODAL_CLASSES.mask),win=Y.one('win');__cov_3t8wDvjOucpJBP6BEEqjTg.s['22']++;if(mask){__cov_3t8wDvjOucpJBP6BEEqjTg.b['6'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['23']++;return mask;}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['6'][1]++;}__cov_3t8wDvjOucpJBP6BEEqjTg.s['24']++;mask=Y.Node.create('').addClass(MODAL_CLASSES.mask);__cov_3t8wDvjOucpJBP6BEEqjTg.s['25']++;if(supportsPosFixed){__cov_3t8wDvjOucpJBP6BEEqjTg.b['7'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['26']++;mask.setStyles({position:'fixed',width:'100%',height:'100%',top:'0',left:'0',display:'block'});}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['7'][1]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['27']++;mask.setStyles({position:'absolute',width:win.get('winWidth')+'px',height:win.get('winHeight')+'px',top:'0',left:'0',display:'block'});}__cov_3t8wDvjOucpJBP6BEEqjTg.s['28']++;return mask;};__cov_3t8wDvjOucpJBP6BEEqjTg.s['29']++;WidgetModal.STACK=[];__cov_3t8wDvjOucpJBP6BEEqjTg.s['30']++;WidgetModal.prototype={initializer:function(){__cov_3t8wDvjOucpJBP6BEEqjTg.f['6']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['31']++;Y.after(this._renderUIModal,this,RENDER_UI);__cov_3t8wDvjOucpJBP6BEEqjTg.s['32']++;Y.after(this._syncUIModal,this,SYNC_UI);__cov_3t8wDvjOucpJBP6BEEqjTg.s['33']++;Y.after(this._bindUIModal,this,BIND_UI);},destructor:function(){__cov_3t8wDvjOucpJBP6BEEqjTg.f['7']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['34']++;this._uiSetHostVisibleModal(false);},_uiHandlesModal:null,_renderUIModal:function(){__cov_3t8wDvjOucpJBP6BEEqjTg.f['8']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['35']++;var bb=this.get(BOUNDING_BOX);__cov_3t8wDvjOucpJBP6BEEqjTg.s['36']++;this._repositionMask(this);__cov_3t8wDvjOucpJBP6BEEqjTg.s['37']++;bb.addClass(MODAL_CLASSES.modal);},_bindUIModal:function(){__cov_3t8wDvjOucpJBP6BEEqjTg.f['9']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['38']++;this.after(VISIBLE+CHANGE,this._afterHostVisibleChangeModal);__cov_3t8wDvjOucpJBP6BEEqjTg.s['39']++;this.after(Z_INDEX+CHANGE,this._afterHostZIndexChangeModal);__cov_3t8wDvjOucpJBP6BEEqjTg.s['40']++;this.after('focusOnChange',this._afterFocusOnChange);__cov_3t8wDvjOucpJBP6BEEqjTg.s['41']++;if((__cov_3t8wDvjOucpJBP6BEEqjTg.b['9'][0]++,!supportsPosFixed)||(__cov_3t8wDvjOucpJBP6BEEqjTg.b['9'][1]++,Y.UA.ios)&&(__cov_3t8wDvjOucpJBP6BEEqjTg.b['9'][2]++,Y.UA.ios<5)||(__cov_3t8wDvjOucpJBP6BEEqjTg.b['9'][3]++,Y.UA.android)&&(__cov_3t8wDvjOucpJBP6BEEqjTg.b['9'][4]++,Y.UA.android<3)){__cov_3t8wDvjOucpJBP6BEEqjTg.b['8'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['42']++;Y.one('win').on('scroll',this._resyncMask,this);}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['8'][1]++;}},_syncUIModal:function(){__cov_3t8wDvjOucpJBP6BEEqjTg.f['10']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['43']++;this._uiSetHostVisibleModal(this.get(VISIBLE));},_focus:function(e){__cov_3t8wDvjOucpJBP6BEEqjTg.f['11']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['44']++;var bb=this.get(BOUNDING_BOX),oldTI=bb.get('tabIndex');__cov_3t8wDvjOucpJBP6BEEqjTg.s['45']++;bb.set('tabIndex',oldTI>=0?(__cov_3t8wDvjOucpJBP6BEEqjTg.b['10'][0]++,oldTI):(__cov_3t8wDvjOucpJBP6BEEqjTg.b['10'][1]++,0));__cov_3t8wDvjOucpJBP6BEEqjTg.s['46']++;this.focus();},_blur:function(){__cov_3t8wDvjOucpJBP6BEEqjTg.f['12']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['47']++;this.blur();},_getMaskNode:function(){__cov_3t8wDvjOucpJBP6BEEqjTg.f['13']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['48']++;return WidgetModal._GET_MASK();},_uiSetHostVisibleModal:function(visible){__cov_3t8wDvjOucpJBP6BEEqjTg.f['14']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['49']++;var stack=WidgetModal.STACK,maskNode=this.get('maskNode'),isModal=this.get('modal'),topModal,index;__cov_3t8wDvjOucpJBP6BEEqjTg.s['50']++;if(visible){__cov_3t8wDvjOucpJBP6BEEqjTg.b['11'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['51']++;Y.Array.each(stack,function(modal){__cov_3t8wDvjOucpJBP6BEEqjTg.f['15']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['52']++;modal._detachUIHandlesModal();__cov_3t8wDvjOucpJBP6BEEqjTg.s['53']++;modal._blur();});__cov_3t8wDvjOucpJBP6BEEqjTg.s['54']++;stack.unshift(this);__cov_3t8wDvjOucpJBP6BEEqjTg.s['55']++;this._repositionMask(this);__cov_3t8wDvjOucpJBP6BEEqjTg.s['56']++;this._uiSetHostZIndexModal(this.get(Z_INDEX));__cov_3t8wDvjOucpJBP6BEEqjTg.s['57']++;if(isModal){__cov_3t8wDvjOucpJBP6BEEqjTg.b['12'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['58']++;maskNode.show();__cov_3t8wDvjOucpJBP6BEEqjTg.s['59']++;Y.later(1,this,'_attachUIHandlesModal');__cov_3t8wDvjOucpJBP6BEEqjTg.s['60']++;this._focus();}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['12'][1]++;}}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['11'][1]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['61']++;index=Y.Array.indexOf(stack,this);__cov_3t8wDvjOucpJBP6BEEqjTg.s['62']++;if(index>=0){__cov_3t8wDvjOucpJBP6BEEqjTg.b['13'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['63']++;stack.splice(index,1);}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['13'][1]++;}__cov_3t8wDvjOucpJBP6BEEqjTg.s['64']++;this._detachUIHandlesModal();__cov_3t8wDvjOucpJBP6BEEqjTg.s['65']++;this._blur();__cov_3t8wDvjOucpJBP6BEEqjTg.s['66']++;if(stack.length){__cov_3t8wDvjOucpJBP6BEEqjTg.b['14'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['67']++;topModal=stack[0];__cov_3t8wDvjOucpJBP6BEEqjTg.s['68']++;this._repositionMask(topModal);__cov_3t8wDvjOucpJBP6BEEqjTg.s['69']++;topModal._uiSetHostZIndexModal(topModal.get(Z_INDEX));__cov_3t8wDvjOucpJBP6BEEqjTg.s['70']++;if(topModal.get('modal')){__cov_3t8wDvjOucpJBP6BEEqjTg.b['15'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['71']++;Y.later(1,topModal,'_attachUIHandlesModal');__cov_3t8wDvjOucpJBP6BEEqjTg.s['72']++;topModal._focus();}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['15'][1]++;}}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['14'][1]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['73']++;if(maskNode.getStyle('display')==='block'){__cov_3t8wDvjOucpJBP6BEEqjTg.b['16'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['74']++;maskNode.hide();}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['16'][1]++;}}}},_uiSetHostZIndexModal:function(zIndex){__cov_3t8wDvjOucpJBP6BEEqjTg.f['16']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['75']++;if(this.get('modal')){__cov_3t8wDvjOucpJBP6BEEqjTg.b['17'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['76']++;this.get('maskNode').setStyle(Z_INDEX,(__cov_3t8wDvjOucpJBP6BEEqjTg.b['18'][0]++,zIndex)||(__cov_3t8wDvjOucpJBP6BEEqjTg.b['18'][1]++,0));}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['17'][1]++;}},_attachUIHandlesModal:function(){__cov_3t8wDvjOucpJBP6BEEqjTg.f['17']++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['77']++;if((__cov_3t8wDvjOucpJBP6BEEqjTg.b['20'][0]++,this._uiHandlesModal)||(__cov_3t8wDvjOucpJBP6BEEqjTg.b['20'][1]++,WidgetModal.STACK[0]!==this)){__cov_3t8wDvjOucpJBP6BEEqjTg.b['19'][0]++;__cov_3t8wDvjOucpJBP6BEEqjTg.s['78']++;return;}else{__cov_3t8wDvjOucpJBP6BEEqjTg.b['19'][1]++;}__cov_3t8wDvjOucpJBP6BEEqjTg.s['79']++;var bb=this.get(BOUNDING_BOX),maskNode=this.get('maskNode'),focusOn=this.get('focusOn'),focus=Y.bind(this._focus,this),uiHandles=[],i,len,o;__cov_3t8wDvjOucpJBP6BEEqjTg.s['80']++;for(i=0,len=focusOn.length;i