-
Notifications
You must be signed in to change notification settings - Fork 19
/
2.client.min.js
1 lines (1 loc) · 250 KB
/
2.client.min.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1031:function(e,_,t){"use strict";Object.defineProperty(_,"__esModule",{value:!0});function E1(e,_){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,_){var t=[],o=!0,n=!1,a=void 0;try{for(var r,i=e[Symbol.iterator]();!(o=(r=i.next()).done)&&(t.push(r.value),!_||t.length!==_);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&i.return&&i.return()}finally{if(n)throw a}}return t}(e,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}var m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T=Object.assign||function(e){for(var _=1;_<arguments.length;_++){var t,o=arguments[_];for(t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e};function o(e,_){for(var t=0;t<_.length;t++){var o=_[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var k=n(t(0)),c=n(t(671));function n(e){return e&&e.__esModule?e:{default:e}}function A(e){return function(){var i=e.apply(this,arguments);return new Promise(function(a,r){return function _(e,t){try{var o=i[e](t),n=o.value}catch(e){return void r(e)}if(!o.done)return Promise.resolve(n).then(function(e){_("next",e)},function(e){_("throw",e)});a(n)}("next")})}}function S1(e){if(Array.isArray(e)){for(var _=0,t=Array(e.length);_<e.length;_++)t[_]=e[_];return t}return Array.from(e)}var i=window.requestAnimationFrame||window.oRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,s=window.cancelAnimationFrame||window.oCancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame,l=null,p=Date.now(),a=0,d=0;function R1(e,_,t){g(e,1<arguments.length&&void 0!==_&&_,2<arguments.length&&void 0!==t&&t)}window.mobileAndTabletCheck=function(){var e=!1,_=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(_)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(_.substr(0,4)))||e};var r,L=window.mobileAndTabletCheck(),h=setInterval(function(){a=4*d,d=0},250),g=function e(_,t,o){try{var n=Date.now(),a=!0,r=n-p;37.5<r&&(a=!1),o?(s(l),l=null,t?i(_):l=i(_),d++,p=n):null===l?(t?i(_):l=i(_),p=n,d++):!a&&null!==l&&12.5<r?(s(l),l=null,p=n,t?i(_):(l=i(_),d++)):a?(r<12.5||o||t)&&setTimeout(function(){e(_,t,o)},3.125):(s(l),l=null,t?i(_):l=i(_),d++,p=n)}catch(e){}},u=(function(e,_){if("function"!=typeof _&&null!==_)throw new TypeError("Super expression must either be null or a function, not "+typeof _);e.prototype=Object.create(_&&_.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(e,_):e.__proto__=_)}(f,k.default.Component),r=f,(t=[{key:"componentDidMount",value:function(){var e=this,_=[];_[0]=setInterval(function(){Boolean(e.state.dont_show_canvas&&e.state.but_show_canvas_once)||e._maybe_save_state(),e._update_canvas(!0,!0)},250),_[1]=setInterval(function(){e._notify_fps()},250),_[2]=setInterval(function(){e._maybe_update_mine_player()},1e3/30),_[3]=setInterval(function(){e._maybe_update_selection_highlight()},400),_[4]=setInterval(function(){e.set_move_speed_average_now()},61),_[5]=h;var t=document.createElement("style");t.innerHTML='body {touch-action:none;}.Canvas-Pixels, .Canvas-Wrapper-Overflow, .Canvas-Wrapper, .Canvas-Pixels-Cover {image-rendering: crisp-edges;image-rendering: pixelated;touch-action: none;pointer-events: none;backface-visibility: hidden;mix-blend-mode: normal;background-blend-mode: normal;transition: none;}.Canvas-Wrapper-Overflow.Shown {\n animation-name: canvanimation;\n animation-fill-mode: both;\n animation-duration: 240ms;\n animation-delay: 0ms;\n animation-timing-function: linear;\n opacity: 1 !important,\n }\n .Canvas-Wrapper-Overflow {\n opacity: 0 !important,\n transform-origin: center center !important;\n }\n @keyframes canvanimation { \n 0% { transform: matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); opacity: .0; }\n 4.3% { transform: matrix3d(0.271, 0, 0, 0, 0, 0.271, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); opacity: .2; }\n 8.61% { transform: matrix3d(.818, 0, 0, 0, 0, .818, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); opacity: .8; }\n 12.91% { transform: matrix3d(1.078, 0, 0, 0, 0, 1.078, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); opacity: .9; }\n 17.22% { transform: matrix3d(1.11, 0, 0, 0, 0, 1.11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); opacity: 1; }\n 28.33% { transform: matrix3d(1.031, 0, 0, 0, 0, 1.031, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); opacity: 1; }\n 39.44% { transform: matrix3d(.991, 0, 0, 0, 0, .991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); opacity: 1; }\n 61.66% { transform: matrix3d(1.001, 0, 0, 0, 0, 1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); opacity: 1; }\n 83.98% { transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); opacity: 1; }\n 100% { transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); opacity: 1; } \n }.Canvas-Pixels-Cover::after {top: 0;\n left: 0;\n width: calc(60% - 12px);\n content: ""attr(datatexttop)"";\n padding: 0px 0px 8px 12px;\n position: fixed;\n transform: translate(0px, -100%);\n line-height: 20px;\n font-size: 14px;\n font-family: "Share Tech Mono";\n color: #FAFAFAAA;}.Canvas-Pixels-Cover::before {bottom: 0;\n right: 0;\n width: calc(80% - 12px);\n text-align: right;\n content: ""attr(datatextbottom)"";\n padding: 8px 12px 0px 0px;\n position: fixed;\n transform: translate(0px, 100%);\n line-height: 20px;\n font-size: 14px;\n font-family: "Share Tech Mono";\n color: #FAFAFAAA;}.Canvas-Wrapper.MOVE:not(.Canvas-Focused), .Canvas-Wrapper.PICKER:not(.Canvas-Focused) {cursor: grab;}.Canvas-Wrapper.MOVE:active:not(.Canvas-Focused), .Canvas-Wrapper.PICKER:active:not(.Canvas-Focused) {cursor: grabbing;}',document.head.appendChild(t),this._updated_dimensions(),this.setState({_intervals:_}),this._notify_layers_and_compute_thumbnails_change(),window.addEventListener("resize",this._updated_dimensions),window.addEventListener("devicemotion",this._handle_motion_changes)}},{key:"componentWillReceiveProps",value:function(e){var _=this;"MINE"===this.state.tool&&"MINE"!==e.tool&&this.setState({_mine_player_index:null,_mine_index:null}),("NONE"!==this.state.pencil_mirror_mode&&"NONE"===e.pencil_mirror_mode||this.state.tool.includes("PENCIL")&&!e.tool.includes("PENCIL"))&&this.setState({_pencil_mirror_index:-1}),this.state.tool===e.tool||e.tool.includes("SELECT")||this.setState({_pxl_indexes_of_selection:new Set,_pxl_indexes_of_selection_drawn:new Set([].concat(S1(this.state._pxl_indexes_of_selection)))},function(){_._notify_is_something_selected()}),this.state.pxl_width!==e.pxl_width||this.state.pxl_height!==e.pxl_height?this.setState(T({},e,{_id:Date.now(),_pxl_indexes_of_selection:new Set,_layers:[{id:Date.now(),name:"Layer 0",hidden:!1,opacity:1,data:{}}],_layer_index:0,_s_pxls:[new Array((e.pxl_width||32)*(e.pxl_height||32)).fill(0)],_old_pxls:new Array((e.pxl_width||32)*(e.pxl_height||32)).fill(0),_s_pxl_colors:[["#00000000"]],_old_pxl_colors:["#00000000"],_moves_speed_average_now:8,_hidden:!0,has_shown_canvas_once:!1}),function(){_.props.on_elevation_change&&_.props.on_elevation_change(_.state._moves_speed_average_now),_._update_canvas(!0),_._update_screen_zoom_ratio(!0)}):this.state.hide_canvas_content!==e.hide_canvas_content||this.state.show_original_image_in_background!==e.show_original_image_in_background||this.state.show_transparent_image_in_background!==e.show_transparent_image_in_background||this.state.pencil_mirror_mode!==e.pencil_mirror_mode||this.state.tool!==e.tool||this.state.select_mode!==e.select_mode?this.setState(e,function(){_._request_force_update()}):this.setState(e)}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"get_base64_png_data_url",value:function(){this._get_base64_png_data_url(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){},!1)}},{key:"componentWillUnmount",value:function(){var e=this.state,_=e._canvas_wrapper_overflow,e=e._intervals;window.removeEventListener("resize",this._updated_dimensions),window.addEventListener("devicemotion",this._handle_motion_changes),_.removeEventListener("wheel",this.handle_canvas_wrapper_overflow_wheel),_.removeEventListener("pointerdown",this._handle_canvas_wrapper_overflow_pointer_down),_.removeEventListener("pointermove",this._handle_canvas_wrapper_overflow_pointer_move),_.removeEventListener("pointerup",this._handle_canvas_wrapper_overflow_pointer_up),_.removeEventListener("pointercancel",this._handle_canvas_wrapper_overflow_pointer_up),_.removeEventListener("pointerout",this._handle_canvas_wrapper_overflow_pointer_up),_.removeEventListener("pointerleave",this._handle_canvas_wrapper_overflow_pointer_up),e.forEach(function(e){clearInterval(e)})}},{key:"areEqual",value:function(){return!1}},{key:"render",value:function(){var e=this.state,_=(e.animation,e.animation_duration,e.pxl_width),t=e.pxl_height,o=e.show_original_image_in_background,n=e.show_transparent_image_in_background,a=e.className,r=e._base64_original_images,i=e._original_image_index,s=e.scale,l=e.scale_move_x,c=e.scale_move_y,p=e.canvas_wrapper_background_color,d=(e.canvas_border_radius,e.canvas_wrapper_border_radius),h=e.canvas_wrapper_padding,g=e.canvas_wrapper_border_width,u=e._moves_speed_average_now,f=e._is_on_resize_element,A=e._is_image_import_mode,m=e._mouse_down,x=e.tool,v=e.select_mode,w=e._screen_zoom_ratio,b=e._mouse_inside,M=(e._canvas_event_target,e._loading_base64_img),C=(e._loading_base64_img_changed,e._hidden),y=e.show_image_only_before_canvas_set,I=e.has_shown_canvas_once,D=e.perspective,E=e.light,S=e._kb,R=this.state,N=R.perspective_coordinate,e=R.perspective_coordinate_last_change,R=L?1.5*D/4:D/4,n=o&&void 0!==r[i]?{background:'center / cover no-repeat url("'+r[i]+'")'}:n?{background:"repeating-conic-gradient(rgb(248 248 248 / 100%) 0% 25%, rgb(235 235 235 / 100%) 0% 50%) left top 50% / calc(200% / "+_+") calc(200% / "+t+")"}:{},n=o&&M.length?{background:'center / cover no-repeat url("'+M+'")'}:n;n=y&&!I||!y?n:{};o=this._get_cursor(f,A,m,x,v),M=Math.round(_*w*s),y=Math.round(t*w*s),f=L?E*R*.5*2:E*R*2,A=1-R/200*f+(f*(3*R-Math.floor(10*(N[0]+R))/(3*R*10))/2+f*(Math.floor(10*(N[1]+R))/(3*R*10))/2)/(3*R)*(R/100),m=Math.floor(h/window.devicePixelRatio*s),v=Math.round(N[1]*R/s*1e3)/1e3,E=Math.round(N[0]*R/s*1e3)/1e3;return k.default.createElement("div",{ref:this._set_canvas_container_ref,draggable:"false",style:{zIndex:1,contain:"contents",boxSizing:"border-box",position:"relative",overflow:"visible",touchAction:"none",userSelect:"none"},className:a},k.default.createElement("div",{ref:this._set_canvas_wrapper_overflow_ref,className:"Canvas-Wrapper-Overflow"+(I&&!C?" Shown ":" Not-Shown "),draggable:"false",style:{height:"100%",width:"100%",overflow:"visible",position:"relative",boxSizing:"border-box",touchAction:"none",pointerEvents:"auto",userSelect:"none",cursor:o,contain:"contents",willChange:"perspective",perspective:Math.round(Math.max(M,y))+"px",zIndex:1}},k.default.createElement("div",{className:"Canvas-Wrapper "+(b?" Canvas-Focused ":" "+x),draggable:"false",style:{willChange:-24!==u||D&&e+500>Date.now()?"transform":"",mixBlendMode:"hard-light",borderWidth:g,borderStyle:"solid",borderColor:"#fff",backgroundImage:"linear-gradient(to top, "+p+" "+m/2.5+"px, "+this._blend_colors(p,"#00000000",.6)+" "+m/2.5+"px, #ffffff00 150%)",borderRadius:d,padding:m,position:"absolute",clipPath:"polygon(calc(100% - 10%) 0%, 100% 0%, 100% 200%, "+m+"px 100%, 0% calc(100% - "+m+"px), 0% -100%, calc(100% - 25%) 0%, calc(100% - 25%) "+m/1.5+"px, calc(100% - 15%) "+m/1.5+"px)",width:Math.round(1e3*M)/1e3,height:Math.round(1e3*y)/1e3,transition:"filter 200ms linear 0ms",filter:I&&!C?"opacity(1)":"opacity(0)",transform:"translate3d("+Math.round(1e3*l)/1e3+"px, "+Math.round(1e3*c)/1e3+"px, 0px) rotateX("+v+"deg) rotateY("+E+"deg) rotateZ(0deg)",transformOrigin:"center middle",boxSizing:"content-box",overflow:"visible",touchAction:"none",pointerEvents:"none",userSelect:"none",contain:"contents",zIndex:2},ref:this._set_canvas_wrapper_ref},k.default.createElement("canvas",{draggable:"false",style:T({zIndex:2,position:"absolute",touchAction:"none",pointerEvents:"none",userSelect:"none",width:Math.floor(_),height:Math.floor(t),transform:"scale("+(w*s).toFixed(2)+")",transformOrigin:"left top",boxSizing:"content-box"},n),className:"Canvas-Pixels",ref:this._set_canvas_ref,width:Math.floor(_),height:Math.floor(t)}),Boolean(R)&&k.default.createElement("div",{className:"Canvas-Pixels-Cover",datatexttop:"D["+_+", "+t+"]px // S["+S.toFixed(2)+"]Kb",datatextbottom:"ΔZ["+w.toFixed(2)+", "+s.toFixed(2)+"]x // ΔR["+(N[1]*R/s).toFixed(2)+", "+(N[0]*R/s).toFixed(2)+"]°",draggable:"false",style:{backgroundImage:R?"linear-gradient(to left, rgba(\n "+(255-Math.floor((N[0]+R)/(2*R)*255))+",\n "+(255-Math.floor((N[0]+R)/(2*R)*255))+",\n "+(255-Math.floor((N[0]+R)/(2*R)*255))+", \n "+(Math.abs(N[0])/R/6*.3*(R*f/100)).toFixed(2)+"\n ), rgba(\n "+(255-Math.floor((N[0]+R)/(2*R)*255))+",\n "+(255-Math.floor((N[0]+R)/(2*R)*255))+",\n "+(255-Math.floor((N[0]+R)/(2*R)*255))+", \n "+(Math.abs(N[0])/R/6*3*(R*f/100)).toFixed(2)+"\n )), linear-gradient(to top, rgba(\n "+Math.floor((N[1]+R)/(2*R)*255)+",\n "+Math.floor((N[1]+R)/(2*R)*255)+",\n "+Math.floor((N[1]+R)/(2*R)*255)+", \n "+(Math.abs(N[1])/R/6*2*(R*f/100)).toFixed(2)+"\n ), rgba(\n "+Math.floor((N[1]+R)/(2*R)*255)+",\n "+Math.floor((N[1]+R)/(2*R)*255)+",\n "+Math.floor((N[1]+R)/(2*R)*255)+", \n "+(Math.abs(N[1])/R/6*1*(R*f/100)).toFixed(2)+"\n ))":"none",zIndex:3,borderRadius:d,padding:0,left:0,top:0,borderWidth:0,position:"absolute",width:Math.ceil(M+h/window.devicePixelRatio*s*2),height:Math.ceil(y+h/window.devicePixelRatio*s*2),boxSizing:"content-box",touchAction:"none",pointerEvents:"none",userSelect:"none",willChange:D&&(v||E)?"filter, background-image":"",filter:Boolean(R)&&"brightness("+A+") contrast("+A+")"}})),k.default.createElement("div",{style:{zIndex:1,color:p,textAlign:"center",position:"absolute",bottom:0,left:0,width:"100%",height:"100px",backgroundImage:'url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MzE5IDE4MCIgd2lkdGg9IjU3NTguNjY3IiBoZWlnaHQ9IjI0MCIgeG1sbnM6dj0iaHR0cHM6Ly92ZWN0YS5pby9uYW5vIj48ZGVmcz48Y2xpcFBhdGggaWQ9IkEiPjxwYXRoIGQ9Ik0wIDBoNDMxOXYxODBIMHoiLz48L2NsaXBQYXRoPjwvZGVmcz48ZyBjbGlwLXBhdGg9InVybCgjQSkiPjxwYXRoIGQ9Ik0wIDFoNnYxNzlIMFYxaDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwem0xNiAwaDZ2MTc5aC02VjFoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6bTE1OCAxMzRoNnY0NWgtNnYtNDVoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwem0xNiAwaDZ2NDVoLTZ2LTQ1aDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6bTE1NSAwaDZ2NDUuNWgtNlYxMzVoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6bTE2IDBoNnY0NS41aC02VjEzNWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6bTE1NiAwaDZ2NDUuNWgtNlYxMzVoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHptMTYgMGg2djQ1LjVoLTZWMTM1aDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwem0xNTgtLjVoNlYxODBoLTZ2LTQ1LjVoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwem0xNiAwaDZWMTgwaC02di00NS41aDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6TTg2NCAxaDZ2MTc5aC02VjFoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6bTE2IDBoNnYxNzloLTZWMWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6bTE1OCAxMzRoNnY0NWgtNnYtNDVoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHptMTYgMGg2djQ1aC02di00NWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHptMTU1IDBoNnY0NS41aC02VjEzNWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6bTE2IDBoNnY0NS41aC02VjEzNWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwem0xNTYgMGg2djQ1LjVoLTZWMTM1aDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwem0xNiAwaDZ2NDUuNWgtNlYxMzVoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwem0xNTgtLjVoNlYxODBoLTZ2LTQ1LjVoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHptMTYgMGg2VjE4MGgtNnYtNDUuNWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHpNMTcyNyAwaDZ2MTc5aC02VjBoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwem0xNiAwaDZ2MTc5aC02VjBoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHptMTU4IDEzNGg2djQ1aC02di00NWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHptMTYgMGg2djQ1aC02di00NWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6bTE1NSAwaDZ2NDUuNWgtNlYxMzRoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHptMTYgMGg2djQ1LjVoLTZWMTM0aDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwem0xNTYgMGg2djQ1LjVoLTZWMTM0aDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHptMTYgMGg2djQ1LjVoLTZWMTM0aDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6bTE1OC0uNWg2VjE3OWgtNnYtNDUuNWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHptMTYgMGg2VjE3OWgtNnYtNDUuNWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6TTI1OTAgMWg2djE3OWgtNlYxaDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6bTE2IDBoNnYxNzloLTZWMWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHptMTU4IDEzNGg2djQ1aC02di00NWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6bTE2IDBoNnY0NWgtNnYtNDVoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHptMTU1IDBoNnY0NS41aC02VjEzNWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHptMTYgMGg2djQ1LjVoLTZWMTM1aDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMHptMTU2IDBoNnY0NS41aC02VjEzNWgwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwem0xNiAwaDZ2NDUuNWgtNlYxMzVoMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDB6bTE1OC0uNWg2VjE4MGgtNnYtNDUuNWgwIDAgMCAwIDAgMCAwIDAgMCAwIDB6bTE2IDBoNlYxODBoLTZ2LTQ1LjVoMCAwIDAgMCAwIDAgMCAwIDAgMHpNMzQ1NCAxaDZ2MTc5aC02VjFoMCAwIDAgMCAwIDAgMCAwIDB6bTE2IDBoNnYxNzloLTZWMWgwIDAgMCAwIDAgMCAwIDB6bTE1OCAxMzRoNnY0NWgtNnYtNDVoMCAwIDAgMCAwIDAgMHptMTYgMGg2djQ1aC02di00NWgwIDAgMCAwIDAgMHptMTU1IDBoNnY0NS41aC02VjEzNWgwIDAgMCAwIDB6bTE2IDBoNnY0NS41aC02VjEzNWgwIDAgMCAwem0xNTYgMGg2djQ1LjVoLTZWMTM1aDAgMCAwem0xNiAwaDZ2NDUuNWgtNlYxMzVoMCAwem0xNTgtLjVoNlYxODBoLTZ2LTQ1LjVoMHptMTYgMGg2VjE4MGgtNnYtNDUuNXoiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZmlsbD0iI2ZmZiIvPjwvZz48L3N2Zz4=")',backgroundPosition:"bottom",backgroundRepeat:"repeat-x",backgroundSize:Math.round(s*w*5*5)+"px",pointerEvents:"none",touchAction:"none"}},k.default.createElement("span",null,"[",parseFloat(s*w).toFixed(2),"x]"))))}}])&&o(r.prototype,t),u&&o(r,u),f);function f(e){var P=this;!function(e){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function")}(this);var o,_,D1=function(e,_){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!_||"object"!=typeof _&&"function"!=typeof _?e:_}(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,e));return D1._updated_dimensions=function(){var e=window,_=document,t=_.documentElement,_=_.getElementsByTagName("body")[0];e.innerWidth||t.clientWidth||_.clientWidth,e.innerHeight||t.clientHeight||_.clientHeight,D1._update_canvas_container_size()},D1._maybe_update_mine_player=function(){if("MINE"===D1.state.tool){var e=D1.state,_=e.pxl_width,t=e.pxl_height,o=D1.state,n=o._mine_index,e=o._mine_player_index,o=o.mine_player_direction;if(null===e)e=Math.floor(Math.random()*(_*t-1)),n=-1;else{var a=e%_,r=(e-a)/_;switch(o){case"UP":r--;break;case"RIGHT":a++;break;case"DOWN":r++;break;case"LEFT":a--}n===(e=(a=(a%=_)<0?_+a:a)+(r=(r%=t)<0?t+r:r)*_)&&(D1.setState({_explosion_started_timestamp:Date.now(),_explosion_index:n}),D1._notify_game_end())}D1.setState({_mine_player_index:e,_mine_index:n},function(){D1._update_canvas()})}},D1._maybe_update_selection_highlight=function(){var e=D1.state,_=e.tool,e=e._is_image_import_mode;(_.toUpperCase().includes("SELECT")||e||1<=D1.state._pxl_indexes_of_selection.size)&&D1.setState({_selection_pair_highlight:!D1.state._selection_pair_highlight},function(){D1._update_canvas()})},D1._handle_motion_changes=function(e){var _=window.screen,_=(_.orientation||{}).type||_.mozOrientation||_.msOrientation,t=e.accelerationIncludingGravity.x-e.acceleration.x,o=t=Math.max(-10,Math.min(10,t)),n=e.accelerationIncludingGravity.y-e.acceleration.y,n=Math.max(-10,Math.min(10,n));switch(_){case"portrait-primary":break;case"portrait-secondary":t=-t,n=-n;break;case"landscape-primary":t=-n,n=o;break;case"landscape-secondary":t=n,n=-o}L&&D1.state.perspective&&D1.state.has_shown_canvas_once&&D1.setState({_device_motion:!0,perspective_coordinate:[t,n],perspective_coordinate_last_change:Date.now()},function(){D1.state._moves_speed_average_now<=-24&&D1._request_force_update(!0,!1,function(){})})},D1.set_perspective_coordinate=function(e){L&&D1.state._device_motion||!D1.state.perspective||!D1.state.has_shown_canvas_once||D1.setState({perspective_coordinate:e,perspective_coordinate_last_change:Date.now()},function(){D1._request_force_update(!0,!1,function(){L||D1._notify_perspective_coordinate_changes(e.concat([D1.state.scale]))})})},D1._notify_perspective_coordinate_changes=function(e){var _;!D1.props.onPerspectiveCoordinateChanges||(_=D1.state).perspective_coordinate_last_notify+_.perspective_coordinate_notify_after_ms<(_=Date.now())&&(D1.setState({perspective_coordinate_last_notify:_}),D1.props.onPerspectiveCoordinateChanges(e))},D1.force_click=function(){D1._handle_canvas_mouse_down(null,1)},D1.zoom_of=function(){var e,_=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,r=D1.state,i=r.scale,s=r.scale_move_x,l=r.scale_move_y,c=i*_;6<c||c<1/6||(e=1-i/c,r=c/i,_=D1._get_canvas_pos(),i=void 0,o=null!==t&&null!==o?(i=t-_.canvas_container.left,o-_.canvas_container.top):(i=_.canvas_container.width/2,_.canvas_container.height/2),n=(s-i*e)*r+n,o=(l-o*e)*r+a,e=(_.canvas_container.width-_.canvas_wrapper.width)/2,r=(_.canvas_container.height-_.canvas_wrapper.height)/2,a=.75*_.canvas_wrapper.width+e,_=.75*_.canvas_wrapper.height+r,o-=r,n-=e,e=Math.min(Math.abs(n),a)*(n<0?-1:1)+e,r=Math.min(Math.abs(o),_)*(o<0?-1:1)+r,D1._set_moves(e,r,c))},D1.current_layer_up=function(){var e=D1.state,_=e._layers,t=e._layer_index,o=e._s_pxl_colors,e=e._s_pxls;t<_.length-1&&(_.splice(t+1,0,_.splice(t,1)[0]),o.splice(t+1,0,o.splice(t,1)[0]),e.splice(t+1,0,e.splice(t,1)[0]),D1.setState({_layers:_,_s_pxl_colors:o,_s_pxls:e,_layer_index:t+1},function(){D1._update_canvas(),D1._notify_layers_and_compute_thumbnails_change()}))},D1.current_layer_down=function(){var e=D1.state,_=e._layers,t=e._layer_index,o=e._s_pxl_colors,e=e._s_pxls;0<t&&(_.splice(t-1,0,_.splice(t,1)[0]),o.splice(t-1,0,o.splice(t,1)[0]),e.splice(t-1,0,e.splice(t,1)[0]),D1.setState({_layers:_,_s_pxl_colors:o,_s_pxls:e,_layer_index:t-1},function(){D1._update_canvas(),D1._notify_layers_and_compute_thumbnails_change()}))},D1.new_layer=function(e){var _=D1.state,t=_.pxl_width,o=_.pxl_height,n=D1.state,a=n._layers,_=n._s_pxl_colors,n=n._s_pxls;e=void 0===e?_.length:e,_.splice(e+1,0,["#00000000"]),n.splice(e+1,0,new Array(t*o).fill(0)),a.splice(e+1,0,{id:Date.now(),name:"Layer "+e,hidden:!1,opacity:1,data:{},thumbnail:""}),D1.setState({_layers:a,_layer_index:e,_s_pxl_colors:_,_old_pxl_colors:["#00000000"],_s_pxls:n,_old_pxls:new Array(t*o).fill(0),_last_action_timestamp:Date.now()},function(){D1._notify_layers_and_compute_thumbnails_change()})},D1.duplicate_layer=function(e){var _=D1.state,t=_.pxl_width,o=_.pxl_height,n=D1.state,a=n._layers,_=n._s_pxl_colors,n=n._s_pxls;e=void 0===e?_.length:e,_.splice(e+1,0,[].concat(S1(_[e]))),n.splice(e+1,0,[].concat(S1(n[e]))),a.splice(e+1,0,{id:Date.now(),name:a[e].name+" (copy)",hidden:a[e].hidden,opacity:a[e].opacity,data:a[e].data,thumbnail:a[e].thumbnail}),D1.setState({_layers:a,_layer_index:e+1,_s_pxl_colors:_,_old_pxl_colors:["#00000000"],_s_pxls:n,_old_pxls:new Array(t*o).fill(0),_last_action_timestamp:Date.now()},function(){D1._notify_layers_change()})},D1.delete_layer=function(e){var _=D1.state,t=(_.pxl_width,_.pxl_height,D1.state),o=t._layers,n=t._s_pxl_colors,_=t._s_pxls,t=t._layer_index;1<o.length&&(n.splice(e,1),_.splice(e,1),o.splice(e,1),D1.setState({_layers:o,_layer_index:t=(t=e-1)<0?0:t,_s_pxl_colors:n,_old_pxl_colors:n[t],_s_pxls:_,_old_pxls:_[t],_last_action_timestamp:Date.now()},function(){D1._update_canvas(),D1._notify_layers_change()}))},D1.change_active_layer=function(e){var _=D1.state,t=(_.pxl_width,_.pxl_height,_._s_pxl_colors),_=_._s_pxls;D1.setState({_layer_index:e,_old_pxl_colors:t[e],_old_pxls:_[e],_last_action_timestamp:Date.now()},function(){D1._notify_layers_change()})},D1.toggle_layer_visibility=function(e){var _=D1.state._layers,t=T({},_[e]);t.hidden=!t.hidden,_[e]=t,D1.setState({_layers:_},function(){D1._update_canvas(),D1._notify_layers_change()})},D1.change_layer_opacity=function(e,_){var t=D1.state._layers,o=T({},t[e]);o.opacity=_,t[e]=o,D1.setState({_layers:t},function(){D1._update_canvas(),D1._notify_layers_and_compute_thumbnails_change()})},D1.merge_down_layer=function(e){var o,n,a,r,i,s,l,_=D1.state,t=_._layers,c=_._s_pxls,p=_._s_pxl_colors,t=[].concat(S1(t)),c=[].concat(S1(c)),p=[].concat(S1(p)),d=D1.state,h=d.pxl_width,g=d.pxl_height;void 0!==t[e]&&void 0!==t[e-1]&&(_={id:Date.now(),name:"Merged layers "+e+"+"+(e-1),hidden:t[e].hidden&&t[e-1].hidden,data:{},opacity:1},o=new Array(h*g),n=[],a=c[e],d=c[e-1],r=p[e],i=t[e].opacity,s=p[e-1],l=t[e-1].opacity,d.forEach(function(e,_){var t=a[_],t=r[t],e=s[e],e=D1._blend_colors("#00000000",e,l,!1),e=D1._blend_colors(e,t,i,!1);n.includes(e)||n.push(e);e=n.indexOf(e);o[_]=e}),t.splice(e-1,2,_),c.splice(e-1,2,o),p.splice(e-1,2,n),D1.setState({_layer_index:e-1,_layers:t,_s_pxls:c,_old_pxls:new Array(h*g).fill(-1),_s_pxl_colors:p,_old_pxl_colors:[],_last_action_timestamp:Date.now()},function(){D1._notify_layers_and_compute_thumbnails_change(),D1._update_canvas()}))},D1._notify_game_end=function(){D1.props.onGameEnd&&D1.props.onGameEnd()},D1._notify_backdrop_click=function(e){D1.props.onBackdropClick&&D1.props.onBackdropClick(e)},D1._notify_layers_change=function(){var e,_,t,o;D1.props.onLayersChange&&(_=(e=D1.state)._layer_index,t=e._layers,o=e._s_pxl_colors,D1.props.onLayersChange(_,JSON.stringify(t.map(function(e,_){return e.colors=o[_].slice(0,128),e})))),D1._notify_estimate_size()},D1._notify_layers_and_compute_thumbnails_change=function(){var e=D1.state._json_state_history,e=JSON.parse(e),n=e.previous_history_position,a=e.history_position,r=e.state_history,e=D1.state,i=e._layers,s=e._s_pxls,l=e._s_pxl_colors,c=[],p=0;A(regeneratorRuntime.mark(function e(){var o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:o=function(){p===i.length&&D1.setState({_layers:[].concat(c)},function(){D1._notify_layers_change()})},void 0!==r[a]&&r[a]._layers.forEach(function(_,t){_=T({},r[a]._layers[t]||{}),a?void 0!==r[n]._layers[t]&&void 0!==r[a]._layers[t]?s[t]===r[a]._s_pxls[t]&&l[t]===r[a]._s_pxl_colors[t]&&i[t].opacity===r[a]._layers[t].opacity&&i[t].hidden===r[a]._layers[t].hidden&&i[t].id===r[a]._layers[t].id||D1.get_layer_base64_png_data_url(t,function(e){_.thumbnail=e,_.data=D1.get_layer_data(t),c[t]=_,p++,o()}):D1.get_layer_base64_png_data_url(t,function(e){_.thumbnail=e,_.data=D1.get_layer_data(t),c[t]=_,p++,o()}):0===parseInt(a)&&D1.get_layer_base64_png_data_url(t,function(e){_.thumbnail=e,_.data=D1.get_layer_data(t),c[t]=_,p++,o()})});case 2:case"end":return e.stop()}},e,P)}))()},D1.get_layer_data=function(e){return{number_of_color:D1.state._s_pxl_colors[e].length}},D1.get_layer_base64_png_data_url=function(a,t){var o=new Function('return async function(\n pxl_width, \n pxl_height,\n pxls, \n pxl_colors,\n scale\n ) {\n\n var canvas = new OffscreenCanvas(pxl_width * scale, pxl_height * scale);\n var ctx = canvas.getContext(\'2d\');\n \n pxls.forEach((pxl, index) => {\n \n var pixel_color_hex = pxl_colors[pxl];\n \n var pos_x = index % pxl_width;\n var pos_y = (index - pos_x) / pxl_width;\n \n ctx.fillStyle = pixel_color_hex;\n ctx.fillRect(pos_x * scale, pos_y * scale, 1 * scale, 1 * scale);\n });\n \n const to_data_URL = async (data) =>\n new Promise(ok => {\n const reader = new FileReader();\n reader.addEventListener("load", () => ok(reader.result));\n reader.readAsDataURL(data);\n });\n\n const blob = await canvas.convertToBlob({type: "image/png"});\n return await to_data_URL(blob);\n }')(),e=D1.state,r=e.pxl_width,i=e.pxl_height,s=e._s_pxls,l=e._s_pxl_colors;A(regeneratorRuntime.mark(function e(){var _;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.default.exec(o,[r,i,s[a]||[],l[a]||[],1]).catch(function(e){var _=document.createElement("canvas");_.width=+r,_.height=+i;var o=_.getContext("2d"),t=s[a]||[],n=l[a]||[];return t.forEach(function(e,_){var t=n[e],e=_%r,_=(_-e)/r;o.fillStyle=t,o.fillRect(e,_,1,1)}),_.toDataURL()}).timeout(12e4);case 2:_=e.sent,t(_);case 4:case"end":return e.stop()}},e,P)}))()},D1._pxls_to_png=(o=A(regeneratorRuntime.mark(function e(t,n,a){var _,r,i,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=new Function('return async function(\n pxl_width, \n pxl_height,\n pxls, \n pxl_colors,\n scale\n ) {\n\n var canvas = new OffscreenCanvas(pxl_width * scale, pxl_height * scale);\n var ctx = canvas.getContext(\'2d\');\n \n pxls.forEach((pxl, index) => {\n \n var pixel_color_hex = pxl_colors[pxl];\n \n var pos_x = index % pxl_width;\n var pos_y = (index - pos_x) / pxl_width;\n \n ctx.fillStyle = pixel_color_hex;\n ctx.fillRect(pos_x * scale, pos_y * scale, 1 * scale, 1 * scale);\n });\n \n const to_data_URL = async (data) =>\n new Promise(ok => {\n const reader = new FileReader();\n reader.addEventListener("load", () => ok(reader.result));\n reader.readAsDataURL(data);\n });\n\n const blob = await canvas.convertToBlob({type: "image/png"});\n return await to_data_URL(blob);\n }')(),_=D1.state,r=_.pxl_width,i=_.pxl_height,e.next=5,c.default.exec(o,[r,i,t,n,a]).catch(function(e){var _=document.createElement("canvas");_.width=r*a,_.height=i*a;var o=_.getContext("2d");return t.forEach(function(e,_){var t=n[e],e=_%r,_=(_-e)/r;o.fillStyle=t,o.fillRect(e*a,_*a,+a,+a)}),_.toDataURL()}).timeout(12e4);case 5:return o=e.sent,e.abrupt("return",o);case 7:case"end":return e.stop()}},e,P)})),function(e,_,t){return o.apply(this,arguments)}),D1._get_base64_png_data_url=function(){var d=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){},o=new Function('return async function(\n pxl_width, \n pxl_height,\n _s_pxls, \n _s_pxl_colors,\n _layers,\n scale\n ) {\n \n function this_rgb_to_hsl(r, g, b) {\n\n r /= 255, g /= 255, b /= 255;\n let max = Math.max(r, g, b), min = Math.min(r, g, b);\n let h, s, l = (max + min) / 2;\n\n if(max == min){\n h = s = 0; // achromatic\n }else{\n let d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch(max){\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n h /= 6;\n }\n\n return new Array(Math.round(h * 360), Math.round(s * 100), Math.round(l * 100));\n }\n\n function this_hsl_to_rgb(h, s, l) {\n\n h /= 360;\n s /= 100;\n l /= 100;\n\n let r, g, b;\n if (s === 0) {\n r = g = b = l;\n } else {\n function hue_to_rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n r = hue_to_rgb(p, q, h + 1 / 3);\n g = hue_to_rgb(p, q, h);\n b = hue_to_rgb(p, q, h - 1 / 3);\n }\n\n return new Array(r * 255, g * 255, b * 255);\n }\n\n function this_get_hex_values_from_rgba_values(r, g, b, a) {\n\n return new Array(\n this_get_hex_value_from_rgb_value(r),\n this_get_hex_value_from_rgb_value(g),\n this_get_hex_value_from_rgb_value(b),\n this_get_hex_value_from_rgb_value(a)\n );\n }\n\n function this_get_hex_color_from_rgba_values(r, g, b, a) {\n\n const hex = this_get_hex_values_from_rgba_values(r, g, b, a);\n return "#" + hex[0] + hex[1] + hex[2] + hex[3];\n }\n\n function this_get_rgba_from_hex(color) {\n\n color = color || "#00000000";\n\n const r = parseInt(color.substring(1, 3), 16);\n const g = parseInt(color.substring(3, 5), 16);\n const b = parseInt(color.substring(5, 7), 16);\n const a = parseInt(color.substring(7, 9), 16);\n\n return new Array(r, g, b, a);\n }\n\n function this_reduce_color(rgba_component, color_gain ) {\n\n if(color_gain === 1) {\n\n return rgba_component;\n }else {\n\n rgba_component++;\n let comp_by_gain = Math.round(rgba_component * color_gain) - 1;\n comp_by_gain = comp_by_gain < 0 ? 0: comp_by_gain;\n\n return Math.round(comp_by_gain / color_gain);\n }\n }\n\n function this_get_hex_value_from_rgb_value(value) {\n\n return Math.round(value).toString(16).padStart(2, "0");\n }\n\n function this_format_color(color) {\n\n color = typeof color === "undefined" ? "#00000000": color;\n // if color equals #fff -> #ffffff\n color = color.length === 4 ? "#" + color.charAt(1) + color.charAt(1) + color.charAt(2) + color.charAt(2) + color.charAt(3) + color.charAt(3): color;\n // if color equals #3333 -> #33333333\n color = color.length === 5 ? "#" + color.charAt(1) + color.charAt(1) + color.charAt(2) + color.charAt(2) + color.charAt(3) + color.charAt(3) + color.charAt(4) + color.charAt(4): color;\n // if color equals #000000 -> #000000ff (Alpha)\n color = color.length === 7 ? color + "ff": color;\n return color;\n }\n\n function this_match_color (color_a, color_b, threshold) {\n\n threshold = typeof threshold === "undefined" ? null: threshold;\n\n if(threshold === 1) {\n\n return true;\n }else if(threshold === 0){\n\n return color_a === color_b;\n }else {\n\n const threshold_256 = Math.round(threshold * 255);\n\n color_a = this_format_color(color_a);\n color_b = this_format_color(color_b);\n\n const c_a = this_get_rgba_from_hex(color_a);\n const c_b = this_get_rgba_from_hex(color_b);\n\n const a_diff = Math.abs(c_a[3] - c_b[3]);\n const r_diff = Math.abs(c_a[0] - c_b[0]);\n const g_diff = Math.abs(c_a[1] - c_b[1]);\n const b_diff = Math.abs(c_a[2] - c_b[2]);\n\n const a_diff_ratio = Math.abs(1 - a_diff / 255);\n\n if(threshold !== null) {\n\n return Boolean(r_diff < threshold_256 && g_diff < threshold_256 && b_diff < threshold_256 && a_diff < threshold_256);\n }else {\n\n return ((r_diff + g_diff + b_diff) / (255 * 3)) * a_diff_ratio;\n }\n }\n }\n\n function this_blend_colors (color_a, color_b, amount = 1, should_return_transparent = false, blend_alpha = true) {\n\n amount = Math.min(Math.max(amount, 0), 1);\n color_a = this_format_color(color_a);\n // If we blend the first color with the second with 0 "force", return transparent\n if(amount === 0 && color_b !== "hover" && should_return_transparent) {\n\n return "#00000000";\n }\n\n // Make sure we have a color based on the 4*2 hex char format\n\n if(color_b === "hover") {\n\n let rgba = this_get_rgba_from_hex(color_a);\n let hsl = this_rgb_to_hsl(rgba[0], rgba[1], rgba[2]);\n\n const irgb = this_hsl_to_rgb((hsl[0] + 0) % 360, (hsl[1] + 0) % 100, (hsl[2] + 50) % 100);\n color_b = this_get_hex_color_from_rgba_values(irgb[0], irgb[1], irgb[2], 255);\n }\n\n color_b = this_format_color(color_b);\n // If the second color is transparent, return transparent\n if(color_b === "#00000000" && amount === 1 && should_return_transparent) { return "#00000000"; }\n\n // Extract RGBA from both colors\n let base = this_get_rgba_from_hex(color_a);\n base[3] /= 255;\n\n let added = this_get_rgba_from_hex(color_b);\n added[3] /= 255;\n added[3] *= amount;\n\n let mix = [];\n if (base[3] !== 0 && added[3] !== 0) {\n\n mix[3] = 1 - (1 - added[3]) * (1 - base[3]); // alpha\n mix[0] = Math.round((added[0] * added[3] / mix[3]) + (base[0] * base[3] * (1 - added[3]) / mix[3])); // red\n mix[1] = Math.round((added[1] * added[3] / mix[3]) + (base[1] * base[3] * (1 - added[3]) / mix[3])); // green\n mix[2] = Math.round((added[2] * added[3] / mix[3]) + (base[2] * base[3] * (1 - added[3]) / mix[3])); // blue\n }else if(added[3] !== 0) {\n\n mix = added;\n }else {\n mix = base;\n }\n\n mix[3] *= 255;\n\n return this_get_hex_color_from_rgba_values(mix[0], mix[1], mix[2], mix[3]);\n }\n\n var canvas = new OffscreenCanvas(pxl_width * scale, pxl_height * scale);\n var ctx = canvas.getContext(\'2d\');\n \n _s_pxls[0].forEach((pxl, index) => {\n \n var layer_pixel_colors = [];\n var start_i = -1;\n start_i++;\n \n for (var i = _s_pxl_colors.length - 1; i >= 0; i--) {\n \n var layer_pixel_color = _s_pxl_colors[i][_s_pxls[i][index]];\n layer_pixel_colors[i] = layer_pixel_color;\n var rgba = layer_pixel_color;\n \n if(rgba[3] === 255) {\n \n start_i = i;\n break;\n }\n \n }\n \n var pixel_color_hex = "#00000000";\n \n for (let i = start_i; i < _s_pxl_colors.length ; i++) {\n \n if(!_layers[i].hidden) {\n \n var layer_pixel_color = layer_pixel_colors[i];\n \n pixel_color_hex = this_blend_colors(pixel_color_hex, layer_pixel_color, _layers[i].opacity, false);\n }\n }\n \n var pos_x = index % pxl_width;\n var pos_y = (index - pos_x) / pxl_width;\n \n ctx.fillStyle = pixel_color_hex;\n ctx.fillRect(pos_x * scale, pos_y * scale, 1 * scale, 1 * scale);\n });\n \n const to_data_URL = async (data) =>\n new Promise(ok => {\n const reader = new FileReader();\n reader.addEventListener("load", () => ok(reader.result));\n reader.readAsDataURL(data);\n });\n\n const blob = await canvas.convertToBlob({type: "image/png"});\n return await to_data_URL(blob);\n }')(),e=D1.state,h=e.pxl_width,n=e.pxl_height,g=e._s_pxls,u=e._s_pxl_colors,f=e._layers;e._layer_index,A(regeneratorRuntime.mark(function e(){var _;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.default.exec(o,[h,n,g,u,f,d]).catch(function(e){var _=document.createElement("canvas");_.width=h*d,_.height=n*d;var p=_.getContext("2d");return g[0].forEach(function(e,_){var t=[],o=-1;o++;for(var n=u.length-1;0<=n;n--){var a=u[n][g[n][_]];if(255===(t[n]=a)[3]){o=n;break}}for(var r,i="#00000000",s=o;s<u.length;s++)f[s].hidden||(r=t[s],i=D1._blend_colors(i,r,f[s].opacity,!1));var l=_%h,c=(_-l)/h;p.fillStyle=i,p.fillRect(l*d,c*d,+d,+d)}),_.toDataURL()}).timeout(12e4);case 2:_=e.sent,t(_);case 4:case"end":return e.stop()}},e,P)}))()},D1._format_color=function(e){return 7===(e=5===(e=4===(e=void 0===e?"#00000000":e.toString()).length?"#"+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)+e.charAt(3)+e.charAt(3):e).length?"#"+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)+e.charAt(3)+e.charAt(3)+e.charAt(4)+e.charAt(4):e).length?e+"ff":e},D1._reduce_color=function(e,_){if(1===_)return e;e++;e=(e=Math.round(e*_)-1)<0?0:e;return Math.round(e/_)},D1._get_pixels_palette_and_list_from_image_data=function(e){function _(e,_,t,o){var n=2<arguments.length&&void 0!==t?t:1;if(!(3<arguments.length&&void 0!==o)||o||e[_]===e[_+1]&&e[_+1]===e[_+2]&&(n=1),1===n)return D1._get_hex_color_from_rgba_values(e[_],e[_+1],e[_+2],e[_+3]);var a=D1._reduce_color(e[_],n),t=D1._reduce_color(e[_+1],n),o=D1._reduce_color(e[_+2],n),n=D1._reduce_color(e[_+3],n);return D1._get_hex_color_from_rgba_values(a,t,o,n)}var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],a=D1.state,r=a.max_size,i=a._lazy_lazy_compute_time_ms,a=e.data.length/4>r*r,s=1-o,l=[],c=new Set,p=void 0;if(!a||t)for(var p=new Array(e.width*e.height),d=0;d<e.data.length;d+=4){var h=_(e.data,d,s,n),g=c.has(h)?l.indexOf(h):-1;-1===g&&(g=l.push(h)-1,c.add(h)),p[d/4]=g}else{var u=Date.now();p=[];for(var f=0,A=0;A<r&&!(u+i<Date.now());A++){for(var m=Math.round(f)*e.width*4,x=0;x<4*e.width;x+=4){var v=_(e.data,x+m,s);l.includes(v)||l.push(v);v=l.indexOf(v);p[A*e.width+x/4]=v}f+=e.height/r}}return{too_much_pixel_cpu_would_go_brrrrr:a,ratio_pixel_per_color:p.length/l.length,new_pxl_colors:l,new_pxls:p}},D1._ctx_sharpen=function(e,_,t,o){for(var n,a,r,i,s,l,c,p,d,h,g,u=[0,-1,0,-1,5,-1,0,-1,0],f=Math.round(Math.sqrt(u.length)),A=.5*f|0,m=e.createImageData(_,t),x=m.data,v=e.getImageData(0,0,_,t).data,w=t;w--;)for(n=_;n--;){for(c=4*((r=w)*_+(a=n)),d=l=s=i=0;d<f;d++)for(p=0;p<f;p++)g=a+p-A,0<=(h=r+d-A)&&h<t&&0<=g&&g<_&&(i+=v[h=4*(h*_+g)]*(g=u[d*f+p]),s+=v[1+h]*g,l+=v[2+h]*g,v[3+h]);x[c]=i*o+v[c]*(1-o),x[1+c]=s*o+v[1+c]*(1-o),x[2+c]=l*o+v[2+c]*(1-o),x[3+c]=v[3+c]}e.putImageData(m,0,0)},D1._get_new_ctx_from_canvas=function(e,_){var t=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"",n=document.createElement("canvas");n.width=e,n.height=_;_=n.getContext("2d");return t?(_.mozImageSmoothingEnabled=!1,_.webkitImageSmoothingEnabled=!1,_.msImageSmoothingEnabled=!1,_.imageSmoothingEnabled=!1):o.length&&(_.imageSmoothingQuality=o),[_,n]},D1.copy_selection=function(){D1.import_image_on_canvas_from_selection()},D1.cut_selection=function(){D1.import_image_on_canvas_from_selection(),D1.erase_selection(),D1.to_selection_none()},D1.erase_selection=function(){var _,e=D1.state,t=e._s_pxls,o=e._s_pxl_colors,n=e._layer_index,a=e._pxl_indexes_of_selection;e.pxl_width,e.pxl_height,0<a.size&&(o[n].includes("#00000000")||o[n].push("#00000000"),_=o[n].indexOf("#00000000"),a.forEach(function(e){t[n][e]=_}),D1.setState({_s_pxls:t,_s_pxl_colors:o,_last_action_timestamp:Date.now()},function(){D1._update_canvas()}))},D1.import_image_on_canvas_from_selection=function(){var e=D1.state,_=e._s_pxls,t=e._s_pxl_colors,o=e._layer_index,n=e._pxl_indexes_of_selection,a=e.pxl_width,e=e.pxl_height;if(0<n.size){var r=[a,e],i=[-1,-1];n.forEach(function(e){var _=e%a,e=(e-_)/a;_<r[0]&&(r[0]=_),e<r[1]&&(r[1]=e),_>i[0]&&(i[0]=_),e>i[1]&&(i[1]=e)});for(var s=1+i[0]-r[0],l=1+i[1]-r[1],c=_[o],p=new Array(s*l),d=t[o],h=0;h<s*l;h++){var g=h%s,u=(h-g)/s;g+=r[0];g=(u+=r[1])*a+g;n.has(g)?p[h]=c[g]:(d.includes("#00000000")||d.push("#00000000"),p[h]=d.indexOf("#00000000"))}o=D1._remove_duplicate_pxl_colors(p,d),o=E1(o,2),p=o[0],d=o[1];D1.setState({_imported_image_start_x:r[0],_imported_image_start_y:r[1],_imported_image_scale_delta_x:0,_imported_image_scale_delta_y:0,_imported_image_pxls:p,_imported_image_width:s,_imported_image_height:l,_imported_image_pxl_colors:d},function(){D1._notify_image_import_complete(),D1._notify_is_image_import_mode(),D1._update_canvas()})}},D1.import_image_on_canvas=function(n){D1.props.onImageImport&&D1.props.onImageImport(),setTimeout(function(){var e=D1.state,_=(e.pxl_width,e.pxl_height,n.width),t=n.height,o=D1._get_new_ctx_from_canvas(_,t,!1),e=E1(o,1)[0];e.drawImage(n,0,0,_,t);o=e.getImageData(0,0,_,t),e=D1._get_pixels_palette_and_list_from_image_data(o,!0),o=e.new_pxl_colors,e=e.new_pxls;D1.setState({_imported_image_start_x:0,_imported_image_start_y:0,_imported_image_scale_delta_x:0,_imported_image_scale_delta_y:0,_imported_image_pxls:e,_imported_image_width:_,_imported_image_height:t,_imported_image_pxl_colors:o},function(){D1._notify_image_import_complete(),D1._notify_is_image_import_mode(),D1._update_canvas()})},50)},D1._get_imported_image_scaled=function(e,o,n,_,t,a){if(e.length){var r=D1._get_new_ctx_from_canvas(n,_,!0),i=E1(r,2),s=i[0],r=i[1];e.forEach(function(e,_){var t=_%n,_=(_-t)/n,e=o[e];s.fillStyle=e,s.fillRect(t,_,1,1)});i=n+t,t=_+a,a=D1._get_new_ctx_from_canvas(i,t,!0),a=E1(a,1)[0];a.drawImage(r,0,0,n,_,0,0,i,t);a=a.getImageData(0,0,i,t),a=D1._get_pixels_palette_and_list_from_image_data(a,!0);return[a.new_pxls,a.new_pxl_colors,i,t]}return[e,o,n,_]},D1.set_canvas_hidden=function(){D1.setState({_hidden:!0},function(){D1._request_force_update()})},D1.set_canvas_from_image=function(){var e,_,z=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};D1.props.onLoad&&D1.props.onLoad("image_load"),t.id?(e=[t.pxl_colors],_=[t.pxls],D1.setState({_id:Date.now(),pxl_width:t.width,pxl_height:t.height,_pxl_indexes_of_selection:new Set,_base64_original_images:[],_s_pxl_colors:e,_s_pxls:_,_layers:[{id:Date.now(),name:"Layer 0",hidden:!1,opacity:1,data:{}}],_layer_index:0,_old_pxls_hovered:-1,_pxls_hovered:-1,_old_pxl_colors:[],_old_pxls:new Array(t.pxls.length).fill(-1),_is_there_new_dimension:!0,has_shown_canvas_once:!1,_original_image_index:-1,_last_action_timestamp:Date.now()},function(){D1._notify_size_change(),D1._notify_layers_change(),D1._update_screen_zoom_ratio(!0),D1._notify_image_load_complete()})):setTimeout(A(regeneratorRuntime.mark(function e(){var _,t,o,n,a,r,i,s,l,c,p,d,h,g,u,f,A,m,x,v,w,b,M,C,y,I,D,E,S,R,N,T,k,L,O,B,Q,Y,U,G,V;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(d=D1.state,_=d.default_size,t=d.max_size,o=d.ideal_size,n=d._base64_original_images,a=d.dont_change_img_size_onload,r=d.dont_compute_base64_original_image,i=z.width,s=z.height,l=D1._get_new_ctx_from_canvas(i,s,!1),c=E1(l,2),p=c[0],d=c[1],p.drawImage(z,0,0,i,s),l=p.getImageData(0,0,i,s),c=r?"":d.toDataURL("image/jpeg"),d=null,p=!1,!(d=1)===a)return U=D1._get_pixels_palette_and_list_from_image_data(l,!1,.984375),h=U.new_pxl_colors,g=U.new_pxls,u=U.ratio_pixel_per_color,U.too_much_pixel_cpu_would_go_brrrrr,e.next=15,D1._remove_close_pxl_colors(g,h,.25,null,0);e.next=57;break;case 15:if(R=e.sent,L=E1(R,2),g=L[0],h=L[1],u=g.length/h.length,f=s*i<t*t){e.next=52;break}if(A=1/0,x=0,v=-1,(m=[])[1]=0,g.forEach(function(e,_){v===e||0===_?x++:(x<A&&(A=x),m[x]=void 0!==m[x]?m[x]+1:1,x=1),v=e}),M=b=w=1,C=Math.sqrt(i*s/(o*o)),Object.entries(m).forEach(function(e,_){var t=E1(e,2),o=t[0],e=t[1];32<(o=parseInt(o))||(t=32<o?1:42/(o+10),t=32<o?0:(32<o?1:t*C)*Math.pow(o,1-1/t+1),1!==o&&b<e*o+t&&(b=(w=e*(M=o))+t))}),N=w*C*4>m[1]?M:1,y=N,!(m[1]<m.length)){e.next=48;break}I=0;case 39:if(void 0!==m[I]&&0!==m[I]){e.next=44;break}I++,e.next=46;break;case 44:return I>m[1]&&(y=I,f=!0),e.abrupt("break",48);case 46:e.next=39;break;case 48:if(D=y,Object.entries(m).forEach(function(e,_){var t=E1(e,2),e=t[0],t=t[1],e=parseInt(e);1<_&&t>m[D]&&e<y&&(D=e)}),z.width%D!=0)for(E=1;z.width%(D+E)!=0&&z.width%(D-E)!=0&&z.height%(D+E)!=0&&z.height%(D-E)!=0&&E<16;)z.width%(D-E)==0&&z.height%(D-E)==0?D-=E:z.width%(D+E)==0&&z.height%(D+E)==0&&(D+=E),E++;d=1/D;case 52:if(O=s*d*(i*d),T=u>16*Math.sqrt(O)&&O<=_*_*4||u>9*Math.sqrt(O)&&O<=_*_*3||u>4*Math.sqrt(O)&&O<=_*_*2||u>+Math.sqrt(O)&&O<=_*_*1,k=O>h.length,B=O<t*t,(T||f)&&B&&k)_*_<s*i&&(i*=d,s*=d,p=!0);else{for(S=1;Math.round(i*S)*Math.round(s*S)>_*_;)S-=.01;i*=S,s*=S}case 57:U=void 0,G=p&&!1===a?(L=(R=i/d)-R%(G=1/d),O=(N=s/d)-N%G,T=Math.floor(L/G),B=Math.floor(O/G),k=L,G=O,L=Math.floor((R-L)/2),O=Math.floor((N-O)/2),i=Math.floor(T),s=Math.floor(B),B=D1._get_new_ctx_from_canvas(i,s,!0),B=E1(B,1),(U=B[0]).drawImage(z,L,O,k,G,0,0,i,s),U.getImageData(0,0,i,s)):!1===a?(i=Math.floor(i),s=Math.floor(s),V=D1._get_new_ctx_from_canvas(i,s,!0),Y=E1(V,1),(U=Y[0]).drawImage(z,0,0,i,s),U.getImageData(0,0,i,s)):l,V=D1._get_pixels_palette_and_list_from_image_data(G,!0,0),Q=V.new_pxl_colors,Y=V.new_pxls,(U=n).includes(c)||U.push(c),(G=[])[0]=Q,(V=[])[0]=Y,D1.setState({_id:Date.now(),pxl_width:i,pxl_height:s,_pxl_indexes_of_selection:new Set,_base64_original_images:r?[]:U,_layers:[{id:Date.now(),name:"Layer 0",hidden:!1,opacity:1,data:{}}],_s_pxl_colors:G,_s_pxls:V,_layer_index:0,_old_pxls_hovered:-1,_pxls_hovered:-1,_old_pxl_colors:[],_old_pxls:new Array(Y.length).fill(-1),_is_there_new_dimension:!0,has_shown_canvas_once:!1,_original_image_index:U.indexOf(c),_last_action_timestamp:Date.now()},function(){D1._notify_size_change(),D1._notify_layers_change(),D1._update_screen_zoom_ratio(!0),512<=Q.length?D1._to_less_color(1/32,function(){D1._notify_image_load_complete()}):D1._notify_image_load_complete()});case 71:case"end":return e.stop()}},e,P)})),50)},D1._set_canvas_ref=function(e){null!==e&&(e.context2d=e.getContext("2d"),e.context2d.globalCompositeOperation="source-over",D1.setState({_canvas:e},function(){D1._request_force_update()}))},D1._set_canvas_container_ref=function(e){null!==e&&D1.setState({_canvas_container:e},function(){D1._update_canvas_container_size()})},D1._set_canvas_wrapper_ref=function(e){null!==e&&D1.setState({_canvas_wrapper:e})},D1._set_canvas_wrapper_overflow_ref=function(e){null!==e&&(e.addEventListener("wheel",D1.handle_canvas_wrapper_overflow_wheel,{capture:!0}),e.addEventListener("pointerdown",D1._handle_canvas_wrapper_overflow_pointer_down,{capture:!0}),e.addEventListener("pointermove",D1._handle_canvas_wrapper_overflow_pointer_move,{capture:!0}),e.addEventListener("pointerup",D1._handle_canvas_wrapper_overflow_pointer_up,{capture:!0}),e.addEventListener("pointercancel",D1._handle_canvas_wrapper_overflow_pointer_up,{capture:!0}),e.addEventListener("pointerout",D1._handle_canvas_wrapper_overflow_pointer_up,{capture:!0}),e.addEventListener("pointerleave",D1._handle_canvas_wrapper_overflow_pointer_up,{capture:!0}),D1.setState({_canvas_wrapper_overflow:e}))},D1._to_canvas_middle=function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],_=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,t=D1.state,o=t._canvas_container,n=t._canvas_wrapper,t=t.default_scale,_=null!==_?_:e?t:D1.state.scale;o&&n&&D1.setState({scale:_},function(){D1._request_force_update(!1,!1,function(){var e=n.getBoundingClientRect(),_=(o.clientWidth-e.width)/2,e=(o.clientHeight-e.height)/2;D1.setState({scale_move_x:_,scale_move_y:e,_moves_speed_average_now:8,_hidden:!1,has_shown_canvas_once:!1},function(){D1.props.on_elevation_change&&D1.props.on_elevation_change(D1.state._moves_speed_average_now),D1._request_force_update()})})})},D1._get_canvas_pos_from_event=function(e){var _=D1.state,t=_.pxl_width,o=_.pxl_height,n=D1._get_canvas_pos().canvas,_=e.pageX-n.left,e=e.pageY-n.top,_=Math.floor(t*(_/n.width)),n=Math.floor(o*(e/n.height)),_=_!==Math.max(Math.min(_,t-1),0)?-1:_,n=n!==Math.max(Math.min(n,o-1),0)?-1:n;return-1!==_&&-1!==n||(n=_=-1),[_,n]},D1._match_color=function(e,_,t){if(1===(t=void 0===t?null:t))return!0;if(0===t)return e===_;var o=Math.round(255*t);e=D1._format_color(e),_=D1._format_color(_);var n=D1._get_rgba_from_hex(e),a=E1(n,4),r=a[0],i=a[1],s=a[2],l=a[3],e=D1._get_rgba_from_hex(_),n=E1(e,4),a=n[0],_=n[1],e=n[2],n=n[3],n=Math.abs(l-n),a=Math.abs(r-a),_=Math.abs(i-_),s=Math.abs(s-e),e=Math.abs(1-n/255);return null!==t?Boolean(a<o&&_<o&&s<o&&n<o):(a+_+s)/765*e},D1.exchange_pixel_color=function(e,_){D1._exchange_pixel_color(e,_)},D1._exchange_pixel_color=function(e,_){var t=D1.state,o=t._s_pxl_colors,n=t._s_pxls,t=t._layer_index,o=[].concat(S1(o[t])),n=[].concat(S1(n[t])),a=o.indexOf(e),e=o[a],_=D1._blend_colors(e,_,1,!0);o.includes(_)||o.push(_);var r=o.indexOf(_),n=n.map(function(e){return e===a?r:e}),_=D1._remove_duplicate_pxl_colors(n,o),_=E1(_,2);n=_[0];o=_[1],_=D1.state._s_pxl_colors;_[t]=o;o=D1.state._s_pxls;o[t]=n,D1.setState({_s_pxls:o,_s_pxl_colors:_,_last_action_timestamp:Date.now()},function(){D1._update_canvas()})},D1._handle_canvas_mouse_down=function(e,_){var t=D1.state,o=t._mouse_down,n=t.hide_canvas_content,c=t.tool,p=t.pxl_width,d=t.pxl_height,h=t.pxl_current_color,g=t.pxl_current_opacity,a=t.bucket_threshold,r=t.select_mode,i=t._event_button+1,s=-1,l=-1;if(-1!==D1.state._pxls_hovered&&null===e?(w=D1.state._pxls_hovered%p,l=(D1.state._pxls_hovered-(s=w))/p):e&&(M=D1._get_canvas_pos_from_event(e),s=(C=E1(M,2))[0],l=C[1]),-1!==s&&-1!==l){var u=D1.state,f=u._shape_index_a,A=u._select_shape_index_a,m=(u._shape_index_b,u._select_shape_index_b,D1.state._pxl_indexes_of_selection),x=l*p+s,t=D1.state,v=t._s_pxls,w=t._s_pxl_colors,b=t._layer_index,M=t.hue,C=(t._layers,v[b][x]);if(-1!==i){1===i?D1.setState({_mouse_down:!0},function(){!0!==o&&D1._request_force_update()}):3===i&&(A=f=-1);u=D1.state,t=u._imported_image_pxls;if(u.scale,!n){var y=[].concat(S1(v[b])),I=[].concat(S1(v[b])),D=[].concat(S1(w[b])),n=D[C],n=D1._blend_colors(n,h,g,!0);D.includes(n)||D.push(n);var E,n=D.indexOf(n);if(0<t.length&&1===i)D1.setState({_imported_image_move_from:[s,l]});else if(2===i||"MOVE"===c&&(1===i||-1===i))D1.setState({_image_move_from:[e.x,e.y]});else if("MINE"===c&&1===i)D1.setState({_mine_index:x});else if("PICKER"===c&&1===i){t=D1.get_pixel_color_from_pos(s,l);D1._notify_current_color_change(t),D1._notify_relevant_action_event(e,t,1)}else if("EXCHANGE"===c&&1===i){var S=w[b][C];D1._exchange_pixel_color(S,h),D1._notify_relevant_action_event(e,h,1)}else if("LINE"===c||"RECTANGLE"===c||"ELLIPSE"===c)-1===f?1===i?D1.setState({_shape_index_a:x},function(){D1._update_canvas()}):D1.setState({_shape_index_a:f},function(){D1._update_canvas()}):(S="LINE"===c?D1._get_pixels_palette_and_list_from_line(I,f,x,D,h,g):"RECTANGLE"===c?D1._get_pixels_palette_and_list_from_rectangle(I,f,x,D,h,g):D1._get_pixels_palette_and_list_from_ellipse(I,f,x,D,h,g),I=S[0],D=S[1],(f=D1.state._s_pxl_colors)[b]=D,(S=D1.state._s_pxls)[b]=I,D1.setState({_s_pxls:S,_s_pxl_colors:f,_shape_index_a:-1,_last_action_timestamp:Date.now()},function(){D1._update_canvas()}),D1._notify_relevant_action_event(e,"#ffffffff",.6));else if("SELECT LINE"===c||"SELECT RECTANGLE"===c||"SELECT ELLIPSE"===c)-1===A?1===i?D1.setState({_select_shape_index_a:x},function(){D1._update_canvas()}):D1.setState({_select_shape_index_a:A},function(){D1._update_canvas()}):(N=("SELECT LINE"===c?D1._get_pixels_palette_and_list_from_line(I,A,x):"SELECT RECTANGLE"===c?D1._get_pixels_palette_and_list_from_rectangle(I,A,x):D1._get_pixels_palette_and_list_from_ellipse(I,A,x))[2],"REPLACE"===r&&m.clear(),N.forEach(function(e){"ADD"===r||"REPLACE"===r?m.add(e):m.delete(e)}),D1.setState({_pxl_indexes_of_selection:m,_select_shape_index_a:-1,_last_action_timestamp:Date.now()},function(){D1._update_canvas(),D1._notify_is_something_selected()}));else if("SELECT PIXEL"!==c&&"SELECT PATH"!==c||1!==i)if("SET PENCIL MIRROR"===c&&1===i)D1.setState({_pencil_mirror_index:x,_last_action_timestamp:Date.now()},function(){D1._update_canvas()});else if("PENCIL"!==c&&"PENCIL PERFECT"!==c&&"CONTOUR"!==c||1!==i)if("BUCKET"!==c&&"HUE BUCKET"!==c&&"SELECT COLOR THRESHOLD"!==c&&"BORDER"!==c||1!==i)"SELECT COLOR"===c&&1===i&&(O=D1.state._s_pxls,B=[].concat(S1(O[b])),E=B[x],"REPLACE"===r&&m.clear(),[].concat(S1(B)).forEach(function(e,_){e===E&&("ADD"===r||"REPLACE"===r?m.add(_):m.delete(_))}),D1.setState({_pxl_indexes_of_selection:m,_last_action_timestamp:Date.now()},function(){D1._update_canvas(),D1._notify_is_something_selected()}));else{for(var A=D1.state._old_pxls,R=[].concat(S1(A)),N=[s,l],T=R[x],k=D[T],L=[],i=D1._get_rgba_from_hex(k),O=E1(i,4),B=O[0],A=O[1],i=O[2],A=(O[3],D1._rgb_to_hsl(B,A,i)),i=E1(A,3),A=i[0],Q=(i[1],i[2],A<M?M-A:360-A+M),Y=[N],U=new Set,G=function(e){if(0===a)return T===R[e];if(!U.has(e)&&0<=e&&e<p*d){e=D[R[e]]||"#00000000";return D1._match_color(k||"#00000000",e,a)}return!1},V=function(e){var _,t,o,n,a,r,i,s,l=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];(!U.has(e)||l)&&0<=e&&e<p*d&&("HUE BUCKET"===c?(l&&(_=D[y[e]],void 0===L[_]?(n=D1._get_rgba_from_hex(_),a=(o=E1(n,4))[0],r=o[1],i=o[2],s=o[3],t=D1._rgb_to_hsl(a,r,i),o=(n=E1(t,3))[0],t=n[1],n=n[2],n=D1._hsl_to_rgb((o+Q)%360,t,n),a=(n=E1(n,3))[0],r=n[1],i=n[2],s="#"+D1._get_hex_value_from_rgb_value(a)+D1._get_hex_value_from_rgb_value(r)+D1._get_hex_value_from_rgb_value(i)+D1._get_hex_value_from_rgb_value(s),D.includes(s)||D.push(s),s=D.indexOf(s),L[_]=s,I[e]=s):I[e]=L[_]),U.add(e)):"BUCKET"===c||"BORDER"===c?(l&&(l=I[e],l=D[l],l=D1._blend_colors(l,h,g),D.includes(l)||D.push(l),l=D.indexOf(l),I[e]=l),U.add(e)):"SELECT COLOR THRESHOLD"===c&&U.add(e))},z=!1,P=!1;Y.length;){for(var j=Y.pop(),j=E1(j,2),F=j[0],q=j[1],W=q*p+F;0<=q&&G(W);)W-=p,q--;for(W+=p,q++,P=z=!1;q<d&&G(W);)q++,V(W,"BORDER"!==c),0<F&&(G(W-1)?z||(Y.push([F-1,q-1]),z=!0):z=z&&!1),F+1<p&&(G(W+1)?P||(Y.push([F+1,q-1]),P=!0):P=P&&!1),W+=p}"BORDER"===c?(D1._get_border_from_selection(U).forEach(function(e){V(e,!0)}),M=D1._remove_duplicate_pxl_colors(I,D),N=E1(M,2),I=N[0],D=N[1],(M=D1.state._s_pxl_colors)[b]=D,(N=D1.state._s_pxls)[b]=I,D1.setState({_s_pxls:N,_s_pxl_colors:M,_last_action_timestamp:Date.now()},function(){D1._update_canvas()})):"SELECT COLOR THRESHOLD"===c?("REPLACE"===r&&m.clear(),[].concat(S1(U)).forEach(function(e){"ADD"===r||"REPLACE"===r?m.add(e):m.delete(e)}),D1.setState({_pxl_indexes_of_selection:m,_last_action_timestamp:Date.now()},function(){D1._update_canvas(),D1._notify_is_something_selected()})):"BUCKET"!==c&&"HUE BUCKET"!==c||(K=D1._remove_duplicate_pxl_colors(I,D),J=E1(K,2),I=J[0],D=J[1],(K=D1.state._s_pxl_colors)[b]=D,(J=D1.state._s_pxls)[b]=I,D1.setState({_s_pxls:J,_s_pxl_colors:K,_last_action_timestamp:Date.now()},function(){D1._update_canvas()}),D1._notify_relevant_action_event(e,h,1))}else{var J=D1.state,K=J.pencil_mirror_mode,e=J._pencil_mirror_index,Z=e%p,J=(e-Z)/p,e=new Set([[s,l]]);"VERTICAL"!==K&&"BOTH"!==K||(J=l-2*(l-J),0<=(s=s)&&s<p&&0<=J&&J<=d&&(e.add([s,J]),s=v[b][J=J*p+s],s=D[s],s=D1._blend_colors(s,h,g,!0),D.includes(s)||D.push(s),I[J]=D.indexOf(s))),"HORIZONTAL"!==K&&"BOTH"!==K||e.forEach(function(e){var _=e[1],e=e[0]-2*(e[0]-Z);0<=e&&e<p&&0<=_&&_<=d&&(e=v[b][_=_*p+e],e=D[e],e=D1._blend_colors(e,h,g,!0),D.includes(e)||D.push(e),I[_]=D.indexOf(e))}),I[x]=n;e=D1.state._s_pxl_colors;e[b]=D;n=D1.state._s_pxls;n[b]=I,D1.setState({_s_pxls:n,_s_pxl_colors:e,_paint_or_select_hover_pxl_indexes:new Set([x]),_paint_or_select_hover_actions_latest_index:x,_paint_hover_old_pxls_snapshot:[].concat(S1(D1.state._s_pxls[b])),_last_action_timestamp:Date.now()},function(){D1._update_canvas()})}else"REPLACE"===r&&m.clear(),"ADD"===r||"REPLACE"===r?m.add(x):m.delete(x),"SELECT PIXEL"===c?D1.setState({_pxl_indexes_of_selection:m,_paint_or_select_hover_actions_latest_index:x,_last_action_timestamp:Date.now()},function(){D1._update_canvas(),D1._notify_is_something_selected()}):"SELECT PATH"===c&&D1.setState({_pxl_indexes_of_selection:m,_paint_or_select_hover_actions_latest_index:x,_last_action_timestamp:1/0},function(){D1._update_canvas(),D1._notify_is_something_selected()})}}else D1.setState({_pxls_hovered:x},function(){D1._update_canvas()})}},D1.set_selection_by_colors=function(_,o){var e=D1.state,t=e._s_pxl_colors,n=e._s_pxls,e=e._layer_index,a=D1.state._pxl_indexes_of_selection,r=[].concat(S1(n[e]));a.clear(),t[e].forEach(function(e,t){D1._match_color(_,e,o)&&r.forEach(function(e,_){e===t&&a.add(_)})}),D1.setState({_pxl_indexes_of_selection:a,_last_action_timestamp:Date.now()},function(){D1._update_canvas(),D1._notify_is_something_selected()})},D1._get_pixels_palette_and_list_from_line=function(e,_,t){var o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:[],n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:null,a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:null;e=[].concat(S1(e));for(var o=[].concat(S1(o)),r=[],i=D1.state.pxl_width,s=_%i,l=(_-s)/i,c=t%i,p=(t-c)/i,d=Math.abs(c-s),h=Math.abs(p-l),g=s<c?1:-1,u=l<p?1:-1,f=d-h;;){var A,m=l*i+s;if(o!==[]&&null!==n&&null!==a&&(A=o[e[m]],A=D1._blend_colors(A,n,a),o.includes(A)||o.push(A),A=o.indexOf(A),e[m]=A),r.push(m),s===c&&l===p)break;m=2*f;-h<m&&(f-=h,s+=g),m<d&&(f+=d,l+=u)}return[e,o,r]},D1._get_pixels_palette_and_list_from_rectangle=function(e,_,t){var o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:[],n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:null,a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:null;e=[].concat(S1(e));for(var o=[].concat(S1(o)),r=[],i=D1.state.pxl_width,s=_%i,l=(_-s)/i,c=t%i,_=(t-c)/i,p=Math.abs(s-c)+1,t=Math.abs(l-_)+1,d=p*t,h=Math.max(s,c)-(p-1),g=Math.max(l,_)-(t-1),u=0;u<d;u++){var f=u%p,A=(g+(u-f)/p)*i+(h+f);o!==[]&&null!==n&&null!==a&&(f=o[e[A]],f=D1._blend_colors(f,n,a),o.includes(f)||o.push(f),f=o.indexOf(f),e[A]=f),r.push(A)}return[e,o,r]},D1._get_pixels_palette_and_list_from_path=function(t,e){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:null,_=D1.state,r=_.pxl_width,i=_.pxl_height;t=[].concat(S1(t)),o=[].concat(S1(o)),e=new Set([].concat(S1(e)));var s=new Set,_=D1._get_new_ctx_from_canvas(r,i),l=E1(_,1)[0];l.lineWidth=0,l.beginPath(),e.forEach(function(e,_){var t=e%r,e=(e-t)/r;0===_?l.moveTo(t,e):l.lineTo(t,e)}),l.strokeStyle="#ffffffff",l.fillStyle="#ffffffff",l.stroke(),l.fill();for(var _=l.getImageData(0,0,r,i),_=D1._get_pixels_palette_and_list_from_image_data(_,!0,0),c=_.new_pxl_colors,p=_.new_pxls,d=0;d<p.length;d++){var h=d%r,h=(d-h)/r*r+h;p[h]!==c.indexOf("#ffffffff")&&!e.has(d)||s.add(h)}for(var g,u,f,A,m=0;m<p.length;m++)e.has(m)||(A=f=u=g=void 0,u=(u=m+1)%r==0?-1:u,f=r*i<(f=m+r)?-1:f,A=(A=m-1)%r==r-1?-1:A,s.has(g=(g=m-r)<0?-1:g)&&s.has(u)&&s.has(f)&&s.has(A)&&s.add(m));return o!==[]&&null!==n&&null!==a&&s.forEach(function(e){var _=t[e],_=o[_],_=D1._blend_colors(_,n,a);o.includes(_)||o.push(_);_=o.indexOf(_);t[e]=_}),[t,o,[].concat(S1(s))]},D1._get_pixels_palette_and_list_from_ellipse=function(e,_,t){var o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:[],n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:null,a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:null,r=D1.state,i=r.pxl_width,s=r.pxl_height;r.px_per_px,e=[].concat(S1(e));var o=[].concat(S1(o)),l=[],c=_%i,p=(_-c)/i,r=t%i,_=(t-r)/i,d=Math.abs(c-r)+1,t=Math.abs(p-_)+1,h=Math.max(c,r)-(d-1),g=Math.max(p,_)-(t-1),c=d/2,r=t/2,p=c+h,_=r+g,t=D1._get_new_ctx_from_canvas(i,s),t=E1(t,1)[0];t.save(),t.translate(p,_),t.rotate(0),t.scale(c,r),t.arc(0,0,1,0,2*Math.PI),t.restore(),t.fillStyle="#ffffffff",t.fill();for(var s=t.getImageData(0,0,i,s),s=D1._get_pixels_palette_and_list_from_image_data(s,!0,0),u=s.new_pxl_colors,f=s.new_pxls,A=0;A<f.length;A++){var m=A%d,x=(g+(A-m)/d)*i+(h+m);f[x]===u.indexOf("#ffffffff")&&(m=e[x],o!==[]&&null!==n&&null!==a&&(m=o[m],m=D1._blend_colors(m,n,a),o.includes(m)||o.push(m),m=o.indexOf(m),e[x]=m),l.push(x))}return[e,o,l]},D1._should_remove_not_perfect_second_latest_pixel_from_array=function(e){var _=D1.state.pxl_width,t=[].concat(S1(e));if(3<=t.length){var o=t[t.length-1],n=o%_,a=(o-n)/_,r=t[t.length-2],i=r%_,e=(r-i)/_,o=t[t.length-3],r=o%_,t=(o-r)/_,o=Math.abs(n-r),_=Math.abs(a-t);if(1===o&&1===_&&(n==i&&e==t||a==e&&i==r||r==i&&e==a||t==e&&i==n))return!0}return!1},D1.get_pixel_color_from_pos=function(e,_){var t=D1.state,o=t.pxl_width,n=t._s_pxls,a=t._s_pxl_colors,r=t._layers,i=_*o+e,s=[],l=-1;l++;for(var c=a.length-1;0<=c;c--){var p=a[c][n[c][i]];s[c]=p;p=E1(p,4);if(p[0],p[1],p[2],255===p[3]){l=c;break}}for(var d,h="#00000000",g=l;g<a.length;g++)r[g].hidden||(d=s[g],h=D1._blend_colors(h,d,r[g].opacity,!1));return h},D1.handle_canvas_wrapper_overflow_wheel=function(e){var _=D1.state,t=_.scale,o=_.scale_move_x,n=_.scale_move_y;_._canvas_container,e.preventDefault();var a,r,i=Math.max(Math.min(.125,Math.abs(-.01*e.deltaY)),.25),s=t+(i=0<-.01*e.deltaY?i:-i)*t*(.9/Math.pow(t<1?1/t:t,1.6));6<s||s<1/6||(r=1-t/s,a=s/t,_=D1._get_canvas_pos(),i=void 0,t=null!==e.pageX&&null!==e.pageY?(i=e.pageX-_.canvas_container.left,e.pageY-_.canvas_container.top):(i=_.canvas_container.width/2,_.canvas_container.height/2),i=(o-i*r)*a+e.movementX,n=(n-t*r)*a+e.movementY,t=(_.canvas_container.width-_.canvas_wrapper.width)/2,r=(_.canvas_container.height-_.canvas_wrapper.height)/2,a=.75*_.canvas_wrapper.width+t,_=.75*_.canvas_wrapper.height+r,n-=r,i-=t,t=Math.min(Math.abs(i),a)*(i<0?-1:1)+t,r=Math.min(Math.abs(n),_)*(n<0?-1:1)+r,!0===e.ctrlKey&&0!==e.deltaY?D1._to_canvas_middle(!1,s):D1._set_moves(t,r,s))},D1._handle_canvas_pointer_down=function(r,e){var _=D1.state,t=_._pointer_events,o=_._previous_single_pointer_down_timestamp,n=_._previous_single_pointer_down_x_y,_=E1(n,2),n=_[0],_=_[1];o+400>Date.now()&&1===t.length&&Math.abs(n-r.pageX)<20&&Math.abs(_-r.pageY)<20?(setTimeout(function(){var e=D1._get_canvas_pos_from_event(r),_=E1(e,2),t=_[0],o=_[1],n=D1.state,a=n._s_pxl_colors,e=n._layer_index,_=n._s_pxls,n=o*n.pxl_width+t,n=0<=n?_[e][n]:null;D1.props.onRightClick&&D1.props.onRightClick(r,{pos_x:t,pos_y:o,pxl_color:null===n?null:a[e][n]})},250),o=Date.now(),D1.setState({_previous_single_pointer_down_timestamp:o})):1===t.length&&(o=Date.now(),D1.setState({_previous_single_pointer_down_timestamp:o}))},D1._handle_canvas_pointer_move=function(e,_,t){var o,n,a,r,i,s,l,c=D1.state,p=c._latest_pointers_client_x_center,d=c._latest_pointers_client_y_center,h=D1.state._latest_pointers_distance;2===t.length?(a=t[0].clientX-t[1].clientX,r=t[0].clientY-t[1].clientY,c=Math.sqrt(a*a+r*r),o=(t[0].pageX+t[1].pageX)/2,n=(t[0].pageY+t[1].pageY)/2,a=(t[0].clientX+t[1].clientX)/2,r=(t[0].clientY+t[1].clientY)/2,i=0<p?p-a:0,s=0<d?d-r:0,Math.sqrt(i*i+s*s),Math.abs(h-c),l=0<h?c/h:1,D1.setState({_latest_pointers_distance:c,_latest_pointers_client_x_center:a,_latest_pointers_client_y_center:r},function(){D1.zoom_of(l,o,n,-i,-s)}),D1._handle_position_change(e,a,r)):(D1._handle_canvas_move(e,_),D1._handle_position_change(e,t[0].clientX,t[0].clientY))},D1._handle_canvas_wrapper_mouse_move=function(e){!0===D1.state._mouse_inside&&D1.setState({_mouse_inside:!1});var _=D1.state,t=_._pxls_hovered,_=_.tool;t&&!(!t<=0)||1!==e.which||"MOVE"!==_&&"PICKER"!==_||D1.zoom_of(1,null,null,e.movementX,e.movementY)},D1._handle_position_change=function(e,_,t){var o,n,a=D1.state,r=a.perspective,i=a._device_motion;!(0<r)||L&&i||(a=D1._get_canvas_pos(),i=(e.pageX||o)-a.canvas_container.left,e=(e.pageY||n)-a.canvas_container.top,o=r*((i-a.canvas_container.width/2)/(a.canvas_container.width/2)),n=-r*((e-a.canvas_container.height/2)/(a.canvas_container.height/2)),D1.set_perspective_coordinate([5<o?o:2*o,n<0?n:2*n]))},D1._handle_canvas_wrapper_overflow_pointer_move=function(e){if(e.preventDefault(),e.stopPropagation(),D1.state._hidden)D1._handle_canvas_wrapper_overflow_pointer_up(e);else{var _=D1._get_canvas_event_target(e);if(D1.state._canvas_event_target!==_&&D1.setState({_canvas_event_target:_},function(){D1._request_force_update()}),"mouse"===e.pointerType)D1._handle_position_change(e),D1._handle_canvas_mouse_move(e,_);else{for(var t=D1.state._pointer_events,o=!0,n=0;n<t.length;n++)if(e.pointerId===t[n].pointerId){t[n]=e,o=!1;break}o&&t.push(e),D1.setState({_pointer_events:[].concat(S1(t))}),D1._handle_canvas_pointer_move(e,_,[].concat(S1(t)))}}},D1._handle_canvas_wrapper_overflow_pointer_down=function(r){r.preventDefault(),r.stopPropagation();var e,_,i=D1._get_canvas_event_target(r),t=D1.state,o=t._pointer_events,s=t._mouse_down;o.push(r),"mouse"===r.pointerType?(_=(e=D1.state).scale_move_x,e=e.scale_move_y,D1.setState({_event_button:r.button,_mouse_down:!0,_previous_initial_scale_move:[_,e],_pointer_events:o},function(){if(!0!==s&&D1.setState({_previous_single_pointer_down_x_y:[r.pageX,r.pageY]}),"CANVAS"===i&&D1._handle_canvas_mouse_down(r,i),2===r.button){var e=D1._get_canvas_pos_from_event(r),_=E1(e,2),t=_[0],o=_[1],n=D1.state,a=n._s_pxl_colors,e=n._layer_index,_=n._s_pxls,n=o*n.pxl_width+t,n=0<=n?_[e][n]:null;return D1.props.onRightClick&&D1.props.onRightClick(r,{pos_x:t,pos_y:o,pxl_color:null===n?null:a[e][n]}),!1}})):(e=(_=D1.state).scale_move_x,_=_.scale_move_y,D1.setState({_event_button:r.button,_mouse_down:!0,_previous_initial_scale_move:[e,_],_pointer_events:o},function(){D1.setState({_previous_single_pointer_down_x_y:[r.pageX,r.pageY]}),D1._handle_canvas_pointer_down(r,i)}))},D1._get_canvas_event_target=function(e){var _=D1._get_canvas_pos();return e.pageX>=_.canvas.left&&e.pageY>=_.canvas.top&&e.pageX<=_.canvas.right&&e.pageY<=_.canvas.bottom?"CANVAS":e.pageX>=_.canvas_wrapper.left&&e.pageY>=_.canvas_wrapper.top&&e.pageX<=_.canvas_wrapper.right&&e.pageY<=_.canvas_wrapper.bottom?"CANVAS_WRAPPER":"CANVAS_WRAPPER_OVERFLOW"},D1._handle_canvas_wrapper_overflow_pointer_up=function(e){e.preventDefault(),e.stopPropagation();for(var _=D1._get_canvas_event_target(e),t=D1.state,o=t._previous_initial_scale_move,n=t._pointer_events,a=t._latest_pointers_distance,r=t._latest_pointers_client_x_center,t=t._latest_pointers_client_y_center,i=0;i<n.length;i++)if(n[i].pointerId===e.pointerId){n.splice(i,1);break}var s=!1;n.length<2&&(t=r=a=0,1===n.length&&(n=[],s=!0)),D1.setState({_mouse_down:0<n.length,_pointer_events:[].concat(S1(n)),_latest_pointers_distance:a,_latest_pointers_client_x_center:r,_latest_pointers_client_y_center:t,_previous_initial_scale_move:o},function(){s?D1._handle_canvas_wrapper_overflow_pointer_down(e):"mouse"===e.pointerType&&("CANVAS"===_?D1._handle_canvas_mouse_up(e,_):("CANVAS_WRAPPER_OVERFLOW"===_&&1===e.which&&D1._notify_backdrop_click(e),D1._handle_canvas_mouse_leave(e,_)))})},D1._get_canvas_pos=function(e){var _=D1.state,t=_._canvas_container_left,o=_._canvas_container_top,n=_._canvas_container_width,a=_._canvas_container_height,r=_.pxl_width,i=_.pxl_height,s=_._screen_zoom_ratio,l=_.scale,c=_.canvas_wrapper_padding,p=_.canvas_wrapper_border_width,d=_.scale_move_x,h=_.scale_move_y,g=2*Math.round(c/window.devicePixelRatio*l+p),u=t+d,f=o+h,_=u+(Math.round(r*s*l)+g),c=f+(Math.round(i*s*l)+g),p=g/2,r=g/2,i=u+p,s=f+r,l=_-g/2,g=c-g/2;return{canvas:{offset_left:p,offset_top:r,left:i,top:s,right:l,bottom:g,width:l-i,height:g-s},canvas_wrapper:{offset_left:d,offset_top:h,left:u,top:f,right:_,bottom:c,width:_-u,height:c-f},canvas_container:{offset_left:t,offset_top:o,left:t,top:o,right:t+n,bottom:o+a,width:n,height:a}}},D1._handle_canvas_move=function(e,_){var t,o,n,a,r=D1.state,i=r._previous_single_pointer_down_x_y,s=r._previous_initial_scale_move,l=E1(i,2),c=l[0],p=l[1];-1!==c&&-1!==p&&(n=(o=E1(s,2))[0],a=o[1],r=((t=D1._get_canvas_pos()).canvas_container.width-t.canvas_wrapper.width)/2,i=(t.canvas_container.height-t.canvas_wrapper.height)/2,l=.75*t.canvas_wrapper.width+r,s=.75*t.canvas_wrapper.height+i,n=n+(o=e.pageX-c),a=a+(c=e.pageY-p),a-=i,n-=r,e=Math.min(Math.abs(n),l)*(n<0?-1:1)+r,p=Math.min(Math.abs(a),s)*(a<0?-1:1)+i,e<n+r?D1._notify_reach_border("RIGHT",_):n+r<e&&D1._notify_reach_border("LEFT",_),p<a+i?D1._notify_reach_border("BOTTOM",_):a+i<p&&D1._notify_reach_border("TOP",_),D1._set_moves(e,p),256<Math.abs(o)&&(o<0?n-256<l&&D1._notify_cross_middle("LEFT",_,t.canvas_container.width,t.canvas_container.height):l<256+n&&D1._notify_cross_middle("RIGHT",_,t.canvas_container.width,t.canvas_container.height)),256<Math.abs(c)&&(c<0?a-384<s&&D1._notify_cross_middle("TOP",_,t.canvas_container.width,t.canvas_container.height):s<384+a&&D1._notify_cross_middle("BOTTOM",_,t.canvas_container.width,t.canvas_container.height)))},D1._notify_reach_border=function(e,_){D1.props.onBorderReach&&D1.props.onBorderReach(e,_)},D1._notify_cross_middle=function(e,_,t,o){D1.props.onCrossMiddle&&D1.props.onCrossMiddle(e,_)},D1._handle_canvas_mouse_move=function(e,_){var t,o,n,a,r,i,s,l,c,p,d,h,g,u,f,A,m,x,v,w,b,M,C,y,I,D,E,S,R,N,T,k,L=D1.state,O=L.tool,B=L.pxl_width,Q=L.pxl_height,Y=L._pxls_hovered,U=L.pxl_current_color,G=L.hide_canvas_content,V=L._mouse_down,z=L._event_button,P=L.no_actions,j=z+1;2===j&&V||"MOVE"===O&&1===j&&V?D1._handle_canvas_move(e,_):(s=D1._get_canvas_pos_from_event(e),d=E1(s,2),t=d[0],o=d[1],-1===t||-1===o||P?D1._notify_position_change(e,{x:t,y:o}):(l=D1.state,n=l._pxl_indexes_of_selection,c=l._imported_image_pxls,(a=o*B+t)===Y||G?Y!==a&&D1.setState({_pxls_hovered:a,_mouse_inside:!0},function(){D1._update_canvas(),D1._notify_position_change(e,{x:t,y:o})}):0<c.length?(h=(p=D1.state)._imported_image_scale_delta_x,g=p._imported_image_scale_delta_y,r=p._imported_image_start_x,i=p._imported_image_start_y,z=(L=p._imported_image_width)+h,s=(_=p._imported_image_height)+g,P=(d=E1(D1.state._imported_image_move_from,2))[0],l=d[1],Y=a===(G=r+z+(i+s)*B)||l*B+P===G,1===j&&V?(c=t-P,p=o-l,d=[t,o],Y?(G=g+p,d=[P+((L=Math.max(h+c,-(L-1)))-h),l+((G=Math.max(G,-(_-1)))-g)],h=L,g=G):(r=B<=(r=(r+=c)<-z?-z:r)?B:r,i=Q<=(i=(i+=p)<-s?-s:i)?Q:i),D1.setState({_pxls_hovered:a,_is_on_resize_element:Y,_mouse_inside:!0,_imported_image_start_x:r,_imported_image_start_y:i,_imported_image_scale_delta_x:h,_imported_image_scale_delta_y:g,_imported_image_move_from:d},function(){D1._update_canvas(),D1._notify_position_change(e,{x:t,y:o})})):D1.setState({_pxls_hovered:a,_is_on_resize_element:Y,_mouse_inside:!0},function(){D1._notify_position_change(e,{x:t,y:o})})):"PENCIL"!==O&&"PENCIL PERFECT"!==O&&"CONTOUR"!==O||1!==j||!V?"SELECT PIXEL"!==O&&"SELECT PIXEL PERFECT"!==O&&"SELECT PATH"!==O||1!==j||!V?(u=(A=D1.state)._s_pxls,A=A._layer_index,D1.setState({_pxls_hovered:a,_mouse_inside:!0,_paint_or_select_hover_actions_latest_index:-1,_paint_hover_old_pxls_snapshot:[].concat(S1(u[A])),_select_hover_old_pxls_snapshot:[].concat(S1(n)),_paint_or_select_hover_pxl_indexes:new Set},function(){D1._update_canvas(),D1._notify_position_change(e,{x:t,y:o})})):(N=(E=D1.state)._last_action_timestamp,u=E._s_pxls,y=E._paint_or_select_hover_actions_latest_index,C=E._paint_or_select_hover_pxl_indexes,f=E.select_mode,A=E._layer_index,E=D1.state._select_hover_old_pxls_snapshot,y=D1._get_pixels_palette_and_list_from_line(u[A],y=-1===y?a:y,a)[2],"SELECT PATH"===O?(N=1/0,C=new Set([].concat(S1(C),S1(y))),C=[].concat(S1(C)),C=new Set(C)):"SELECT PIXEL"===O?(N=Date.now(),C=new Set([].concat(S1(C),S1(y)))):"SELECT PIXEL PERFECT"===O&&(N=Date.now(),C=new Set([].concat(S1(C),S1(y))),C=[].concat(S1(C)),D1._should_remove_not_perfect_second_latest_pixel_from_array(C)&&(S=C[C.length-2],E.includes(S)||"ADD"!==f&&"REPLACE"!==f||n.delete(S),C.splice(-2,1)),C=new Set(C)),"REPLACE"===f&&n.clear(),C.forEach(function(e){"ADD"===f||"REPLACE"===f?n.add(e):n.delete(e)}),D1.setState({_pxls_hovered:a,_mouse_inside:!0,_pxl_indexes_of_selection:n,_paint_or_select_hover_pxl_indexes:C,_paint_or_select_hover_actions_latest_index:a,_last_action_timestamp:N},function(){D1._update_canvas(),D1._notify_is_something_selected(),D1._notify_position_change(e,{x:t,y:o})})):(E=(y=D1.state)._last_action_timestamp,S=y._paint_or_select_hover_pxl_indexes,C=y._paint_or_select_hover_actions_latest_index,m=y._s_pxls,x=y._s_pxl_colors,v=y._layer_index,w=y.pxl_current_opacity,b=D1.state._paint_hover_old_pxls_snapshot,M=[].concat(S1(S)),N=D1._get_pixels_palette_and_list_from_line(m[v],C=-1===C?a:C,a,x[v],U,w),m[v]=N[0],x[v]=N[1],C=(y=D1.state).pencil_mirror_mode,y=y._pencil_mirror_index,D=(y-(I=y%B))/B,"CONTOUR"===O?(E=1/0,R=N[2],S=new Set([].concat(S1(S),S1(R))),S=[].concat(S1(S)),S=new Set(S)):"PENCIL"===O?(E=Date.now(),R=N[2],S=new Set([].concat(S1(S),S1(R))),S=[].concat(S1(S)),S=new Set(S)):"PENCIL PERFECT"===O&&(E=Date.now(),N=N[2],S=new Set([].concat(S1(S),S1(N))),S=[].concat(S1(S)),D1._should_remove_not_perfect_second_latest_pixel_from_array(S)&&(N=S[S.length-2],S.splice(-2,1),T=new Set(new Array([N])),[].concat(S1(T)).forEach(function(e){var _=E1(e,2),e=_[0],_=_[1],_=_-2*(_-D);0<=e&&e<B&&0<=_&&_<=Q&&T.add(_*B+e)}),[].concat(S1(T)).forEach(function(e){var _=E1(e,2),e=_[0],_=_[1],e=e-2*(e-I);0<=e&&e<B&&0<=_&&_<=Q&&T.add(_*B+e)}),T.forEach(function(e){m[v][e]=b[e]})),S=new Set(S)),k=new Set([].concat(S1(S)).filter(function(e){return!M.includes(e)}).map(function(e){var _=e%B;return[_,(e-_)/B]})),"VERTICAL"!==C&&"BOTH"!==C||[].concat(S1(k)).forEach(function(e){var _=E1(e,2),e=_[0],_=_[1],_=_-2*(_-D);0<=e&&e<B&&0<=_&&_<=Q&&k.add([e,_])}),"HORIZONTAL"!==C&&"BOTH"!==C||[].concat(S1(k)).forEach(function(e){var _=e[1],e=e[0]-2*(e[0]-I);0<=e&&e<B&&0<=_&&_<=Q&&k.add([e,_])}),[].concat(S1(k)).forEach(function(e){var _=e[1],e=e[0];0<=e&&e<B&&0<=_&&_<=Q&&(e=m[v][_=_*B+e],e=x[v][e],e=D1._blend_colors(e,U,w,!0),x[v].includes(e)||x[v].push(e),m[v][_]=x[v].indexOf(e))}),D1.setState({_pxls_hovered:a,_mouse_inside:!0,_paint_or_select_hover_pxl_indexes:S,_s_pxls:m,_s_pxl_colors:x,_paint_or_select_hover_actions_latest_index:a,_last_action_timestamp:E},function(){D1._update_canvas(),D1._notify_position_change(e,{x:t,y:o})}))))},D1._handle_canvas_mouse_leave=function(){D1.setState({_mouse_inside:!1,_pxls_hovered:-1},function(){D1._request_force_update()}),D1._notify_position_change(null,{x:-1,y:-1})},D1._handle_canvas_mouse_up=function(e){var _=D1.state,t=(_.scale_move_x,_.scale_move_y,_._mouse_down);D1.setState({_event_button:-1,_mouse_down:!1},function(){!1!==t&&D1._request_force_update()});var o,n,a,r,i,s,l,c,p=D1.state,d=p._paint_or_select_hover_pxl_indexes,h=p.tool;0<p._imported_image_pxls.length?D1.setState({_imported_image_move_from:[-1,-1]}):0<d.size&&"CONTOUR"===h?(r=(a=D1.state)._s_pxls,l=a._s_pxl_colors,o=a._layer_index,n=a.pxl_current_color,c=a.pxl_current_opacity,_=a._paint_hover_old_pxls_snapshot,p=[].concat(S1(d))[0],a=[].concat(S1(d))[d.size-1],a=D1._get_pixels_palette_and_list_from_line(r[o],p,a,l[o],n,c)[2],d=[].concat(S1(d),S1(a)),c=D1._get_pixels_palette_and_list_from_path(_,d,l[o],n,c),c=E1(c,2),r[o]=c[0],l[o]=c[1],D1.setState({_s_pxls:r,_s_pxl_colors:l,_paint_or_select_hover_pxl_indexes:new Set,_paint_hover_old_pxls_snapshot:[],_last_action_timestamp:Date.now()},function(){D1._update_canvas()})):0<d.size&&"SELECT PATH"===h&&(r=(c=D1.state)._s_pxls,i=c._pxl_indexes_of_selection,s=c.select_mode,l=c._layer_index,h=[].concat(S1(d))[0],c=[].concat(S1(d))[d.size-1],c=D1._get_pixels_palette_and_list_from_line(r[l],h,c)[2],d=[].concat(S1(d),S1(c)),d=D1._get_pixels_palette_and_list_from_path(r[l],d),"REPLACE"===s&&i.clear(),d[2].forEach(function(e){"ADD"===s||"REPLACE"===s?i.add(e):i.delete(e)}),D1.setState({_pxl_indexes_of_selection:i,_paint_or_select_hover_pxl_indexes:new Set,_last_action_timestamp:Date.now()},function(){D1._update_canvas(),D1._notify_is_something_selected()}))},D1._blend_colors=function(e,_){var t,o,n,a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,r=3<arguments.length&&void 0!==arguments[3]&&arguments[3],i=4<arguments.length&&void 0!==arguments[4]&&arguments[4],a=Math.min(Math.max(a,0),1);if(e=D1._format_color(e),0===a&&"hover"!==_&&r)return"#00000000";if("#00000000"===(_="hover"===_?(t=D1._get_rgba_from_hex(e),o=D1._rgb_to_hsl.apply(D1,S1(t)),t=(n=E1(o,3))[0],o=n[1],n=n[2],n=D1._hsl_to_rgb(t%360,o%100,(n+50)%100),D1._get_hex_color_from_rgba_values.apply(D1,S1(n).concat([255]))):D1._format_color(_))&&1===a&&r)return"#00000000";e=D1._get_rgba_from_hex(e);e[3]/=255;_=D1._get_rgba_from_hex(_);_[3]/=255,_[3]*=a;a=[];return 0!==e[3]&&0!==_[3]?(a[3]=i?_[3]+e[3]:1-(1-_[3])*(1-e[3]),a[0]=Math.round(_[0]*_[3]/a[3]+e[0]*e[3]*(1-_[3])/a[3]),a[1]=Math.round(_[1]*_[3]/a[3]+e[1]*e[3]*(1-_[3])/a[3]),a[2]=Math.round(_[2]*_[3]/a[3]+e[2]*e[3]*(1-_[3])/a[3])):a=0!==_[3]?_:e,a[3]=i?a[3]/2:a[3],a[3]=Math.round(255*a[3]),D1._get_hex_color_from_rgba_values.apply(D1,S1(a))},D1._notify_estimate_size=function(){D1.get_base64_png_data_url(1,function(e){e=3*Math.ceil(e.length/4);D1.setState({_kb:e/1e3}),D1.props.on_kb_change&&D1.props.on_kb_change(e/1e3)},!0)},D1._update_canvas=function(){var e=D1.state,_=e._loading_base64_img,t=e.dont_show_canvas_until_img_set,o=e.dont_show_canvas,n=e.but_show_canvas_once,k=e.has_shown_canvas_once;if(!(_.length<=0&&t||o&&(!n||k))){var a=D1.state._canvas,r=D1.state,i=r.select_mode,s=r.pencil_mirror_mode,l=r._pencil_mirror_index,L=r._previous_pencil_mirror_axes_indexes,O=r._previous_pencil_mirror_axes_hover_indexes,c=r.hide_canvas_content,p=r._was_canvas_content_hidden,B=(r.px_per_px,r._old_pxls),d=r._old_pxl_width,h=r._old_pxl_height,Q=r.pxl_width,g=r.pxl_height,Y=r._s_pxl_colors,U=r._layers,u=r._old_layers,G=r._layer_index,V=r._old_pxl_colors,z=r._s_pxls,P=r._old_pxls_hovered,j=r._pxls_hovered,F=r._mouse_inside,q=r.tool,f=(r._is_there_new_dimension,r._shape_index_a),A=r._select_shape_index_a,m=r.pxl_current_color,x=r.pxl_current_opacity,W=r._pxl_indexes_of_selection,J=r._pxl_indexes_of_selection_drawn,v=r._paint_or_select_hover_pxl_indexes,K=r._previous_mine_player_index,Z=r._mine_player_index,w=(r._mine_index,r._pxls_explosion),X=r._pxl_colors_explosion,b=r._explosion_started_timestamp,e=r._explosion_index,M=r._explosion_width,_=r._explosion_height,t=r._explosion_time,H=r._selection_pair_highlight,$=r._old_selection_pair_highlight,o=D1.state,C=o._imported_image_start_x,y=o._imported_image_start_y,I=o._imported_image_scale_delta_x,D=o._imported_image_scale_delta_y,n=o._imported_image_pxls,E=o._imported_image_width,r=o._imported_image_height,e1=o._imported_image_pxl_colors,_1=o._previous_imported_image_pxls_positioned,t1=o._previous_image_imported_resizer_index,o=D1._get_imported_image_scaled(n,e1,E,r,I,D),o=E1(o,4),n=o[0],e1=o[1],E=o[2],r=o[3],o1=D1.state._previous_explosion_pxls_positioned,n1=[],a1=0<n.length,r1=C+E+(y+r)*Q;a1&&n.forEach(function(e,_){var t=_%E,o=t+C,t=(_-t)/E+y;0<=o&&o<Q&&0<=t&&t<g&&(n1[t*Q+o]=e)});var S,R,i1=[],n=b>Date.now()-t,s1=n?Math.max(Math.floor(w.length-Math.floor(t/(Date.now()-b))),0):0;n&&(e=(e-(n=e%Q))/Q,S=Math.floor(n-M/2),R=Math.floor(e-_/2),w[s1].forEach(function(e,_){var t=_%M,o=t+S,t=(_-t)/M+R;0<=o&&o<Q&&0<=t&&t<g&&(i1[t*Q+o]=e)}));var l1=new Set,c1=new Set,N=l%Q,T=(l-N)/Q,p1=j%Q,d1=(j-p1)/Q;if(("HORIZONTAL"===s||"BOTH"===s)&&q.includes("PENCIL"))for(var h1=0;h1<g;h1++)-1!==l&&c1.add(h1*Q+N),"SET PENCIL MIRROR"===q&&-1!==j&&l1.add(h1*Q+p1);if(("VERTICAL"===s||"BOTH"===s)&&q.includes("PENCIL"))for(var g1=0;g1<Q;g1++)-1!==l&&c1.add(g1+T*Q),"SET PENCIL MIRROR"===q&&-1!==j&&l1.add(g1+d1*Q);var u1=0,f1=d!==Q||h!==g,A1=P!==j,m1=K!==Z,x1=a?a.context2d:null;if(x1){var v1=D1.state._pxl_indexes_of_old_shape,w1=new Set;"LINE"!==q&&"RECTANGLE"!==q&&"ELLIPSE"!==q&&"TRIANGLE"!==q||-1===f?"SELECT LINE"!==q&&"SELECT RECTANGLE"!==q&&"SELECT ELLIPSE"!==q||-1===A?("SELECT PATH"===q||"CONTOUR"===q)&&0<v.size&&(a=[].concat(S1(v))[0],v=[].concat(S1(v))[v.size-1],v=D1._get_pixels_palette_and_list_from_line(z[G],a,v,Y[G],m,x)[2],"REMOVE"===i&&"SELECT PATH"===q?v.forEach(function(e){W.delete(e)}):v.forEach(function(e){("SELECT PATH"===q?W:w1).add(e)})):(A="SELECT LINE"===q?D1._get_pixels_palette_and_list_from_line(z[G],A,j):"SELECT RECTANGLE"===q?D1._get_pixels_palette_and_list_from_rectangle(z[G],A,j):D1._get_pixels_palette_and_list_from_ellipse(z[G],A,j),w1=new Set([].concat(S1(A[2])))):(x="LINE"===q?D1._get_pixels_palette_and_list_from_line(z[G],f,j,Y[G],m,x):"RECTANGLE"===q?D1._get_pixels_palette_and_list_from_rectangle(z[G],f,j,Y[G],m,x):D1._get_pixels_palette_and_list_from_ellipse(z[G],f,j,Y[G],m,x),w1=new Set([].concat(S1(x[2]))));for(var b1=p&&!c,M1=U.length!==u.length,C1=M1,y1=0;y1<U.length;y1++)M1||U[y1].hidden===u[y1].hidden&&U[y1].opacity===u[y1].opacity&&U[y1].id===u[y1].id||(C1=!0);var I1=c||f1||!k||b1?new ImageData(Q,g):x1.getImageData(0,0,Q,g);z[G].forEach(function(e,_){var t=a1&&void 0!==n1[_],o=void 0!==_1[_],n=a1&&r1===_,a=t1===_,r=void 0!==i1[_],i=void 0!==o1[_],s=_%Q,l=(_-s)/Q,c=j===_&&-1!==_,p=_===P&&A1&&-1!==_||_===j&&-1!==_,d=Z===_,h=_===K&&m1,g=v1.has(_),u=w1.has(_),f=W.has(_),A=W.has(j)!==W.has(P),m=J.has(_),x=f&&(c||p),v=f&&H!==$,w=m&&!f,b=l1.has(_),M=O.has(_),C=c1.has(_),y=L.has(_)&&L!==c1,a=M&&!b||y||i!=r||r||o||t||a&&!n||f1||b1||C1||e!==B[_]||V[e]!==Y[G][e],e="ELLIPSE"===q&&0<w1.size;if(b1||f1||!k||b||C||A&&f||v||w||p||a||c&&!e||d||g||u||f&&!m||x||h||n&&H!==$){var I=[],D=-1;D++;for(var E=Y.length-1;0<=E;E--){var S=Y[E][z[E][_]];I[E]=S;S=E1(S,4);if(S[0],S[1],S[2],255===S[3]&&1===U[E].opacity){D=E;break}}for(var R,N="#00000000",T=D;T<Y.length;T++)U[T].hidden||(R=I[T],N=D1._blend_colors(N,R,U[T].opacity,!1),t&&T===G&&(N=D1._blend_colors(N,e1[n1[_]],1,!1))),r&&T===U.length-1&&(N=D1._blend_colors(N,X[s1][i1[_]],1,!1));d=b||C||c||d||F&&u||f&&!m||a&&f||x?c||d||C?D1._blend_colors(N,"hover",2/3,!1):D1._blend_colors(N,"hover",1/3,!1):N;(h||w||a&&!f&&!c&&!C)&&(d=N),n&&(d=D1._blend_colors(N,"hover",c?2/3+(0+(s+l+(H?1:0))%2)/3:1/3+(0+(s+l+(H?1:0))%2)/3,!1)),!f||u||c||(d=D1._blend_colors(N,"hover",0+(0+(s+l+(H?1:0))%2)/5,!1));c=D1._get_rgba_from_hex(d),s=E1(c,4),l=s[0],d=s[1],c=s[2],s=s[3];I1.data[4*_+0]=l,I1.data[4*_+1]=d,I1.data[4*_+2]=c,I1.data[4*_+3]=s,u1++}}),0<u1&&R1(function(){x1.putImageData(I1,0,0),D1.setState({_pxl_indexes_of_selection_drawn:new Set([].concat(S1(W))),_pxl_indexes_of_old_shape:new Set([].concat(S1(w1))),_is_there_new_dimension:!1,_imported_image_previous_start_x:C,_imported_image_previous_start_y:y,_imported_image_previous_scale_delta_x:I,_imported_image_previous_scale_delta_y:D,_previous_pencil_mirror_axes_indexes:new Set([].concat(S1(c1))),_previous_pencil_mirror_axes_hover_indexes:new Set([].concat(S1(l1))),_previous_explosion_pxls_positioned:[].concat(i1),_previous_imported_image_pxls_positioned:[].concat(n1),_previous_image_imported_resizer_index:r1,_old_selection_pair_highlight:H,_old_layers:[].concat(S1(U)),_old_pxls:[].concat(S1(z[G])),_old_pxl_colors:[].concat(S1(Y[G])),_old_pxl_width:Q,_old_pxl_height:g,_previous_mine_player_index:Z,_old_pxls_hovered:j,_was_canvas_content_hidden:c,_last_paint_timestamp:Date.now(),has_shown_canvas_once:!0})},!1,!0)}}},D1._array_push_fixed_length=function(e,_,t){var o=!1;return e.length>=_?(e.push(t),e.shift()):(e.push(t),o=!0),[e,o]},D1._notify_fps=function(){var e;D1.props.on_fps_change&&(e=Math.round(a),D1.props.on_fps_change(e))},D1._maybe_save_state=function(e){var _=D1.state,t=_._id,o=_.pxl_width,n=_.pxl_height,a=_._s_pxls,r=_._original_image_index,i=_._s_pxl_colors,s=_._layers,l=_._layer_index,c=_._pxl_indexes_of_selection,p=_._last_action_timestamp,d=_._json_state_history,h=_._state_history_length,g=_._undo_buffer_time_ms,u=_._pencil_mirror_index,f=JSON.parse(d),_=f.state_history,d=f.history_position,f=f.previous_history_position,i={_id:t,pxl_width:o,pxl_height:n,_original_image_index:r,_layers:s.map(function(e){return{id:e.id,name:e.name,hidden:e.hidden,opacity:e.opacity}}),_layer_index:l,_s_pxls:[].concat(S1(a)),_s_pxl_colors:[].concat(S1(i)),_pxl_indexes_of_selection:new Set([].concat(S1(c))),_pencil_mirror_index:u};if(_.length){c=_.length-1,u=c-d,c=_[c-u];if(JSON.stringify(c)!==JSON.stringify(i)&&(p+g<Date.now()||e)){u&&(_=_.slice(0,d+1));u=D1._array_push_fixed_length(_,h,i),u=E1(u,2);_=u[0];f=d,d=u[1]?d+1:d,u=JSON.stringify({previous_history_position:f,history_position:d,state_history:_});return D1.setState({_json_state_history:u},function(){D1._notify_can_undo_redo_change()}),u}return null}i=D1._array_push_fixed_length(_,h,i),_=E1(i,1)[0],_=JSON.stringify({previous_history_position:f,history_position:d,state_history:_});return D1.setState({_json_state_history:_}),_},D1._notify_relevant_action_event=function(e){D1.props.onRelevantActionEvent&&D1.props.onRelevantActionEvent(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:"#ffffffff",2<arguments.length&&void 0!==arguments[2]?arguments[2]:1)},D1._notify_position_change=function(e,_){var t,o,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;D1.props.onPositionChange&&(t=D1.state._notified_position_at,100<=(o=Date.now())-t&&null===n||t<n&&100<=o-n?(_={x:void 0===_.x?-1:_.x,y:void 0===_.y?-1:_.y},D1.props.onPositionChange(_),D1.setState({_notified_position_at:o})):o<n+101&&setTimeout(function(){D1._notify_position_change(null,{x:_.x,y:_.y},o)},25))},D1._notify_current_color_change=function(e){D1.props.onCurrentColorChange?D1.props.onCurrentColorChange(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:null):D1.setState({pxl_current_color:e})},D1._notify_is_something_selected=function(){var e=D1.state._pxl_indexes_of_selection;Boolean(D1.state._previous_pxl_indexes_of_selection.size)!==Boolean(e.size)&&D1.setState({_is_something_selected:Boolean(e.size),_previous_pxl_indexes_of_selection:new Set([].concat(S1(e)))},function(){D1.props.onSomethingSelectedChange&&D1.props.onSomethingSelectedChange(Boolean(e.size))})},D1._notify_image_load_complete=function(){var e=D1.state,_=e._s_pxl_colors,_={width:e.pxl_width,height:e.pxl_height,number_of_colors:_[0].length};D1.props.onLoadComplete&&D1.props.onLoadComplete("image_load",_)},D1._notify_image_import_complete=function(){D1.props.onImageImportComplete&&D1.props.onImageImportComplete()},D1._notify_can_undo_redo_change=function(){var e=D1._can_undo(),_=D1._can_redo();D1.props.onCanUndoRedoChange&&D1.props.onCanUndoRedoChange(e,_),D1._notify_layers_and_compute_thumbnails_change()},D1._notify_size_change=function(){var e=D1.state,_=e.pxl_width,e=e.pxl_height;D1.props.onSizeChange&&D1.props.onSizeChange(_,e)},D1.import_JSON_state=function(e){var _=JSON.parse(e),t=_._base64_original_images,o=_._json_state_history,n=JSON.parse(o),a=n.state_history[n.history_position],r=a._original_image_index,i=a.pxl_width,s=a.pxl_height,l=a._pxl_indexes_of_selection,c=a._s_pxl_colors,p=a._s_pxls,e=a._layers,_=a._layer_index,n=a._pencil_mirror_index,a=a._id;D1.setState({_id:a,_original_image_index:-1,_pencil_mirror_index:n,pxl_width:i,pxl_height:s,_s_pxls:p,_s_pxl_colors:c,_pxl_indexes_of_selection_drawn:D1.state._pxl_indexes_of_selection,_pxl_indexes_of_selection:new Set([].concat(S1(l))),_layers:e,_old_layers:[].concat(S1(D1.state._layers)),_layer_index:_,_base64_original_images:t,_json_state_history:o,_is_there_new_dimension:!0},function(){D1.setState({_original_image_index:r}),D1._notify_layers_and_compute_thumbnails_change(),D1._notify_can_undo_redo_change(),D1._notify_is_something_selected(),D1._notify_size_change(),D1._update_screen_zoom_ratio()})},D1.export_JSON_state=function(t){var e=D1.state,o=e._base64_original_images,n=e._json_state_history,a=e._id;D1.get_base64_png_data_url(1,function(e){var _=3*Math.ceil(e.length/4);t(JSON.stringify({id:a,kb:_/1e3,preview:e,timestamp:Date.now(),_base64_original_images:o,_json_state_history:n}))})},D1._can_undo=function(){var e=D1.state._json_state_history,_=JSON.parse(e),e=_.state_history,_=_.history_position,e=e.length-1;return 0<e-(e-_)},D1.undo=function(){var e,_,t,o,n,a,r,i,s,l=D1._maybe_save_state(!0),c=null===l?D1.state._json_state_history:l,p=JSON.parse(c),d=p.state_history,h=p.history_position;p.previous_history_position;D1._can_undo()&!l&&(s=h,r=d[--h],e=r._original_image_index,_=r.pxl_width,t=r.pxl_height,o=r._pxl_indexes_of_selection,n=r._s_pxl_colors,a=r._s_pxls,c=r._layers,p=r._layer_index,l=r._pencil_mirror_index,r=r._id,s=JSON.stringify({state_history:d,history_position:h,previous_history_position:s}),i=Boolean(_!==D1.state.pxl_width||t!==D1.state.pxl_height),D1.setState({_id:r,_original_image_index:-1,_pencil_mirror_index:l,pxl_width:_,pxl_height:t,_s_pxls:a,_s_pxl_colors:n,_pxl_indexes_of_selection_drawn:D1.state._pxl_indexes_of_selection,_pxl_indexes_of_selection:new Set([].concat(S1(o))),_layers:c,_old_layers:[].concat(S1(D1.state._layers)),_layer_index:p,_json_state_history:s,_is_there_new_dimension:i},function(){D1.setState({_original_image_index:e}),D1._notify_layers_and_compute_thumbnails_change(),D1._notify_can_undo_redo_change(),D1._notify_is_something_selected(),i?(D1._notify_size_change(),D1._update_screen_zoom_ratio()):D1._request_force_update()}))},D1._can_redo=function(){var e=D1.state._json_state_history,_=JSON.parse(e),e=_.state_history,_=_.history_position;return e.length-1>_},D1.redo=function(){var e,_,t,o,n,a,r,i,s,l=D1._maybe_save_state(!0),c=null===l?D1.state._json_state_history:l,p=JSON.parse(c),d=p.state_history,h=p.history_position;p.previous_history_position;D1._can_redo()&&!l&&(s=h,r=d[++h],e=r._original_image_index,_=r.pxl_width,t=r.pxl_height,o=r._pxl_indexes_of_selection,n=r._s_pxl_colors,a=r._s_pxls,c=r._layers,p=r._layer_index,l=r._pencil_mirror_index,r=r._id,s=JSON.stringify({state_history:d,history_position:h,previous_history_position:s}),i=Boolean(_!==D1.state.pxl_width||t!==D1.state.pxl_height),D1.setState({_id:r,_original_image_index:-1,_pencil_mirror_index:l,pxl_width:_,pxl_height:t,_s_pxls:a,_s_pxl_colors:n,_pxl_indexes_of_selection_drawn:D1.state._pxl_indexes_of_selection,_pxl_indexes_of_selection:new Set([].concat(S1(o))),_layers:c,_old_layers:[].concat(S1(D1.state._layers)),_layer_index:p,_json_state_history:s,_is_there_new_dimension:i},function(){D1.setState({_original_image_index:e}),D1._notify_layers_and_compute_thumbnails_change(),D1._notify_can_undo_redo_change(),D1._notify_is_something_selected(),i?(D1._notify_size_change(),D1._update_screen_zoom_ratio()):D1._request_force_update()}))},D1.to_selection_border=function(){var e=D1.state,_=e._s_pxls,t=(e.pxl_width,e.pxl_height,e._pxl_indexes_of_selection),o=e._s_pxl_colors,n=e._layer_index,a=e.pxl_current_color,r=e.pxl_current_opacity,i=[].concat(S1(_[n])),s=[].concat(S1(o[n]));D1._get_border_from_selection(t).forEach(function(e){var _=i[e],_=s[_],_=D1._blend_colors(_,a,r);s.includes(_)||s.push(_);_=s.indexOf(_);i[e]=_});o=D1.state._s_pxl_colors;o[n]=s;t=D1.state._s_pxls;t[n]=i,D1.setState({_s_pxl_colors:o,_s_pxls:t,_last_action_timestamp:Date.now()},function(){D1._update_canvas()})},D1.to_selection_bucket=function(){var e=D1.state,_=e._s_pxls,t=(e.pxl_width,e.pxl_height,e._pxl_indexes_of_selection),o=e._s_pxl_colors,n=e._layer_index,a=e.pxl_current_color,r=e.pxl_current_opacity,i=[].concat(S1(_[n])),s=[].concat(S1(o[n]));[].concat(S1(t)).forEach(function(e){var _=i[e],_=s[_],_=D1._blend_colors(_,a,r);s.includes(_)||s.push(_);_=s.indexOf(_);i[e]=_});o=D1.state._s_pxl_colors;o[n]=s;t=D1.state._s_pxls;t[n]=i,D1.setState({_s_pxl_colors:o,_s_pxls:t,_last_action_timestamp:Date.now()},function(){D1._update_canvas()})},D1.to_selection_invert=function(){for(var e=D1.state,_=e._s_pxls,t=e._pxl_indexes_of_selection,o=e._layer_index,n=new Set([].concat(S1(t))),a=new Set,r=0;r<_[o].length;r++)n.has(r)||a.add(r);D1.setState({_pxl_indexes_of_selection:a,_last_action_timestamp:Date.now()},function(){D1._update_canvas()})},D1.get_average_color_of_selection=function(){return D1._get_average_color_of_selection()},D1._get_average_color_of_selection=function(e,_,t){var o=D1.state,n=o._s_pxls,a=o._s_pxl_colors,o=o._layer_index;_=_||[].concat(S1(n[o])),t=t||[].concat(S1(a[o]));var o=[].concat(S1(new Set(_))),r=[];o.forEach(function(e){r[e]=1}),e=e||D1.state._pxl_indexes_of_selection,[].concat(S1(e)).forEach(function(e){e=_[e];r[e]++});var i=0;Object.entries(r).forEach(function(e){i+=e[1]});var s="#00000000";return Object.entries(r).forEach(function(e){var _=E1(e,2),e=_[0],_=_[1];s=D1._blend_colors(s,t[e],_/i,!0,!0)}),s},D1.to_selection_changes=function(e){var c=1<arguments.length&&void 0!==arguments[1]&&arguments[1],_=D1._get_rgba_from_hex(e),t=E1(_,3),o=t[0],n=t[1],a=t[2],r=D1._rgb_to_hsl(o,n,a),e=E1(r,3),_=e[0],p=e[1],d=e[2],t=D1.state,o=t._s_pxls,n=t._pxl_indexes_of_selection,a=t._s_pxl_colors,r=t._layer_index,h=[].concat(S1(o[r])),g=[].concat(S1(a[r])),e=D1._get_average_color_of_selection(),t=D1._get_rgba_from_hex(e),o=E1(t,4),a=o[0],e=o[1],t=o[2],e=(o[3],D1._rgb_to_hsl(a,e,t)),t=E1(e,3),e=t[0],u=(t[1],t[2],_-e);[].concat(S1(n)).forEach(function(e,_,t){var o=h[e],n=g[o],a=D1._get_rgba_from_hex(n),r=E1(a,4),i=r[0],s=r[1],l=r[2],o=r[3],n=D1._rgb_to_hsl(i,s,l),a=E1(n,3),r=a[0],i=a[1],s=a[2],l=r+u<0?360+(r+u)%360:(r+u)%360,n=[p,d,1],a=[i,s,1],r=[];0!==o&&c?(r[2]=1-(1-n[2])*(1-a[2]),r[0]=Math.round(n[0]*n[2]/r[2]+a[0]*a[2]*(1-n[2])/r[2]),r[1]=Math.round(n[1]*n[2]/r[2]+a[1]*a[2]*(1-n[2])/r[2])):r=[i,s];i=D1._hsl_to_rgb(l,r[0],r[1]),s=E1(i,3),l=s[0],r=s[1],i=s[2],s="#00000000";0!==o&&(s=D1._get_hex_color_from_rgba_values(l,r,i,o)),g.includes(s)||g.push(s),h[e]=g.indexOf(s)});e=D1.state._s_pxl_colors;e[r]=g;n=D1.state._s_pxls;n[r]=h,D1.setState({_s_pxl_colors:e,_s_pxls:n},function(){D1.setState(function(){Date.now()},function(){D1._update_canvas()})})},D1._get_border_from_selection=function(e){var p=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],d=2<arguments.length&&void 0!==arguments[2]&&arguments[2],_=D1.state,h=_.pxl_width,g=_.pxl_height,u=[];return[].concat(S1(e)).forEach(function(e,_,t){var o=void 0,n=void 0,a=void 0,r=void 0,n=(n=e+1)%h==0?-1:n,r=(r=e-1)%h==h-1?-1:r,i=void 0,s=void 0,l=void 0,c=void 0,i=(o=(o=e-h)<0?-1:o)-1;i=-1===o||-1===r?-1:i,s=o+1,s=-1===o||-1===n?-1:s,l=(a=h*g<(a=e+h)?-1:a)-1,l=-1===a||-1===r?-1:l,c=a+1,c=-1===a||-1===n?-1:c,p?(-1!==t.indexOf(o)&&-1!==o&&-1!==t.indexOf(n)&&-1!==n&&-1!==t.indexOf(a)&&-1!==a&&-1!==t.indexOf(r)&&-1!==r||u.push(e),d&&(-1!==t.indexOf(i)&&-1!==i&&-1!==t.indexOf(s)&&-1!==s&&-1!==t.indexOf(l)&&-1!==l&&-1!==t.indexOf(c)&&-1!==c||u.push(e))):(-1===t.indexOf(o)&&u.push(o),-1===t.indexOf(n)&&u.push(n),-1===t.indexOf(a)&&u.push(a),-1===t.indexOf(r)&&u.push(r),d&&(-1===t.indexOf(i)&&u.push(i),-1===t.indexOf(s)&&u.push(s),-1===t.indexOf(l)&&u.push(l),-1===t.indexOf(c)&&u.push(c)))}),u},D1._to_selection_crop=function(){var e=D1.state,_=e._s_pxls,t=e._s_pxl_colors,o=(e._layer_index,e._pxl_indexes_of_selection),r=e.pxl_width,i=e.pxl_height,s=e._base64_original_images,e=e._original_image_index;if(0<o.size){var l=[].concat(S1(_)),c=[].concat(S1(t)),p=[r,i],n=[-1,-1];o.forEach(function(e){var _=e%r,e=(e-_)/r;_<p[0]&&(p[0]=_),e<p[1]&&(p[1]=e),_>n[0]&&(n[0]=_),e>n[1]&&(n[1]=e)});for(var d,h=1+n[0]-p[0],g=1+n[1]-p[1],a=0;a<_.length;a++){for(var u=_[a],f=new Array(h*g),A=0;A<h*g;A++){var m=A%h,x=(A-m)/h;m+=p[0],x+=p[1],f[A]=u[x*r+m]}var v=D1._remove_duplicate_pxl_colors(f,t[a]),v=E1(v,2),f=v[0],v=v[1];l[a]=f,c[a]=v}void 0!==s[e]?((d=new Image).onload=function(){var e=d.width*(h/r),_=d.height*(g/i),t=D1._get_new_ctx_from_canvas(e,_),o=E1(t,2),t=o[0],o=o[1];t.save(),t.drawImage(d,d.width*(p[0]/r),d.height*(p[1]/i),e,_,0,0,e,_),t.restore();var n=d.src.includes("image/png")?o.toDataURL("image/png"):o.toDataURL("image/jpeg"),a=s.includes(n)?s:s.concat([n]);D1.setState({_s_pxls:l,_s_pxl_colors:c,pxl_width:h,pxl_height:g,_pxl_indexes_of_selection:new Set,_base64_original_images:a,_original_image_index:-1,_is_there_new_dimension:!0},function(){D1.setState({_original_image_index:a.indexOf(n),_last_action_timestamp:Date.now()},function(){D1._notify_size_change(),D1._request_force_update()})})},d.src=s[e]):D1.setState({_s_pxls:l,_s_pxl_colors:c,pxl_width:h,pxl_height:g,_pxl_indexes_of_selection:new Set,_last_action_timestamp:Date.now()},function(){D1._notify_size_change(),D1._request_force_update()})}},D1.to_selection_size=function(e){var _=D1.state._pxl_indexes_of_selection,_=D1._to_selection_size(e,_);D1.setState({_pxl_indexes_of_selection:_},function(){D1._update_canvas()})},D1._to_selection_size=function(e,_){_=new Set(_);for(var t=1;t<=Math.abs(e);t++){var o=new Set([].concat(S1(D1._get_border_from_selection(_,e<0,!1)))),n=!0,a=!1,r=void 0;try{for(var i,s=o[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value;e<0?_.delete(l):_.add(l)}}catch(e){a=!0,r=e}finally{try{!n&&s.return&&s.return()}finally{if(a)throw r}}}return _},D1.to_selection_none=function(){D1.setState({_pxl_indexes_of_selection:new Set},function(){D1._update_canvas()})},D1.confirm_import=function(){D1._merge_import()},D1._merge_import=function(){var o,n,a,e=D1.state,r=e.pxl_width,i=e.pxl_height,s=e._imported_image_start_x,l=e._imported_image_start_y,_=e._imported_image_pxls,c=e._imported_image_width,t=e._imported_image_height,p=e._imported_image_pxl_colors,d=e._imported_image_scale_delta_x,e=e._imported_image_scale_delta_y,e=D1._get_imported_image_scaled(_,p,c,t,d,e),e=E1(e,4),_=e[0],p=e[1],c=e[2],h=(e[3],[]);0<_.length&&(_.forEach(function(e,_){var t=_%c,o=t+s,t=(_-t)/c+l;0<=o&&o<r&&0<=t&&t<i&&(h[t*r+o]=e)}),_=D1.state,o=_._s_pxls,n=_._s_pxl_colors,a=_._layer_index,Object.entries(h).forEach(function(e){var _=E1(e,2),t=_[0],e=_[1],_=o[a][t],_=n[a][_],e=p[e],e=D1._blend_colors(_,e,1,!1);n[a].includes(e)||n[a].push(e);e=n[a].indexOf(e);o[a][t]=e}),_=D1._remove_duplicate_pxl_colors(o[a],n[a]),_=E1(_,2),o[a]=_[0],n[a]=_[1],D1.setState({_s_pxls:o,_s_pxl_colors:n,_imported_image_start_x:0,_imported_image_start_y:0,_imported_image_scale_delta_x:0,_imported_image_scale_delta_y:0,_imported_image_pxls:[],_imported_image_width:0,_imported_image_height:0,_imported_image_pxl_colors:[],_imported_image_move_from:[0,0],_last_action_timestamp:Date.now()},function(){D1._update_canvas(),D1._notify_is_image_import_mode()}))},D1._notify_is_image_import_mode=function(){var e=0<D1.state._imported_image_pxls.length;D1.setState({_is_image_import_mode:e}),D1.props.onImageImportModeChange&&D1.props.onImageImportModeChange(e)},D1.to_selection_crop=function(){D1._to_selection_crop()},D1.to_rotation=function(){D1._to_rotation(!(0<arguments.length&&void 0!==arguments[0])||arguments[0])},D1.to_greyscale=function(){D1._to_colorized("greyscale")},D1.to_sepia=function(){D1._to_colorized("sepia")},D1.to_opacity=function(){D1._to_colorized(null,0<arguments.length&&void 0!==arguments[0]?arguments[0]:0)},D1.to_color=function(){D1._to_colorized(0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,arguments[1],2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,3<arguments.length&&void 0!==arguments[3]?arguments[3]:null)},D1.to_vignette=function(){D1._to_vignette(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"#000000ff",1<arguments.length&&void 0!==arguments[1]?arguments[1]:0)},D1.to_less_color=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1/16,_=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){};D1.props.onLoad&&D1.props.onLoad("less_color_auto"),D1._to_less_color(e,function(e){_(e),D1.props.onLoadComplete&&D1.props.onLoadComplete&&D1.props.onLoadComplete("less_color_auto",e)})},D1.auto_adjust_contrast=function(){D1._auto_adjust_contrast(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1)},D1.smooth_adjust=function(){D1._auto_adjust_smoothness()},D1.to_alpha=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"#00000000",_=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,e=D1._format_color(e);D1._to_alpha(e,_)},D1.to_filter=function(){D1._to_filter(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"1997",1<arguments.length&&void 0!==arguments[1]?arguments[1]:1)},D1.to_mirror=function(){D1._invert_pixel(0<arguments.length&&void 0!==arguments[0]&&!arguments[0]?"VERTICAL":"HORIZONTAL")},D1.to_dutone=function(){D1._to_dutone(0<arguments.length&&void 0!==arguments[0]?arguments[0]:.8,1<arguments.length&&void 0!==arguments[1]?arguments[1]:"#ffffffff",2<arguments.length&&void 0!==arguments[2]?arguments[2]:"#000000ff")},D1.rgb_to_hsl=function(e,_,t){return D1._rgb_to_hsl(e,_,t)},D1._rgb_to_hsl=function(e,_,t){e/=255,_/=255,t/=255;var o=Math.max(e,_,t),n=Math.min(e,_,t),a=void 0,r=void 0,i=(o+n)/2;if(o==n)a=r=0;else{var s=o-n,r=.5<i?s/(2-o-n):s/(o+n);switch(o){case e:a=(_-t)/s+(_<t?6:0);break;case _:a=(t-e)/s+2;break;case t:a=(e-_)/s+4}a/=6}return[Math.round(360*a),Math.round(100*r),Math.round(100*i)]},D1._hsl_to_rgb=function(e,_,t){e/=360,t/=100;var o,n=void 0,a=void 0,r=void 0;return 0==(_/=100)?n=a=r=t:(n=(o=function(e,_,t){return t<0&&(t+=1),1<t&&--t,t<1/6?e+6*(_-e)*t:t<.5?_:t<2/3?e+(_-e)*(2/3-t)*6:e})(_=2*t-(t=t<.5?t*(1+_):t+_-t*_),t,e+1/3),a=o(_,t,e),r=o(_,t,e-1/3)),[255*n,255*a,255*r]},D1.get_rgba_from_hex=function(e){return D1._get_rgba_from_hex(e)},D1._get_rgba_from_hex=function(e){return e=e||"#00000000",[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),parseInt(e.slice(7,9),16)]},D1._get_hex_value_from_rgb_value=function(e){return Math.round(e).toString(16).padStart(2,"0")},D1._hsl_to_hex=function(e,_,t){t=D1._hsl_to_rgb(e,_,t);return D1._get_hex_color_from_rgba_values.apply(D1,S1(t).concat([255]))},D1._hsla_to_hex=function(e,_,t,o){t=D1._hsl_to_rgb(e,_,t);return D1._get_hex_color_from_rgba_values.apply(D1,S1(t).concat([o/100*255]))},D1._get_hex_values_from_rgba_values=function(e,_,t,o){return[D1._get_hex_value_from_rgb_value(e),D1._get_hex_value_from_rgb_value(_),D1._get_hex_value_from_rgb_value(t),D1._get_hex_value_from_rgb_value(o)]},D1._get_hex_color_from_rgba_values=function(e,_,t,o){return"#"+D1._get_hex_values_from_rgba_values(e,_,t,o).map(function(e){return e.toString(16)}).join("").toLowerCase()},D1._invert_hex_color=function(e){var _=D1._get_rgba_from_hex(e),t=E1(_,4),o=t[0],e=t[1],_=t[2],t=t[3];return D1._get_hex_color_from_rgba_values(255-o,255-e,255-_,t)},D1._hex_sum=function(e){var _=0;return e.forEach(function(e){_+=parseInt(e,16)}),_.toString(16).padStart(2,"0")},D1._invert_pixel=function(e){var o,n,a,_=D1.state,t=_._s_pxls,r=_.pxl_width,i=_.pxl_height,s=_._base64_original_images,l=_._original_image_index,c=_._pxl_indexes_of_selection,p=_._shape_index_a,d=_._select_shape_index_a,h=_._layer_index,_=D1.state,g=_._imported_image_pxls,u=_._imported_image_width,f=_._imported_image_height,A=[].concat(S1(t[h])),m=new Set,x=p,v=d,w=[].concat(S1(t)),b=1,M=1;"HORIZONTAL"===e?g.length?(o=new Array(g.length),g.forEach(function(e,_){var t=_%u;o[(_-t)/u*u+(u-1-t)]=e}),g=o):(t[h].forEach(function(e,_){var t=_%r,t=(_-t)/r*r+(r-1-t);A[t]=e,c.has(_)&&m.add(t),p===_&&(x=t),d===_&&(v=t)}),b=-1,w[h]=A):g.length?(n=new Array(g.length),g.forEach(function(e,_){var t=_%u;n[(f-1-(_-t)/u)*u+t]=e}),g=n):(t[h].forEach(function(e,_){var t=_%r,t=(i-1-(_-t)/r)*r+t;A[t]=e,c.has(_)&&m.add(t),p===_&&(x=t),d===_&&(v=t)}),M=-1,w[h]=A),void 0===s[l]||0!==h||g.length?D1.setState({_shape_index_a:x,_select_shape_index_a:v,_pxl_indexes_of_selection:m,_s_pxls:w,_last_action_timestamp:Date.now(),_imported_image_pxls:g},function(){D1._update_canvas()}):((a=new Image).onload=function(){var e=D1._get_new_ctx_from_canvas(a.width,a.height),_=E1(e,2),e=_[0],_=_[1];e.save(),e.scale(b,M),e.drawImage(a,0,0,a.width*b,a.height*M),e.restore();var t=a.src.includes("image/png")?_.toDataURL("image/png"):_.toDataURL("image/jpeg"),o=s.includes(t)?s:s.concat([t]);D1.setState({_shape_index_a:x,_select_shape_index_a:v,_pxl_indexes_of_selection:m,_s_pxls:w,_base64_original_images:o,_original_image_index:-1,_is_there_new_dimension:!0,_imported_image_pxls:g},function(){D1.setState({_original_image_index:o.indexOf(t),_last_action_timestamp:Date.now()}),D1._update_canvas()})},a.src=s[l])},D1._get_darkest_color=function(e){var _=D1._get_rgba_from_hex(e[0]);return e.forEach(function(e){e=D1._get_rgba_from_hex(e);e[0]+e[1]+e[2]<_[0]+_[1]+_[2]&&(_=e)}),D1._get_hex_color_from_rgba_values(_[0],_[1],_[2],255)},D1.to_multiple_images_with_filter=function(c){var p=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,d=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(){};A(regeneratorRuntime.mark(function e(){var n,r,i,s,_,t,o,l;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=D1.state._layer_index,t=D1.state,r=t._s_pxls,i=t._s_pxl_colors,r=[].concat(S1(r)),i=[].concat(S1(i)),o=D1._pxl_adjust_contrast(r[n],i[n],.75),_=E1(o,3),r[n]=_[0],i[n]=_[1],t=_[2],s=D1._get_darkest_color(i[n]),e.next=13,D1._remove_close_pxl_colors(r[n],i[n],"auto",null,2*t);case 13:return o=e.sent,_=E1(o,2),r[n]=_[0],i[n]=_[1],t=D1._pxl_adjust_smoothness(r[n],i[n],4),o=E1(t,2),_=o[0],t=o[1],o=D1._pxl_adjust_contrast(_,t,.75),o=E1(o,2),_=o[0],t=o[1],e.next=24,D1._pxls_to_png(_,t,p);case 24:e.t0=e.sent,l={Normal:e.t0},D1.get_filter_names().forEach(function(a){var e,_,t,o;c.includes(a)&&(t=D1._pxl_adjust_smoothness(r[n],i[n]),_=(e=E1(t,2))[0],t=e[1],e=D1._filter_pixels(a,4/7,_,t),_=(e=E1(e,2))[0],t=e[1],D1._pxl_to_vignette(_,t,s,.25,(o=A(regeneratorRuntime.mark(function e(_){var t,o,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=E1(_,2),t=n[0],o=n[1],n=D1._pxl_adjust_contrast(t,o,.5),n=E1(n,2),t=n[0],o=n[1],e.next=7,D1._pxls_to_png(t,o,p);case 7:l[a]=e.sent,d(l);case 9:case"end":return e.stop()}},e,P)})),function(e){return o.apply(this,arguments)})))});case 27:case"end":return e.stop()}},e,P)}))()},D1._to_alpha=function(){var e=D1.state,_=e._s_pxls,t=e._s_pxl_colors,o=e._layer_index,e=D1._pxl_colors_to_alpha(_[o],t[o],0<arguments.length&&void 0!==arguments[0]?arguments[0]:"#000000ff",1<arguments.length&&void 0!==arguments[1]?arguments[1]:1),_=E1(e,2),t=_[0],e=_[1],_=D1.state._s_pxl_colors;_[o]=e;e=D1.state._s_pxls;e[o]=t,D1.setState({_s_pxls:e,_s_pxl_colors:_,_last_action_timestamp:Date.now()},function(){D1._update_canvas()})},D1._to_less_color=function(o){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){},a=D1.state._layer_index,e=D1.state,r=e._s_pxls,i=e._s_pxl_colors,s=i[a].length;A(regeneratorRuntime.mark(function e(){var _,t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D1._remove_close_pxl_colors(r[a],i[a],o);case 2:_=e.sent,_=E1(_,2),r[a]=_[0],i[a]=_[1],_=i[a].length,t={colors_removed:s-_,colors_remaining:_},D1.setState({_s_pxls:r,_s_pxl_colors:i,_last_action_timestamp:Date.now()},function(){D1._update_canvas(),n(t)});case 9:case"end":return e.stop()}},e,P)}))()},D1._auto_adjust_contrast=function(){var e=D1.state._layer_index,_=D1.state,t=_._s_pxls,o=_._s_pxl_colors,_=D1._pxl_adjust_contrast(t[e],o[e],0<arguments.length&&void 0!==arguments[0]?arguments[0]:1),_=E1(_,2);t[e]=_[0],o[e]=_[1],D1.setState({_s_pxls:t,_s_pxl_colors:o,_last_action_timestamp:Date.now()},function(){D1._update_canvas()})},D1._auto_adjust_smoothness=function(){var e=D1.state._layer_index,_=D1.state,t=_._s_pxls,o=_._s_pxl_colors,_=D1._pxl_adjust_smoothness(t[e],o[e]),_=E1(_,2);t[e]=_[0],o[e]=_[1],D1.setState({_s_pxls:t,_s_pxl_colors:o,_last_action_timestamp:Date.now()},function(){D1._update_canvas()})},D1._pxl_to_vignette=function(p,d,h,g,u){A(regeneratorRuntime.mark(function e(){var _,t,o,n,a,r,i,s,l,c;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return h=D1._format_color(h),_=D1.state,n=_.pxl_width,r=_.pxl_height,o=D1._get_new_ctx_from_canvas(n,r),t=E1(o,1),_=t[0],o=Math.max(n,r),t=D1._invert_hex_color(h),(o=_.createRadialGradient(n/2,r/2,0,n/2,r/2,o/2)).addColorStop(1,h),o.addColorStop(.85,D1._blend_colors(h,t,.75)),o.addColorStop(0,t),_.fillStyle=o,_.fillRect(0,0,n,r),n=_.getImageData(0,0,n,r),r=D1._get_pixels_palette_and_list_from_image_data(n,!0,0),n=r.new_pxls,a=r.new_pxl_colors,e.next=15,D1._remove_close_pxl_colors(n,a,42.5/255,null,6);case 15:r=e.sent,r=E1(r,2),n=r[0],a=r[1],r=D1._pxl_colors_to_alpha(n,a,t,1),r=E1(r,2),n=r[0],a=r[1],r=D1._get_rgba_from_hex(h),r=E1(r,4),i=r[0],s=r[1],l=r[2],r[3],a=a.map(function(e,_){e=D1._get_rgba_from_hex(e),e=E1(e,4),e[0],e[1],e[2],e=e[3];return D1._get_hex_color_from_rgba_values(i,s,l,e)}),c=[],n=n.map(function(e,_){e=a[e],_=d[p[_]],e=D1._blend_colors(_,e,g,!1);return-1===c.indexOf(e)&&c.push(e),c.indexOf(e)}),u([n,a=c]);case 29:case"end":return e.stop()}},e,P)}))()},D1._to_vignette=function(e,_){var t,o,n,a;0<_&&(t=D1.state._layer_index,o=D1.state,n=o._s_pxls,a=o._s_pxl_colors,D1._pxl_to_vignette(n[t],a[t],e,_,function(e){e=E1(e,2);n[t]=e[0],a[t]=e[1],D1.setState({_s_pxls:n,_s_pxl_colors:a,_last_action_timestamp:Date.now()},function(){D1._update_canvas()})}))},D1._to_colorized=function(){var p=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,d=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,h=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,g=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,e=D1.state,_=e._s_pxl_colors,t=e._layer_index,u=null!==p&&0<=p&&p<=360?"hue":"sepia"===p?"sepia":"greyscale",d=null===d?1:d,e=_[t].map(function(e){e=D1._format_color(e);var _,t,o,n,a,r=D1._get_rgba_from_hex(e),i=E1(r,4),s=i[0],l=i[1],c=i[2],r=i[3];return"greyscale"==u?(i=D1._get_hex_value_from_rgb_value((s+l+c)/3),e=D1._format_color("#"+i+i+i+D1._get_hex_value_from_rgb_value(r*d))):"sepia"==u?(t=(a=function(e,_){return _<e?_:e})(.393*s+.769*l+.189*c,255),_=a(.349*s+.686*l+.168*c,255),o=a(.272*s+.534*l+.131*c,255),n=D1._get_hex_value_from_rgb_value(t),a=D1._get_hex_value_from_rgb_value(_),t=D1._get_hex_value_from_rgb_value(o),_=D1._get_hex_value_from_rgb_value(r*d),e=D1._format_color("#"+n+a+t+_)):"hue"==u&&(o=D1._get_rgba_from_hex(e),n=(r=E1(o,4))[0],a=r[1],t=r[2],_=r[3],o=D1._rgb_to_hsl(n,a,t),(r=E1(o,3))[0],n=r[1],a=r[2],t=[h,g,d],o=[n,a,1],r=[],0!==d?(r[2]=1-(1-t[2])*(1-o[2]),r[0]=Math.round(t[0]*t[2]/r[2]+o[0]*o[2]*(1-t[2])/r[2]),r[1]=Math.round(t[1]*t[2]/r[2]+o[1]*o[2]*(1-t[2])/r[2])):r=[n,a],n=D1._hsl_to_rgb(p,r[0],r[1]),r=(a=E1(n,3))[0],n=a[1],a=a[2],e=0===_?"#00000000":D1._get_hex_color_from_rgba_values(r,n,a,_)),D1._format_color(e)}),_=D1.state._s_pxl_colors;_[t]=e,D1.setState({_s_pxl_colors:_,_last_action_timestamp:Date.now()},function(){D1._update_canvas()})},D1._get_filters=function(){return{".1997":{a:[0,1,3,4,6,7,9,10,12,13,14,16,17,19,20,22,23,25,26,28,29,31,32,34,35,37,38,39,41,42,44,45,46,48,49,50,52,53,54,55,57,58,59,60,61,62,64,65,66,67,68,69,70,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,125,126,127,128,129,130,131,132,133,134,135,136,137,137,138,139,140,141,142,143,144,145,146,146,147,148,149,150,151,152,153,153,154,155,156,157,158,159,160,160,161,162,163,164,165,166,166,167,168,169,170,171,172,172,173,174,175,176,177,178,178,179,180,181,182,183,183,184,185,186,187,188,188,189,190,191,192,193,193,194,195,196,197,198,199,199,200,201,202,203,204,204,205,206,207,208,209,209,210,211,212,213,214,215,215,216,217,218,219,220,221,221,222,223,224,225,226,227,227,228,229,230,231,232,233,233,234,235,236,237,238,239,240,241,241,242,243,244,245,246,247,248,249,250,250,251,252,253,254,255,255],r:[58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,59,60,60,61,62,62,63,63,64,64,65,66,66,67,67,68,69,69,70,70,71,72,72,73,74,74,75,76,77,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,95,96,97,98,99,100,102,103,104,105,106,108,109,110,111,112,113,114,116,117,118,119,120,121,122,123,125,126,127,128,129,130,131,133,134,135,136,137,138,140,141,142,143,144,146,147,148,149,151,152,153,154,156,157,158,160,161,162,164,165,166,168,169,170,172,173,175,176,177,179,180,182,183,185,186,188,189,191,192,193,194,196,197,198,199,200,201,202,203,204,204,205,206,206,207,208,208,209,209,210,210,211,211,212,212,212,213,213,213,213,213,214,214,214,214,214,214,214,214,214,214,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,214,214,214,214,214,214,214,214,214,214,213,213,213,213,213,213,213,212,212,212,212,212],g:[40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,47,47,48,48,48,49,49,50,50,51,52,52,53,54,54,55,56,57,58,59,60,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,153,154,155,156,157,158,160,161,162,163,164,166,167,168,169,171,172,173,174,175,176,178,179,180,181,182,183,185,186,187,188,189,190,191,192,193,195,196,197,198,199,200,201,202,203,205,206,207,208,209,210,211,212,214,215,216,217,218,220,221,222,223,225,226,227,228,230,231,232,233,235,236,237,239,240,241,242,244,245,246,247,249,250,251,252,254,255,255],b:[45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,46,46,47,47,47,48,48,48,48,49,49,49,50,50,50,51,51,51,52,52,53,53,54,54,55,56,56,57,58,59,60,61,62,62,63,64,65,66,68,69,70,71,72,73,74,75,76,77,79,80,81,82,83,84,85,86,87,89,90,91,92,93,94,96,97,98,99,100,102,103,104,105,107,108,109,110,112,113,114,115,117,118,119,120,122,123,124,126,127,128,130,131,133,134,135,137,138,140,141,143,144,145,147,148,149,151,152,153,155,156,157,159,160,161,162,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,180,181,182,184,185,186,187,188,188,189,190,191,192,193,193,194,195,195,196,196,196,197,197,197,197,198,198,198,198,198,198,198,198,198,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,198,198,198,198,198,198,197,197,197,197,197,197,197,197,197,197,197,197,197,197,198,198,198,198,198,198,198]},".Brannan":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,255],r:[50,50,50,50,50,50,50,50,50,50,50,50,50,51,51,51,51,51,52,53,54,55,56,57,59,60,62,63,64,66,67,68,69,70,71,71,72,73,73,74,75,75,76,76,77,77,78,78,79,79,80,80,81,81,82,83,83,84,85,86,87,88,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,112,113,114,115,116,118,119,120,121,122,124,125,126,128,129,130,132,133,134,136,137,139,140,141,143,144,146,147,149,150,152,153,154,156,157,159,160,162,163,164,166,167,169,170,171,173,174,175,177,178,179,181,182,183,185,186,187,189,190,192,193,195,196,198,199,201,203,204,206,207,209,210,212,213,215,216,217,219,220,221,223,224,225,226,227,228,229,230,231,232,233,234,235,236,236,237,238,239,239,240,241,241,242,243,243,244,244,245,246,246,247,247,248,248,249,249,249,250,250,251,251,251,252,252,252,253,253,253,254,254,254,254,254,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,254,254,254,254,254],g:[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,3,4,4,5,6,7,8,10,11,12,13,14,16,17,18,19,20,21,23,24,25,26,27,28,29,30,32,33,34,35,36,38,39,40,41,43,44,45,47,48,50,51,53,54,56,57,59,61,62,64,66,68,70,72,74,76,78,80,82,84,87,89,91,93,95,97,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,161,163,165,167,168,170,172,173,175,176,178,179,181,182,183,184,186,187,188,189,190,191,192,193,193,194,195,196,196,197,198,198,199,200,200,201,202,202,203,203,204,204,205,205,206,207,207,208,208,209,210,210,211,212,212,213,214,214,215,216,217,217,218,219,219,220,221,221,222,222,223,224,224,225,225,226,226,227,228,228,229,229,229,230,230,231,231,232,232,233,233,233,234,234,234,235,235,236,236,236,237,237,237,238,238,239,239,239,240,240,240,241,241,241,242,242,242,243,243,243,244,244,244,245,245,245,246,246,247,247,247,248,248,249,249,250,250,251,251,252,252,252],b:[48,48,48,48,48,48,48,48,49,49,49,49,49,49,49,50,50,50,51,51,51,52,52,53,53,54,54,54,55,55,56,56,57,57,58,58,59,60,60,61,61,62,62,63,64,64,65,66,66,67,68,68,69,70,71,71,72,73,74,75,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,92,93,94,95,96,98,99,100,101,102,103,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,132,133,134,135,136,137,138,139,140,141,141,142,143,144,145,146,146,147,148,148,149,150,151,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,168,169,170,171,172,173,174,175,176,177,178,178,179,180,181,181,182,183,183,184,184,185,185,185,186,186,187,187,187,188,188,188,189,189,190,190,191,191,192,193,193,194,195,195,196,197,198,199,200,200,201,202,203,204,205,206,206,207,208,209,210,211,211,212,213,214,214,215,216,216,217,218,218,219,219,220,220,221,222,222,222,223,223,224,224,224,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225]},".Gotham":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,255],r:[50,50,50,50,50,50,50,50,50,50,50,50,50,51,51,51,51,51,52,53,54,55,56,57,59,60,62,63,64,66,67,68,69,70,71,71,72,73,73,74,75,75,76,76,77,77,78,78,79,79,80,80,81,81,82,83,83,84,85,86,87,88,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,112,113,114,115,116,118,119,120,121,122,124,125,126,128,129,130,132,133,134,136,137,139,140,141,143,144,146,147,149,150,152,153,154,156,157,159,160,162,163,164,166,167,169,170,171,173,174,175,177,178,179,181,182,183,185,186,187,189,190,192,193,195,196,198,199,201,203,204,206,207,209,210,212,213,215,216,217,219,220,221,223,224,225,226,227,228,229,230,231,232,233,234,235,236,236,237,238,239,239,240,241,241,242,243,243,244,244,245,246,246,247,247,248,248,249,249,249,250,250,251,251,251,252,252,252,253,253,253,254,254,254,254,254,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,254,254,254,254,254],g:[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,3,4,4,5,6,7,8,10,11,12,13,14,16,17,18,19,20,21,23,24,25,26,27,28,29,30,32,33,34,35,36,38,39,40,41,43,44,45,47,48,50,51,53,54,56,57,59,61,62,64,66,68,70,72,74,76,78,80,82,84,87,89,91,93,95,97,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,161,163,165,167,168,170,172,173,175,176,178,179,181,182,183,184,186,187,188,189,190,191,192,193,193,194,195,196,196,197,198,198,199,200,200,201,202,202,203,203,204,204,205,205,206,207,207,208,208,209,210,210,211,212,212,213,214,214,215,216,217,217,218,219,219,220,221,221,222,222,223,224,224,225,225,226,226,227,228,228,229,229,229,230,230,231,231,232,232,233,233,233,234,234,234,235,235,236,236,236,237,237,237,238,238,239,239,239,240,240,240,241,241,241,242,242,242,243,243,243,244,244,244,245,245,245,246,246,247,247,247,248,248,249,249,250,250,251,251,252,252,252],b:[48,48,48,48,48,48,48,48,49,49,49,49,49,49,49,50,50,50,51,51,51,52,52,53,53,54,54,54,55,55,56,56,57,57,58,58,59,60,60,61,61,62,62,63,64,64,65,66,66,67,68,68,69,70,71,71,72,73,74,75,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,92,93,94,95,96,98,99,100,101,102,103,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,132,133,134,135,136,137,138,139,140,141,141,142,143,144,145,146,146,147,148,148,149,150,151,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,168,169,170,171,172,173,174,175,176,177,178,178,179,180,181,181,182,183,183,184,184,185,185,185,186,186,187,187,187,188,188,188,189,189,190,190,191,191,192,193,193,194,195,195,196,197,198,199,200,200,201,202,203,204,205,206,206,207,208,209,210,211,211,212,213,214,214,215,216,216,217,218,218,219,219,220,220,221,222,222,222,223,223,224,224,224,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225]},".Gingham":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[44,44,44,44,45,45,45,45,45,45,46,46,46,46,46,47,47,47,47,48,48,48,49,49,49,50,50,51,51,52,52,53,54,54,55,56,57,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,74,75,76,78,79,81,82,83,85,86,88,89,90,92,93,95,96,98,99,101,102,104,105,107,109,110,112,113,115,116,118,119,121,122,124,125,127,128,130,131,133,134,136,137,138,140,141,142,143,145,146,147,148,149,150,151,152,153,154,155,156,156,157,158,159,160,160,161,162,163,163,164,165,165,166,167,168,168,169,170,170,171,171,172,173,173,174,175,175,176,176,177,177,178,179,179,180,180,181,181,182,182,183,183,184,184,185,185,186,186,187,187,188,188,189,189,190,190,191,191,192,192,192,193,193,194,194,195,195,195,196,196,197,197,197,198,198,199,199,199,200,200,201,201,201,202,202,203,203,203,204,204,205,205,205,206,206,207,207,207,208,208,209,209,209,210,210,210,211,211,211,212,212,212,213,213,213,213,213,213,213,214,214,214,214,214,214,214,214,214,214,214,214,214,213,213,213,213,213,213,213,213,213,213],g:[44,44,44,44,44,44,44,44,44,44,44,44,44,45,45,45,45,45,45,46,46,46,47,47,47,48,48,49,49,50,51,51,52,53,54,54,55,56,57,58,59,61,62,63,64,65,66,68,69,70,71,73,74,75,77,78,79,81,82,84,85,87,88,89,91,92,94,95,97,98,100,101,103,104,106,107,109,110,112,113,115,116,118,119,121,122,124,125,127,128,130,131,133,134,135,137,138,139,141,142,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,168,169,170,171,171,172,173,173,174,175,176,176,177,177,178,179,179,180,181,181,182,182,183,183,184,184,185,185,186,186,187,187,188,188,189,189,190,190,191,191,191,192,192,193,193,193,194,194,195,195,195,196,196,196,197,197,198,198,198,199,199,199,200,200,200,201,201,201,202,202,202,203,203,203,204,204,204,205,205,205,206,206,206,207,207,207,208,208,208,209,209,209,210,210,210,211,211,211,212,212,212,212,213,213,213,213,213,213,213,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,213,213,213,213,213,213],b:[45,45,45,45,45,45,46,46,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,50,50,51,51,52,52,53,53,54,54,55,56,57,57,58,59,60,61,62,63,64,65,66,67,68,70,71,72,73,75,76,77,79,80,82,83,84,86,87,89,90,91,93,94,96,97,98,100,101,102,104,104,106,107,108,109,111,112,113,115,116,117,119,120,121,123,124,125,127,128,129,131,132,134,135,136,138,139,140,142,143,144,146,147,148,150,151,152,153,155,156,157,158,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,179,180,181,181,182,183,183,184,185,185,186,186,187,187,188,188,189,189,190,190,191,191,192,192,193,193,193,194,194,194,195,195,196,196,196,197,197,197,198,198,198,198,199,199,199,200,200,200,200,201,201,201,201,202,202,202,203,203,203,203,203,204,204,204,204,205,205,205,205,206,206,206,206,207,207,207,208,208,208,208,209,209,209,209,209,210,210,210,210,211,211,211,211,211,211,211,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,213,213,213,213,213,213,213,213]},".Hefe":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,255],r:[32,32,32,32,32,32,32,32,32,32,32,32,32,33,33,33,33,33,34,35,36,38,39,41,43,45,48,50,52,54,56,58,60,62,64,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,96,98,100,102,104,106,108,110,112,114,116,117,119,121,123,125,126,128,130,132,133,135,137,139,140,142,144,146,147,149,151,152,154,155,157,158,160,161,163,164,166,167,168,170,171,172,173,175,176,177,178,179,180,181,182,184,185,186,187,188,189,190,190,191,192,193,194,195,196,197,197,198,199,200,201,201,202,203,204,204,205,205,206,206,207,207,208,208,209,209,210,210,211,211,212,212,213,213,214,214,215,215,216,216,217,217,218,218,219,219,220,220,221,221,221,222,222,223,223,224,224,225,225,225,226,226,227,227,228,228,228,229,229,230,230,231,231,231,232,232,233,233,233,234,234,235,235,235,236,236,236,237,237,238,238,238,239,239,239,240,240,240,241,241,242,242,242,243,243,243,244,244,245,245,245,246,246,247,248,248,249,249,250,250,251,251,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252],g:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,19,20,21,23,24,25,27,28,30,31,33,34,36,37,39,40,42,44,45,47,49,50,52,54,56,57,59,61,63,65,67,69,71,73,75,78,80,82,85,87,89,92,94,97,99,102,104,106,109,111,114,116,118,121,123,125,127,129,131,133,135,137,139,141,143,145,146,148,150,152,154,156,157,159,161,163,164,166,168,169,171,173,174,176,178,179,181,182,184,185,187,188,190,191,192,194,195,196,197,198,199,200,201,202,203,204,205,205,206,207,207,208,209,209,210,210,211,211,211,212,212,213,213,213,214,214,215,215,216,216,216,217,217,218,218,219,219,220,220,220,221,221,222,222,222,223,223,224,224,225,225,225,226,226,227,227,228,228,228,229,229,230,230,231,231,232,232,232,233,233,234,234,235,235,236,236,237,237,238,238,239,239,239,240,240,241,241,242,242,243,244,244,245,246,246,247,248,249,249,250,250,251,251,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252],b:[2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,6,6,6,6,6,7,7,7,8,8,9,9,9,10,10,11,12,12,13,13,14,15,15,16,17,17,18,19,19,20,21,22,23,24,24,25,26,27,28,29,30,32,33,34,35,36,38,39,40,42,43,45,47,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,87,89,91,93,95,96,98,100,101,103,105,107,108,110,112,113,115,117,118,120,122,123,125,127,128,130,131,133,135,136,138,140,141,143,145,146,148,149,151,153,154,156,158,159,161,163,164,166,167,169,170,171,173,174,175,177,178,179,180,182,183,184,185,186,187,189,190,191,192,193,194,195,195,196,197,198,198,199,200,200,201,201,202,202,203,203,204,204,204,205,205,205,206,206,206,207,207,207,207,208,208,209,209,209,210,210,211,211,211,212,212,213,213,214,214,214,215,215,216,216,216,217,217,218,218,218,219,219,220,220,220,221,221,222,222,222,223,223,224,224,225,225,226,226,227,227,227,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228]},".Lordkelvin":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,255],r:[43,44,46,47,49,50,52,53,55,56,58,59,61,62,64,65,67,69,70,72,73,75,77,78,80,81,83,85,86,88,90,91,93,95,96,98,100,102,103,105,107,109,111,112,114,116,118,120,121,123,125,127,129,130,132,134,136,137,139,141,142,144,146,147,149,151,152,154,155,157,158,160,162,163,165,166,168,169,171,172,174,175,176,178,179,180,182,183,184,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,201,202,203,204,204,205,206,207,207,208,209,210,210,211,212,212,213,214,214,215,216,217,217,218,219,219,220,221,222,222,223,224,224,225,225,226,227,227,228,228,229,229,229,230,230,231,231,232,232,232,233,233,233,234,234,235,235,235,236,236,236,237,237,237,238,238,239,239,239,240,240,240,241,241,241,242,242,242,243,243,243,243,244,244,244,245,245,245,245,245,246,246,246,246,246,247,247,247,247,247,248,248,248,248,248,248,249,249,249,249,249,249,249,250,250,250,250,250,250,250,250,251,251,251,251,251,251,251,251,251,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,253,254,254,254,254,254],g:[36,36,36,36,36,36,36,36,36,36,36,36,36,37,37,37,37,37,37,38,38,38,39,39,40,40,41,41,42,43,43,44,45,46,47,47,48,49,50,51,52,53,54,55,56,57,59,60,61,62,63,64,65,67,68,69,70,71,72,73,75,76,77,78,79,80,81,82,83,84,86,87,88,89,90,91,92,93,95,96,97,98,99,100,101,102,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,155,156,157,158,158,159,160,160,161,161,162,163,163,164,164,165,165,166,166,167,167,168,168,168,169,169,170,171,171,172,172,173,173,174,174,175,175,176,177,177,178,178,179,179,180,180,181,181,182,182,182,183,183,184,184,184,185,185,185,186,186,186,186,187,187,187,187,188,188,188,188,188,189,189,189,189,189,190,190,190,190,190,190,190,191,191,191,191,191,191,191,191,192,192,192,192,192,192,192,192,193,193,193,193,193,193,193,193,194,194,194,194,194,194,194,195,195,195,195],b:[69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,70,70,70,70,70,70,70,70,70,70,71,71,71,72,72,73,73,73,74,74,75,75,76,76,77,78,78,79,79,80,80,81,81,82,82,82,83,83,84,84,84,85,85,86,86,86,87,87,87,88,88,88,89,89,90,90,90,91,91,91,92,92,93,93,93,94,94,95,95,96,96,96,97,97,98,99,99,100,100,101,101,102,102,102,103,103,103,104,104,104,105,105,105,106,106,106,106,107,107,107,107,108,108,108,108,109,109,109,110,110,110,111,111,111,111,112,112,112,113,113,113,114,114,114,115,115,115,115,116,116,116,116,117,117,117,117,117,118,118,118,118,118,118,119,119,119,119,119,119,119,120,120,120,120,120,120,120,120,120,121,121,121,121,121,121,121,121,121,121,121,122,122,122,122,122,122,122,122,122,122,122,122,123,123,123,123,123,123,123,123,123,123,123,124,124,124,124,124,124]},".Nashville":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,255],r:[56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,57,57,58,58,59,59,60,61,62,63,64,65,66,67,68,69,71,72,73,75,76,78,79,81,82,84,85,87,88,90,91,93,95,96,98,100,102,104,106,108,110,113,115,117,120,122,124,127,129,131,133,136,138,140,142,144,146,148,150,152,154,155,157,159,160,162,164,165,167,168,170,171,173,174,175,177,178,179,181,182,183,185,186,187,189,190,191,192,194,195,196,197,198,200,201,202,203,204,205,206,208,209,209,210,211,212,213,214,215,216,217,217,218,219,220,220,221,222,223,223,224,225,226,226,227,228,228,229,230,230,231,231,232,233,233,234,234,235,235,236,237,237,238,238,239,239,240,240,240,241,241,242,242,243,243,243,244,244,245,245,245,246,246,246,247,247,247,248,248,248,248,249,249,249,249,250,250,250,250,251,251,251,251,251,252,252,252,252,252,253,253,253,253,253,254,254,254,254,254,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],g:[38,39,39,40,41,41,42,42,43,44,44,45,46,46,47,48,49,50,51,52,53,55,56,57,59,60,61,63,64,65,67,68,69,71,72,73,74,76,77,78,80,81,82,84,85,86,87,89,90,91,93,94,95,97,98,99,101,102,103,104,106,107,108,110,111,112,114,115,116,118,119,121,122,123,125,126,128,129,130,132,133,134,136,137,138,140,141,142,143,145,146,147,148,149,150,151,152,153,154,155,156,157,158,158,159,160,161,162,163,163,164,165,166,166,167,168,169,169,170,171,172,172,173,174,175,176,176,177,178,179,180,181,181,182,183,184,185,186,187,187,188,189,189,190,191,191,192,193,193,194,194,195,195,196,197,197,198,198,199,199,200,200,201,201,202,202,202,203,203,204,204,205,205,205,206,206,207,207,207,208,208,208,209,209,209,210,210,210,211,211,211,212,212,212,213,213,213,213,214,214,214,214,215,215,215,215,216,216,216,216,216,217,217,217,217,217,218,218,218,218,218,218,219,219,219,219,219,220,220,220,220,220,220,220,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221],b:[97,98,98,99,99,100,100,101,101,102,102,103,104,104,105,105,106,107,107,108,109,110,110,111,112,113,114,114,115,116,116,117,118,118,119,119,120,120,121,121,122,122,123,123,124,124,124,125,125,126,126,127,127,127,128,128,129,129,129,130,130,131,131,132,132,132,133,133,134,134,135,135,136,136,136,137,137,138,138,139,139,139,140,140,141,141,142,142,142,143,143,144,144,144,145,145,146,146,147,147,147,148,148,149,149,150,150,151,151,151,152,152,153,153,154,154,154,155,155,155,156,156,156,157,157,157,158,158,158,158,158,158,159,159,159,159,159,159,159,159,159,159,159,160,160,160,160,160,161,161,161,162,162,162,162,163,163,163,163,164,164,164,164,165,165,165,165,165,165,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,167,167,167,167,167,167,167,167,167,168,168,168,168,168,168,169,169,169,169,169,170,170,170,170,171,171,171,171,171,172,172,172,172,172,173,173,173,173,173,173,173,174,174,174,174,174,174,174,174,175,175,175,175,175,175,175,175,175,175,175,176,176,176,176,176,176,176,176,176,176]},".Xpro":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,255],r:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,3,3,4,4,5,5,5,6,7,7,8,8,9,9,10,11,11,12,13,14,14,15,16,17,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33,34,35,37,38,39,41,42,43,45,46,48,49,51,52,54,55,57,58,60,62,63,65,67,68,70,72,74,76,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,172,174,176,178,180,182,184,186,188,189,191,193,194,196,198,199,201,202,204,205,207,208,209,211,212,214,215,216,217,219,220,221,222,223,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,239,240,241,242,243,243,244,245,246,246,247,248,248,249,249,250,250,251,251,252,252,252,253,253,253,253,253,253,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,255,255,255,255,255,255,255,255],g:[0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,4,4,4,5,5,5,6,6,7,7,8,8,9,10,10,11,12,12,13,14,14,15,16,17,18,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37,39,40,41,43,44,45,47,48,50,51,53,54,56,57,59,61,62,64,66,67,69,71,73,75,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,161,163,165,167,169,171,173,175,176,178,180,182,183,185,187,189,190,192,193,195,197,198,200,201,203,204,206,207,209,210,211,213,214,216,217,218,219,221,222,223,224,226,227,228,229,230,231,232,233,234,235,236,237,237,238,239,240,240,241,242,243,243,244,244,245,246,246,247,247,248,248,249,249,250,250,250,251,251,252,252,252,253,253,253,253,253,253,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,255,255,255,255,255,255,255,255,255,255],b:[24,25,26,27,28,28,29,30,31,32,33,34,35,35,36,37,38,39,40,41,41,42,43,44,45,45,46,47,48,49,49,50,51,52,53,53,54,55,56,56,57,58,59,59,60,61,62,62,63,64,64,65,66,67,67,68,69,70,70,71,72,73,73,74,75,76,77,77,78,79,80,81,81,82,83,84,85,86,86,87,88,89,90,91,91,92,93,94,95,96,96,97,98,99,100,101,101,102,103,104,105,106,107,107,108,109,110,111,112,113,114,114,115,116,117,118,119,119,120,121,122,123,124,124,125,126,127,127,128,129,129,130,130,131,131,132,132,133,134,134,135,136,137,138,138,139,140,141,142,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,162,163,164,165,165,166,167,168,168,169,170,171,171,172,173,173,174,175,176,176,177,178,178,179,180,181,182,182,183,184,185,185,186,187,188,189,189,190,191,192,193,193,194,195,196,197,197,198,199,200,200,201,202,203,204,204,205,206,206,207,208,208,209,210,210,211,212,212,213,214,215,215,216,217,218,218,219,220,221,221,222,223,224,225,226,226,227,228,229]},Inversion:{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[255,254,253,252,251,250,249,248,247,246,245,244,243,242,241,240,239,238,237,236,235,234,233,232,231,230,229,228,227,226,225,224,223,222,221,220,219,218,217,216,215,214,213,212,211,210,209,208,207,206,205,204,203,202,201,200,199,198,197,196,195,194,193,192,191,190,189,188,187,186,185,184,183,182,181,180,179,178,177,176,175,174,173,172,171,170,169,168,167,166,165,164,163,162,161,160,159,158,157,156,155,154,153,152,151,150,149,148,147,146,145,144,143,142,141,140,139,138,137,136,135,134,133,132,131,130,129,128,127,126,125,124,123,122,121,120,119,118,117,116,115,114,113,112,111,110,109,108,107,106,105,104,103,102,101,100,99,98,97,96,95,94,93,92,91,90,89,88,87,86,85,84,83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0],g:[255,254,253,252,251,250,249,248,247,246,245,244,243,242,241,240,239,238,237,236,235,234,233,232,231,230,229,228,227,226,225,224,223,222,221,220,219,218,217,216,215,214,213,212,211,210,209,208,207,206,205,204,203,202,201,200,199,198,197,196,195,194,193,192,191,190,189,188,187,186,185,184,183,182,181,180,179,178,177,176,175,174,173,172,171,170,169,168,167,166,165,164,163,162,161,160,159,158,157,156,155,154,153,152,151,150,149,148,147,146,145,144,143,142,141,140,139,138,137,136,135,134,133,132,131,130,129,128,127,126,125,124,123,122,121,120,119,118,117,116,115,114,113,112,111,110,109,108,107,106,105,104,103,102,101,100,99,98,97,96,95,94,93,92,91,90,89,88,87,86,85,84,83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0],b:[255,254,253,252,251,250,249,248,247,246,245,244,243,242,241,240,239,238,237,236,235,234,233,232,231,230,229,228,227,226,225,224,223,222,221,220,219,218,217,216,215,214,213,212,211,210,209,208,207,206,205,204,203,202,201,200,199,198,197,196,195,194,193,192,191,190,189,188,187,186,185,184,183,182,181,180,179,178,177,176,175,174,173,172,171,170,169,168,167,166,165,164,163,162,161,160,159,158,157,156,155,154,153,152,151,150,149,148,147,146,145,144,143,142,141,140,139,138,137,136,135,134,133,132,131,130,129,128,127,126,125,124,123,122,121,120,119,118,117,116,115,114,113,112,111,110,109,108,107,106,105,104,103,102,101,100,99,98,97,96,95,94,93,92,91,90,89,88,87,86,85,84,83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0]},"Abao color lab":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[42,42,42,41,41,41,41,41,41,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,41,41,41,42,42,42,43,43,44,44,45,46,46,47,48,48,49,50,51,51,52,53,54,55,56,57,57,58,59,60,61,62,63,64,65,66,67,68,69,70,70,71,72,74,75,76,77,78,79,80,81,82,83,84,85,86,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,202,203,204,205,206,207,208,209,210,211,212,213,213,214,215,216,217,218,219,220,221,221,222,223,224,225,226,227,228,229,229,230,231,232,233,234,235,235,236,237,238,239,240,241,241,242,243,244,245,246,247,247,248,249,250,251,252,252,253,254,255],g:[116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,117,117,117,117,117,117,117,117,118,118,118,118,118,118,119,119,119,119,119,119,120,120,120,120,121,121,121,121,122,122,122,123,123,124,124,125,125,126,126,127,128,128,129,130,131,132,133,134,135,136,137,138,139,140,141,143,144,145,146,147,148,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,165,166,167,168,169,169,170,171,172,172,173,174,174,175,176,177,178,178,179,180,181,182,183,184,184,185,186,187,189,190,191,192,193,195,196,197,199,200,202,203,204,206,207,209,210,211,213,214,215,217,218,219,220,221,222,223,224,225,226,226,227,227,228,228,229,229,229,230,230,230,230,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,230,230,230,230],b:[138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,137,137,137,137,137,137,136,136,136,136,135,135,135,135,134,134,134,133,133,133,133,132,132,132,132,132,132,132,131,131,131,131,131,131,132,132,132,132,132,132,132,133,133,133,133,134,134,134,134,135,135,135,136,136,136,136,137,137,137,138,138,138,139,139,139,140,140,140,140,141,141,141,142,142,142,143,143,143,144,144,144,145,145,145,146,146,147,147,147,148,148,149,149,150,150,151,151,152,152,153,153,154,155,155,156,157,157,158,159,160,160,161,162,162,163,164,164,165,166,166,167,167,168,168,169,169,170,170,170,171,171,171,171,171,171,172,172,172,172,172,172,172,172,172,172,172,172,172,171,171,171,171,171,171,171,171,170,170,170,170]},"Ancient warmth":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[0,1,3,4,5,6,8,9,10,12,13,14,15,17,18,19,21,22,23,24,26,27,28,29,31,32,33,35,36,37,38,40,41,42,43,45,46,47,48,50,51,52,53,55,56,57,58,60,61,62,63,64,66,67,68,69,70,72,73,74,75,76,78,79,80,81,82,84,85,86,87,88,89,90,92,93,94,95,96,97,98,99,101,102,103,104,105,106,107,108,109,110,111,112,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,146,147,148,149,150,151,152,153,154,155,156,157,158,159,159,160,161,162,163,164,165,166,167,168,169,169,170,171,172,173,174,175,176,177,177,178,179,180,181,182,183,183,184,185,186,187,188,189,190,190,191,192,193,194,195,196,196,197,198,199,200,201,201,202,203,204,205,206,206,207,208,209,210,211,211,212,213,214,215,216,216,217,218,219,220,221,221,222,223,224,225,225,226,227,228,229,229,230,231,232,233,234,234,235,236,237,238,238,239,240,241,242,242,243,244,245,246,246,247,248,249,250,250,251,252,253,254,255,255],g:[0,1,2,4,5,6,7,8,10,11,12,13,14,16,17,18,19,20,22,23,24,25,26,28,29,30,31,32,34,35,36,37,38,39,41,42,43,44,45,46,48,49,50,51,52,53,55,56,57,58,59,60,61,63,64,65,66,67,68,69,71,72,73,74,75,76,77,78,79,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,164,165,166,167,168,169,170,171,172,173,174,175,176,176,177,178,179,180,181,182,183,184,185,186,187,187,188,189,190,191,192,193,194,195,196,196,197,198,199,200,201,202,203,204,205,205,206,207,208,209,210,211,212,213,213,214,215,216,217,218,219,220,221,221,222,223,224,225,226,227,228,229,229,230,231,232,233,234,235,236,237,237,238,239,240,241,242,243,244,244,245,246,247,248,249,250,251,252,252,253,254,255],b:[0,1,2,2,3,4,5,5,6,7,8,8,9,10,11,11,12,13,14,14,15,16,17,17,18,19,20,20,21,22,23,23,24,25,26,27,27,28,29,30,30,31,32,33,34,34,35,36,37,37,38,39,40,41,41,42,43,44,45,45,46,47,48,49,49,50,51,52,53,53,54,55,56,57,58,58,59,60,61,62,63,63,64,65,66,67,68,69,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,100,101,102,103,104,105,106,107,108,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,131,132,133,134,135,136,137,138,139,140,141,143,144,145,146,147,148,149,150,152,153,154,155,156,157,158,160,161,162,163,164,165,167,168,169,170,171,173,174,175,176,177,179,180,181,182,183,185,186,187,188,189,191,192,193,194,195,197,198,199,200,202,203,204,205,207,208,209,210,212,213,214,215,216,218,219,220,221,223,224,225,227,228,229,230,232,233,234,235,237,238,239,240,242,243,244,245,247,248,249,250,252,253,254,255]},"Beam gradient":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,5,5,5,5,6,6,7,7,7,8,8,9,10,10,11,11,12,13,13,14,15,16,16,17,18,19,20,21,22,22,23,24,25,26,27,28,29,30,31,32,33,34,36,37,38,39,40,41,42,43,44,46,47,48,49,50,52,53,54,55,57,58,59,61,62,63,65,66,67,69,70,71,73,74,75,77,78,80,81,82,84,85,87,88,89,91,92,94,95,97,98,99,101,102,104,105,107,108,110,111,113,114,116,117,119,120,122,123,124,126,127,129,130,132,133,135,136,138,139,141,142,144,145,147,148,150,151,153,154,156,157,159,160,162,163,165,166,168,169,170,172,173,175,176,177,179,180,181,183,184,186,187,188,190,191,192,194,195,196,198,199,200,201,203,204,205,206,208,209,210,211,212,213,214,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,234,235,236,237,238,239,239,240,241,242,242,243,244,244,245,245,246,247,247,248,248,248,249,249,250,250,250,251,251,251,252,252,252,252,253,253,253,253,254,254,254,254,254,255,255,255],g:[1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,5,5,5,6,6,6,7,7,8,8,8,9,10,10,11,11,12,13,13,14,15,16,16,17,18,19,20,21,21,22,23,24,25,26,27,28,29,30,31,32,33,34,36,37,38,39,40,41,42,43,44,46,47,48,49,50,52,53,54,55,57,58,59,61,62,63,65,66,67,69,70,71,73,74,75,77,78,79,81,82,84,85,86,88,89,91,92,94,95,96,98,99,101,102,104,105,107,108,110,111,113,114,116,117,119,120,122,123,125,126,127,129,130,132,133,135,136,138,139,141,142,144,145,147,148,150,151,153,154,156,157,159,160,162,163,165,166,168,169,170,172,173,175,176,177,179,180,181,183,184,185,187,188,189,191,192,193,195,196,197,199,200,201,202,204,205,206,207,208,210,211,212,213,214,215,216,217,218,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,234,235,236,237,238,239,239,240,241,242,242,243,244,244,245,246,246,247,247,248,248,249,249,249,250,250,250,251,251,251,252,252,252,252,253,253,253,253,254,254,254,254,254,255,255,255],b:[1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,5,5,5,6,6,6,7,7,7,8,8,9,9,10,11,11,12,12,13,14,15,15,16,17,18,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,45,46,47,48,49,51,52,53,54,56,57,58,60,61,62,64,65,66,68,69,70,72,73,74,76,77,78,80,81,83,84,85,87,88,89,91,92,94,95,97,98,100,101,102,104,105,107,108,110,111,113,114,116,117,119,120,121,123,124,126,127,129,130,132,133,135,136,138,139,141,142,144,145,147,148,150,151,153,154,156,157,159,160,162,163,164,166,167,169,170,172,173,174,176,177,179,180,181,183,184,185,187,188,189,191,192,193,195,196,197,199,200,201,202,204,205,206,207,209,210,211,212,213,214,215,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,234,235,236,237,238,239,239,240,241,242,242,243,244,244,245,245,246,246,247,247,248,248,249,249,250,250,250,251,251,251,252,252,252,252,253,253,253,253,254,254,254,254,254,255,255,255]},"Bright tea party":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[0,1,3,4,5,7,8,9,11,12,13,15,16,17,19,20,21,22,24,25,26,28,29,30,31,33,34,35,37,38,39,40,41,43,44,45,46,48,49,50,51,52,53,55,56,57,58,59,60,61,62,63,65,66,67,68,69,70,71,72,72,73,74,74,75,76,76,77,77,78,78,79,79,80,80,81,81,82,82,83,83,84,85,85,86,87,88,89,90,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,255],g:[0,1,2,2,3,4,5,6,7,7,8,9,10,11,12,12,13,14,15,16,17,17,18,19,20,21,22,23,23,24,25,26,27,28,29,30,30,31,32,33,34,35,36,37,38,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,72,73,74,75,77,78,79,80,82,83,84,85,87,88,89,90,92,93,94,96,97,98,100,101,103,104,105,107,108,109,111,112,114,116,117,119,121,122,124,126,127,129,131,132,134,136,138,139,141,143,145,146,148,150,151,153,155,156,158,159,161,162,164,165,167,168,169,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,189,190,191,192,193,194,195,196,196,197,198,199,200,201,201,202,203,204,205,205,206,207,208,209,209,210,211,212,213,213,214,215,216,216,217,218,218,219,220,221,221,222,223,224,224,225,226,226,227,228,228,229,230,230,231,232,232,233,234,234,235,236,236,237,238,238,239,240,240,241,242,242,243,244,244,245,246,246,247,248,248,249,249,250,251,251,252,253,253,254,255,255],b:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},Bronze:{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[1,2,2,3,3,4,4,5,5,6,6,7,8,8,9,9,10,10,11,12,12,13,14,14,15,16,16,17,18,18,19,20,21,22,22,23,24,25,26,27,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,59,60,61,62,63,64,66,67,68,69,70,71,73,74,75,76,77,79,80,81,82,83,85,86,87,88,89,91,92,93,94,95,97,98,99,100,101,103,104,105,106,108,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,138,139,140,142,143,145,146,147,149,150,151,152,154,155,156,157,159,160,161,162,163,164,165,166,167,168,169,170,170,171,172,173,174,174,175,176,177,177,178,179,179,180,180,181,181,182,182,183,183,184,184,185,185,185,186,186,186,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186],g:[1,2,2,3,3,4,4,5,5,6,6,7,8,8,9,9,10,10,11,12,12,13,14,14,15,16,16,17,18,18,19,20,21,22,22,23,24,25,26,27,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,59,60,61,62,63,64,66,67,68,69,70,71,73,74,75,76,77,79,80,81,82,83,85,86,87,88,89,91,92,93,94,95,97,98,99,100,101,103,104,105,106,108,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,128,130,131,132,133,135,136,137,139,140,141,142,144,145,146,147,149,150,151,153,154,155,156,157,159,160,161,162,164,165,166,167,168,170,171,172,173,174,175,177,178,179,180,181,182,183,185,186,187,188,189,190,191,192,193,195,196,197,198,199,200,201,202,203,204,205,206,207,209,210,211,212,213,214,215,216,217,218,220,221,222,223,224,225,226,226,227,228,229,230,230,231,232,232,233,234,234,234,235,235,235,236,236,236,236,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,236,236,236,236,236],b:[115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,115,115,115,115,115,115,115,116,116,116,116,116,116,117,117,117,117,117,118,118,118,119,119,119,120,120,120,121,121,122,123,123,124,124,125,126,127,128,129,130,131,132,133,134,135,136,138,139,140,142,143,144,146,147,149,150,151,153,154,156,157,158,160,161,162,164,165,166,167,168,170,171,172,173,174,175,177,178,179,180,181,182,183,185,186,187,188,189,190,191,192,193,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,230,231,232,233,234,235,235,236,237,238,238,239,240,241,241,242,243,243,244,245,246,246,247,247,248,249,249,250,251,251,252,253,253,254,254,255]},"Classic HDR":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[14,14,14,13,13,13,13,13,13,13,12,12,12,12,12,12,12,12,13,13,13,13,13,14,14,14,15,15,16,17,17,18,19,20,21,22,23,24,25,26,28,29,30,32,33,35,36,38,39,41,42,44,46,47,49,50,52,53,55,56,58,59,61,62,63,65,66,67,69,70,71,73,74,75,77,78,79,81,82,83,85,86,87,89,90,91,93,94,95,96,98,99,100,102,103,104,105,106,108,109,110,111,113,114,115,116,117,118,120,121,122,123,124,125,127,128,129,130,131,132,133,134,136,137,138,139,140,141,142,143,144,145,146,147,148,149,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,166,167,168,169,170,171,172,173,174,175,176,177,177,178,179,180,181,182,183,183,184,185,186,187,187,188,189,190,191,191,192,193,194,194,195,196,197,197,198,199,200,200,201,202,203,203,204,205,206,206,207,208,208,209,210,210,211,212,212,213,214,214,215,216,216,217,218,218,219,220,220,221,222,222,223,224,224,225,226,226,227,228,228,229,230,230,231,232,232,233,234,234,235,236,236,237,237,238,239,239,240,241,241,242],g:[2,2,2,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,3,4,5,5,6,7,8,9,10,11,12,13,15,16,18,19,21,22,24,25,27,29,30,32,34,35,37,39,40,42,44,45,47,48,50,52,53,54,56,57,59,60,62,63,65,66,68,69,71,72,74,75,77,78,79,81,82,84,85,87,88,89,91,92,94,95,96,98,99,100,102,103,104,106,107,108,109,111,112,113,114,115,117,118,119,120,122,123,124,125,126,127,129,130,131,132,133,134,136,137,138,139,140,142,143,144,145,146,147,149,150,151,152,153,154,155,157,158,159,160,161,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,186,187,188,189,190,191,192,193,194,194,195,196,197,198,199,200,200,201,202,203,204,205,206,206,207,208,209,210,211,211,212,213,214,215,215,216,217,218,219,219,220,221,222,223,223,224,225,226,227,227,228,229,230,231,231,232,233,234,235,235,236,237,238,238,239,240,241,242,242,243,244,245,245,246,247,248,249,249,250,251,252,252,253,254],b:[66,66,66,67,67,67,67,67,68,68,68,68,69,69,69,69,70,70,70,71,71,71,71,72,72,73,73,73,74,74,75,75,75,76,76,77,78,78,79,79,80,80,81,82,82,83,84,84,85,86,86,87,88,88,89,90,90,91,92,92,93,94,94,95,96,96,97,98,98,99,99,100,101,101,102,103,103,104,104,105,106,106,107,108,108,109,110,110,111,111,112,113,113,114,114,115,116,116,117,117,118,118,119,120,120,121,121,122,122,123,124,124,125,125,126,126,127,127,128,129,129,130,130,131,131,132,132,133,134,134,135,135,136,136,137,138,138,139,139,140,140,141,142,142,143,143,144,144,145,146,146,147,147,148,148,149,149,150,150,151,152,152,153,153,154,154,155,155,156,156,157,157,158,158,159,159,160,160,161,161,162,162,163,163,164,164,165,165,166,166,167,167,168,168,169,169,170,170,171,171,172,172,173,173,174,174,175,175,176,176,177,177,178,178,179,179,180,180,181,181,182,182,183,183,183,184,184,185,185,186,186,187,187,188,188,189,189,190,190,191,191,192,192,192,193,193,194,194,195,195,196,196,197,197,198,198]},"Cross process":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,3,3,3,4,4,5,5,6,6,7,7,8,8,9,10,10,11,12,13,14,15,16,16,18,19,20,21,22,23,24,26,27,28,29,31,32,33,34,36,37,38,39,41,42,43,45,46,47,49,50,51,53,54,55,57,58,59,61,62,63,65,66,68,69,70,72,73,75,76,77,79,80,82,83,84,86,87,89,90,92,93,95,96,98,99,100,102,103,105,106,108,109,111,112,114,115,117,118,120,122,123,125,126,128,129,131,132,134,135,137,138,140,142,143,145,146,148,149,151,153,154,156,157,159,160,162,164,165,167,168,170,172,173,175,176,178,180,181,183,185,186,188,189,191,193,194,196,197,199,201,202,204,206,207,209,211,212,214,215,217,219,220,222,224,225,227,229,230,232,234,235,237,239,240,242,243,245,247,248,250,252,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],g:[0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,11,11,12,12,13,14,14,15,15,16,17,17,18,19,19,20,21,22,22,23,24,25,26,27,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,52,54,55,56,57,58,59,61,62,63,64,65,67,68,69,70,71,73,74,75,76,78,79,80,81,82,84,85,86,87,89,90,91,93,94,95,96,98,99,100,101,103,104,105,107,108,109,110,112,113,114,116,117,118,120,121,122,123,125,126,127,129,130,131,133,134,135,136,138,139,140,142,143,144,146,147,148,149,151,152,153,155,156,157,158,160,161,162,164,165,166,167,169,170,171,173,174,175,176,178,179,180,181,183,184,185,186,188,189,190,191,192,194,195,196,197,198,200,201,202,203,204,206,207,208,209,210,211,213,214,215,216,217,218,219,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,235,236,237,238,239,239,240,241,241,242,243,243,244,244,245,245,246,246,247,247,248,248,249,249,250,250,251,251,251,252,252,253,253,253,254,254,255,255],b:[20,21,22,23,23,24,25,26,27,28,28,29,30,31,32,33,33,34,35,36,37,38,39,39,40,41,42,43,44,44,45,46,47,48,49,50,50,51,52,53,54,55,55,56,57,58,59,60,60,61,62,63,64,65,66,66,67,68,69,70,71,71,72,73,74,75,76,76,77,78,79,80,81,82,82,83,84,85,86,87,87,88,89,90,91,92,93,93,94,95,96,97,98,98,99,100,101,102,103,103,104,105,106,107,108,109,109,110,111,112,113,114,114,115,116,117,118,119,119,120,121,122,123,124,125,125,126,127,128,129,130,130,131,132,133,134,135,136,136,137,138,139,140,141,141,142,143,144,145,146,146,147,148,149,150,151,152,152,153,154,155,156,157,157,158,159,160,161,162,162,163,164,165,166,167,168,168,169,170,171,172,173,173,174,175,176,177,178,179,179,180,181,182,183,184,184,185,186,187,188,189,189,190,191,192,193,194,195,195,196,197,198,199,200,200,201,202,203,204,205,205,206,207,208,209,210,211,211,212,213,214,215,216,216,217,218,219,220,221,222,222,223,224,225,226,227,227,228,229,230,231,232,232,233,234,235]},"Gothic style":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,14,14,15,15,16,17,18,18,19,20,21,21,22,23,24,25,26,26,27,28,29,30,31,32,33,34,35,36,37,38,39,41,42,43,44,45,46,47,49,50,51,52,53,55,56,57,59,60,61,63,64,66,67,68,70,71,73,74,76,77,79,80,82,83,85,86,88,89,91,92,94,95,97,99,100,102,103,105,106,108,110,111,113,114,116,118,119,121,123,124,126,128,129,131,133,134,136,138,139,141,143,144,146,147,149,151,152,154,156,157,159,160,162,164,165,167,169,170,172,174,175,177,179,180,182,183,185,187,188,190,191,193,194,196,197,199,200,201,203,204,206,207,208,210,211,212,214,215,216,217,219,220,221,222,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,240,241,242,243,243,244,245,245,246,246,247,247,248,248,249,249,250,250,251,251,252,252,252,253,253,254,254,254,255,255],g:[1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,4,4,4,4,5,5,6,6,6,7,7,8,8,9,9,10,11,11,12,13,14,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,46,47,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,72,73,74,76,77,78,80,81,82,84,85,87,88,89,91,92,94,95,97,98,100,101,103,104,106,107,109,110,112,113,115,116,118,119,121,122,124,125,127,128,129,131,132,134,135,137,138,140,141,143,144,146,147,148,150,151,153,154,156,157,159,160,161,163,164,166,167,168,170,171,173,174,175,177,178,179,181,182,184,185,186,188,189,190,192,193,194,196,197,198,200,201,202,203,205,206,207,208,209,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,233,234,235,236,237,237,238,239,240,240,241,242,242,243,244,244,245,245,246,246,247,247,248,248,249,249,249,250,250,251,251,251,251,252,252,252,253,253,253,253,254,254,254,254,255,255],b:[1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,2,3,3,3,3,4,4,4,5,5,5,6,6,6,7,7,8,8,8,9,9,10,10,11,11,12,13,13,14,14,15,16,16,17,18,18,19,20,21,22,22,23,24,25,26,27,27,28,29,30,31,32,33,34,35,36,37,38,40,41,42,43,44,45,46,48,49,50,51,53,54,55,57,58,59,61,62,64,65,66,68,69,71,72,74,75,77,78,80,81,83,84,86,87,89,91,92,94,95,97,98,100,102,103,105,107,108,110,112,113,115,117,118,120,122,123,125,127,128,130,132,134,135,137,139,140,142,144,145,147,149,151,152,154,156,157,159,161,163,165,166,168,170,171,173,175,177,178,180,182,183,185,187,188,190,191,193,195,196,197,199,200,202,203,205,206,208,209,211,212,213,215,216,217,219,220,221,223,224,225,226,228,229,230,231,232,233,234,235,236,237,238,239,240,240,241,242,243,243,244,245,245,246,247,247,248,248,249,249,250,250,251,251,251,252,252,253,253,253,254,254,255,255]},"Life sketch":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[19,19,19,19,20,20,20,20,20,20,20,21,21,21,21,21,22,22,22,22,23,23,23,24,24,24,25,25,26,26,26,27,28,28,29,29,30,31,31,32,33,33,34,35,36,36,37,38,39,40,41,41,42,43,44,45,46,47,47,48,49,50,51,52,53,54,55,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,151,152,153,154,155,156,157,158,159,160,161,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,180,181,182,183,184,185,186,187,188,189,190,192,193,194,195,196,197,198,199,200,201,203,204,205,206,207,208,209,210,211,213,214,215,216,217,218,219,220,221,223,224,225,226,227,228,229,230,232,233,234,235,236,237,238,239,240,242,243,244,245,246,247,248,249,251,252,253,254],g:[18,18,18,18,19,19,19,19,19,19,19,20,20,20,20,20,21,21,21,21,22,22,22,23,23,23,24,24,25,25,26,26,27,27,28,29,29,30,31,31,32,33,34,35,35,36,37,38,39,40,41,41,42,43,44,45,46,47,48,49,50,51,52,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,132,133,134,135,136,137,138,139,140,141,142,143,144,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,183,184,185,186,187,188,189,190,191,192,193,194,195,196,198,199,200,201,202,203,204,205,206,207,208,209,211,212,213,214,215,216,217,218,219,220,221,222,224,225,226,227,228,229,230,231,232,233,234,235,237,238,239,240,241,242,243,244,245,246,247,249,250,251,252,253,254],b:[16,16,17,17,17,17,18,18,18,18,19,19,19,20,20,20,21,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,29,29,30,31,32,32,33,34,35,36,37,38,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,92,93,94,95,96,97,98,99,100,101,102,103,105,106,107,108,109,110,111,112,113,114,115,116,118,119,120,121,122,123,124,125,126,127,128,129,131,132,133,134,135,136,137,138,139,140,141,143,144,145,146,147,148,149,150,151,152,153,154,155,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,247,248,249,250,251,252,253,254]},"Old photo":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[8,8,9,9,9,10,10,11,11,12,12,13,13,13,14,14,15,15,16,16,17,18,18,19,19,20,21,21,22,23,23,24,25,26,26,27,28,29,29,30,31,32,33,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,51,52,54,55,56,58,59,61,62,64,66,67,69,71,72,74,76,78,80,82,84,85,87,89,91,93,95,97,99,101,103,106,108,110,112,114,116,118,121,123,125,128,130,133,135,138,141,143,146,149,151,154,156,159,162,164,167,169,172,174,176,178,180,183,185,186,188,190,191,193,194,196,197,198,199,201,202,203,204,205,205,206,207,208,208,209,210,211,211,212,212,213,214,214,215,215,216,217,217,218,219,219,220,220,221,221,222,222,223,223,224,224,225,225,226,226,226,227,227,228,228,228,229,229,229,230,230,230,231,231,232,232,232,233,233,233,234,234,234,235,235,235,236,236,236,237,237,237,238,238,238,239,239,239,239,240,240,240,241,241,241,241,242,242,242,242,243,243,243,243,244,244,244,244,245,245,245,245,245,246,246,246,246,246,247,247,247,247,247,248,248,248,248,248,249,249],g:[28,29,29,29,30,30,31,31,31,32,32,33,33,33,34,34,35,35,36,36,37,37,38,39,39,40,40,41,42,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,75,76,77,78,79,80,82,83,84,85,87,88,89,91,92,93,94,96,97,98,100,101,102,104,105,106,108,109,110,112,113,114,116,117,118,119,121,122,123,124,126,127,128,129,131,132,133,134,136,137,138,139,141,142,143,144,145,147,148,149,150,151,152,154,155,156,157,158,159,160,161,162,163,164,165,167,168,169,170,171,172,173,174,175,176,177,178,178,179,180,181,182,183,184,185,185,186,187,188,189,189,190,191,191,192,193,193,194,194,195,196,196,197,197,198,198,199,199,200,200,201,201,202,202,203,203,204,204,205,205,206,206,207,208,208,209,209,210,211,211,212,212,213,214,214,215,215,216,216,217,217,218,219,219,220,220,221,221,221,222,222,223,223,223,224,224,224,224,225,225,225,225,226,226,226,226,226,226,226,227,227,227,227,227,227,227,227,227,227,227,227,228,228,228,228],b:[28,29,29,29,30,30,31,31,31,32,32,33,33,33,34,34,35,35,36,36,37,37,38,39,39,40,40,41,42,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,75,76,77,78,79,80,82,83,84,85,87,88,89,91,92,93,94,96,97,98,100,101,102,104,105,106,108,109,110,112,113,114,116,117,118,119,121,122,123,124,126,127,128,129,131,132,133,134,136,137,138,139,141,142,143,144,145,147,148,149,150,151,152,154,155,156,157,158,159,160,161,162,163,164,165,167,168,169,170,171,172,173,174,175,176,177,178,178,179,180,181,182,183,184,185,185,186,187,188,189,189,190,191,191,192,193,193,194,194,195,196,196,197,197,198,198,199,199,200,200,201,201,202,202,203,203,204,204,205,205,206,206,207,208,208,209,209,210,211,211,212,212,213,214,214,215,215,216,216,217,217,218,219,219,220,220,221,221,221,222,222,223,223,223,224,224,224,224,225,225,225,225,226,226,226,226,226,226,226,227,227,227,227,227,227,227,227,227,227,227,227,228,228,228,228]},"Pink/blue gradient":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[0,0,0,1,1,1,1,1,1,2,2,2,2,2,3,3,3,3,4,4,4,5,5,6,6,6,7,8,8,9,9,10,11,11,12,13,14,14,15,16,17,18,19,20,21,22,23,24,25,26,27,29,30,31,32,33,34,35,36,37,38,39,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,70,71,72,73,74,75,76,77,78,80,81,82,83,84,85,86,87,88,90,91,92,93,94,95,96,97,99,100,101,102,103,104,106,107,108,109,111,112,113,114,115,117,118,119,121,122,123,125,126,127,129,130,131,133,134,135,137,138,140,141,142,144,145,146,148,149,151,152,153,155,156,158,159,160,162,163,165,166,168,169,170,172,173,175,176,178,179,181,182,184,185,186,188,189,191,192,193,195,196,198,199,200,202,203,204,206,207,208,209,211,212,213,215,216,217,219,220,221,222,224,225,226,227,228,230,231,232,233,234,235,236,237,238,239,240,240,241,242,243,243,244,245,245,246,246,247,248,248,249,249,249,250,250,251,251,251,252,252,252,253,253,253,254,254,254,255,255],g:[0,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,5,5,5,6,6,7,7,7,8,8,9,10,10,11,11,12,13,13,14,15,16,17,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,65,66,67,68,69,70,72,73,74,75,77,78,79,80,82,83,84,86,87,89,90,91,93,94,96,97,99,100,101,103,104,106,107,109,110,112,113,115,116,118,119,121,122,123,125,126,128,129,131,132,134,135,137,138,140,141,143,144,146,147,149,151,152,154,155,156,158,159,161,162,164,165,167,168,169,171,172,174,175,176,178,179,181,182,183,185,186,187,189,190,191,193,194,195,197,198,199,200,202,203,204,205,207,208,209,210,211,212,214,215,216,217,218,219,220,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,240,241,242,243,243,244,245,245,246,246,247,247,248,248,249,249,250,250,250,251,251,251,252,252,252,253,253,253,253,254,254,254,254,254,255,255,255],b:[66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,65,65,65,65,65,65,65,65,65,65,65,66,66,66,66,66,66,67,67,67,68,68,68,69,69,70,70,71,71,71,72,72,73,74,74,75,75,76,77,77,78,78,79,80,81,81,82,83,83,84,85,86,87,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,123,124,125,126,127,128,129,130,131,132,133,135,136,137,138,139,140,142,143,144,145,146,148,149,150,152,153,154,156,157,159,160,162,163,165,166,168,169,171,172,174,175,177,178,180,182,183,185,186,188,189,191,192,194,195,197,198,199,201,202,204,205,207,208,209,211,212,214,215,217,218,219,221,222,223,225,226,227,229,230,231,232,233,235,236,237,238,239,240,240,241,242,243,244,244,245,246,246,247,247,248,248,249,249,250,250,251,251,251,252,252,252,253,253,253,254,254,254,254,255,255]},Retro:{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[3,3,3,4,4,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,8,8,8,9,9,10,10,11,11,12,12,13,13,14,15,15,16,17,18,19,19,20,21,22,23,24,25,26,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,50,51,52,53,54,55,57,58,59,60,62,63,64,65,67,68,69,70,72,73,74,76,77,78,80,81,82,83,85,86,88,89,90,92,93,94,96,97,99,100,101,103,104,106,107,109,110,111,113,114,116,117,119,120,121,123,124,126,127,129,130,131,133,134,136,137,139,140,142,143,144,146,147,149,150,152,153,154,156,157,159,160,162,163,164,166,167,168,170,171,172,174,175,177,178,179,181,182,183,185,186,187,189,190,191,192,194,195,196,198,199,200,201,202,204,205,206,207,208,209,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,229,230,231,232,233,234,235,235,236,237,238,238,239,240,240,241,241,242,243,243,244,244,245,245,245,246,246,247,247,247,248,248,248,249,249,249,250,250,250,250,251,251,251,251,252,252,252],g:[11,11,12,12,12,12,12,13,13,13,13,13,14,14,14,14,15,15,15,16,16,16,17,17,17,18,18,19,19,20,20,21,21,22,22,23,24,24,25,26,26,27,28,29,29,30,31,32,33,33,34,35,36,37,38,39,40,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,56,57,58,59,60,61,63,64,65,66,67,69,70,71,72,74,75,76,77,79,80,81,82,83,85,86,87,89,90,91,92,94,95,96,98,99,100,102,103,104,106,107,108,110,111,112,114,115,117,118,119,121,122,123,125,126,127,129,130,131,133,134,135,137,138,139,141,142,143,145,146,147,149,150,151,152,154,155,156,158,159,160,162,163,164,165,167,168,169,171,172,173,174,176,177,178,180,181,182,183,185,186,187,188,190,191,192,193,195,196,197,198,199,200,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,219,220,221,222,223,224,224,225,226,227,228,228,229,230,230,231,232,232,233,233,234,235,235,236,236,237,237,237,238,238,239,239,239,240,240,240,240,241,241,241,242,242,242,242,242,243,243,243,243,243,244,244],b:[63,63,63,63,64,64,64,64,64,64,64,64,64,65,65,65,65,65,65,66,66,66,66,66,67,67,67,67,68,68,68,68,69,69,69,70,70,71,71,71,72,72,73,73,73,74,74,75,75,76,76,77,77,78,78,79,79,80,80,81,81,82,82,83,83,84,85,85,86,86,87,88,88,89,89,90,91,91,92,93,93,94,95,95,96,97,97,98,99,99,100,101,101,102,103,103,104,105,105,106,107,108,108,109,110,110,111,112,113,113,114,115,116,116,117,118,119,119,120,121,122,122,123,124,125,125,126,127,128,128,129,130,131,131,132,133,134,134,135,136,136,137,138,139,139,140,141,142,142,143,144,144,145,146,147,147,148,149,149,150,151,152,152,153,154,154,155,156,157,157,158,159,160,160,161,162,162,163,164,165,165,166,167,167,168,169,169,170,170,171,172,172,173,173,174,174,175,175,176,177,177,178,178,179,179,179,180,180,181,181,182,182,183,183,183,184,184,185,185,185,186,186,186,187,187,187,187,188,188,188,188,189,189,189,189,189,190,190,190,190,190,190,190,191,191,191,191,191,191,191,191,191,192,192,192,192]},"Strong contrast":{a:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],r:[1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,7,7,7,8,8,8,9,9,10,10,10,11,11,12,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,23,23,24,25,25,26,27,28,29,29,30,31,32,32,33,34,35,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,51,52,54,55,57,58,60,62,64,66,68,70,72,74,77,79,81,84,86,89,92,94,97,100,102,105,108,110,113,115,118,121,123,126,128,130,133,135,137,139,141,143,145,148,150,152,154,156,158,160,162,164,166,168,170,172,174,175,177,179,181,183,184,186,187,189,190,192,193,195,196,197,198,200,201,202,203,204,204,205,206,207,207,208,209,209,210,211,211,212,212,213,213,214,214,215,216,216,217,217,218,218,219,220,220,221,221,222,223,223,224,224,225,226,226,227,227,228,228,229,229,230,230,231,232,232,233,233,234,234,235,235,236,236,237,238,238,239,239,240,240,241,242,242,243,243,244,244,245,245,246,247,247,248,248,249,249,250,251,251,252,252,253,253,254,254,255],g:[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,4,4,4,4,5,5,5,6,6,7,7,7,8,8,9,9,10,11,11,12,12,13,14,14,15,16,16,17,18,18,19,20,21,22,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,39,40,41,42,43,45,46,47,48,50,51,52,54,55,57,58,60,61,63,64,66,68,69,71,73,75,77,79,81,83,85,88,90,92,95,97,99,102,104,107,109,112,114,117,119,122,124,127,129,132,134,136,139,141,143,145,147,149,151,153,155,157,158,160,162,164,166,167,169,171,173,174,176,177,179,181,182,184,185,187,188,190,191,192,194,195,196,198,199,200,201,203,204,205,206,207,208,209,210,211,212,213,214,214,215,216,217,218,218,219,220,221,221,222,223,224,224,225,226,226,227,228,228,229,230,230,231,231,232,232,233,234,234,235,235,236,236,236,237,237,238,238,239,239,240,240,240,241,241,242,242,243,243,243,244,244,245,245,246,246,246,247,247,247,248,248,249,249,249,250,250,250,251,251,252,252,252,253,253,253,254,254,254,255,255],b:[1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,8,8,8,9,9,10,10,11,11,11,12,12,13,14,14,15,15,16,16,17,17,18,18,19,19,20,21,21,22,22,23,24,24,25,26,26,27,28,29,30,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,48,49,50,51,53,54,55,57,58,59,61,62,64,65,67,68,70,72,73,75,77,79,81,82,85,87,89,91,93,95,98,100,102,105,107,109,112,114,116,119,121,123,126,128,130,133,135,137,139,141,143,145,147,149,151,153,154,156,158,160,162,163,165,167,169,170,172,174,175,177,179,180,182,183,185,186,188,189,191,192,193,194,196,197,198,199,200,202,203,204,205,206,206,207,208,209,210,211,211,212,213,214,214,215,216,216,217,218,218,219,220,220,221,222,222,223,224,224,225,226,226,227,227,228,228,229,230,230,231,231,232,232,233,233,234,234,235,235,236,236,237,237,238,238,239,239,240,240,240,241,241,242,242,243,243,244,244,245,245,246,246,247,247,248,248,249,249,250,250,250,251,251,252,252,253,253,254,254,255,255]}}},D1.get_filter_names=function(){var e=D1._get_filters();return Object.entries(e).map(function(e){var _=E1(e,2),e=_[0];return _[1],e})},D1._dutone_pixels=function(n,a,r,e,_){return e=[].concat(S1(e)),_=(_=[].concat(S1(_))).map(function(e){var _=D1._get_rgba_from_hex(e),t=E1(_,4),o=t[0],e=t[1],_=t[2],_=(t[3],D1.rgb_to_hsl(o,e,_)),_=E1(_,3),_=(_[0],_[1],_[2]);return D1._blend_colors(a,r,_/100/n,!1)}),D1._remove_duplicate_pxl_colors(e,_)},D1._filter_pixels=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,_=arguments[2],o=arguments[3],n=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],_=[].concat(S1(_)),o=[].concat(S1(o)),a=D1._get_filters(),r=a[e]||a[1997],i=[].concat(S1(o));return 0!==t&&(o=(o=(o=o.map(function(e,_){var t=D1._get_rgba_from_hex(e),o=E1(t,4),n=o[0],e=o[1],t=o[2],o=o[3];return"#"+D1._get_hex_value_from_rgb_value(r.r[n])+D1._get_hex_value_from_rgb_value(r.g[e])+D1._get_hex_value_from_rgb_value(r.b[t])+D1._get_hex_value_from_rgb_value(o)})).map(function(e){var _=D1._get_rgba_from_hex(e),t=E1(_,4),o=t[0],e=t[1],_=t[2],t=t[3];return"#"+D1._get_hex_value_from_rgb_value(r.a[o])+D1._get_hex_value_from_rgb_value(r.a[e])+D1._get_hex_value_from_rgb_value(r.a[_])+D1._get_hex_value_from_rgb_value(t)})).map(function(e,_){return D1._blend_colors(i[_],e,t)})),n?D1._remove_duplicate_pxl_colors(_,o):[_,o]},D1._to_dutone=function(){var e=D1.state,_=e._s_pxls,t=e._s_pxl_colors,o=e._layer_index,e=D1._dutone_pixels(0<arguments.length&&void 0!==arguments[0]?arguments[0]:.8,1<arguments.length&&void 0!==arguments[1]?arguments[1]:"#ffffffff",2<arguments.length&&void 0!==arguments[2]?arguments[2]:"#000000ff",_[o],t[o]),e=E1(e,2);_[o]=e[0],t[o]=e[1],D1.setState({_s_pxls:_,_s_pxl_colors:t,_old_pxls_hovered:-1,_pxls_hovered:-1},function(){D1._update_canvas()})},D1._to_filter=function(e){var _=D1.state,t=_._s_pxls,o=_._s_pxl_colors,_=_._layer_index,e=D1._filter_pixels(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,t[_],o[_]),e=E1(e,2);t[_]=e[0],o[_]=e[1],D1.setState({_s_pxls:t,_s_pxl_colors:o,_old_pxls_hovered:-1,_pxls_hovered:-1},function(){D1._update_canvas()})},D1._to_rotation=function(){var n,a,r=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],e=D1.state,i=e.pxl_width,_=e.pxl_height,t=e._s_pxls,s=e._pxl_indexes_of_selection,l=e._select_shape_index_a,c=e._shape_index_a,p=e._base64_original_images,o=e._original_image_index,d=e._layer_index,h=D1.state,e=h._imported_image_pxls,g=h._imported_image_width,h=h._imported_image_height,u=D1.state._is_there_new_dimension,f=h,A=g,m=new Array(f*A),x=_,v=i,w=D1.state._s_pxls,b=new Set,M=l,C=c;if(e.length)e.forEach(function(e,_){var t=_%g,_=(_-t)/g;m[(r?f-1-_:_)+(r?t:A-1-t)*f]=e});else for(var u=!0,y=0;y<t.length;y++)!function(n){var a=new Array(x*v);t[n].forEach(function(e,_){var t=_%i,o=(_-t)/i,t=(r?x-1-o:o)+(r?t:v-1-t)*x;a[t]=e,n===d&&(s.has(_)&&b.add(t),l===_&&(M=t),c===_&&(C=t))}),w[n]=a}(y);void 0===p[o]||e.length?D1.setState({pxl_width:x,pxl_height:v,_s_pxls:w,_imported_image_width:f,_imported_image_height:A,_imported_image_pxls:m,_pxl_indexes_of_selection:b,_is_there_new_dimension:u,_select_shape_index_a:M,_shape_index_a:C,_last_action_timestamp:Date.now()},function(){D1._notify_size_change(),D1._request_force_update()}):(n=r?90:-90,(a=new Image).onload=function(){var e=D1._get_new_ctx_from_canvas(a.height,a.width),_=E1(e,2),e=_[0],_=_[1];e.clearRect(0,0,_.width,_.height),e.save(),e.translate(_.width/2,_.height/2),e.rotate(n*Math.PI/180),e.drawImage(a,-a.width/2,-a.height/2),e.restore();var t=a.src.includes("image/png")?_.toDataURL("image/png"):_.toDataURL("image/jpeg"),o=p.includes(t)?p:p.concat([t]);D1.setState({pxl_width:x,pxl_height:v,_s_pxls:w,_pxl_indexes_of_selection:b,_is_there_new_dimension:u,_select_shape_index_a:M,_shape_index_a:C,_base64_original_images:o,_original_image_index:-1},function(){D1.setState({_original_image_index:o.indexOf(t),_last_action_timestamp:Date.now()},function(){D1._notify_size_change(),D1._request_force_update()})})},a.src=p[o])},D1._pxl_colors_to_alpha=function(e,_,a,r){return[e=[].concat(S1(e)),_=(_=[].concat(S1(_))).map(function(e){var _=D1._match_color(a,e),t=D1._get_rgba_from_hex(e),o=E1(t,4),n=o[0],e=o[1],t=o[2],o=o[3];return o-=o*(1-_)*r,"#"+D1._get_hex_value_from_rgb_value(n)+D1._get_hex_value_from_rgb_value(e)+D1._get_hex_value_from_rgb_value(t)+D1._get_hex_value_from_rgb_value(o)})]},D1._pxl_adjust_contrast=function(t,e){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,o=255,n=0;e.forEach(function(e,_){t.includes(_)&&(_=D1._get_rgba_from_hex(e),e=((e=E1(_,4))[0]+e[1]+e[2])/3*((_=e[3])/255),0<_&&(n<e&&(n=e),e<o&&(o=e)))});var r=255/Math.max(1,n-o),i=-o*r;return e=e.map(function(e){var _=D1._get_rgba_from_hex(e),t=E1(_,4),o=t[0],n=t[1],_=t[2],t=t[3],o=o*r+i,n=n*r+i,_=_*r+i;return o=Math.min(255,Math.max(0,o)),n=Math.min(255,Math.max(0,n)),_=Math.min(255,Math.max(0,_)),D1._blend_colors(e,D1._get_hex_color_from_rgba_values(o,n,_,t),a)}),[t,e,r,i]},D1._pxl_adjust_smoothness=function(h,e){for(var _=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,t=D1.state,g=t.pxl_width,u=t.pxl_height,o=0;o<_;o++)h.forEach(function(e,_){var t=void 0,o=void 0,n=void 0,a=void 0,o=(o=_+1)%g==0?-1:o,a=(a=_-1)%g==g-1?-1:a,r=void 0,i=void 0,s=void 0,l=void 0,r=(t=(t=_-g)<0?-1:t)-1,i=t+1,s=(n=g*u<(n=_+g)?-1:n)-1;l=n+1;var l=-1===n||-1===o?-1:l,l=[h[t],h[o],h[n],h[a],h[r=-1===t||-1===a?-1:r],h[i=-1===t||-1===o?-1:i],h[s=-1===n||-1===a?-1:s],h[l]],c=[];l.forEach(function(e){c[e]=void 0===c[e]?1:c[e]+1});var p=-1,d=-1;Object.entries(c).forEach(function(e){var _=E1(e,2),e=_[0],_=_[1];d<_&&(d=_,p=e)}),6<=d&&-1!==p&&(h[_]=p)});return D1._remove_duplicate_pxl_colors(h,e)},D1.get_color_palette=function(m,x){for(var e=D1.state,v=e._layer_index,_=e.pxl_width,t=e.pxl_height,w=(e._canvas,D1.state._s_pxl_colors),b=w[v].length,M=_,C=t;256<M*C;)M*=.75,C*=.75;var M=Math.round(M),C=Math.round(C),y=new Image;y.onload=A(regeneratorRuntime.mark(function e(){var t,_,o,n,a,r,i,s,l,c,p,d,h,g,u,f,A;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=D1._get_new_ctx_from_canvas(M,C,!0),s=E1(r,1),(f=s[0]).drawImage(y,0,0,M,C),A=f.getImageData(0,0,M,C),g=D1._get_pixels_palette_and_list_from_image_data(A,!0),t=g.new_pxls,_=g.new_pxl_colors,o=255,n=0,_.forEach(function(e,_){t.includes(_)&&(_=D1._get_rgba_from_hex(e),e=((e=E1(_,4))[0]+e[1]+e[2])/3*((_=e[3])/255),0<_&&(n<e&&(n=e),e<o&&(o=e)))}),m*=1-(255-n+o)/255/2,e.next=10,D1._remove_close_pxl_colors(t,_,m);case 10:h=e.sent,(u=E1(h,2))[0],a=u[1],r=a.length,a.sort(function(e,_){var t=D1.get_rgba_from_hex(e),o=E1(t,3),n=o[0],a=o[1],e=o[2],t=D1._rgb_to_hsl(n,a,e),o=E1(t,3),n=o[0],a=o[1],e=o[2],t=D1.get_rgba_from_hex(_),o=E1(t,3),_=o[0],t=o[1],o=o[2],_=D1._rgb_to_hsl(_,t,o),t=E1(_,3),o=t[0],_=t[1],t=t[2];return 5*Math.round(n/5)+e/10+a/100<5*Math.round(o/5)+t/10+_/100}),i=a[0],a.forEach(function(e){var _=D1.get_rgba_from_hex(e),t=E1(_,3),o=t[0],_=t[1],t=t[2],_=D1._rgb_to_hsl(o,_,t),t=E1(_,3),_=(t[0],t[1]);t[2],50<=_&&(i=e)}),a=[].concat(S1(a)).map(function(t){var o=1,n=t;return w[v].forEach(function(e){var _=D1._match_color(e,t,null);_<o&&(o=_,n=e)}),n}),s=a.map(function(_){var t=1,o=0;return a.forEach(function(e){e=D1._match_color(_,e,null);o<e&&(o=e),e<t&&0!==e&&(t=e)}),{color:_,lowest_threshold:t,highest_threshold:o}}),l=1,c=0,s.forEach(function(e,_){e.lowest_threshold<l&&(l=e.lowest_threshold),e.highest_threshold>c&&(c=e.highest_threshold)}),s=s.map(function(e){var _=e.highest_threshold/e.lowest_threshold;return e.threshold=e.lowest_threshold*(e.highest_threshold/c)/2+e.highest_threshold*(e.lowest_threshold/l)/2/_,e}),p=a[0],d=a[0],a.forEach(function(e){var _=D1._get_rgba_from_hex(p),t=E1(_,4),o=t[0],n=t[1],a=t[2],r=(t[3],D1._get_rgba_from_hex(d)),i=E1(r,4),s=i[0],l=i[1],c=i[2],_=(i[3],D1._get_rgba_from_hex(e)),t=E1(_,4),r=t[0],i=t[1],_=t[2],t=t[3];r+i+_<s+l+c&&250<t&&(d=e),o+n+a<r+i+_&&250<t&&(p=e)}),f=D1._blend_colors(d,"#000000ff",.33),A=D1._rgb_to_hsl.apply(D1,S1(D1._get_rgba_from_hex(f))),g=D1._hsl_to_rgb(A[0],Math.min(40,Math.round(.5*A[1])),Math.max(10,Math.min(0,Math.round(.5*A[2])))),h=D1._get_hex_color_from_rgba_values(g[0],g[1],g[2],96),h=D1._filter_pixels(".Gingham",1,[],[h],!1)[1][0],u=D1._blend_colors(d,"#ffffffff",.66),f=D1._rgb_to_hsl.apply(D1,S1(D1._get_rgba_from_hex(u))),A=D1._hsl_to_rgb((f[0]+180+360)%360,40,55),g=D1._get_hex_color_from_rgba_values(A[0],A[1],A[2],128),g=D1._filter_pixels("Strong contrast",1,[],[g],!1)[1][0],[].concat(S1(D1.state._s_pxls[0])),(u=[])[0]=D1._get_pixels_palette_and_list_from_rectangle(t,0,M*Math.floor(C/2)+Math.floor(M/2))[2],u[1]=D1._get_pixels_palette_and_list_from_rectangle(t,M*Math.floor(C/2)+Math.floor(M/2),M)[2],u[2]=D1._get_pixels_palette_and_list_from_rectangle(t,M*Math.floor(C/2)+Math.floor(M/2),M*C-M)[2],u[3]=D1._get_pixels_palette_and_list_from_rectangle(t,M*Math.floor(C/2)+Math.floor(M/2),M*C)[2],f=function(e){e=D1._get_rgba_from_hex(e),e=D1._rgb_to_hsl.apply(D1,S1(e)),e=D1._hsl_to_rgb(e[0],60,20),e=D1._get_hex_color_from_rgba_values(e[0],e[1],e[2],36),e=D1._filter_pixels("Old photo",1,[],[e],!1)[1][0];return D1._filter_pixels("Bronze",1,[],[e],!1)[1][0]},(A=[])[0]=D1._get_average_color_of_selection(u[0],t,_),A[1]=D1._get_average_color_of_selection(u[1],t,_),A[2]=D1._get_average_color_of_selection(u[2],t,_),A[3]=D1._get_average_color_of_selection(u[3],t,_),A=[].concat(S1(A)).map(f),x({colors_with_threshold:s,colors_removed:b-r,colors_remaining:r,colors:a,darkest_color:d,brightest_color:p,brightest_color_with_half_saturation:i,inverse_brightest_color_with_half_saturation:D1._invert_hex_color(i),background_color:h,foreground_color:g,average_color_zones:A});case 51:case"end":return e.stop()}},e,P)})),D1.get_base64_png_data_url(1,function(e){y.src=e})},D1._remove_close_pxl_colors=(_=A(regeneratorRuntime.mark(function e(){var d,_,h=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],u=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,f=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:8,A=5<arguments.length&&void 0!==arguments[5]?arguments[5]:null;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=D1.state.bucket_threshold,_=new Function('return function(\n pxls,\n pxl_colors,\n bucket_threshold,\n threshold_steps,\n color_number_bonus,\n best_color_number,\n this_state_bucket_threshold \n ) {\n\n function this_rgb_to_hsl(r, g, b) {\n\n r /= 255, g /= 255, b /= 255;\n let max = Math.max(r, g, b), min = Math.min(r, g, b);\n let h, s, l = (max + min) / 2;\n\n if(max == min){\n h = s = 0; // achromatic\n }else{\n let d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch(max){\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n h /= 6;\n }\n\n return new Array(Math.round(h * 360), Math.round(s * 100), Math.round(l * 100));\n }\n\n function this_hsl_to_rgb(h, s, l) {\n\n h /= 360;\n s /= 100;\n l /= 100;\n\n let r, g, b;\n if (s === 0) {\n r = g = b = l;\n } else {\n function hue_to_rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n r = hue_to_rgb(p, q, h + 1 / 3);\n g = hue_to_rgb(p, q, h);\n b = hue_to_rgb(p, q, h - 1 / 3);\n }\n\n return new Array(r * 255, g * 255, b * 255);\n }\n\n function this_get_hex_values_from_rgba_values(r, g, b, a) {\n\n return new Array(\n this_get_hex_value_from_rgb_value(r),\n this_get_hex_value_from_rgb_value(g),\n this_get_hex_value_from_rgb_value(b),\n this_get_hex_value_from_rgb_value(a)\n );\n }\n\n function this_get_hex_color_from_rgba_values(r, g, b, a) {\n\n const hex = this_get_hex_values_from_rgba_values(r, g, b, a);\n return "#" + hex[0] + hex[1] + hex[2] + hex[3];\n }\n\n function this_get_rgba_from_hex(color) {\n\n color = color || "#00000000";\n\n const r = parseInt(color.substring(1, 3), 16);\n const g = parseInt(color.substring(3, 5), 16);\n const b = parseInt(color.substring(5, 7), 16);\n const a = parseInt(color.substring(7, 9), 16);\n\n return new Array(r, g, b, a);\n }\n\n function this_reduce_color(rgba_component, color_gain ) {\n\n if(color_gain === 1) {\n\n return rgba_component;\n }else {\n\n rgba_component++;\n let comp_by_gain = Math.round(rgba_component * color_gain) - 1;\n comp_by_gain = comp_by_gain < 0 ? 0: comp_by_gain;\n\n return Math.round(comp_by_gain / color_gain);\n }\n }\n\n function this_get_hex_value_from_rgb_value(value) {\n\n return Math.round(value).toString(16).padStart(2, "0");\n }\n\n function this_format_color(color) {\n\n color = typeof color === "undefined" ? "#00000000": color;\n // if color equals #fff -> #ffffff\n color = color.length === 4 ? "#" + color.charAt(1) + color.charAt(1) + color.charAt(2) + color.charAt(2) + color.charAt(3) + color.charAt(3): color;\n // if color equals #3333 -> #33333333\n color = color.length === 5 ? "#" + color.charAt(1) + color.charAt(1) + color.charAt(2) + color.charAt(2) + color.charAt(3) + color.charAt(3) + color.charAt(4) + color.charAt(4): color;\n // if color equals #000000 -> #000000ff (Alpha)\n color = color.length === 7 ? color + "ff": color;\n return color;\n }\n\n function this_match_color (color_a, color_b, threshold) {\n\n threshold = typeof threshold === "undefined" ? null: threshold;\n\n if(threshold === 1) {\n\n return true;\n }else if(threshold === 0){\n\n return color_a === color_b;\n }else {\n\n const threshold_256 = Math.round(threshold * 255);\n\n color_a = this_format_color(color_a);\n color_b = this_format_color(color_b);\n\n const c_a = this_get_rgba_from_hex(color_a);\n const c_b = this_get_rgba_from_hex(color_b);\n\n const a_diff = Math.abs(c_a[3] - c_b[3]);\n const r_diff = Math.abs(c_a[0] - c_b[0]);\n const g_diff = Math.abs(c_a[1] - c_b[1]);\n const b_diff = Math.abs(c_a[2] - c_b[2]);\n\n const a_diff_ratio = Math.abs(1 - a_diff / 255);\n\n if(threshold !== null) {\n\n return Boolean(r_diff < threshold_256 && g_diff < threshold_256 && b_diff < threshold_256 && a_diff < threshold_256);\n }else {\n\n return ((r_diff + g_diff + b_diff) / (255 * 3)) * a_diff_ratio;\n }\n }\n }\n\n function this_blend_colors (color_a, color_b, amount = 1, should_return_transparent = false, blend_alpha = true) {\n\n amount = Math.min(Math.max(amount, 0), 1);\n color_a = this_format_color(color_a);\n // If we blend the first color with the second with 0 "force", return transparent\n if(amount === 0 && color_b !== "hover" && should_return_transparent) {\n\n return "#00000000";\n }\n\n // Make sure we have a color based on the 4*2 hex char format\n\n if(color_b === "hover") {\n\n let rgba = this_get_rgba_from_hex(color_a);\n let hsl = this_rgb_to_hsl(rgba[0], rgba[1], rgba[2]);\n\n const irgb = this_hsl_to_rgb((hsl[0] + 0) % 360, (hsl[1] + 0) % 100, (hsl[2] + 50) % 100);\n color_b = this_get_hex_color_from_rgba_values(irgb[0], irgb[1], irgb[2], 255);\n }\n\n color_b = this_format_color(color_b);\n // If the second color is transparent, return transparent\n if(color_b === "#00000000" && amount === 1 && should_return_transparent) { return "#00000000"; }\n\n // Extract RGBA from both colors\n let base = this_get_rgba_from_hex(color_a);\n base[3] /= 255;\n\n let added = this_get_rgba_from_hex(color_b);\n added[3] /= 255;\n added[3] *= amount;\n\n let mix = [];\n if (base[3] !== 0 && added[3] !== 0) {\n\n mix[3] = 1 - (1 - added[3]) * (1 - base[3]); // alpha\n mix[0] = Math.round((added[0] * added[3] / mix[3]) + (base[0] * base[3] * (1 - added[3]) / mix[3])); // red\n mix[1] = Math.round((added[1] * added[3] / mix[3]) + (base[1] * base[3] * (1 - added[3]) / mix[3])); // green\n mix[2] = Math.round((added[2] * added[3] / mix[3]) + (base[2] * base[3] * (1 - added[3]) / mix[3])); // blue\n }else if(added[3] !== 0) {\n\n mix = added;\n }else {\n mix = base;\n }\n\n mix[3] *= 255;\n\n return this_get_hex_color_from_rgba_values(mix[0], mix[1], mix[2], mix[3]);\n }\n\n function this_remove_duplicate_pxl_colors(_pxls, _pxl_colors) {\n\n _pxls = Array.from(_pxls);\n _pxl_colors = Array.from(_pxl_colors);\n\n // Work with Hashtables and Typed Array so it is fast\n let new_pxl_colors_object = {};\n let new_pxl_colors_object_length = 0;\n let new_pxls = new Array(_pxls.length);\n\n Array.from(_pxls).forEach((pxl, iteration) => {\n\n const color = _pxl_colors[pxl];\n let index_of_color = typeof new_pxl_colors_object[color] === "undefined" ? null: new_pxl_colors_object[color];\n\n if(index_of_color === null) {\n\n index_of_color = new_pxl_colors_object_length;\n new_pxl_colors_object[color] = index_of_color;\n new_pxl_colors_object_length++;\n }\n\n new_pxls[iteration] = index_of_color;\n });\n\n let new_pxl_colors = new Array(new_pxl_colors_object_length);\n Object.entries(new_pxl_colors_object).forEach((entry) => {\n\n new_pxl_colors[entry[1]] = entry[0];\n })\n\n return new Array(new_pxls, new_pxl_colors);\n }\n\n let indexes_of_colors_proceed = new Set();\n let original_pxls = Array.from(pxls);\n let original_pxl_colors = Array.from(pxl_colors);\n let is_bucket_threshold_auto = bucket_threshold === "auto";\n let is_bucket_threshold_auto_goal_reached = !is_bucket_threshold_auto;\n let bucket_threshold_auto_goal_target = 6;\n let bucket_threshold_auto_goal_attempt = new Set();\n best_color_number = best_color_number !== null ? best_color_number: Math.max(Math.sqrt(original_pxl_colors.length) + color_number_bonus, 24);\n\n if(best_color_number < 2 || best_color_number > pxl_colors.length) {\n\n is_bucket_threshold_auto_goal_reached = true;\n }\n\n let attempt = 1;\n\n while (!is_bucket_threshold_auto_goal_reached || attempt === 1) {\n attempt++;\n \n bucket_threshold = is_bucket_threshold_auto ?\n 1/(bucket_threshold_auto_goal_target - 2):\n bucket_threshold || this_state_bucket_threshold;\n threshold_steps = threshold_steps || Math.round(bucket_threshold * 255);\n const color_loss = (255 - (255 / (bucket_threshold * 255))) / 255;\n\n original_pxls = Array.from(pxls);\n original_pxl_colors = Array.from(pxl_colors);\n\n let reduced_pxl_colors = Array.from(pxl_colors).map((color_hex) => {\n\n let c = this_get_rgba_from_hex(color_hex);\n \n r = c[0],\n g = c[1],\n b = c[2],\n a = c[3],\n\n r = this_reduce_color(r, 1 - color_loss);\n g = this_reduce_color(g, 1 - color_loss);\n b = this_reduce_color(b, 1 - color_loss);\n a = this_reduce_color(a, 1 - color_loss);\n\n return "#" + this_get_hex_value_from_rgb_value(r) + this_get_hex_value_from_rgb_value(g) + this_get_hex_value_from_rgb_value(b) + this_get_hex_value_from_rgb_value(a);\n\n });\n\n let new_pxls = Array.from(original_pxls);\n let new_pxl_colors = Array.from(reduced_pxl_colors);\n\n for (let i = 1; i <= threshold_steps; i += 1) {\n \n let threshold = bucket_threshold * (i / threshold_steps);\n const weight_applied_to_color_usage_difference = i / threshold_steps;\n \n indexes_of_colors_proceed.clear();\n let pxl_colors_usage = new Array(new_pxl_colors.length).fill(0);\n \n Array.from(new_pxls).forEach((pxl) => {\n \n pxl_colors_usage[pxl]++;\n });\n \n Array.from(new_pxl_colors).forEach((color_a, index_of_color_a) => {\n \n if(!indexes_of_colors_proceed.has(index_of_color_a)) {\n \n const color_a_usage = pxl_colors_usage[index_of_color_a];\n \n Array.from(new_pxl_colors).forEach((color_b, index_of_color_b) => {\n \n if(!indexes_of_colors_proceed.has(index_of_color_b)) {\n \n const color_b_usage = pxl_colors_usage[index_of_color_b];\n const color_a_more_used = color_a_usage > color_b_usage;\n \n const color_usage_difference = color_a_more_used ? color_a_usage / color_b_usage: color_b_usage / color_a_usage;\n const weighted_threshold = (threshold + (threshold * (1 - 1 / color_usage_difference) * weight_applied_to_color_usage_difference)) / (1 + weight_applied_to_color_usage_difference);\n \n if(this_match_color(color_a, color_b, weighted_threshold)) {\n \n const color = color_a_more_used ?\n this_blend_colors(original_pxl_colors[index_of_color_a], original_pxl_colors[index_of_color_b], 1 / (color_usage_difference), true):\n this_blend_colors(original_pxl_colors[index_of_color_b], original_pxl_colors[index_of_color_a], 1 / (color_usage_difference), true);\n \n original_pxl_colors[index_of_color_a] = color;\n original_pxl_colors[index_of_color_b] = color;\n indexes_of_colors_proceed.add(index_of_color_a);\n indexes_of_colors_proceed.add(index_of_color_b);\n }\n }\n });\n }\n });\n \n let r = this_remove_duplicate_pxl_colors(new_pxls, original_pxl_colors);\n new_pxls = r[0];\n new_pxl_colors = r[1];\n original_pxl_colors = Array.from(new_pxl_colors);\n }\n\n if((original_pxl_colors.length + 2 > best_color_number && original_pxl_colors.length - 2 < best_color_number) || !is_bucket_threshold_auto || bucket_threshold_auto_goal_attempt.has(bucket_threshold_auto_goal_target)) {\n\n return this_remove_duplicate_pxl_colors(new_pxls, original_pxl_colors);\n }else if(original_pxl_colors.length > best_color_number){\n\n bucket_threshold_auto_goal_attempt.add(bucket_threshold_auto_goal_target);\n bucket_threshold_auto_goal_target --;\n }else {\n\n bucket_threshold_auto_goal_attempt.add(bucket_threshold_auto_goal_target);\n bucket_threshold_auto_goal_target ++;\n }\n }\n\n return this_remove_duplicate_pxl_colors(pxls, pxl_colors);\n }')(),e.next=5,c.default.exec(_,[h,g,u,f,n,A,d]).catch(function(e){var l=new Set,a=Array.from(h),c=Array.from(g),r="auto"===u,_=!r,i=6,s=new Set;((A=null!==A?A:Math.max(Math.sqrt(c.length)+n,24))<2||A>g.length)&&(_=!0);for(var p=1,t=function(){p++,u=r?1/(i-2):u||d,f=f||Math.round(255*u);var n=(255-255/(255*u))/255;a=Array.from(h),c=Array.from(g);for(var e=Array.from(g).map(function(e){var _=D1._get_rgba_from_hex(e),t=_[0],o=_[1],e=_[2],_=_[3],t=D1._reduce_color(t,1-n),o=D1._reduce_color(o,1-n),e=D1._reduce_color(e,1-n),_=D1._reduce_color(_,1-n);return"#"+D1._get_hex_value_from_rgb_value(t)+D1._get_hex_value_from_rgb_value(o)+D1._get_hex_value_from_rgb_value(e)+D1._get_hex_value_from_rgb_value(_)}),_=Array.from(a),t=Array.from(e),o=1;o<=f;o+=1)!function(){var r=u*(o/f),i=o/f;l.clear();var s=new Array(t.length).fill(0);Array.from(_).forEach(function(e){s[e]++}),Array.from(t).forEach(function(o,n){var a;l.has(n)||(a=s[n],Array.from(t).forEach(function(e,_){var t;l.has(_)||(t=s[_],D1._match_color(o,e,(r+r*(1-1/(t=(e=t<a)?a/t:t/a))*i)/(1+i))&&(t=e?D1._blend_colors(c[n],c[_],1/t,!0):D1._blend_colors(c[_],c[n],1/t,!0),c[n]=t,c[_]=t,l.add(n),l.add(_)))}))});var e=D1._remove_duplicate_pxl_colors(_,c);_=e[0],t=e[1],c=Array.from(t)}();if(c.length+2>A&&c.length-2<A||!r||s.has(i))return{v:D1._remove_duplicate_pxl_colors(_,c)};c.length>A?(s.add(i),i--):(s.add(i),i++)};!_||1===p;){var o=t();if("object"===(void 0===o?"undefined":m(o)))return o.v}return D1._remove_duplicate_pxl_colors(h,g)}).timeout(12e4);case 5:return _=e.sent,e.abrupt("return",_);case 7:case"end":return e.stop()}},e,P)})),function(){return _.apply(this,arguments)}),D1._remove_duplicate_pxl_colors=function(e,o){e=[].concat(S1(e)),o=[].concat(S1(o));var n={},a=0,r=new Array(e.length);e.forEach(function(e,_){var t=o[e],e=void 0===n[t]?null:n[t];null===e&&(e=a,n[t]=e,a++),r[_]=e});var t=new Array(a);return Object.entries(n).forEach(function(e){var _=E1(e,2),e=_[0],_=_[1];t[_]=e}),[r,t]},D1._get_shadow=function(e){function _(e,_,t,o,n,a,r,i,s,l){return[(arguments.length<=0?void 0:e)+"px "+(arguments.length<=3?void 0:o)+"px "+(arguments.length<=6?void 0:r)+"px "+(arguments.length<=9?void 0:l)+"px rgba(0,0,0,"+c+")"].join(",")}var c=.2;return["none",_(0,2,1,-1,0,1,1,0,0,1,3,0),_(0,3,1,-2,0,2,2,0,0,1,5,0),_(0,3,3,-2,0,3,4,0,0,1,8,0),_(0,2,4,-1,0,4,5,0,0,1,10,0),_(0,3,5,-1,0,5,8,0,0,1,14,0),_(0,3,5,-1,0,6,10,0,0,1,18,0),_(0,4,5,-2,0,7,10,1,0,2,16,1),_(0,5,5,-3,0,8,10,1,0,3,14,2),_(0,5,6,-3,0,9,12,1,0,3,16,2),_(0,6,6,-3,0,10,14,1,0,4,18,3),_(0,6,7,-4,0,11,15,1,0,4,20,3),_(0,7,8,-4,0,12,17,2,0,5,22,4),_(0,7,8,-4,0,13,19,2,0,5,24,4),_(0,7,9,-4,0,14,21,2,0,5,26,4),_(0,8,9,-5,0,15,22,2,0,6,28,5),_(0,8,10,-5,0,16,24,2,0,6,30,5),_(0,8,11,-5,0,17,26,2,0,6,32,5),_(0,9,11,-5,0,18,28,2,0,7,34,6),_(0,9,12,-6,0,19,29,2,0,7,36,6),_(0,10,13,-6,0,20,31,3,0,8,38,7),_(0,10,13,-6,0,21,33,3,0,8,40,7),_(0,10,14,-6,0,22,35,3,0,8,42,7),_(0,11,14,-7,0,23,36,3,0,9,44,8),_(0,11,15,-7,0,24,38,3,0,9,46,8)][e]},D1._get_cursor=function(e,_,t,o,n){var a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAq0lEQVRYR+1WQQrAIAxb///oDmUOkc3W2kEG2XHQGpPURg6wTzLwqKr2fUQk3Ddc2AMogBqGgo2ARpkhGaKHZtMIKRmnjJLtrBBIU0O9QzvsjrUpyzUd0BgfvAdYWz3StzLUm7KBuWLEKzZPzHjqO8SWElXuX7UnLCCvTCvTFJYsAuarGswp270tQ77FIOQuY0BjQLOM+zuGVlbK7HIpLzXH3vIXGfIwlGXqE9034xUtxdxDAAAAAElFTkSuQmCC") 18 18, auto';return _?a=e?'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAA9ElEQVRYR+3X0Q6FIAgGYDjn/R/5xBmtmjMTmIBd2G3WvsE/VISXPfgyDyyQ1JFbhYiIpI/q94joVukmyPJ/9i+Q1MUpFTpa8wWAzZoxy/puhg7E9b8MlAhiTRnyaJQIQsQPEW1ZKA2I12AWSgvaO5eBsoBSUFZQOErcyx6GHgf9FxH0kU0xJFMjoJD2jYIYZWpffbypI+EBMlWKQWf2WkcXL5AalQlSobJBImoGqIsq51d0hm5n/9beVx5nskG9kbDjZ4Ca7TtLGQ6S7nT19SoFNHqn8xyMnIlrCmtuGikV0kDKNVF7mdXxuN61ZR6qBZKq+Aeqdig0aelV6gAAAABJRU5ErkJggg==") 18 18, auto':t?'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAA80lEQVRYR+3X4Q6DIAwEYHn/h2bBQIJNoXcVHEb2c3PZx11hGo7FXmExz7FBViM7oe8lFGOMctUhBPcouL4oEfXvK77TiyJpUMEURALIQOR7DJICSUxaOQLSritImRwNstJwIC+G94K0uhxpXDZkrptPqIX5C6iHsU7d+vPO8OMJjcK04FRlszFV3XZCT2Bo0I2/I3i04MpSQhuUc1VP6uVmKA/c9NrgGVoWlG+s4F3DXkgl9ERKLtCslNw3aLPOJC2dc/FW70uCRtfWqgtKqAz3KFQPA4NGoSwMBbqLQjA0qEYxFaIYF6jsSu2Zvrdj0UfpHwMA+yX+QNKuAAAAAElFTkSuQmCC") 20 24, auto':'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABFUlEQVRYR+2Y2w6EIAxEl///aDYYa7C2dFqryyb4qsBhOr3E8kl4aq2Vb1NKKZGtQ4v4QQ2oP7/xTQckqYNAuhTSQiMp1IAiqrmBpEMWEPlBMy+qEOKrV0OG+GoBWZm3FFoKtUyiXsvV+P8sk3rVfqvN/BmF0eUhfiDJT136J0BSnEklrUUM1hzdQvMVH0kudWikkvQuMhV2vfEyyMFAtElwMhW5pclSBOIhYDe6I8ppLQQkZdMUQJpKafLsBdQ0tTaMZYK4TD010NNhg039lkohoKdU6ir3qfSYE2N2dR4Zeru8lT1TAmWHTQsXpBBV7iyoEQwMlAVlwbiA7kIhMG6gHsoTQhQmBNQXTStD+/fIz6r2/RftLsg0XDwDiAAAAABJRU5ErkJggg==") 20 18, auto':"RECTANGLE"===o?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAv0lEQVRYR+2X3Q6AIAiF5f0fmuaFG6OSH9F00a0IX+dAKZTNHtiMpySQ5Mg/FUJEpMoAwKsQSxSqQI2hsiUQb9whhbjf0lS0dWrDUw5qGc9J9956iL6NFob3hSUH33sWEJvWrmBLLJNG1GCpf+wtE5FAkZa5fx0zLNNaW+O6Yx+lUAJJCgwdP2b0kCXnkh5KIE0PuU+MXF6pmHY9BEhbzBInfdtCzkPTgSwFPLGf3zos0EvuZQlkUUCKTcuOU+gCTnb3JcS3RYIAAAAASUVORK5CYII=") 27 12, auto':"ELLIPSE"===o?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABH0lEQVRYR+2X4Q7CIAyEy0x8//c1WoNhCWOFawvo1PnTAf24HqUEOtgvzORhZs7XDyHAeHBAD3AEWhki2wlUqvmfCpVGRR7LPSSNLX1lMnWeAiE90bSIb/NdMrp6hRZMjJIWfw+QBFOUmCrI8JTVYDQ1Zfgp64FJaRxbGEsgbbVd8zdaoYWZ79bSn5tpKJCw2JWIbpZjNPRy9ezOAlsbW61DPwl0uJR5VJ6ashMInapToY8plPU77v5Jew+2AnTdZYJ/ltjHIVWbO/be9t55ERYCvQalXjnJfiGiR22nvT0U9IS02wS5m9sLAxWSGq3sv51I5atDa+TN+x+ZrAXVmuuBUStkhfLCmIHWxh2pqnmRmBs0FHTWd3jKZgX+GoWe1olaNCjYBWEAAAAASUVORK5CYII=") 25 9, auto':"LINE"===o?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAA+klEQVRYR+3Y0Q6DIAwFUOr+/5NdTY1dkJS1YIsmstexcLhArYP0sA88zJN+IERECw4AQhdxAmlzkXmCaNvK3ePkbkson5jO1gQd23RKIr9xtydUu/7HVn5SSl9LiegZ03Tt+cADwEJnv2dC7TfmwpjXqMikrFV3QcRVQLknZQVR0kNQLaAhqFZQOKoHFIrqBYWhroBCUFdB7igPUBX1ryrXGj0vkIhSnoni3J4gM4r7rbKPp9S8QdRtmtsYqfkLB/GipcknSHtZGJ6QdsveC9LaVPqeDvuQhCwYHjMU1PDnxe7jYuleh6TVW1J7J8iSTPGG7P8sa0WU4zdwA0Y04iTpEgAAAABJRU5ErkJggg==") 32 32, auto':"PENCIL"===o?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAA7UlEQVRYR+3X2w6EIAwEUPv/H82GRDYE6dUO8KCvEntSBgG6DnvoMM/1gbQZWdKhUkppECISa8JBFdMbqk1CQUEjpnVJQsFAHEZDwUC1cASVDmoBbjmRULOpSwX1xftiniylgWZFJRQX7BSQdVraOOgq04J7h/v/77nHs4141SELRlvm41YSBnkwY5ek/SwEQmEq1A1CYtwgNMYFWoExg1ZhTKCVGBW0GiOCdmBY0C7MFLQT8xqkHdi1K8/s/eNPbe0QAhPuEAoTAiExbhAaw4K4MGrX4EiI0w5oGcVNqwxVyPpd9wHN+uHouONAP0LJ2yWtxGVEAAAAAElFTkSuQmCC") 5 32, auto':"PENCIL PERFECT"===o?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAA/0lEQVRYR+3XSw7DIAwE0Pj+h6ZCqiNE/cHAGBbttg1+GagBei770GWe5w/yZiQloVJKYQgRmTXhoIppDdVmoaCgHsMpWSgYSMN4KBioFp5BbQfxAuZ1YqGkqdsKaou3xSJraRtIKmqhtIW9BTQ6Lfw76L/MSOZtykJSahBLCVnTFG2Ibyf39hbt+wjm2wLMDr0EQmEqKjxlSEwYhMaEQBmYYVAWZgiUiXFB2RgTdAKjgk5hRNBJzBCIN0bveDG7BfXP/XRq6ZCVhXET4utUf5XyrjIraZkJSQMjMW5CPQiNUUFa5N41eGWqls5DOwqrL40cfGbs8AFtpkjkmetAH9mVQzQQt8P4AAAAAElFTkSuQmCC") 5 32, auto':"PICKER"===o?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABTUlEQVRYR+2W4RKEIAiEpd7/kS9ubLQxFCGUq5upv5X7uYsghIc98DCe8AJJifzEIUTEDAIAXU13oAhTMkS2HtQUoCS6hhC2MhIKk9/1oIaBsmgSOaA4GAlqCIiJY0XEj1AqO1fLqSGgEMJCxZOIdJjcgOLCFZSKxsmhqA2IuGkiIgXfPG2jkU2F2Xentbfxnal+vPpQ5UwSipBsfBKM1SHOmSXWaTrOp+5cHPGqeVLnr0YmwiSBZm3R5tkqlytAXEx0191Cl6C0QGZn8qDXDlgNkNmZwo04ZfZilwpbAhpyBgDKOPNa5vvQDGdO1xFNz+Nob4Hh+tBtME0g7o5DboNcbYmNT4qtiqwEYnqGG8wVhzK4Nk7JCPZ91yFy/60Gp9R1LVQqoGI4HhoeMKrIWrv0gjEBecKwQL3syTiwlEn3H2mWTReUFnyB/s6hL1JSZjT7s1UhAAAAAElFTkSuQmCC") 5 32, auto':"EXCHANGE"===o?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABoklEQVRYR+2Y61IDMQiFoa2+//tqxdmdJAMJ5JBMR6tTf7ob9gMOl5Tpyf74yXjoXwBdReQzG1lm1k5fiOhrdjYdIRGRash+Y46mjg0vdrDn8xTQAbMCkY3eAdtDIaCLiNx7mJnXGgY5sQoUwjDzjYjuIBI3EfnQUAWgHVsC6tNUo+LlPQLTNurHnf+9EVErEjdlHgwzX1GF9GCBnbUIPQrm+CoqhlTKAiAk/ihrg470ixmgs+lVIXoHqkHdlzwapbUTCrzTHhvPHcG51YRSUdI19JhMf0JAQ6oyMCqKy1AvoBI9oyvd234lQl7DbIO7K8NziJbqeieioToeoaElILVimJauyx0NTSTqNFCmLH80Qn8SKDOjQGM046SfBuG0D1p909XC6DCmHP2YLWKpExdvXLHvpDszXLdWhgwMEQ0b6BZQZu1MAKVgDjt9ylzBzfoGgqlac3ZrV79QQ0GEMjpyl7NiL1yHIZAXgd1rEILxUgZFjVIUPZ9tn/rMUh86PTBX9TmejmT2+pRZ3s0PBKghGm83rk4ZoN0sbZ17AaGwfQNzJa40/U9w+QAAAABJRU5ErkJggg==") 18 18, auto':"BUCKET"===o||"HUE BUCKET"===o?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABMklEQVRYR+2XwRLDIAhEpen/f3FTOmaajrUgC5jpxVyD+lwXUCoXfszM5/RERMhSUBAyUR9TYVqGyoZAXQLUw1TYvwFlYCr4VIWyMFOBZsBMA5JgTpOj3vlkYySD2jEjmAhUykPaMR3Sd2UHVSoMZHnG+q+dTAgIXQyNa+HcQN5FvPEuIO/kjam/2siocsNAURgvFAQ0yiZv2bCyLwzkBdHi+3IAAb3P/McHWSipNo2Absy8E9FWSnnOhtIKpQp0+qYfiLQKS7lR1RaBrNteBspqIRLQxswP4fp5L6XsozTOKKN2e2330s48SlnKTAFCjY7CiBc0j0LI8Xlg1BujZWrJK9nWYt4YI4+8FsqrjAlkZcygFRyvVeRRKM0Bt44ooHfcArIUWwothSwFrP/LQ5ZCL65vGzRTMXdZAAAAAElFTkSuQmCC") 6 25, auto':"MOVE"!==o||t?"MOVE"===o&&t?a="grabbing":"CONTOUR"===o?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAA/klEQVRYR+XX7Q6FIAgG4Lz/i/bMlo2ZIB++zO30t1xPgEjlOuwqh3mu/wPVWuuYhVIKGwhohBpm9u5m5FAwEIfp0eJQENAM0zNHIzZDbQdxmJ4ieh8O0tRMGkiqGbrRUlK2KmCu+UJSthPT4KGi3o0JgRAYNwiFcYGQGDMIjTGBMjBqUBbGBLof5seYT++TRgxpSjX1oT5srWBejCpCBPHiJVgEswSNJ3MPNR0laCqjGBOI5p0MW3fUZlH0/s2INbTaXSPMi6DrwiDpD8IDdIN21MsM7AKhMK6iRmLMIDTGBMrAqEFZGBXo6cSmM8+z3d9TILIYsTbty7X440A/uhPvJTjQhwcAAAAASUVORK5CYII=") 8 33, auto':"BORDER"===o?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAk0lEQVRYR+2YwQ6AIAxD2f9/9AgHDyixrs5kxHotHeVtB9Basc+K5WkKhDpyIeTujkyZuplNGZaBTmsy959qjbPvHeir7h0dCBNaGd72b8yoAt1RFCE0YyIkQogA0jVDIoQIIF0zJEKIANI1Q/8jhE7M6PSdmtks4gm/OiLFmbWPAzHFWQ98ubKFs3z6HYNIliPUAQ/FUDSiymd+AAAAAElFTkSuQmCC") 18 18, auto':"SET PENCIL MIRROR"===o?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABR0lEQVRYR+3X3Q6CMAwF4DUY3v91NeIxEGYGbv1jXbzQW2R8nI5uo/RjP/J4AEBzHxGZxzffsGK0z1ndVpQJZMHkBK0oNeiMkapWpmhBqUA1jFCKGcDdgxJBDkyulgvFgi5g3KgmqAPGhVKBLJOy0Z8O5ePG6wGaADylflMmHgnKmAeAmUONAGXMViWprNEgFrM/fEopvYqO/VlyepdMg8mJfVBhCXEDV67Fg/b5sm0/yknMYfI9eSnpXbKvViNhhoI0mGGgCuaWUlpq3TpsUjOfcRMTnpC2TGVSoQntgy8AJiJikxnRGPNSsXZeFSa8ZJoj0Pk/oSX7g84112wvuNQs2+HoTf666h9OutK+KfIYZMZsC7Zmglrf8krJVaDWA7iX8Zxa1QnVuq0mWc/HoE7Ig5ImcO2lzKByxyilJJ3VuoEkyJXrb6IrI0OmlalfAAAAAElFTkSuQmCC") 18 18, auto':"SELECT COLOR THRESHOLD"===o?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABeklEQVRYR82W2w7DIAxDQfv/P57GREWqNM3FlAh1j2trDokdqOVlv/oynnICtdZah6u13iC9Z3JDqzoXoM7SuThUX0D736qs9T6qc6kG/4gWnIGhbyyd/lxuWG5MbY/sWiSiVYug+DNEJwRCRBAgVAcF+pRSfjOJlBUaQKGO6iHq9Uhd2HctadT2Ed4eFEhHTRmL/6e19rXERhXMKrM2uTp8Q/AcklBejK1ZhMwzeFJzMcMfsJbnxWkRDjNacuijKYqCMQWkwFTtv2jRlAp5C2dCQRVCFkTeQSoHAQ2PHIes5Zcso8NAHpR2bj01+hSQBkXT3LmOqHcs6/1pIAmF+GJmJMCTmh0n5KPTU5lQSzdGyzsr7YNujJ5Bs6HC+xCSlkyoEAg1ZBYUChTe9LLSl35jXK3ULWXCM/BNjydrBSqMPW8F6qeV9kGDkRaQwzEaiI8qFYmuPkehqPqPzrJZyAiKW2ELkOcp6cttQBqUFpKtQEhitwMxKHXtP/Eo9zDGipjdAAAAAElFTkSuQmCC") 7 7, auto':"SELECT PATH"===o?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAA/klEQVRYR+XX7Q6FIAgG4Lz/i/bMlo2ZIB++zO30t1xPgEjlOuwqh3mu/wPVWuuYhVIKGwhohBpm9u5m5FAwEIfp0eJQENAM0zNHIzZDbQdxmJ4ieh8O0tRMGkiqGbrRUlK2KmCu+UJSthPT4KGi3o0JgRAYNwiFcYGQGDMIjTGBMjBqUBbGBLof5seYT++TRgxpSjX1oT5srWBejCpCBPHiJVgEswSNJ3MPNR0laCqjGBOI5p0MW3fUZlH0/s2INbTaXSPMi6DrwiDpD8IDdIN21MsM7AKhMK6iRmLMIDTGBMrAqEFZGBXo6cSmM8+z3d9TILIYsTbty7X440A/uhPvJTjQhwcAAAAASUVORK5CYII=") 8 33, auto':"SELECT PIXEL"===o?"ADD"===n||"REPLACE"===n?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABBElEQVRYR+3XyxLCIAwF0PL/H43DIk7EvG5KoOPoGuVwk1jarod92sM8lwnqvXcObq2VH8AFkWHYfgbEk/YOVZ7QwPBKe0mXgmYM9aOFeoPmBqYv8x6SJlIrgYbxUB8gdIi8+DOo5SBKmpKzUNKBlpaMb843Q3ppWVNLm1oordxLQNGy0LrQlEkTpJWAr/Uad6wVklKDuJVQBOON+RyEC9IerghmTsm6YaSe3lWYAYVBlRgYVI2BQDswYdAuTAi0E+OCdmNM0AmMCjqFEUEnMbdB3o0x8xL69U8dTagCk06oCpMCVWJgUDVGBWnN6L0GZ5oYuqCt2AD9Dfg+hG6Arv+DvMReyBw3NCzTf+YAAAAASUVORK5CYII=") 5 32, auto':"REMOVE"===n?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAA9klEQVRYR+3XQRKDMAgFUHP/Q6eTBR2MgQ8I0YXdmpHnh2jajpf92ss8xwdCHdmSUO+9E6S1ptYsBw0MNwybhioFzRhKSUP9QTxW1Gd+XXpaCYNQJxBo78WJ4o+g0kGUNCWnoVYPlNoyXpwX88xS2lCvimooqd0pIGtbaJ1pl3l2Fl+LBnesXSQlBnErIQsGbfM5iDDIg5lT0roRAlVhBtQNqsS4QdUYF2gHxgzahTGBdmIgaDdGBT2BEUFPYZagJzG3QejEGPlgX97U1oQqMOGEqjAhUCXGDarGiCBpGNHf4MgQpx3QMoqv7uE+D1VB6L4fCCX8A+VV8SWc4ctzAAAAAElFTkSuQmCC") 5 32, auto':"REPLACE"===n&&(a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABNUlEQVRYR+3X4Q6EIAgAYLn3f+a42aIZgYCFddv165aXfiKYQXnZBS/zlN8AISICwKeUgiyCgIgLAKRN5NTxhimIWBiKMNTmRtU+aWLWZA6dEoYeblAVUSOzB2xrM1FKn+pzvGGPQouqvwWMtKSHFeYYNlERJd08odpRhKUUC1XDWCgtdCLKi2kGrcWh7izSst8OogSm5O1FygsaXrJ28HawSC7dltTSoD2UVqW3lL13Wdge56uy6MZoVVPNaCFS7n1orQjvq8ODscqcl6C502o1G8HwKPVOGEOgLMz6RoiehzIxYVA2JgSagXGDZmFcoJkYEzQb0wU9gVFBT2FE0JOYyyDvQT+y+aqfQVYnGZjhCGVhhkCZmDAoG6OCtPyxPoOtvPO0h48fnk6v/OcPsqL3ugh9ATjCXTQqEhJmAAAAAElFTkSuQmCC") 18 18, auto'):"SELECT PIXEL PERFECT"===o?"ADD"===n?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABFUlEQVRYR+3XWQ7DIAwE0HD/QxNRycil3oZigqrmm4jHmLVch33lMM9lgmqtlYNLKekDcEFkaLafAfGkvUGlJ9QwvNJe0qmgEUPz0UJ10DiB6Wc+h6QVqZVAw3ioNxC6iLz4Z1DLQZQ0JWehpAEtLRnvnHeGzKVlk1rq1EJp5V4CipaF2oVWmbSCtBLwtkYyvZmQlBrEVwlZZUI3xL7NWKe9dbgimNaHt0WEQBo2C9P6g68TmRgYlI2BQDswYdAuTAi0E+OCdmNM0BMYFfQURgQ9iQmBaMv3rherHpwfO7V0wu/CuAnRw3W8a0cPypnUzISUO1LqCxYCZSajXj+099mrvug7aaJm8PVjog/olz/Ii+u4hG5e9580PRb9NQAAAABJRU5ErkJggg==") 5 32, auto':"REMOVE"===n?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABBklEQVRYR+3Xyw6EMAgFUPn/j+6kCwwqj14t1Emc7TRyvFSqtL3sRy/zbB8o6khJQq21xhAicmumgzpGGrrNQ6WCzhhOyUPtIBlr1Gf5v3W3FiZCHUBBey/OKP47qOkgTpqT81DaDU1tmSwuiyF7adqm1op6KKvdU0CjbeF1Q08Z8mTJtU4y+zIlKTOIRwl5bUIH4j7JE5KhaD95NW8lhCTTi0fz6jBo0YQyMd0CJZSNgUAVmGFQFWYIVIkJQdUYF7QCY4JWYVTQSswQiKfsk+MAGb6Xwai9ZFVhwoT4c+r8ro2cTUg6IUi7WCYGBmVjTJAVc/QZjLZHWw+d9jMKRtf4QH+X0A98MFk0IsucOwAAAABJRU5ErkJggg==") 5 32, auto':"REPLACE"===n&&(a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABUklEQVRYR9WX7RKEIAhFZd//mZcdG2mIQMDS2v3VbAbHi3wI5WU/eBlP+Q8gREQA+JRSUCgIiPgFgGkbORluMAURi4AiGHoXhqo2aWPeZg5GCYY+ZlAVoiqzC9beuVCGTfM7+WJXgUPVZwVGC+khwhJGbFSF0v48QXEvSijVRLVgPChLOhUqCsOc1uQwK4sW9tuB6ADT4e0pFQUaDhl3zp1lztJth1pz2oOysvSWtI+GRdS4WJZlC2NHGbVmtfXhOrQZibaOXpiyBXGv5KPdPgPTNlmLq1vZ3QUa8CyYrSNkFZoJkwaaDZMCWgETBloFEwJaCeMCrYbpAj0BYwI9BaMCPQkTAqIxwRsvsgXWWm9eg3j/WQXjKkTXKdkTo1egEdW6ChmNNdS1R2BchaTRmcqY8xC/9kqgyDwzqszlAe2q43CWzXIUtZse0KKGR9e9DugHz47FNAGTbH0AAAAASUVORK5CYII=") 5 32, auto'):o.includes("SELECT")&&("ADD"===n?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAkElEQVRYR+2XQQqAMAwEm/8/OpKDUApmUwoScbwmpdNpXNRGs8ea8QyA1I1g6H+G3N3nU5vZ0RgcLQ6QALoZgg2gdSgxpF5TDGEoM7CG3lPvnEPKaNSzrEqDcR7YykaVHhWe3wOqnPq1K6vAkEPKEoYwpAyoOjNUMdTqI18B79aP/zp2N1T9AGFIGVD1djN0AfXGlCWHImsNAAAAAElFTkSuQmCC") 18 18, auto':"REMOVE"===n?a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAb0lEQVRYR+2UQQrAIBDEdv7/6C0+oAYWClriNbiOcTB12MphecpA9CIa0hAZIG6HNEQGiNshDZEB4tsOdXfTgAlP8nouBtrsnWSpdcd/BRppgE1jQ1+EoZl+jBoiA8TtkIbIAHE7pCEyQNwOXWfoAYpLFiWYvOCxAAAAAElFTkSuQmCC") 18 18, auto':"REPLACE"===n&&(a='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABCElEQVRYR+2X3Q6DMAiFwb3/I8+zYFbj5ixwmixsqTdeWNqPw09RpdijxXhkAnkRmQr9p0IAoKo3EVk9Dy++LwDuquqmiLvgCbMCWEgoBbCq2sv86kN1gRqMiCzmOQBJQjVlmnDNsctzPYWad3skElCUrQdkIMzGjM3mdAQoC0XDZICiUEMwWSAPymrAqonJt90mGrJje3mvnK36NtpBGEahBnYKzZE4UYmnPsoo1IUagRlR6GM+kc3zRSVWoVIhK5XUvT7z9bKPNL3Imu4EE82hzEGZtVTZMwcwNqHLld6YnBL6t33FAc3uKZs7a4ywLeNKDfnkXwZtFi17+oCs4QTyFJsK/ZxCD73aLDSws54nAAAAAElFTkSuQmCC") 18 18, auto')):a="grab",a},D1._set_moves=function(e,_){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,o=Date.now(),n=D1.state,a=n.scale_move_x,r=n.scale_move_y,i=n._scale_move_speed_timestamp,n=n.scale,i=o-i,a=a-e,r=r-_,a=Math.sqrt(a*a+r*r),r=Math.min(Math.round(a/i*200),200),a=D1.state._moves_speeds;a.push(r),15<=a.length&&a.shift();i=[].concat(S1(a)).slice(-15).reduce(function(e,_,t,o){return e+_/o.length},0),i=Math.max(1,Math.round(Math.floor(8*i/200))),r=Date.now();D1.setState({scale:null===t?n:t,scale_move_x:e,scale_move_y:_,_scale_move_speed_timestamp:r,_moves_speeds:[].concat(S1(a)),_moves_speed_average_now:null!==t&&n<t?8:null!==t&&t<n?0:i},function(){D1.props.on_elevation_change&&D1.props.on_elevation_change(D1.state._moves_speed_average_now),D1.state.has_shown_canvas_once&&D1._request_force_update(!0,!0)})},D1._request_force_update=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],_=1<arguments.length&&void 0!==arguments[1]&&arguments[1],t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(){};D1.state._force_updated_timestamp,Date.now(),R1(function(){D1.forceUpdate(function(){t()})},!e,!_)},D1.set_move_speed_average_now=function(){var e,_=D1.state,t=_._moves_speed_average_now,_=_._scale_move_speed_timestamp,o=Date.now();60<=o-_&&-24!==t&&(e=Math.max(t-1,-24),D1.setState({_moves_speed_average_now:e,_scale_move_speed_timestamp:o},function(){D1.props.on_elevation_change&&D1.props.on_elevation_change(D1.state._moves_speed_average_now),e!==t&&D1.state._scale_move_speed_timestamp===o&&D1._request_force_update(!1,!0)}))},D1._update_canvas_container_size=function(){D1._request_force_update(!1,!1,function(){var e,_,t,o,n=D1.state._canvas_container;n?(o=n.getBoundingClientRect(),e=null!==n&&o.width||0,_=null!==n&&o.height||0,t=null!==n&&o.left||0,o=null!==n&&o.top||0,D1.setState({_canvas_container_width:e,_canvas_container_height:_,_canvas_container_left:t,_canvas_container_top:o},function(){D1._update_screen_zoom_ratio(!0)})):setTimeout(function(){D1._update_canvas_container_size()},50)})},D1._update_screen_zoom_ratio=function(e){var _=D1.state,t=_._canvas_container_width,o=_._canvas_container_height,n=_.pxl_width,_=_.pxl_height,n=o<t?(o-D1.state.canvas_wrapper_padding/window.devicePixelRatio*2)/_:(t-D1.state.canvas_wrapper_padding/window.devicePixelRatio*2)/n;D1.setState({_screen_zoom_ratio:n},function(){D1._request_force_update(!1,!1,function(){e&&D1._to_canvas_middle()})})},D1.state={_id:Date.now(),className:e.className||null,perspective:e.perspective||0,shadow_size:e.shadow_size||4,shadow_color:e.shadow_color||"#9f9f9f",light:e.light||1,perspective_coordinate:[0,0],perspective_coordinate_last_change:0,perspective_coordinate_notify_after_ms:50,perspective_coordinate_last_notify:0,animation:e.animation||!0,animation_duration:e.animation_duration||60,move_using_full_container:e.move_using_full_container,no_actions:e.no_actions||!1,dont_compute_base64_original_image:e.dont_compute_base64_original_image||!1,dont_change_img_size_onload:e.dont_change_img_size_onload||!1,dont_show_canvas_until_img_set:e.dont_show_canvas_until_img_set||!1,show_image_only_before_canvas_set:e.show_image_only_before_canvas_set||!1,dont_show_canvas:e.dont_show_canvas||!1,but_show_canvas_once:e.but_show_canvas_once||!1,has_shown_canvas_once:!1,tool:e.tool||"PENCIL",select_mode:e.select_mode||"REPLACE",pencil_mirror_mode:e.pencil_mirror_mode||"NONE",hue:e.hue||0,pxl_width:e.pxl_width||32,pxl_height:e.pxl_height||32,pxl_current_color:e.pxl_current_color||"#00000000",pxl_current_opacity:e.pxl_current_opacity||1,bucket_threshold:e.bucket_threshold||0,color_loss:e.color_loss||.25,default_size:e.default_size||96,ideal_size:e.ideal_size||e.default_size||96,max_size:e.max_size||2*e.default_size||192,px_per_px:e.px_per_px||1,fast_drawing:e.fast_drawing||!1,canvas_cursor:e.canvas_cursor||'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAfCAYAAAAfrhY5AAAAAXNSR0IArs4c6QAAAFxJREFUSIntlkEKACEQw6b7/z/Hq7cdqeAcmrtJQRCrDACc824YZ8B3cU/iiSc+M27x7IULDqrq3Z0kdaVdnwA6XqA14Mh3svTXuA246QtzyB8u8cQTHx23cF+4BaK1P/6WF9EdAAAAAElFTkSuQmCC") 15 15, auto',canvas_border_radius:e.canvas_border_radius||0,canvas_wrapper_background_color:e.canvas_wrapper_background_color||"#ffffff",canvas_wrapper_border_width:e.canvas_wrapper_border_width||0,canvas_wrapper_border_radius:e.canvas_wrapper_border_radius||2,canvas_wrapper_padding:e.canvas_wrapper_padding||72,show_original_image_in_background:void 0===e.show_original_image_in_background||e.show_original_image_in_background,show_transparent_image_in_background:void 0===e.show_transparent_image_in_background||e.show_transparent_image_in_background,hide_canvas_content:e.hide_canvas_content||!1,default_scale:e.default_scale||.9,scale:e.scale||e.default_scale||.9,scale_move_x:0,scale_move_y:0,_scale_move_speed_timestamp:0,_moves_speeds:[],_moves_speed_average_now:-24,mine_player_direction:e.mine_player_direction||"UP",_mine_index:null,_previous_mine_player_index:null,_mine_player_index:null,_pencil_mirror_index:-1,_previous_pencil_mirror_axes_indexes:new Set,_previous_pencil_mirror_axes_hover_indexes:new Set,_is_there_new_dimension:!1,_was_canvas_content_hidden:!1,_base64_original_images:[],_original_image_index:-1,_old_layers:[{id:Date.now(),name:"Layer 0",hidden:!1,opacity:1,data:{}}],_layers:[{id:Date.now(),name:"Layer 0",hidden:!1,opacity:1,data:{}}],_layer_index:0,_s_pxl_colors:[["#00000000"]],_old_pxl_colors:["#00000000"],_s_pxls:[new Array((e.pxl_width||32)*(e.pxl_height||32)).fill(0)],_old_pxls:new Array((e.pxl_width||32)*(e.pxl_height||32)).fill(0),_json_state_history:'{"previous_history_position": 0, "history_position": 0, "state_history": []}',_old_pxl_width:0,_old_pxl_height:0,_pxls_hovered:-1,_old_pxls_hovered:-1,_canvas:null,_canvas_container:null,_canvas_wrapper:null,_canvas_wrapper_overflow:null,_mouse_down:!1,_state_history_length:e.no_actions?0:42,_last_action_timestamp:Date.now(),_last_paint_timestamp:Date.now(),_lazy_lazy_compute_time_ms:1e4,_undo_buffer_time_ms:500,_mouse_inside:!1,_paint_hover_old_pxls_snapshot:new Array((e.pxl_width||32)*(e.pxl_height||32)).fill(0),_select_hover_old_pxls_snapshot:[],_paint_or_select_hover_actions_latest_index:-1,_paint_or_select_hover_pxl_indexes:new Set,_shape_index_a:-1,_select_shape_index_a:-1,_shape_index_b:-1,_select_shape_index_b:-1,_pxl_indexes_of_old_shape:new Set,_pxl_indexes_of_selection:new Set,_previous_pxl_indexes_of_selection:new Set,_pxl_indexes_of_selection_drawn:new Set,_imported_image_previous_start_x:0,_imported_image_previous_start_y:0,_imported_image_start_x:0,_imported_image_start_y:0,_imported_image_pxls:[],_imported_image_width:0,_imported_image_height:0,_imported_image_scale_delta_x:0,_imported_image_scale_delta_y:0,_imported_image_previous_scale_delta_x:0,_imported_image_previous_scale_delta_y:0,_is_on_resize_element:!1,_imported_image_pxl_colors:[],_is_image_import_mode:!1,_previous_imported_image_pxls_positioned:[],_previous_image_imported_resizer_index:-1,_pxls_explosion:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,3,0,0,0,2,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,2,1,2,1,0,1,0,0,0,0,0,0,0,1,2,3,1,1,0,0,0,1,0,0,0,0,1,1,3,2,0,0,1,2,3,1,1,0,0,0,0,1,0,2,2,1,0,1,2,0,1,0,0,0,0,0,0,1,1,0,1,2,0,2,0,0,0,0,0,0,0,0,0,0,1,1,3,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,1,2,1,2,2,0,0,0,0,0,0,0,0,0,1,2,0,1,3,2,1,1,0,0,0,0,0,0,0,1,3,3,4,3,3,2,0,1,0,0,0,0,0,1,1,2,3,3,1,1,4,1,1,1,1,0,0,1,0,2,3,3,1,3,1,3,3,2,0,1,0,0,1,1,2,2,3,3,4,3,3,3,2,1,0,0,0,0,0,1,3,2,2,2,3,3,2,2,0,0,0,0,0,0,0,3,3,1,1,2,3,3,1,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,1,1,0,0,0,0,0,0,0,0,1,2,2,3,4,2,1,0,0,0,0,0,1,1,1,1,3,3,3,4,4,3,1,1,0,0,0,1,1,2,2,4,4,3,4,3,3,3,1,0,0,0,1,2,3,3,4,3,3,3,4,4,3,1,1,0,1,2,2,3,3,3,3,3,4,4,2,1,2,1,1,1,2,3,3,4,5,4,3,4,2,3,3,2,1,1,1,2,3,4,4,5,5,3,3,2,3,4,2,1,1,0,1,2,4,4,3,2,3,4,3,4,5,4,1,0,0,0,0,1,2,3,2,3,4,4,4,4,3,1,0,0,0,0,1,1,1,1,4,5,3,1,2,3,1,0,0,0,0,0,1,2,3,2,3,2,1,1,1,1,0,0,0,0,0,1,1,2,2,2,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,1,1,0,0,0,0,0,0,0,0,1,2,2,3,4,2,1,0,0,0,0,0,1,1,1,1,3,3,3,4,4,3,1,1,0,0,0,1,1,2,2,4,4,3,4,3,3,3,1,0,0,0,1,2,3,3,4,3,3,3,4,4,3,1,1,0,1,2,2,3,3,3,3,3,4,4,2,1,2,1,1,1,2,3,3,4,5,4,3,4,2,3,3,2,1,1,1,2,3,4,4,5,5,3,3,2,3,4,2,1,1,0,1,2,4,4,3,2,3,4,3,4,5,4,1,0,0,0,0,1,2,3,2,3,4,4,4,4,3,1,0,0,0,0,1,1,1,1,4,5,3,1,2,3,1,0,0,0,0,0,1,2,3,2,3,2,1,1,1,1,0,0,0,0,0,1,1,2,2,2,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0],[0,0,0,1,1,1,0,2,1,1,1,0,0,0,0,1,1,0,1,3,0,2,2,2,3,1,0,1,1,0,1,3,0,2,2,2,2,0,2,2,2,2,3,1,0,0,2,2,2,0,0,0,0,2,2,0,0,2,2,0,0,2,1,1,0,0,0,0,0,0,0,0,2,0,0,2,0,1,4,0,0,0,0,0,0,0,0,2,1,1,2,2,2,0,0,0,0,0,0,0,0,0,2,3,1,0,2,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,2,0,0,0,0,0,0,5,1,0,0,0,0,1,3,2,0,0,0,0,0,0,1,1,0,2,2,0,1,1,2,2,0,0,0,0,0,0,0,0,2,2,0,0,2,0,2,0,0,0,0,0,0,0,2,2,3,1,0,2,2,2,0,0,2,2,2,2,2,2,0,1,1,0,0,2,1,3,2,0,2,2,2,3,1,2,0,0,2,0,0,1,1,0,2,2,0,0,1,1,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0,0,0,0,1,1,0,1,2,0,0,0,0,2,1,0,1,1,0,1,2,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,0,0,0,0,1,2,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,2,0,0,0,0,0,2,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0],[0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0]],_pxl_colors_explosion:[["#00000000","#ff0000ff","#ff3a00ff","#ff8200ff"],["#00000000","#ff0000ff","#ff3a00ff","#ff8200ff"],["#00000000","#ff0000ff","#ff3a00ff","#ff8200ff","#ffc900ff"],["#00000000","#ff0000ff","#ff3a00ff","#ff8200ff","#ffc900ff","#ffe900ff"],["#00000000","#8a0000ff","#1a1a1aff","#ff0000ff","#808080ff","#ff8200ff","#ff3a00ff"],["#00000000","#8a0000ff","#1a1a1aff","#ff0000ff","#ff8200ff","#ff3a00ff"],["#00000000","#8a0000ff","#ff0000ff","#ff8200ff","#ff3a0099"],["#00000000","#8a000066"]],_explosion_started_timestamp:0,_explosion_width:15,_explosion_height:15,_previous_explosion_pxls_positioned:[],_explosion_time:750,_explosion_index:-1,_selection_pair_highlight:!0,_old_selection_pair_highlight:!0,_pointer_events:[],_latest_pointers_distance:0,_latest_pointers_client_x_center:0,_latest_pointers_client_y_center:0,_previous_single_pointer_down_timestamp:0,_previous_single_pointer_down_x_y:[-1,-1],_image_move_from:[-1,-1],_canvas_container_width:0,_canvas_container_height:0,_canvas_container_left:0,_canvas_container_top:0,_updated_at:Date.now(),_screen_zoom_ratio:1,_notified_position_at:0,_event_button:-1,_force_updated_timestamp:0,_canvas_event_target:"CANVAS_WRAPPER_OVERFLOW",_loading_base64_img:"",_loading_base64_img_changed:0,_hidden:!0,_intervals:[],_kb:0,_device_motion:!1},D1}_.default=u}}]);