<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <link rel="icon" type="image/x-icon" href="logo.png">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes">
    <title>SRT To xls converter by Badhesh Chauhan</title>
    <!--<script src="https:\unpkg.com\srt-parser-2@1.2.3\dist\index.js"></script> -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"
        integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="
        crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js"></script>
    <script defer data-domain="tools.badheshchauhan.com"  src="https://getanalyzr.vercel.app/tracking-script.js"></script>

    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 20px;
            background-color: #788072;
        }

        .container {
            max-width: device-width;
            margin: auto;
            padding: 20px;
            background-color: rgb(73, 84, 144);
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(126, 152, 230, 0.1);
        }

        input[type="file"] {
            margin-bottom: 20px;
        }


        thead th {
            position: sticky;
            top: 0;
            z-index: 2;
        }


        table tbody {
            width: device-width;
            border-collapse: collapse;
            margin-top: 20px;
            border-radius: 20px;
            overflow: auto;

        }

        table,
        th,
        table td {
            border: 1px solid #ddd;
            border-radius: 10px;
        }

        th,
        td {
            padding: 10px;
            text-align: left;
            border-radius: 10px;
            resize: horizontal;
            overflow: auto;

        }

        th {
            background-color: #4CAF50;
            color: white;
            cursor: pointer;
        }

        th:hover {
            background-color: #45a049;
        }

        tr:nth-child(odd) {
            background-color: #89c18f;

        }

        tr:nth-child(even) {
            background-color: #f2f2f2;
        }

        tr:hover {
            background-color: #ddd;
        }
    </style>
</head>

<body>

    <div class="container">
        <h2>SRT to xls conveter by Badhesh Chauhan</h2>
        <input type="file" id="csvFile" accept=".srt" multiple>
        <div class="table-container">
            <table id="csvTable" style="display: none; ">
                <thead>
                    <tr id="headerRow"></tr>
                </thead>
                <tbody id="tableBody"></tbody>
            </table>
        </div>
    </div>

    <script>
const _0xd9e6f6=_0x54b2;(function(_0x302446,_0x294a0a){const _0x4750c6=_0x54b2,_0xda9ccf=_0x302446();while(!![]){try{const _0x299572=parseInt(_0x4750c6(0xc2))/0x1+-parseInt(_0x4750c6(0xb3))/0x2*(-parseInt(_0x4750c6(0xcb))/0x3)+-parseInt(_0x4750c6(0xd0))/0x4*(-parseInt(_0x4750c6(0xb0))/0x5)+parseInt(_0x4750c6(0xc5))/0x6*(parseInt(_0x4750c6(0xbf))/0x7)+-parseInt(_0x4750c6(0xb8))/0x8*(parseInt(_0x4750c6(0xad))/0x9)+-parseInt(_0x4750c6(0xcd))/0xa*(-parseInt(_0x4750c6(0xc8))/0xb)+-parseInt(_0x4750c6(0xe7))/0xc*(parseInt(_0x4750c6(0xba))/0xd);if(_0x299572===_0x294a0a)break;else _0xda9ccf['push'](_0xda9ccf['shift']());}catch(_0x413658){_0xda9ccf['push'](_0xda9ccf['shift']());}}}(_0x35ba,0x97c76));function frameRateMS(_0x50158a){const _0xa4d025=_0x54b2,[_0x1cb6ed,_0x218bc9,_0x4c60ba,_0x472e66]=_0x50158a[_0xa4d025(0xd6)](':'),_0x2a8631=parseInt(_0x472e66),_0x18590d=Math[_0xa4d025(0xd7)](_0x2a8631/(0x3e8/0x19));return String(_0x1cb6ed)[_0xa4d025(0xd1)](0x2,'0')+':'+String(_0x218bc9)[_0xa4d025(0xd1)](0x2,'0')+':'+String(_0x4c60ba)[_0xa4d025(0xd1)](0x2,'0')+':'+String(_0x18590d)[_0xa4d025(0xd1)](0x2,'0');}function calculateDuration(_0x3e61ef,_0x58929e){const _0x535278=parseTimeMs(_0x3e61ef),_0x4ff024=parseTimeMs(_0x58929e),_0x5edcc1=_0x4ff024-_0x535278;return convertMs(_0x5edcc1);}function convertMs(_0xf5ea45){const _0x24bed1=_0x54b2,_0xf1a9ff=Math[_0x24bed1(0xd7)](_0xf5ea45/0x36ee80),_0x5c8a3d=Math[_0x24bed1(0xd7)](_0xf5ea45%0x36ee80/0xea60),_0x558e71=Math[_0x24bed1(0xd7)](_0xf5ea45%0xea60/0x3e8),_0x2adf9f=_0xf5ea45%0x3e8;return String(_0xf1a9ff)[_0x24bed1(0xd1)](0x2,'0')+':'+String(_0x5c8a3d)[_0x24bed1(0xd1)](0x2,'0')+':'+String(_0x558e71)[_0x24bed1(0xd1)](0x2,'0')+':'+String(_0x2adf9f)[_0x24bed1(0xd1)](0x3,'0');}function parseTimeMs(_0x1a78e4){const _0x93677a=_0x54b2,[_0x5184e8,_0x57f270,_0x399432,_0x12cd23]=_0x1a78e4[_0x93677a(0xd6)](':');return parseInt(_0x5184e8)*0x36ee80+parseInt(_0x57f270)*0xea60+parseInt(_0x399432)*0x3e8+parseInt(_0x12cd23);}function parseSrtLine(_0x2e5661){const _0x368b95=_0x54b2;var _0x3b7b5a=_0x2e5661[_0x368b95(0xab)](/(\d\d:\d\d:\d\d,\d\d\d) --> (\d\d:\d\d:\d\d,\d\d\d)\n(.*)/m);return{'start':frameRateMS(_0x3b7b5a[0x1][_0x368b95(0xdb)](',',':')),'end':frameRateMS(_0x3b7b5a[0x2][_0x368b95(0xdb)](',',':')),'duration':frameRateMS(calculateDuration(_0x3b7b5a[0x1][_0x368b95(0xdb)](',',':'),_0x3b7b5a[0x2][_0x368b95(0xdb)](',',':'))),'text':_0x3b7b5a[0x3][_0x368b95(0xc6)]()};}function parseSrt(_0x3be736){const _0x5833cd=_0x54b2;var _0x33c8ca=_0x3be736[_0x5833cd(0xdb)](/\r/g,''),_0x1adfa6=_0x33c8ca[_0x5833cd(0xd6)](/(?:^|\n\n)\d+\n|\n+$/g)[_0x5833cd(0xae)](0x1,-0x2);return $[_0x5833cd(0xdf)](_0x1adfa6,parseSrtLine);}function _0x35ba(){const _0x29b233=['href','split','floor','readAsText','xlsx','join','replace','write','File:\x20','Error\x20reading\x20file\x20','map','Error\x20parsing\x20file\x20','book_new','createElement','\x20_edited.xlsx','name','log','hidden','286908FsRKmO','application/octet-stream','match','setAttribute','241749kJEikd','slice','files','1884665fyDZDf','target','array','46WZyYYs','body','appendChild','forEach','getElementById','312AmJURb','click','559DXjZWe','onerror','download','utils','change','1716253MsQSUS','error','visibility','367431BTbndX','book_append_sheet','addEventListener','18XolbVl','trim','result','1209758DSAZOf','Subtitles','style','144453vRHEWX','onload','10BzxwAu','csvFile','from','4OZcpZP','padStart','.srt','json_to_sheet','createObjectURL'];_0x35ba=function(){return _0x29b233;};return _0x35ba();}document[_0xd9e6f6(0xb7)](_0xd9e6f6(0xce))[_0xd9e6f6(0xc4)](_0xd9e6f6(0xbe),function(_0x12cf44){const _0x44f38f=_0xd9e6f6,_0x150590=_0x12cf44[_0x44f38f(0xb1)][_0x44f38f(0xaf)];Array[_0x44f38f(0xcf)](_0x150590)[_0x44f38f(0xb6)]((_0x47dcb3,_0x5175ce)=>{setTimeout(()=>{file_reader(_0x47dcb3);},_0x5175ce*0x1388);});});function _0x54b2(_0x5d9eb0,_0x420ed3){const _0x35badb=_0x35ba();return _0x54b2=function(_0x54b268,_0x4ca208){_0x54b268=_0x54b268-0xaa;let _0x5a426a=_0x35badb[_0x54b268];return _0x5a426a;},_0x54b2(_0x5d9eb0,_0x420ed3);}async function file_reader(_0x4367e0){const _0x454a07=_0xd9e6f6;let _0x15f863=new FileReader();_0x15f863[_0x454a07(0xbb)]=function(_0x1e0cbc){const _0xa1ef33=_0x454a07;console[_0xa1ef33(0xe5)](_0x1e0cbc[_0xa1ef33(0xc0)]);},_0x15f863[_0x454a07(0xcc)]=async function(_0x60cd9d){const _0x2073d7=_0x454a07;try{let _0x4cedb8=_0x60cd9d[_0x2073d7(0xb1)][_0x2073d7(0xc7)];var _0x569af1=await parseSrt(_0x4cedb8);console[_0x2073d7(0xe5)](_0x2073d7(0xdd)+_0x4367e0[_0x2073d7(0xe4)],_0x569af1);const _0x4bb9b6=XLSX[_0x2073d7(0xbd)][_0x2073d7(0xd3)](_0x569af1),_0x2bc428=XLSX[_0x2073d7(0xbd)][_0x2073d7(0xe1)]();XLSX[_0x2073d7(0xbd)][_0x2073d7(0xc3)](_0x2bc428,_0x4bb9b6,_0x2073d7(0xc9));const _0x472783=XLSX[_0x2073d7(0xdc)](_0x2bc428,{'bookType':_0x2073d7(0xd9),'type':_0x2073d7(0xb2)}),_0x5d3d32=new Blob([_0x472783],{'type':_0x2073d7(0xaa)}),_0x5e68f4=_0x4367e0[_0x2073d7(0xe4)][_0x2073d7(0xd6)](_0x2073d7(0xd2))[_0x2073d7(0xda)]('')+_0x2073d7(0xe3),_0x200121=document[_0x2073d7(0xe2)]('a'),_0x2fb65a=URL[_0x2073d7(0xd4)](_0x5d3d32);_0x200121[_0x2073d7(0xac)](_0x2073d7(0xd5),_0x2fb65a),_0x200121[_0x2073d7(0xca)][_0x2073d7(0xc1)]=_0x2073d7(0xe6),_0x200121[_0x2073d7(0xbc)]=_0x5e68f4,document[_0x2073d7(0xb4)][_0x2073d7(0xb5)](_0x200121),_0x200121[_0x2073d7(0xb9)]();}catch(_0xe0cf86){console[_0x2073d7(0xc0)](_0x2073d7(0xe0)+_0x4367e0[_0x2073d7(0xe4)]+':',_0xe0cf86);}_0x15f863[_0x2073d7(0xbb)]=function(_0xd1c983){const _0x5145d2=_0x2073d7;console[_0x5145d2(0xc0)](_0x5145d2(0xde)+_0x4367e0[_0x5145d2(0xe4)]+':',_0xd1c983);};},_0x15f863[_0x454a07(0xd8)](_0x4367e0);}

    </script>
</body>

</html>