import i from "../../@babel/runtime/helpers/esm/objectSpread2.mjs";
var s = `accept acceptCharset accessKey action allowFullScreen allowTransparency
    alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
    charSet checked classID className colSpan cols content contentEditable contextMenu
    controls coords crossOrigin data dateTime default defer dir disabled download draggable
    encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
    headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
    is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
    mediaGroup method min minLength multiple muted name noValidate nonce open
    optimum pattern placeholder poster preload radioGroup readOnly rel required
    reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
    shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
    summary tabIndex target title type useMap value width wmode wrap`, l = `onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
    onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
    onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
    onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
    onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
    onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
    onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`, d = "".concat(s, " ").concat(l).split(/[\s\n]+/), c = "aria-", u = "data-";
function r(a, o) {
  return a.indexOf(o) === 0;
}
function m(a) {
  var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, e;
  o === !1 ? e = {
    aria: !0,
    data: !0,
    attr: !0
  } : o === !0 ? e = {
    aria: !0
  } : e = i({}, o);
  var t = {};
  return Object.keys(a).forEach(function(n) {
    // Aria
    (e.aria && (n === "role" || r(n, c)) || // Data
    e.data && r(n, u) || // Attr
    e.attr && d.includes(n)) && (t[n] = a[n]);
  }), t;
}
export {
  m as default
};
