"use strict";(function(){if($.event.special.resize)return;if($.fn.off.elementResizeOriginalOff)return;let idIndex=0;function makeId(element,data){element[$.expando]=element[$.expando]||++idIndex;return data.guid+"-"+element[$.expando]}function getUniqueMeasurementId(element){const height=element.clientHeight;const width=element.clientWidth;return`${height},${width}`}const registered=[];$.event.special.resize={noBubble:true,add:function(data){if(this===window)return;const item={id:makeId(this,data),element:this,uniqueMeasurementId:getUniqueMeasurementId(this),observer:new window.ResizeObserver((()=>{const uniqueMeasurementId=getUniqueMeasurementId(item.element);const hasMeasureChanged=!item.uniqueMeasurementId||item.uniqueMeasurementId!==uniqueMeasurementId;if(!hasMeasureChanged)return;item.uniqueMeasurementId=uniqueMeasurementId;$(this).trigger("resize")}))};registered.push(item);item.observer.observe(this)},remove:function(data){if(this===window)return;const findId=makeId(this,data);for(let i=registered.length-1,l=-1;i>l;i--){const item=registered[i];if(item.id!==findId)continue;registered.splice(i,1);item.observer.disconnect()}}}})();