{"version":3,"sources":["jsdelivr-header.js","/npm/event-listener-options-polyfill@1.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACHA,IAAI,oBAAqB,EASzB,GAPA,OAAO,iBAAiB,OAAQ,KAAM,CACpC,QAAI,GAEF,OADA,oBAAqB,GACd,CACT,KAGG,mBAAoB,CACvB,MAAM,EAAoB,KAAK,UAAU,iBACnC,EAAuB,KAAK,UAAU,oBACtC,EAAkB,MAAM,UAAU,eAElC,EAAS,SAAS,EAAW,EAAU,GAAU,GACrD,MAAM,EAAU,KACV,EAA4B,iBAAZ,EAChB,EAAW,GAAU,YAAa,IAA+B,IAApB,EAAQ,QACrD,EAAQ,GAAU,SAAU,IAA4B,IAAjB,EAAQ,KAC/C,EAAW,GAAU,YAAa,IAA+B,IAApB,EAAQ,SACzD,CACA,YAAa,SAAS,GAChB,GACF,EAAqB,KAAK,EAAS,EAAW,KAAM,GAEtD,EAAE,UAAY,EACU,mBAAb,EACT,EAAS,GACA,QAAS,GAClB,EAAS,YAAY,EAEzB,EACA,IAAK,WACH,EAAkB,KAAK,EAAS,EAAW,KAAM,EACnD,IACA,KACJ,EAEM,EAAY,SAAS,EAAW,EAAU,GAAU,GACxD,MACM,EACe,iBAAZ,GACP,YAAa,IACO,IAApB,EAAQ,QACV,EAAqB,KALL,KAKmB,EAAW,EAAU,EAC1D,EAEM,EAAoB,WACpB,KAAK,UACP,QAAQ,MACN,qEAIJ,EAAgB,MAAM,KACxB,EAEA,OAAO,eAAe,KAAK,UAAW,mBAAoB,CACxD,IAAK,WACH,OAAO,CACT,IAGF,OAAO,eAAe,KAAK,UAAW,sBAAuB,CAC3D,IAAK,WACH,OAAO,CACT,IAGF,OAAO,eAAe,MAAM,UAAW,iBAAkB,CACvD,IAAK,WACH,OAAO,CACT,GAEJ","file":"/npm/event-listener-options-polyfill@1.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/event-listener-options-polyfill@1.0.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * addEventListener options\n */\nlet _isSupportsOptions = false\n\nwindow.addEventListener('test', null, {\n  get once() {\n    _isSupportsOptions = true\n    return false\n  }\n})\n\nif (!_isSupportsOptions) {\n  const _addEventListener = Node.prototype.addEventListener\n  const _removeEventListener = Node.prototype.removeEventListener\n  const _preventDefault = Event.prototype.preventDefault\n\n  const _addFn = function(eventType, listener, options = false) {\n    const _target = this\n    const _isObj = typeof options === 'object'\n    const _capture = _isObj && 'capture' in options && options.capture === true\n    const _once = _isObj && 'once' in options && options.once === true\n    const _passive = _isObj && 'passive' in options && options.passive === true\n    ;({\n      handleEvent: function(e) {\n        if (_once) {\n          _removeEventListener.call(_target, eventType, this, _capture)\n        }\n        e.__passive = _passive\n        if (typeof listener === 'function') {\n          listener(e)\n        } else if ('add' in listener) {\n          listener.handleEvent(e)\n        }\n      },\n      add: function() {\n        _addEventListener.call(_target, eventType, this, _capture)\n      }\n    }.add())\n  }\n\n  const _removeFn = function(eventType, listener, options = false) {\n    const _target = this\n    const _capture =\n      typeof options === 'object' &&\n      'capture' in options &&\n      options.capture === true\n    _removeEventListener.call(_target, eventType, listener, _capture)\n  }\n\n  const _preventDefaultFn = function() {\n    if (this.__passive) {\n      console.error(\n        'Unable to preventDefault inside passive event listener invocation'\n      )\n      return\n    }\n    _preventDefault.apply(this)\n  }\n\n  Object.defineProperty(Node.prototype, 'addEventListener', {\n    get: function() {\n      return _addFn\n    }\n  })\n\n  Object.defineProperty(Node.prototype, 'removeEventListener', {\n    get: function() {\n      return _removeFn\n    }\n  })\n\n  Object.defineProperty(Event.prototype, 'preventDefault', {\n    get: function() {\n      return _preventDefaultFn\n    }\n  })\n}\n"]}