copy dari repo om Irfan
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
var e,t=["scroll","wheel","touchstart","touchmove","touchenter","touchend","touchleave","mouseout","mouseleave","mouseup","mousedown","mousemove","mouseenter","mousewheel","mouseover"];if(function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}()){var o=EventTarget.prototype.addEventListener;e=o,EventTarget.prototype.addEventListener=function(o,r,n){var s,a="object"==typeof n&&null!==n,i=a?n.capture:n;(n=a?function(e){var t=Object.getOwnPropertyDescriptor(e,"passive");return t&&!0!==t.writable&&void 0===t.set?Object.assign({},e):e}(n):{}).passive=void 0!==(s=n.passive)?s:-1!==t.indexOf(o)&&!0,n.capture=void 0!==i&&i,e.call(this,o,r,n)},EventTarget.prototype.addEventListener._original=e}
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sources":["../src/index.js","../src/utils.js"],"sourcesContent":["import { eventListenerOptionsSupported } from './utils';\n\nconst defaultOptions = {\n passive: true,\n capture: false\n};\nconst supportedPassiveTypes = [\n 'scroll', 'wheel',\n 'touchstart', 'touchmove', 'touchenter', 'touchend', 'touchleave',\n 'mouseout', 'mouseleave', 'mouseup', 'mousedown', 'mousemove', 'mouseenter', 'mousewheel', 'mouseover'\n];\nconst getDefaultPassiveOption = (passive, eventName) => {\n if (passive !== undefined) return passive;\n\n return supportedPassiveTypes.indexOf(eventName) === -1 ? false : defaultOptions.passive;\n};\n\nconst getWritableOptions = (options) => {\n const passiveDescriptor = Object.getOwnPropertyDescriptor(options, 'passive');\n \n return passiveDescriptor && passiveDescriptor.writable !== true && passiveDescriptor.set === undefined\n ? Object.assign({}, options)\n : options;\n};\n\nconst overwriteAddEvent = (superMethod) => {\n EventTarget.prototype.addEventListener = function (type, listener, options) {\n const usesListenerOptions = typeof options === 'object' && options !== null;\n const useCapture = usesListenerOptions ? options.capture : options;\n\n options = usesListenerOptions ? getWritableOptions(options) : {};\n options.passive = getDefaultPassiveOption(options.passive, type);\n options.capture = useCapture === undefined ? defaultOptions.capture : useCapture;\n\n superMethod.call(this, type, listener, options);\n };\n\n EventTarget.prototype.addEventListener._original = superMethod;\n};\n\nconst supportsPassive = eventListenerOptionsSupported();\n\nif (supportsPassive) {\n const addEvent = EventTarget.prototype.addEventListener;\n overwriteAddEvent(addEvent);\n}\n","export const eventListenerOptionsSupported = () => {\n let supported = false;\n\n try {\n const opts = Object.defineProperty({}, 'passive', {\n get() {\n supported = true;\n }\n });\n\n window.addEventListener('test', null, opts);\n window.removeEventListener('test', null, opts);\n } catch (e) {}\n\n return supported;\n}\n"],"names":["superMethod","supportedPassiveTypes","supported","opts","Object","defineProperty","get","window","addEventListener","removeEventListener","e","eventListenerOptionsSupported","addEvent","EventTarget","prototype","type","listener","options","passive","usesListenerOptions","useCapture","capture","passiveDescriptor","getOwnPropertyDescriptor","writable","undefined","set","assign","getWritableOptions","indexOf","call","this","_original"],"mappings":"IAyB2BA,EAnBrBC,EAAwB,CAC5B,SAAU,QACV,aAAc,YAAa,aAAc,WAAY,aACrD,WAAY,aAAc,UAAW,YAAa,YAAa,aAAc,aAAc,aAiC7F,GC1C6C,WAC3C,IAAIC,GAAY,EAEhB,IACE,IAAMC,EAAOC,OAAOC,eAAe,GAAI,UAAW,CAChDC,eACEJ,GAAY,KAIhBK,OAAOC,iBAAiB,OAAQ,KAAML,GACtCI,OAAOE,oBAAoB,OAAQ,KAAMN,GACzC,MAAOO,IAET,OAAOR,ED0BeS,GAEH,CACnB,IAAMC,EAAWC,YAAYC,UAAUN,iBAlBdR,EAmBPY,EAlBlBC,YAAYC,UAAUN,iBAAmB,SAAUO,EAAMC,EAAUC,GACjE,IAhB6BC,EAgBvBC,EAAyC,iBAAZF,GAAoC,OAAZA,EACrDG,EAAsBD,EAAsBF,EAAQI,QAAUJ,GAEpEA,EAAkBE,EAbK,SAACF,GAC1B,IAAMK,EAAoBlB,OAAOmB,yBAAyBN,EAAS,WAEnE,OAAOK,IAAoD,IAA/BA,EAAkBE,eAA+CC,IAA1BH,EAAkBI,IACjFtB,OAAOuB,OAAO,GAAIV,GAClBA,EAQsCW,CAAmBX,GAAW,IAC9DC,aAnBMO,KADeP,EAoBaD,EAAQC,SAnBlBA,GAEmB,IAA9CjB,EAAsB4B,QAiBgCd,KA5BpD,EA6BPE,EAAQI,aAAyBI,IAAfL,GAAoDA,EAEtEpB,EAAY8B,KAAKC,KAAMhB,EAAMC,EAAUC,IAGzCJ,YAAYC,UAAUN,iBAAiBwB,UAAYhC"}
|
||||
@@ -0,0 +1,2 @@
|
||||
const e=["scroll","wheel","touchstart","touchmove","touchenter","touchend","touchleave","mouseout","mouseleave","mouseup","mousedown","mousemove","mouseenter","mousewheel","mouseover"];var t;(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e})()&&(t=EventTarget.prototype.addEventListener,EventTarget.prototype.addEventListener=function(o,n,r){const s="object"==typeof r&&null!==r,a=s?r.capture:r;var i;(r=s?(e=>{const t=Object.getOwnPropertyDescriptor(e,"passive");return t&&!0!==t.writable&&void 0===t.set?Object.assign({},e):e})(r):{}).passive=void 0!==(i=r.passive)?i:-1!==e.indexOf(o)&&!0,r.capture=void 0!==a&&a,t.call(this,o,n,r)},EventTarget.prototype.addEventListener._original=t);
|
||||
//# sourceMappingURL=index.modern.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.modern.js","sources":["../src/index.js","../src/utils.js"],"sourcesContent":["import { eventListenerOptionsSupported } from './utils';\n\nconst defaultOptions = {\n passive: true,\n capture: false\n};\nconst supportedPassiveTypes = [\n 'scroll', 'wheel',\n 'touchstart', 'touchmove', 'touchenter', 'touchend', 'touchleave',\n 'mouseout', 'mouseleave', 'mouseup', 'mousedown', 'mousemove', 'mouseenter', 'mousewheel', 'mouseover'\n];\nconst getDefaultPassiveOption = (passive, eventName) => {\n if (passive !== undefined) return passive;\n\n return supportedPassiveTypes.indexOf(eventName) === -1 ? false : defaultOptions.passive;\n};\n\nconst getWritableOptions = (options) => {\n const passiveDescriptor = Object.getOwnPropertyDescriptor(options, 'passive');\n \n return passiveDescriptor && passiveDescriptor.writable !== true && passiveDescriptor.set === undefined\n ? Object.assign({}, options)\n : options;\n};\n\nconst overwriteAddEvent = (superMethod) => {\n EventTarget.prototype.addEventListener = function (type, listener, options) {\n const usesListenerOptions = typeof options === 'object' && options !== null;\n const useCapture = usesListenerOptions ? options.capture : options;\n\n options = usesListenerOptions ? getWritableOptions(options) : {};\n options.passive = getDefaultPassiveOption(options.passive, type);\n options.capture = useCapture === undefined ? defaultOptions.capture : useCapture;\n\n superMethod.call(this, type, listener, options);\n };\n\n EventTarget.prototype.addEventListener._original = superMethod;\n};\n\nconst supportsPassive = eventListenerOptionsSupported();\n\nif (supportsPassive) {\n const addEvent = EventTarget.prototype.addEventListener;\n overwriteAddEvent(addEvent);\n}\n","export const eventListenerOptionsSupported = () => {\n let supported = false;\n\n try {\n const opts = Object.defineProperty({}, 'passive', {\n get() {\n supported = true;\n }\n });\n\n window.addEventListener('test', null, opts);\n window.removeEventListener('test', null, opts);\n } catch (e) {}\n\n return supported;\n}\n"],"names":["supportedPassiveTypes","superMethod","supported","opts","Object","defineProperty","get","window","addEventListener","removeEventListener","e","eventListenerOptionsSupported","EventTarget","prototype","type","listener","options","usesListenerOptions","useCapture","capture","passive","passiveDescriptor","getOwnPropertyDescriptor","writable","undefined","set","assign","getWritableOptions","indexOf","call","this","_original"],"mappings":"MAMMA,EAAwB,CAC5B,SAAU,QACV,aAAc,YAAa,aAAc,WAAY,aACrD,WAAY,aAAc,UAAW,YAAa,YAAa,aAAc,aAAc,aAgBlEC,IAAAA,ECzBkB,MAC3C,IAAIC,GAAY,EAEhB,IACE,MAAMC,EAAOC,OAAOC,eAAe,GAAI,UAAW,CAChDC,MACEJ,GAAY,KAIhBK,OAAOC,iBAAiB,OAAQ,KAAML,GACtCI,OAAOE,oBAAoB,OAAQ,KAAMN,GACzC,MAAOO,IAET,OAAOR,GD0BeS,KAfGV,EAkBRW,YAAYC,UAAUL,iBAjBvCI,YAAYC,UAAUL,iBAAmB,SAAUM,EAAMC,EAAUC,GACjE,MAAMC,EAAyC,iBAAZD,GAAoC,OAAZA,EACrDE,EAAsBD,EAAsBD,EAAQG,QAAUH,EAjBxC,IAACI,GAmB7BJ,EAAkBC,EAbMD,CAAAA,IAC1B,MAAMK,EAAoBjB,OAAOkB,yBAAyBN,EAAS,WAEnE,OAAOK,IAAoD,IAA/BA,EAAkBE,eAA+CC,IAA1BH,EAAkBI,IACjFrB,OAAOsB,OAAO,GAAIV,GAClBA,GAQsCW,CAAmBX,GAAW,IAC9DI,aAnBMI,KADeJ,EAoBaJ,EAAQI,SAnBlBA,GAEmB,IAA9CpB,EAAsB4B,QAiBgCd,KA5BpD,EA6BPE,EAAQG,aAAyBK,IAAfN,GAAoDA,EAEtEjB,EAAY4B,KAAKC,KAAMhB,EAAMC,EAAUC,IAGzCJ,YAAYC,UAAUL,iBAAiBuB,UAAY9B"}
|
||||
@@ -0,0 +1,2 @@
|
||||
var e,t=["scroll","wheel","touchstart","touchmove","touchenter","touchend","touchleave","mouseout","mouseleave","mouseup","mousedown","mousemove","mouseenter","mousewheel","mouseover"];if(function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}()){var o=EventTarget.prototype.addEventListener;e=o,EventTarget.prototype.addEventListener=function(o,r,n){var s,a="object"==typeof n&&null!==n,i=a?n.capture:n;(n=a?function(e){var t=Object.getOwnPropertyDescriptor(e,"passive");return t&&!0!==t.writable&&void 0===t.set?Object.assign({},e):e}(n):{}).passive=void 0!==(s=n.passive)?s:-1!==t.indexOf(o)&&!0,n.capture=void 0!==i&&i,e.call(this,o,r,n)},EventTarget.prototype.addEventListener._original=e}
|
||||
//# sourceMappingURL=index.module.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.module.js","sources":["../src/index.js","../src/utils.js"],"sourcesContent":["import { eventListenerOptionsSupported } from './utils';\n\nconst defaultOptions = {\n passive: true,\n capture: false\n};\nconst supportedPassiveTypes = [\n 'scroll', 'wheel',\n 'touchstart', 'touchmove', 'touchenter', 'touchend', 'touchleave',\n 'mouseout', 'mouseleave', 'mouseup', 'mousedown', 'mousemove', 'mouseenter', 'mousewheel', 'mouseover'\n];\nconst getDefaultPassiveOption = (passive, eventName) => {\n if (passive !== undefined) return passive;\n\n return supportedPassiveTypes.indexOf(eventName) === -1 ? false : defaultOptions.passive;\n};\n\nconst getWritableOptions = (options) => {\n const passiveDescriptor = Object.getOwnPropertyDescriptor(options, 'passive');\n \n return passiveDescriptor && passiveDescriptor.writable !== true && passiveDescriptor.set === undefined\n ? Object.assign({}, options)\n : options;\n};\n\nconst overwriteAddEvent = (superMethod) => {\n EventTarget.prototype.addEventListener = function (type, listener, options) {\n const usesListenerOptions = typeof options === 'object' && options !== null;\n const useCapture = usesListenerOptions ? options.capture : options;\n\n options = usesListenerOptions ? getWritableOptions(options) : {};\n options.passive = getDefaultPassiveOption(options.passive, type);\n options.capture = useCapture === undefined ? defaultOptions.capture : useCapture;\n\n superMethod.call(this, type, listener, options);\n };\n\n EventTarget.prototype.addEventListener._original = superMethod;\n};\n\nconst supportsPassive = eventListenerOptionsSupported();\n\nif (supportsPassive) {\n const addEvent = EventTarget.prototype.addEventListener;\n overwriteAddEvent(addEvent);\n}\n","export const eventListenerOptionsSupported = () => {\n let supported = false;\n\n try {\n const opts = Object.defineProperty({}, 'passive', {\n get() {\n supported = true;\n }\n });\n\n window.addEventListener('test', null, opts);\n window.removeEventListener('test', null, opts);\n } catch (e) {}\n\n return supported;\n}\n"],"names":["superMethod","supportedPassiveTypes","supported","opts","Object","defineProperty","get","window","addEventListener","removeEventListener","e","eventListenerOptionsSupported","addEvent","EventTarget","prototype","type","listener","options","passive","usesListenerOptions","useCapture","capture","passiveDescriptor","getOwnPropertyDescriptor","writable","undefined","set","assign","getWritableOptions","indexOf","call","this","_original"],"mappings":"IAyB2BA,EAnBrBC,EAAwB,CAC5B,SAAU,QACV,aAAc,YAAa,aAAc,WAAY,aACrD,WAAY,aAAc,UAAW,YAAa,YAAa,aAAc,aAAc,aAiC7F,GC1C6C,WAC3C,IAAIC,GAAY,EAEhB,IACE,IAAMC,EAAOC,OAAOC,eAAe,GAAI,UAAW,CAChDC,eACEJ,GAAY,KAIhBK,OAAOC,iBAAiB,OAAQ,KAAML,GACtCI,OAAOE,oBAAoB,OAAQ,KAAMN,GACzC,MAAOO,IAET,OAAOR,ED0BeS,GAEH,CACnB,IAAMC,EAAWC,YAAYC,UAAUN,iBAlBdR,EAmBPY,EAlBlBC,YAAYC,UAAUN,iBAAmB,SAAUO,EAAMC,EAAUC,GACjE,IAhB6BC,EAgBvBC,EAAyC,iBAAZF,GAAoC,OAAZA,EACrDG,EAAsBD,EAAsBF,EAAQI,QAAUJ,GAEpEA,EAAkBE,EAbK,SAACF,GAC1B,IAAMK,EAAoBlB,OAAOmB,yBAAyBN,EAAS,WAEnE,OAAOK,IAAoD,IAA/BA,EAAkBE,eAA+CC,IAA1BH,EAAkBI,IACjFtB,OAAOuB,OAAO,GAAIV,GAClBA,EAQsCW,CAAmBX,GAAW,IAC9DC,aAnBMO,KADeP,EAoBaD,EAAQC,SAnBlBA,GAEmB,IAA9CjB,EAAsB4B,QAiBgCd,KA5BpD,EA6BPE,EAAQI,aAAyBI,IAAfL,GAAoDA,EAEtEpB,EAAY8B,KAAKC,KAAMhB,EAAMC,EAAUC,IAGzCJ,YAAYC,UAAUN,iBAAiBwB,UAAYhC"}
|
||||
@@ -0,0 +1,2 @@
|
||||
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){var e,t=["scroll","wheel","touchstart","touchmove","touchenter","touchend","touchleave","mouseout","mouseleave","mouseup","mousedown","mousemove","mouseenter","mousewheel","mouseover"];if(function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}()){var n=EventTarget.prototype.addEventListener;e=n,EventTarget.prototype.addEventListener=function(n,o,r){var i,s="object"==typeof r&&null!==r,u=s?r.capture:r;(r=s?function(e){var t=Object.getOwnPropertyDescriptor(e,"passive");return t&&!0!==t.writable&&void 0===t.set?Object.assign({},e):e}(r):{}).passive=void 0!==(i=r.passive)?i:-1!==t.indexOf(n)&&!0,r.capture=void 0!==u&&u,e.call(this,n,o,r)},EventTarget.prototype.addEventListener._original=e}});
|
||||
//# sourceMappingURL=index.umd.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.umd.js","sources":["../src/index.js","../src/utils.js"],"sourcesContent":["import { eventListenerOptionsSupported } from './utils';\n\nconst defaultOptions = {\n passive: true,\n capture: false\n};\nconst supportedPassiveTypes = [\n 'scroll', 'wheel',\n 'touchstart', 'touchmove', 'touchenter', 'touchend', 'touchleave',\n 'mouseout', 'mouseleave', 'mouseup', 'mousedown', 'mousemove', 'mouseenter', 'mousewheel', 'mouseover'\n];\nconst getDefaultPassiveOption = (passive, eventName) => {\n if (passive !== undefined) return passive;\n\n return supportedPassiveTypes.indexOf(eventName) === -1 ? false : defaultOptions.passive;\n};\n\nconst getWritableOptions = (options) => {\n const passiveDescriptor = Object.getOwnPropertyDescriptor(options, 'passive');\n \n return passiveDescriptor && passiveDescriptor.writable !== true && passiveDescriptor.set === undefined\n ? Object.assign({}, options)\n : options;\n};\n\nconst overwriteAddEvent = (superMethod) => {\n EventTarget.prototype.addEventListener = function (type, listener, options) {\n const usesListenerOptions = typeof options === 'object' && options !== null;\n const useCapture = usesListenerOptions ? options.capture : options;\n\n options = usesListenerOptions ? getWritableOptions(options) : {};\n options.passive = getDefaultPassiveOption(options.passive, type);\n options.capture = useCapture === undefined ? defaultOptions.capture : useCapture;\n\n superMethod.call(this, type, listener, options);\n };\n\n EventTarget.prototype.addEventListener._original = superMethod;\n};\n\nconst supportsPassive = eventListenerOptionsSupported();\n\nif (supportsPassive) {\n const addEvent = EventTarget.prototype.addEventListener;\n overwriteAddEvent(addEvent);\n}\n","export const eventListenerOptionsSupported = () => {\n let supported = false;\n\n try {\n const opts = Object.defineProperty({}, 'passive', {\n get() {\n supported = true;\n }\n });\n\n window.addEventListener('test', null, opts);\n window.removeEventListener('test', null, opts);\n } catch (e) {}\n\n return supported;\n}\n"],"names":["superMethod","supportedPassiveTypes","supported","opts","Object","defineProperty","get","window","addEventListener","removeEventListener","e","eventListenerOptionsSupported","addEvent","EventTarget","prototype","type","listener","options","passive","usesListenerOptions","useCapture","capture","passiveDescriptor","getOwnPropertyDescriptor","writable","undefined","set","assign","getWritableOptions","indexOf","call","this","_original"],"mappings":"iFAyB2BA,EAnBrBC,EAAwB,CAC5B,SAAU,QACV,aAAc,YAAa,aAAc,WAAY,aACrD,WAAY,aAAc,UAAW,YAAa,YAAa,aAAc,aAAc,aAiC7F,GC1C6C,WAC3C,IAAIC,GAAY,EAEhB,IACE,IAAMC,EAAOC,OAAOC,eAAe,GAAI,UAAW,CAChDC,eACEJ,GAAY,KAIhBK,OAAOC,iBAAiB,OAAQ,KAAML,GACtCI,OAAOE,oBAAoB,OAAQ,KAAMN,GACzC,MAAOO,IAET,OAAOR,ED0BeS,GAEH,CACnB,IAAMC,EAAWC,YAAYC,UAAUN,iBAlBdR,EAmBPY,EAlBlBC,YAAYC,UAAUN,iBAAmB,SAAUO,EAAMC,EAAUC,GACjE,IAhB6BC,EAgBvBC,EAAyC,iBAAZF,GAAoC,OAAZA,EACrDG,EAAsBD,EAAsBF,EAAQI,QAAUJ,GAEpEA,EAAkBE,EAbK,SAACF,GAC1B,IAAMK,EAAoBlB,OAAOmB,yBAAyBN,EAAS,WAEnE,OAAOK,IAAoD,IAA/BA,EAAkBE,eAA+CC,IAA1BH,EAAkBI,IACjFtB,OAAOuB,OAAO,GAAIV,GAClBA,EAQsCW,CAAmBX,GAAW,IAC9DC,aAnBMO,KADeP,EAoBaD,EAAQC,SAnBlBA,GAEmB,IAA9CjB,EAAsB4B,QAiBgCd,KA5BpD,EA6BPE,EAAQI,aAAyBI,IAAfL,GAAoDA,EAEtEpB,EAAY8B,KAAKC,KAAMhB,EAAMC,EAAUC,IAGzCJ,YAAYC,UAAUN,iBAAiBwB,UAAYhC"}
|
||||
Reference in New Issue
Block a user