"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e){"function"==typeof define&&define.amd?define(e):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=e():t.ResponsiveTable=e()}(window,function(){return function(u,c){function t(){if(s&&!s.hasAttribute("id")){var t=Math.random().toString(36).substr(2,16);s.setAttribute("id","responsive-table-caption-caption-"+t),u.setAttribute("aria-labelledby",s.getAttribute("id"))}u.setAttribute("tabindex","0"),u.setAttribute("role","group");var e=u.querySelector("tr"),r=e.querySelectorAll("th");if(e.getElementsByTagName("th").length===e.querySelectorAll("*").length)for(var o=0;o<r.length;o++)r[o].hasAttribute("scope")||r[o].setAttribute("scope","col");for(var n=u.querySelectorAll("tr"),i=0;i<n.length;i++){var l=n[i].firstElementChild;l.hasAttribute("scope")||l.setAttribute("scope","row")}u.parentNode.querySelector("table").scrollWidth<=u.parentNode.clientWidth?u.removeAttribute("tabindex"):s&&(s.innerText+=" "+c.scrollableText)}var s=null;return u&&(s=u.querySelector("caption"),t()),{}}});