!function(t){"use strict";if(!("InputDeviceCapabilities"in t||"sourceCapabilities"in UIEvent.prototype)){a.prototype={get firesTouchEvents(){return this.__firesTouchEvents}};for(var n,i=new(t.InputDeviceCapabilities=a)({firesTouchEvents:!0}),o=new a({firesTouchEvents:!1}),r=(document.addEventListener("touchstart",v,!0),document.addEventListener("touchmove",v,!0),document.addEventListener("touchend",v,!0),document.addEventListener("touchcancel",v,!0),"__inputDeviceCapabilitiesPolyfill_specifiedSourceCapabilities"),u=["resize","error","load","unload","abort"],e=(Object.defineProperty(UIEvent.prototype,"sourceCapabilities",{get:function(){var e;return r in this?this[r]:0<=u.indexOf(this.type)?null:"TouchEvent"in globalThis?this instanceof TouchEvent?i:"PointerEvent"in t&&this instanceof PointerEvent?"touch"==this.pointerType?i:o:(e=Date.now()<n+1e3?i:o,Object.defineProperty(this,r,{value:e,writable:!1}),e):o},configurable:!0,enumerable:!0}),["UIEvent","MouseEvent","TouchEvent","InputEvent","CompositionEvent","FocusEvent","KeyboardEvent","WheelEvent","PointerEvent"]),s=0;s<e.length;s++)!function(e){var i;e in t&&"length"in t[e]&&!(t[e].length<1)&&(i=t[e],t[e]=function(e,t){var n=t&&t.sourceCapabilities?t.sourceCapabilities:null,e=(t&&delete t.sourceCapabilities,new i(e,t));return Object.defineProperty(e,r,{value:n,writable:!1}),e},t[e].prototype=i.prototype)}(e[s]);var c=Document.prototype.createEvent;Document.prototype.createEvent=function(e){e=c.call(this,e);return e instanceof UIEvent&&Object.defineProperty(e,r,{value:null,writable:!1}),e}}function a(e){Object.defineProperty(this,"__firesTouchEvents",{value:!!(e&&"firesTouchEvents"in e)&&e.firesTouchEvents,writable:!1,enumerable:!1})}function v(e){n=Date.now()}}(this);