const g_wiggle_canvas=$('#captions-'+'canvas-wig'+'gle-contai'+'ner-canvas');let g_wiggle_animation_running=![];function applyWiggleAnimationToPreview(t,K,e){const O={'clDen':function(T,s,Y,J){return T(s,Y,J);},'kVKTS':'#checkbox-'+'captions-g'+'raphics-wi'+'ggle','iPFit':':checked','NZGDS':function(T,s){return T/s;},'XEoKt':'captions-c'+'anvas-wigg'+'le-contain'+'er-canvas','gpAGS':function(T,s){return T!==s;},'OfmTB':'Wiggle\x20can'+'vas\x20dimens'+'ions\x20chang'+'ed\x20from','NhNwQ':function(T,s){return T>s;},'rvsLe':function(T,s){return T(s);}};if(!$(O['kVKTS'])['is'](O['iPFit'])){g_wiggle_animation_running=![];return;}const {dx:z,dy:y}=g_captions_styled['wiggleOffs'+'et'](O['NZGDS'](K,0x7f2+-0x1b77+0x176d)),h=document['getElement'+'ById'](O['XEoKt']);(h['width']!==window['g_wiggle_o'+'riginal_wi'+'dth']||O['gpAGS'](h['height'],window['g_wiggle_o'+'riginal_he'+'ight']))&&(console['log'](O['OfmTB'],h['width'],'x',h['height'],'to',window['g_wiggle_o'+'riginal_wi'+'dth'],'x',window['g_wiggle_o'+'riginal_he'+'ight']),h['width']=window['g_wiggle_o'+'riginal_wi'+'dth'],h['height']=window['g_wiggle_o'+'riginal_he'+'ight']);const V=h['getContext']('2d');V['clearRect'](-0x50e*0x3+0x1add+-0xbb3,0x5*0x23b+-0x794*0x2+0x401,h['width'],h['height']);if(window['g_wiggle_b'+'uffer_canv'+'as']&&O['NhNwQ'](g_wiggle_buffer_canvas['width'],0x614*0x1+-0xa3a+0x3b*0x12)&&O['NhNwQ'](g_wiggle_buffer_canvas['height'],-0x1d4b*-0x1+-0xe9c+-0xeaf))V['drawImage'](g_wiggle_buffer_canvas,z,y);else{console['warn']('Wiggle\x20buf'+'fer\x20canvas'+'\x20not\x20ready'+',\x20skipping'+'\x20frame'),g_wiggle_animation_running=![];return;}O['rvsLe'](requestAnimationFrame,T=>{O['clDen'](applyWiggleAnimationToPreview,t,T,!![]);});}async function startWiggleAnimation(){const t={'PseKH':function(s,Y){return s(Y);},'QwMJF':'#checkbox-'+'captions-g'+'raphics-wi'+'ggle','umkKr':'captions-c'+'anvas-cont'+'ainer-canv'+'as','LqlRo':'captions-c'+'anvas-wigg'+'le-contain'+'er-canvas','mZFnK':'Wiggle\x20can'+'vas\x20initia'+'lized\x20with'+'\x20dimension'+'s:','UzKJB':function(s){return s();},'YWvWv':'Creating\x20w'+'iggle\x20buff'+'er\x20canvas:','kiQKI':'all','cyslm':'Wiggle\x20buf'+'fer\x20has\x20co'+'ntent:','JZEMx':function(s,Y,J,L){return s(Y,J,L);}};if(!t['PseKH']($,t['QwMJF'])['is'](':checked')||g_wiggle_animation_running)return;g_wiggle_animation_running=!![];const K=await jsxProject['sequenceWi'+'dth'](),e=document['getElement'+'ById'](t['umkKr']),O=document['getElement'+'ById'](t['LqlRo']);O['width']=e['width'],O['height']=e['height'],window['g_wiggle_o'+'riginal_wi'+'dth']=O['width'],window['g_wiggle_o'+'riginal_he'+'ight']=O['height'],console['log'](t['mZFnK'],O['width'],'x',O['height']);const z=t['UzKJB'](test_76_get_caption_render_params);window['g_wiggle_b'+'uffer_canv'+'as']=document['createElem'+'ent']('canvas'),g_wiggle_buffer_canvas['width']=O['width'],g_wiggle_buffer_canvas['height']=O['height'],console['log'](t['YWvWv'],g_wiggle_buffer_canvas['width'],'x',g_wiggle_buffer_canvas['height']);const y=test_74_render_captions_by_index(g_wiggle_buffer_canvas,-0x2025+-0x24e8+-0x450d*-0x1,-0x1763+-0x1cfe+0x3461,z,t['kiQKI']);console['log']('Wiggle\x20buf'+'fer\x20render'+'\x20result:',y);const h=g_wiggle_buffer_canvas['getContext']('2d'),V=h['getImageDa'+'ta'](0x1e7+0x6a4+0xf3*-0x9,0x802*-0x2+0x135b+0x5f*-0x9,g_wiggle_buffer_canvas['width'],g_wiggle_buffer_canvas['height']),T=V['data']['some'](s=>s!==0xdc7+0x2605+-0x33cc);console['log'](t['cyslm'],T),t['JZEMx'](applyWiggleAnimationToPreview,K,performance['now'](),![]);}function updateWiggleBuffer(){const t={'JhwHZ':'Updating\x20w'+'iggle\x20buff'+'er\x20due\x20to\x20'+'position\x20c'+'hange','elXDJ':'all'};if(!g_wiggle_animation_running||!window['g_wiggle_b'+'uffer_canv'+'as'])return;console['log'](t['JhwHZ']);const K=test_76_get_caption_render_params(),e=g_wiggle_buffer_canvas['getContext']('2d');e['clearRect'](0x2009+0x51*0xf+-0x24c8,0xa*0x37+-0x1d0+-0x56,g_wiggle_buffer_canvas['width'],g_wiggle_buffer_canvas['height']),test_74_render_captions_by_index(g_wiggle_buffer_canvas,-0x2*-0x42c+-0x26a2+-0x1e4a*-0x1,0x656*0x3+-0x5e3+-0xd1f,K,t['elXDJ']);}