{"version":3,"sources":["jquery.ba-resize.js"],"names":["$","window","undefined","loopy","timeout_id","str_setTimeout","elems","each","elem","this","width","height","data","str_data","w","h","trigger","str_resize","jq_resize","str_delay","resize","extend","str_throttle","event","special","setup","add","length","teardown","not","removeData","clearTimeout","handleObj","new_handler","e","old_handler","apply","arguments","isFunction","handler","ixp","runtime","components","dependencies","jQuery","v1_11"],"mappings":"CAgDA,SAAUA,EAAEC,EAAOC,GACjB,WAyKA,SAASC,KAGPC,EAAaH,EAAQI,GAAiB,WAGpCC,EAAMC,KAAK,WACT,GAAIC,GAAOR,EAAES,MACXC,EAAQF,EAAKE,QACbC,EAASH,EAAKG,SACdC,EAAOZ,EAAEY,KAAMH,KAAMI,EAIlBH,KAAUE,EAAKE,GAAKH,IAAWC,EAAKG,GACvCP,EAAKQ,QAASC,GAAcL,EAAKE,EAAIJ,EAAOE,EAAKG,EAAIJ,MAMzDR,KAECe,EAAWC,IA5LhB,GAKEf,GALEE,EAAQN,MAGVkB,EAAYlB,EAAEoB,OAASpB,EAAEqB,OAAQrB,EAAEoB,WAKnCf,EAAiB,aACjBY,EAAa,SACbJ,EAAWI,EAAa,iBACxBE,EAAY,QACZG,EAAe,gBAOjBJ,GAAWC,GAAc,IAiBzBD,EAAWI,IAAiB,EAuC5BtB,EAAEuB,MAAMC,QAASP,IAGfQ,MAAO,WAKL,IAAMP,EAAWI,IAAkBb,KAAMJ,GAAqB,OAAO,CAErE,IAAIG,GAAOR,EAAES,KAGbH,GAAQA,EAAMoB,IAAKlB,GAGnBR,EAAEY,KAAMH,KAAMI,GAAYC,EAAGN,EAAKE,QAASK,EAAGP,EAAKG,WAG7B,IAAjBL,EAAMqB,QACTxB,KAKJyB,SAAU,WAKR,IAAMV,EAAWI,IAAkBb,KAAMJ,GAAqB,OAAO,CAErE,IAAIG,GAAOR,EAAES,KAGbH,GAAQA,EAAMuB,IAAKrB,GAGnBA,EAAKsB,WAAYjB,GAGXP,EAAMqB,QACVI,aAAc3B,IAMlBsB,IAAK,SAAUM,GAcb,QAASC,GAAaC,EAAGpB,EAAGC,GAC1B,GAAIP,GAAOR,EAAES,MACXG,EAAOZ,EAAEY,KAAMH,KAAMI,EAKvBD,GAAKE,EAAIA,IAAMZ,EAAYY,EAAIN,EAAKE,QACpCE,EAAKG,EAAIA,IAAMb,EAAYa,EAAIP,EAAKG,SAEpCwB,EAAYC,MAAO3B,KAAM4B,WApB3B,IAAMnB,EAAWI,IAAkBb,KAAMJ,GAAqB,OAAO,CAErE,IAAI8B,EAuBJ,OAAKnC,GAAEsC,WAAYN,IAEjBG,EAAcH,EACPC,IAGPE,EAAcH,EAAUO,aACxBP,EAAUO,QAAUN,OAiCzBhC,OAAOuC,IAAIC,QAAQC,WAAWC,aAAaC,OAAOC,MAAOpC","file":"jquery.ba-resize.min.js","sourcesContent":["/*!\r\n * jQuery resize event - v1.1 - 3/14/2010\r\n * http://benalman.com/projects/jquery-resize-plugin/\r\n *\r\n * Copyright (c) 2010 \"Cowboy\" Ben Alman\r\n * Dual licensed under the MIT and GPL licenses.\r\n * http://benalman.com/about/license/\r\n */\r\n\r\n// Script: jQuery resize event\r\n//\r\n// *Version: 1.1, Last updated: 3/14/2010*\r\n//\r\n// Project Home - http://benalman.com/projects/jquery-resize-plugin/\r\n// GitHub - http://github.com/cowboy/jquery-resize/\r\n// Source - http://github.com/cowboy/jquery-resize/raw/master/jquery.ba-resize.js\r\n// (Minified) - http://github.com/cowboy/jquery-resize/raw/master/jquery.ba-resize.min.js (1.0kb)\r\n//\r\n// About: License\r\n//\r\n// Copyright (c) 2010 \"Cowboy\" Ben Alman,\r\n// Dual licensed under the MIT and GPL licenses.\r\n// http://benalman.com/about/license/\r\n//\r\n// About: Examples\r\n//\r\n// This working example, complete with fully commented code, illustrates a few\r\n// ways in which this plugin can be used.\r\n//\r\n// resize event - http://benalman.com/code/projects/jquery-resize/examples/resize/\r\n//\r\n// About: Support and Testing\r\n//\r\n// Information about what version or versions of jQuery this plugin has been\r\n// tested with, what browsers it has been tested in, and where the unit tests\r\n// reside (so you can test it yourself).\r\n//\r\n// jQuery Versions - 1.3.2, 1.4.1, 1.4.2\r\n// Browsers Tested - Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome, Opera 9.6-10.1.\r\n// Unit Tests - http://benalman.com/code/projects/jquery-resize/unit/\r\n//\r\n// About: Release History\r\n//\r\n// 1.1 - (3/14/2010) Fixed a minor bug that was causing the event to trigger\r\n// immediately after bind in some circumstances. Also changed $.fn.data\r\n// to $.data to improve performance.\r\n// 1.0 - (2/10/2010) Initial release\r\n\r\n(function($,window,undefined){\r\n '$:nomunge'; // Used by YUI compressor.\r\n\r\n // A jQuery object containing all non-window elements to which the resize\r\n // event is bound.\r\n var elems = $([]),\r\n\r\n // Extend $.resize if it already exists, otherwise create it.\r\n jq_resize = $.resize = $.extend( $.resize, {} ),\r\n\r\n timeout_id,\r\n\r\n // Reused strings.\r\n str_setTimeout = 'setTimeout',\r\n str_resize = 'resize',\r\n str_data = str_resize + '-special-event',\r\n str_delay = 'delay',\r\n str_throttle = 'throttleWindow';\r\n\r\n // Property: jQuery.resize.delay\r\n //\r\n // The numeric interval (in milliseconds) at which the resize event polling\r\n // loop executes. Defaults to 250.\r\n\r\n jq_resize[ str_delay ] = 250;\r\n\r\n // Property: jQuery.resize.throttleWindow\r\n //\r\n // Throttle the native window object resize event to fire no more than once\r\n // every milliseconds. Defaults to true.\r\n //\r\n // Because the window object has its own resize event, it doesn't need to be\r\n // provided by this plugin, and its execution can be left entirely up to the\r\n // browser. However, since certain browsers fire the resize event continuously\r\n // while others do not, enabling this will throttle the window resize event,\r\n // making event behavior consistent across all elements in all browsers.\r\n //\r\n // While setting this property to false will disable window object resize\r\n // event throttling, please note that this property must be changed before any\r\n // window object resize event callbacks are bound.\r\n\r\n jq_resize[ str_throttle ] = true;\r\n\r\n // Event: resize event\r\n //\r\n // Fired when an element's width or height changes. Because browsers only\r\n // provide this event for the window element, for other elements a polling\r\n // loop is initialized, running every milliseconds\r\n // to see if elements' dimensions have changed. You may bind with either\r\n // .resize( fn ) or .bind( \"resize\", fn ), and unbind with .unbind( \"resize\" ).\r\n //\r\n // Usage:\r\n //\r\n // > jQuery('selector').bind( 'resize', function(e) {\r\n // > // element's width or height has changed!\r\n // > ...\r\n // > });\r\n //\r\n // Additional Notes:\r\n //\r\n // * The polling loop is not created until at least one callback is actually\r\n // bound to the 'resize' event, and this single polling loop is shared\r\n // across all elements.\r\n //\r\n // Double firing issue in jQuery 1.3.2:\r\n //\r\n // While this plugin works in jQuery 1.3.2, if an element's event callbacks\r\n // are manually triggered via .trigger( 'resize' ) or .resize() those\r\n // callbacks may double-fire, due to limitations in the jQuery 1.3.2 special\r\n // events system. This is not an issue when using jQuery 1.4+.\r\n //\r\n // > // While this works in jQuery 1.4+\r\n // > $(elem).css({ width: new_w, height: new_h }).resize();\r\n // >\r\n // > // In jQuery 1.3.2, you need to do this:\r\n // > var elem = $(elem);\r\n // > elem.css({ width: new_w, height: new_h });\r\n // > elem.data( 'resize-special-event', { width: elem.width(), height: elem.height() } );\r\n // > elem.resize();\r\n\r\n $.event.special[ str_resize ] = {\r\n\r\n // Called only when the first 'resize' event callback is bound per element.\r\n setup: function() {\r\n // Since window has its own native 'resize' event, return false so that\r\n // jQuery will bind the event using DOM methods. Since only 'window'\r\n // objects have a .setTimeout method, this should be a sufficient test.\r\n // Unless, of course, we're throttling the 'resize' event for window.\r\n if ( !jq_resize[ str_throttle ] && this[ str_setTimeout ] ) { return false; }\r\n\r\n var elem = $(this);\r\n\r\n // Add this element to the list of internal elements to monitor.\r\n elems = elems.add( elem );\r\n\r\n // Initialize data store on the element.\r\n $.data( this, str_data, { w: elem.width(), h: elem.height() } );\r\n\r\n // If this is the first element added, start the polling loop.\r\n if ( elems.length === 1 ) {\r\n loopy();\r\n }\r\n },\r\n\r\n // Called only when the last 'resize' event callback is unbound per element.\r\n teardown: function() {\r\n // Since window has its own native 'resize' event, return false so that\r\n // jQuery will unbind the event using DOM methods. Since only 'window'\r\n // objects have a .setTimeout method, this should be a sufficient test.\r\n // Unless, of course, we're throttling the 'resize' event for window.\r\n if ( !jq_resize[ str_throttle ] && this[ str_setTimeout ] ) { return false; }\r\n\r\n var elem = $(this);\r\n\r\n // Remove this element from the list of internal elements to monitor.\r\n elems = elems.not( elem );\r\n\r\n // Remove any data stored on the element.\r\n elem.removeData( str_data );\r\n\r\n // If this is the last element removed, stop the polling loop.\r\n if ( !elems.length ) {\r\n clearTimeout( timeout_id );\r\n }\r\n },\r\n\r\n // Called every time a 'resize' event callback is bound per element (new in\r\n // jQuery 1.4).\r\n add: function( handleObj ) {\r\n // Since window has its own native 'resize' event, return false so that\r\n // jQuery doesn't modify the event object. Unless, of course, we're\r\n // throttling the 'resize' event for window.\r\n if ( !jq_resize[ str_throttle ] && this[ str_setTimeout ] ) { return false; }\r\n\r\n var old_handler;\r\n\r\n // The new_handler function is executed every time the event is triggered.\r\n // This is used to update the internal element data store with the width\r\n // and height when the event is triggered manually, to avoid double-firing\r\n // of the event callback. See the \"Double firing issue in jQuery 1.3.2\"\r\n // comments above for more information.\r\n\r\n function new_handler( e, w, h ) {\r\n var elem = $(this),\r\n data = $.data( this, str_data );\r\n\r\n // If called from the polling loop, w and h will be passed in as\r\n // arguments. If called manually, via .trigger( 'resize' ) or .resize(),\r\n // those values will need to be computed.\r\n data.w = w !== undefined ? w : elem.width();\r\n data.h = h !== undefined ? h : elem.height();\r\n\r\n old_handler.apply( this, arguments );\r\n };\r\n\r\n // This may seem a little complicated, but it normalizes the special event\r\n // .add method between jQuery 1.4/1.4.1 and 1.4.2+\r\n if ( $.isFunction( handleObj ) ) {\r\n // 1.4, 1.4.1\r\n old_handler = handleObj;\r\n return new_handler;\r\n } else {\r\n // 1.4.2+\r\n old_handler = handleObj.handler;\r\n handleObj.handler = new_handler;\r\n }\r\n }\r\n\r\n };\r\n\r\n function loopy() {\r\n\r\n // Start the polling loop, asynchronously.\r\n timeout_id = window[ str_setTimeout ](function(){\r\n\r\n // Iterate over all elements to which the 'resize' event is bound.\r\n elems.each(function(){\r\n var elem = $(this),\r\n width = elem.width(),\r\n height = elem.height(),\r\n data = $.data( this, str_data );\r\n\r\n // If element size has changed since the last time, update the element\r\n // data store and trigger the 'resize' event.\r\n if ( width !== data.w || height !== data.h ) {\r\n elem.trigger( str_resize, [ data.w = width, data.h = height ] );\r\n }\r\n\r\n });\r\n\r\n // Loop.\r\n loopy();\r\n\r\n }, jq_resize[ str_delay ] );\r\n\r\n };\r\n\r\n})(window.ixp.runtime.components.dependencies.jQuery.v1_11, this);\r\n"]}