Agriculture-front-end/dist/assets/element-resize-detector.d4d1cd8d.js

2 lines
16 KiB
JavaScript
Raw Normal View History

import{b as e}from"./browser-detector.d146ab9e.js";var t={exports:{}};(t.exports={}).forEach=function(e,t){for(var n=0;n<e.length;n++){var i=t(e[n]);if(i)return i}};var n={exports:{}};(n.exports={}).getOption=function(e,t,n){var i=e[t];if(null==i&&void 0!==n)return n;return i};var i=n.exports;function o(){var e={},t=0,n=0,i=0;return{add:function(o,r){r||(r=o,o=0),o>n?n=o:o<i&&(i=o),e[o]||(e[o]=[]),e[o].push(r),t++},process:function(){for(var t=i;t<=n;t++)for(var o=e[t],r=0;r<o.length;r++){(0,o[r])()}},size:function(){return t}}}var r="_erd";function a(e){return e[r]}var l={initState:function(e){return e[r]={},a(e)},getState:a,cleanState:function(e){delete e[r]}},s=e.exports,d=t.exports.forEach,c=t.exports.forEach,u=function(e){var t=e.stateHandler.getState;return{isDetectable:function(e){var n=t(e);return n&&!!n.isDetectable},markAsDetectable:function(e){t(e).isDetectable=!0},isBusy:function(e){return!!t(e).busy},markBusy:function(e,n){t(e).busy=!!n}}},f=function(e){var t={};function n(n){var i=e.get(n);return void 0===i?[]:t[i]||[]}return{get:n,add:function(n,i){var o=e.get(n);t[o]||(t[o]=[]),t[o].push(i)},removeListener:function(e,t){for(var i=n(e),o=0,r=i.length;o<r;++o)if(i[o]===t){i.splice(o,1);break}},removeAllListeners:function(e){var t=n(e);t&&(t.length=0)}}},h=function(){var e=1;return{generate:function(){return e++}}},p=function(e){var t=e.idGenerator,n=e.stateHandler.getState;return{get:function(e){var t=n(e);return t&&void 0!==t.id?t.id:null},set:function(e){var i=n(e);if(!i)throw new Error("setId required the element to have a resize detection state.");var o=t.generate();return i.id=o,o}}},m=function(e){function t(){}var n={log:t,warn:t,error:t};if(!e&&window.console){var i=function(e,t){e[t]=function(){var e=console[t];if(e.apply)e.apply(console,arguments);else for(var n=0;n<arguments.length;n++)e(arguments[n])}};i(n,"log"),i(n,"warn"),i(n,"error")}return n},g=e.exports,v=function(e){var t=(e=e||{}).reporter,n=i.getOption(e,"async",!0),r=i.getOption(e,"auto",!0);r&&!n&&(t&&t.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var a,l=o(),s=!1;function d(){for(s=!0;l.size();){var e=l;l=o(),e.process()}s=!1}function c(){var e;e=d,a=setTimeout(e,0)}return{add:function(e,t){!s&&r&&n&&0===l.size()&&c(),l.add(e,t)},force:function(e){s||(void 0===e&&(e=n),a&&(clearTimeout(a),a=null),e?c():d())}}},b=l,y=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,i=e.stateHandler.getState;if(!t)throw new Error("Missing required dependency: reporter.");function o(e){return i(e).object}return{makeDetectable:function(o,r,a){a||(a=r,r=o,o=null),(o=o||{}).debug,s.isIE(8)?a(r):function(r,a){var l,d,c=(l=["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"],d=e.important?" !important; ":"; ",(l.join(d)+d).trim()),u=!1,f=window.getComputedStyle(r),h=r.offsetWidth,p=r.offsetHeight;function m(){function e(){if("static"===f.position){r.style.setProperty("position","relative",o.important?"important":"");var e=function(e,t,n,i){var r=n[i];"auto"!==r&&"0"!==r.replace(/[^-\d\.]/g,"")&&(e.warn("An element that is positioned static has style."+i+"="+r+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",t),t.style.setProperty(i,"0",o.important?"important":""))};e(t,r,f,"top"),e(t,r,f,"right"),e(t,r,f,"bottom"),e(t,r,f,"left")}}""!==f.position&&(e(),u=!0);var n=document.createElement("object");n.style.cssText=c,n.tabIndex=-1,n.type="text/html",n.setAttribute("aria-hidden","true"),n.onload=function(){u||e(),function e(t,n){if(!t.contentDocument){var o=i(t);return o.checkForObjectDocumentTimeoutId&&window.clearTimeout(o.checkForObjectDocumentTimeoutId),void(o.checkForObjectDocumentTimeoutId=setTimeout((function(){o.checkForObjectDocumentTimeoutId=0,e(t,n)}),100))}n(t.contentDocument)}(this,(function(e){a(r)}))},s.isIE()||(n.data="about:blank"),i(r)&&(r.appendChild(n),i(r).o