moistdio's picture
Upload folder using huggingface_hub
6831a54 verified
const _0x1eae8f=_0x2eaf;function _0x42d8(){const _0x102277=['handleDragEnd','defineProperty','deltaY','minimize','temp_canvas','scribbleSoftness_','lineTo','scribbleWidthBlock_','uuid','zIndex','6852678HjWBjr','undo','adjustInitialPositionAndScale','maximized','dispatchEvent','createElement','4nZyTlO','pointerenter','uploadBase64','clientY','clientWidth','on_img_upload','putImageData','offsetY','type','length','addEventListener','scribbleAlphaBlock_','saveState','pointerInsideContainer','scribbleIndicator_','pointerdown','wheel','drawImage','grabbing','img','background_gradio_bind','imageInput_','slice','getBoundingClientRect','1000','maxButton_','target','getImageData','listen','removeImage','history','scribbleAlpha','pointerup','cursor','pointer','no_scribbles','temp_draw_bg','getElementById','src','isInsideImage','lineCap','scribbleSoftness','pointermove','version','block','restoreState','getAsFile','imgY','inline-block','keydown','0.5','foreground_gradio_bind','globalCompositeOperation','position','pointerout','copy','sync_lock','drop','dragged_just_now','items','dragging','historyIndex','scribbleAlpha_','image/png','fillStyle','paste','key','widthLabel_','uploadButton_','100vw','crosshair','handleFileUpload','borderColor','button','readAsDataURL','3606888WbDAFV','resizeLine_','on_drawing_canvas_upload','onload','scribbleSoftnessBlock_','minButton_','disabled','files','pow','uploadHint_','style','pointerover','canvas','\x20textarea','resetButton_','offsetX','100vh','undoButton_','getContext','2969335Xxetse','scribbleColor','2934656TuMqMn','scribbleColorBlock_','result','clientHeight','scribbleWidth_','scribbleColorFixed','originalState','lineWidth','globalAlpha','contrast_pattern','indexOf','input','redo','maximize','stopPropagation','197474tSrrzj','100%','push','click','scribbleWidthFixed','stroke','strokeStyle','uploadBase64DrawingCanvas','drawingCanvas_','handleDraw','repeat','initial_height','beginPath','top','redoButton_','grab','scribbleWidth','drawingCanvas','max','dataTransfer','source-over','orgHeight','removeButton_','destination-out','lineJoin','undefined','none','clientX','set_value','gradio_config','no_upload','handlePaste','toolbar_','pointerleave','scribbleAlphaFixed','centerButton_','width','resizing','scribbleColor_','fixed','imageContainer_','drawing','toDataURL','imgScale','temp_draw_points','dragleave','round','updateUndoRedoButtons','alphaLabel_','contrast_scribbles','left','start','container_','orgWidth','#ffffff','image','forEach','image_','querySelector','3goXQHB','clearRect','value','263602XCaQNQ','#000000','display','previousValue','imgX','3369771HkYgtf','scribbleSoftnessFixed','opacity','contextmenu','fillRect','clipboardData','change','height','moveTo','preventDefault'];_0x42d8=function(){return _0x102277;};return _0x42d8();}(function(_0x40bded,_0x2cea07){const _0x36708b=_0x2eaf,_0x1cf132=_0x40bded();while(!![]){try{const _0x1a6e11=parseInt(_0x36708b(0x1a6))/0x1+parseInt(_0x36708b(0x168))/0x2*(parseInt(_0x36708b(0x1a3))/0x3)+-parseInt(_0x36708b(0x1c5))/0x4*(-parseInt(_0x36708b(0x157))/0x5)+-parseInt(_0x36708b(0x144))/0x6+parseInt(_0x36708b(0x1bf))/0x7+-parseInt(_0x36708b(0x159))/0x8+-parseInt(_0x36708b(0x1ab))/0x9;if(_0x1a6e11===_0x2cea07)break;else _0x1cf132['push'](_0x1cf132['shift']());}catch(_0x14d113){_0x1cf132['push'](_0x1cf132['shift']());}}}(_0x42d8,0x90b79));class GradioTextAreaBind{constructor(_0x5b2932,_0x1f6762){const _0x4c38cb=_0x2eaf;this[_0x4c38cb(0x1df)]=document[_0x4c38cb(0x1a2)]('#'+_0x5b2932+'.'+_0x1f6762+_0x4c38cb(0x151)),this[_0x4c38cb(0x131)]=![],this[_0x4c38cb(0x1a9)]='';}['set_value'](_0x5171f){const _0x4a6f5c=_0x2eaf;if(this[_0x4a6f5c(0x131)])return;this[_0x4a6f5c(0x131)]=!![],this['target'][_0x4a6f5c(0x1a5)]=_0x5171f,this['previousValue']=_0x5171f;let _0x1b13d6=new Event(_0x4a6f5c(0x164),{'bubbles':!![]});Object[_0x4a6f5c(0x1b6)](_0x1b13d6,_0x4a6f5c(0x1df),{'value':this['target']}),this[_0x4a6f5c(0x1df)][_0x4a6f5c(0x1c3)](_0x1b13d6),this[_0x4a6f5c(0x1a9)]=_0x5171f,this[_0x4a6f5c(0x131)]=![];}['listen'](_0x4c2a9d){setInterval(()=>{const _0x593639=_0x2eaf;if(this[_0x593639(0x1df)]['value']!==this['previousValue']){this[_0x593639(0x1a9)]=this[_0x593639(0x1df)][_0x593639(0x1a5)];if(this[_0x593639(0x131)])return;this[_0x593639(0x131)]=!![],_0x4c2a9d(this[_0x593639(0x1df)]['value']),this['sync_lock']=![];}},0x64);}}class ForgeCanvas{constructor(_0x5beeb9,_0xea442e=![],_0x45532e=![],_0x5398d0=![],_0x2a5acb=0x200,_0x362303=_0x1eae8f(0x1a7),_0x9ba60a=![],_0x478292=0x4,_0x5d032a=![],_0x4ae942=0x64,_0x53b989=![],_0x2e16e6=0x0,_0x2d1657=![]){const _0x14d08a=_0x1eae8f;this[_0x14d08a(0x185)]=gradio_config,this[_0x14d08a(0x1bd)]=_0x5beeb9,this[_0x14d08a(0x1e8)]=_0x45532e,this['contrast_scribbles']=_0x5398d0,this[_0x14d08a(0x186)]=_0xea442e,this[_0x14d08a(0x173)]=_0x2a5acb,this[_0x14d08a(0x1d8)]=null,this['imgX']=0x0,this[_0x14d08a(0x128)]=0x0,this[_0x14d08a(0x19d)]=0x0,this[_0x14d08a(0x17d)]=0x0,this[_0x14d08a(0x193)]=0x1,this[_0x14d08a(0x135)]=![],this[_0x14d08a(0x133)]=![],this[_0x14d08a(0x18d)]=![],this[_0x14d08a(0x191)]=![],this[_0x14d08a(0x158)]=_0x362303,this[_0x14d08a(0x178)]=_0x478292,this[_0x14d08a(0x1e4)]=_0x4ae942,this['scribbleSoftness']=_0x2e16e6,this[_0x14d08a(0x15e)]=_0x9ba60a,this[_0x14d08a(0x16c)]=_0x5d032a,this[_0x14d08a(0x18a)]=_0x53b989,this[_0x14d08a(0x1ac)]=_0x2d1657,this[_0x14d08a(0x1e3)]=[],this[_0x14d08a(0x136)]=-0x1,this[_0x14d08a(0x1c2)]=![],this[_0x14d08a(0x15f)]={},this['contrast_pattern']=null,this[_0x14d08a(0x1d2)]=![],this[_0x14d08a(0x1b9)]=document[_0x14d08a(0x1c4)](_0x14d08a(0x150)),this[_0x14d08a(0x194)]=[],this['temp_draw_bg']=null,this[_0x14d08a(0x1d9)]=new GradioTextAreaBind(this[_0x14d08a(0x1bd)],'logical_image_background'),this[_0x14d08a(0x12c)]=new GradioTextAreaBind(this[_0x14d08a(0x1bd)],'logical_image_foreground'),this[_0x14d08a(0x19b)]();}[_0x1eae8f(0x19b)](){const _0x2d2c8a=_0x1eae8f;let _0x4dc0af=this;const _0x3f961d=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x190)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x2d58fe=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x1a1)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0xc35a08=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x145)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0xef0549=document['getElementById'](_0x2d2c8a(0x19c)+_0x4dc0af['uuid']),_0x2293a4=document['getElementById'](_0x2d2c8a(0x188)+_0x4dc0af['uuid']),_0x2b661e=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x13d)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x238c2e=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x152)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x10e529=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x18b)+_0x4dc0af['uuid']),_0x57ef9e=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x17e)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x16c514=document['getElementById']('undoButton_'+_0x4dc0af['uuid']),_0x3fc10f=document[_0x2d2c8a(0x1ea)]('redoButton_'+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x580c6b=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x170)+_0x4dc0af['uuid']),_0x3714ec=document['getElementById'](_0x2d2c8a(0x1de)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x182ad6=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x149)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x4d9ddb=document['getElementById'](_0x2d2c8a(0x1d3)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x302bda=document[_0x2d2c8a(0x1ea)]('uploadHint_'+_0x4dc0af['uuid']),_0xfed598=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x18e)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x34c31c=document['getElementById'](_0x2d2c8a(0x15a)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x49f5db=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x15d)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x44d4c0=document['getElementById'](_0x2d2c8a(0x13c)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x33c70c=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x1bc)+_0x4dc0af['uuid']),_0x1ae212=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x137)+_0x4dc0af['uuid']),_0x1434c5=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x198)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0xfc1c97=document['getElementById'](_0x2d2c8a(0x1d0)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x4b344c=document['getElementById'](_0x2d2c8a(0x1ba)+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0xd693b6=document[_0x2d2c8a(0x1ea)]('softnessLabel_'+_0x4dc0af[_0x2d2c8a(0x1bd)]),_0x499f75=document[_0x2d2c8a(0x1ea)](_0x2d2c8a(0x148)+_0x4dc0af[_0x2d2c8a(0x1bd)]);_0xfed598[_0x2d2c8a(0x1a5)]=_0x4dc0af['scribbleColor'],_0x49f5db[_0x2d2c8a(0x1a5)]=_0x4dc0af[_0x2d2c8a(0x178)],_0x1ae212[_0x2d2c8a(0x1a5)]=_0x4dc0af[_0x2d2c8a(0x1e4)],_0x4b344c[_0x2d2c8a(0x1a5)]=_0x4dc0af[_0x2d2c8a(0x122)];const _0x4dde8d=_0x4dc0af[_0x2d2c8a(0x178)]*0x14;_0x4d9ddb[_0x2d2c8a(0x14e)][_0x2d2c8a(0x18c)]=_0x4dde8d+'px',_0x4d9ddb['style'][_0x2d2c8a(0x1b2)]=_0x4dde8d+'px',_0xef0549[_0x2d2c8a(0x14e)]['height']=_0x4dc0af[_0x2d2c8a(0x173)]+'px',_0x580c6b[_0x2d2c8a(0x18c)]=_0x3f961d[_0x2d2c8a(0x1c9)],_0x580c6b[_0x2d2c8a(0x1b2)]=_0x3f961d[_0x2d2c8a(0x15c)];const _0x4e0dea=_0x580c6b['getContext']('2d');_0x4dc0af[_0x2d2c8a(0x179)]=_0x580c6b;_0x4dc0af[_0x2d2c8a(0x1e8)]&&(_0x238c2e[_0x2d2c8a(0x14e)][_0x2d2c8a(0x1a8)]='none',_0x16c514['style'][_0x2d2c8a(0x1a8)]=_0x2d2c8a(0x182),_0x3fc10f['style']['display']=_0x2d2c8a(0x182),_0xfed598[_0x2d2c8a(0x14e)][_0x2d2c8a(0x1a8)]=_0x2d2c8a(0x182),_0x34c31c[_0x2d2c8a(0x14e)][_0x2d2c8a(0x1a8)]=_0x2d2c8a(0x182),_0x33c70c['style'][_0x2d2c8a(0x1a8)]=_0x2d2c8a(0x182),_0xfc1c97[_0x2d2c8a(0x14e)][_0x2d2c8a(0x1a8)]=_0x2d2c8a(0x182),_0x499f75[_0x2d2c8a(0x14e)][_0x2d2c8a(0x1a8)]=_0x2d2c8a(0x182),_0x4d9ddb[_0x2d2c8a(0x14e)]['display']=_0x2d2c8a(0x182),_0x580c6b[_0x2d2c8a(0x14e)]['display']=_0x2d2c8a(0x182));_0x4dc0af[_0x2d2c8a(0x186)]&&(_0x2b661e[_0x2d2c8a(0x14e)][_0x2d2c8a(0x1a8)]='none',_0x302bda[_0x2d2c8a(0x14e)][_0x2d2c8a(0x1a8)]=_0x2d2c8a(0x182));if(_0x4dc0af[_0x2d2c8a(0x199)]){_0x34c31c[_0x2d2c8a(0x14e)][_0x2d2c8a(0x1a8)]=_0x2d2c8a(0x182),_0xfc1c97[_0x2d2c8a(0x14e)][_0x2d2c8a(0x1a8)]=_0x2d2c8a(0x182),_0x499f75[_0x2d2c8a(0x14e)][_0x2d2c8a(0x1a8)]='none';const _0x34ac43=_0x4dc0af['temp_canvas'],_0x29146f=0xa;_0x34ac43['width']=_0x29146f*0x2,_0x34ac43[_0x2d2c8a(0x1b2)]=_0x29146f*0x2;const _0x33c46f=_0x34ac43[_0x2d2c8a(0x156)]('2d');_0x33c46f['fillStyle']=_0x2d2c8a(0x19e),_0x33c46f[_0x2d2c8a(0x1af)](0x0,0x0,_0x29146f,_0x29146f),_0x33c46f[_0x2d2c8a(0x1af)](_0x29146f,_0x29146f,_0x29146f,_0x29146f),_0x33c46f[_0x2d2c8a(0x139)]=_0x2d2c8a(0x1a7),_0x33c46f[_0x2d2c8a(0x1af)](_0x29146f,0x0,_0x29146f,_0x29146f),_0x33c46f[_0x2d2c8a(0x1af)](0x0,_0x29146f,_0x29146f,_0x29146f),_0x4dc0af['contrast_pattern']=_0x4e0dea['createPattern'](_0x34ac43,_0x2d2c8a(0x172)),_0x580c6b['style'][_0x2d2c8a(0x1ad)]=_0x2d2c8a(0x12b);}(_0x4dc0af[_0x2d2c8a(0x199)]||_0x4dc0af['scribbleColorFixed']&&_0x4dc0af['scribbleAlphaFixed']&&_0x4dc0af[_0x2d2c8a(0x1ac)])&&(_0x33c70c[_0x2d2c8a(0x14e)][_0x2d2c8a(0x18c)]=_0x2d2c8a(0x169),_0x49f5db['style'][_0x2d2c8a(0x18c)]=_0x2d2c8a(0x169),_0x44d4c0[_0x2d2c8a(0x14e)][_0x2d2c8a(0x1a8)]=_0x2d2c8a(0x182));_0x4dc0af['scribbleColorFixed']&&(_0x34c31c[_0x2d2c8a(0x14e)]['display']=_0x2d2c8a(0x182));_0x4dc0af['scribbleWidthFixed']&&(_0x33c70c[_0x2d2c8a(0x14e)][_0x2d2c8a(0x1a8)]=_0x2d2c8a(0x182));_0x4dc0af[_0x2d2c8a(0x18a)]&&(_0xfc1c97['style'][_0x2d2c8a(0x1a8)]='none');_0x4dc0af[_0x2d2c8a(0x1ac)]&&(_0x499f75[_0x2d2c8a(0x14e)][_0x2d2c8a(0x1a8)]=_0x2d2c8a(0x182));const _0x188690=new ResizeObserver(()=>{const _0xfe66bb=_0x2d2c8a;_0x4dc0af['adjustInitialPositionAndScale'](),_0x4dc0af[_0xfe66bb(0x1d6)]();});_0x188690['observe'](_0xef0549),document['getElementById']('imageInput_'+_0x4dc0af[_0x2d2c8a(0x1bd)])[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x1b1),function(_0x1a058f){const _0x5af6fe=_0x2d2c8a;_0x4dc0af['handleFileUpload'](_0x1a058f['target'][_0x5af6fe(0x14b)][0x0]);}),_0x2b661e[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x16b),function(){const _0x17c27c=_0x2d2c8a;if(_0x4dc0af[_0x17c27c(0x186)])return;document[_0x17c27c(0x1ea)]('imageInput_'+_0x4dc0af[_0x17c27c(0x1bd)])[_0x17c27c(0x16b)]();}),_0x238c2e['addEventListener']('click',function(){_0x4dc0af['resetImage']();}),_0x10e529[_0x2d2c8a(0x1cf)]('click',function(){const _0x50ed6c=_0x2d2c8a;_0x4dc0af[_0x50ed6c(0x1c1)](),_0x4dc0af[_0x50ed6c(0x1d6)]();}),_0x57ef9e[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x16b),function(){_0x4dc0af['removeImage']();}),_0x16c514[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x16b),function(){_0x4dc0af['undo']();}),_0x3fc10f['addEventListener'](_0x2d2c8a(0x16b),function(){const _0x2a3d4c=_0x2d2c8a;_0x4dc0af[_0x2a3d4c(0x165)]();}),_0xfed598[_0x2d2c8a(0x1cf)]('input',function(){const _0x4b2a8b=_0x2d2c8a;_0x4dc0af[_0x4b2a8b(0x158)]=this['value'],_0x4d9ddb['style'][_0x4b2a8b(0x141)]=_0x4dc0af['scribbleColor'];}),_0x49f5db[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x164),function(){const _0x2cc1e6=_0x2d2c8a;_0x4dc0af[_0x2cc1e6(0x178)]=this[_0x2cc1e6(0x1a5)];const _0x176e47=_0x4dc0af['scribbleWidth']*0x14;_0x4d9ddb[_0x2cc1e6(0x14e)][_0x2cc1e6(0x18c)]=_0x176e47+'px',_0x4d9ddb[_0x2cc1e6(0x14e)][_0x2cc1e6(0x1b2)]=_0x176e47+'px';}),_0x1ae212['addEventListener'](_0x2d2c8a(0x164),function(){const _0x4ca0dd=_0x2d2c8a;_0x4dc0af['scribbleAlpha']=this[_0x4ca0dd(0x1a5)];}),_0x4b344c[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x164),function(){const _0x864aea=_0x2d2c8a;_0x4dc0af[_0x864aea(0x122)]=this[_0x864aea(0x1a5)];}),_0x580c6b[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x1d4),function(_0x4e467a){const _0x39ac55=_0x2d2c8a;if(!_0x4dc0af[_0x39ac55(0x1d8)]||_0x4e467a[_0x39ac55(0x142)]!==0x0||_0x4dc0af[_0x39ac55(0x1e8)])return;const _0x3e57e6=_0x580c6b['getBoundingClientRect']();_0x4dc0af[_0x39ac55(0x191)]=!![],_0x580c6b[_0x39ac55(0x14e)][_0x39ac55(0x1e6)]='crosshair',_0x4d9ddb[_0x39ac55(0x14e)]['display']=_0x39ac55(0x182),_0x4dc0af[_0x39ac55(0x194)]=[[(_0x4e467a['clientX']-_0x3e57e6[_0x39ac55(0x19a)])/_0x4dc0af[_0x39ac55(0x193)],(_0x4e467a[_0x39ac55(0x1c8)]-_0x3e57e6[_0x39ac55(0x175)])/_0x4dc0af[_0x39ac55(0x193)]]],_0x4dc0af[_0x39ac55(0x1e9)]=_0x4e0dea[_0x39ac55(0x1e0)](0x0,0x0,_0x580c6b[_0x39ac55(0x18c)],_0x580c6b[_0x39ac55(0x1b2)]),_0x4dc0af[_0x39ac55(0x171)](_0x4e467a);}),_0x580c6b[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x123),function(_0x2acad5){const _0x13a2f6=_0x2d2c8a;_0x4dc0af['drawing']&&_0x4dc0af[_0x13a2f6(0x171)](_0x2acad5);_0x4dc0af[_0x13a2f6(0x1d8)]&&!_0x4dc0af[_0x13a2f6(0x135)]&&(_0x580c6b[_0x13a2f6(0x14e)][_0x13a2f6(0x1e6)]=_0x13a2f6(0x13f));if(_0x4dc0af['img']&&!_0x4dc0af[_0x13a2f6(0x191)]&&!_0x4dc0af[_0x13a2f6(0x135)]&&!_0x4dc0af[_0x13a2f6(0x1e8)]){const _0x47c4c4=_0x3f961d[_0x13a2f6(0x1dc)](),_0x52af84=_0x4dc0af[_0x13a2f6(0x178)]*0xa;_0x4d9ddb['style']['left']=_0x2acad5['clientX']-_0x47c4c4[_0x13a2f6(0x19a)]-_0x52af84+'px',_0x4d9ddb['style'][_0x13a2f6(0x175)]=_0x2acad5[_0x13a2f6(0x1c8)]-_0x47c4c4['top']-_0x52af84+'px',_0x4d9ddb[_0x13a2f6(0x14e)][_0x13a2f6(0x1a8)]=_0x13a2f6(0x125);}}),_0x580c6b['addEventListener'](_0x2d2c8a(0x1e5),function(){const _0x511c21=_0x2d2c8a;_0x4dc0af[_0x511c21(0x191)]=![],_0x580c6b[_0x511c21(0x14e)][_0x511c21(0x1e6)]='',_0x4dc0af['saveState']();}),_0x580c6b['addEventListener'](_0x2d2c8a(0x189),function(){const _0x2f2d39=_0x2d2c8a;_0x4dc0af[_0x2f2d39(0x191)]=![],_0x580c6b[_0x2f2d39(0x14e)]['cursor']='',_0x4d9ddb['style']['display']=_0x2f2d39(0x182);}),_0x2293a4[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x1d4),function(_0x67876){_0x67876['stopPropagation']();}),_0x3f961d[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x1d4),function(_0x16bd10){const _0x28c4e5=_0x2d2c8a,_0x3b1aec=_0x3f961d[_0x28c4e5(0x1dc)](),_0x13e875=_0x16bd10[_0x28c4e5(0x183)]-_0x3b1aec['left'],_0x1f3529=_0x16bd10[_0x28c4e5(0x1c8)]-_0x3b1aec['top'];if(_0x16bd10['button']===0x2&&_0x4dc0af['isInsideImage'](_0x13e875,_0x1f3529))_0x4dc0af[_0x28c4e5(0x135)]=!![],_0x4dc0af[_0x28c4e5(0x153)]=_0x13e875-_0x4dc0af[_0x28c4e5(0x1aa)],_0x4dc0af[_0x28c4e5(0x1cc)]=_0x1f3529-_0x4dc0af[_0x28c4e5(0x128)],_0x2d58fe['style'][_0x28c4e5(0x1e6)]=_0x28c4e5(0x1d7),_0x580c6b[_0x28c4e5(0x14e)][_0x28c4e5(0x1e6)]=_0x28c4e5(0x1d7),_0x4d9ddb[_0x28c4e5(0x14e)][_0x28c4e5(0x1a8)]=_0x28c4e5(0x182);else _0x16bd10[_0x28c4e5(0x142)]===0x0&&!_0x4dc0af[_0x28c4e5(0x1d8)]&&!_0x4dc0af[_0x28c4e5(0x186)]&&document[_0x28c4e5(0x1ea)]('imageInput_'+_0x4dc0af[_0x28c4e5(0x1bd)])['click']();}),_0x3f961d[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x123),function(_0x3ccb2c){const _0x12d938=_0x2d2c8a;if(_0x4dc0af[_0x12d938(0x135)]){const _0x395c46=_0x3f961d['getBoundingClientRect'](),_0x43762a=_0x3ccb2c[_0x12d938(0x183)]-_0x395c46['left'],_0x5dc7f6=_0x3ccb2c[_0x12d938(0x1c8)]-_0x395c46[_0x12d938(0x175)];_0x4dc0af[_0x12d938(0x1aa)]=_0x43762a-_0x4dc0af[_0x12d938(0x153)],_0x4dc0af[_0x12d938(0x128)]=_0x5dc7f6-_0x4dc0af['offsetY'],_0x4dc0af[_0x12d938(0x1d6)](),_0x4dc0af['dragged_just_now']=!![];}}),_0x3f961d['addEventListener'](_0x2d2c8a(0x1e5),function(_0x47de48){const _0x5b1ee9=_0x2d2c8a;_0x4dc0af[_0x5b1ee9(0x135)]&&_0x4dc0af[_0x5b1ee9(0x1b5)](_0x47de48,![]);}),_0x3f961d[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x189),function(_0x4065ae){const _0x4d7d14=_0x2d2c8a;_0x4dc0af[_0x4d7d14(0x135)]&&_0x4dc0af[_0x4d7d14(0x1b5)](_0x4065ae,!![]);}),_0x3f961d[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x1d5),function(_0x23bd08){const _0x48ff62=_0x2d2c8a;if(!_0x4dc0af[_0x48ff62(0x1d8)])return;_0x23bd08[_0x48ff62(0x1b4)]();const _0x1a4888=_0x3f961d[_0x48ff62(0x1dc)](),_0x1810eb=_0x23bd08['clientX']-_0x1a4888[_0x48ff62(0x19a)],_0x53a88f=_0x23bd08[_0x48ff62(0x1c8)]-_0x1a4888[_0x48ff62(0x175)],_0x453af7=_0x4dc0af[_0x48ff62(0x193)],_0x13a559=_0x23bd08[_0x48ff62(0x1b7)]*-0.001;_0x4dc0af[_0x48ff62(0x193)]+=_0x13a559,_0x4dc0af[_0x48ff62(0x193)]=Math[_0x48ff62(0x17a)](0.1,_0x4dc0af[_0x48ff62(0x193)]);const _0x5efca8=_0x4dc0af[_0x48ff62(0x193)]/_0x453af7;_0x4dc0af[_0x48ff62(0x1aa)]=_0x1810eb-(_0x1810eb-_0x4dc0af[_0x48ff62(0x1aa)])*_0x5efca8,_0x4dc0af['imgY']=_0x53a88f-(_0x53a88f-_0x4dc0af['imgY'])*_0x5efca8,_0x4dc0af[_0x48ff62(0x1d6)]();}),_0x3f961d['addEventListener'](_0x2d2c8a(0x1ae),function(_0xada892){const _0x4f5bee=_0x2d2c8a;_0x4dc0af[_0x4f5bee(0x133)]&&_0xada892['preventDefault'](),_0x4dc0af['dragged_just_now']=![];}),_0x3f961d[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x14f),function(){const _0x531e19=_0x2d2c8a;_0x2293a4[_0x531e19(0x14e)]['opacity']='1',!_0x4dc0af['img']&&!_0x4dc0af['no_upload']&&(_0x3f961d['style'][_0x531e19(0x1e6)]=_0x531e19(0x1e7));}),_0x3f961d[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x12f),function(){const _0x1fc6ee=_0x2d2c8a;_0x2293a4[_0x1fc6ee(0x14e)]['opacity']='0',_0x2d58fe[_0x1fc6ee(0x14e)][_0x1fc6ee(0x1e6)]='',_0x580c6b[_0x1fc6ee(0x14e)][_0x1fc6ee(0x1e6)]='',_0x3f961d[_0x1fc6ee(0x14e)][_0x1fc6ee(0x1e6)]='',_0x4d9ddb[_0x1fc6ee(0x14e)][_0x1fc6ee(0x1a8)]='none';}),_0xc35a08[_0x2d2c8a(0x1cf)]('pointerdown',function(_0x30abb1){const _0x163bd0=_0x2d2c8a;_0x4dc0af[_0x163bd0(0x18d)]=!![],_0x30abb1['preventDefault'](),_0x30abb1[_0x163bd0(0x167)]();}),document[_0x2d2c8a(0x1cf)]('pointermove',function(_0x4c9e76){const _0x5693f5=_0x2d2c8a;if(_0x4dc0af[_0x5693f5(0x18d)]){const _0x50e8b7=_0xef0549[_0x5693f5(0x1dc)](),_0x3c2a2d=_0x4c9e76[_0x5693f5(0x1c8)]-_0x50e8b7[_0x5693f5(0x175)];_0xef0549[_0x5693f5(0x14e)]['height']=_0x3c2a2d+'px',_0x4c9e76['preventDefault'](),_0x4c9e76[_0x5693f5(0x167)]();}}),document[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x1e5),function(){_0x4dc0af['resizing']=![];}),document['addEventListener'](_0x2d2c8a(0x189),function(){const _0x2e913b=_0x2d2c8a;_0x4dc0af[_0x2e913b(0x18d)]=![];}),['dragenter','dragover',_0x2d2c8a(0x195),_0x2d2c8a(0x132)][_0x2d2c8a(0x1a0)](_0x493b3f=>{const _0x1940f1=_0x2d2c8a;_0x3f961d[_0x1940f1(0x1cf)](_0x493b3f,_0x14ddf0,![]);});function _0x14ddf0(_0x1a6add){const _0x456751=_0x2d2c8a;_0x1a6add[_0x456751(0x1b4)](),_0x1a6add[_0x456751(0x167)]();}_0x3f961d[_0x2d2c8a(0x1cf)]('dragenter',()=>{const _0xa19613=_0x2d2c8a;_0x2d58fe[_0xa19613(0x14e)][_0xa19613(0x1e6)]=_0xa19613(0x130),_0x580c6b['style'][_0xa19613(0x1e6)]='copy';}),_0x3f961d['addEventListener'](_0x2d2c8a(0x195),()=>{const _0x120eb6=_0x2d2c8a;_0x2d58fe[_0x120eb6(0x14e)][_0x120eb6(0x1e6)]='',_0x580c6b[_0x120eb6(0x14e)][_0x120eb6(0x1e6)]='';}),_0x3f961d[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x132),function(_0x527b6e){const _0x1b30d5=_0x2d2c8a;_0x2d58fe[_0x1b30d5(0x14e)][_0x1b30d5(0x1e6)]='',_0x580c6b['style']['cursor']='';const _0x323886=_0x527b6e[_0x1b30d5(0x17b)],_0x173d8d=_0x323886[_0x1b30d5(0x14b)];_0x173d8d['length']>0x0&&_0x4dc0af[_0x1b30d5(0x140)](_0x173d8d[0x0]);}),_0x3f961d[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x1c6),()=>{_0x4dc0af['pointerInsideContainer']=!![];}),_0x3f961d['addEventListener']('pointerleave',()=>{_0x4dc0af['pointerInsideContainer']=![];}),document['addEventListener'](_0x2d2c8a(0x13a),function(_0x2a4116){const _0x273c70=_0x2d2c8a;_0x4dc0af[_0x273c70(0x1d2)]&&_0x4dc0af[_0x273c70(0x187)](_0x2a4116);}),document[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x12a),_0x36507c=>{const _0x320e41=_0x2d2c8a;if(!_0x4dc0af[_0x320e41(0x1d2)])return;_0x36507c['ctrlKey']&&_0x36507c[_0x320e41(0x13b)]==='z'&&(_0x36507c[_0x320e41(0x1b4)](),this[_0x320e41(0x1c0)]()),_0x36507c['ctrlKey']&&_0x36507c[_0x320e41(0x13b)]==='y'&&(_0x36507c['preventDefault'](),this[_0x320e41(0x165)]());}),_0x3714ec[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x16b),function(){const _0x3000eb=_0x2d2c8a;_0x4dc0af[_0x3000eb(0x166)]();}),_0x182ad6[_0x2d2c8a(0x1cf)](_0x2d2c8a(0x16b),function(){_0x4dc0af['minimize']();}),_0x4dc0af[_0x2d2c8a(0x197)](),_0x4dc0af[_0x2d2c8a(0x1d9)][_0x2d2c8a(0x1e1)](function(_0x5e4baf){const _0x2592be=_0x2d2c8a;_0x4dc0af[_0x2592be(0x1c7)](_0x5e4baf);}),_0x4dc0af['foreground_gradio_bind'][_0x2d2c8a(0x1e1)](function(_0x38888c){const _0xa35e4a=_0x2d2c8a;_0x4dc0af[_0xa35e4a(0x16f)](_0x38888c);});}[_0x1eae8f(0x171)](_0x38dcae){const _0x5d5928=_0x1eae8f,_0x22be38=this[_0x5d5928(0x179)],_0x53158c=_0x22be38[_0x5d5928(0x156)]('2d'),_0x1af416=_0x22be38[_0x5d5928(0x1dc)](),_0x2e21ab=(_0x38dcae['clientX']-_0x1af416[_0x5d5928(0x19a)])/this[_0x5d5928(0x193)],_0x454251=(_0x38dcae[_0x5d5928(0x1c8)]-_0x1af416['top'])/this[_0x5d5928(0x193)];this[_0x5d5928(0x194)][_0x5d5928(0x16a)]([_0x2e21ab,_0x454251]),_0x53158c['putImageData'](this[_0x5d5928(0x1e9)],0x0,0x0),_0x53158c[_0x5d5928(0x174)](),_0x53158c[_0x5d5928(0x1b3)](this[_0x5d5928(0x194)][0x0][0x0],this[_0x5d5928(0x194)][0x0][0x1]);for(let _0x26f36c=0x1;_0x26f36c<this[_0x5d5928(0x194)][_0x5d5928(0x1ce)];_0x26f36c++){_0x53158c[_0x5d5928(0x1bb)](this[_0x5d5928(0x194)][_0x26f36c][0x0],this[_0x5d5928(0x194)][_0x26f36c][0x1]);}_0x53158c[_0x5d5928(0x1ed)]=_0x5d5928(0x196),_0x53158c[_0x5d5928(0x180)]=_0x5d5928(0x196),_0x53158c['lineWidth']=this[_0x5d5928(0x178)]/this['imgScale']*0x14;if(this[_0x5d5928(0x199)]){_0x53158c[_0x5d5928(0x16e)]=this[_0x5d5928(0x162)],_0x53158c[_0x5d5928(0x16d)]();return;}_0x53158c[_0x5d5928(0x16e)]=this[_0x5d5928(0x158)];if(!(this[_0x5d5928(0x1e4)]>0x0)){_0x53158c[_0x5d5928(0x12d)]=_0x5d5928(0x17f),_0x53158c[_0x5d5928(0x161)]=0x1,_0x53158c[_0x5d5928(0x16d)]();return;}_0x53158c[_0x5d5928(0x12d)]=_0x5d5928(0x17c);if(!(this[_0x5d5928(0x122)]>0x0)){_0x53158c[_0x5d5928(0x161)]=this['scribbleAlpha']/0x64,_0x53158c[_0x5d5928(0x16d)]();return;}const _0x27eac4=_0x53158c[_0x5d5928(0x160)]*(0x1-this['scribbleSoftness']/0x96),_0x5e0a52=_0x53158c[_0x5d5928(0x160)]*(0x1+this[_0x5d5928(0x122)]/0x96),_0x5291ff=Math[_0x5d5928(0x196)](0x5+this[_0x5d5928(0x122)]/0x5),_0x51c9f4=(_0x5e0a52-_0x27eac4)/(_0x5291ff-0x1);_0x53158c[_0x5d5928(0x161)]=0x1-Math[_0x5d5928(0x14c)](0x1-Math['min'](this[_0x5d5928(0x1e4)]/0x64,0.95),0x1/_0x5291ff);for(let _0x1961da=0x0;_0x1961da<_0x5291ff;_0x1961da++){_0x53158c[_0x5d5928(0x160)]=_0x27eac4+_0x51c9f4*_0x1961da,_0x53158c[_0x5d5928(0x16d)]();}}['handleFileUpload'](_0x18e24e){const _0x24a9f4=_0x1eae8f;if(_0x18e24e&&!this[_0x24a9f4(0x186)]){const _0x17eca1=new FileReader();_0x17eca1[_0x24a9f4(0x147)]=_0x3e5df9=>{const _0x2126c7=_0x24a9f4;this[_0x2126c7(0x1c7)](_0x3e5df9[_0x2126c7(0x1df)][_0x2126c7(0x15b)]);},_0x17eca1[_0x24a9f4(0x143)](_0x18e24e);}}[_0x1eae8f(0x187)](_0xced005){const _0x3fb985=_0x1eae8f,_0x48e978=_0xced005[_0x3fb985(0x1b0)][_0x3fb985(0x134)];for(let _0x22bd31=0x0;_0x22bd31<_0x48e978[_0x3fb985(0x1ce)];_0x22bd31++){const _0x42774a=_0x48e978[_0x22bd31];if(_0x42774a[_0x3fb985(0x1cd)][_0x3fb985(0x163)](_0x3fb985(0x19f))!==-0x1){const _0x4d8fe1=_0x42774a[_0x3fb985(0x127)]();this[_0x3fb985(0x140)](_0x4d8fe1);break;}}}[_0x1eae8f(0x1c7)](_0xc39b50){const _0x2eb92e=_0x1eae8f;if(typeof this[_0x2eb92e(0x185)]!==_0x2eb92e(0x181)){if(!this[_0x2eb92e(0x185)][_0x2eb92e(0x124)]['startsWith'](0x1+0x4+0x1-0x2+''))return;}else return;const _0xd22fe=new Image();_0xd22fe['onload']=()=>{const _0x20d5db=_0x2eb92e;this[_0x20d5db(0x1d8)]=_0xc39b50,this[_0x20d5db(0x19d)]=_0xd22fe[_0x20d5db(0x18c)],this[_0x20d5db(0x17d)]=_0xd22fe[_0x20d5db(0x1b2)];const _0x2c290a=document['getElementById'](_0x20d5db(0x170)+this['uuid']);(_0x2c290a['width']!==_0xd22fe[_0x20d5db(0x18c)]||_0x2c290a[_0x20d5db(0x1b2)]!==_0xd22fe[_0x20d5db(0x1b2)])&&(_0x2c290a[_0x20d5db(0x18c)]=_0xd22fe[_0x20d5db(0x18c)],_0x2c290a[_0x20d5db(0x1b2)]=_0xd22fe[_0x20d5db(0x1b2)]),this[_0x20d5db(0x1c1)](),this[_0x20d5db(0x1d6)](),this[_0x20d5db(0x1ca)](),this[_0x20d5db(0x1d1)](),document['getElementById'](_0x20d5db(0x1da)+this[_0x20d5db(0x1bd)])[_0x20d5db(0x1a5)]=null,document['getElementById'](_0x20d5db(0x14d)+this[_0x20d5db(0x1bd)])['style'][_0x20d5db(0x1a8)]=_0x20d5db(0x182);};if(_0xc39b50)_0xd22fe[_0x2eb92e(0x1eb)]=_0xc39b50;else{this['img']=null;const _0x129c29=document[_0x2eb92e(0x1ea)](_0x2eb92e(0x170)+this[_0x2eb92e(0x1bd)]);_0x129c29[_0x2eb92e(0x18c)]=0x1,_0x129c29[_0x2eb92e(0x1b2)]=0x1,this[_0x2eb92e(0x1c1)](),this[_0x2eb92e(0x1d6)](),this[_0x2eb92e(0x1ca)](),this[_0x2eb92e(0x1d1)]();}}[_0x1eae8f(0x16f)](_0x2ea541){const _0x285f61=_0x1eae8f,_0x492368=new Image();_0x492368['onload']=()=>{const _0x1802d8=_0x2eaf,_0x1a67bb=document['getElementById'](_0x1802d8(0x170)+this[_0x1802d8(0x1bd)]),_0x3dd3e9=_0x1a67bb['getContext']('2d');_0x3dd3e9[_0x1802d8(0x1a4)](0x0,0x0,_0x1a67bb[_0x1802d8(0x18c)],_0x1a67bb['height']),_0x3dd3e9[_0x1802d8(0x1d6)](_0x492368,0x0,0x0),this[_0x1802d8(0x1d1)]();};if(_0x2ea541)_0x492368[_0x285f61(0x1eb)]=_0x2ea541;else{const _0x4d6787=document['getElementById'](_0x285f61(0x170)+this[_0x285f61(0x1bd)]),_0x38cdfe=_0x4d6787['getContext']('2d');_0x38cdfe[_0x285f61(0x1a4)](0x0,0x0,_0x4d6787[_0x285f61(0x18c)],_0x4d6787[_0x285f61(0x1b2)]),this[_0x285f61(0x1d1)]();}}[_0x1eae8f(0x1ec)](_0x3374f1,_0x5dfbdc){const _0x257f9d=_0x1eae8f,_0x4597fc=this[_0x257f9d(0x19d)]*this[_0x257f9d(0x193)],_0x45a929=this[_0x257f9d(0x17d)]*this[_0x257f9d(0x193)];return _0x3374f1>this['imgX']&&_0x3374f1<this['imgX']+_0x4597fc&&_0x5dfbdc>this['imgY']&&_0x5dfbdc<this[_0x257f9d(0x128)]+_0x45a929;}['drawImage'](){const _0x5f39ea=_0x1eae8f,_0x193f60=document[_0x5f39ea(0x1ea)](_0x5f39ea(0x1a1)+this[_0x5f39ea(0x1bd)]),_0x91ace9=document[_0x5f39ea(0x1ea)](_0x5f39ea(0x170)+this[_0x5f39ea(0x1bd)]);if(this[_0x5f39ea(0x1d8)]){const _0x46cd11=this['orgWidth']*this[_0x5f39ea(0x193)],_0x1c2888=this[_0x5f39ea(0x17d)]*this[_0x5f39ea(0x193)];_0x193f60[_0x5f39ea(0x1eb)]=this[_0x5f39ea(0x1d8)],_0x193f60['style'][_0x5f39ea(0x18c)]=_0x46cd11+'px',_0x193f60[_0x5f39ea(0x14e)][_0x5f39ea(0x1b2)]=_0x1c2888+'px',_0x193f60[_0x5f39ea(0x14e)][_0x5f39ea(0x19a)]=this[_0x5f39ea(0x1aa)]+'px',_0x193f60[_0x5f39ea(0x14e)][_0x5f39ea(0x175)]=this['imgY']+'px',_0x193f60['style'][_0x5f39ea(0x1a8)]='block',_0x91ace9['style'][_0x5f39ea(0x18c)]=_0x46cd11+'px',_0x91ace9[_0x5f39ea(0x14e)][_0x5f39ea(0x1b2)]=_0x1c2888+'px',_0x91ace9['style']['left']=this[_0x5f39ea(0x1aa)]+'px',_0x91ace9[_0x5f39ea(0x14e)][_0x5f39ea(0x175)]=this[_0x5f39ea(0x128)]+'px';}else _0x193f60[_0x5f39ea(0x1eb)]='',_0x193f60[_0x5f39ea(0x14e)][_0x5f39ea(0x1a8)]=_0x5f39ea(0x182);}[_0x1eae8f(0x1c1)](){const _0x213f8b=_0x1eae8f,_0x31a7a9=document[_0x213f8b(0x1ea)](_0x213f8b(0x190)+this[_0x213f8b(0x1bd)]),_0x3e4550=_0x31a7a9[_0x213f8b(0x1c9)]-0x20,_0x3d12ed=_0x31a7a9[_0x213f8b(0x15c)]-0x20,_0x452c06=_0x3e4550/this['orgWidth'],_0x33f779=_0x3d12ed/this[_0x213f8b(0x17d)];this[_0x213f8b(0x193)]=Math['min'](_0x452c06,_0x33f779);const _0x34b48b=this[_0x213f8b(0x19d)]*this['imgScale'],_0x522d0b=this['orgHeight']*this[_0x213f8b(0x193)];this[_0x213f8b(0x1aa)]=(_0x31a7a9['clientWidth']-_0x34b48b)/0x2,this[_0x213f8b(0x128)]=(_0x31a7a9[_0x213f8b(0x15c)]-_0x522d0b)/0x2;}['resetImage'](){const _0x1a3b31=_0x1eae8f,_0x29fc58=document['getElementById']('drawingCanvas_'+this[_0x1a3b31(0x1bd)]),_0xab373b=_0x29fc58[_0x1a3b31(0x156)]('2d');_0xab373b['clearRect'](0x0,0x0,_0x29fc58[_0x1a3b31(0x18c)],_0x29fc58[_0x1a3b31(0x1b2)]),this[_0x1a3b31(0x1c1)](),this[_0x1a3b31(0x1d6)](),this[_0x1a3b31(0x1d1)]();}[_0x1eae8f(0x1e2)](){const _0x53e6fd=_0x1eae8f;this[_0x53e6fd(0x1d8)]=null;const _0x5cbdb5=document[_0x53e6fd(0x1ea)](_0x53e6fd(0x1a1)+this['uuid']),_0x53de58=document[_0x53e6fd(0x1ea)](_0x53e6fd(0x170)+this[_0x53e6fd(0x1bd)]),_0x2b3607=_0x53de58[_0x53e6fd(0x156)]('2d');_0x2b3607[_0x53e6fd(0x1a4)](0x0,0x0,_0x53de58['width'],_0x53de58[_0x53e6fd(0x1b2)]),_0x5cbdb5[_0x53e6fd(0x1eb)]='',_0x5cbdb5[_0x53e6fd(0x14e)][_0x53e6fd(0x18c)]='0',_0x5cbdb5[_0x53e6fd(0x14e)]['height']='0',this['saveState'](),!this['no_upload']&&(document[_0x53e6fd(0x1ea)]('uploadHint_'+this[_0x53e6fd(0x1bd)])['style'][_0x53e6fd(0x1a8)]=_0x53e6fd(0x125)),this[_0x53e6fd(0x1ca)]();}[_0x1eae8f(0x1d1)](){const _0x3e53a1=_0x1eae8f,_0x509166=document[_0x3e53a1(0x1ea)]('drawingCanvas_'+this['uuid']),_0x2e739b=_0x509166[_0x3e53a1(0x156)]('2d'),_0x540cea=_0x2e739b[_0x3e53a1(0x1e0)](0x0,0x0,_0x509166[_0x3e53a1(0x18c)],_0x509166[_0x3e53a1(0x1b2)]);this['history']=this[_0x3e53a1(0x1e3)][_0x3e53a1(0x1db)](0x0,this[_0x3e53a1(0x136)]+0x1),this[_0x3e53a1(0x1e3)]['push'](_0x540cea),this[_0x3e53a1(0x136)]++,this['updateUndoRedoButtons'](),this[_0x3e53a1(0x146)]();}[_0x1eae8f(0x1c0)](){const _0x1dfb92=_0x1eae8f;this['historyIndex']>0x0&&(this[_0x1dfb92(0x136)]--,this['restoreState'](),this[_0x1dfb92(0x197)]());}['redo'](){const _0x608ab7=_0x1eae8f;this[_0x608ab7(0x136)]<this['history'][_0x608ab7(0x1ce)]-0x1&&(this[_0x608ab7(0x136)]++,this[_0x608ab7(0x126)](),this[_0x608ab7(0x197)]());}['restoreState'](){const _0x37eaa8=_0x1eae8f,_0xd39c5d=document['getElementById'](_0x37eaa8(0x170)+this[_0x37eaa8(0x1bd)]),_0x1c14e7=_0xd39c5d[_0x37eaa8(0x156)]('2d'),_0x2d1e7a=this[_0x37eaa8(0x1e3)][this['historyIndex']];_0x1c14e7[_0x37eaa8(0x1cb)](_0x2d1e7a,0x0,0x0),this[_0x37eaa8(0x146)]();}[_0x1eae8f(0x197)](){const _0x4bfccb=_0x1eae8f,_0x351d4c=document['getElementById'](_0x4bfccb(0x155)+this[_0x4bfccb(0x1bd)]),_0xe0a49c=document[_0x4bfccb(0x1ea)](_0x4bfccb(0x176)+this[_0x4bfccb(0x1bd)]);_0x351d4c[_0x4bfccb(0x14a)]=this['historyIndex']<=0x0,_0xe0a49c[_0x4bfccb(0x14a)]=this['historyIndex']>=this[_0x4bfccb(0x1e3)]['length']-0x1,_0x351d4c[_0x4bfccb(0x14e)][_0x4bfccb(0x1ad)]=_0x351d4c[_0x4bfccb(0x14a)]?_0x4bfccb(0x12b):'1',_0xe0a49c[_0x4bfccb(0x14e)][_0x4bfccb(0x1ad)]=_0xe0a49c['disabled']?'0.5':'1';}[_0x1eae8f(0x1ca)](){const _0x3b6315=_0x1eae8f;if(!this[_0x3b6315(0x1d8)]){this[_0x3b6315(0x1d9)][_0x3b6315(0x184)]('');return;}const _0x2fe475=document[_0x3b6315(0x1ea)](_0x3b6315(0x1a1)+this[_0x3b6315(0x1bd)]),_0x1d819f=this[_0x3b6315(0x1b9)],_0x18fef1=_0x1d819f[_0x3b6315(0x156)]('2d');_0x1d819f['width']=this['orgWidth'],_0x1d819f[_0x3b6315(0x1b2)]=this[_0x3b6315(0x17d)],_0x18fef1['drawImage'](_0x2fe475,0x0,0x0,this[_0x3b6315(0x19d)],this['orgHeight']);const _0xe7fdcd=_0x1d819f['toDataURL'](_0x3b6315(0x138));this[_0x3b6315(0x1d9)][_0x3b6315(0x184)](_0xe7fdcd);}[_0x1eae8f(0x146)](){const _0x5ce6d7=_0x1eae8f;if(!this[_0x5ce6d7(0x1d8)]){this[_0x5ce6d7(0x12c)][_0x5ce6d7(0x184)]('');return;}const _0x187231=document[_0x5ce6d7(0x1ea)]('drawingCanvas_'+this[_0x5ce6d7(0x1bd)]),_0x577555=_0x187231[_0x5ce6d7(0x192)]('image/png');this[_0x5ce6d7(0x12c)][_0x5ce6d7(0x184)](_0x577555);}[_0x1eae8f(0x166)](){const _0x933a11=_0x1eae8f;if(this[_0x933a11(0x1c2)])return;const _0x4fe2b7=document['getElementById']('container_'+this[_0x933a11(0x1bd)]),_0x4177f5=document[_0x933a11(0x1ea)](_0x933a11(0x188)+this[_0x933a11(0x1bd)]),_0x54331a=document['getElementById'](_0x933a11(0x1de)+this[_0x933a11(0x1bd)]),_0x553769=document[_0x933a11(0x1ea)]('minButton_'+this[_0x933a11(0x1bd)]);this[_0x933a11(0x15f)]={'width':_0x4fe2b7[_0x933a11(0x14e)]['width'],'height':_0x4fe2b7[_0x933a11(0x14e)][_0x933a11(0x1b2)],'top':_0x4fe2b7[_0x933a11(0x14e)][_0x933a11(0x175)],'left':_0x4fe2b7[_0x933a11(0x14e)][_0x933a11(0x19a)],'position':_0x4fe2b7[_0x933a11(0x14e)][_0x933a11(0x12e)],'zIndex':_0x4fe2b7[_0x933a11(0x14e)][_0x933a11(0x1be)]},_0x4fe2b7[_0x933a11(0x14e)]['width']=_0x933a11(0x13e),_0x4fe2b7['style'][_0x933a11(0x1b2)]=_0x933a11(0x154),_0x4fe2b7[_0x933a11(0x14e)]['top']='0',_0x4fe2b7[_0x933a11(0x14e)][_0x933a11(0x19a)]='0',_0x4fe2b7['style'][_0x933a11(0x12e)]=_0x933a11(0x18f),_0x4fe2b7[_0x933a11(0x14e)][_0x933a11(0x1be)]=_0x933a11(0x1dd),_0x54331a[_0x933a11(0x14e)]['display']=_0x933a11(0x182),_0x553769[_0x933a11(0x14e)][_0x933a11(0x1a8)]=_0x933a11(0x129),this[_0x933a11(0x1c2)]=!![];}[_0x1eae8f(0x1b8)](){const _0x420ab3=_0x1eae8f;if(!this[_0x420ab3(0x1c2)])return;const _0x21a23f=document[_0x420ab3(0x1ea)]('container_'+this[_0x420ab3(0x1bd)]),_0x7b3c58=document[_0x420ab3(0x1ea)](_0x420ab3(0x1de)+this[_0x420ab3(0x1bd)]),_0x162e20=document[_0x420ab3(0x1ea)](_0x420ab3(0x149)+this[_0x420ab3(0x1bd)]);_0x21a23f[_0x420ab3(0x14e)][_0x420ab3(0x18c)]=this['originalState'][_0x420ab3(0x18c)],_0x21a23f[_0x420ab3(0x14e)]['height']=this['originalState'][_0x420ab3(0x1b2)],_0x21a23f[_0x420ab3(0x14e)][_0x420ab3(0x175)]=this[_0x420ab3(0x15f)][_0x420ab3(0x175)],_0x21a23f['style'][_0x420ab3(0x19a)]=this['originalState'][_0x420ab3(0x19a)],_0x21a23f[_0x420ab3(0x14e)][_0x420ab3(0x12e)]=this['originalState'][_0x420ab3(0x12e)],_0x21a23f[_0x420ab3(0x14e)][_0x420ab3(0x1be)]=this[_0x420ab3(0x15f)]['zIndex'],_0x7b3c58[_0x420ab3(0x14e)][_0x420ab3(0x1a8)]='inline-block',_0x162e20[_0x420ab3(0x14e)][_0x420ab3(0x1a8)]='none',this[_0x420ab3(0x1c2)]=![];}[_0x1eae8f(0x1b5)](_0x3648cb,_0x453b8b){const _0x431f7c=_0x1eae8f,_0x269d7c=document[_0x431f7c(0x1ea)](_0x431f7c(0x1a1)+this[_0x431f7c(0x1bd)]),_0x692a8a=document['getElementById'](_0x431f7c(0x170)+this[_0x431f7c(0x1bd)]);this['dragging']=![],_0x269d7c['style']['cursor']='grab',_0x692a8a[_0x431f7c(0x14e)][_0x431f7c(0x1e6)]=_0x431f7c(0x177);}}function _0x2eaf(_0xdca300,_0x2fc821){const _0x42d8b2=_0x42d8();return _0x2eaf=function(_0x2eaf4a,_0x2dc78d){_0x2eaf4a=_0x2eaf4a-0x122;let _0x5d531f=_0x42d8b2[_0x2eaf4a];return _0x5d531f;},_0x2eaf(_0xdca300,_0x2fc821);}const True=!![],False=![];