3 lines
1.0 MiB
JavaScript
3 lines
1.0 MiB
JavaScript
|
|
var e=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,o){const i=t?this.allAsyncListeners:this.allSyncListeners;let s=i.get(e);return!s&&o&&(s=new Set,i.set(e,s)),s}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(e,t,o=!1){this.getListeners(e,o,!0).add(t)}removeEventListener(e,t,o=!1){const i=this.getListeners(e,o,!1);i&&(i.delete(t),0===i.size&&(o?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const o=e.type;if(t&&"event"in e){const t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}const{frameworkOverrides:i}=this,s=e=>{const o=i?()=>i.wrapIncoming(e):e;t?this.dispatchAsync(o):o()},n=this.getListeners(o,t,!1);if((n?.size??0)>0){const t=new Set(n);for(const o of t)n?.has(o)&&s(()=>o(e))}const r=this.getGlobalListeners(t);if(r.size>0){const t=new Set(r);for(const i of t)s(()=>i(o,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const e=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(e):e(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(e=>e())}};function t(e){return null==e||""===e?null:e}function o(e){return null!=e&&""!==e}function i(e){return!o(e)}function s(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function n(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function r(e,t,o=!1){const i=null==e,s=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),i&&s)return 0;if(i)return-1;if(s)return 1;function n(e,t){return e>t?1:e<t?-1:0}if("string"!=typeof e)return n(e,t);if(!o)return n(e,t);try{return e.localeCompare(t)}catch(o){return n(e,t)}}var a=/[&<>"']/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"};function d(e){return e?.toString().toString()??null}function h(e){return d(e)?.replace(a,e=>l[e])??null}function c(e){return e.eRootDiv.getRootNode()}function u(e){return c(e).activeElement}function g(e){const{gos:t,eRootDiv:i}=e;let s=null;const n=t.get("getDocument");return n&&o(n)?s=n():i&&(s=i.ownerDocument),s&&o(s)?s:document}function p(e){const t=u(e);return null===t||t===g(e).body}function m(e){return g(e).defaultView||window}function f(e){let t=null,o=null;try{t=g(e).fullscreenElement}catch(e){}finally{t||(t=c(e));const i=t.querySelector("body");o=i||(t instanceof ShadowRoot?t:t instanceof Document?t?.documentElement:t)}return o}function C(e,t,o){null==o||"string"==typeof o&&""==o?w(e,t):v(e,t,o)}function v(e,t,o){e.setAttribute(b(t),o.toString())}function w(e,t){e.removeAttribute(b(t))}function b(e){return`aria-${e}`}function y(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function S(e,t){C(e,"label",t)}function E(e,t){C(e,"labelledby",t)}function R(e,t){C(e,"live",t)}function x(e,t){C(e,"invalid",t)}function F(e,t){C(e,"hidden",t)}function P(e,t){v(e,"expanded",t)}function D(e,t){v(e,"rowindex",t)}function M(e,t){v(e,"colindex",t)}function k(e,t){C(e,"selected",t)}function T(e,t){!function(e,t){C(e,"controls",t)}(e,t.id),E(t,e.id)}function I(e,t){C(e,"owns",t)}function A(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var L="[disabled], .ag-disabled:not(.ag-button), .ag-disabl
|
||
|
|
//# sourceMappingURL=index.js.map
|