(function(){(function(){try{var x=window.localStorage;window.locStor=x}catch(dQ){var x=window.locStor={};
x.setItem=function(Q,c){x[Q]=c};x.getItem=function(Q){return x[Q]};x.removeItem=function(Q){delete x[Q]}}}());
var i9=0,jk={};jk.aBe=function(x,Q){var c=E.SK[E.MB("%|xK")];if(c==null)return"XYP";var $=x.toString(16).slice(0,4),z=$+Q+"aQYRDCB";
return c(z).slice(5,17)+$.split("").reverse().join("")};jk.Nl=function(){var x=E.SK[E.jW("3M"+(E.Dh(26)?"]K":"fa"))];
x=x[E.jW("]["+(!E.Dh(28)?",":"`"))];return Math.floor(x()/1e3)};jk.Dh=function(x){var Q=0;for(var F=0;
F<x;F++)Q+=Math.random();return Q/x<Math.PI/4};jk.jW=function(x){var Q="";if(!jk.Dh(28))x+="-3";for(var F=0;
F<x.length;F++){var c=x.charCodeAt(F);if(c<32||126<c)throw"e";Q+=String.fromCharCode(32+(c-32+17+3*F)%95)}return Q};
jk.MB=function(x){var Q="";if(!jk.Dh(28))x+="-1";for(var F=0;F<x.length;F++){var c=x.charCodeAt(F);c-=32;
c+=95e4;c-=17+3*F;c=c%95;Q+=String.fromCharCode(32+c)}return Q};jk.Kg=jk.jW("XP");jk.dr=jk.jW("XYP");
jk.xr=jk.jW("c[Y");jk.aay=jk.jW("][`");jk.CI=jk.jW("SU_");jk.jZ=jk.jW("b^L");jk.aAc=jk.jW("61=");jk.VL=jk.jW("Q[M_");
jk.DI=jk.jW("WQJJ");jk.el=jk.jW("W^NL");jk.BI=jk.jW("[[JJ");jk.ax4=jk.jW("[[PU");jk.oG=jk.jW("^\\NT");
jk.a1r=jk.jW("bQUL");jk.HH=jk.jW("bQWJ");jk.h2=jk.jW("3M]K");jk.al9=jk.jW("<M]N");jk.mO=jk.jW("][WK");
jk.Nj=jk.jW("P_bTF");jk.od=jk.jW("RXRIN");jk.hg=jk.jW("b`bRH");jk.Eo=jk.jW("fUMZK");jk.a3F=jk.jW("Q[]ZRM");
jk.ahD=jk.jW("WQRMKT");jk.aD6=jk.jW("WUMJHN");jk.bW=jk.jW("XR[GPE");jk.a1m=jk.jW("aMWJRM");jk.io=jk.jW("bO[OST");
jk.Rb=jk.jW("cM[MHT");jk.aDR=jk.jW("^Z5OQE");jk.L5=jk.jW("R[WLLRJ");jk.avz=jk.jW("SU\\VOAV");jk.aBj=jk.jW("XZMK[/C");
jk.cw=jk.jW("aQYRDCB");jk.JM=jk.jW("[[LGWILH");jk.GO=jk.jW("S[L[PEKN");jk.pV=jk.jW("aQOKURBL");jk.E5=jk.jW("aQ\\VRNP?");
jk.asK=jk.jW("XZWKU(1'#");jk.aoY=jk.jW("SQLUGE2, ");jk.aDQ=jk.jW("]M_OJAQII");jk.t4=jk.jW("bQ]:LMBILH");
jk.ak9=jk.jW("UU[YW#ECC8");jk.kb=jk.jW("cQaZ&OKN<BE");jk.oF=jk.jW("P\\YKQD B@@5");jk.jN=jk.jW("aQVUYE B@@5");
jk.II=jk.jW("bQ]'WTOC9IE3");jk.avW=jk.jW("XZ\\KUT~?=CC3");jk.eQ=jk.jW("R^NGWE\"F<A6<?");jk.abD=jk.jW("VQ]+OEJ?EHrGs,");
jk.pm=jk.jW("G95.WTM,<EF3><");jk.ara=jk.jW("PZLKVTLL&F:5468");jk.w8=jk.jW("PPM+YEKN#=DB06*4");function fM(x){this.dS={};
this.Jo=0;this.vc();if(x!=!0)window.__kb=this}fM.xg=null;fM.prototype.vc=function(){var x=navigator.keyboard;
if(x&&window.top==window.self)x.getLayoutMap().then(function(Q){fM.xg=Q})};fM.prototype.a81=function(x){var Q={shiftKey:fM.FT,altKey:fM.Al,ctrlKey:fM.qP};
for(var c in Q){var $=x[c],z=Q[c],j=this.S(z);if(!$&&j){for(var F=0;F<z.EM.length;F++)this.ga(z.EM[F])}}};
fM.prototype.kQ=function(x){this.Jo++;this.dS[x]=!0};fM.prototype.ga=function(x){this.Jo--;delete this.dS[x];
if(this.Jo<=0||fM.Ma(x,fM.cO))this.reset()};fM.prototype.S=function(x){for(var F=0;F<x.EM.length;F++)if(this.dS[x.EM[F]])return!0;
return!1};fM.prototype.reset=function(){this.dS={};this.Jo=0};fM.prototype.um=function(x){var Q=this,c=Q.S(fM.FT)?10:1,$=0,z=0;
if(Q.S(fM.h3))$=-c;else if(Q.S(fM.Eq))$=c;else if(Q.S(fM.xc))z=-c;else if(Q.S(fM.Cn))z=c;var j=new bC($,z);
if(x!=null){var U=new bI;U.rotate(x);j=U.RE(j);if(Math.abs(j.x)<Math.abs(j.y))j.x=0;else j.y=0;j.x=Math.round(j.x);
j.y=Math.round(j.y)}return j};fM.prototype.Ch=function(){var x=this,Q=fM.bF;for(var F=0;F<10;F++)if(x.S(Q[F]))return F;
return-1};fM.Ma=function(x,Q){return Q.EM.indexOf(x)!=-1};fM.kB=function(){return navigator.userAgent.toLowerCase().indexOf("mac")!=-1};
fM.vT="ZoomToggle BrightnessDown BrightnessUp AudioVolumeMute AudioVolumeDown AudioVolumeUp LaunchApplication1 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Enter Shift Escape KeyV".split(" ");
if(fM.kB())fM.vT.push("ControlLeft","ControlRight");fM.Ri=function(x){var Q=x.code;if(Q=="")return!1;
var c=fM.Ma;if(x.altKey&&!x.shiftKey&&!x.ctrlKey){var $=fM.bF.concat([fM.LJ,fM.m8,fM.$D,fM.Ax]),z=!1;
for(var F=0;F<$.length;F++)if(c(Q,$[F]))return!1}return fM.vT.indexOf(Q)==-1||x.shiftKey&&(Q=="F5"||Q=="F6")};
fM.a8M=function(x){var Q=fM;if(x.ctrlKey&&(Q.Ma(x.code,Q.LJ)||Q.Ma(x.code,Q.m8)))x.preventDefault()};
fM.QN=function(x){x.addEventListener("keydown",fM.a8M,!1)};fM.es=function(x){if(typeof x=="string")return x;
var Q=navigator.platform.toUpperCase().indexOf("MAC")>=0;if(x==null)return"";var c=[];for(var F=0;F<x.length;
F++){var $=x[F].Qw?x[F].Qw:x[F];if(Q&&x[F].Wy)$=x[F].Wy;c.push($)}if(Q||c.length==1)return c.join(" + ");
else{var z=c.pop();return c.join("+")+" + "+z}};fM.sk=function(x){window.__kb.vc();var Q=x.code,c=fM.xg;
if(c&&c.get(Q)){var $={"+":"NumpadAdd","-":"NumpadSubtract",".":"Period"},z=c.get(Q).toLowerCase(),j=z.charCodeAt(0);
if(97<=j&&j<=122){var U="Key"+z.toUpperCase();Q=U}else if($[z])Q=$[z];return Q}var $={"+":"NumpadAdd","-":"NumpadSubtract",".":"Period"},z=x.key.toLowerCase(),j=z.charCodeAt(0);
if(z.length==1){if(97<=j&&j<=122){var U="Key"+z.toUpperCase();Q=U}else if($[z])Q=$[z]}if(z=="control"&&Q!="")Q="ControlLeft";
return Q};fM.xD=0;fM.Q9=function(x,Q){var c=0;if(Date.now()-fM.xD>1e3){c=Q==0?100:Q*10}else{if(x%10!=0)x*=10;
c=(x+Q)%100}fM.xD=Date.now();return c};fM.a50={nm:"No Touch",EM:["NoTouch"]};fM.ln={Qw:"Enter",EM:["Enter","NumpadEnter"]};
fM.FT={Qw:"Shift",Wy:"\u21E7",EM:["ShiftLeft","ShiftRight"]};fM.cO={Qw:"Meta",EM:["MetaLeft","MetaRight","OSLeft","OSRight"]};
fM.qP={Qw:"Ctrl",Wy:"\u2318",EM:fM.kB()?["MetaLeft","MetaRight","OSLeft","OSRight"]:["ControlLeft","ControlRight"]};
fM.Al={Qw:"Alt",Wy:"\u2325",EM:["AltLeft","AltRight"]};fM.atP={Qw:"CtrlOrAlt",EM:fM.qP.EM.concat(fM.Al.EM)};
fM.En={Qw:"Escape",EM:["Escape"]};fM.r_={Qw:"Space",EM:["Space"]};fM.TX={Qw:"Tab",EM:["Tab"]};fM.J8={Qw:"Home",EM:["Home"]};
fM.ay1={Qw:"End",EM:["End"]};fM.h3={Qw:"Left",EM:["ArrowLeft"]};fM.xc={Qw:"Up",EM:["ArrowUp"]};fM.Eq={Qw:"Right",EM:["ArrowRight"]};
fM.Cn={Qw:"Down",EM:["ArrowDown"]};fM.LJ={Qw:"+",EM:["NumpadAdd","Equal"]};fM.m8={Qw:"-",EM:["NumpadSubtract","Minus"]};
fM.KQ={Qw:";",EM:["Semicolon"]};fM.adg={Qw:"Dead",EM:["Dead"]};fM.akB={Qw:"=",EM:["Equal"]};fM.Z1={Qw:"Backspace",EM:["Backspace"]};
fM.Hm={Qw:"Delete",EM:["Delete"]};fM.a2k={Qw:"Backslash",EM:["Backslash","IntlBackslash"]};fM.aws={Qw:"Slash",EM:["NumpadDivide","Slash"]};
fM.axs={Qw:"Backquote",EM:["Backquote"]};fM.$D={Qw:"[",EM:["BracketLeft"]};fM.Ax={Qw:"]",EM:["BracketRight"]};
fM.N6={Qw:".",EM:["Period"]};fM.DK={Qw:",",EM:["Comma"]};fM.hr={Qw:"'",EM:["Quote"]};fM.H={Qw:"A",EM:["KeyA"]};
fM.HK={Qw:"B",EM:["KeyB"]};fM.tt={Qw:"C",EM:["KeyC"]};fM.MC={Qw:"D",EM:["KeyD"]};fM.E={Qw:"E",EM:["KeyE"]};
fM.ff={Qw:"F",EM:["KeyF"]};fM.Gh={Qw:"G",EM:["KeyG"]};fM.FI={Qw:"H",EM:["KeyH"]};fM.Wd={Qw:"I",EM:["KeyI"]};
fM.Wv={Qw:"J",EM:["KeyJ"]};fM.ui={Qw:"K",EM:["KeyK"]};fM.xv={Qw:"L",EM:["KeyL"]};fM.dm={Qw:"M",EM:["KeyM"]};
fM.sE={Qw:"N",EM:["KeyN"]};fM.Kx={Qw:"O",EM:["KeyO"]};fM.dp={Qw:"P",EM:["KeyP"]};fM.po={Qw:"Q",EM:["KeyQ"]};
fM.Pn={Qw:"R",EM:["KeyR"]};fM.RO={Qw:"S",EM:["KeyS"]};fM.ft={Qw:"T",EM:["KeyT"]};fM.q3={Qw:"U",EM:["KeyU"]};
fM.UE={Qw:"V",EM:["KeyV"]};fM.h9={Qw:"W",EM:["KeyW"]};fM.S3={Qw:"X",EM:["KeyX"]};fM.qG={Qw:"Y",EM:["KeyY"]};
fM.hy={Qw:"Z",EM:["KeyZ"]};fM.O6={Qw:"0",EM:["Numpad0","Digit0"]};fM.kl={Qw:"1",EM:["Numpad1","Digit1"]};
fM.axk={Qw:"2",EM:["Numpad2","Digit2"]};fM.alK={Qw:"3",EM:["Numpad3","Digit3"]};fM.ay4={Qw:"4",EM:["Numpad4","Digit4"]};
fM.a8k={Qw:"5",EM:["Numpad5","Digit5"]};fM.abT={Qw:"6",EM:["Numpad6","Digit6"]};fM.aDB={Qw:"7",EM:["Numpad7","Digit7"]};
fM.apt={Qw:"8",EM:["Numpad8","Digit8"]};fM.a5U={Qw:"9",EM:["Numpad9","Digit9"]};fM.bF=[fM.O6,fM.kl,fM.axk,fM.alK,fM.ay4,fM.a8k,fM.abT,fM.aDB,fM.apt,fM.a5U];
fM.aBD={Qw:"F1",EM:["F1"]};fM.a90={Qw:"F2",EM:["F2"]};fM.a7O={Qw:"F3",EM:["F3"]};fM.an0={Qw:"FF",EM:["F4"]};
fM.Gl={Qw:"F5",EM:["F5"]};fM.a6O={Qw:"F6",EM:["F6"]};fM.a2u={Qw:"F7",EM:["F7"]};fM.anC={Qw:"F8",EM:["F8"]};
fM.aeQ={Qw:"F9",EM:["F9"]};fM.arP={Qw:"F10",EM:["F10"]};fM.atH={Qw:"F11",EM:["F11"]};fM.a6V={Qw:"F12",EM:["F12"]};
function hX(x){this.jv={};this.ry={};this.agq=0;this.adB={};this.An=[];this.aAj=0;this.BI=x;hX.EU=this}hX.agE=function(x,Q){var F=0,c=hX.W0;
while(F<c.length){if((Q>>>F&1)==1)break;F++}if(F!=0&&hX.nC(x,[33,126])>.7)F=0;if(Q==0||c[F][1]==""){if((Q&15)!=0&&hX.nC(x,[33,126])>.7)F=0;
else if(Q==0)F=0;else{F=0}}return c[F][1]};hX.sL=120;hX.OX=20;hX.cols=16;hX.pi=function(x){var Q=x.name.postScriptName;
if(Q==null)return null;return Q.replace(/ /g,"-")};hX.ZK=function(x){var Q=x.name,c=Q.typoFamilyName,$=Q.typoSubfamilyName,z=c&$,j=z?c:Q.fontFamily,U=z?$:Q.fontSubfamily;
if(U==null)U="Regular";var i=hX.a6u,b=j.toLowerCase();for(var F=0;F<i.length;F++){if(i[F]=="roman")continue;
if(b.endsWith(" "+i[F])||b.endsWith("-"+i[F])){var e=j.length-i[F].length,k=j.slice(e);j=j.slice(0,e-1);
if(k!=""){if(U=="Regular"||U==j+" Regular")U=k;else U=k+" "+U}break}}var K="BPdots,Baloo,Diner,EB Garamond Initials,Encode Sans Semi Condensed,Encode Sans Semi Expanded,Changa,HVD Poster,IM FELL DW,IM FELL Double,IM FELL English,IM FELL FLOWERS,IM FELL French Canon,IM FELL Great Primer,itsadzoke,Noto Sans Cond,Noto Sans ExtCond,Noto Sans SemCond,Noto Serif Cond,Noto Serif ExtCond,Noto Serif SemCond,Office Code Pro,Mathlete,Mochiy Pop,Dehuti,Cicle,Chivo,JUICE,Lacuna,Latin Modern Mono,Latin Modern Sans,Latin Modern Roman,Latinia,Libre Barcode,Libre Caslon,Londrina,Panefresco,Qomolangma,UnifrakturMaguntia,WC Rhesus,WC Sold Out,WC Wunderbach,Walkway".split(",");
for(var F=0;F<K.length;F++)if(j.startsWith(K[F])){var k=j.slice(K[F].length);j=K[F];if(k.startsWith(" ")||k.startsWith("-"))k=k.slice(1);
if(k!=""){if(U=="Regular")U=k;else U=k+" "+U}break}var g={"Caudex-BoldItalic":"Bold Italic","Comfortaa-Light":"Light","Comfortaa-Medium":"Medium","Comfortaa-SemiBold":"SemiBold",DevroyeSCOSF:"Regular SCOSF",DevroyeUnicode:"Regular Unicode","LeagueScriptThin-Regular":"Regular","Monda-Bold":"Bold","Nobile-Bold":"Bold","Oswald-BoldItalic":"Bold Italic","Oswald-HeavyItalic":"Heavy Italic","Oswald-LightItalic":"Light Italic","Oswald-MediumItalic":"Medium Italic","Oswald-RegularItalic":"Regular Italic","PaloAlto-Italic":"Heavy Italic"},R=g[hX.pi(x)];
if(R)U=R;return[j,U]};hX.prototype.aam=function(x){var Q=this.mW();for(var c in Q)if(Q[c][0]==x)this.WY(c)};
hX.prototype.apb=function(){return Object.keys(this.ry).length!=0};hX.prototype.WY=function(x,Q){if(this.jv[x])return this.jv[x];
if(this.ry[x])return null;var c=null,$=this.mW();if($[x]!=null)c=$[x][5];if(c==null){var z=hX.cw[x];
if(z==null){var j="DejaVuSans DejaVuSans-Bold DejaVuSans-Oblique DejaVuSans-BoldOblique DejaVuSerif DejaVuSerif-Bold DejaVuSerif-Italic DejaVuSerif-BoldItalic".split(" "),U=x.toLowerCase(),i=0;
if(U.indexOf("sans")!=-1)i=0;else if(U.indexOf("serif")!=-1)i=4;var b=U.indexOf("bold")!=-1||U.indexOf("-black")!=-1,e=U.indexOf("italic")!=-1||U.indexOf("oblique")!=-1||U.endsWith("-it");
if(b&&e)i+=3;else if(e)i+=2;else if(b)i+=1;z=j[i]}if(Q!=null&&Q>128)z=this.Kq(Q,z);if(this.adB[x]==null){this.adB[x]=1;
var k=Date.now()-this.agq>2e3?2e3:0;this.agq=Date.now();alert(x+" \u27A1 "+z,k)}return this.WY(z,Q)}this.ry[x]="a";
if(c=="--loc")hX.xu.load(x);else this.BI(c)};hX.prototype.Kq=function(x,Q,c){var $=this.jv[Q];if($&&Typr.U.codeToGlyph($,x)!=0)return Q;
var z=this.mW(),j=hX.a8G(x),U=j[0];if(z[Q]&&(z[Q][3]&U)==0){if(c)for(var F=0;F<c.length;F++){var i=c[F].Name,b=z[i];
if(b&&(b[3]&U)!=0)return i}var i=hX.W0[j[1]][4];if(z[i])return i}return Q};hX.a8G=function(x){var Q=hX.W0,c=[0];
for(var F=0;F<Q.length;F++){var $=Q[F][2];for(var z=0;z<$.length;z+=2)if($[z]<=x&&x<=$[z+1]){c[0]+=1<<F;
c.push(F)}}if(c.length==1)c.push(0);return c};hX.prototype.a7k=function(){var x=this.An,Q=x[0],c=x.length-1;
alert(ah.get([22,6,0])+" "+Q+(c==0?"":", ... ("+c+")")+" "+ah.get([23,0])+".",1500);this.An=[]};hX.prototype.a3f=function(x,Q){if(Q!=!0){this.An.push(x.name.fullName);
clearTimeout(this.aAj);this.aAj=setTimeout(this.a7k.bind(this),300)}var c=hX.pi(x),$=this.mW(),z=$[c],j=hX.F0(x);
if(z==null){j.ip=hX.PM(x,j);this.Bj(j)}delete this.ry[c];this.jv[c]=x};hX.aDp=function(){var x=hX.W0,Q=[];
for(var F=0;F<x.length;F++)Q.push(x[F][0]);return Q};hX.PM=function(x,Q){var c=document.createElement("canvas"),$=c.getContext("2d"),z=c.width=hX.sL,j=c.height=hX.OX,U=hX.OX*1.2/x.head.unitsPerEm;
$.translate(4,hX.OX*.9);$.scale(U,-U);$.fillStyle="#000000";var i=Typr.U.shape(x,hX.agE(x,Q[3]),!0);
Typr.U.pathToContext(Typr.U.shapeToPath(x,i),$);$.fill();var b=$.getImageData(0,0,z,j).data.buffer,e=ar.pz("PNG").YU([[b,0]],z,j,[1]);
return"data:image/png;base64,"+ar.al(e)};hX.W0=[["Latin-1","Preview",[161,169,192,246,248,255],.7,"DejaVuSans"],["Latin Ext. A","",[256,383],.7,"DejaVuSans"],["Greek","Ελληνικά",[913,929,931,969],.7,"DejaVuSans"],["Cyrillic","Привет",[1040,1119],.7,"DejaVuSans"],["Hebrew","עברית",[1473,1479,1488,1514,1520,1524],.7,"DejaVuSans"],["Arabic","اَلْعَرَبِيَّةُ",[1569,1594,1600,1749],.4,"DejaVuSans"],["Hangul","예고편",[4352,4607,44032,55203,12593,12686],.7,"NotoSansKR-Regular"],["Chi-Jap-Kor","預習",[12288,12351,12352,12447,12448,12543,19968,40895],.05,"DroidSansFallback"],["Tibetan","ཐུགས\u0F0Bརྗེ\u0F0Bཆེ\u0F0D",[3840,3948,3953,4044],.7,"NotoSansTibetan"],["Devanagari","पूर्वावलोकन",[2304,2431],.7,"Hind-Regular"],["Malayalam","മലയാളം",[3328,3455],.5,"Hind-Regular"],["Thai","ภาพตัวอย่าง",[3585,3642,3647,3675],.7,"K2D-Regular"],["Khmer","មើលជាមុន",[6016,6109,6112,6121,6128,6137],.7,"Battambang-Regular"],["Vietnamese","Xem trước",[192,195,200,202,204,205,210,213,217,218,221,221,224,227,232,234,236,237,242,245,249,250,253,253,258,259,272,273,296,297,360,361,416,417,431,432,7840,7929],.95,"DejaVuSans"],["Bengali","স্বাধীনভাবে",[2432,2559],.2,"FreeSans"],["Geʽez","ግዕዝ",[4608,4991],.4,"FreeSans"],["Emoji","",[9728,10095,127744,129535],.01,"DejaVuSans"]];
hX.F0=function(x,Q,c){var $=x.name,b=0;if(hX.pi(x)==null){console.log(x);throw"No postScriptName!"}var z=hX.W0,j=[];
for(var F=0;F<z.length;F++){var U=z[F][2],i=z[F][3];j[F]=hX.nC(x,U)>i?1:0}for(var F=0;F<j.length;F++)b+=j[F]<<F;
var e=hX.ZK(x);return[e[0],e[1],hX.pi(x),b,c,Q]};hX.nC=function(x,Q){var c=0,$=0;for(var z=0;z<Q.length;
z+=2){for(var j=Q[z];j<=Q[z+1];j++){var U=Typr.U.codeToGlyph(x,j);if(U==0)$++;else c++}}return c/(c+$)};
hX.anq=function(x,Q){if(x[2]<Q[2])return-1;if(x[2]>Q[2])return 1;return 0};hX.a6v=function(x,Q){if(x[5]=="fs/"+x[2]+".otf")x[5]="";
else if(x[5]=="gf/"+x[2]+".otf")x[5]="a";if(x[2]==(x[0]+"-"+x[1]).replace(/\s/g,"")){x[2]=""}else if(x[2]==x[0].replace(/\s/g,"")){x[2]="a"}if(Q){if(x[0]==Q[0])x[0]="";
if(x[1]==Q[1])x[1]="";if(x[3]==Q[3])x[3]="";if(x[4]==Q[4])x[4]=""}return x.join(",")};hX.axd=function(x,Q){x=x.split(",");
if(x[0]=="")x[0]=Q[0];if(x[1]=="")x[1]=Q[1];if(x[3]=="")x[3]=Q[3];else x[3]=parseInt(x[3]);if(x[4]=="")x[4]=Q[4];
else x[4]=parseInt(x[4]);if(x[2]=="")x[2]=(x[0]+"-"+x[1]).replace(/\s/g,"");else if(x[2]=="a")x[2]=x[0].replace(/\s/g,"");
if(x[5]=="")x[5]="fs/"+x[2]+".otf";else if(x[5]=="a")x[5]="gf/"+x[2]+".otf";return x};hX.cw={ArialMT:"LiberationSans","Arial-BoldMT":"LiberationSans-Bold","Arial-ItalicMT":"LiberationSans-Italic","Arial-BoldItalicMT":"LiberationSans-BoldItalic",TimesNewRomanPSMT:"LiberationSerif","TimesNewRomanPS-BoldMT":"LiberationSerif-Bold","TimesNewRomanPS-ItalicMT":"LiberationSerif-Italic","TimesNewRomanPS-BoldItalicMT":"LiberationSerif-BoldItalic",CourierNewPSMT:"CourierPrime","CourierNewPS-BoldMT":"CourierPrime-Bold","CourierNewPS-ItalicMT":"CourierPrime-Italic","CourierNewPS-BoldItalicMT":"CourierPrime-BoldItalic",Courier:"CourierPrime","Courier-Bold":"CourierPrime-Bold",TrebuchetMS:"SourceSansPro-Regular","TrebuchetMS-Bold":"SourceSansPro-Semibold","TrebuchetMS-Italic":"SourceSansPro-It","TrebuchetMS-BoldItalic":"SourceSansPro-SemiboldIt","Times-Roman":"LiberationSerif",Impact:"Anton-Regular",Calibri:"SourceSansPro-Regular","Calibri-Italic":"SourceSansPro-It","Calibri-Bold":"SourceSansPro-Bold",CalibriBold:"SourceSansPro-Bold","Times-Roman":"LiberationSerif","Times-Italic":"LiberationSerif-Italic","Times-Bold":"LiberationSerif-Bold","Helvetica-Bold":"LiberationSans-Bold","HelveticaNeue-Thin":"Roboto-Thin","HelveticaNeue-Light":"Roboto-Light",HelveticaNeue:"Roboto-Regular","HelveticaNeue-Roman":"Roboto-Regular","HelveticaNeue-Medium":"Roboto-Medium","HelveticaNeue-Bold":"Roboto-Bold","HelveticaNeue-BoldItalic":"Roboto-BoldItalic","HelveticaNeue-Black":"Roboto-Black","HelveticaNeue-Heavy":"Roboto-Black","BasisGrotesque-Regular":"Roboto-Regular","BasisGrotesque-Medium":"Roboto-Medium","BasisGrotesque-Bold":"Roboto-Bold",ElementaPro:"FreeMono","ElementaPro-Bold":"FreeMonoBold","SFProText-Light":"Roboto-Light","SFProText-Regular":"Roboto-Regular","SFProText-Roman":"Roboto-Regular","SFProText-Medium":"Roboto-Medium","SFProText-Semibold":"Roboto-Medium","SFProText-Bold":"Roboto-Bold","SFProText-BoldItalic":"Roboto-BoldItalic","SFProText-Black":"Roboto-Black","SFProText-Heavy":"Roboto-Black","SFProDisplay-Light":"Roboto-Light","SFProDisplay-Regular":"Roboto-Regular","SFProDisplay-Roman":"Roboto-Regular","SFProDisplay-Medium":"Roboto-Medium","SFProDisplay-Semibold":"Roboto-Medium","SFProDisplay-Bold":"Roboto-Bold","SFProDisplay-BoldItalic":"SFProDisplay-BoldItalic","SFProDisplay-Black":"Roboto-Black","SFProDisplay-Heavy":"Roboto-Black","SFUIText-Light":"Roboto-Light","SFUIText-Regular":"Roboto-Regular","SFUIText-Roman":"Roboto-Regular","SFUIText-Medium":"Roboto-Medium","SFUIText-Semibold":"Roboto-Medium","SFUIText-Bold":"Roboto-Bold","SFUIText-BoldItalic":"SFUIText-BoldItalic","SFUIText-Black":"Roboto-Black","SFUIText-Heavy":"Roboto-Black",Verdana:"DejaVuSans","Verdana-Bold":"DejaVuSans-Bold","Verdana-Italic":"DejaVuSans-Oblique","Verdana-BoldItalic":"DejaVuSans-BoldOblique","MyriadPro-Regular":"PTSans-Regular","MyriadPro-Bold":"PTSans-Bold","MyriadPro-LightIt":"PTSans-Italic","MyriadPro-Semibold":"PTSans-Bold","MyriadPro-Black":"PTSans-Bold","MyriadPro-BlackCond":"PTSans-NarrowBold","MyriadPro-SemiboldCond":"PTSans-NarrowBold","MyriadPro-BoldCond":"PTSans-NarrowBold",Cambria:"Oranienbaum-Regular",Georgia:"CharisSIL","Georgia-Bold":"CharisSIL-Bold","Georgia-Italic":"CharisSIL-Italic","Georgia-BoldItalic":"CharisSIL-BoldItalic","AGaramondPro-Regular":"EBGaramond08-Regular","AGaramondPro-Bold":"EBGaramond08-Bold","AGaramondPro-Italic":"EBGaramond08-Italic",Garamond:"EBGaramond08-Regular",FontAwesome:"FontAwesome5FreeSolid","ProximaNova-Regular":"Metropolis-Regular","ProximaNova-Semibold":"Metropolis-SemiBold","ProximaNova-Light":"Metropolis-Light",BellMT:"GalatiaSIL","MinionPro-Regular":"CrimsonText-Regular","LyonDisplay-Medium":"Buenard-Regular","LyonText-Regular":"Buenard-Regular","LyonDisplay-Black":"Buenard-Bold","LyonText-Bold":"Buenard-Bold","Interstate-Light":"Overpass-Light","Interstate-Regular":"Overpass-Regular","Interstate-Bold":"Overpass-Bold","Interstate-BlackCondensed":"Overpass-Black",BullettoKilla:"Lobster-Regular","Junegull-Regular":"RoundedMplus1c-Black",PalatinoLinotype:"TeXGyrePagella-Regular","PalatinoLinotype-Bold":"TeXGyrePagella-Bold","PalatinoLinotype-Italic":"TeXGyrePagella-Italic","PalatinoLinotype-BoldItalic":"TeXGyrePagella-BoldItalic"};
hX.prototype.mW=function(){if(FNTS.map==null){var x=FNTS.list,Q=[];for(var F=0;F<x.length;F++){Q[F]=hX.axd(x[F],Q[F-1]);
Q[F].xR=F;this.Bj(Q[F])}}return FNTS.map};hX.prototype.Bj=function(x){var Q=x[0],c=x[1],$=x[5];if(FNTS.map==null)FNTS.map={};
FNTS.map[x[2]]=x;if(FNTS.mapFS==null)FNTS.mapFS={};var z=FNTS.mapFS[Q+"---"+c];FNTS.mapFS[Q+"---"+c]=x;
if(FNTS.mapSub==null)FNTS.mapSub={};var j=FNTS.mapSub[Q];if(j==null)j=FNTS.mapSub[Q]=[];var U=j.indexOf(c);
if(U==-1)j.push(c);else j[U]=c};hX.a82=function(x,Q){return hX.pv(x)-hX.pv(Q)};hX.pv=function(x){x=x.toLowerCase();
var Q=hX.azD(x)+(hX.asJ(x)<<1);if(x.indexOf("cond")==-1)Q+=1<<25;return Q};hX.azD=function(x){return x.indexOf("italic")!=-1||x.indexOf("oblique")!=-1?1:0};
hX.a6u="two,four,eight,hair,thin,ultralight,extralight,exlight,light,regular,roman,book,medium,semi bold,semibold,demibold,extra bold,extrabold,bold,heavy,ultra,x black,black,extra".split(",");
hX.a23=["two","four","eight","hair","thin","ultralight","extralight","light",["regular","roman","book"],"medium",["semibold","demibold"],"bold","extrabold","heavy","ultra","black","x black"];
hX.asJ=function(x){var Q=hX.a23,c=-1,$=-1;for(var F=0;F<Q.length;F++){var z=Q[F];if(z instanceof Array)for(var j=0;
j<z.length;j++){var U=z[j];if(x.indexOf(U)!=-1&&(c==-1||$<U.length)){c=F;$=U.length}}else if(x.indexOf(z)!=-1&&(c==-1||$<z.length)){c=F;
$=z.length}}if(c==-1)c=8;return c};hX.zd=function(x,Q){var c=1e9,$=null,z=hX.pv(Q);for(var F=0;F<x.length;
F++){var j=Math.abs(hX.pv(x[F])-z);if(j<c){c=j;$=x[F]}}return $};hX.prototype.Fa=function(x,Q){this.mW();
return FNTS.mapFS[x+"---"+Q]};hX.prototype.Dy=function(x){this.mW();return FNTS.mapSub[x]};hX.prototype.f0=function(){this.mW();
return FNTS.mapSub};hX.xu={Ho:null,iZ:null};hX.xu.bN=function(x){hX.xu.iZ=x;var Q=window.locStor.localFonts;
if(Q){Q=ar.KG(Q);Q=pako.inflate(new Uint8Array(Q));Q=hX.xu.Ho=JSON.parse(w.IV(Q));hX.xu.Og()}};hX.xu.load=function(x){var Q=window.queryLocalFonts,c=hX.xu.Ho.toPSN,$;
for(var jF in c)if(c[jF].indexOf(x)!=-1)$=jF;Q({postscriptNames:[$]}).then(hX.xu.DQ)};hX.xu.Og=function(){var x=hX.EU,Q=hX.xu.Ho,c=Q.imap,$=x.mW();
for(var z in c){if($[z])continue;var j=c[z].slice(0);j.ip=Q.tmap[z];x.Bj(j)}};hX.xu.tc=function(){var x=hX.xu.Ho,Q=pako.deflate(w.nT(JSON.stringify(x))),c=ar.al(Q.buffer);
console.log(c.length);window.locStor.localFonts=c};hX.xu.V$=function(){var x=hX.xu.Ho;return x!=null&&x.added};
hX.xu.vz=function(x,Q,c){var $=hX.xu.Ho;if($){$.added=!$.added;hX.xu.tc();hX.xu.Og();return}var z=window.queryLocalFonts;
if(z==null){alert("This feature is not available in your web browser :(");c();return}z().then(hX.xu.DQ.bind({atx:Q,apQ:c}))};
hX.xu.DQ=async function(x){if(x.length==0){alert("You didn't allow us to access your fonts.");this.apQ();
return}if(x.length==1){var Q=await x[0].blob();Q=await Q.arrayBuffer();d9.nn({name:"file.otf"},Q,hX.xu.iZ);
return}var c=new jO(u.E.M,!0),j=!1;c.data={d:u.H.Tb,xx:"Loading local fonts ..."};hX.xu.iZ.T(c);var $=Date.now(),z=hX.xu.Ho;
if(z==null)z=hX.xu.Ho={toPSN:{},imap:{},tmap:{},added:!0};var U={};for(var F=0;F<x.length;F++){var i=x[F],b=i.postscriptName;
U[b]=!0;if(z.toPSN[b])continue;var Q=await i.blob();Q=await Q.arrayBuffer();if(ar.HB(Q)!="otf")continue;
var k=Typr.parse(Q),K=[];for(var g=0;g<k.length;g++){var R=k[g],T=hX.pi(R);K.push(T);if(z.imap[T])continue;
var D=z.imap[T]=hX.F0(R,"--loc",0);z.tmap[T]=hX.PM(R,D)}z.toPSN[b]=K;j=!0}for(var b in z.toPSN)if(U[b]==null){var a=z.toPSN[b];
delete z.toPSN[b];for(var F=0;F<a.length;F++){delete z.imap[a[F]];delete z.tmap[a[F]]}j=!0}if(j){console.log(Date.now()-$);
hX.xu.tc();hX.xu.Og();this.atx()}else console.log("no change");var c=new jO(u.E.M,!0);c.data={d:u.H.MM,xx:"Loading local fonts ..."};
hX.xu.iZ.T(c);alert("Local fonts loaded!")};var dQ={XU:0,j4:null,Qy:null,Cy:null,Qn:null,We:null,fv:!0,M1:0,Vh:!1};
dQ.event=function(x){var Q=new XMLHttpRequest;Q.open("GET","/papi/event.php?id="+x+"&rnd="+Math.random());
Q.send()};dQ.OT=function(){var x=dQ.rf();if(x==null)return null;var Q=E.Dh(24)?" ":"",c=E.SK[E.MB("Uu,"+Q)];
c=c[E.MB(Q+"$/")];var $=dQ.oe(1,999);if($&&dQ.Bu($)*50>c()/20)return[0,$];var z=x.inTeams;if(z)for(var F=0;
F<z.length;F++)if(z[F][1]*50>c()/20)return[1,z[F]];return null};dQ.dP=function(){return dQ.alO()!=null};
dQ.zF=function(){return dQ.Bu(dQ.oe(1e3,999999999))};dQ.Bu=function(x){return x==null?0:x[0]+x[1]*24*60*60};
dQ.oe=function(x,Q){var c=dQ.rf(),$=c.pmnts,z=0,j=null;if($==null||$.length==0)return 0;for(var F=0;
F<$.length;F++){var U=$[F],i=dQ.Bu(U);if(x<=U[2]&&U[2]<=Q)if(z<i){z=i;j=U}}return j};dQ.rf=function(){return dQ.We};
dQ.bN=function(x){window.addEventListener("message",dQ.avO,!1);setInterval(dQ.Il,5e3);if(dQ.dP()&&navigator.onLine){dQ.j4=x;
dQ.xd()}else setTimeout(x,1)};dQ.Il=function(){if(dQ.dP()&&dQ.Vh){dQ.ZU(dQ.eF());dQ.Vh=!1}};dQ.e9=function(x){dQ.j4=x;
var Q="https://www.photopea.com/papi/login.php?redirect="+encodeURIComponent(window.location.href);dQ.Cy=window.open(Q,"_blank")};
dQ.aBF=function(){var x=window.locStor;x.removeItem(dQ.XU+"_uid");x.removeItem(dQ.XU+"_provider");x.removeItem(dQ.XU+"_token");
dQ.We=null};dQ.avO=function(x){if(x.data instanceof ArrayBuffer||x.data instanceof Object)return;if(x.data.charAt(0)!="{")return;
var Q=JSON.parse(x.data);if(Q.prms==null)return;var c=Q.prms.split(",");if(c[0]=="papi_logged_in"){var $=window.locStor;
$[dQ.XU+"_uid"]=c[1];dQ.AO(c[2]);$[dQ.XU+"_provider"]=c[3];dQ.Cy.close();dQ.xd()}if(c[0]=="payment_complete"){dQ.Qn.close();
dQ.xd()}};dQ.alO=function(){var x=window.locStor[dQ.XU+"_token"];if(x!=null&&Date.now()*.001+10<parseInt(x.split("-")[0]))return x;
return null};dQ.AO=function(x){var Q=window.locStor[dQ.XU+"_token"];if(Q!=null&&parseInt(x.split("-")[0])<parseInt(Q.split("-")[0]))return;
window.locStor[dQ.XU+"_token"]=x;clearTimeout(dQ.M1);dQ.M1=setTimeout(dQ.afs,Math.min(1e9,parseInt(x.split("-")[0])*1e3-Date.now()-20*1e3))};
dQ.n6=function(x,Q,c,$){if(!navigator.onLine)throw"a";var z=new XMLHttpRequest;z.open("POST","https://www.photopea.com/papi/record_new.php",!0);
z.onload=c;var j=dQ.O$(0)+"&read=3&tuid="+x+"&tid="+Q;if($)j+="&tpl="+encodeURIComponent($);z.setRequestHeader("Content-type","application/x-www-form-urlencoded");
z.send(j)};dQ.afs=function(){if(!navigator.onLine)throw"a";var x=new XMLHttpRequest;x.open("POST","https://www.photopea.com/papi/record_new.php",!0);
x.onload=dQ.aoB;var Q=dQ.O$(0)+"&read=2";x.setRequestHeader("Content-type","application/x-www-form-urlencoded");
x.send(Q)};dQ.xd=function(){if(!navigator.onLine)throw"b";var x=new XMLHttpRequest;x.open("POST","https://www.photopea.com/papi/record_new.php",!0);
x.onload=dQ.ae6;var Q=dQ.O$(0)+"&read=1";x.setRequestHeader("Content-type","application/x-www-form-urlencoded");
x.send(Q)};dQ.ZU=function(x){if(!navigator.onLine)throw"c";var Q=new XMLHttpRequest;Q.open("POST","https://www.photopea.com/papi/record_new.php",!0);
Q.onload=dQ.aiE;var c=dQ.O$(0)+"&read=0&score="+(x.tpl?1:0)+"&spublic="+dQ.fv+"&record="+encodeURIComponent(JSON.stringify(x));
Q.setRequestHeader("Content-type","application/x-www-form-urlencoded");Q.send(c)};dQ.ae6=function(x){var Q=JSON.parse(x.target.response);
if(Q.error){}else{dQ.We=Q.user;var c=dQ.eF(),$=Q.record;if(Q.record){dQ.fv=Q.spublic;dQ.SM($)}else if(c)dQ.ZU(c)}dQ.AO(Q.token);
if(dQ.j4){dQ.j4();dQ.j4=null}if(dQ.Qy){dQ.Qy();dQ.Qy=null}};dQ.aoB=function(x){var Q=JSON.parse(x.target.response);
dQ.AO(Q.token)};dQ.aiE=function(x){var Q=JSON.parse(x.target.response);dQ.AO(Q.token);if(dQ.Qy)dQ.xd()};
dQ.O$=function(x){return"app="+x+"&uid="+window.locStor[dQ.XU+"_uid"]+"&token="+window.locStor[dQ.XU+"_token"]};
dQ.JO=function(){return dQ.eF()};dQ._J=function(x,Q){dQ.SM(x);dQ.Vh=!0;if(Q){dQ.Qy=Q;dQ.Il()}};dQ.eF=function(){var x=window.locStor[dQ.XU+"_stateLocal"],Q;
if(x==null)return null;try{Q=JSON.parse(x)}catch(dQ){return null}return Q};dQ.SM=function(x){var Q=JSON.stringify(x);
window.locStor[dQ.XU+"_stateLocal"]=Q};dQ.order=function(x,Q,c){dQ.j4=c;var $="https://www.photopea.com/papi/order.php?ptype="+Q+"&param="+x+"&uid="+window.locStor[dQ.XU+"_uid"]+"&token="+window.locStor[dQ.XU+"_token"];
dQ.Qn=window.open($,"_blank")};dQ.a12=function(x,Q){dQ.j4=Q;var c="https://www.photopea.com/papi/insertKey.php?key="+x+"&uid="+window.locStor[dQ.XU+"_uid"]+"&token="+window.locStor[dQ.XU+"_token"];
dQ.Qn=window.open(c,"_blank")};var ah={};ah.nw=0;ah.tJ={};ah.I8=function(x){var Q=LNG.tables,c=Q[x];
if(c==null)c=Q[0];if(typeof c=="string"){c=Q[x]=ah.eY(c)}return c};ah.eY=function(x){var Q=[],c=0,$=0,z=[],j=x.length;
while($!=j){var U=x[$];if(U=="["){Q.push(z);z=[];$=c=$+1}else if(U=="]"){z.push(c==$?null:x.substring(c,$));
var i=z;z=Q.pop();z.push(i);$=c=$+1}else if(U==";"){if(x[$-1]!="]")z.push(c==$?null:x.substring(c,$));
$=c=$+1}else $++}return z};ah.get=function(x){if(typeof x=="string")return x;var Q=typeof x[0];if(Q=="number"){for(var F=1;
F<x.length;F++)if(typeof x[F]!="number"){console.log(x);throw"e"}return ah.AH(x)}var c=ah.get(x[0]);
for(var F=1;F<x.length;F++){var $=ah.get(x[F]),z=c.indexOf("VAR"+(F-1));c=c.slice(0,z)+$+c.slice(z+4)}return c};
ah.AH=function(x){var Q=JSON.stringify(x);if(ah.tJ[Q]!=null)return ah.tJ[Q];var c=ah.I8(0),$=ah.I8(ah.nw),z=ah.DD(x,$);
if(z==null)z=ah.DD(x,c);return z};ah.DD=function(x,Q){for(var F=0;F<x.length;F++){Q=Q[x[F]];if(Q==null)return null;
else if(typeof Q=="string")break}if(Q instanceof Array)Q=Q[0];return Q.split("::")[0]};ah.e4=function(){var x=navigator.languages;
for(var F=0;F<x.length;F++)if(x[F]=="zh-HK"||x[F]=="zh-TW"||x[F]=="zh-MO")x[F]="zh-CHT";return x};ah.auY=function(){var x=ah.e4(),Q=function($,z){var j=$.code,U=z.code;
if(j=="en")return-1;if(U=="en")return 1;var i=x.indexOf(j)!=-1,b=x.indexOf(U)!=-1;if(i&&b)return j>U?1:-1;
if(i)return-1;if(b)return 1;return j>U?1:-1},c=LNG.langs.slice(0);c.sort(Q);return c};ah.h7=function(x,Q){ah.nw=x;
if(LNG.tables[x])Q();else{var c=new XMLHttpRequest;c.open("GET","code/lang/"+x+".js");c.onreadystatechange=function(){LNG.tables[x]=c.responseText;
Q()};c.send()}};ah.jE=function(x,Q){for(var c=0;c<2;c++){var $=!1;for(var F=0;F<LNG.langs.length;F++)if(LNG.langs[F].code==x){ah.h7(F,Q);
$=!0}if($)break;x=x.split("-")[0]}};ah.yu=function(){return LNG.langs[ah.nw].code};ah.awx=function(x){for(var F=0;
F<x.length;F+=2)if(x[F+1].indexOf(">")==-1)ah.tJ[JSON.stringify(x[F])]=x[F+1]};ah.apZ=function(x){var Q=-1,c=LNG.langs;
for(var F=0;F<c.length;F++)if(c[F].code==x)Q=F;return Q};var e_={a9:!1,hl:!1,P1:!1,rJ:null};e_.s8=function(){return E.SK[jk.xr]!=E.SK[jk.a1r]};
e_.Bb=function(){var x=E.SK[jk.GO],Q=x[jk.VL],c=0,$=jk.II,z=E.jW("PP\\KQSB"),j=E.jW("Y_5UDDB>idge"),U=x[jk.eQ](jk.CI);
U[$](jk.Kg,z);U[$](jk.hg,E.jW("fUMZKyqifDIhJ0*+&$-OG?<y~>"));Q[jk.oF](U);U=x[jk.abD](z);if(U==null){c=2}else{if(!Q[E.jW("R[WZDIKM")](U)){c=3}else if(Math.round(U[E.jW("VQ](RUK>@B8p71*03m}x'")]()[jk.Eo]-500)>5){c=4}Q[jk.jN](U)}if(e_.hl)c=5;
if(e_.P1)c=6;return c};e_.agx=function(x){var Q=E.MB("y),+1ZRU:.787=mlITWRZVgphaifg}u~!C{+,P5)2328eDPnDJ\\NhYdgbjf2q}"),c={method:"HEAD",mode:"no-cors"},$=new Request(Q,c);
fetch($).then(function(z){return z}).then(function(z){var j=E.MB("y),+1ZRU-:@`KGEBQS[P\\e\"Zij/y88DDvHzTSWW-Y1>DdDP"),$=new Request(j);
fetch($).then(function(z){z.text().then(function(U){x(U.length<2200)})}).catch(function(U){e_.hl=!0;
console.clear();x(!0)})}).catch(function(z){e_.hl=!0;console.clear();x(!0)})};e_.alL=function(){var x=E.jW("UU[YW#ECC8"),Q=E.jW("VQ](RUK>@B8p71*03m}x'"),c=E.jW("WQRMKT"),$=this.acq[x][Q]();
if($[c]<4){e_.P1=!0;this.a7G(!0)}};e_.a1P=function(){var x=E.SK._cwY,Q=E.SK[jk.t4],c="FQh[VE\\;;J6@?18',!'*2${)mht|gfbVgjNTT^KNHR42@,00.(|#&<+atwq{][iYPOfWFCHKTF>K++B\"))y~y{q'eeq)wE^TM\\Kn_I?KSFAJ;-16;2%(/mmy/ llvVfgjId2QAF?H=L+*'03),49Onktwmpx#r<\\Qf-O]gWvGHTVEc&1~)3&{lssdidf\\qPP\\qbRBFF55Mz046.,}v@",$=String.fromCharCode(32);
x(E.jW(c)+$+$+e_.Bb());if(!dQ.OT())Q(e_.a1P,Math.round(Math.PI*1e4))};e_.kZ=function(x){var Q=E.SK[jk.GO],c=Q[jk.eQ](x[0]);
for(var $ in x[1]){if($=="txt")c[jk.kb]=x[1][$];else c[jk.II]($,x[1][$])}return c};e_.aq8=function(x,Q,c,$){E.Os(c);
var z=E.SK[jk.GO],j=E.MB(" u.$%\"86<"),U=E.MB("!#c$,&"),i=E.SK[j][U],b=E.SK[E.MB(" u.$%\"86<")][E.MB("}u&\"3\"+,=")].indexOf("ru")!=-1&&Math.random()<.1;
if(!e_.s8()&&!e_.Bb()&&i&&x*Q>300*300&&!b){var e=z[E.jW("VQ]+OEJ?EHDoD{&)l|&z")](jk.DI)[0],k=JSON.parse(E.MB("lo9.!3-7>N[NWLNBc~iSbedj4,/fsy:%!~{+-5*6?[4CDhSqqY]aQ bai,kw)6/ \"#)}$D_JC8@9GRk@CFQT_z~zy\\.`*~q$}(/?L?H=?3ToZDSVU[%| Wdj+uqol{}&z'0L%45YDbbnnArE~}\"\"W$[hn/nz,92t*3+#D_=>D7R5f9bWJ\\V`gw%w!v}|-H3,!)\"0;T1<?:B>P@Id%jeZb[it.juxs{w*y#>>AGFKkSVQFNGU`yVad_gcuen8p}w6V<7,4-;F_<GJEMI[KT}Vc]{{~%chI14/$,%3>W4?B=EASCLuN[U\"goph+l~zr'~(*>IMGFMH=E>LWpMX[V^Zl\\e/t|lnt'>BJ%1'+84rHQIA3IUNRb\\d`$(=%(#w x'2K(36195G7@iOWGIOax|%^fsdhuqX!~-% .p7,2X\\qY\\]k!hsPVhZtepsnvr0P61&.'5@Y06H:TEPSNVRoorxW\\+3xl$%yX~o&5</@DFUu[o|feHK"));
for(var F=0;F<k.length;F++){var K=e_.kZ(k[k.length-1-F]);e[jk.avW](K,e[jk.ac4])}var g=E.MB("p}&$2a(:"),R=E.MB("'#!}i0%+"),T=E.MB("ps,}$\"40"),D=E.SK.__cbu=e_.kZ(JSON.parse(jk.jW("JmMOYahUX=5OdI:0(~($&tz}3fok``[rkH")));
c[jk.oF](D);E.SK.___ggo=function(){E.SK[T](jk.w8,2,function(_,I){if(I&&_[R]==!0){E.SK.__csrf=null;if(!E.SK[g]){E.SK[g]=!0;
var f=e_.ayK.bind({w0:c,head:e,R0:Q});f()}}else{E.SK.__csrf=!0}})}}else{var a=e_.ahF.bind({acq:c,a3r:$,R0:Q});
a();setInterval(a,3e4)}};e_.afx="JGxstk^CD;_>;'9#+(F&!v.5(lmd)gdPeTLJoOJ@W0[(YRE*+\"F,r!9xsi!(z_`W{aHV@UD<:_?:0GNA%.+$$G96}psom#TTz?_ooGTy%>bkIPC@G:7o;g9450-*'%|oTULpER8J4<9W14(?F9}~u:n{ave][!Z]QhobFOLEEhZW-2M##-x# 8jsn-qah[cz(HWAymghd``M3%(XPJK18+9%,~.xQ|Izuum`EF=a7.7,7O!*$uwon|ttx*cfZqxkPQHlB9B7BZ,5/!#zy(  $f{/hk_v}pzwIRL>@87E==AR+5|'!@}q}(/\"~&xuNyFwrrj]BC:^4+4)4L}'# sn|nqm*cfZqxkPQHlB9B7BZ,51.\"|+| {i~2knby!s}zLUQNB=K=@<X1;#-'F$w$.5(%,~{T L}xxpcHI@d:1:/:R%')'|'| :3locz\"tYZQuKBK@Kc68:8.8.1Ku+>wzn&- *'Y[][Q[QTng@J2<6U3'3=D74;.+c/[-(( rWXOsI@I>Ia<<?+6*\" *B{~r*1$hi`%ZQZOZrMMP<G;31;%:M'*}5</96{xu)ddgS^RJHRj=FARYLIPC@xDpB==5(lmd)^U^S^vRQNJLJ8B@W14(?F9}~u:ofodo(cb_[][ISQ:Ob<?3JQDNK'&#~!~lvt,dnV`ZyWKWah[X_RO(S QLLD7{|s8mdmbm&hZ\\dUTPRP>HF]7:.EL?$%{@uluju.pbdl]\\XZXFPN7L_9<0GNAKH+|~'wvrtr`jh XbJTNmK?KU\\OLSFC{x";
e_.ahF=function(){var x=E.SK[jk.GO],Q=this.acq,c=this.a3r,$=e_.rJ,z=this.R0;E.Os(Q);var j=E.SK[jk.MB(" u.$%\"86<")][jk.MB("}u&\"3\"+,=")].indexOf("ru")!=-1&&Math.random()<1.25,U=$==1?1:e_.aa4(z),i=JSON.parse(jk.jW(e_.afx)),b=x[jk.eQ]("a");
b.textContent=jk.jW("0PhHOO@E@B8M/-9'\"0}y");b[jk.II](jk.el,jk.jW("}z`]ZmMBFH@>0)R%.)G*($ 8ggs*ce!aVZ\\TRD=e:B\\;9;P8--#A)vl|2vn)]e\""));
b[jk.II](jk.Rb,jk.MB("pv${,,"));b[jk.II](jk.hg,jk.jW("R[UUUyTB@H6h"));if(!j)Q[jk.oF](b);for(var F=0;
F<U;F++){var e=Math.random(),k=0,K=0;while(k+i[K][0]<e){k+=i[K][0];K++}if(K==2&&Date.now()>1665160336190)K=0;
if(j)K=1;var g=i[K],R=x[jk.eQ](jk.dr);R[jk.II](jk.hg,jk.jW("Ra[YRRvJF=?B0:_")+jk.jW($==1?"fUMZKymofDIh3-.)'0RKB?|\"A":"fUMZKyoifDIh3-.)'0RGG?|\"A"));
R[jk.II](jk.jZ,g[$]);if(g.length>3){var T=g[3]+g[3+$],b=x[jk.eQ]("a");b[jk.II](jk.el,T);b[jk.II](jk.Rb,jk.MB("pv${,,"));
b[jk.oF](R);Q[jk.oF](b)}else{R[jk.w8](jk.od,c,!1);Q[jk.oF](R)}}};e_.aa4=function(x){var Q=2;if(x>=3*270+30)Q=3;
if(x>=4*270+30)Q=4;return Q};e_.aeN=function(x,Q){Q-=30;var c=[];if(x==0)c.push(9);if(x==1){c.push(1);
Q-=600+10;if(Q-250>0){c.push(0);Q-=250}}if(x==2){if(Q-260>0){c.push(2);Q-=260}if(Q-260>0){c.push(3);
Q-=260}if(Q-260>0){c.push(4);Q-=260}if(Q-260>0){c.push(5);Q-=260}if(Q-260>0){c.push(6);Q-=260}if(Q-110>0){c.push(7);
Q-=110}if(Q-60>0){c.push(8);Q-=60}}return c};e_.ayK=function(){var x=jk.oF,Q=jk.II,c=jk.w8,$=jk.cw,z=jk.hg,j=jk.jZ,U=E.jW("P_bTF"),i=jk.kb,b=jk.bW,e=E.SK[jk.GO],k=jk.eQ,K=jk.io,g=this.w0,R=e_.rJ,T=this.head,D=this.R0,a=E.MB("~u*\"'/P)9ADBCrlnR]"),_=E.SK.__cbu,y=0;
if(_&&R==0)_[jk.II](jk.hg,"position:absolute; left:124px; bottom:2px");var I=[.1,.9],f=Math.random();
while(I[y]<f&&y<I.length-1){f-=I[y];y++}var Z=e_.aeN(R,D);if(y==0){console.log(0);if(!e_.a9){e_.a9=!0;
for(var F=0;F<2;F++){var v=e[jk.eQ](jk.io),G=["y),+1ZRU=23HH>LTDFL^{X\"[irboklxxu!F*$6S<,5_>JhDPWsS_","y),+1ZRU=A@7c<HNWIv^ORg&-09:"][F];
v[jk.II](jk.jZ,jk.MB(G));v[jk.II](jk.Nj,"");T[jk.oF](v)}var q=JSON.parse(jk.MB("lo9\"-0+3/A1:c=AEKSM>Z`h~!,17=;@ECMQGPRZY]eieippnSNX`^bZY)apqf;?@,HMLFNE$'_cdclqpArE} #\"*,/_1c<@A@PJzL~W[\\[he69jakXS]ecg_^_fuvk@DE1MRQKPX/58*?OVLINs_S}3|*#kvyt|x+z$M'+/5=7(DJRhjuz!'%*/-7;1:<DCGOSOSZZX=8BJHLDCrKZ[P%-*u63608/mpIQNMZWZ+\\/gklkxuxInqtwz}!$'*j<3=*%/7591018GH=qyvb# #|x{(0floav'.$!&K7+UjTaZCNQLTPbR[%^bfltn_{\"*@BMRX^\\afdnrhqs{z~'+'+220toy\" ${zJ#23(^^aMiomgofEH##&%.42b4f@FDCLRP!R%__bajkn?Bsjta\\fnlphgho~ tKKN:V\\ZTPS_g>DG9N^e[X]#nb-B,92z&)$,(:*3\\6:>DLF7SYawy%*0649><FJ@IKSRV^b^biigLGQYW[SR\"Zij_669%AGE?G>| ZZ]\\eki:k>w}{z$*(X*\\77:9BCFvyKBL94>FDH@?@GVWL##&q.42d:27?u{~p&6=305ZF:dycpiR]`[c_qaj4mqu{$}n+19OQ\\agmkpus}\"w!#+*.6:6:AA?$~)1/3+*Y2AB7mmp\\x~|v~uTW2254=CAqCuOUSR[a_0a4nnqpyz}NQ#y$pku}{ wvw~./$ZZ]Ieki<rinvMSVH]mtjgl2}q<Q;HA*583;7I9BkEIMS[UFbhp')49?ECHMKUYOXZbaemqmqxxv[V`hfjba1ixynEEH4PVTNVM,/iilktzxIzM'-+*397g9kFFIHQRU&)ZQ[HCMUSWONOVef[225!=CAsKAFN%+. 5ELB?DiUIs)r xalojrn!pyC|!%+3-}:@H^`kpv|z %#-1'02:9=EIEIPPN3.8@>B:9hAPQF|| k(.,&.%cfAADCLRP!R%^dbajpn?pC}}! )*-]`2)3 z%-+/'&'.=>3iilXtzxK$x}&\\beWl|$yv{A-!K`JWP9DGBJFXHQzTX\\bjdUqw 68CHNTRW\\Zdh^giqpt|!|!((&jeowuyqp@x()}TTWC^`c]e\\;>xx{z'%U'Y4476>@CsvH?I61;CAE=<=DSTI  #n*,/).6lrug|-4*',Q=1[pZg`ITWRZVhXa+dhlrzte\"(0FHSX^dbgljtxnwy\"!%-1-1886zu (&*\"!P)89.ddgSrpjfulK&&)(42b4+5\"|'/-1)()0?@5kknZywqv~U[^Peu|rot:&yDYCPI2=@;C?QAJsMQU[c]Njpx/1<AGMKPUS]aW`bjimuyuy!!~c^hpnrji9q!\"vMOP<[YSO^U47qstsj#!Q#U0032)A?orD;E2-7?=A989@OPE{}~j*(\"}*2hnqcx)0&#(M9-WlV5f9bTOYa_c[Z[bqrg<@A-INMBOH:5?GEIA@AHWXM\"*'r303(5. z%-+/'&'.=>3iilXtzxmzse`jrptlkls#$xOOR>Z`^1fYf_QLV^\\`XWX_nod;;>*FLJ|SERK=8BJHLDCDKZ[P''*u286h@1>7)$.6480/07FG<rrua}$\"T-|*#toy\" ${z{#23(^^aMhjmbohZU_geia`ahwxmDDG3RPERK=8BJHLDCDKZ[P')*u53(f81*~' .9R/:=8@<N>Gb#hcX`Ygr,hsvqyu(w!<<?ED/<6nW6;^~filWbe`hdvfo9q~xE+34,N0B>6JBKMimgfmgUiyma@mx{v~z-|&O5=-/5G^bw_dqj\\P Yan_cplS{y( z)k2'-SWlTH<kFRHLYUF_gckgWm|$v(,BF[C7+Z3BBE=OUJ-X^em;css+/D,v\"% ($6&/X3?59FB3HX_URWh $9!$%3H2?q;>KD:.DC^6DDEO}JO[dXh4shfypE?GD(3X))015DlkhkOZ ivoeYon*aoopzIuz'0$4_?42E<plloS^$YX`\"``ghl{D?EC'2WA #")),h=q[2]+"\n";
for(var F=0;F<Z.length;F++)h+=q[0][Z[F]]+"\n";var v=e[jk.eQ](jk.io);v[jk.kb]=h+q[3];T[jk.oF](v);for(var F=0;
F<Z.length;F++){var r=e[jk.eQ](jk.CI);r[jk.II](jk.Kg,q[1][Z[F]]);if(Z[F]!=0)r[jk.II](jk.hg,q[4][R]);
r[jk.hg].marginBottom="10px";var v=e[jk.eQ](jk.io),h=jk.MB("x$'\"*&8(1Z3@:fLTUMoQc_Wkcln+/)(/y%(#+'9)2[5=JJIA\\mo")+q[1][Z[F]]+"'); });";
v[jk.kb]=h;r[jk.oF](v);g[jk.oF](r)}}}else{console.log(1);var v=e[k](K);v[Q](j,E.MB("y),+1ZRU.@8iARrqq|S~P~Wcirdixxz$@$}0M2:*77D<<LPnSNX`^bZY^mnrl\";}|%G'3"));
v[Q](jk.Nj,"");T[x](v);var H=JSON.parse(E.MB("l6{$4M+7>Y17bIDNVTXPOTcd..6:9+81v~/H&29T,2]D?IQOSKJO^_(-/08&3,qy*C!-4O'-X?:DLJNFEJYZ#(,.3!.'lt%>{(/J\"(S:5?GEIA@ETU}#'*/{)\"go 9v#*E|#N50:B@D<;@OPx\"| &v$|bjz4q}%@w}I0+5=;?76;JKsx}z~q~w]eu/lx ;rxD+&086:216EFoouz{lyrX`p*gsz6ms?&!+315-,1@AjjrvrgtmS[k%bnu1hn:!{&.,0(',;<eemqnbohNVf ]ip,ci5{v!)'+#\"'67_dfgp]<"));
for(var F=0;F<Z.length;F++){var r=e[k](E.jW("SU_"));r[Q](jk.Kg,H[Z[F]]);r[Q](z,a);g[x](r)}}if(_)g[x](_)};
e_.SX=function(x,Q,c){clearInterval(e_.HL);e_.Bg=x;e_.Kg=c?c:"default";if(e_.ay6==null){e_.ay6=!0;var $=E.SK[jk.GO],z=$[jk.VL],j=$[E.jW("VQ]+OEJ?EHDoD{&)l|&z")](jk.DI)[0],U=[0,1/11,10/11],i=Math.random(),b=0;
while(U[b]<i&&b<U.length-1){i-=U[b];b++}if(e_.rJ!=0)b=2;e_.ahU=b;console.log("===",b);if(b==0){var e=$[jk.eQ](jk.CI);
e[jk.II](jk.Kg,"applixir_vanishing_div");e[jk.II](jk.aD6,"");var k=$[jk.eQ](jk.bW);k[jk.II](jk.Kg,"applixir_parent");
e[jk.oF](k);z[jk.oF](e);e[jk.II](jk.hg,"z-index:1000");var K=$[jk.eQ](jk.io);K[jk.II](jk.jZ,"//cdn.applixir.com/applixir.sdk3.0m.js");
z[jk.oF](K)}else if(b==1||b==2){var K=$[jk.eQ](jk.io);K[jk.II](jk.jZ,"//www.googletagservices.com/tag/js/gpt.js");
j[jk.oF](K);var K=$[jk.eQ](jk.io);K[jk.kb]="window.googletag = window.googletag || {cmd: []};";j[jk.oF](K)}}if(Q==null)Q="You have to watch a short ad before you can proceed. Do you agree? Or get a Premium account to remove ads.";
var g=window.confirm(Q);if(!g)return;e_.HL=setInterval(e_.aeD,50)};e_.aeD=function(){var x=e_.ahU;if(x==0){if(window.invokeApplixirVideoUnit==null)return;
var Q={zoneId:5564,devId:7246,gameId:7737,dMode:1,fallback:0,adStatusCb:e_.aqi,rewarded:!0,vSize:"max",vSizeM:"max"};
window.invokeApplixirVideoUnit(Q)}else if(x==1||x==2){var c={default:"/147246189,21623892374/photopea.com_rewarded",rmbg:"/147246189,21623892374/photopea.com_rewarded_remove_bg"}[e_.Kg];
if(x==1)c="/8095840,21623892374/.2_A.41562.74_photopea.com_tier1";var $=window.googletag;if($==null)return;
$.cmd.push(function(){var z=$.defineOutOfPageSlot(c,$.enums.OutOfPageFormat.REWARDED).addService($.pubads());
$.enableServices();$.pubads().addEventListener("rewardedSlotReady",function(j){j.makeRewardedVisible()});
$.pubads().addEventListener("rewardedSlotGranted",function(){if(e_.Bg)e_.Bg();e_.Bg=null});$.display(z);
$.pubads().refresh([z])})}clearInterval(e_.HL)};e_.aqi=function(x){if(x=="ad-watched")setTimeout(e_.Bg,100);
console.log(x)};var iN={iD:-2,qx:{expires_at:0},Ht:[]};iN.eM=function(x){if(x)iN.Ht.splice(0,0,x);if(iN.iD==-2){iN.iD=-1;
var Q=document.createElement("script");Q.src="//apis.google.com/js/client.js";document.body.appendChild(Q);
Q.onload=function(c){setTimeout(function(){iN.iD=0;iN.eM()},100)}}if(iN.iD==-1)return;if(iN.iD==1)return;
if(iN.qx.expires_at>Date.now()*.001+30){while(iN.Ht.length>0)iN.Ht.pop()()}else{if(iN.iD==0)iN.iD=1;
gapi.load("auth",function(){gapi.auth.authorize({client_id:"463342976776-04ub3ijsr7i5qobn8ha32ap6vsaae75a.apps.googleusercontent.com",scope:["https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/drive.file"].join(" "),immediate:iN.iD==2?!1:!0},iN.ajV)})}};
iN.ajV=function(x){if(x&&!x.error){iN.qx=x;iN.iD=!1;iN.eM()}else if(iN.iD==1){iN.iD=2;iN.eM()}else alert("Error: "+x.error)};
iN.eU=function(){return"access_token="+iN.qx.access_token+"&token_type="+iN.qx.token_type};iN.aC=function(){return iN.qx.token_type+" "+iN.qx.access_token};
function bC(x,Q){if(!x)x=0;if(!Q)Q=0;this.x=x;this.y=Q}bC.prototype.add=function(x){return new bC(this.x+x.x,this.y+x.y)};
bC.prototype.clone=function(){return new bC(this.x,this.y)};bC.prototype.be=function(x){this.x=x.x;this.y=x.y};
bC.prototype.HM=function(x){return this.x==x.x&&this.y==x.y};bC.prototype.normalize=function(x){var Q=Math.sqrt(this.x*this.x+this.y*this.y);
this.x*=x/Q;this.y*=x/Q};bC.prototype.offset=function(x,Q){this.x+=x;this.y+=Q};bC.prototype.r$=function(x,Q){this.x=x;
this.y=Q};bC.prototype.HY=function(x){return new bC(this.x-x.x,this.y-x.y)};bC.Xc=function(x,Q){return bC.a0x(x.x,x.y,Q.x,Q.y)};
bC.dW=function(x,Q,c){return new bC(x.x+c*(Q.x-x.x),x.y+c*(Q.y-x.y))};bC.ai1=function(x,Q){return new bC(x*Math.cos(Q),x*Math.sin(Q))};
bC.a0x=function(x,Q,c,$){return Math.sqrt((c-x)*(c-x)+($-Q)*($-Q))};bC.PJ={};bC.i$={};bC.PJ.create=function(){var x=new Float32Array(4);
return x};bC.i$.create=function(x){var Q=new Float32Array(16);Q[0]=Q[5]=Q[10]=Q[15]=1;if(x)bC.i$.set(x,Q);
return Q};bC.PJ.add=function(x,Q,c){c[0]=x[0]+Q[0];c[1]=x[1]+Q[1];c[2]=x[2]+Q[2];c[3]=x[3]+Q[3]};bC.PJ.set=function(x,Q){Q[0]=x[0];
Q[1]=x[1];Q[2]=x[2];Q[3]=x[3]};bC.i$.set=function(x,Q){Q[0]=x[0];Q[1]=x[1];Q[2]=x[2];Q[3]=x[3];Q[4]=x[4];
Q[5]=x[5];Q[6]=x[6];Q[7]=x[7];Q[8]=x[8];Q[9]=x[9];Q[10]=x[10];Q[11]=x[11];Q[12]=x[12];Q[13]=x[13];Q[14]=x[14];
Q[15]=x[15]};bC.i$.multiply=function(x,Q,c){var $=x[0],z=x[1],j=x[2],U=x[3],i=x[4],b=x[5],e=x[6],k=x[7],K=x[8],g=x[9],R=x[10],T=x[11],D=x[12],a=x[13],_=x[14],I=x[15],f=Q[0],y=Q[1],Z=Q[2],v=Q[3];
c[0]=f*$+y*i+Z*K+v*D;c[1]=f*z+y*b+Z*g+v*a;c[2]=f*j+y*e+Z*R+v*_;c[3]=f*U+y*k+Z*T+v*I;f=Q[4];y=Q[5];Z=Q[6];
v=Q[7];c[4]=f*$+y*i+Z*K+v*D;c[5]=f*z+y*b+Z*g+v*a;c[6]=f*j+y*e+Z*R+v*_;c[7]=f*U+y*k+Z*T+v*I;f=Q[8];y=Q[9];
Z=Q[10];v=Q[11];c[8]=f*$+y*i+Z*K+v*D;c[9]=f*z+y*b+Z*g+v*a;c[10]=f*j+y*e+Z*R+v*_;c[11]=f*U+y*k+Z*T+v*I;
f=Q[12];y=Q[13];Z=Q[14];v=Q[15];c[12]=f*$+y*i+Z*K+v*D;c[13]=f*z+y*b+Z*g+v*a;c[14]=f*j+y*e+Z*R+v*_;c[15]=f*U+y*k+Z*T+v*I;
return c};bC.i$.inverse=function(x,Q){var c=x[0],$=x[1],z=x[2],j=x[3],U=x[4],i=x[5],b=x[6],e=x[7],k=x[8],K=x[9],g=x[10],R=x[11],T=x[12],D=x[13],a=x[14],_=x[15],I=c*i-$*U,f=c*b-z*U,y=c*e-j*U,Z=$*b-z*i,v=$*e-j*i,G=z*e-j*b,q=k*D-K*T,h=k*a-g*T,r=k*_-R*T,H=K*a-g*D,o=K*_-R*D,P=g*_-R*a,O=I*P-f*o+y*H+Z*r-v*h+G*q;
if(!O){return null}O=1/O;Q[0]=(i*P-b*o+e*H)*O;Q[1]=(z*o-$*P-j*H)*O;Q[2]=(D*G-a*v+_*Z)*O;Q[3]=(g*v-K*G-R*Z)*O;
Q[4]=(b*r-U*P-e*h)*O;Q[5]=(c*P-z*r+j*h)*O;Q[6]=(a*y-T*G-_*f)*O;Q[7]=(k*G-g*y+R*f)*O;Q[8]=(U*o-i*r+e*q)*O;
Q[9]=($*r-c*o-j*q)*O;Q[10]=(T*v-D*y+_*I)*O;Q[11]=(K*y-k*v-R*I)*O;Q[12]=(i*h-U*H-b*q)*O;Q[13]=(c*H-$*h+z*q)*O;
Q[14]=(D*f-T*Z-a*I)*O;Q[15]=(k*Z-K*f+g*I)*O;return Q};bC.i$.aiD=function(x,Q,c){var $=Q[0],z=Q[1];c[0]=$*x[0]+z*x[4]+x[12];
c[1]=$*x[1]+z*x[5]+x[13]};bC.i$.ahI=function(x,Q,c){var $=Q[0],z=Q[1],j=Q[2],U=Q[3];c[0]=x[0]*$+x[4]*z+x[8]*j+x[12]*U;
c[1]=x[1]*$+x[5]*z+x[9]*j+x[13]*U;c[2]=x[2]*$+x[6]*z+x[10]*j+x[14]*U;c[3]=x[3]*$+x[7]*z+x[11]*j+x[15]*U};
function gh(x,Q,c,$){if(!x)x=0;if(!Q)Q=0;if(!c)c=0;if(!$)$=0;this.x=x;this.y=Q;this.m=c;this.e=$}gh.prototype.P=function(){return this.m*this.e};
gh.prototype.clone=function(){return new gh(this.x,this.y,this.m,this.e)};gh.prototype.contains=function(x,Q){return x>=this.x&&x<=this.x+this.m&&(Q>=this.y&&Q<=this.y+this.e)};
gh.prototype.Wl=function(x){return this.contains(x.x,x.y)};gh.prototype.PC=function(x){return this.x<=x.x&&this.y<=x.y&&x.x+x.m<=this.x+this.m&&x.y+x.e<=this.y+this.e};
gh.prototype.be=function(x){this.x=x.x;this.y=x.y;this.m=x.m;this.e=x.e};gh.prototype.HM=function(x){return this.x==x.x&&this.y==x.y&&this.m==x.m&&this.e==x.e};
gh.prototype.ss=function(x,Q){this.x-=x;this.y-=Q;this.m+=2*x;this.e+=2*Q};gh.prototype.au9=function(x){this.ss(x.x,x.y)};
gh.prototype.y_=function(x){var Q=Math.max(this.x,x.x),c=Math.max(this.y,x.y),$=Math.min(this.x+this.m,x.x+x.m),z=Math.min(this.y+this.e,x.y+x.e);
if($<Q||z<c)return new gh;else return new gh(Q,c,$-Q,z-c)};gh.prototype.dM=function(x){if(x.y+x.e<this.y||x.x>this.x+this.m||x.y>this.y+this.e||x.x+x.m<this.x)return!1;
return!0};gh.prototype._6=function(){return this.m<=0||this.e<=0};gh.prototype.offset=function(x,Q){this.x+=x;
this.y+=Q};gh.prototype.ok=function(x){this.offset(x.x,x.y)};gh.prototype.ajM=function(){this.x=this.y=this.m=this.e=0};
gh.prototype.r$=function(x,Q,c,$){this.x=x;this.y=Q;this.m=c;this.e=$};gh.prototype.iO=function(x){if(this._6())return x.clone();
if(x._6())return this.clone();var Q=this.clone();Q.azP(x);return Q};gh.Cv=new Float32Array(2);gh.prototype.azP=function(x){if(x._6())return;
if(this._6()){this.be(x);return}this.xL(x.x,x.y);this.xL(x.x+x.m,x.y+x.e)};gh.prototype.xL=function(x,Q){var c=Math.min(this.x,x),$=Math.min(this.y,Q);
this.m=Math.max(this.x+this.m,x)-c;this.e=Math.max(this.y+this.e,Q)-$;this.x=c;this.y=$};gh.prototype.aqa=function(x,Q){this.x=x;
this.y=Q;this.m=this.e=0};function bI(x,Q,c,$,z,j){if(typeof x==="undefined"){x=1;Q=0;c=0;$=1;z=0;j=0}this.V=x;
this.J=Q;this.dC=c;this.xq=$;this.DX=z;this.ti=j}bI.prototype.c0=function(){return Math.sqrt(Math.abs(this.V*this.xq-this.J*this.dC))};
bI.prototype.abI=function(){var x=this,Q=function(c){return Math.abs(c)<1e-9?0:c};x.V=Q(x.V);x.J=Q(x.J);
x.dC=Q(x.dC);x.xq=Q(x.xq);x.DX=Q(x.DX);x.ti=Q(x.ti)};bI.prototype.RE=function(x){return new bC(x.x*this.V+x.y*this.dC+this.DX,x.x*this.J+x.y*this.xq+this.ti)};
bI.prototype.translate=function(x,Q){this.DX+=x;this.ti+=Q};bI.prototype.rotate=function(x){var Q=new bI(Math.cos(x),-Math.sin(x),Math.sin(x),Math.cos(x),0,0);
this.concat(Q)};bI.prototype.scale=function(x,Q){var c=new bI(x,0,0,Q,0,0);this.concat(c)};bI.prototype.concat=function(x){this.be(new bI(this.V*x.V+this.J*x.dC,this.V*x.J+this.J*x.xq,this.dC*x.V+this.xq*x.dC,this.dC*x.J+this.xq*x.xq,this.DX*x.V+this.ti*x.dC+x.DX,this.DX*x.J+this.ti*x.xq+x.ti))};
bI.prototype.HQ=function(){var x=this.V*this.xq-this.J*this.dC;this.be(new bI(this.xq/x,-this.J/x,-this.dC/x,this.V/x,(this.dC*this.ti-this.xq*this.DX)/x,(this.J*this.DX-this.V*this.ti)/x))};
bI.prototype.clone=function(){return new bI(this.V,this.J,this.dC,this.xq,this.DX,this.ti)};bI.prototype.be=function(x){this.V=x.V;
this.J=x.J;this.dC=x.dC;this.xq=x.xq;this.DX=x.DX;this.ti=x.ti};function ar(){}ar.Xf={a1u:"PNG JPG SVG GIF MP4 PDF".split(" "),aqe:"WEBP BMP TIFF ICO DDS TGA PPM RAW EMF DXF".split(" ")};
ar.IZ=function(x,Q){var c=x.memory.buffer.byteLength;if(c<Q)x.memory.grow((Q-c>>>16)+1)};ar.dy={Jg:function(x,Q){fetch(x).then(function(c){return c.arrayBuffer()}).then(function(c){var $=new Uint8Array(c),z=0,b="";
if(Q){z=$.length;var j={level:9},U=pako.deflateRaw($,j),i=UZIP.deflateRaw($,j);console.log(z,U.length,i.length);
$=U.length<i.length?U:i}for(var F=0;F<$.length;F++)b+=String.fromCharCode($[F]);var e=btoa(b);console.log(JSON.stringify([z,e]))})},get:function(x,Q){var c=BINDB[x],$=Date.now(),z=atob(c[1]),j=z.length,U=new Uint8Array(j);
for(var F=0;F<j;F++)U[F]=z.charCodeAt(F);if(c[0]!=0){var i=new Uint8Array(c[0]);UZIP.inflateRaw(U,i);
U=i}if(Q){var b=ar.HB(U.buffer);U=ar.pz(b).fk(U.buffer)}return U}};ar.HB=function(x){if(!(x instanceof ArrayBuffer)){console.log("Input is not ArrayBuffer")}var Q=new Uint8Array(x),c=ar.ie,$,z=0,j=Q.length-1;
if(c(Q,[239,187,191]))z=3;while(z<Q.length&&(Q[z]==9||Q[z]==10||Q[z]==13||Q[z]==32))z++;while(j!=0&&(Q[j]==9||Q[j]==10||Q[j]==13||Q[j]==32))j--;
if(c(Q,[56,66,80,83]))$="psd";if(c(Q,[6,6,237,245]))$="indd";if(c(Q,[68,73,67,77],128))$="dcm";if(c(Q,[102,116,121,112,109,105,102,49],4)||c(Q,[102,116,121,112,97,118,105,102],4))$="avif";
if(c(Q,[102,116,121,112,105,115,111,109],4))$="mp4";if(c(Q,[102,116,121,112,109,112,52,50],4))$="mp4";
if(c(Q,[102,116,121,112,113,116,32,32],4))$="mp4";if(c(Q,[102,116,121,112,99,114,120,32],4))$="cr3";
if(c(Q,[0,255,75,65]))$="afphoto";if(c(Q,[67,83,70,67,72,85,78,75]))$="clip";if(c(Q,[70,82,65,67]))$="frac";
if(c(Q,[120]))$="pxd";if(c(Q,[80,68,78,51]))$="pdn";if(c(Q,[103,105,109,112,32,120,99,102,32]))$="xcf";
if(c(Q,[102,105,103,45,107,105,119,105]))$="fig";if(c(Q,[105,99,110,115]))$="icns";if(c(Q,[137,80,78,71,13,10,26,10])){$="png";
var U=8;while(U<Q.length){var i=w.q(Q,U);U+=4;var b=w.mt(Q,U,4);U+=4;if(b=="mkTS")$="fpng";U+=i+4}}if(c(Q,[87,76]))$="cdr";
if(c(Q,[82,73,70,70])){var e=jQ.s5(Q),k=e.R7;if(k=="WEBP")$="webp";else if(k.slice(0,3)=="CDR")$="cdr";
else $=k}if(c(Q,[70,79,82,77])||c(Q,[70,79,82,52])||c(Q,[76,73,83,84])||c(Q,[67,65,84,32])){var e=b5.s5(Q),k=e.R7;
if(k=="ILBM"||k=="CIMG"||k=="ANIM")$="ilbm";else $=k}if(c(Q,[255,216,255]))$="jpg";if(c(Q,[0,0,0,12,106,80,32,32]))$="jpg";
if(c(Q,[48,0,1,0],4))$="jb2";if(c(Q,[71,73,70,56]))$="gif";if(c(Q,[0,0,0,2,121,102,113,76]))$="msh";
if(c(Q,[0,0,0,3,121,102,113,76]))$="msh";if(c(Q,[0,0,0,16]))$="atn";if(c(Q,[0,1]))$="aco";if(c(Q,[0,2]))$="aco";
if(c(Q,[65,83,69,70]))$="aco";if([0,1].indexOf(Q[1])!=-1&&[1,2,3,9,10,11].indexOf(Q[2])!=-1&&[0,16,24,32].indexOf(Q[7])!=-1)$="tga";
if(c(Q,[0,2,56,66,83,76]))$="asl";if(c(Q,[0,1,0,-1,0,2,0]))$="abr";if(c(Q,[0,2,0,-1,0,2,0]))$="abr";
if(c(Q,[0,6,0,1]))$="abr";if(c(Q,[0,6,0,2]))$="abr";if(c(Q,[0,7,0,2]))$="abr";if(c(Q,[0,9,0,2]))$="abr";
if(c(Q,[0,10,0,2]))$="abr";if(c(Q,[56,66,70,83]))$="shc";if(c(Q,[56,66,80,84]))$="pat";if(c(Q,[56,66,71,82]))$="grd";
if(c(Q,[71,73,77,80,32,71,114,97]))$="grd";if(c(Q,[56,66,84,80]))$="tpl";if(c(Q,[0,4,0,5]))$="acv";if(c(Q,[99,117,115,104]))$="csh";
if(c(Q,[0,1,0,0,0]))$="otf";if(c(Q,[79,84,84,79]))$="otf";if(c(Q,[116,116,99,102]))$="otf";if(c(Q,[68,68,83,32]))$="dds";
if(c(Q,[80,86,82,3]))$="pvr";if(c(Q,[86,84,70,0]))$="vtf";if(c(Q,[83,73,77,80]))$="fits";if((c(Q,[0,0,1,0])||c(Q,[0,0,2,0]))&&Q[4]!=0)$="ico";
if(c(Q,[66,77]))$="bmp";if(c(Q,[40,0,0,0]))$="bmp";if(c(Q,[80,49]))$="ppm";if(c(Q,[80,50]))$="ppm";if(c(Q,[80,51]))$="ppm";
if(c(Q,[80,52]))$="ppm";if(c(Q,[80,53]))$="ppm";if(c(Q,[80,54]))$="ppm";if(c(Q,[73,73,42,0]))$="tiff";
if(c(Q,[77,77,0,42]))$="tiff";if(c(Q,[73,73,85,0]))$="tiff";if(c(Q,[73,73,82,83]))$="tiff";if(c(Q,[73,73,82,79]))$="tiff";
if(c(Q,[70,85,74,73,70,73,76,77]))$="raf";if(c(Q,[112]))$="lif";if(c(Q,[73,73,26,0]))$="ciff";if(c(Q,[83,81,76,105]))$="sketch";
if(c(Q,[80,75])){var K=UZIP.parse(x,!0);if(K["document.json"])$="sketch";else if(K.manifest)$="xd";else if(K["maindoc.xml"])$="kra";
else if(K["content/root.dat"])$="cdr";else if(K["content/riffData.cdr"])$="cdr";else if(K["canvas.fig"])$="fig";
else if(K["manifest.json"])$="pxz";else $="zip"}if(c(Q,[123]))$="json";if(w.q(Q,0)==Q.length)$="icc";
if(c(Q,[35]))$="icc";if(c(Q,[84,73,84,76],z))$="icc";if(c(Q,[76,85,84,95],z))$="icc";if(c(Q,[60,63,120,109],z)){if(w.iK(Q,"<look>")!=-1)$="icc";
else $="svg"}if(c(Q,[255,254,60,0],z))$="svg";if(c(Q,[60,115,118,103],z))$="svg";if(c(Q,[60,33,100,111],z)||c(Q,[60,33,68,79],z)||c(Q,[60,33,45,45],z)){if(w.iK(Q,"<svg")!=-1)$="svg";
else $="html"}if(c(Q,[37,33])||c(Q,[197,208,211,198])){if(w.iK(Q,"%AI9_PrivateDataBegin")!=-1||w.iK(Q,"%AI5_BeginLayer")!=-1)$="ai";
else $="eps"}if(c(Q,[37,80,68,70],z)){var g=w.iK(Q,"/AIMetaData ");if(g!=-1){if(w.iK(Q,">>/Encrypt ",g)!=-1)$="pdf";
else $="ai"}else $="pdf"}else if(c(Q,[10,69,79,70],j-3))$="dxf";if(c(Q,[1,0,9,0]))$="wmf";if(c(Q,[215,205,198,154]))$="wmf";
if(c(Q,[1,0,0,0]))$="emf";if(c(Q,[118,47,49,1]))$="exr";if(c(Q,[10,10,10,10]))$="jsx";if(c(Q,[77,90]))$="exe";
if($==null&&d.raw.Yj(Q.length)!=null)return"tiff";return $};ar.ie=function(x,Q,c){if(c==null)c=0;for(var F=0;
F<Q.length;F++)if(Q[F]!=-1&&x[c+F]!=Q[F])return!1;return!0};ar.pz=function(x){var Q={BMP:ar.ash,CDR:ar.tL,DDS:ar.zt,EMF:ar.r9,DXF:ar.xp,EPS:ar.hj,FIG:ar.Ng,FPNG:ar.uS,INDD:ar.lB,GIF:ar.qg,ICO:ar.yX,ILBM:ar.Mp,FITS:ar.SL,EXR:ar.Vx,JPG:ar.tq,LIF:ar.fA,DCM:ar.a5s,PDF:ar.mu,PDN:ar.Vg,PNG:ar.YX,ICNS:ar.VB,PPM:ar.Fs,PSD:ar.RC,PXD:ar.qS,PXZ:ar.iC,RAF:ar.eb,CR3:ar.I4,RAW:ar.qi,SKETCH:ar.Pu,SVG:ar.M7,TGA:ar._5,AVIF:ar.ad0,TIFF:ar.t_,VTF:ar.Yd,WEBP:ar.Rs,WMF:ar._j,XCF:ar.BU,XD:ar.IL,KRA:ar.Cx,EXE:ar.avb,AI:ar.MJ,AFPHOTO:ar.gE,CLIP:ar.wz,FRAC:ar.AR,MP4:ar.yA};
return Q[x.toUpperCase()]};ar.c8=function(F){var x=ar.Xf.a1u,Q=ar.Xf.aqe,c,$=[];if(F==null)c=x.concat(Q);
else c=F==0?x:Q;for(var F=0;F<c.length;F++)if(ar.pz(c[F]).YU)$.push(c[F]);return $};ar.aiN=function(){var x;
function Q($){var z=$.target,j=z.width,U=z.height,i=document.createElement("canvas");i.width=j;i.height=U;
var b=i.getContext("2d");b.drawImage(z,0,0);x({K$:new gh(0,0,j,U),data:b.getImageData(0,0,j,U).data.buffer})}function c($,z,j){x=j;
var U=document.createElement("img");U.onload=Q;U.src="data:"+z+";base64,"+ar.al($)}return c}();ar.qc=function(x,Q,c,$,z){var j=ar.mL(x,Q,c,$,z),U=ar.DM(j);
return U.buffer};ar.DM=function(x){var Q=atob(x.split(",").pop()),c=new Uint8Array(Q.length);for(var F=0;
F<Q.length;F++)c[F]=Q.charCodeAt(F);return c};ar.mL=function(x,Q,c,$,z,j){if(!(x instanceof ArrayBuffer))throw"e";
if($==null)$="png";if($=="png"&&j==!0){var U=ar.pz("PNG").YU([[x,0]],Q,c);return"data:image/png;base64,"+ar.al(U)}var i=ar.Ha;
if(i==null)i=ar.Ha=document.createElement("canvas");if(i.width!=Q||i.height!=c){i.width=Q;i.height=c}var b=i.getContext("2d"),e=new ImageData(new Uint8ClampedArray(x,0,Q*c*4),Q,c);
b.putImageData(e,0,0);return i.toDataURL("image/"+$,z)};ar.aau=function(x,Q,c,$,z){if(z==null)z=0;var j="<defs> \t<filter id=\"sofGlow\" height=\"300%\" width=\"300%\" x=\"-75%\" y=\"-75%\"> \t\t<!-- Thicken out the original shape --> \t<feMorphology operator=\"dilate\" radius=\"3\" in=\"SourceAlpha\" result=\"thicken\" /> \t\t<!-- Use a gaussian blur to create the soft blurriness of the glow -->\t\t<feGaussianBlur in=\"thicken\" stdDeviation=\"4\" result=\"blurred\" />\t\t<!-- Change the colour -->\t\t<feFlood flood-color=\"rgb(255,255,255)\" result=\"glowColor\" />\t\t<!-- Color in the glows -->\t\t<feComposite in=\"glowColor\" in2=\"blurred\" operator=\"in\" result=\"softGlow_colored\" />\t\t<!--\tLayer the effects together -->\t\t<feMerge>\t\t\t<feMergeNode in=\"softGlow_colored\"/>\t\t\t<feMergeNode in=\"SourceGraphic\"/>\t\t</feMerge>\t</filter></defs>",U="<svg  xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"  width=\"128\"  height=\"128\"> "+j+"<g transform=\"translate(64 64) scale("+.25+")\">";
if(x==1)U+="<g transform=\"scale(0.07 0.07) translate(-550 -112)\"  style=\"fill:#ffffff; stroke:#000000; stroke-width:60px;\">"+"<path d=\"m 555.1899,112.08836 0,120.71094 0,920.7109 232.42188,-232.42184 111.90429,270.44924 169.76363,-84.8828 -114.09371,-273.8555 320.71481,0 z\"/>"+"</g>";
U+="<g filter=\"url(#sofGlow)\"><image transform=\"rotate("+z+")\" xlink:href=\""+Q+"\" x=\""+80*c+"\" y=\""+80*$+"\" height=\"80\" width=\"80\"/></g>"+"</g>"+"</svg>";
var i=new Uint8Array(U.length);w.A9(U,i,0);var b="data:image/svg+xml;base64,"+ar.al(i.buffer);return{QK:b,W4:new gh(0,0,128,128),pt:new bC(64,64)}};
ar.al=function(x){var Q=new Uint8Array(x),c="";for(var F=0;F<Q.length;F++)c+=String.fromCharCode(Q[F]);
return btoa(c)};ar.KG=function(x){var Q=atob(x),c=Q.length,$=new Uint8Array(c);for(var F=0;F<c;F++)$[F]=Q.charCodeAt(F);
return $.buffer};ar.b6=function(x){var Q=[],c=[];for(var F=0;F<x.B.length;F++){var $=x.B[F];if($.getName().slice(0,3)=="_a_"){Q.push(F);
c.push($.M5())}}return[Q,c]};ar.jd=function(x,Q,c,$,z,j){if(c==null)c=x.m;if($==null)$=x.e;var U=new gh(0,0,x.m,x.e),i=new bI(c/(x.m+.001),0,0,$/(x.e+.001),0,0),e;
Q=Q.toUpperCase();var b=ar.pz(Q);if(b.f6){e=b.YU(x,c,$,z,j)}else if(i9==1){var k=x.afM(c,$,j);e=b.YU([[k,0,x.cQ,x.hD]],c,$,z)}else{if(z)z=z.slice(0);
var K=ar.b6(x),g=K[0],R=K[1],T=x.dV(),D=T&&z?z.pop():!1,a=T&&!D?T[0]:null,_=null;if(x.fG.length!=0){_=[];
for(var F=0;F<x.fG.length;F++)_.push(x.fG[F].EF(U))}if(g.length<2){var I=ar.MK(x.VY(),T,D,x),f;if(c==x.m&&$==x.e)f=I.buffer;
else{var y=X.Y.rN([I,U],i);f=y.buffer.buffer;if(_){var Z=d.R(U.P()*4);for(var F=0;F<_.length;F++){d.Dm(_[F],Z,3);
var y=X.Y.rN([Z,U],i),v=_[F]=d.R(y.rect.P());d.GS(y.buffer,v,3)}}}e=b.YU([[f,0,x.cQ,x.hD,_,a]],c,$,z)}else{var G=[];
for(var F=0;F<g.length;F++){var q=g[F],f;for(var h=0;h<g.length;h++)x.B[g[h]].KW(g[h]==q);x.jf();x.c();
x.eB();if(c==x.m&&$==x.e)f=x.VY().buffer.slice(0);else{var y=X.Y.rN([x.VY(),U],i);f=y.buffer.buffer}f=ar.MK(new Uint8Array(f),T,D,x).buffer;
var r=x.B[q].getName().split(",");G.push([f,r[1]?parseInt(r[1]):100,x.cQ,x.hD,_,a])}for(var F=0;F<g.length;
F++)x.B[g[F]].KW(R[F]);x.c();x.eB();if(z){z.push(100);var H=z.length,o=z[H-3],P=z[H-2],O=z[H-5]/100,p=z[H-1]/100;
if(O!=1)for(var F=0;F<G.length;F++)G[F][1]=Math.round((G[F][1]==0?16:G[F][1])/O);if(p<1){var C=0,W=[],Y=0,h=0;
for(var F=0;F<G.length;++F){C+=G[F][1];if(F>0){W.push(W[W.length-1]+G[F-1][1])}else{W.push(0)}}var J=p*G.length,t=C/J,l=[];
for(var F=0;F<J;++F){var m=0;while(Y>W[h]&&h+1<G.length){m+=G[h][1];++h}if(m!=0){var B=Math.round(Math.min(1,(W[h]-Y)/G[h][1])*m);
l[l.length-1][1]+=m-B;if(G[h][1]<G[h-1][1]/2){l.push(G[h-1])}else{l.push(G[h])}l[l.length-1][1]=G[h][1]+B}else if(h<G.length){l.push(G[h])}Y+=t;
++h}while(h<G.length){l[l.length-1][1]+=G[h][1];++h}G=l}if(o)G.reverse();if(P){var L=G.slice(1,G.length-1);
L.reverse();G=G.concat(L)}}e=b.YU(G,c,$,z)}}return e};ar.MK=function(x,Q,c,$){var z=$.XP();if(c){x=x.slice(0);
ICC.U.applyLUT(Q[3],Q[2],x,x)}else if(z&&$.add.fcmy==1){x=x.slice(0);ICC.U.applyLUT(z[$.add.fcmy==1?5:3],z[2],x,x)}return x};
ar.ahZ=function(x,Q){var c=new Uint8Array(x.data),$=new Uint8Array(Q.data),z=0,j=0;for(var U=0;U<c.length;
U+=4){var i=c[U]-$[U],b=c[U+1]-$[U+1],e=c[U+2]-$[U+2],k=c[U+3]-$[U+3],K=i*i+b*b+e*e+k*k>>>2;z+=K;if(K>25)j++}var g=j/x.K$.P()<1e-4;
return g};ar.$E=function(x,Q){var c=Q[0].rF&&Q[0].rF.startsWith("_a_"),$;if(c&&!1){var z=0,j=Q.length;
for(var F=0;F<Q.length-1;F++){var U=Q[F],i=Q[F+1],b=ar.ahZ(U,i);if(b){var e=parseFloat(U.rF.split(",").pop()),k=parseFloat(i.rF.split(",").pop());
U.rF=U.rF.split(",")[0]+","+Math.round(e+k);Q.splice(F+1,1);F--;z++}}if(z!=0){alert("Deleted "+z+" frames out of "+j+".");
for(var F=0;F<Q.length;F++){var K=Q[F],g=K.rF;K.rF="_a_frm"+F+","+g.split(",")[1]}}}var R=new hf(x+"."+["psd","ai"][i9]),T=new gh(0,0,1,1);
if(c){$=R.Xh();$.add.lsct=hA.DJ;$.gF(x);$.s3="pass";$.H2=24;$.KW(!0);R.B.push(R.x6())}for(var F=0;F<Q.length;
F++){var D=Q[F];T=T.iO(D.K$);var a=R.Xh();a.KW(F==0);a.gF(Q.length==1?"Background":"Layer "+F);if(F==0&&D.cQ)R.cQ=D.cQ;
if(F==0&&D.hD)R.hD=D.hD;if(D.rF)a.gF(D.rF);if(D.Pr)for(var _=0;_<D.Pr.length;_++){var I=D.Pr[_],f=hf._S(I[0]);
f.add.vmsk.$=I[1];d.o.Of(I[1],new bI(T.m,0,0,T.e,0,0));R.iL.push(f)}if(D.Bo)R.Bo=D.Bo;a.rect=D.K$.clone();
a.buffer=new Uint8Array(D.data);if(F==0&&D.Xo)R.sv(D.Xo);d.HT(a);R.B.push(a)}if(c)R.B.push($);if(Q[0].fG){for(var F=0;
F<Q[0].fG.length;F++){var y=new eM.zM;R.fG.push(y);y.rect=Q[0].K$.clone();y.channel=Q[0].fG[F]}}R.g=[c?R.B.length-1:0];
R.m=T.m;R.e=T.e;if(i9==0)R.buffer=d.R(T.P()*4);R.c();return R};ar.$o=function(x,Q,c){var $=x.length-c,z=new Uint8Array($);
for(var F=0;F<Q;F++)z[F]=x[F];for(var F=Q;F<$;F++)z[F]=x[F+c];return z};ar.awW=function(x,Q,c){var $=x.length,z=c.length,j=new Uint8Array($+z);
for(var F=0;F<Q;F++)j[F]=x[F];for(var F=Q;F<$;F++)j[F+z]=x[F];j.set(c,Q);return j};ar.aBX=function(x,Q,c,$,z,j,U,i,b){var e=new jO(u.E.v,!0);
e.f=X.RZ;e.data={d:"h_stepbck"};var k={};for(var K=1;K<c.length;K++){var g=x.g.slice(0),R=ar.ow(x,b,Q,c,$,K),T="img"+K,D=c[0].indexOf(U);
if(U!=""){if(D==-1)alert("Column "+U+" not found.");else T=c[K][D]}k[T+"."+z.toLowerCase()]=new Uint8Array(ar.jd(x,z,null,null,j,i));
for(var F=0;F<R;F++)b.T(e)}return UZIP.encode(k)};ar.ow=function(x,Q,c,$,z,j){var U=new jO(u.E.M,!0),k=0;
U.data={d:u.H.kv};var i=new jO(u.E.v,!0);i.f=X.Mf;i.data={d:eM.Ap,sn:{buffer:null,rect:null}};var b=i.data.sn;
for(var K=0;K<c.length;K++){var g=c[K],R=g.trait,T=parseInt(g.docRef.slice(4,-2)),D=-1;for(var F=0;F<x.B.length;
F++)if(x.B[F].add.lyid==T)D=F;if(D==-1)continue;var a=$[0].indexOf(g.varName);if(a==-1){alert("Column "+g.varName+" is missing");
return}var _=$[j][a],I=x.B[D];x.g=[D];if(R=="textcontent"){U.data.rq="app.activeDocument.activeLayer.textItem.contents = "+JSON.stringify(_)+";";
Q.T(U);k++}if(R=="visibility"&&I.M5()+""!=_.toLowerCase()){_=_.trim().toLowerCase();if(_!="true"&&_!="false")_=_==""?"false":"true";
U.data.rq="app.activeDocument.activeLayer.visible = "+_+";";if(I.M5()+""!=_){Q.T(U);k++}}if(R=="fileref"){var f=_.split("/").pop(),y=null;
for(var jF in z)if(jF.split("/").pop()==f)y=z[jF];if(y==null){alert("Image "+f+" is missing.")}else{var Z=ar.pz(ar.HB(y.buffer)).fk(y.buffer)[0],v=Z.K$,G=I.rect,H=0,o=0;
if(I.add.SoLd){var q=X.Y.e3(I.add.SoLd.nonAffineTransform);G=d.A.cl(q)}var h=G.m/G.e,r=v.m/v.e;if(h>r){o=G.e;
H=~~(o*r)}else{H=G.m;o=~~(H/r)}U.data.rq="app.activeDocument.activeLayer.visible = false;";Q.T(U);k++;
var P=X.Y.rN([new Uint8Array(Z.data),v],new bI(H/v.m,0,0,o/v.e,0,0));b.rect=P.rect;b.buffer=P.buffer;
P.rect.x=G.x+(G.m-H>>>1);P.rect.y=G.y+(G.e-o>>>1);Q.T(i);k++;var O=x.B[x.g[0]];O.opacity=I.opacity;O.cG=I.cG;
O.s3=I.s3;O.F=I.F}}}return k};ar.YX={};ar.YX.YU=function(x,Q,c,$){if($==null)$=[100,!1,0,0,0];var z={sRGB:1,loop:$[3]};
if(x[0][5]!=null){delete z.sRGB;z.iCCP=x[0][5]}if(x[0][2]!=null){var j=Math.round(x[0][2]*(1e4/254));
z.pHYs=[j,j,1]}var U=$[0],i=U==100?0:Math.max(2,Math.floor(U*5));if(i==5)i=4;var b=[],e=[];for(var F=0;
F<x.length;F++){b.push(x[F][0]);e.push(x[F][1])}var k=UPNG.encode(b,Q,c,i,e,z,$[1]);return k};ar.YX.a41=function(x,Q,c){return UPNG.encodeLL([x],Q,c,3,1,8)};
ar.YX.fk=function(x){var Q=Date.now(),c=UPNG.decode(x),$=UPNG.toRGBA8(c),z=c.width,j=c.height,U=0,i=c.tabs.iCCP;
if(c.tabs.pHYs)U=Math.round(c.tabs.pHYs[0]*254/1e4);if($.length==1)return[{K$:new gh(0,0,z,j),data:$[0],cQ:U,Xo:i}];
var b=[];for(var F=0;F<$.length;F++){b.push({rF:"_a_frm"+F+","+c.frames[F].delay,K$:new gh(0,0,z,j),data:$[F],cQ:U,Xo:i})}return b};
ar.Fs={};ar.Fs.YU=function(x,Q,c,$){var z=new Uint8Array(x[0][0]),j=Q*c,U=j*3,i="P6\n"+Q+" "+c+"\n255\n",b=i.length,e=d.R(b+U,!0);
for(var F=0;F<b;F++)e[F]=i.charCodeAt(F);for(var F=0;F<j;F++){var k=F*4,K=F*3+b;e[K]=z[k];e[K+1]=z[k+1];
e[K+2]=z[k+2]}return e.buffer};ar.Fs.fk=function(x){x=new Uint8Array(x);var Q=[" ".charCodeAt(0),"\n".charCodeAt(0),"\t".charCodeAt(0),"\r".charCodeAt(0)],c=0,$=String.fromCharCode(x[0])+String.fromCharCode(x[1]),z=[],j=0,U=$=="P1"||$=="P4"?2:3;
for(c=2;c<x.length;c++){var i=x[c],b=String.fromCharCode(i);if(i=="#".charCodeAt(0)){while(x[c]!="\n".charCodeAt(0))c++;
continue}var e=Q.indexOf(i)!=-1;if(j==0&&!e){z.push(b);j=1;continue}if(j==1&&!e){z[z.length-1]+=b;continue}if(j==1&&e){j=0;
if(z.length==U)break;continue}}var k=parseInt(z[0]),K=parseInt(z[1]),g=k*K*4,R=$=="P1"||$=="P4"?1:255/parseInt(z[2]),T=d.R(g);
if($=="P1"||$=="P2"||$=="P3"){var D="",a=0,j=0,_="#".charCodeAt(0);for(var F=c;F<x.length;F++){var i=x[F],b=String.fromCharCode(i),e=Q.indexOf(i)!=-1;
if(i==_){while(x[F]!="\n".charCodeAt(0))F++}else if(j==0&&!e){D=b;j=1}else if(j==1){if(e){j=0;var I=parseInt(D);
D="";if($=="P1"){T[a]=T[a+1]=T[a+2]=(1-I)*255;T[a+3]=255;a+=4}if($=="P2"){T[a]=T[a+1]=T[a+2]=Math.round(I*R);
T[a+3]=255;a+=4}if($=="P3"){T[a]=Math.round(I*R);a++;if((a&3)==3){T[a]=255;a++}}}else D+=b}}}var f=k*K;
if($=="P4")for(var y=0;y<K;y++){var Z=y*8*Math.ceil(k/8);for(var v=0;v<k;v++){var F=Z+v,G=x[c+1+(F>>3)];
G=G>>7-(F&7)&1;var q=y*k+v<<2;T[q]=T[q+1]=T[q+2]=(1-G)*255;T[q+3]=255}}if($=="P5")for(var F=0;F<f;F++){var q=4*F;
T[q]=T[q+1]=T[q+2]=Math.round(x[c+1+F]*R);T[q+3]=255}if($=="P6")for(var F=0;F<f;F++){var q=4*F,h=c+1+3*F;
T[q]=Math.round(x[h]*R);T[q+1]=Math.round(x[h+1]*R);T[q+2]=Math.round(x[h+2]*R);T[q+3]=255}return[{K$:new gh(0,0,k,K),data:T.buffer}]};
ar.zt={};ar.zt.YU=function(x,Q,c,$){if($==null)$=[0,!0];if(typeof $[0]=="boolean")$[0]=0;var z=new Uint8Array(x[0][0]);
if(!d.Ty(z)&&x[0][4]){z=z.slice(0);d.Dm(x[0][4][0],z,3)}var j=Q&3,U=c&3;if(j!=0||U!=0){var i=Q+(j==0?0:4-j),b=c+(U==0?0:4-U),e=new Uint8Array(i*b*4);
d.h4(e,4278190080);d.WK(z,new gh(0,0,Q,c),e,new gh(0,0,i,b));z=e;Q=i;c=b}var K=UTEX.DDS.encode(z.buffer,Q,c,$);
if(!1){var g=UTEX.DDS.decode(K)[0],e=new Uint8Array(g.iw),R=0;for(var F=0;F<z.length;F++){var T=z[F]-e[F];
R+=T*T}console.log(R)}return K};ar.zt.fk=function(x){var Q=UTEX.DDS.decode(x)[0];return[{K$:new gh(0,0,Q.width,Q.height),data:Q.image}]};
ar.Yd={};ar.Yd.fk=function(x){var Q=UTEX.VTF.decode(x).pop();return[{K$:new gh(0,0,Q.width,Q.height),data:Q.image}]};
ar.tq={};ar.tq.Fb=null;ar.tq.axq=function(x,Q){var c=ar.tq.Fb,$=x.byteLength,z=Q.width,j=Q.height,U=z*j,i=5e6+2*$+U*(Q.progressive?Math.max(2,Q.numComponents)*4+1:8),b=c.instance.exports;
ar.IZ(b,i);var e=new Uint8Array(b.memory.buffer),k=b.malloc($);e.set(new Uint8Array(x),k);var K=b.malloc(4),g=b.malloc(4),jF=b.malloc(4),R=b.stbi_load_from_memory(k,$,K,g,jF,4);
b.free(k);b.free(K,g,jF);b.free(R);var T=e.slice(R,R+U*4);return T};(function(){var x=ar.dy.get("wasm/jpg").buffer;
if(window.WebAssembly==null)window.alert("Your browser is too old (no WebAssembly). Please, update it.");
WebAssembly.instantiate(x).then(function(Q){ar.tq.Fb=Q})}());ar.tq.YU=function(x,Q,c,$){if($==null)$=[85];
var z=x[0],j=new Uint8Array(z[0]);if(d.Ty(j)){var U=new Uint8Array(j.length),i=new gh(0,0,Q,c);d.h4(U,4294967295);
d.l.UY("norm",j,i,U,i,i,1);j=U}var b=new Uint8Array(ar.qc(j.buffer,Q,c,"jpeg",$[0]/100));if(b.length<2e4||z[5]){var e=w.iK(b,[255,226]);
if(e!=-1){var k=w._C(b,e+2);b=ar.$o(b,e,k+2)}}if(z[5]!=null){var K=4+w._C(b,4),g=z[5].length+16,R=new Uint8Array(g+2);
R[0]=255;R[1]=226;w.Dr(R,2,g);w.f3(R,4,"ICC_PROFILE");R[16]=R[17]=1;R.set(z[5],18);b=ar.awW(b,K,R)}if(z[2]!=null){var T=ar.tq.Ds(b)[224][0]+2;
T+=9;b[T]=1;w.Dr(b,T+1,z[2]);w.Dr(b,T+3,z[2])}if(z[3]!=null&&$[1]==!0&&Object.keys(z[3]).length!=0){var D=0,a=0,_=0,I=be.Q3(z[3]),f=new Uint8Array(UTIF.encode([I])),y="http://ns.adobe.com/xap/1.0/",K=20;
D=4+6+f.length;var Z=be.iR(z[3]),v=w.nT(Z);a=4+y.length+1+v.length;var G=be.a1n(z[3]);if(G.length!=0){var q=0,H=0;
for(var F=0;F<G.length;F++)q+=5+G[F][1].length;var h=q+(q&1),r=d.R(14+4+4+4+h);w.f3(r,H,"Photoshop 3.0");
H+=14;w.f3(r,H,"8BIM");H+=4;r[H++]=4;r[H++]=4;H+=2;w.EO(r,H,q);H+=4;for(var F=0;F<G.length;F++){var o=G[F],P=o[1];
r[H++]=28;r[H++]=2;r[H++]=o[0];w.Dr(r,H,P.length);H+=2;w.f3(r,H,P);H+=P.length}_=4+r.length}var O=D+a+_,p=new Uint8Array(b.length+O);
for(var F=0;F<20;F++)p[F]=b[F];for(var F=20;F<b.length;F++)p[F+O]=b[F];p[K]=255;p[K+1]=225;w.Dr(p,K+2,D-2);
w.f3(p,K+4,"Exif");for(var F=0;F<f.length;F++)p[K+10+F]=f[F];K+=D;p[K]=255;p[K+1]=225;w.Dr(p,K+2,a-2);
w.f3(p,K+4,y);for(var F=0;F<v.length;F++)p[K+4+y.length+1+F]=v[F];K+=a;if(_!=0){p[K]=255;p[K+1]=237;
w.Dr(p,K+2,_-2);for(var F=0;F<r.length;F++)p[K+4+F]=r[F];K+=_}b=p}return b.buffer};ar.tq.Ds=function(x){var Q=0,c=[],$=x.length;
while(Q<$){while(x[Q]!=255&&Q<$)Q++;while(x[Q]==255)Q++;if(Q==$)break;var z=x[Q];Q++;if(c[z]==null)c[z]=[];
c[z].push(Q-2);if(z==216)continue;if(z==217)break;if(224<=z&&z<=239||z==218||z==219||z==192||z==193||z==194||z==196||z==221||z==254){var j=w._C(x,Q);
Q+=j;if(z==218)while(Q<$&&(x[Q]!=255||(x[Q+1]==0||208<=x[Q+1]&&x[Q+1]<=215)))Q++;continue}console.log("unknown marker ",z.toString(16),Q);
break}if(c[217]==null){console.log("EOI marker missing");var U=x.length-2;x[U]=255;x[U+1]=217;c[217]=[U]}return c};
ar.tq.amR=function(x){x=new Uint8Array(x);if(x[0]!=255)return x.buffer;var Q=ar.tq.Ds(x),c=ar.tq.dl(x,Q);
if(c.numComponents!=4)return x.buffer;var $=c.width,z=c.height,j=ar.tq.OM(x,Q,!0);return ar.tq.YU([[j[0].data]],$,z,[85])};
ar.tq.dl=function(x,Q){var c=(Q[192]?Q[192]:Q[193]?Q[193]:Q[194])[0]+4,$={};$.progressive=Q[194]!=null;
$.precision=x[c];c++;$.height=w._C(x,c);c+=2;$.width=w._C(x,c);c+=2;$.numComponents=x[c];c++;if(Q[224]){var z=$.jfif={};
c=Q[224][0]+2+2+5+2;z.densityUnits=x[c];c++;z.xDensity=w._C(x,c);c+=2;z.yDensity=w._C(x,c);c+=2}if(Q[238]){var z=$.adobe={};
c=Q[238][0]+2+2+6;z.version=x[c];c++;z.flags0=w._C(x,c);c+=2;z.flags1=w._C(x,c);c+=2;z.transform=x[c];
c++}return $};ar.tq.a6s=function(x,Q,c){var $=Q,z=w._C(x,$);$+=2;var j=w.mt(x,$,4);if(j=="Exif"){$+=6;
var U=x.slice($,$+z-8),i;try{i=UTIF.decode(U.buffer,{parseMN:!1,debug:!1})}catch(dQ){}if(i&&i.length!=0)c.exif=i}else if(j=="http"){var b=0;
while(x[$+b]!=0)b++;var e=w.mt(x,$,b);$+=b+1;if(e=="http://ns.adobe.com/xmp/extension/"){var k=w.mt(x,$,32);
$+=32;$+=8;var K=Q+z-$;while(x[$+K-1]==0)K--;if(c.xmp_extn==null)c.xmp_extn="";try{c.xmp_extn+=w.IV(x,$,K)}catch(dQ){}}else if(e=="http://ns.adobe.com/xap/1.0/"){var g=w.IV(x.slice($,$+z-b-3));
if(g[0]=="?")g="<"+g;c.xmp=g}}else console.log(j)};ar.tq.OM=function(x,Q,c){var $=ar.tq.dl(x,Q),z=$.width,j=$.height,U=z*j,i,b=-1,y=72,Z,G,q=null;
if($.adobe)b=$.adobe.transform;if(c||z*j>15e7||b==0||b==2||$.progressive){var e=new PDFJS.JpegImage;
e.parse(x);var k=e.getData({width:z,height:j,forceRGB:!0,isSourcePDF:c}),i=d.R(U*4);for(var F=0;F<U;
F++){var K=F<<2,g=K-F;i[K]=k[g];i[K+1]=k[g+1];i[K+2]=k[g+2];i[K+3]=255}}else{i=ar.tq.axq(x.buffer,$)}var R=Q[225];
if(R)for(var F=0;F<R.length;F++)ar.tq.a6s(x,R[F]+2,$);var T=Q[226];if(T){var D=T[0],a=w._C(x,D+2),_=w.mt(x,D+4,11);
if(_=="ICC_PROFILE"){var I=w.q(x,D+18);$.icc=x.slice(D+18,D+18+I)}}var f=Q[217][0]+2;if(f!=x.length)$.suffix=x.slice(f);
var v=[z,j,1,0,0,0,1,0];if($.jfif&&$.jfif.densityUnits!=0){y=Math.round([72,1,2.54][$.jfif.densityUnits]*$.jfif.xDensity)}else if($.exif&&$.exif[0].t282!=null){var h=$.exif[0].t282[0];
y=h[0]/h[1]}if($.exif){var r=$.exif;Z=be.tC(r[0]);var H=r[0].t274;if(H)H=H[0];if(H!=null&&H>1&&H<20)v=d.raw.a0O(H,z,j)}if($.xmp){Z=be.I9($.xmp,Z)}if($.icc)G=$.icc;
var o=Q[237],P=[],O=[];if(o){var p=new Uint8Array(65536),C=0,D=0;for(var F=0;F<o.length;F++){D=o[F]+2;
var W=D+w._C(x,D);D+=2;var J=D;while(x[D]!=0)D++;D++;var t=w.mt(x,J,D-J-1),Y=W-D;if(Y<0)break;while(C+Y>p.length){var l=new Uint8Array(p.length*2);
l.set(p);p=l}var m=new Uint8Array(x.buffer,D,Y);p.set(m,C);C+=Y}D=0;x=p;while(D<C){var B=w.mt(x,D,4);
D+=4;var L=w._C(x,D);D+=2;var A=x[D++],S=w.mt(x,D,A);D+=A;if((A&1)==0)D++;var a=w.q(x,D);D+=4;var f=D+a+(a&1);
if(L==1028){while(D+4<f){var M=x[D++],N=x[D++],s=x[D++],V=w._C(x,D);D+=2;if(M==28&&N==2)P.push([s,w.mt(x,D,V)]);
D+=V}}else if(L==1032)q=cz.azp(x,D);else if((L&2e3)==2e3){var g8=dJ.ur(x,D,a);O.push([S,g8])}else{}D=f}if(P.length!=0)Z=be.alo(P,Z)}var n=[{K$:new gh(0,0,z,j),data:i.buffer,cQ:y,hD:Z,Xo:G,Pr:O.length==0?null:O,Bo:q}],Z=$.xmp_extn;
if(Z){var cQ=new DOMParser,hk=cQ.parseFromString(Z,"image/svg+xml"),hk=hk.children[0].children[0].children[0],eG=[hk.getAttribute("GImage:Data"),hk.getAttribute("GDepth:Data")];
for(var F=0;F<eG.length;F++)if(eG[F]){var ie=atob(eG[F]),eN=new Uint8Array(ie.length);w.f3(eN,0,ie);
eN=eN.buffer;var gr=ar.HB(eN),ek=ar.pz(gr).fk(eN);n.push(ek[0])}}if($.suffix){var jK=$.suffix,iE=!1,e9=w.mt(jK,4,4),dm=w.iK(jK,[255,216,255]);
if(ar.ie(jK,[0,0,1,10,14,0,0,0])){if(iE)console.log("Samsung");var D=0;while(D!=jK.length){var kD=w.uv(jK,D+2);
D+=4;var gJ={2272:12,2320:21,2561:13,2625:21,2721:3,2608:0}[kD];if(gJ!=null){var dR=w.K3(jK,D);D+=4;
var fO=w.mt(jK,D,dR);D+=dR;var ko=w.mt(jK,D,gJ);D+=gJ;if(kD==2608){var d8=D,fj=w.q(jK,D+24);D+=fj+24;
var ja=w.q(jK,D);D+=ja;var eD=jK.slice(d8,D);ar.tq._2(eD)}}else if(kD==18502){while(w.mt(jK,D,4)!="SEFT")D+=4;
D+=4}else{break;console.log(w.Mm(jK,D,128));console.log(jK.slice(D));throw kD.toString(16)}}}else if(e9=="ftyp"){if(iE)console.log("MP4 Video");
ar.tq._2(jK)}else if(w.mt(jK,0,4)=="fixe"){if(iE)console.log("fixe");alert("Unknown data - "+jK.length+" B - at the end of the file",3e3);
var D=4,a=w.K3(jK,D);D+=4;var d3=w.K3(jK,D);D+=4;var fP=w.K3(jK,D);D+=4;console.log(a,d3,fP,jK.slice(D,D+84));
D+=84;var jE=w.mt(jK,D,32);D+=32;D+=8;var jE=w.mt(jK,D,32);D+=32}else if(w.mt(jK,8,13)=="FocusShot_Map"){if(iE)console.log("FocusShot_Map");
var cR=w.q(jK,0),V=w.K3(jK,4),eN=d.R(U*4),ex=d.R(U*4);for(var er=0;er<j;er++)for(var cE=0;cE<z;cE++){var F=er*z+cE,K=F<<2,a7=8+13+((er>>>1)*z+cE>>>1),dl=jK[a7],hl=jK[a7+(U>>>2)];
eN[K]=eN[K+1]=eN[K+2]=dl;eN[K+3]=255;ex[K]=ex[K+1]=ex[K+2]=hl;ex[K+3]=255}n.push({K$:new gh(0,0,z,j),data:eN.buffer},{K$:new gh(0,0,z,j),data:ex.buffer})}else if(e9=="edof"){if(iE)console.log("edof");
var H=jK[8+7];console.log(H.toString(16));var D=8+16,f4=w.uv(jK,D),em=w.uv(jK,D+2),U=f4*em;D+=4;D+=32+16;
var e$=d.R(U*4);for(var F=0;F<U;F++){var K=F<<2;e$[K]=e$[K+1]=e$[K+2]=jK[D+F];e$[K+3]=255}if(H==16){}else if(H==19){var iP=e$.slice(0);
d.D.Ny(e$,iP,f4,em);var b2=f4;f4=em;em=b2;d.D.qf(iP,e$,f4,em)}else throw"Unknown orientation of a depth map";
n.push({K$:new gh(0,0,f4,em),data:e$.buffer})}else if(w.mt(jK,0,64).indexOf("DualShot")!=-1){var k7=w.K3,at=w.mt,ju=w.uv,D=0;
function jL(){var cL=k7(jK,D);if(k7(jK,D+4)!=0)throw"e";D+=8;return cL}var fJ=w.q(jK,D);D+=4;try{if(fJ==45066){D=1226;
var z=jL(),j=jL();D=3445}else if(fJ==45322){var h6=k7(jK,D);D+=4;var jE=at(jK,D,h6);D+=h6;if(jE!="DualShot_DepthMap_1")throw jE;
z=1008;j=756}else throw fJ;var iq=d.R(z*j*4);iq.fill(255);d.ZM(jK.slice(D,D+z*j),iq);n.push({K$:new gh(0,0,z,j),data:iq.buffer})}catch(dQ){console.log("error reading a depth map")}try{if(dm!=0)jK=jK.slice(dm);
n=n.concat(ar.pz("jpg").fk(jK.buffer))}catch(dQ){}}else if(dm!=-1&&!(jK[0]==255&&jK[1]==129)){if(iE)console.log("another JPG at",dm);
try{if(dm!=0)jK=jK.slice(dm);n=n.concat(ar.pz("jpg").fk(jK.buffer))}catch(dQ){}}else if(w.mt(jK,0,4)=="PMPD"){if(iE)console.log("Xiaomi stuff");
var D=4,iI=w.K3(jK,12),dM=w.K3(jK,16),f4=w.K3(jK,1060),em=w.K3(jK,1064),ik=f4>em,jp=n[0].K$.m>n[0].K$.e,eA=jK.slice(jK.length-f4*em-4),k8=d.R(f4*em);
for(var er=0;er<em;er++)for(var cE=0;cE<f4;cE++)k8[er*f4+cE]=eA[(em-er-1)*f4+cE];var iq=d.R(f4*em*4);
iq.fill(255);d.ZM(k8,iq);if(ik!=jp){var iP=iq.slice(0);d.D.Ny(iq,iP,f4,em);var b2=f4;f4=em;em=b2;d.D.qf(iP,iq,f4,em)}n.push({K$:new gh(0,0,f4,em),data:iq.buffer})}else console.log(w.mt(jK,0,4),jK)}if(n.length>1){var ay=n[0].K$,a4=!1,h_=!0;
n[0].rF="Main";var bK=[!1];for(var F=1;F<n.length;F++){bK[F]=ar.tq.abF(new Uint8Array(n[F].data));if(bK[F])a4=!0;
if(!n[F].K$.HM(n[0].K$))h_=!1}if(!a4&&!h_)n=n.slice(0,1);else for(var F=1;F<n.length;F++){n[F].rF=bK[F]?"Depth Map":null;
var bj=n[F].K$;if(!bj.HM(ay)){var gs=ay.m/bj.m,bs=ay.e/bj.e,e3=new bI;e3.scale(gs,bs);var jA=X.Y.av([new Uint8Array(n[F].data),bj],1,d.D.Gr(e3));
n[F].K$=jA.rect;n[F].data=jA.buffer}}}if(ar.tq.Ac==1)if(v[2]!=1||v[6]!=1)for(var F=0;F<n.length;F++){var kn=n[F],j6=new Uint8Array(kn.data),z=kn.K$.m,j=kn.K$.e,f4=v[0],em=v[1],i=d.R(f4*em*4);
d.D.KL(j6,z,j,i,v);kn.K$=new gh(0,0,f4,em);kn.data=i.buffer}return n};ar.tq._2=function(x){if(window.confirm("Photopea found a "+cI.dc(x.length)+" MP4 video inside your image. Would you like to save it?",4e3)){hF.save(x.slice(0).buffer,"video.mp4")}};
ar.tq.abF=function(x){var Q=!0;for(var F=0;F<x.length;F+=4){Q=Q&&x[F]==x[F+1]&&x[F+1]==x[F+2]}return Q};
ar.tq.Ac=0;ar.tq.fk=function(x,Q,c){x=new Uint8Array(x);if(x[0]==255){var $=ar.tq.Ds(x);if($[195]==null){ar.tq.Ac++;
var z=ar.tq.OM(x,$,!1);ar.tq.Ac--;return z}var j=w._C(x,$[195][0]+5),U=w._C(x,$[195][0]+7),i=UTIF.LosslessJpegDecode(x),b=U*j,e=d.R(b*4);
for(var F=0;F<b;F++){var k=F<<2,K=k-F;e[k]=i[K];e[k+1]=i[K+1];e[k+2]=i[K+2];e[k+3]=255}return[{K$:new gh(0,0,U,j),data:e.buffer}]}else if(x[0]==0&&x[4]==48&&x[6]==1){var g=x,R=new PDFJS.Jbig2Image,T=[];
if(Q)T.push({data:Q,start:0,end:Q.length});T.push({data:g,start:0,end:g.length});var i=R.parseChunks(T);
if(!c)for(var F=0;F<i.length;F++)i[F]=~i[F];var U=w.q(x,11),j=w.q(x,15),D=Math.ceil(U/8),a=d.R(U*j*4);
for(var _=0;_<j;_++){var I=_*D;for(var f=0;f<U;f++){var k=(_*U+f)*4,y=i[I+(f>>>3)]>>>7-(f&7)&1,Z=y*255;
a[k]=Z;a[k+1]=Z;a[k+2]=Z;a[k+3]=255}}return[{K$:new gh(0,0,U,j),data:a.buffer}]}else{var R=new PDFJS.JpxImage;
R.parse(x);var U=R.width,j=R.height,v=R.tiles,G=R.componentsCount,q=new Uint8Array(U*j*4),h=new gh(0,0,U,j);
for(var R=0;R<v.length;R++){var r=v[R],H=r.width,o=r.height,P=H*o,O=r.items,p=new gh(r.left,r.top,H,o),C=new Uint8Array(P*4);
if(G==1)for(var F=0;F<P;F++){var W=O[F],k=F*4;C[k]=W;C[k+1]=W;C[k+2]=W;C[k+3]=255}else if(G==3)for(var F=0;
F<P;F++){var K=F*3,k=F*4;C[k]=O[K];C[k+1]=O[K+1];C[k+2]=O[K+2];C[k+3]=255}else if(G==4)C.set(O);else console.log("Unknown number of components: "+G);
d.WK(C,p,q,h)}return[{K$:h,data:q.buffer}]}};ar.Rs={};ar.Rs.YU=function(x,Q,c,$){if($==null)$=[70,!1,0,0,0];
var z=$[0]/100,D=0;if(x.length==1){var j=new Uint8Array(ar.qc(x[0][0],Q,c,"webp",z));if(j.length<2e4){var U=jQ.s5(j.buffer),i=U.sub;
for(var F=0;F<i.length;F++)if(i[F].P6=="ICCP"){var b=i[F];j=ar.$o(j,b.z-8,b.size+8);w.aa(j,4,U.size-(b.size+8));
break}}if($[1]&&x[0][3]){var U=jQ.s5(j.buffer),i=U.sub,e=i[0].z+i[0].size,k=x[0][3],K=new Uint8Array(UTIF.encode([be.Q3(k)])),g=new Uint8Array(6+K.length);
w.f3(g,0,"Exif\0\0");g.set(K,6);var R=w.nT(be.iR(k)),T=new Uint8Array(16+g.length+R.length);w.f3(T,0,"EXIF");
w.aa(T,4,g.length);T.set(g,8);var D=8+g.length;w.f3(T,D,"XMP\0");w.aa(T,D+4,R.length);T.set(R,D+8);var a=new Uint8Array(j.length+T.length);
a.set(new Uint8Array(j.buffer,0,e),0);a.set(T,e);a.set(new Uint8Array(j.buffer,e),e+T.length);j=a;w.aa(j,4,w.K3(j,4)+T.length)}return j.buffer}var _=w.RP,I=w.jO,f=new ij;
_(f,D,"RIFF    WEBPVP8X");D+=16;I(f,D,10);D+=4;I(f,D,18);D+=4;I(f,D,Q-1);D+=3;I(f,D,c-1);D+=3;_(f,D,"ANIM");
D+=4;I(f,D,6);D+=4;f.qN(D,4);f.data[D+3]=255;w.Yp(f,D+4,$[3]);D+=6;var y=[];for(var F=0;F<x.length;F++){y.push(x[F][0])}var Z=UPNG.encode.compress(y,Q,c,z==1?0:Math.max(2,Math.floor(z*500)),[!1,!0,!0,0,!0]).frames;
function v(U,J,t,Y){var P=U.z-8,O=U.size+8;t.qN(Y,O);for(var F=0;F<O;F++)t.data[Y+F]=J[P+F];return Y+O}for(var F=0;
F<x.length;F++){_(f,D,"ANMF");D+=4;var G=D,P=0,O=0;D+=4;var q=Z[F],h=q.rect,r=[h.x>>>1,h.y>>>1,h.width-1,h.height-1,x[F][1]];
for(var H=0;H<5;H++)I(f,D+3*H,r[H]);D+=15;f.qN(D,1);f.data[D]=1-q.blend<<1|q.dispose;D++;var o=new Uint8Array(ar.qc(q.img.buffer,h.width,h.height,"webp",1)),i=jQ.s5(o.buffer).sub,p={};
for(var C=0;C<i.length;C++)p[i[C].P6]=i[C];if(p.VP8L)D=v(p.VP8L,o,f,D);else throw"e";var W=D-G-4;I(f,G,W);
if((W&1)==1){f.qN(D,1);D++}}I(f,4,D-8);return f.data.slice(0,D).buffer};(function(){var x=ar.dy.get("wasm/webp").buffer;
WebAssembly.instantiate(x).then(function(Q){var c=Q.instance.exports;ar.Rs.exp=c})}());ar.Rs.fk=function(x){var Q=new Uint8Array(x),c=ar.Rs.aB7,$=null,z=jQ.s5(x).sub,j={},U=null;
for(var F=0;F<z.length;F++)j[z[F].P6]=z[F];if(j.EXIF){var i=j.EXIF,b=new Uint8Array(x,i.z+6,i.size-6),i=UTIF.decode(b)[0];
if(i)U=be.tC(i)}if(j["XMP\0"]){var i=j["XMP\0"],b=new Uint8Array(x,i.z,i.size);if(U==null)U={};U=be.I9(w.IV(b),U)}var e=j.ANIM,k=j.VP8L,g=j["VP8 "],R=j.VP8X;
if(e==null){var T,D;if(g){T=w.uv(Q,g.z+6);D=w.uv(Q,g.z+8)}else if(k){var a=w.K3(Q,k.z+1);T=(a&(1<<14)-1)+1;
D=(a>>>14&(1<<14)-1)+1}else throw"e";var _=c($,x,{z:0,size:Q.length},T,D);_.hD=U;return[_]}var I=R.z,T=1+(w.K3(Q,I+4)&16777215),D=1+(w.K3(Q,I+7)&16777215),f=[],y=new gh(0,0,T,D),Z=d.R(T*D*4);
for(var F=0;F<z.length;F++){var v=z[F];if(v.P6!="ANMF")continue;var G=[];for(var q=0;q<5;q++)G.push(w.K3(Q,v.z+q*3)&16777215);
var h=new gh(G[0]*2,G[1]*2,G[2]+1,G[3]+1),r=G[4],H=c($,x,{z:v.z+16,size:v.size-16},T,D),o=new Uint8Array(H.data),P=Q[v.z+15];
if(P>>>1==0)d.l.UY("norm",o,h,Z,y,h,1);else d.WK(o,h,Z,y);f.push({rF:"_a_"+f.length+","+r,K$:y.clone(),data:Z.buffer.slice(0)});
if((P&1)==1){d.h4(o,0);d.WK(o,h,Z,y)}}return f};ar.Rs.aB7=function(x,Q,c,$,z){var j=ar.Rs.exp,U=j.memory,i=5e6+2*c.size+$*z*10;
ar.IZ(j,i);var b=new Uint8Array(U.buffer),e=j.malloc(c.size);b.set(new Uint8Array(Q,c.z,c.size),e);var k=j.malloc(8),K=j.WebPDecodeARGB(e,c.size,k,k+4),g=w.K3(b,k),R=w.K3(b,k+4),T=g*R*4,D=d.R(T);
for(var F=0;F<T;F+=4){D[F]=b[K+F+1];D[F+1]=b[K+F+2];D[F+2]=b[K+F+3];D[F+3]=b[K+F]}j.WebPFree(K);j.free(k);
j.free(e);return{K$:new gh(0,0,g,R),data:D.buffer}};ar.ash=function(){function x(i,b,e,k){var K=new Uint8Array(i[0][0]),g=new Uint32Array(K.buffer),R=[],T={},a=24,_=0,v=0;
for(var F=0;F<g.length;F++){var D=g[F]&16777215;if(T[D]==null){T[D]=R.length;R.push(D);if(R.length>256){R=null;
break}}}if(k&&k[0])R=null;if(R){a=1;while(1<<a<R.length)a*=2;if(a==2)a=4}var I={ww:b,R0:e,XA:1,Pl:a,vC:0,ak1:_},f=4*Math.floor((I.Pl*I.ww+31)/32);
I.size=f*I.R0+2;var y=new ij,Z=R?(1<<a)*4:0;w.RP(y,v,"BM");v+=2;w.jO(y,v,f*e+16+40+Z);v+=4;w.jO(y,v,0);
v+=4;w.jO(y,v,54+Z);v+=4;y.qN(v,40);w.jO(y,v,40);v+=4;U(y.data,v,I,f);v+=36;if(R){y.qN(v,Z);var G=y.data;
for(var F=0;F<R.length;F++){var q=v+F*4,h=R[F]>>>16,r=R[F]>>>8&255,H=R[F]&255;G[q]=h;G[q+1]=r;G[q+2]=H}v+=Z}y.qN(v,f*e);
if(a==24)for(var o=0;o<e;o++){var P=v+(e-1-o)*f;for(var O=0;O<b;O++){var p=(o*b+O)*4;y.data[P+O*3+2]=K[p];
y.data[P+O*3+1]=K[p+1];y.data[P+O*3+0]=K[p+2]}}else if(a==8)for(var o=0;o<e;o++){var P=v+(e-1-o)*f;for(var O=0;
O<b;O++){var p=o*b+O,C=T[g[p]&16777215];y.data[P+O]|=C}}else if(a==4)for(var o=0;o<e;o++){var P=v+(e-1-o)*f;
for(var O=0;O<b;O++){var p=o*b+O,C=T[g[p]&16777215];y.data[P+(O>>>1)]|=C<<4-(O&1)*4}}else if(a==1)for(var o=0;
o<e;o++){var P=v+(e-1-o)*f;for(var O=0;O<b;O++){var p=o*b+O,C=T[g[p]&16777215];y.data[P+(O>>>3)]|=C<<7-(O&7)}}v+=f*e+2;
return y.data.slice(0,v).buffer}function Q(i){i=new Uint8Array(i);if(w.K3(i,0)==40)return[c(i.buffer,0)];
var b=0,e=w.mt(i,b,2);b+=2;if(e!="BM"){alert("Unsupported BMP format: "+e);return}var k=w.K3(i,b);b+=4;
b+=4;var K=w.K3(i,b);b+=4;return[c(i.buffer,b,K)]}function c(i,b,e){i=new Uint8Array(i);var k=w.K3(i,b),K=j(i,b+4);
if(K.XA!=1)alert("unsupported number of color planes: "+K.XA);if(K.vC!=0&&K.vC!=1&&K.vC!=2&&K.vC!=3){alert("Unsupported BMP compression: "+K.vC);
return}b+=k;var g=b,R=i;if(e==null)e=b;if(K.vC==1||K.vC==2){var T=z(i,e,K);K.Pl=8;i=T;e=0}var D=4*Math.floor((K.Pl*K.ww+31)/32),a=K.ww,_=Math.abs(K.R0),I=new Uint8Array(a*_*4);
I.fill(255);if(K.Pl==32)for(var f=0;f<_;f++){var y=e+(_-1-f)*D;for(var Z=0;Z<a;Z++){var v=(f*a+Z)*4;
I[v]=i[y+Z*4+2];I[v+1]=i[y+Z*4+1];I[v+2]=i[y+Z*4+0];I[v+3]=i[y+Z*4+3]}}else if(K.Pl==24)for(var f=0;
f<_;f++){var y=e+(_-1-f)*D;for(var Z=0;Z<a;Z++){var v=(f*a+Z)*4;I[v]=i[y+Z*3+2];I[v+1]=i[y+Z*3+1];I[v+2]=i[y+Z*3+0]}}else if(K.Pl==16)for(var f=0;
f<_;f++){var y=e+(_-1-f)*D;for(var Z=0;Z<a;Z++){var v=(f*a+Z)*4,G=i[y+Z*2+1]<<8|i[y+Z*2];I[v]=(G>>>11)*(255/31);
I[v+1]=(G>>>5&63)*(255/63);I[v+2]=(G&31)*(255/31)}}else if(K.Pl==8)for(var f=0;f<_;f++){var y=e+(_-1-f)*D;
for(var Z=0;Z<a;Z++){var v=(f*a+Z)*4,q=i[y+Z];I[v]=R[g+4*q+2];I[v+1]=R[g+4*q+1];I[v+2]=R[g+4*q+0]}}else if(K.Pl==4)for(var f=0;
f<_;f++){var y=e+(_-1-f)*D;for(var Z=0;Z<a;Z++){var v=(f*a+Z)*4,q=i[y+(Z>>1)];q=q>>4-4*(Z&1);q=q&15;
I[v]=R[g+4*q+2];I[v+1]=R[g+4*q+1];I[v+2]=R[g+4*q+0]}}else if(K.Pl==1)for(var f=0;f<_;f++){var y=e+(_-1-f)*D;
for(var Z=0;Z<a;Z++){var v=(f*a+Z)*4,h=i[y+(Z>>3)];h=h>>7-(Z&7);h=h&1;I[v]=R[g+4*h+2];I[v+1]=R[g+4*h+1];
I[v+2]=R[g+4*h+0]}}else throw"Unknown bit depth "+K.Pl;if(K.R0<0){var r=new Uint32Array(I.buffer),H=_>>>1;
for(var f=0;f<H;f++){var o=f*a,P=(_-f-1)*a;for(var Z=0;Z<a;Z++){var O=r[o+Z];r[o+Z]=r[P+Z];r[P+Z]=O}}}return{K$:new gh(0,0,a,_),data:I.buffer}}function $(i,F){return i>>>4-((F&1)<<2)&15}function z(i,b,e){var k=e.ww,K=Math.abs(e.R0),g=new Uint8Array(k*K),R=0,T=0,F=0;
while(T<K){var D=i[b++],a=i[b++],_=T*k+R;if(D>0){if(e.Pl==4)for(F=0;F<D;F++){g[_+F]=$(a,F)}else for(F=0;
F<D;F++){g[_+F]=a}R+=D}else if(D==0&&a==0){T++;R=0}else if(D==0&&a==1){break}else if(D==0&&a==2){R+=i[b++];
T+=i[b++]}else{var I=a;if(e.Pl==4){for(F=0;F<a;F++){g[_+F]=$(i[b+(F>>>1)],F)}I=Math.ceil(a/2)}else{for(F=0;
F<a;F++){g[_+F]=i[b+F]}}if((I&1)!=0)I++;b+=I;R+=a}}return g}function j(i,b){var e=w.fu,k=w.K3,K=w.uv,g={};
g.ww=e(i,b);b+=4;g.R0=e(i,b);b+=4;g.XA=K(i,b);b+=2;g.Pl=K(i,b);b+=2;g.vC=k(i,b);b+=4;g.size=k(i,b);b+=4;
var R=e(i,b);b+=4;var T=e(i,b);b+=4;g.ak1=k(i,b);b+=4;b+=4;return g}function U(i,b,e,k){w.aa(i,b,e.ww);
b+=4;w.aa(i,b,e.R0);b+=4;w.JF(i,b,e.XA);b+=2;w.JF(i,b,e.Pl);b+=2;w.aa(i,b,e.vC);b+=4;w.aa(i,b,e.size);
b+=4;w.aa(i,b,2834);b+=4;w.aa(i,b,2834);b+=4;w.aa(i,b,e.ak1);b+=4;b+=4}return{fk:Q,YU:x,aqG:c}}();ar.qg={};
ar.qg.YU=function(x,Q,c,$){if($==null)$=[100,!1,0,0,0,0];var z=[],j=[],U=Q*c*4,D=null;for(var i=0;i<x.length;
i++){var b=new Uint8Array(x[i][0].slice(0));for(var F=0;F<U;F+=4){var e=b[F+3]=b[F+3]>127?255:0;if(e==0)b[F]=b[F+1]=b[F+2]=0}z.push(b.buffer);
j.push(x[i][1])}var k=Math.round(2+254*$[0]/100),K=UPNG.encode.compress(z,Q,c,k,[!0,!1,!1,8,!1,$[1]]),g=K.plte,R=new Uint8Array(4),T=new Uint32Array(R.buffer);
for(var F=0;F<g.length;F++){T[0]=g[F];var a=R[0];R[0]=R[2];R[2]=a;g[F]=T[0];if(T[0]==0)D=F}while(g.length<256)g.push(0);
var _=new Uint8Array(2e4+Math.round(1.5*Q*c*x.length)),I=$[3],f={palette:g};if(I!=1)f.loop=I==0?0:I-1;
var y=new GifWriter(_,Q,c,f);for(var F=0;F<x.length;F++){var Z=K.frames[F],v=Z.rect,G=Z.blend,q=Z.dispose,h=Math.round(j[F]/10);
if(h<2)h=2;y.addFrame(v.x,v.y,v.width,v.height,Z.img,{transparent:D,disposal:q+1,delay:h})}return _.slice(0,y.end()).buffer};
ar.qg.fk=function(x){var Q=Date.now(),c=[],$=UGIF.decode(x),z=UGIF.toRGBA8($),j=new gh(0,0,$.width,$.height);
for(var F=0;F<z.length;F++){var U=$.frames[F];c.push({K$:j.clone(),rF:"_a_frm"+F+","+U.delay*10,data:z[F]})}return c};
ar.yX={};ar.yX.YU=function(x,Q,c,$){if(Q>256||c>256){alert("Maximum ICO size is 256x256 px. Will be cropped.",4e3);
var z=Math.min(Q,256),j=Math.min(c,256),U=new gh(0,0,z,j),i=d.R(U.P()*4),b=new gh(0,0,Q,c),e=new Uint8Array(x[0][0]);
d.WK(e,b,i,U);x[0][0]=i.buffer;Q=z;c=j}var k=new Uint8Array(x[0][0]).slice(0),g=0;k[3]=Math.min(k[3],254);
var K=new ij,R=$&&$[0]==!0;w.Yp(K,g,0);g+=2;w.Yp(K,g,R?2:1);g+=2;w.Yp(K,g,1);g+=2;var T=new Uint8Array(UPNG.encode([k.buffer],Q,c,null,null,null,!0));
K.qN(g,16);K.data[g]=Q==256?0:Q;g++;K.data[g]=c==256?0:c;g++;g+=2;w.Yp(K,g,R?Math.round(Q/2):1);g+=2;
w.Yp(K,g,R?Math.round(c/2):32);g+=2;w.jO(K,g,T.length);g+=4;w.jO(K,g,6+16);g+=4;K.qN(g,T.length);K.data.set(T,g);
g+=T.length;return K.data.slice(0,g).buffer};ar.yX.fk=function(x){x=new Uint8Array(x);var Q=4,c=w.uv(x,Q);
Q+=2;var $=[];for(var F=0;F<c;F++){var z=ar.yX.aAb(x,Q+F*16),j=x.buffer.slice(z.offset,z.offset+z.size),U=ar.HB(j);
U=U?U:"bmp";if(U=="png"){var i=ar.pz(U),b=i.fk(j);z.Gq=b[0]}else{var e=ar.pz("BMP").aqG(j,0),j=d.R(z.ww*z.R0*4);
d.WK(new Uint8Array(e.data),new gh(0,0,e.K$.m,e.K$.e),j,new gh(0,z.R0,z.ww,z.R0));e.data=j.buffer;e.K$.e=z.R0;
z.Gq=e}$.push(z)}$.sort(function(k,K){if(k.ww!=K.ww)return k.ww-K.ww;return k.alQ-K.alQ});return[$.pop().Gq]};
ar.yX.aAb=function(x,Q){var c={};c.ww=x[Q];Q++;if(c.ww==0)c.ww=256;c.R0=x[Q];Q++;if(c.R0==0)c.R0=256;
c.agt=x[Q];Q++;Q++;c.ajB=w.uv(x,Q);Q+=2;c.alQ=w.uv(x,Q);Q+=2;c.size=w.K3(x,Q);Q+=4;c.offset=w.K3(x,Q);
Q+=4;return c};ar.t_={};ar.t_.fk=function(x){var Q=Date.now(),$;if(d.raw.Yj(x.byteLength))return[d.raw.aAn(x)];
var c=UTIF.decode(x);console.log(c);if(c[0].t33421)$=c[0];else if(c[0].subIFD&&c[0].t271&&c[0].t271[0]=="Hasselblad"){$=c[0].subIFD[0];
$.t33421=[2,2]}else if(c[0].subIFD&&c[0].subIFD[0].t33421){$=c[0].subIFD[0];if($.t50706==null){if($.t258[0]==8)$.t258[0]=12}}else if(c[0].subIFD&&c[0].subIFD[0]&&c[0].subIFD[0].t262&&c[0].subIFD[0].t262[0]==34892)$=c[0].subIFD[0];
else if(c[0].t50706)$=c[0];else if(c[0].subIFD&&c[0].subIFD[1]&&c[0].subIFD[1].t33421)$=c[0].subIFD[1];
else if(c[0].subIFD&&c[0].subIFD[2]&&c[0].subIFD[2].t33421)$=c[0].subIFD[2];else if(c[3]&&c[3].t50648){var z=c[0].exifIFD,j=z.makerNote;
$=c[3];var U=j.t224[1],i=j.t224[2];$.t256=[U];$.t257=[i];$.t258=[16];$.t259=[7];$.t262=[32803];$.t277=[1];
$.t33421=[2,2];var b=$.t50656[0],e=d.raw.Zn[b];if(e==null)throw"e";$.t33422=e}else if(c[0].t1&&c[0].t1.length==4){var k=c[0],K={2:256,3:257,8:277,11:259,271:271,272:272,279:279,280:273,278:278,273:273,278:278},g=k.t280==null;
$={};for(var R in K)if(k["t"+R])$["t"+K[R]]=k["t"+R];$.t2=k.t2;$.t3=k.t3;$.t10=k.t10;$.t45=k.t45;$.t258=[16];
$.t33421=[2,2];var T=k.t9[0];if(g)T=2;$.t33422=[[0,1,1,2],[1,0,2,1],[1,2,0,1],[2,1,1,0]][T-1];var D=k.t4[0],a=k.t5[0],_=k.t6[0],I=k.t7[0];
$.t50829=[D,a,_,I];var f=k.t36[0],y=k.t37[0],Z=k.t38[0];$.t50728=[y/f,y/y,y/Z]}else if(c[0].t258&&c[0].t258[0]>=12&&c[0].t271&&(c[0].t271[0].startsWith("OLYMPUS")||c[0].t271[0].startsWith("OM Digital Solutions"))){$=c[0];
$.t33421=[2,2]}if($){UTIF.decodeImage(x,$,c);for(var v in c[0])if((v[0]=="t"||v[0]=="e"||v[0]=="d")&&$[v]==null)$[v]=c[0][v];
$.Lj=c[0].t274?c[0].t274[0]:1;return[$]}var G=[];for(var F=0;F<c.length;F++){var q=c[F],h=null,C=72;
UTIF.decodeImage(x,q,c);if(q.t258&&q.t258[0]==16&&q.t277&&q.t277[0]==1){var r=0,H=0,o=0,P=q.data;for(var O=0;
O<P.length;O+=2){var p=P[O+1]<<8|P[O];if(p>r)r=p;H+=p;o++}h=1/256*65535/(.5*r+.5*(2*H/o))}var W=q.t282,J=q.t296;
if(W!=null&&J!=null){C=W[0][0]/W[0][1];if(J[0]==3)C=Math.round(C/2.54)}if(q.width==null)continue;var t=UTIF.toRGBA8(q,h).buffer,Y=be.tC(q);
console.log(q);G.push({K$:new gh(0,0,q.width,q.height),data:t,cQ:C,hD:Y,Xo:q.t34675?q.t34675.slice(0):null})}return G};
ar.t_.YU=function(x,Q,c,$){if($==null)$=[!1];var z={},j=x[0];if(j[3]!=null&&$[0])z=be.Q3(j[3]);if(j[2]!=null){z.t282=z.t283=[[Math.round(j[2]),1]];
z.t296=[2]}return UTIF.encodeImage(j[0],Q,c,z)};ar.VB={};ar.VB.fk=function(x){x=new Uint8Array(x);var Q=8,c,$=0;
while(Q<x.length){var z=w.mt(x,Q,4),j=w.q(x,Q+4);if(z.startsWith("ic")){var U=x.slice(Q+8,Q+j),i=ar.HB(U.buffer),b=ar.pz(i),e=b.fk(U.buffer),k=e[0].K$.P();
if(k>$){$=k;c=e}}Q+=j}return c};ar.RC={};ar.RC.f6=!0;ar.RC.fk=function(x,Q){cz.s5(x,Q)};ar.RC.a53=function(x,Q,c,$){if($==null)$=[!1,!1,!1,!1,!1];
if(!$[0])x.VY();var z=new ij,j=cz.o5(x,z,$);return[z.data.buffer,j]};ar.RC.YU=function(x,Q,c,$){var z=ar.RC.a53(x,Q,c,$),j=z[0],U=z[1];
return j.byteLength==U?j:j.slice(0,U)};ar.qS={};ar.qS.f6=!0;ar.qS.fk=function(x,Q){var c=pako.inflate(new Uint8Array(x)),$=w._C(c,0),z=w._C(c,2),j=4;
Q.m=w.q(c,j);j+=4;Q.e=w.q(c,j);j+=4;Q.buffer=d.R(Q.m*Q.e*4);var U=w._C(c,j);j+=2;j+=4;for(var i=0;i<U;
i++){var b=Q.Xh(),T=0,C=1,W=2,J=3,t=0;Q.B.push(b);var e=w.q(c,j);j+=4;var k=j,K=w._C(c,k);k+=2;var g=w.IV(c,k,K);
k+=K;b.gF(g);var R=c[k];k++;if(R!=0&&R!=1)throw R;b.rect.x=w.c4(c,k);k+=4;b.rect.y=w.c4(c,k);k+=4;b.rect.m=w.q(c,k);
k+=4;b.rect.e=w.q(c,k);k+=4;if($>3){T=w.c4(c,k);k+=4}b.opacity=Math.round(255*c[k]/100);k++;var D=c[k];
k++;b.KW(D!=0);b.s3="norm,lddg,norm,dark,diff,norm,hLit,norm,norm,lite,mul ,over,scrn,fsub".split(",")[c[k]];
k++;var a=c[k];k++;if(a)b.add.lspf=1<<31;if($>3){var _=w._C(c,k);k+=2;if(_!=0){var I=JSON.parse(w.IV(c,k,_));
k+=_;var f=I.text,y=I.textSettings,Z=y.font,v=y.size,G=y.padding,q=parseInt(y.color.slice(1),16);b.add.lnsr="rend";
b.add.TySh=dU.Y7(0,0);b.add.TySh.Iv=new gh(0,0,100,100);var h=b.add.TySh.i=new bI,r=b.rect.m/2,H=b.rect.e/2;
h.translate(-r,-H);h.rotate(-T*Math.PI/180);h.translate(r,H);h.translate(b.rect.x+G,b.rect.y+G);var o=b.add.TySh.HW;
dU.DY(o,1);dU.ei(o,[0,0,b.rect.m-G*2,b.rect.e]);dU.U3(o,0,f);var P=dU.zl(o,0,1);P.VA.FontSize=v;P.VA.FillColor={Type:1,Values:[1,(q>>>16&255)/255,(q>>>8&255)/255,(q>>>0&255)/255]};
if(y.bold)Z+="-Bold";dU.gD(P,Z);P.SW.Justification=["left","right","center"].indexOf(y.align);dU.G4(o,0,f.length,P)}}var O=w.q(c,k);
k+=4;if(O!=b.rect.P()*4){for(var F=b.rect.m;F>b.rect.m/2;F--){var p=O/(F*4);if(p==Math.round(p)){b.rect.m=F;
b.rect.e=p;break}}}b.buffer=d.R(b.rect.P()*4);if($>3){C=0;W=1;J=2;t=3}for(var F=0;F<O;F+=4){b.buffer[F]=c[k+F+C];
b.buffer[F+1]=c[k+F+W];b.buffer[F+2]=c[k+F+J];b.buffer[F+3]=c[k+F+t]}k+=O;var Y=w.q(c,k);k+=4;if(Y==0&&$>3){j+=e;
continue}var l=c[k];k++;var m=w._C(c,k);k+=2;if(Y!=0){b.F=new eM.zM;b.F.rect=b.rect.clone();b.F.channel=d.R(b.rect.P());
for(var F=0;F<Y;F+=4)b.F.channel[F>>>2]=c[k+F+1];k+=Y}if(l!=0){var B=JSON.parse(aF.default);b.add.lmfx=B;
for(var F=0;F<aF.order.length;F++)B[aF.mh[F]]={t:"VlLs",v:[]};var L={"102":9,"101":2,"103":0,"104":3,"105":8};
for(var F=0;F<l;F++){var A=w._C(c,k),S=k+A+4,M=c.slice(k,S),N=c[k+2];k+=3;var s=L[N+""],V=JSON.parse(aF.lF[s]);
B[aF.mh[s]].v.push({t:"Objc",v:V});if(s!=0){V.Md.v.BlnM=cq.DU("norm");V.Opct.v.val=c[k];k++;if(s==9||s==2){V.Dstn.v.val=c[k+1];
k+=2}else k+=2;V.blur.v.val=Math.round(c[k]*1.2);k++;if(s==9||s==2){V.uglg.v=!1;V.lagl.v.val=180-w._C(c,k);
k+=2}V.Clr.v=d.I.lV({Z:c[k+1],r:c[k+2],J:c[k+3]})}else{V.hglM.v.BlnM=V.sdwM.v.BlnM=cq.DU("norm");k+=2;
var g8=c[k++],n=c[k++];V.blur.v.val=Math.round(Math.sqrt(n*g8)*1.3);V.srgR.v.val=Math.round(100*g8/n);
V.uglg.v=!1;V.lagl.v.val=180-w._C(c,k);k+=2;V.hglO.v.val=c[k++];V.hglC.v=d.I.lV({Z:c[k+1],r:c[k+2],J:c[k+3]});
k+=4;V.sdwO.v.val=c[k++];V.sdwC.v=d.I.lV({Z:c[k+1],r:c[k+2],J:c[k+3]});k+=4}k=S}}if(k-j<e){var cQ=w.q(c,k),ie=0;
k+=4;k++;var K=w._C(c,k);k+=2;var f=w.IV(c,k,K);k+=K;f=f.replace(/\r/g,"\n");var K=w._C(c,k);k+=2;var Z=w.IV(c,k,K);
k+=K;var v=w._C(c,k);k+=2;var hk=b.rect.x,eG=b.rect.m;if(cQ&4)ie=1;if(cQ&2)ie=2;var eN=Math.round(v*.4);
if(ie==0||ie==2)eG+=eN;if(ie==1||ie==2){eG+=eN;hk-=eN}b.add.lnsr="rend";b.add.TySh=dU.Y7(0,0);b.add.TySh.Iv=new gh(0,0,100,100);
b.add.TySh.i=new bI(1,0,0,1,hk,b.rect.y+v*.25);var o=b.add.TySh.HW;dU.DY(o,1);dU.ei(o,[0,0,eG,b.rect.e]);
dU.U3(o,0,f);var P=dU.zl(o,0,1);P.VA.FontSize=v;P.VA.FillColor={Type:1,Values:[1,c[k+1]/255,c[k+2]/255,c[k+3]/255]};
k+=4;if(c[k+5])Z+="-Bold";if(c[k+6])Z+="-Italic";dU.gD(P,Z);P.SW.Justification=ie;k+=8;dU.G4(o,0,f.length,P)}j+=e}};
ar.iC={};ar.iC.f6=!0;ar.iC.fk=function(x,Q){var c=UZIP.parse(x),$=JSON.parse(w.IV(c["manifest.json"].buffer));
Q.m=$.width;Q.e=$.height;Q.buffer=d.R(Q.m*Q.e*4);Q.name=$.name+".psd";var z=$.stack;for(var j=0;j<z.length;
j++){var U=z[j],i=U.type,b=U.rect,e=U.format,k=Q.Xh();k.gF(U.name);k.KW(U.visible);k.opacity=Math.round(255*U.opacity);
var K=k.rect=new gh(b.x,b.y,b.w,b.h),g=b.r;if(g==null)g=0;Q.B.push(k);if(i=="image"&&g!=0||i=="shape"&&e.variant=="svg"){var R=Q.BQ(c[U.content],k.getName(),0,0);
R.H2=k.H2;R.opacity=k.opacity;k=R;Q.B.pop();Q.B.push(k);var T=d.A.Hg(K).j;d.A.i(T,ar.iC.lz(K,g),T);k.add.SoLd.Trnf=X.Y.TD(T);
k.add.SoLd.nonAffineTransform=X.Y.TD(T);k.bx(Q,!1)}else if(i=="image"){var D=c[U.content].buffer,a=ar.HB(D),_=ar.pz(a),I=_.fk(D)[0];
K.m=I.K$.m;K.e=I.K$.e;k.buffer=new Uint8Array(I.data)}else if(i=="shape"){k.H2|=16;var f=k.add.vstk=aF.XM.$H(!0),y=k.add.vmsk=new eM.hn,Z;
k.add.SoCo={classID:"null",Clr:{t:"Objc",v:d.I.lV({Z:0,r:0,J:0})}};var v=e.variant,G=e.fill;if(v=="rectangle"||v=="rounded"){Z=d.o.JE.Rect(K.x,K.y,K.m,K.e,e.radii)}else if(v=="ellipse"){Z=d.o.JE.Sl(K.x,K.y,K.m,K.e)}else if(v=="path"){var q=Typr.U.SVGToPath(U.content),h={G:q.cmds,j:q.crds};
Z=d.A.tf(h);var r=d.o.sP(Z);d.o.Of(Z,new bI(K.m/r.m,0,0,K.e/r.e,K.x,K.y))}else console.log(e);k.add.SoCo={classID:"null",Clr:{t:"Objc",v:d.I.lV({Z:0,r:0,J:0})}};
if(G.type=="color"){k.add.SoCo.Clr.v=d.I.lV(CSS.zH(G.value))}else if(G.type=="gradient"){delete k.add.SoCo;
var H=k.add.GdFl=JSON.parse(aF.lF[aF.order.indexOf("GrFl")]),o=H.Grad.v;o.Intr.v=0;var P=[],O=G.value.stops;
for(var F=0;F<O.length;F++){var p=O[F],C=CSS.zH(p.color);P.push([p.position,[C.Z/255,C.r/255,C.J/255]])}d.I.q1(P,o);
H.Angl.v.val=-(G.value.direction+g)+90+180}else console.log(G);var W=ar.iC.lz(K,g);d.o.Of(Z,W);var J=U.style;
if(J&&J.outline){var t=J.outline;f.strokeEnabled.v=!0;f.strokeStyleLineWidth.v.val=t.size;f.strokeStyleContent.v.Clr.v=d.I.lV(CSS.zH(t.color))}y.$=Z;
k.jz();k.kT(Q)}else if(i=="text"){k.add.lnsr="rend";k.add.TySh=dU.Y7(0,0);k.add.TySh.Iv=new gh(0,0,100,100);
var Y=k.add.TySh.HW;dU.DY(Y,1);dU.ei(Y,[0,0,K.m,K.e]);var l=U.content;dU.U3(Y,0,l);var m=dU.zl(Y,0,Math.min(l.length,1));
dU.gD(m,e.font.name);var B=m.VA.FontSize=Math.round(e.size);if(e.fill&&e.fill.value){var L=CSS.zH(e.fill.value);
m.VA.FillColor={Type:1,Values:[1,L.Z/255,L.r/255,L.J/255]}}var A=e.linespace;if(A){m.VA.AutoLeading=!1;
m.VA.Leading=Math.round(B*(1.06+parseFloat(A)));console.log(A,m.VA)}m.VA.FauxBold=e.bold;m.SW.Justification=["left","right","center","justify"].indexOf(e.align);
dU.G4(Y,0,l.length,m);k.add.TySh.i=new bI(1,0,0,1,K.x+Math.round(B*.1),K.y+Math.round(B*.1));k.rect=new gh}else console.log(U)}Q.RS=!0};
ar.iC.lz=function(x,Q){var c=x.x+x.m/2,$=x.y+x.e/2,z=new bI;z.translate(-c,-$);z.rotate(-Q*Math.PI/180);
z.translate(c,$);return z};ar.Cx={};ar.Cx.f6=!0;ar.Cx.fk=function(x,Q){hx.s5(x,Q)};var hx=function(){function x(K,g){var R=Date.now(),T=UZIP.parse(K);
console.log(T);console.log(Date.now()-R);R=Date.now();var D=T["maindoc.xml"],a=new DOMParser,_=a.parseFromString(w.IV(D),"image/svg+xml").children[0].children[0],I=_.getAttribute("name"),f=g.m=e(_,"width"),y=g.e=e(_,"height");
g.cQ=Math.round(e(_,"x-res"));var Z=_.children[0].children;Q(Z,g,{aB:I,IA:T,_Y:null});console.log(Date.now()-R);
R=Date.now()}function Q(K,g,R){for(var T=0;T<K.length;T++){var D=K[K.length-1-T],a=D.getAttribute("nodetype");
if(a=="transparencymask"){R._Y.F=k(D,R);continue}var _=D.getAttribute("compositeop"),I=D.getAttribute("filename"),f=D.getAttribute("channelflags"),y=D.children;
y=y.length==0?null:y[0].children;var Z=g.Xh();if(a=="paintlayer"){var v=e(D,"x"),G=e(D,"y"),q=R.IA[R.aB+"/layers/"+I+".defaultpixel"],h=R.IA[R.aB+"/layers/"+I],r=b(h);
Z.rect=r[0];Z.rect.offset(v,G);Z.buffer=r[1];if(Z.rect._6()&&q.join()!="0,0,0,0"){Z.add.SoCo={classID:"null",Clr:{t:"Objc",v:d.I.lV({Z:q[0],r:q[1],J:q[2]})}};
Z.kT(g)}}else if(a=="grouplayer"){Z.add.lsct=hA.DJ;Z.s3="pass";Z.H2|=24;g.B.push(g.x6());var H=R._Y;
R._Y=Z;Q(y,g,R);R._Y=H}else if(a=="shapelayer"){var h=R.IA[R.aB+"/layers/"+I+".shapelayer/content.svg"],o=w.IV(h),P=g.BQ(h,Z.getName(),0,0);
Z=P;var O=new gh(0,0,g.m,g.e),p=d.A.Hg(O).j;Z.add.SoLd.Trnf=X.Y.TD(p);Z.add.SoLd.nonAffineTransform=X.Y.TD(p);
Z.bx(g,!1)}else if(a=="clonelayer"){var F=-1;for(var C=0;C<K.length;C++)if(K[C].getAttribute("name")==D.getAttribute("clonefrom"))F=C;
if(F!=-1){Q([K[F]],g,R);Z=g.B.pop()}}else console.log(a,D);Z.gF(D.getAttribute("name"));if(e(D,"locked")==1)Z.add.lspf=1<<31;
Z.KW(e(D,"visible")==1);var W={normal:"norm",multiply:"mul ",diff:"diff",hard_light:"hLit"}[_];if(W)Z.s3=W;
else console.log(_);Z.opacity=e(D,"opacity");if(f=="1110")Z.cG=!0;var J=y?y[0]:null;if(J&&J.tagName=="mask")Z.F=k(J,R);
g.B.push(Z)}}function c(K,g){var R=0,T=0,D=K.length,a,_,I;while(R<D){a=K[R++];if(a>31){_=a>>>5;if(_==7)_=7+K[R++];
I=(a&31)<<8|K[R++];var f=T-I-1,y=_>>>1;g[T++]=g[f++];g[T++]=g[f++];for(var F=0;F<y;F++){g[T++]=g[f++];
g[T++]=g[f++]}if((_&1)==1)g[T++]=g[f++]}else{for(var F=0;F<=a;F++){g[T++]=K[R++]}}}}function $(K,g){var R=0;
while(K[g+R]!=10)R++;return w.mt(K,g,R)}var z=new gh(0,0,64,64),j=new Uint8Array(64*64*4),U=new Uint8Array(64*64*4);
function i(){for(var F=0;F<4096;F++){var K=F<<2;j[K+0]=U[F+8192];j[K+1]=U[F+4096];j[K+2]=U[F];j[K+3]=U[F+12288]}}function b(K){var g=0,R={};
for(var F=0;F<5;F++){var T=$(K,g);g+=T.length+1;T=T.split(" ");R[T[0]]=parseInt(T[1])}var D=R.PIXELSIZE,a=[],_=new gh;
while(g<K.length){var T=$(K,g),I=T.split(",");g+=T.length+1;if(I[2]!="LZF")throw I[2];z.x=parseInt(I[0]);
z.y=parseInt(I[1]);_=_.iO(z);var f=parseInt(I[3]);a.push([z.clone(),new Uint8Array(K.buffer,g+1,f-1)]);
g+=f}var y=d.R(_.P()*D);for(var F=0;F<a.length;F++){var Z=a[F];c(Z[1],U);if(D==4){i();d.WK(j,Z[0],y,_)}else d.L2(U,Z[0],y,_)}return[_,y]}function e(K,g){return parseInt(K.getAttribute(g))}function k(K,g){var R=K.getAttribute("filename"),T=g.IA[g.aB+"/layers/"+R+".pixelselection"],D=b(T),a=new eM.zM;
a.Qa=e(K,"visible")==1;a.rect=D[0];a.channel=D[1];return a}return{s5:x}}();ar.Pu={};ar.Pu.f6=!0;ar.Pu.fk=function(x,Q){bp.s5(x,Q)};
ar.AR={};ar.AR.fk=function(x){var Q=new Uint8Array(x),c=ar.AR.WS(Q,0,0),$=c.sub[2],z=ar.AR.LK(Q,$),j=c.sub[3],U=ar.AR.LK(Q,j);
return[z,U]};ar.AR.LK=function(x,Q){var c=Q.sub[Q.sub.length-1],$=c.sub[0].z,z=c.sub[1].z,j=x.slice($,$+16),U=x.slice(z,z+c.sub[1].size),i=w.K3,b=x[$],e=i(x,$+1),k=i(x,$+5),K=x[$+13],g=new gh(0,0,e,k),R=d.R(e*k*4);
if(K){new Uint32Array(R.buffer).fill(4278190080)}else{UTEX.readBC1(x,z,R,e,k)}return{K$:g,data:R}};ar.AR.WS=function(x,Q,c){var $=w.mt,z=w.K3,j=$(x,Q,4);
j=j.split("").reverse().join("");var U=z(x,Q+4);if(U!=0){console.log(x.slice(Q-8));throw U}var i=z(x,Q+8);
while((i&3)!=0)i++;var b={P6:j,z:Q+12,size:i};if(j=="CARF"||j=="CTEX"||j=="CREW"||j=="BMAP"){b.sub=[];
Q+=12;if(j=="CTEX"||j=="CREW")Q+=32;var e=b.z+b.size;while(Q<e){var k=ar.AR.WS(x,Q,c+1);b.sub.push(k);
Q+=12+k.size+(k.size&1)}}return b};ar.IL={};ar.IL.f6=!0;ar.IL.fk=function(x,Q){cX.s5(x,Q)};ar.Ng={};
ar.Ng.f6=!0;ar.Ng.fk=function(x,Q){hR.s5(x,Q)};ar.BU={};ar.BU.f6=!0;ar.BU.fk=function(x,Q){dz.s5(x,Q)};
ar.uS={};ar.uS.f6=!0;ar.uS.fk=function(x,Q){h7.s5(x,Q)};ar.gE={};ar.gE.f6=!0;ar.gE.fk=function(x,Q){jt.s5(x,Q)};
ar.M7={};ar.M7.f6=!0;ar.M7.YU=function(x,Q,c,$,z,j){if($==null)$=[!0,!1,!1,!1,!0];var U=dZ.gS(x,{rd:$[0],hidden:$[1],aBR:$[2],a9D:$[3],tw:$[4],agS:Q,aC4:c},z.Dn,j);
return U};ar.M7.fk=function(x,Q,c){dZ.s5(x,Q,c)};ar.hj={};ar.hj.f6=!0;ar.hj.fk=function(x,Q){var c=150,$=new bI(1,0,0,-1,0,0);
$.scale(c/72,c/72);Q.cQ=c;var z=new gP(Q,$,!0);FromPS.Parse(x,z)};ar.mu={};ar.mu.f6=!0;ar.mu.YU=function(x,Q,c,$,z){if($==null)$=["",100,!1,!1,!1,0,!1];
$[7]=["jpg"];var j=new ToPDF;cd.gS(x,$,j,z.Dn,Q,c);return j.buffer};ar.mu.fk=function(x,Q,c){var $=2;
while(!0){var z=$*72,j=new bI(1,0,0,-1,0,0);j.scale(z/72,z/72);Q.cQ=z;var U=new gP(Q,j,!0);FromPDF.Parse(x,U);
var i=Math.max(Q.m,Q.e);if(c&&i<Math.max(c[0],c[1])){Q.B=[];var b=$;while(i*($/b)<Math.max(c[0],c[1]))$++}else break}};
ar._j={};ar._j.f6=!0;ar._j.fk=function(x,Q){var c=72,$=new bI(1,0,0,1,0,0);$.scale(c/72,c/72);Q.cQ=c;
var z=new gP(Q,$,!1);FromWMF.Parse(x,z)};ar.r9={};ar.r9.NQ=!0;ar.r9.f6=!0;ar.r9.YU=function(x,Q,c,$,z){if($==null)$=["",100,!1,!1,!1,0,!1];
$[7]=[];var j=new ToEMF;cd.gS(x,$,j,z.Dn);return j.buffer};ar.r9.fk=function(x,Q){var c=72,$=new bI(1,0,0,1,0,0);
$.scale(c/72,c/72);Q.cQ=c;var z=new gP(Q,$,!1);FromEMF.Parse(x,z)};ar.tL={};ar.tL.f6=!0;ar.tL.fk=function(x,Q){return kj.s5(x,Q)};
ar.Mp={};ar.Mp.fk=function(){var x,Q,c,$,z,j,U=0,i=0,b=0,e=0,k=0,I="eJzt0lGR6kAUBNBIQEIkICESWgISkICESLgSIgEJkbAS2sG+s7AO+HkfO1RXQZPcOanJsnx/L5/k489n2/+tv/W3PlwXWeUqm0RucpeH7DJyyFNO+ZL+NwOuv9fvv//3PW7Vr/pVv+rXvsdv+k2/6Tf91vftN/3Nl5v+pr/1PXLX7/rdj12/90059If+0B/6o2/aqT/1p/7Un31Tq6+++urb15OGPwCxWfjj4vCHP/zhD3/4wx/+8Ic//OGPseEPf/jDH/7YKvzhD3/4wx/+8Ic//OEPf/jDH/7whz/84Q9/+MMf/vDP62SucpNdnqLnH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7hH/7XsfCXv/zl/2nLX/7yl7/85S9/+ctf/vKX/3Ws/OUvf/nL/zpq/vKXv/zlL3/5y1/+8pe//OUvf/nLX/7+vEL8tVENLX+Vl8tlWdd1uV6vy7ZtS+JNYrjf78vj8fDKetaZ5TiO5fl8Lud5Ll9fX/8ACveX4A==",f=null;
function K(y){var Z=b5.s5(y),v=Z.R7,o=0,P,O;console.log(Z);var G=new Uint8Array(y);if(v=="ILBM")return g(Z,G);
if(v=="CIMG")return D(Z,G);if(v=="ANIM"&&Z.sub[0].P6=="ADAT")return _(Z,G);if(v!="ANIM")throw v;var q=w._C,h=w.q,r=Z.sub,H=g(r[0],G);
for(var p=1;p<r.length-2;p++){var C=H[Math.max(0,p-2)].ane.slice(0),W=r[p];for(var J=0;J<W.sub.length;
J++){var t=W.sub[J],Y=t.z;if(t.P6=="ANHD"){var l=G[Y++];if(l!=5)throw l;var $=G[Y++],m=q(G,Y),B=q(G,Y+2);
if(m!=0&&m!=x)throw m;if(B!=0&&B!=Q)throw B;var L=q(G,Y+4),A=q(G,Y+6);if(L!=0||A!=0)throw L;Y+=8;var S=q(G,Y);
Y+=2;P=q(G,Y);Y+=2;if(G[Y++]!=0)throw"e";if(G[Y++]!=0)throw"e";O=q(G,Y);Y+=2}else if(t.P6=="DLTA"){var M=[],N=Y;
for(var F=0;F<16;F++)M.push(h(G,Y+F*4));Y+=64;var s=j;for(var V=0;V<z;V++){if(M[V]==0)continue;Y=N+M[V];
for(var g8=0;g8<s;g8++){var n=G[Y++],cQ=0;if(n==0)continue;for(var F=0;F<n;F++){var hk=G[Y++];if(hk==0){var eG=G[Y++],ie=G[Y++];
for(var eN=0;eN<eG;eN++){C[(cQ*z+V)*s+g8]=ie;cQ++}}else if(hk<128){cQ+=hk}else{hk-=128;for(var eN=0;
eN<hk;eN++){C[(cQ*z+V)*s+g8]=G[Y+eN];cQ++}Y+=hk}}}}}else console.log(t.P6)}if(p==1&&P>100)P=0;var gr=P==0?17:Math.round((P-o)*1e3/60);
H.push({data:T(G,C).buffer,K$:new gh(0,0,x,Q),ane:C,rF:"_a_frm"+p+","+gr});o=P}if(b!=0&&x>Q*2){var ek=new Uint32Array(x*Q*2);
ek.fill(4294967295);for(var p=0;p<H.length;p++){var jK=H[p],iE=new Uint32Array(jK.data);for(var cQ=0;
cQ<Q;cQ++){var e9=cQ*2;for(var g8=0;g8<x;g8++)ek[e9*x+g8]=iE[cQ*x+g8];e9++;for(var g8=0;g8<x;g8++)ek[e9*x+g8]=iE[cQ*x+g8]}jK.K$.e*=2;
jK.data=ek.slice(0).buffer}}return H}function g(y,Z){var v,G,q;U=0;i=0;e=0;k=0;b=0;for(var h=0;h<y.sub.length;
h++){var r=y.sub[h],H=r.z;if(r.P6=="BMHD"){var o=[];for(var F=0;F<4;F++)o[F]=w._C(Z,H+2*F);H+=8;var P=o[2],O=o[3];
x=o[0];Q=o[1];c=Z[H++];$=Z[H++];q=Z[H++];if(q!=0&&q!=1)throw q;j=x+15>>>4<<1;z=c+$}else if(r.P6=="CMAP")U=H;
else if(r.P6=="CAMG"){var p=w.q(Z,H);i=p&32768,b=p&4,e=p&2048;k=p&128}else if(r.P6=="BODY"){G=d.R(j*Q*z);
if(q==0)G=Z.slice(H,H+G.length);if(q==1)bo.az(Z,H,r.size,G,0,G.length)}else if(r.P6=="PLTP"){console.log(Z.slice(H,H+r.size))}}v=T(Z,G);
return[{K$:new gh(0,0,x,Q),data:v.buffer,ane:G}]}function R(y,jF){return y[jF>>>3]>>>7-(jF&7)&1}function T(y,Z){var v=c-2,G=(1<<v)-1,q=Math.round(255/G),h,r,H,o=j*8;
if(U!=0){var P=1<<c,O=!0;for(var F=1;F<P;F++){var p=U+F*3;if(y[p]!=y[p-3]||y[p+1]!=y[p-2]||y[p+2]!=y[p-1]&&y[p+2]!=y[p-1]+1)O=!1}if(O){for(var F=0;
F<P;F++){var p=U+F*3,C=Math.round(F*255/(P-1));y[p]=y[p+1]=y[p+2]=C}}}var W=d.R(x*Q*4);for(var J=0;J<Q;
J++)for(var t=0;t<x;t++){var Y=0;for(var l=0;l<z;l++){var m=(J*z+l)*o+t,B=R(Z,m);Y|=B<<l}Y=Y&(1<<c)-1;
var F=J*x+t,L=F<<2;if(U!=0){if(e!=0&&Y>>>v!=0){var A=Y>>>v,S=(Y&G)*q;if(A==1)H=S;else if(A==2)h=S;else if(A==3)r=S}else{var S=U+Y*3;
h=y[S+0];r=y[S+1];H=y[S+2]}}else{if(c==24){h=Y>>>0&255;r=Y>>>8&255;H=Y>>>16&255}else if(c==16){var M=0,N=1,V=4;
for(var l=0;l<16;l++)M+=(Y>>>l&1)<<15-l;var s=(1<<N)-1,g8=(1<<V)-1;h=(M>>>7&s)*(255/s);r=H=h}else throw c}W[L+0]=h;
W[L+1]=r;W[L+2]=H;W[L+3]=255}return W}function D(y,Z){var v=1,G=2,q=4,h=w.q,r=w._C,x=200,Q=200,H,o,P,O;
for(var p=0;p<y.sub.length;p++){var C=y.sub[p],W=C.z;if(C.P6=="TBHD"){x=h(Z,W);W+=4;Q=h(Z,W);W+=4;O=d.R(x*Q*4);
P=new gh(0,0,x,Q);W+=4;var J=h(Z,W);W+=4;var t=r(Z,W);W+=2;if(t!=0)throw"e";o=r(Z,W);W+=2;var Y=h(Z,W);
W+=4;if(Y!=1)throw Y;H=0;if(J&v)H+=3;if(J&G)H+=1}if(C.R7=="TBMP"){var l=C.sub;for(var m=0;m<l.length;
m++){var B=l[m].z,L=l[m].size,A=r(Z,B),S=r(Z,B+2),M=r(Z,B+4)-A+1,N=r(Z,B+6)-S+1;B+=8;var s=d.R(M*N*4),V=d.R(M*N);
s.fill(255);for(var F=0;F<4;F++){B=a(Z,B,L-8,V,0);d.Dm(V,s,3-F)}if(B!=l[m].z+L)throw"e";d.WK(s,new gh(A,S,M,N),O,P)}}}return[{K$:P,data:O.buffer}]}function a(y,Z,v,G,q){var h=Z;
while(q<G.length){var r=y[Z++],fu=(r&127)+1;if(r&128){r=y[Z++];for(var F=0;F<fu;++F)G[q++]=r}else{for(var F=0;
F<fu;++F)G[q++]=y[Z++]}}return Z}function _(y,Z){if(f==null){var v=ar.KG(I);f=new Uint32Array(pako.inflate(new Uint8Array(v)).buffer)}var G=w.q,q=w._C,h=y.sub[0],r=y.sub[1],x=q(Z,h.z),Q=q(Z,h.z+2),H=q(Z,h.z+4),C,F,W,J,t,Y;
if(H!=3)throw H;var o=new gh(0,0,x,Q),P=d.R(x*Q*4),O=d.R(x*Q);P.fill(255);var p=new Uint32Array(P.buffer),l=r.z;
for(J=0;J<2;J++){Y=J;t=0;C=Math.floor((x*Q+2-J-1)/2);while(C>0){F=Z[l++];if(F&128){F=257-F;C-=F;W=Z[l++];
t=t&f[W]|f[W+256];do{p[Y]=t;Y+=2}while(--F)}else{F++;C-=F;do{W=Z[l++];p[Y]=t=t&f[W]|f[W+256];Y+=2}while(--F)}}}for(var F=0;
F<P.length;F+=4){var m=P[F+3],B=P[F+2],L=P[F+1];P[F]=m;P[F+1]=B;P[F+2]=L;P[F+3]=255}for(var A=0;A<Q>>>1;
A++){for(var S=0;S<x;S++){var F=A*x+S,W=(Q-1-A)*x+S,M=p[F];p[F]=p[W];p[W]=M}}return[{K$:o,data:P.buffer}]}return K}();
ar._5={};ar._5.f6=!1;ar._5.YU=function(x,Q,c,$){var z=x[0][4],j=new Uint8Array(x[0][0]),U=2,i=z?!0:!1,b=i?4:3,e=new Uint8Array(Q*c*b);
for(var k=0;k<c;k++)for(var K=0;K<Q;K++){var g=k*Q+K<<2,R=((c-k-1)*Q+K)*b;e[R]=j[g+2];e[R+1]=j[g+1];
e[R+2]=j[g+0];if(i)e[R+3]=z[0][k*Q+K]}if(!0){var T=e.length,D=0,a=new Uint8Array(T*2),_=0,I=0,f=Q*b;
while(I<T){var y=I,Z=0,v=f*(Math.floor(I/f)+1);while(y<v&&Z<128){var G=!0;for(var F=0;F<b;F++)G=G&e[I+F]==e[y+F];
if(!G)break;y+=b;Z++}if(Z==1){var q=1;while(q<128&&I+(q+1)*b<v){var G=!0,h=I+q*b;for(var F=0;F<b;F++)G=G&e[h+F]==e[h+b+F];
if(G)break;q++}a[_++]=q-1;for(var r=0;r<q;r++)for(var F=0;F<b;F++)a[_++]=e[I++]}else{a[_++]=127+Z;for(var F=0;
F<b;F++)a[_+F]=e[I+F];_+=b;I+=b*Z;D+=Z}}e=a.slice(0,_);U+=8}var H=new Uint8Array(18+e.length+26);H[2]=U;
w.JF(H,12,Q);w.JF(H,14,c);H[16]=b*8;H[17]=b==4?8:0;H.set(e,18);w.f3(H,18+e.length+8,"TRUEVISION-XFILE.");
return H.buffer};ar._5.fk=function(x){var Q=new Uint8Array(x),c=0,$=Q[0],z=Q[1],j=Q[2],U=Q[4]*256+Q[3],i=Q[6]*256+Q[5],b=Q[7],e=Q[9]*256+Q[8],k=Q[11]*256+Q[10],K=Q[13]*256+Q[12],g=Q[15]*256+Q[14],R=Q[16],T=Q[17],D=T>>>4,a=w.mt(Q,18,$),_=d.R(K*g*4),c=18+$+(i*b>>>3),I=new Uint8Array(Q.buffer,c);
if(j>3){var f=0,y=Q,Z=new Uint8Array(K*g*R>>>3),v=c,G=0,q=Q.length,h=R>>>3;while(G<Z.length){var jF=y[v];
v++;if(jF<128)for(var F=0;F<jF+1;F++){for(var r=0;r<h;r++){Z[G]=y[v];G++;v++}}else{for(var F=0;F<jF-127;
F++){for(var r=0;r<h;r++){Z[G]=y[v+r];G++}}v+=h}}j-=8;I=Z;c=v}else c+=K*g*R>>>3;var H=new Uint8Array(4),o=ar._5.acH;
for(var P=0;P<g;P++)for(var O=0;O<K;O++){var p=(D&2)==0?(g-P-1)*K+O:P*K+O,C=P*K+O,W,J,t,Y=255,l=p*R>>>3;
if(j==1){var m=0;if(R==8)m=I[l];else throw"e";o(Q,18+$+U+(m*b>>>3),b,H);W=H[0];J=H[1];t=H[2];Y=H[3]}else if(j==2){o(I,l,R,H);
W=H[0];J=H[1];t=H[2];Y=H[3]}else if(j==3){if(R==8)W=J=t=I[l];else throw"e"}var B=C*4;_[B]=W;_[B+1]=J;
_[B+2]=t;_[B+3]=Y}var H={K$:new gh(0,0,K,g),data:_.buffer,rF:a};if(d.Ty(_)){var L=d.R(K*g);d.GS(_,L,3);
d.h4(_,4278190080,16777215);H.fG=[L]}return[H]};ar._5.acH=function(x,Q,c,$){var z,j,U,i=255;if(c==24||c==32){U=x[Q];
j=x[Q+1];z=x[Q+2];if(c==32)i=x[Q+3]}else if(c==16){var b=x[Q+1]<<8|x[Q+0];z=b>>>10&31;j=b>>>5&31;U=b>>>0&31;
z=Math.round(z*(255/31));j=Math.round(j*(255/31));U=Math.round(U*(255/31))}else throw"e";$[0]=z;$[1]=j;
$[2]=U;$[3]=i};ar.ad0=function(){var x,Q=[],c=!1;function $(U,i,b,e){x=b;Q.push(U,e);z()}function z(){if(c||Q.length==0)return;
c=!0;ar.aiN(Q.shift(),"image/avif",j)}function j(U){x(null,[U],Q.shift());c=!1;z()}return{f6:!1,rH:!0,fk:$}}();
ar.yA=function(){var x,Q=[],c=!1,$,z,j,U=10,i,b,e,k=0,g;function K(f,y,Z,v,G){x=Z;Q.push(f,v);var q=cF.s5(f),h=cF.aeo(q,"vide"),r=h.tkhd,H=h.mdia.minf.stbl,o=r.duration/q.moov.mvhd.cp,P=H.stsz.length,O=Math.round(P/o);
console.log(q);$=r.ww;z=r.R0;var p=$+" \xD7 "+z+" px, "+P+" frames, "+cI.dc($*z*4*P)+" decoded<br/>";
p+=o.toFixed(2)+" seconds, "+O+" FPS";var C=new jO(u.E.M,!0);C.data={d:u.H.LL,AD:"setFPS",ZR:U,ka:D,ai0:p};
G.T(C)}async function R(){if(c||Q.length==0)return;c=!0;var f=Q.shift(),y=cF.s5(f),Z=cF.aeo(y,"vide"),v=Z.tkhd,G=Z.mdia.minf.stbl,q=G.stsd.adk.avcC,h=v.duration/y.moov.mvhd.cp,r=G.stsz.length,H=Math.round(r/h),o=Math.max(1,Math.round(H/U)),P=G.stsd.R$,C=0;
console.log(P);if(["hvc1","hev1","apcn"].indexOf(P)!=-1)alert(P.toUpperCase()+" codec not supported");
g=Date.now();$=v.ww;z=v.R0;j=[];i=document.createElement("canvas");b=i.getContext("2d");i.width=$;i.height=z;
var O=new Uint8Array(f),p=[];if(G.stsd.R$=="raw "){for(var W=0;W<r;W++){var J=$*z;if(C%o==0){var t=cF.asL(y,"vide",W),Y=new Uint8Array(f,t[0],t[1]),l=d.R($*z*4);
l.fill(255);for(var F=0;F<J;F++){var m=F*4,B=F*3;l[m]=Y[B];l[m+1]=Y[B+1];l[m+2]=Y[B+2]}var L=j.length;
j[L]={rF:"_a_"+L+","+Math.round(o*1e3/H),K$:new gh(0,0,$,z),data:l}}C++}T();return}var A=new VideoDecoder({output:function(N){if(C%o==0){b.drawImage(N,0,0);
N.close();var l=b.getImageData(0,0,$,z).data.buffer,L=j.length;j[L]={rF:"_a_"+L+","+Math.round(o*1e3/H),K$:new gh(0,0,$,z),data:l}}else N.close();
clearTimeout(k);k=setTimeout(T,100);C++},error:function(N){console.log(N.message)}}),S={codec:"vp09.00.10.08",codedWidth:$,codedHeight:z};
if(q){S.codec="avc1.640034";S.description=O.slice(q.z,q.z+q.L_)}A.configure(S);for(var F=0;F<r;F++){var t=cF.asL(y,"vide",F),Y=new Uint8Array(f,t[0],t[1]),M=new EncodedVideoChunk({timestamp:F,duration:1e3,type:F==0?"key":"delta",data:Y});
A.decode(M)}await A.flush()}function T(){x(null,j,Q.shift());c=!1;console.log(Date.now()-g);R()}function D(f){U=Math.max(1,Math.min(60,f));
if(window.VideoDecoder)R();else a()}function a(){if(c||Q.length==0)return;c=!0;i=document.createElement("canvas");
b=i.getContext("2d");e=document.createElement("video");var f="data:"+"video/mp4"+";base64,"+ar.al(Q.shift());
e.src=f;e.muted=!0;e.currentTime=0;e.addEventListener("canplay",_,!1);e.addEventListener("timeupdate",I,!1)}function _(f){e.removeEventListener("canplay",_);
$=i.width=e.videoWidth;z=i.height=e.videoHeight;j=[];e.play()}function I(f){clearTimeout(k);b.drawImage(e,0,0);
j.push({rF:"_a_"+j.length+","+Math.round(1e3/U),K$:new gh(0,0,$,z),data:b.getImageData(0,0,$,z).data.buffer});
var y=e.currentTime+1/U;if(y<e.duration&&f){e.currentTime=y;k=setTimeout(I,1e3)}else{x(null,j,Q.shift());
e.removeEventListener("timeupdate",I);c=!1;a();j=null}}return{f6:!1,rH:!0,fk:K}}();ar.yA.YU=function(){var x,Q,c,$,z,j,U=[0,0,0,24,102,116,121,112,109,112,52,50,0,0,0,0,109,112,52,50,105,115,111,109,0,0,0,8,102,114,101,101],i=40,b,e,k,K,g,R;
function T(P,O){if(!z&&O){if(O.description){z=O.description}if(O.decoderConfig&&O.decoderConfig.description){z=O.decoderConfig.description}}var p=new ArrayBuffer(P.byteLength);
P.copyTo(p);D(p);c.push({duration:P.duration,timestamp:P.timestamp,type:P.type,byteLength:P.byteLength});
if(P.type=="key"){$.push(c.length)}}function D(P){var O=new Uint8Array(j.byteLength+P.byteLength);O.set(new Uint8Array(j));
O.set(new Uint8Array(P),j.byteLength);j=O.buffer}function a(P){return new Uint8Array([P.charCodeAt(0),P.charCodeAt(1),P.charCodeAt(2),P.charCodeAt(3)]).buffer}function _(P){var O=new Uint32Array([P]),p=new Uint8Array(O.buffer);
return new Uint8Array([p[3],p[2],p[1],p[0]])}function I(P){g[K]=P;++K}function f(P){g[K]=P>>8&255;g[K+1]=P&255;
K+=2}function y(P){g[K]=P>>16&255;g[K+1]=P>>8&255;g[K+2]=P&255;K+=3}function Z(P){g[K]=P>>24&255;g[K+1]=P>>16&255;
g[K+2]=P>>8&255;g[K+3]=P&255;K+=4}function v(P){k.push(K);K+=4;G(P)}function G(P){for(var F=0;F<P.length;
++F){g[K]=P.charCodeAt(F);++K}}function q(P){g.set(new Uint8Array(P),K);K+=P.byteLength}function h(){var P=K;
K=k.pop();Z(P-K);K=P}function r(){k=[];var P=[],O={},p=9e4,C=c.length,W=$.length,J=-1;for(var F=0;F<c.length;
++F){b+=c[F].duration/1e3;e+=c[F].byteLength;if(c[F].duration!=J){if(F!=0){P.push(O)}J=c[F].duration;
O={duration:9e4*c[F].duration/1e6,sampleCount:1}}else{O.sampleCount=O.sampleCount+1}}e+=8;P.push(O);
var t=P.length,Y=579+z.byteLength+4*C+4*C+4*W+8*t;g=new Uint8Array(Y);K=0;v("moov");v("mvhd");Z(0);Z(0);
Z(0);Z(1e3);Z(b);Z(65536);f(256);f(0);Z(0);Z(0);Z(65536);Z(0);Z(0);Z(0);Z(65536);Z(0);Z(0);Z(0);Z(1073741824);
Z(0);Z(0);Z(0);Z(0);Z(0);Z(0);Z(2);h();v("trak");v("tkhd");Z(7);Z(0);Z(0);Z(1);Z(0);Z(b);Z(0);Z(0);f(0);
f(0);f(256);f(0);Z(65536);Z(0);Z(0);Z(0);Z(65536);Z(0);Z(0);Z(0);Z(1073741824);Z(x*65536);Z(Q*65536);
h();v("mdia");v("mdhd");Z(0);Z(0);Z(0);Z(p);Z(b/1e3*p);I(85);I(196);f(0);h();v("hdlr");Z(0);Z(0);G("vide");
Z(0);Z(0);Z(0);G("VideoHandler");I(0);h();v("minf");v("vmhd");Z(1);f(0);f(0);f(0);f(0);h();v("dinf");
v("dref");Z(0);Z(1);v("url ");Z(1);h();h();h();v("stbl");v("stsd");Z(0);Z(1);v("avc1");f(0);f(0);f(0);
f(1);f(0);f(0);Z(0);Z(0);Z(0);f(x);f(Q);Z(4718592);Z(4718592);Z(0);f(1);for(var F=0;F<8;++F){Z(0)}f(24);
f(-1);v("avcC");q(z);h();h();h();v("stts");Z(0);Z(t);for(var F=0;F<t;++F){Z(P[F].sampleCount);Z(P[F].duration)}h();
v("stsc");Z(0);Z(1);Z(1);Z(1);Z(1);h();v("stsz");Z(0);Z(0);Z(C);for(var F=0;F<C;++F){Z(c[F].byteLength)}h();
v("stco");Z(0);Z(C);var l=i;for(var F=0;F<C;++F){Z(l);l+=c[F].byteLength}h();v("stss");Z(0);Z(W);for(var F=0;
F<W;++F){Z($[F])}h();h();h();h();h();h();return}function H(P,O,p){var C=new Uint8Array(x*Q*4),W=new Uint8Array(P),J=O?x-1:x,t=p?Q-1:Q;
if(O){for(var F=0;F<t;++F){C.set(W.slice(4*F*J,4*F*J+4*J),4*F*x);C[4*(F+1)*x-4]=W[4*(F+1)*J-4];C[4*(F+1)*x-3]=W[4*(F+1)*J-3];
C[4*(F+1)*x-2]=W[4*(F+1)*J-2];C[4*(F+1)*x-1]=W[4*(F+1)*J-1]}if(p){C.set(C.slice(4*x*t-4*x,4*x*t),4*x*t)}}else if(p){C.set(W);
C.set(W.slice(4*J*t-4*J),4*J*t)}return C.buffer}async function o(P,O,p,C){var W=Date.now(),J=!1,t=!1,M=0;
if(O%2!=0){J=!0;x=O+1}else{x=O}if(p%2!=0){t=!0;Q=p+1}else{Q=p}z=null;$=[];c=[];b=0;e=0;j=new Uint8Array;
D(new Uint8Array(U));D(_(0).buffer);D(a("mdat"));var Y=new VideoEncoder({output:(chunk,opts)=>T(chunk,opts),error:dQ=>{console.log(dQ)}}),l=.02*(1+Math.pow(3.2*C[0]/100,2.3)),m=l*x*Q,B=m*P.length,L=Math.round(m*24),A={width:x,height:Q,codec:"avc1.420034",bitrate:L},S=await VideoEncoder.isConfigSupported(A);
console.log(S);if(S.supported==!1){console.log("Encoding not supported. Config: ",S.config);return new Uint8Array(0).buffer}Y.configure(A);
for(var F=0;F<P.length;++F){var N=P[F][1]*1e3,s=P[F][0];if(t||J){s=H(P[F][0],J,t)}var V=new VideoFrame(s,{timestamp:M,duration:N,format:"RGBA",codedWidth:x,codedHeight:Q});
Y.encode(V);V.close();M+=N}await Y.flush();r();R=new Uint8Array(j.byteLength+g.byteLength);R.set(new Uint8Array(j),0);
R.set(_(e),i-8);R.set(g,j.byteLength);var g8=Date.now();console.log(g8-W);return R.buffer}return o}();
ar.fA={};ar.fA.fk=function(x){var Q=new Uint8Array(x),c=0,$=112,z=42,j=w.K3,k;c+=8;var U=Q[c];c++;if(U!=z)throw"e";
var i=j(Q,c);c+=4;var b=w.Ot(Q,c,i);c+=i*2;var e=[];while(c<Q.length){k=j(Q,c);c+=4;if(k!=$)throw k;
c+=4;k=Q[c];c++;if(k!=z)throw k;var K=j(Q,c);c+=4;var g=Q[c];c++;if(g!=z){c-=5;K=j(Q,c);c+=8;k=Q[c];
c++;if(k!=z)throw k}var R=j(Q,c)*2;c+=4;if(K>0)e.push(c+R);c+=R+K}var T=new DOMParser,D=T.parseFromString(b,"image/svg+xml").firstChild.firstChild,a=[];
ar.fA.X1(D,Q,e,a);return a};ar.fA.X1=function(x,Q,c,$){var z=x.firstChild.firstChild;if(z.tagName=="Image"){var j=z.getElementsByTagName("ImageDescription")[0],U=j.children[0].children,i=j.children[1].children,b=c.shift(),e=[];
for(var F=0;F<i.length;F++)e.push(parseInt(i[F].getAttribute("NumberOfElements")));while(e.length>3)e[2]*=e.pop();
var k=U.length,K=e[0],g=e[1],R=e[2],T=parseInt(i[0].getAttribute("BytesInc"));for(var D=0;D<R;D++){var a=d.R(K*g*4);
d.h4(a,4278190080);for(var _=0;_<k;_++){var I=d.R(K*g);if(T==1)for(var f=0;f<I.length;f++)I[f]=Q[b+f];
else if(T==2)for(var f=0;f<I.length;f++)I[f]=Math.min(255,(Q[b+f*2+1]<<8|Q[b+f*2])>>>2);else throw T;
if(_!=3)d.Dm(I,a,_);if(k==1){d.Dm(I,a,1);d.Dm(I,a,2)}b+=K*g*T}$.push({K$:new gh(0,0,K,g),data:a.buffer})}}else{var y=x.children,Z=0;
while(Z<y.length&&y[Z].tagName!="Children")Z++;if(Z==y.length)throw"e";y=y[Z].children;for(var v=0;v<y.length;
v++)ar.fA.X1(y[v],Q,c,$)}};ar.a5s=function(){function x(U,i,b,e,k){var K=new Int8Array(U.buffer),g=new Int8Array(e.buffer),R=i+b;
while(i<R){var jF=K[i];i++;if(jF>=0&&jF<128)for(var F=0;F<jF+1;F++){g[k]=K[i];k++;i++}if(jF>=-127&&jF<0){for(var F=0;
F<-jF+1;F++){g[k]=K[i];k++}i++}}return k}function Q(U,i,b,e,k,K){var g=i*b*e>>>3,R=d.R(g*k),T=$(U,0,0,0)[0];
for(var D=0;D<k;D++){var a=T[D+1];if(K){var _=ar.pz("jpg").fk(a.buffer),I=d.R(g);d._8(new Uint8Array(_[0].data),I);
R.set(I,g*D)}else if(a[0]==255&&a[1]==216&&a[2]==255){var f=UTIF.LosslessJpegDecode(a);R.set(new Uint8Array(f.buffer),g*D)}else x(a,64,a.length,R,g*D)}return R}function c(U){var i=new Uint8Array(U),b=0,e=w.mt(i,0,128);
b+=128;var k=w.mt(i,b,4);b+=4;var K=z(i,b,0)[0],g=K.g28;if(g==null){alert("No image.");return[]}var R=g.cols,T=g.rows,D=R*T,a=g.photoInterpret,_=g.bitsAlloc,I=g.bitsStored,f=g.lossyCompr;
if(f==null)f=K.g8.lossyCompr;var y=K.g7fe0.pixelData,Z=g.numOfFrames;Z=Z?parseInt(Z):1;var v=new Uint8Array(y.buffer),G=D*_>>>3;
if(v.length!=G*Z){y=Q(y,R,T,_,Z,f)}else{}if(_==16)y=new Uint16Array(y.buffer);console.log(g);console.log(K);
var q=[];for(var h=0;h<Z;h++){var r=h*G,U=d.R(R*T*4);U.fill(255);if(a=="MONOCHROME2"){var H=0,o=255,P=g.largestValue,O=g.smallestValue;
if(P!=null){o=P;H=O}else if(I!=8){o=0;H=1e9;for(var F=0;F<D;F++){var p=y[r+F];if(p>1<<I-8){if(p>o)o=p;
if(p<H)H=p}}}var C=255/(o-H);for(var F=0;F<D;F++){var p=Math.max(0,Math.min(255,(y[r+F]-H)*C)),W=F*4;
U[W]=U[W+1]=U[W+2]=p}}else if(a=="PALETTE COLOR"){var J=g.pltRed,t=g.pltGreen,Y=g.pltBlue;for(var F=0;
F<D;F++){var l=y[r+F],W=F*4;U[W]=J[l]>>>8;U[W+1]=t[l]>>>8;U[W+2]=Y[l]>>>8}}else throw a;q.push({K$:new gh(0,0,R,T),data:U.buffer})}return q}function $(U,i,b,e){if(b==0)b=U.length;
var k=w.uv,K=w.ls,g=w.K3,R=[],T=i;while(i<b){var D=k(U,i);i+=2;var a=k(U,i);i+=2;var _=g(U,i);i+=4;if(D==65534&&a==57344){if(_==4294967295){var I=z(U,i,e+1);
R.push(I[0]);i=I[1]}else{R.push(U.slice(i,i+_));i+=_}}else if(D==65534&&a==57357){}else if(D==65534&&a==57565)break;
else throw"e"}return[R,i]}function z(U,i,b){var e=w.uv,k=w.ls,K=w.K3,g={},R="\t".repeat(b);while(i<U.length){var T=e(U,i),I="",f=0,Z=null;
i+=2;var D=e(U,i);i+=2;var a=T.toString(16),_=D.toString(16);if(T==65532)break;if(T==65534&&D==57357){i-=4;
break}if(T==65534&&D==57565)throw"e";if(D==0){i+=8;continue}if(65<=U[i+1]){I=w.mt(U,i,2);i+=2;if(I=="OB"||I=="SQ"||I=="OW"){f=K(U,i+2);
i+=6}else{f=e(U,i);i+=2}}else{I=j[a][_].split(",")[1];f=K(U,i);i+=4}console.log(a,_,I,f);var y=j[a][_];
if(y)y=y.split(",")[0];if(y==null){y="t"+_}if(I=="SQ"){var v=$(U,i,i+f,b);Z=v[0];i=v[1];f=0}else if(I=="US")Z=e(U,i);
else if(I=="SS")Z=k(U,i);else if(I=="UL")Z=K(U,i);else if(I=="FL")Z=w.Q0(U,i);else if(I=="AT")Z=[e(U,i),e(U,i+2)];
else if(I=="OB")Z=U.slice(i,i+f);else if(I=="OW")Z=new Uint16Array(U.slice(i,i+f).buffer);else if("UI CS DA TM DT SH LO ST LT PN AE AS DS IS".split(" ").indexOf(I)!=-1){var G=i+f;
while(U[G-1]==0)G--;Z=w.mt(U,i,G-i).trim()}else{console.log(R,JSON.stringify(w.mt(U,i,Math.min(f,32))));
throw I}if(g["g"+a]==null)g["g"+a]={};g["g"+a][y]=Z;i+=f}return[g,i]}var j={"2":{"1":"fmiVersion","2":"classUID","3":"instanceUID","10":"syntaxUID","12":"icUID","13":"implVerName","16":"appTitle"},"4":{"1130":"fileSetID"},"8":{"5":"charSet","8":"imageType,CS","16":"classUID,UI","18":"instanceUID,UI","20":"studyDate","21":"seriesDate","22":"acqDate","23":"contentDate","2a":"acqDateTime","30":"studyTime","32":"acqTime","33":"contentTime","50":"accNumber","60":"modality,CS","64":"convType,CS","70":"manufacturer","80":"institutionName","81":"institutionAddress","90":"rpName","1010":"stationName","1030":"studyDescription","103e":"seriesDesc","1050":"ppName","1090":"modelName","1150":"rclassUID","1155":"rinstanceUID","2110":"lossyCompr","2112":"imageSequence"},"9":{},"10":{"10":"patientName,PN","20":"patientID,LO","30":"patientBirthDate","40":"patientSex","1010":"patientAge"},"18":{"60":"KVP","1020":"swVersion","1063":"frameTime","1150":"expTime","1151":"xrayTubeCurrent","1152":"exposure","1155":"radiation","1500":"posMotion","1510":"posAngle0","1511":"posAngle1"},"19":{},"20":{d:"studyUID,UI",e:"seriesUID,UI","10":"studyID","11":"seriesNumber","12":"acqNumber,IS","13":"instanceNumber,IS","20":"patientOrientation"},"21":{},"28":{"2":"spp,US","4":"photoInterpret,CS","8":"numOfFrames","9":"frameIncPointer","10":"rows,US","11":"cols,US","30":"pixelSpacing","100":"bitsAlloc,US","101":"bitsStored,US","102":"highBit,US","103":"pixRepresentation,US","106":"smallestValue","107":"largestValue","120":"pixPaddingValue","1040":"pixIntensityRelation","1050":"windCenter","1051":"windWidth","1090":"viewMode","1101":"pdRed","1102":"pdGreen","1103":"pdBlue","1199":"paletteUID","1201":"pltRed","1202":"pltGreen","1203":"pltBlue","2110":"lossyCompr","6010":"repFrameNum","6020":"foi","6022":"foiDescription","6040":"rWavePointer","6100":"maskSubtraction","6101":"maskOp","6110":"maskFrameNum"},"29":{},"37":{},"40":{},"50":{"4":"calibImage"},"5000":{"5":"curveDim","10":"numOfPoints","20":"typeOfData","30":"axisUnits","103":"dataValRepr","104":"minCrdValue","105":"maxCrdValue","106":"curveRange","110":"curveDataDesc","112":"crdStartValue","114":"crdStepValue","3000":"curveData"},"7fe0":{"10":"pixelData,OB"}};
return{fk:c}}();ar.SL={};ar.SL.fk=function(x){var Q=new Uint8Array(x),c=0,$={},k=1e9;for(var F=0;F<306;
F++){var z=w.mt(Q,c,8).trim(),j=w.mt(Q,c+9,71).split("/")[0].trim();$[z]=j;c+=80;if(z=="END"){c=Math.ceil(c/2880)*2880;
break}}var U=parseInt($.NAXIS1),i=parseInt($.NAXIS2),b=U*i,e=parseInt($.BITPIX),K=-1e9,g=new Float32Array(b),R=new Float32Array(x,c,x.byteLength-c>>>2);
for(var F=0;F<b;F++){var T=F<<2,D=F<<1;if(e==-32){var a=Q[c+T+0];Q[c+T+0]=Q[c+T+3];Q[c+T+3]=a;var a=Q[c+T+1];
Q[c+T+1]=Q[c+T+2];Q[c+T+2]=a;g[F]=R[F]}else if(e==16){g[F]=w.uv(Q,c+D)}else throw e;var _=g[F];if(_<k)k=_;
if(_>K)K=_}var I=d.R(b*4),f=1/K;for(var y=0;y<i;y++)for(var Z=0;Z<U;Z++){var F=y*U+Z,v=(i-y-1)*U+Z,T=v<<2,_=g[F]*f;
I[T]=I[T+1]=I[T+2]=255*_;I[T+3]=255}return[{K$:new gh(0,0,U,i),data:I,rF:$.OBJECT}]};ar.eb={};ar.eb.fk=function(x){var Q=new Uint8Array(x),c=16,$=w.mt(Q,c,4),j=32,_=0,I=0,f=!1,J;
c+=4;var z=w.mt(Q,c,8);c+=8;while(Q[c+j-1]==0)j--;var U=w.mt(Q,c,j);c+=32;var i=w.mt(Q,c,4);c+=4;c+=20;
var b=w.q(Q,c);c+=4;var e=w.q(Q,c);c+=4;var k=w.q(Q,c);c+=4;var K=w.q(Q,c);c+=4;var g=w.q(Q,c);c+=4;
var R=w.q(Q,c);c+=4;var T="FujiFilm "+U,D=[0,1,1,2];if(T=="FujiFilm X10"){T="FujiFilm FinePix X10";D=[2,1,1,0]}var a={t271:["FujiFilm"],t272:[T],t277:[1],t33421:[2,2],t33422:D,Lj:1};
c=k;var y=[],Z=w._C,v=w.q(Q,c);c+=4;for(var F=0;F<v;F++){var G=Z(Q,c);c+=2;var q=Z(Q,c);c+=2;if(G==256){I=Z(Q,c);
_=Z(Q,c+2)}else if(G==272){y=[Z(Q,c),Z(Q,c+2)]}else if(G==273){y.push(Z(Q,c),Z(Q,c+2))}else if(G==304){f=!(Q[c]>>>7)}else if(G==305){var h=Math.round(Math.sqrt(q)),r=[];
for(var H=0;H<q;H++)r.push(Q[c+H]);r.reverse();a.t33421=[h,h];a.t33422=r}else if(G==12272){var o=Z(Q,c),P=Z(Q,c+2),O=Z(Q,c+6);
a.t50728=[o/P,1,o/O]}c+=q}var p=_<I,C=Q.slice(g,g+R),W=Math.round(R*8/(_*I));if(C[0]==73&&C[1]==73&&C[2]==42){J=UTIF.decode(C.buffer)[0].fujiIFD;
W=J.t61443[0];var t=J.t61454,Y=J.t61450;if(Y)a.t50714=Y;if(t)a.t50728=[t[0]/t[1],1,t[0]/t[2]];var l=J.t61447[0];
C=C.slice(l,l+J.t61448[0])}var R=C.length,m=R*8<_*I*W;if(m){console.log("compressed");var B=a.t33422,L=~~Math.sqrt(B.length),A=[];
for(var F=0;F<L;F++)A[F]=B.slice(F*L,F*L+L);C=new Uint8Array(UTIF._decompressRAF(C,A).buffer);R=C.length}function S(g8,n,cQ){cQ=cQ<<8-(n&7);
var hk=n>>>3;g8[hk]|=cQ>>>16;g8[hk+1]|=cQ>>>8;g8[hk+2]|=cQ}var M=R*8/(_*I);if(M==16)for(var F=0;F<R;
F+=2){var N=C[F];C[F]=C[F+1];C[F+1]=N}else if(M==14){for(var F=0;F<R;F+=4){var N=C[F];C[F]=C[F+3];C[F+3]=N;
N=C[F+1];C[F+1]=C[F+2];C[F+2]=N}}else if(M==12)for(var F=0;F<R;F+=3){var s=C[F+2]<<16|C[F+1]<<8|C[F+0];
s=s>>>12|(s&4095)<<12;C[F]=s>>>16&255;C[F+1]=s>>>8&255;C[F+2]=s&255}if(p)C=ar.eb.a6e(C,_,I);var V=p?2:1;
_*=V;a.t256=[_];a.t257=[I];a.t258=[W];a.t50719=[y[1],y[0]*V];a.t50720=[y[3],y[2]*V];a.width=_;a.height=I;
a.data=new Uint8Array(C.buffer);return[a]};ar.eb.a6e=function(x,Q,c){x=new Uint16Array(x.buffer);var $=new Uint16Array(Q*c*2);
for(var z=0;z<c;z+=2)for(var j=0;j<Q;j++){var U=z*Q+j,i=U*2,b=x[U],e=x[U+Q];$[i+1]=$[i+2*Q]=e;if(((z>>>1)+j&1)==0){$[i]=b;
$[i+2*Q+1]=x[U+1]}else{$[i]=x[U-1];$[i+2*Q+1]=b}}return $};ar.I4={};ar.I4.a5P=function(x,Q,c){c=c<<8-(Q&7);
var $=Q>>>3;x[$]|=c>>>16;x[$+1]|=c>>>8;x[$+2]|=c};ar.I4.fk=function(x){var Q=new Uint8Array(x),c=0,$=Date.now(),z=cF.s5(x),j=z.moov.uuid[0],U=new CR3Parser(x),i=U.getTrack().meta,b=j.CMT1[0],e=b.t256[0]=i.width,k=b.t257[0]=i.height,K=e*k,g=b.exifIFD=j.CMT2[0],R=g.makerNote=j.CMT3[0],T=z.moov.trak[3].mdia.minf.stbl,D=T.co64[0],a=Q.slice(D,D+T.stsz[0]),_=0;
while(_<a.length){var I=w.K3(a,_);_+=4;var f=w.uv(a,_);_+=2;var y=a[_]==1;_+=2;_+=4;if(f==8||f==9){var Z=UTIF.decode(a.slice(_+8,_+I-12).buffer)[0];
for(var v in Z)R[v]=Z[v]}_+=I-12}b.t277=[1];b.t33421=[2,2];b.t33422=[0,1,1,2];b.Lj=1;if(b.t274)b.Lj=b.t274[0];
var G=U.extractCFA(),q=i.bitDepth;if(q!=14)throw"e";b.t258=[q];var h=new Uint8Array(Math.ceil(K*q/8)),r=16-q;
for(var F=0;F<K;F++)ar.I4.a5P(h,F*14,G[F]<<r);b.width=e;b.height=k;b.data=h;return[b]};ar.qi={};ar.qi.NQ=!0;
ar.qi.YU=function(x,Q,c,$){var z=new Uint8Array(x[0][0]),j=Q*c,U=[1,3,4][$[0]],i=8+8*$[1],b=$[2];if(U==1){var e=new Uint8Array(Q*c);
d.GS(z,e,0);z=e}if(U==3){var e=new Uint8Array(Q*c*3);for(var F=0;F<j;F++){var k=F*4,K=F*3;e[K]=z[k];
e[K+1]=z[k+1];e[K+2]=z[k+2]}z=e}if(i==16){var g=z.length,e=new Uint8Array(g*2);for(var F=0;F<g;F++){var R=Math.round(z[F]*(65535/255));
e[F*2+b]=R>>>8;e[F*2+1-b]=R&255}z=e}return z.buffer};ar.Vx={};ar.Vx.fk=function(x,Q){function c(b){return~~(.5+d.Yw(Math.max(0,Math.min(1,b)))*255)}var $=EXRLoader.parse(x),z=$.width,j=$.height,U=d.R(z*j*4);
for(var i=0;i<j;i++)for(var b=0;b<z;b++){var F=(i*z+b)*4,e=((j-i-1)*z+b)*4;U[F]=c($.data[e+0]);U[F+1]=c($.data[e+1]);
U[F+2]=c($.data[e+2]);U[F+3]=c($.data[e+3])}return[{K$:new gh(0,0,z,j),data:U.buffer}]};ar.xp={};ar.xp.NQ=!0;
ar.xp.f6=!0;ar.xp.YU=function(x,Q,c,$,z){$=["",100,!1,!1,!1,0,!1];$[7]=["jpg"];var j=new ToDXF;cd.gS(x,$,j,z.Dn);
return j.buffer};ar.xp.fk=function(x,Q){var c=72,$=new bI(1,0,0,1,0,0);$.scale(c/72,c/72);Q.cQ=c;var z=new gP(Q,$,!1);
FromDXF.Parse(x,z)};ar.avb={};ar.avb.fk=function(){var x=w.uv,Q=w.K3,c=w.mt,$;function z(U,i,b,e,k){var K=Q(U,b),g=Q(U,b+4),R=Q(U,b+8),T=x(U,b+12),D=x(U,b+14);
b+=16;var a={};for(var F=0;F<T+D;F++){var _=Q(U,b),I=Q(U,b+4),f,y;if(_>>>31==1){_=_&16777215}if(F<T)f=w.Ot(U,i+_+2,x(U,i+_));
else f="id"+_;var Z=e.slice(0);Z.push(f);if(I>>>31==1){I=I&268435455;y=z(U,i,i+I,Z,k)}else{var v=Q(U,i+I),G=Q(U,i+I+4),q=Q(U,i+I+8),h=Q(U,i+I+12);
if(h!=0)throw"e";if(v<k[0]||v>k[0]+k[1])throw"e";var r=k[2]+v-k[0];y=U.slice(r,r+G);var H=ar.HB(y.buffer);
if(H&&["bmp","png","ico"].indexOf(H)!=-1){var o=ar.pz(H);if(!o.f6){var P=null;try{P=o.fk(y.buffer)}catch(dQ){}if(P){P[0].rF=Z[1];
$.push(P[0])}}}else if(H)console.log(H)}a[f]=y;b+=8}return a}function j(U){$=[];var i=new Uint8Array(U),b=0,e=x(i,b);
b+=2;b+=58;var k=Q(i,b);b+=4;b=k;var K=c(i,b,4);b+=4;var g=x(i,b);b+=2;var R=x(i,b);b+=2;var T=Q(i,b);
b+=4;var D=Q(i,b);b+=4;var a=Q(i,b);b+=4;var _=x(i,b);b+=2;var I=x(i,b);b+=2;b+=_;var f={};for(var F=0;
F<R;F++){var y=b;while(i[y]!=0)y++;var Z=c(i,b,y-b),v=Q(i,b+8),G=Q(i,b+12),q=Q(i,b+16),h=Q(i,b+20),r=Q(i,b+24),H=Q(i,b+28),o=x(i,b+32),P=x(i,b+34),I=Q(i,b+36);
f[Z]=[G,v,h,q,I];if(r+H!=0)throw"e";b+=40}for(var O in f){var p=f[O];b=p[2];if(O==".rsrc"){var C=z(i,b,b,[],p),W="id134"}}return $}return j}();
ar.MJ={};ar.MJ.f6=!0;ar.MJ.fk=function(x,Q,c){ad.s5(x,Q,c)};ar.MJ.YU=function(x,Q,c){return ad.gS(x)};
(function(){var x=ar.dy.get("wasm/zstd").buffer;WebAssembly.instantiate(x).then(function(Q){var c=Q.instance.exports;
ar.MJ.atY=c})}());ar.MJ.ID=function(x,Q){var c=ar.MJ.atY,$=x.length,z=c.memory,j=2*$+1e6,b=8;ar.IZ(c,j);
var U=new Uint8Array(z.buffer),i=c.malloc($);U.set(x,i);while(!0){var e=Q==null?$*b:Q;ar.IZ(c,j+e);var k=c.malloc(e),K=c.ZSTD_decompress(k,e,i,$);
if(K==-70){c.free(k);b+=b>>>1;if(Q!=null)throw"error"}else{U=new Uint8Array(z.buffer);x=U.slice(k,k+K);
c.free(k);break}}c.free(i);return x};ar.Vg={};ar.Vg.f6=!0;ar.Vg.fk=function(){var x=0,Q=1,c=2,$=3,z=4,j=5,U=6,i=7,b=1,e=2,k=7,K=8,g=9,R,T,D,a,_;
function I(){var jF=w.fu(R,T);T+=4;return jF}function f(){var J=0,t=0;for(var F=0;F<5;F++){var Y=R[T++];
J+=(Y&127)<<t;t+=7;if((Y&128)==0)break}return J}function y(){var J=f(),t=w.IV(R,T,J);T+=J;return t}function Z(){return{typeName:y(),air:I()}}function v(){var J=I(),t=y(),Y=[],l=I();
for(var F=0;F<l;F++)Y.push([y()]);return{id:J,if:t,alg:Y}}function G(J){var t=J.alg,Y=[];for(var F=0;
F<t.length;F++)t[F].push(R[T++]);for(var F=0;F<t.length;F++){var l=t[F][1],m;t[F].push(q(l))}}function q(J){var t;
if(J==x)t=R[T++];else if(J==$)t=y();else if(J==z)t=Z();else if(J==Q||J==c||J==U||J==j){}else throw J;
return t}function h(J,t,Y){var l;if(J==x){if(t==b)l=R[T++]==1;else if(t==e){l=R[T++]}else if(t==K)l=I();
else if(t==g){l=I();I()}else throw t}else if(J==$){l=P(Y+1)}else if(J==z){l=P(Y+1)}else if(J==j){l=P(Y+1)}else if(J==Q){l=P(Y+1)}else if(J==U){l=P(Y+1)}else if(J==c){l=P(Y+1)}else throw J;
return l}function r(J,t){var Y=D["c"+J],l=Y.alg,m={_class:Y.if};for(var F=0;F<l.length;F++){var B=l[F],L=B[1],A=B[2],S=h(L,A,t),M=B[0];
m[M]=S}return m}function H(J,t,Y,l){var m=[];for(var F=0;F<J;F++){var B=h(t,Y,l);if(B.z_&&B.z_=="null_count"){var L=B._B;
for(var A=0;A<L;A++)m.push(null);F+=L-1}else m.push(B)}return m}function o(){return[I(),I()]}function P(J){if(J==null)throw"e";
var t=null,Y=R[T],l=null;T++;if(Y==0){var m=I(),B=I(),L=I(),A=I();t=[m,B,L,A]}else if(Y==1){l=I();var S=I();
t=r(S,J)}else if(Y==4){var M=v();l=M.id;G(M);D["c"+M.id]=M;t=r(M.id,J)}else if(Y==5){var M=v();l=M.id;
G(M);var N=I();D["c"+M.id]=M;t=r(M.id,J)}else if(Y==6){l=I();var s=y();t=s}else if(Y==7){l=I();var V=R[T++];
if(V!=0)throw V;var g8=I();if(g8!=1)throw g8;var n=I(),cQ=R[T++],hk=q(cQ);t=H(n,cQ,hk,J)}else if(Y==9){var eG=I();
t={z_:"ref",_B:eG};_["o"+eG]=!0}else if(Y==10){t={z_:"null_count",_B:1}}else if(Y==11){t={z_:"end"}}else if(Y==12){var N=I(),ie=y()}else if(Y==13){var eN=R[T++];
t={z_:"null_count",_B:eN}}else if(Y==16){var gr=o();l=gr[0];t=H(gr[1],z,null,J)}else if(Y==17){var gr=o();
l=gr[0];t=H(gr[1],Q,null,J)}else throw"e";if(l!=null&&l>0){if(a["o"+l]!=null)throw"e";a["o"+l]=t}return t}function O(J,a){if(J instanceof Array){for(var F=0;
F<J.length;F++)J[F]=p(J[F],a)}else if(J instanceof Object){for(var t in J)J[t]=p(J[t],a)}}function p(J,a){if(J&&J.z_&&J.z_=="ref")return a["o"+J._B];
else return J}function C(J,t,Y){var l=Date.now();R=new Uint8Array(J);T=0;D={};a={};_={};var m=w.mt(R,0,4);
if(m!="PDN3")throw m;T+=4;var B=w.uv(R,T)+R[T+2]*256*256;T+=3;var L=w.mt(R,T,B);T+=B;T+=2;while(!0){var A=P(0);
if(A&&A.z_&&A.z_=="end")break}for(var S in _)if(a[S]==null)throw S;for(var S in a)O(a[S],a);var M=a.o1;
console.log(M);t.m=M.width;t.e=M.height;t.buffer=d.R(t.m*t.e*4);var N=M.layers["ArrayList+_items"];for(var F=0;
F<N.length;F++){var s=N[F];if(s==null)continue;var V=s["Layer+width"],g8=s["Layer+height"],n=s["Layer+properties"],cQ=s.properties,hk=cQ.blendOp._class.split("+").pop();
hk=hk.slice(0,hk.length-7);var eG={Normal:"norm",Multiply:"mul ",Additive:"lddg",ColorBurn:"idiv",ColorDodge:"div ",Reflect:"lddg",Glow:"hMix",Overlay:"over",Difference:"diff",Negation:"smud",Lighten:"lite",Darken:"dark",Screen:"scrn",Xor:"smud"}[hk],ie=t.Xh();
ie.gF(n.name);ie.opacity=n.opacity;ie.KW(n.visible);ie.s3=eG;if(R[T]!=0)throw"e";T++;var eN=w.q(R,T);
T+=4;var gr=Math.ceil(V*g8*4/eN);ie.rect=new gh(0,0,V,g8);var ek=ie.buffer=d.R(V*g8*4);for(var jK=0;
jK<gr&&T<R.length;jK++){var iE=W();ek.set(iE[1],iE[0]*eN)}for(var e9=0;e9<ek.length;e9+=4){var dm=ek[e9+0];
ek[e9+0]=ek[e9+2];ek[e9+2]=dm}t.B.push(ie)}}function W(){var J=w.q(R,T);T+=4;var t=w.q(R,T);T+=4;T+=10;
t-=10;var Y=pako.inflateRaw(R.slice(T,T+t));T+=t;return[J,Y]}return C}();ar.lB={};ar.lB.f6=!0;ar.lB.fk=function(x,Q){dK.s5(x,Q)};
ar.wz={};ar.wz.f6=!0;ar.wz.fk=function(){var x,Q,a=null,q,h;function c(){var W=x[Q];Q+=1;return W}function $(){var W=w._C(x,Q);
Q+=2;return W}function z(){var W=w.q(x,Q);Q+=4;return W}function j(){var W=w.c4(x,Q);Q+=4;return W}function U(){var W=w.ee(x,Q);
Q+=8;return W}function i(){var W=z();if(W>200)throw W;var J=w.fy(x,Q,W);Q+=W*2;return J}function b(){var W=w.rY(x,Q);
Q+=8;return W}function e(){var W=w.lw(x,Q);Q+=4;return W}function k(){var W=z();if(z()!=4)throw"e";var J=[];
for(var F=0;F<W;F++)J.push(z());return J}function K(W,J,t){for(var F=0;F<W.length;F++)if(W[F][J]==t)return W[F]}function g(W,J){var t=Date.now();
x=new Uint8Array(W);Q=w.iK(x,"CH"+"NK"+"SQ"+"Li")+8;var Y=U(),l=jX.parse(x.buffer.slice(Q,Q+Y)),m=jX.auv(l,!0);
console.log(m);var B=m.Canvas[0],L=B.Width,A=B.Height,S=B.Unit,M=J.cQ=B.Resolution;if(S==0){}else if(S==1){L=Math.round(L*M/2.54);
A=Math.round(A*M/2.54)}else if(S==2){L=Math.round(L*M/25.4);A=Math.round(A*M/25.4)}else if(S==3){L=Math.round(L*M);
A=Math.round(A*M)}else if(S==5){L=Math.round(L*M/72);A=Math.round(A*M/72)}else{console.log(B);throw S}J.m=L;
J.e=A;J.buffer=d.R(L*A*4);console.log(Date.now()-t);var N=K(m.Layer,"MainId",B.RootFolder);P(m,x,J,N.FirstChildIndex,0);
console.log(Date.now()-t)}function R(){var W=w.uv(x,Q);Q+=2;return W}function T(){var W=w.K3(x,Q);Q+=4;
return W}function D(){var W=w.fu(x,Q);Q+=4;return W}function _(W){var J={11:"runs",31:"font",32:"size",33:"unit",34:"colr",42:"bbox",57:"fnts",63:"bdim",64:"bplg"},Y=0;
x=W;Q=0;var t={};while(Q<x.length){var l=T(),m=T(),B=Q+m;if(m==0)continue;var L=[];if(l==11){var A=T();
for(var S=0;S<A;S++){var M=[T(),T()];L.push(M);Y+=M[1];var N=Q+T()-4;M.push(R(),R(),R(),R());M.push(w.FL(x,Q));
Q+=8;var s=R();M.push(w.Ot(x,Q,s));Q+=s*2;if(Q!=N)throw"e"}}else if(l==31){L=w.IV(x,Q,m);Q+=m}else if(l==34)for(var F=0;
F<3;F++)L.push(T()>>>16);else if(l==42)for(var F=0;F<4;F++)L.push(D());else if([32,33,35,37,38,43,44,45,46,48,49,50,51,52,53,55,58,59,60,61,62].indexOf(l)!=-1){if(m!=4)throw"e";
L=T();if([37,45,46,51,53,55,61,62].indexOf(l)!=-1){if(L!=0&&L!=1)throw l+":"+L;Q=B;continue}}else if(l==47){var V=R();
if(T()!=50)throw"e";if(T()!=0)throw"e";var g8=R();L=w.mt(x,Q,g8);Q+=g8}else if(l==57){var A=R();for(var F=0;
F<A;F++){var n=R(),cQ=w.mt(x,Q,n);Q+=n;var hk=R(),eG=w.mt(x,Q,hk);Q+=hk;L.push([cQ,eG])}var ie=T();for(var F=0;
F<A;F++)L[F].push(ie)}else if(l==39||l==63)L.push(T(),T());else if(l==64){for(var F=0;F<8;F++)L.push(w.fu(x,Q+F*4)/100);
Q+=32}else{L=x.slice(Q,B);Q+=m}var eN=J[l];if(eN==null)eN="t"+l;if(t[eN])throw"e";t[eN]=L;if(Q!=B)throw l}if(a){}a=t;
return t}function I(W){x=W;Q=0;var J=z();if(J!=W.length)throw"e";var t=z(),Y=i(),l=z(),m=b(),B=[z()/4294967295,z()/4294967295,z()/4294967295];
return[l,m,B]}function f(W,J){function t(){var hl=[];for(var F=0;F<4;F++)hl.push(w.c4(x,Q+F*4));Q+=16;
return hl}function Y(jF){var hl=[];for(var F=0;F<jF;F++)hl.push(e());return hl}function l(hl){var f4="";
for(var F=Q;F<hl;F+=4)f4+=x.slice(F,F+4).join(", ")+"\n";return f4}x=W;Q=J+8;var m=U(),B=Q+m;Q+=56;if(Q==B)return;
var L=[],A=[],S=[],M=[],N=[];while(Q<B){var s=z(),gr=1;if(s!=88&&s!=96)throw s;var s=z();if(s!=72)throw"e";
var V=z();if(V!=88&&V!=104&&V!=120)throw V;var s=z();if(s!=88)throw"e";var g8=z(),n=z(),cQ=t(),hk=[];
S.push(hk);for(var F=0;F<6;F++){hk.push(Z(z()))}var eG=b(),ie=z();if(ie==16||ie==1040||ie==304){z();
ie=z()}var eN=b();M.push(eN);var ek=z(),jK=(n&256)!=0,iE=[],e9=[],dm={88:1,104:2,120:3}[V];for(var F=0;
F<g8;F++){var kD=F==0?1:dm;for(var gJ=0;gJ<kD;gJ++)iE.push(b(),b());e9.push(kD==1?F==0?"M":"L":kD==2?"Q":"C");
var dR=t(),fO=z();gr=e();var ko=Y(10),d8=z(),fj=z()}N.push(gr);if(V==104){var ja=b(),eD=b();if(jK){e9.push("Q");
iE.push(ja,eD,iE[0],iE[1])}}if(V==120){var ja=b(),eD=b(),d3=b(),fP=b();if(jK){e9.push("C");iE.push(ja,eD,d3,fP,iE[0],iE[1])}}if(n&128){var jE=["M"],cR=[iE[0],iE[1]],ex=iE.length>>>1,er=d.A.ag_(iE);
for(var F=0;F<ex;F++){var cE=iE[2*F],a7=iE[2*F+1],dl=.7;for(var gJ=0;gJ<2;gJ++){er[F*4+gJ*2]=dl*er[F*4+gJ*2]+(1-dl)*cE;
er[F*4+gJ*2+1]=dl*er[F*4+gJ*2+1]+(1-dl)*a7}}for(var F=1;F<ex;F++){jE.push("C");cR.push(er[F*4-2],er[F*4-1],er[F*4],er[F*4+1],iE[F*2],iE[F*2+1])}if(jK){jE.push("C");
cR.push(er[ex*4-2],er[ex*4-1],er[0],er[1],iE[0],iE[1])}iE=cR;e9=jE}if(jK)e9.push("Z");A=A.concat(iE);
L=L.concat(e9)}if(Q!=B)throw"e";return[{j:A,G:L},S,M,N]}function y(W,J){x=W;Q=J+8;var t=U(),Y=Q+t,l=0;
Q+=56;var m=[];while(Q<Y){var B=z(),L=Q+B-4;if(L>Y)throw"e";if(B==11){Q-=4;var A=i(),S=z();if(S!=12)throw"e";
var M=k(),N=i(),S=z();if(S!=12)throw"e";var s=k();if(Q!=Y)throw"e"}else{var V=i(),g8=z();if(g8!=l)throw g8;
l++;var n=$();if(n!=0&&n!=1&&n!=2&&n!=5)throw n;var cQ=c();if(cQ!=0&&cQ!=32&&cQ!=64)throw cQ;if(z()!=1)throw"e";
if(z()!=1)throw"e";if(c()!=0)throw"e";if(z()==1){var hk=z(),eG=w.K3(x,Q);if(hk!=eG+4)throw"e";m.push(new Uint8Array(x.buffer,Q+4,eG));
Q+=hk}else m.push(new Uint8Array(0));var ie=i();if(Q!=L)throw Q}}return m}function Z(W){return Math.min(255,Math.round(W/16777216))}function v(W){x=W;
Q=0;var J=z();if(J!=16)throw J;var t=z();if(t!=102)throw t;var Y=z();if(Y!=42&&Y!=58)throw Y;var l=z();
if(W.length-l!=118+Y)throw W.length-l;var m=i();if(m!="Parameter")throw m;var B=z(),L=z(),A=z(),S=z(),M=[];
for(var F=0;F<16;F++)M.push(z());var m=i();if(m!="InitColor")throw m;if(z()!=20)throw"e";var N=z(),s=z(),V=z();
if(z()!=4)throw"e";if(Y==58){var g8=[];M.push(g8);for(var F=0;F<4;F++)g8.push(Z(z()))}var m=i();if(m!="BlockSize")throw m;
var n=z();if(n!=12)throw n;var cQ=k();if(Q!=x.length)throw"e";return[B,L,A,S,N*255,M]}function G(W,J){var t=w.mt(J,0,40),Y=K(W["ExternalC"+"hunk"],"Exte"+"rnalID",t);
if(Y==null){console.log("chnk not found",t)}return Y?Y.Offset:-1}function r(W,J,t,Y){if(q==null){q=d.R(256*256*4);
h=d.R(256*256)}var l=W.Mipmap,m=W.MipmapInfo,B=W.Offscreen,L=K(l,"MainId",t),A=K(m,"MainId",L.BaseMipmapInfo),S=K(B,"MainId",A.Offscreen),M=G(W,S.BlockData),g=null;
if(M==-1)return null;var N=y(J,M),s=v(S.Attribute),V=s[0],g8=s[1],n=s[2],cQ=s[3],hk=s[4],eG=s[5],ie=eG[16],eN=eG[1],gr=eG[2],ek=eN+gr;
if(gr!=eG[5])throw"e";if(eN!=eG[7])throw"e";var jK=d.R(256*(eG[6]+eG[8])),iE=new gh;if(ie)iE=new gh(0,0,V,g8);
else{for(var e9=0;e9<cQ;e9++)for(var dm=0;dm<n;dm++){var kD=N[e9*n+dm];if(kD.length==0)continue;iE=iE.iO(new gh(dm<<8,e9<<8,256,256))}}var gJ=iE.y_(new gh(0,0,V,g8)),dR=d.R(gJ.P()*(ek==1?1:4));
if(ie)new Uint32Array(dR.buffer).fill(255<<24|ie[0]<<16|ie[1]<<8|ie[2]);if(ek==1)dR.fill(hk);for(var e9=0;
e9<cQ;e9++)for(var dm=0;dm<n;dm++){var kD=N[e9*n+dm];if(kD.length==0)continue;var fO=new Uint8Array(kD.buffer,kD.byteOffset+2,kD.length-6),ko=new gh(dm<<8,e9<<8,256,256);
UZIP.inflateRaw(fO,jK);if(ek==1){if(eG[8]==32){H(jK,0,h);d.L2(h,ko,dR,gJ)}else d.L2(jK,ko,dR,gJ)}else if(ek==2){if(eG[8]==32){new Uint32Array(q.buffer).fill(4278190335);
H(jK,0,h);d.Dm(h,q,3);H(jK,256*32,h);d.ZM(h,q)}else for(var F=0;F<262144;F+=4){var ie=jK[65536+(F>>>2)];
q[F]=ie;q[F+1]=ie;q[F+2]=ie;q[F+3]=jK[F>>>2]}d.WK(q,ko,dR,gJ)}else if(ek==5){for(var F=0;F<262144;F+=4){q[F]=jK[65536+F+2];
q[F+1]=jK[65536+F+1];q[F+2]=jK[65536+F+0];q[F+3]=jK[F>>>2]}d.WK(q,ko,dR,gJ)}else throw ek}if(Y&&ek==1){var d8=d.R(V*g8*4);
d.Dm(dR,d8,3);dR=d8}return[gJ,dR,hk]}function H(W,Q,J){for(var F=0;F<J.length;F++){J[F]=(W[Q+(F>>>3)]>>>7-(F&7)&1)*255}}var o=["norm","dark","mul ","idiv","lbrn",null,"dkCl","lite","scrn","div ",null,"lddg","lddg",null,"over",null,"hLit",null,null,null,null,null,"smud",null,null,null,null,null,null,null,"pass",null,null,null,null,null,"fdiv"];
function P(W,J,t,Y,l){var m=W.Layer,B=W.Canvas[0];while(Y!=0){var L=K(m,"MainId",Y),A=L.Type,n=!1;console.log(L);
var S=t.Xh();S.gF(L.Name);S.opacity=Math.min(255,L.Opacity);S.KW((L.Visibility&1)!=0);S.s3=o[L.Composite];
if(S.s3==null){alert("Unknown blend mode "+L.Composite);S.s3="norm"}S.cG=L.Clip==1;t.B.push(S);var M=L.LayerMaskMipmap;
if(M!=0){var N=r(W,J,M,!1);if(N){S.F=new eM.zM;S.F.rect=N[0];S.F.channel=N[1];S.F.color=N[2];O(S.F.rect,L,"Mask","Mask");
S.F.NK()}}var s=[];for(var F=0;F<3;F++)s.push(Z(L["DrawColorMain"+["Red","Green","Blue"][F]]));var V={t:"Objc",v:d.I.lV({Z:s[0],r:s[1],J:s[2]})},g8=JSON.parse(aF.default);
for(var F=0;F<aF.order.length;F++)g8[aF.mh[F]]={t:"VlLs",v:[]};if(L.DrawColorEnable==1&&A!=1584){n=!0;
var cQ=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]);cQ.Clr=V;g8.solidFillMulti.v.push({t:"Objc",v:cQ})}if(L.EffectInfo){var hk=I(L.EffectInfo),s=hk[2];
if(hk[0]==1){n=!0;var cQ=JSON.parse(aF.lF[aF.order.indexOf("FrFX")]);cQ.Clr.v=d.I.lV({Z:s[0]*255,r:s[1]*255,J:s[2]*255});
cQ.Sz.v.val=Math.round(hk[1]);g8.frameFXMulti.v.push({t:"Objc",v:cQ})}}if(L.FilterLayerInfo){x=L.FilterLayerInfo;
Q=0;var eG=z(),ie=z();if(ie!=x.length-Q)throw"e";var eN={1:"brit",3:"curv",4:"hue2",5:"blnc",6:"nvrt",9:"grdm"}[eG];
if(eN!=null){var gr=fK.$H(eN);S.add[eN]=gr?gr:{};if(eN=="brit")fK.qX["g"+eN](gr,[j(),j(),!0]);if(eN=="hue2")hu.SU(gr,0,[j(),j(),j()]);
if(eN=="curv"){var ek=[],jK=Q;for(var F=0;F<32;F++){Q=jK+F*130;var iE=$(),e9=[];ek.push(e9);for(var dm=0;
dm<iE;dm++)e9.push($()/65535,$()/65535)}for(var F=0;F<4;F++){var e9=ek[F],kD=jq.Hb(gr,F),gJ=kD[0];for(var dm=0;
dm<e9.length;dm+=2){var dR=kD[dm>>>1]=JSON.parse(JSON.stringify(gJ));dR.v.Hrzn.v=Math.round(e9[dm]*255);
dR.v.Vrtc.v=Math.round(e9[dm+1]*255)}jq.SU(gr,F,kD)}}if(eN=="grdm"){var fO=gr.Grad.v,ko=[],d8=z();if(d8!=ie-4)throw d8;
var fj=z();if(fj!=16)throw fj;var ja=z();if(ja!=28)throw ja;var eD=z();for(var F=0;F<eD;F++){var d3=0,fP=[];
for(var dm=0;dm<7;dm++)fP.push(z());ko.push([fP[6]/32768,[fP[1]/4294967295,fP[2]/4294967295,fP[3]/4294967295],fP[4]/4294967295])}d.I.q1(ko,fO)}if(eN=="blnc"){gr.PrsL.v=z()==1;
for(var F=0;F<3;F++){var cR=gr[["ShdL","MdtL","HghL"][F]].v;for(var dm=0;dm<3;dm++)cR[dm].v=j()}}}else console.log("Unknown adjustment",eG,ie,S.getName())}if(A==1584){S.H2|=16;
S.add.SoCo={classID:"null",Clr:V};S.kT(t)}else if(A==800){t.B.pop()}else if(L.Folder!=0){S.add.lsct=(L.Folder&16)!=0?hA.H3:hA.DJ;
S.s3="pass";t.B.pop();t.B.push(t.x6());P(W,J,t,L.FirstChildIndex,l+1);t.B.push(S)}else if(A==0||A==1||A==2||A==3){var N=r(W,J,L.RenderMipmap,!0);
if(N){S.rect=N[0];S.buffer=N[1];O(S.rect,L,"Render","");S.NK()}if(L.TextLayerType!=null){var er="TextLayerString",a7="TextLayerAttributes",dl=[L[er]],hl=[L[a7]];
if(L[er+"Array"]){x=L[er+"Array"];Q=0;while(Q<x.length){var ie=T();dl.push(x.slice(Q,Q+ie));Q+=ie}x=L[a7+"Array"];
Q=0;while(Q<x.length){var ie=T();hl.push(x.slice(Q,Q+ie));Q+=ie}}var f4=S;t.B.pop();for(var em=0;em<dl.length;
em++){var S=f4.clone();t.B.push(S);var e$=_(hl[em]),iP=e$.runs,b2=e$.fnts,k7=e$.bplg,at=e$.bbox,ju=at[2]-at[0],jL=at[3]-at[1],fJ=k7[2]-k7[0],h6=k7[3]-k7[1],iq=new bI;
iq.translate(-ju/2,-jL/2);iq.rotate(Math.atan2(-h6,fJ));iq.translate(ju/2,jL/2);var iI=at[0]+L.OffsetX,dM=at[1]+L.OffsetY;
iq.translate(iI,dM);S.add.lnsr="rend";S.add.TySh=dU.Y7(0,0);S.add.TySh.Iv=new gh(0,0,500,500);S.add.TySh.i=iq;
var ik=S.add.TySh.HW,jp=w.IV(dl[em]);S.gF(jp);dU.U3(ik,0,jp);dU.DY(ik,1);dU.ei(ik,[0,0,ju,jL]);for(var F=0;
F<iP.length;F++){var eA=iP[F],k8=eA[0],ay=k8+eA[1],bK=eA[2],a4=dU.zl(ik,k8,ay),h_=t.cQ/72*e$.size/100;
if((bK&512)!=0)h_*=eA[6]/100;a4.VA.FontSize=Math.round(h_);var V=(bK&256)!=0?eA.slice(3):e$.colr;a4.VA.FillColor={Type:1,Values:[1,V[0]/65535,V[1]/65535,V[2]/65535]};
var bj=eA[7]==""?e$.font:eA[7];if(b2){if(b2[F])bj=b2[F][1];else for(var dm=0;dm<b2.length;dm++)if(b2[dm][0]==bj)bj=b2[dm][1]}dU.gD(a4,bj);
dU.G4(ik,k8,ay,a4)}if(S.rect.P()==0)t.RS=!0;else{S.rect=new gh(iI,dM,ju,jL);S.buffer=d.R(S.rect.P()*4);
d.WK(f4.buffer,f4.rect,S.buffer,S.rect)}}}}var gs=W.VectorObjectList;if(L.VectorNormalType!=null&&gs&&K(gs,"LayerId",Y)){var bs=K(gs,"LayerId",Y).VectorData,e3=G(W,bs),jA=f(J,e3);
if(jA){var kn=null;if(S.add.TySh){var kn=S.clone();t.B.push(kn);delete S.add.TySh}p(S,L,jA[0]);if(S.Uy()){S.H2|=24;
var j6=t.Xh();j6.gF(S.getName());j6.opacity=S.opacity;t.B.push(j6);p(j6,L,jA[0]);C(j6,jA);j6.kT(t)}else{C(S,jA,kn!=null)}S.kT(t);
if(kn){kn.add.TySh.i.concat(new bI(1,0,0,1,S.rect.x+S.rect.m/2,S.rect.y+S.rect.e/2))}}}if(n)S.add.lmfx=g8;
if(Y==B.CurrentLayer)t.g=[t.B.indexOf(S)];Y=L.NextIndex}}function O(W,J,t,Y){W.x+=J[t+"OffscrOffsetX"]+J[Y+"OffsetX"];
W.y+=J[t+"OffscrOffsetY"]+J[Y+"OffsetY"]}function p(W,J,t){W.add.vmsk=new eM.hn;d.A.i(t.j,new bI(1,0,0,1,J.OffsetX,J.OffsetY),t.j);
W.add.vmsk.$=d.A.tf(t);W.jz()}function C(W,J,t){var Y=J[1][0],l=J[2][0];W.H2|=16;var m=W.add.vstk=aF.XM.$H(!0,!0);
m.fillEnabled.v=t==!0;W.add.SoCo={classID:"null",Clr:{t:"Objc",v:d.I.lV({Z:255,r:255,J:255})}};m.strokeStyleContent.v.Clr.v=d.I.lV({Z:Y[0],r:Y[1],J:Y[2]});
m.strokeStyleLineWidth.v.val=l*2;m.strokeStyleLineCapType.v.strokeStyleLineCapType="strokeStyleRoundCap"}return g}();
var eV={};eV.Mx=!1;eV.arj=!1;eV.wx=!1;eV.GP=document.createElement("canvas");eV.Yt=null;eV.ko=null;eV.Lb=0;
(function(){var x={alpha:!0,antialias:!1,depth:!1,premultipliedAlpha:!1},Q;if(!Q)Q=eV.GP.getContext("webgl",x);
if(!Q)Q=eV.GP.getContext("experimental-webgl",x);if(Q){eV.Mx=!0;eV.arj=!0;eV.Yt=Q;eV.ko=Q.createFramebuffer();
Q.bindFramebuffer(Q.FRAMEBUFFER,eV.ko);Q.disable(Q.BLEND);Q.disable(Q.DEPTH_TEST);var c=Q.createBuffer();
Q.bindBuffer(Q.ARRAY_BUFFER,c);Q.bufferData(Q.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),Q.STATIC_DRAW);
Q.enableVertexAttribArray(0);Q.vertexAttribPointer(0,2,Q.FLOAT,!1,0,0)}}());eV.a5i=function(x){x=x.replace(/\s\s+/g," ");
x=x.replace(/; /g,";");x=x.replace(/} /g,"}");x=x.replace(/ }/g,"}");x=x.replace(/{ /g,"{");x=x.replace(/ {/g,"{");
x=x.replace(/= /g,"=");x=x.replace(/ =/g,"=");x=x.replace(/\| /g,"|");x=x.replace(/ \|/g,"|");return x};
eV.SV=function(x){var Q=eV.Yt;if(x>Q.getParameter(Q.MAX_TEXTURE_SIZE)){eV.Mx=!1;alert("Disabling WebGL")}};
eV.r4=function(x,Q){return new Float32Array([(x.x-Q.x)/Q.m,(x.y-Q.y)/Q.e,x.m/Q.m,x.e/Q.e])};eV.nc=function(){return this.GP};
eV.qk=function(x,Q){var c=eV.Yt;c.bindFramebuffer(c.FRAMEBUFFER,eV.ko);c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,x.cm,0);
c.viewport(0,0,x.m,x.e);if(Q){c.enable(c.SCISSOR_TEST);c.scissor(Q.x,Q.y,Q.m,Q.e)}else c.disable(c.SCISSOR_TEST)};
eV.ac2=function(x,Q,c){if(c)throw"error";var $=eV.Yt;$.disable($.SCISSOR_TEST);$.bindFramebuffer($.FRAMEBUFFER,null);
$.viewport(0,0,x,Q);if(c){$.enable($.SCISSOR_TEST);$.scissor(c.x,c.y,Math.round(c.m),Math.round(c.e))}else $.disable($.SCISSOR_TEST)};
eV.clear=function(){var x=eV.Yt;x.clearColor(0,0,0,0);x.clear(x.COLOR_BUFFER_BIT)};eV.sN=function(x,Q){if(Q==null)Q=0;
var c=(Q>>>0&255)==0,$=(Q>>>8&255)==0,z=(Q>>>16&255)==0,j=(Q>>>24&255)==0,U=(x>>>0&255)*(1/255),i=(x>>>8&255)*(1/255),b=(x>>>16&255)*(1/255),e=(x>>>24&255)*(1/255),k=eV.Yt;
k.colorMask(c,$,z,j);k.clearColor(U,i,b,e);k.clear(k.COLOR_BUFFER_BIT);k.colorMask(!0,!0,!0,!0)};eV.zJ=function(x,Q,c,$,z){var j=Q.y_($);
if(z)j=j.y_(z);if(j._6())return;var U=eV.Yt;eV.qk(x);U.bindTexture(U.TEXTURE_2D,c.cm);U.copyTexSubImage2D(U.TEXTURE_2D,0,j.x-$.x,j.y-$.y,j.x-Q.x,j.y-Q.y,j.m,j.e)};
eV.Zk=function(F,x,Q){var c=eV.aaS[F];if(c==null||c.m!=x||c.e!=Q){if(c)c.delete();c=new eV.PT(x,Q)}eV.aaS[F]=c;
return c};eV.aaS=[];eV.yF=function(){this.sC=null;this.q3=null};eV.yF.GH=null;eV.yF.prototype.Oa=function(x){if(this.q3)return;
this.q3={};var Q=eV.Yt,c=this.sC,$=this.q3;for(var F=0;F<x.length;F++){var z=x[F];$[z]=Q.getUniformLocation(c,z)}};
eV.yF.prototype.dX=function(){};eV.yF.prototype.t$=function(x){var Q=eV.Yt;for(var F=0;F<x.length;F+=2){Q.uniform1i(x[F],F>>>1);
Q.activeTexture(Q["TEXTURE"+(F>>>1)]);Q.bindTexture(Q.TEXTURE_2D,x[F+1])}Q.activeTexture(Q.TEXTURE0)};
eV.yF.prototype.bN=function(x,Q){var c=eV.Yt,$=c.createShader(c.FRAGMENT_SHADER);c.shaderSource($,x);
c.compileShader($);if(!c.getShaderParameter($,c.COMPILE_STATUS))console.log(c.getShaderInfoLog($));var z=c.createShader(c.VERTEX_SHADER);
c.shaderSource(z,Q);c.compileShader(z);if(!c.getShaderParameter(z,c.COMPILE_STATUS))console.log(c.getShaderInfoLog(z));
var j=c.createProgram();c.attachShader(j,z);c.attachShader(j,$);c.linkProgram(j);if(!c.getProgramParameter(j,c.LINK_STATUS))console.log("Could not initialise shaders");
this.sC=j};eV.yF.prototype.z3=function(){if(eV.yF.GH!=this){eV.Yt.useProgram(this.sC);eV.yF.GH=this}};
eV.X7=function(x,Q){eV.ae++;eV.Lb+=x*Q;if(eV.wx)console.log("GL.Channels instances: "+eV.ae+", memory: "+eV.Lb);
var c=eV.Yt;this.m=x;this.e=Q;this.cm=c.createTexture();this.xY=null;this.s2(this.cm,x,Q)};eV.X7.prototype.s2=function(x,Q,c){var $=eV.Yt;
$.bindTexture($.TEXTURE_2D,x);$.texParameteri($.TEXTURE_2D,$.TEXTURE_MIN_FILTER,$.NEAREST);$.texParameteri($.TEXTURE_2D,$.TEXTURE_MAG_FILTER,$.NEAREST);
$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_S,$.CLAMP_TO_EDGE);$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_T,$.CLAMP_TO_EDGE);
$.texImage2D($.TEXTURE_2D,0,$.ALPHA,Q,c,0,$.ALPHA,$.UNSIGNED_BYTE,null)};eV.X7.prototype.set=function(x,Q){var c=eV.Yt;
c.bindTexture(c.TEXTURE_2D,this.cm);c.pixelStorei(c.UNPACK_ALIGNMENT,1);var $=this.m*this.e;if(Q==null||Q.P()*10>$)c.texImage2D(c.TEXTURE_2D,0,c.ALPHA,this.m,this.e,0,c.ALPHA,c.UNSIGNED_BYTE,x);
else{var z=new gh(0,0,this.m,this.e),j=d.R(Q.P());d.L2(x,z,j,Q);c.texSubImage2D(c.TEXTURE_2D,0,Q.x,Q.y,Q.m,Q.e,c.ALPHA,c.UNSIGNED_BYTE,j)}c.pixelStorei(c.UNPACK_ALIGNMENT,4)};
eV.X7.prototype.delete=function(){var x=eV.Yt;if(this.cm){x.deleteTexture(this.cm);eV.ae--;eV.Lb-=this.m*this.e}if(eV.wx)if(eV.wx)console.log("GL.Channels instances: "+eV.ae+", memory: "+eV.Lb*4)};
eV.ae=0;eV.PT=function(x,Q,c){if(c==null)c=!1;eV.ae++;eV.Lb+=x*Q*4;if(eV.wx)console.log("GL.Channels instances: "+eV.ae+", memory: "+eV.Lb);
var $=eV.Yt;this.adO=c;this.m=x;this.e=Q;this.cm=$.createTexture();this.xY=null;this.s2(this.cm,x,Q)};
eV.PT.prototype.set=function(x,Q){var c=eV.Yt;c.disable(c.SCISSOR_TEST);c.bindTexture(c.TEXTURE_2D,this.cm);
if(x==null||x instanceof Uint8Array){var $=this.m*this.e;if((Q==null||Q.P()*10>$)&&(x==null||x.length>=$*4))c.texImage2D(c.TEXTURE_2D,0,c.RGBA,this.m,this.e,0,c.RGBA,c.UNSIGNED_BYTE,x);
else{var z=x;if(x.length==$*4){var z=d.R(Q.P()*4);d.WK(x,new gh(0,0,this.m,this.e),z,Q)}c.texSubImage2D(c.TEXTURE_2D,0,Q.x,Q.y,Q.m,Q.e,c.RGBA,c.UNSIGNED_BYTE,z)}}else c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,x)};
eV.PT.prototype.get=function(x){var Q=eV.Yt;eV.qk(this);Q.readPixels(0,0,this.m,this.e,Q.RGBA,Q.UNSIGNED_BYTE,x)};
eV.PT.prototype.Zw=function(x){if(x._6())return;var Q=eV.Yt;if(this.xY==null){this.xY=Q.createTexture();
this.s2(this.xY,this.m,this.e);eV.ae++;eV.Lb+=this.m*this.e*4}Q.bindFramebuffer(Q.FRAMEBUFFER,eV.ko);
Q.bindTexture(Q.TEXTURE_2D,this.xY);if(x){var c=Math.max(x.x,0),$=Math.max(x.y,0);Q.copyTexSubImage2D(Q.TEXTURE_2D,0,c,$,c,$,x.m,x.e)}else Q.copyTexImage2D(Q.TEXTURE_2D,0,Q.RGBA,0,0,this.m,this.e,0)};
eV.PT.prototype.s2=function(x,Q,c){var $=eV.Yt;$.bindTexture($.TEXTURE_2D,x);$.texParameteri($.TEXTURE_2D,$.TEXTURE_MIN_FILTER,this.adO?$.LINEAR:$.NEAREST);
$.texParameteri($.TEXTURE_2D,$.TEXTURE_MAG_FILTER,$.NEAREST);$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_S,$.CLAMP_TO_EDGE);
$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_T,$.CLAMP_TO_EDGE);$.texImage2D($.TEXTURE_2D,0,$.RGBA,Q,c,0,$.RGBA,$.UNSIGNED_BYTE,null)};
eV.PT.prototype.delete=function(){var x=eV.Yt;if(this.cm){x.deleteTexture(this.cm);eV.ae--;eV.Lb-=this.m*this.e*4}if(this.xY){x.deleteTexture(this.xY);
eV.ae--;eV.Lb-=this.m*this.e*4}if(eV.wx)if(eV.wx)console.log("GL.Channels instances: "+eV.ae+", memory: "+eV.Lb)};
eV.PT.prototype.clone=function(){var x=eV.Yt,Q=new eV.PT(this.m,this.e);eV.qk(this);x.bindTexture(x.TEXTURE_2D,Q.cm);
x.copyTexImage2D(x.TEXTURE_2D,0,x.RGBA,0,0,this.m,this.e,0);return Q};eV.ST={avH:"  vec3 ocbrn(vec3 a, vec3 b, float f) {  vec3 d = (a*vec3(f)+ONE3-vec3(f));  return mix(ONE3 - min(ONE3,(ONE3-b)/d), ZERO3, vec3(vec3(greaterThan(vec3(0.001),d))) );  }  ",azJ:"  vec3 ocddg(vec3 a, vec3 b, float f) {  return mix(        min(ONE3,       b/(ONE3 - a*f))    ,   ONE3   , vec3(equal(a*f,ONE3 )) );  }  ",Aq:"const vec3 ZERO3 = vec3(0.0,0.0,0.0) ;\t\t\tconst vec3 QUAR3 = vec3(0.25,0.25,0.25) ;\t\t\tconst vec3 HALF3 = vec3(0.5,0.5,0.5) ;\t\t\tconst vec3 ONE3  = vec3(1.0,1.0,1.0) ;",vV:" float hueDiff(float shue, float hue) { \t\t\t\tfloat df = hue-shue, adf=abs(df), df0 = df-1.0, df1 = df+1.0; \t\t\t\tif(abs(df0) < adf)  df = df0; \t\t\t\telse if(abs(df1) < adf)  df = df1; \t\t\t\treturn df; \t\t\t}",ayG:" float hueCF(float hueS, float hue0) { \t\t\t\tfloat df = hueDiff(hue0, hueS)*6.0; \t\t\t\treturn   max(0.0, min(1.0,  (df<0.0) ? 1.0+df : 1.0-df  ));  } ",kI:"float sat(vec3 c) { return max(c.x,max(c.y,c.z)) - min(c.x,min(c.y,c.z)); }",jY:"float lum(vec3 c) { return dot(c, vec3(0.3,0.59,0.11)); } ",MC:"vec3  D  (vec3 x) { return mix( sqrt(x), ((16.0*x-12.0)*x+4.0)*x  , vec3(lessThanEqual(x,QUAR3))  ); }",aof:"float midSat (vec3 v, float s) { return ((v.y-v.z)*s)/(v.x-v.z); }",p8:"vec3 setSat (vec3 c, float s) \t\t\t{\t\t\t\tvec3 o;\t\t\t\tif(c.r==c.g && c.g==c.b) o = ZERO3;\t\t\t\telse if(c.r>c.g)  {\t\t\t\t\tif(c.r>c.b) {\t\t\t\t\t\tif(c.g>c.b)\to = vec3(s, midSat(c.rgb,s), 0.0); \t\t\t\t\t\telse\to = vec3(s, 0.0, midSat(c.rbg,s)); \t\t\t\t\t}\t\t\t\t\telse\t\to = vec3(midSat(c.brg,s), 0.0, s); \t\t\t\t} else  {\t\t\t\t\tif(c.r<c.b) {\t\t\t\t\t\tif(c.g>c.b)\to = vec3(0.0, s, midSat(c.gbr,s)); \t\t\t\t\t\telse\t    o = vec3(0.0, midSat(c.bgr,s), s); \t\t\t\t\t}\t\t\t\t\telse\t\t    o = vec3(midSat(c.grb,s), s, 0.0);\t\t\t\t}\t\t\t\treturn o;\t\t\t}",ag4:"vec3 clipCol(vec3 c) \t\t\t{ \t\t\t\tvec3 o = c;  float l = lum(c); \t\t\t\tfloat n = min(c.r,min(c.g,c.b)); \t\t\t\tfloat x = max(c.r,max(c.g,c.b)); \t\t\t\tif(n<0.0) o = l + (o-l)*(l/(l-n));\t\t\t\tif(x>1.0) o = l + (o-l)*(1.0-l)/(x-l);\t\t\t\treturn o;\t\t\t}",y6:"vec3 setLum (vec3 c, float l) { return clipCol(c+l-lum(c)); } ",a6F:"bool in01(vec2 c) { return (0.0<=c.x) && (c.x<=1.0) && (0.0<=c.y) && (c.y<=1.0); }",hash:"float hash(vec2 v) { return fract(sin(dot(v ,vec2(12.9898,78.233))) * 43758.5453); }",Zb:"vec3 rgbToHsl (vec3 rgb) {\t\t\t\tfloat r = rgb.r, g = rgb.g, b = rgb.b; \t\t\t\tfloat mx = max(r, max(g, b)), mn = min(r, min(g, b)); \t\t\t\tfloat h, s, l = (mx + mn) * 0.5;\t\t\t\t\t\t\t\tif(mx == mn) h = s = 0.0; \t\t\t\telse{ \t\t\t\t\tfloat d = mx - mn; \t\t\t\t\ts = l > 0.5 ? d / (2.0 - mx - mn) : d / (mx + mn);  \t\t\t\t\t\t\t\t\t\tif(mx==r) h = (g - b) / d + (g < b ? 6.0 : 0.0);  \t\t\t\t\telse if(mx==g) h = (b - r) / d + 2.0; \t\t\t\t\telse if(mx==b) h = (r - g) / d + 4.0; \t\t\t\t\t\t\t\t\t\th /= 6.0; \t\t\t\t}  \t\t\t\treturn vec3(h,s,l); }",qs:"vec3 hslToRgb (float h, float s, float l){\t\t\t\tfloat r, g, b;\t\t\t\t\t\t\t\tif(s == 0.0)  r = g = b = l; \t\t\t\telse{ \t\t\t\t\tfloat q = l < 0.5 ? l * (1.0 + s) : l + s - l * s; \t\t\t\t\tfloat p = 2.0 * l - q; \t\t\t\t\tr = hue2rgb(p, q, h + 1.0/3.0); \t\t\t\t\tg = hue2rgb(p, q, h); \t\t\t\t\tb = hue2rgb(p, q, h - 1.0/3.0); \t\t\t\t} \t\t\t\treturn vec3(r,g,b); } ",XZ:"float hue2rgb(float p, float q, float t){ \t\t\t\tif(t < 0.0) t += 1.0;\t\t\t\tif(t > 1.0) t -= 1.0;\t\t\t\tif(t < 1.0/6.0) return p + (q - p) * 6.0 * t; \t\t\t\tif(t < 1.0/2.0) return q; \t\t\t\tif(t < 2.0/3.0) return p + (q - p) * (2.0/3.0 - t) * 6.0; \t\t\t\treturn p;\t}",a$:"vec3 rgbToHsv(vec3 rgb){\t\t\t\t\tfloat r = rgb.r, g = rgb.g, b = rgb.b; \t\t\t\tfloat mx = max(r, max(g, b)), mn = min(r, min(g, b)); \t\t\t\tfloat h, s, v = mx; \t\t\t\t\t\t\t\tfloat d = mx - mn; \t\t\t\ts = mx == 0.0 ? 0.0 : d / mx; \t\t\t\t\t\t\t\tif(mx == mn) h = 0.0;  \t\t\t\telse if(mx==r) h = (g - b) / d + (g < b ? 6.0 : 0.0);  \t\t\t\telse if(mx==g) h = (b - r) / d + 2.0; \t\t\t\telse if(mx==b) h = (r - g) / d + 4.0; \t\t\t\t\t\t\t\th /= 6.0; \t\t\t\treturn vec3(h,s,v);  }",Us:"vec3 hsvToRgb(float h, float s, float v)  { \t\t\t\tfloat r, g, b, f, p, q, t, i; \t\t\t\ti = floor(h * 6.0); \t\t\t\tf = h * 6.0 - i; \t\t\t\tp = v * (1.0 - s); \t\t\t\tq = v * (1.0 - f * s); \t\t\t\tt = v * (1.0 - (1.0 - f) * s); \t\t\t\t\t\t\t\tif     (i==0.0) { r = v, g = t, b = p; }\t\t\t\telse if(i==1.0) { r = q, g = v, b = p; }\t\t\t\telse if(i==2.0) { r = p, g = v, b = t; }\t\t\t\telse if(i==3.0) { r = p, g = q, b = v; }\t\t\t\telse if(i==4.0) { r = t, g = p, b = v; }\t\t\t\telse if(i==5.0) { r = v, g = p, b = q; }\t\t\t\t\t\t\t\treturn vec3(r,g,b); }",eC:"\t\tfloat srgbUngamma(float x) {\t\t\treturn (x<0.04045) ? (x / 12.92) : pow( ( x + 0.055 ) / 1.055,  2.4);\t\t}\t\tfloat xyzScale(float x) {\t\t\treturn (x>0.008856) ? pow(x,1.0/3.0) : (903.3*x+16.0)*(1.0/116.0); \t\t}\t\tvec3 rgbToLab(vec3 rgb) {\t\t\tbool ok = true;\t\t\trgb.r = srgbUngamma(rgb.r); \t\t\trgb.g = srgbUngamma(rgb.g); \t\t\trgb.b = srgbUngamma(rgb.b); \t\t\tok = ok && 0.0318<=rgb.r && rgb.r<=0.0319; \t\t\tok = ok && 0.127 <=rgb.g && rgb.g<=0.128 ; \t\t\tok = ok && 0.3047<=rgb.b && rgb.b<=0.305; \t\t\t\t\t\tmat3 srgb2xyz = mat3(0.4360747164307918, 0.222504478679176, 0.013932173981751634,    0.3850649153329662, 0.7168786002139355, 0.09710452396580642,    0.14308038098632878, 0.06061692340677909, 0.7141732835334675); \t\t\t\t\t\tvec3 xyz = srgb2xyz*rgb; \t\t\tok = ok && 0.106<=xyz[0] && xyz[0]<=0.107;  \t\t\t\t\t\txyz=xyz*vec3(100.0/96.72, 100.0/100.0, 100.0/81.427);  \t\t\txyz.x = xyzScale(xyz.x); \t\t\txyz.y = xyzScale(xyz.y); \t\t\txyz.z = xyzScale(xyz.z); \t\t\t\t\t\treturn vec3(116.0*xyz.y-16.0, 500.0*(xyz.x-xyz.y), 200.0*(xyz.y-xyz.z));  \t\t} \t\tfloat labSimilar(vec3 lab, vec3 mnm, vec3 mxm, float lim)  {\t\t\tfloat L=lab.x, a=lab.y, b=lab.z; \t\t\tfloat dl = ((L<mnm.x) ? (mnm.x-L) : ((mxm.x<L) ? (mxm.x-L) : 0.0))*(1.0/100.0); \t\t\tfloat da = ((a<mnm.y) ? (mnm.y-a) : ((mxm.y<a) ? (mxm.y-a) : 0.0))*(1.0/116.0); \t\t\tfloat db = ((b<mnm.z) ? (mnm.z-b) : ((mxm.z<b) ? (mxm.z-b) : 0.0))*(1.0/116.0); \t\t\t/*float dl  = (slab.x-lab.x)*(1.0/100.0), da=(slab.y-lab.y)*(1.0/116.0), db=(slab.z-lab.z)*(1.0/116.0);*/ \t\t\tfloat dst = sqrt(dl*dl+da*da+db*db)*1.35; \t\t\treturn (dst<=lim) ? min(1.0,1.17*(1.0 - (dst/lim))) : 0.0; \t\t}",aoa:"  mat3 rgbToYuv = mat3(0.299, -0.147, 0.615,    0.587,  -0.289,  -0.515,   0.114, 0.436, -0.100 );  ",a8W:"  mat3 yuvToRgb = mat3(1.0, 1.0, 1.0,   0.0, -0.3946, 2.03199,    1.1398, -0.5805, -0.00048  ); ",sW:"\t\tfloat _blendIf(float c, vec4 br) {  return min((c-br.x)*br.y,  (c-br.w)*br.z);  }  \t\tfloat blendIf(vec4 sc, vec4 tc, vec4 br[10]) {  \t\t\tfloat sg = lum(sc.rgb); \t\t\tfloat tg = lum(tc.rgb); \t\t\tfloat ms = _blendIf(sg,br[0]); \t\t\tms = min(ms, _blendIf(sc.r,br[2])); \t\t\tms = min(ms, _blendIf(sc.g,br[4])); \t\t\tms = min(ms, _blendIf(sc.b,br[6])); \t\t\t\t\t\tfloat mt = _blendIf(tg,br[1]); \t\t\tmt = min(mt, _blendIf(tc.r,br[3])); \t\t\tmt = min(mt, _blendIf(tc.g,br[5])); \t\t\tmt = min(mt, _blendIf(tc.b,br[7])); \t\t\tmt=max(mt,1.0-tc.w);\t\t\t\t\t\tfloat mi=min(ms,mt);\t\t\treturn clamp(mi,0.0,1.0);\t\t}",agj:"\t\t\tvec4 mapLut(vec4 src, sampler2D lut, float N) {\t\t\t\tfloat iN = 1.0/N; \t\t\t\tfloat fb = 0.5*iN + src.b*(1.0-iN); \t\t\t\tfloat fg = 0.5*iN + src.g*(1.0-iN); \t\t\t\tfloat R  = src.r*(N-1.0)*0.999999; \t\t\t\tfloat ir = floor(R);  \t\t\t\t\t\t\t\tvec4 c0 = texture2D(lut, vec2(fb, (ir    + fg   )*iN)); \t\t\t\tvec4 c1 = texture2D(lut, vec2(fb, (ir+1.0+ fg   )*iN)); \t\t\t\tvec4 rs = mix(c0,c1,clamp(R-ir,0.0,1.0));  \t\t\t\treturn rs;  \t\t\t}"};
eV.l={};eV.l.EH={};eV.l.SG=null;eV.l.tu=null;eV.l.HR=null;eV.l.agw=function(x,Q,c,$,z,j,U,i){if(i==null)i=en.co();
if("idiv,lbrn,div ,lddg,vLit,lLit,hMix,diff".split(",").indexOf(x)==-1){U=U*i.fill;i.fill=1;i.style=!1}var b=x+(i.lf?"1":"");
if(eV.l.EH[b]==null)eV.l.EH[b]=new eV.l.oC(x,i.lf!=null);var e=eV.l.EH[b],k=c.y_(z).y_(j);k.offset(-z.x,-z.y);
if(k._6())return;var K=eV.Yt;eV.qk($,k);$.Zw(k);e.z3();e.dX(Q.cm,$.xY,eV.r4(c,z),U,i.fill,i.style?1:0,i.N9?1:0,i.lf?new Float32Array(i.lf):null);
K.drawArrays(K.TRIANGLES,0,6)};eV.l.ND=function(x,Q,c,$,z,j,U,i,b,e,k){if(eV.l.SG==null)eV.l.SG=new eV.l._m(!0,!0);
if(eV.l.tu==null)eV.l.tu=new eV.l._m(!0,!1);if(eV.l.HR==null)eV.l.HR=new eV.l._m(!1,!0);var K=e?1:0,g=x?z?eV.l.SG:eV.l.tu:eV.l.HR,R=new Float32Array(k?[k[0],k[1],k[2],1]:[1,1,1,1]),T=Q?Q.y_($).y_(i):$.y_(i);
if(T._6())return;T.offset(-$.x,-$.y);var D=eV.Yt;eV.qk(c,T);c.Zw(T);g.z3();if(x==null)g.dX(null,c.xY,z.cm,eV.r4($,$),eV.r4(j,$),U/255,b,K,R);
else if(z)g.dX(x.cm,c.xY,z.cm,eV.r4(Q,$),eV.r4(j,$),U/255,b,K,R);else g.dX(x.cm,c.xY,null,eV.r4(Q,$),null,U/255,b,K,R);
D.drawArrays(D.TRIANGLES,0,6)};eV.l.abZ=function(x,Q,c){if(eV.l.a1z==null)eV.l.a1z=new eV.l.gn;var $=eV.l.a1z,z=new gh(0,0,x.m,x.e),j=eV.Yt;
eV.qk(Q);Q.Zw(z);$.z3();$.dX(z,x.cm,Q.xY,c.cm);j.drawArrays(j.TRIANGLES,0,6)};eV.l.ff={norm:"return a;",diss:"return a;",dark:"return min(a,b);","mul ":"return a*b;",idiv:"  vec3 d = (a*vec3(f)+ONE3-vec3(f));  return mix(mix(ONE3-((ONE3-b)/max(d,vec3(1e-6))), ZERO3, vec3(greaterThanEqual(ONE3-b,d)) ), ONE3   ,   vec3(equal(b,ONE3) ));   ",lbrn:"return max(ZERO3, a*f+b-f);",dkCl:"return ( lum(a)<lum(b) ? a : b );",lite:"return max(a,b);",scrn:"return b+a-b*a;","div ":"a*=f;  return mix(    mix(  min(ONE3,b/(1.0-a)), ONE3,  step(1.0-a, b))     , ZERO3, vec3(equal(b,ZERO3)) );",lddg:"a*=f;  return min(ONE3,a+b);",lgCl:"return ( lum(a)>lum(b) ? a : b );",over:"return mix( a+(2.0*b -1.0)-a*(2.0*b-1.0) ,  2.0*b*a , step(-HALF3,-b) );",sLit:"return mix( b+(2.0*a -1.0)*(D(b)-b)  , b-(1.0-2.0*a)*b*(1.0-b) , step(-HALF3,-a) );",hLit:"return mix( b+(2.0*a -1.0)-b*(2.0*a-1.0) ,  2.0*a*b , step(-HALF3,-a) );",vLit:" return mix( ocddg(2.0*a-1.0,b,f)  ,  ocbrn(2.0*a,b,f)  ,  vec3(greaterThanEqual(HALF3,a))); ",lLit:"return mix( min(ONE3, (2.0*a-1.0)*f+b) , max(ZERO3, 2.0*a*f+b-f)  , step(-HALF3,-a));",pLit:"return mix( max(2.0*a-1.0,b) , min(2.0*a, b) , step(-HALF3,-a)  );",hMix:"if(f>0.99) return vec3(greaterThanEqual(a+b,ONE3));   return  min( ONE3, max(ZERO3,  (b+a*f-f)/(1.0-f+1e-6)  ))  ;  ",diff:"return abs(a*f-b);",smud:"return a+b-2.0*a*b;",fsub:"return max(b-a, ZERO3);",fdiv:"return min(b/a, ONE3);","hue ":"return  setLum( setSat(a, sat(b)) , lum(b) ); ","sat ":"return  setLum( setSat(b, sat(a)) , lum(b) ); ",colr:"return  setLum( a, lum(b) ); ","lum ":"return  setLum( b, lum(a) ); "};
eV.l.oC=function(x,Q){eV.yF.call(this);var c="\t\t\tprecision highp float;\t\t\t"+eV.ST.Aq+"\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform sampler2D target;\t\t\tuniform float alpha;\t\t\tuniform float fill;\t\t\tuniform float style;\t\t\tuniform float keepBGA;\t\t\t"+(Q?"uniform vec4 blIf[10];":"")+"\t\t\t\t\t\tvarying vec2 tCoord;\t\t\tvarying vec2 sCoord;\t\t\t\t\t\t\t\t\t"+eV.ST.kI+"\t\t\t"+eV.ST.jY+"\t\t\t"+eV.ST.MC+"\t\t\t"+eV.ST.avH+"\t\t\t"+eV.ST.azJ+"\t\t\t"+eV.ST.aof+"\t\t\t"+eV.ST.p8+"\t\t\t"+eV.ST.ag4+"\t\t\t"+eV.ST.y6+"\t\t\t"+eV.ST.hash+"\t\t\t"+(Q?eV.ST.sW:"")+"\t\t\t\t\t\tvec3  BB(vec3  a, vec3  b, float f) { "+eV.l.ff[x]+" } \t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 tgt = texture2D(target, tCoord);\t\t\t\tvec4 src = texture2D(source, sCoord);",$="\t\t\tattribute vec2 verPos;\t\t\tuniform vec4 srct;\t\t\tvarying vec2 tCoord;\t\t\tvarying vec2 sCoord;\t\t\tvoid main(void) {\t\t\t\ttCoord = verPos;\t\t\t\tsCoord = (verPos-srct.xy)/srct.zw;\t\t\t\tgl_Position = vec4(vec2(-1.0,-1.0) + 2.0*verPos, 0.0, 1.0);\t\t\t}";
if(x=="diss")c+="\t\t\t\t\tgl_FragColor = (hash(tCoord) >= (keepBGA + (1.0-keepBGA)*src.w)*alpha ? tgt : vec4(src.xyz, keepBGA*tgt.w + (1.0-keepBGA)));  }";
else c+="  \t\t\t\t\tfloat as = (keepBGA + (1.0-keepBGA)*src.w) * alpha, at = keepBGA + (1.0-keepBGA)*tgt.w; \t\t\t\t\t"+(Q?"  as*=blendIf(src,tgt,blIf);  ":"")+"\t\t\t\t\tfloat ats = at * (1.0-as), ao = as + ats, iao = (ao==0.0) ? 0.0 : (1.0/ao); \t\t\t\t\tfloat ccf = (style==1.0) ? 1.0 : as; \t\t\t\t\tvec3 ncl = ( (1.0-at)*as*src.xyz + (1.0-ccf)*at*tgt.xyz + ccf*at*BB(src.xyz, tgt.xyz, (1.0+as-ccf)*fill)  ) * iao;\t\t\t\t\tgl_FragColor = vec4(ncl, keepBGA*tgt.w + (1.0-keepBGA)*(as*fill + at*(1.0-as*fill)));\t\t\t\t\t\t\t}";
this.bN(c,$)};eV.l.oC.prototype=new eV.yF;eV.l.oC.prototype.dX=function(x,Q,c,$,z,j,U,i){this.Oa("srct alpha source target fill style keepBGA blIf".split(" "));
var b=eV.Yt,e=this.q3;b.uniform4fv(e.srct,c);b.uniform1f(e.alpha,$);b.uniform1f(e.fill,z);b.uniform1f(e.style,j);
b.uniform1f(e.keepBGA,U);if(i)b.uniform4fv(e.blIf,i);this.t$([e.source,x,e.target,Q])};eV.l._m=function(x,Q){eV.yF.call(this);
this.akG=x;this.Tj=Q;var c="\t\t\tprecision mediump float;\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform sampler2D target;\t\t\tuniform sampler2D weight;\t\t\tuniform vec4 cswitch;\t\t\tuniform float wcolor;\t\t\tuniform float awg; /* additional weight */\t\t\tuniform float dissv;\t\t\t\t\t\tvarying vec2 tCoord;\t\t\tvarying vec2 sCoord;\t\t\tvarying vec2 wCoord;\t\t\t\t\t\t"+eV.ST.a6F+"\t\t\t"+eV.ST.hash+"\t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 tgt = texture2D(target, tCoord);\t\t\t\tvec4 src = "+(x?"texture2D(source, sCoord)":"vec4(0.0)")+"; \t\t\t\tfloat wg = awg "+(Q?"* (in01(wCoord) ? texture2D(weight, wCoord).w : wcolor)":"")+";\t\t\t\t"+(x?"":"wg = 1.0-wg;")+"\t\t\t\tfloat hwg = hash(tCoord)>=wg ? 0.0 : 1.0;  wg = dissv*hwg + (1.0-dissv)*wg; \t\t\t\tfloat as = wg*src.w, at = (1.0-wg)*tgt.w, ao = as+at;\t\t\t\t\t\t\t\tvec4 nc = vec4( (as*src.xyz + at*tgt.xyz)/ao, ao );  \t\t\t\tgl_FragColor =  "+(Q?"nc":"cswitch*nc + (1.0- cswitch)*tgt")+";    \t\t\t}",$="\t\t\tattribute vec2 verPos;\t\t\tvarying vec2 tCoord;\t\t\tvarying vec2 sCoord;\t\t\tvarying vec2 wCoord;\t\t\t\t\t\tuniform vec4 srct;\t\t\tuniform vec4 wrct;\t\t\tvoid main(void) {\t\t\t\ttCoord = verPos;\t\t\t\tsCoord = (verPos-srct.xy)/srct.zw;\t\t\t\twCoord = (verPos-wrct.xy)/wrct.zw;\t\t\t\tgl_Position = vec4(vec2(-1.0,-1.0) + 2.0*verPos, 0.0, 1.0);\t\t\t}";
this.bN(c,$)};eV.l._m.prototype=new eV.yF;eV.l._m.prototype.dX=function(x,Q,c,$,z,j,U,i,b){if(this.Tj)this.Oa("srct wrct wcolor awg dissv source target weight cswitch".split(" "));
else this.Oa("srct awg dissv source target cswitch".split(" "));var e=eV.Yt,k=this.q3;e.uniform4fv(k.srct,$);
if(this.Tj){e.uniform4fv(k.wrct,z);e.uniform1f(k.wcolor,j)}else{e.uniform4fv(k.cswitch,b)}e.uniform1f(k.awg,U);
e.uniform1f(k.dissv,i);var K=[k.source,x,k.target,Q];if(this.Tj)K.push(k.weight,c);this.t$(K)};eV.l.gn=function(){eV.yF.call(this);
var x="\t\t\tprecision mediump float;\t\t\t\t\t\tuniform sampler2D prev;\t\t\tuniform sampler2D next;\t\t\tuniform sampler2D alpha;\t\t\t\t\t\tvarying vec2 coord;\t\t\t\t\t\t\t\t\tvoid main(void) {\t\t\t\tvec3 or = texture2D(prev , coord).rgb;\t\t\t\tvec3 ir = texture2D(next , coord).rgb; \t\t\t\tfloat al = texture2D(alpha, coord).w; \t\t\t\tgl_FragColor =  vec4(  (ir-(1.0-al)*or)*(1.0/al)   ,1.0 );  \t\t\t}",Q="\t\t\tattribute vec2 verPos;\t\t\tvarying vec2 coord;\t\t\t\t\t\tuniform vec4 rct;\t\t\tvoid main(void) {\t\t\t\tcoord = verPos;\t\t\t\tgl_Position = vec4(vec2(-1.0,-1.0) + 2.0*verPos, 0.0, 1.0);\t\t\t}";
this.bN(x,Q)};eV.l.gn.prototype=new eV.yF;eV.l.gn.prototype.dX=function(x,Q,c,$){this.Oa(["rct","prev","next","alpha"]);
var z=eV.Yt,j=this.q3;z.uniform4fv(j.rct,[0,0,1,1]);this.t$([j.prev,Q,j.next,c,j.alpha,$])};eV.wU={RV:{},wk:"\t\t\tattribute vec2 verPos;\t\t\tvarying vec2 sCoord;\t\t\tvoid main(void) {\t\t\t\tsCoord = verPos;\t\t\t\tgl_Position = vec4(vec2(-1.0,-1.0) + 2.0*verPos, 0.0, 1.0);\t\t\t}"};
eV.wU.NP=function(x,Q){var c=k5.C$,$=[c.W5,c.go,c.sz,c.PP,c.zC,c.NS,c.Ro,c.QR].indexOf(x.type),z=eV.wU.RV[x.type];
if(z==null)z=eV.wU.RV[x.type]=new eV.RV[$];z.z3();z.dX(Q,x);eV.Yt.drawArrays(eV.Yt.TRIANGLES,0,6)};eV.RV=[];
eV.RV[0]=function(){eV.yF.call(this);this.EP={};var x="\t\t\tprecision mediump float;\t\t\t"+eV.ST.jY+"\t\t\t"+eV.ST.Aq+"\t\t\tuniform sampler2D source;\t\t\tuniform sampler2D map;\t\t\tuniform float toGray;\t\t\tuniform float presLum;\t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\tfloat olum = lum(src.rgb); \t\t\t\tsrc.rgb = toGray * vec3(olum) + (1.0-toGray)*src.rgb; \t\t\t\tfloat r = texture2D(map, vec2(src.r, 0)).r;\t\t\t\tfloat g = texture2D(map, vec2(src.g, 0)).g;\t\t\t\tfloat b = texture2D(map, vec2(src.b, 0)).b;\t\t\t\tvec3 col = vec3(r,g,b); \t\t\t\tif(presLum==1.0) { \t\t\t\t\tfloat nlum = lum(col); \t\t\t\t\tif(olum>nlum) col += (olum-nlum)/(1.0-nlum)*(ONE3-col); \t\t\t\t\telse if(nlum==0.0) col = ZERO3; \t\t\t\t\telse col = (olum/nlum) * col; \t\t\t\t}\t\t\t\tgl_FragColor = vec4(col,src.w);\t\t\t\t\t\t\t}";
this.bN(x,eV.wU.wk)};eV.RV[0].prototype=new eV.yF;eV.RV[0].prototype.dX=function(x,Q){var c={Z:Q.mX,r:Q.Cq,J:Q.iu,V:d.R(Q.mX.length)},$=c.Z.length;
if(this.EP["m"+$]==null){this.EP["m"+$]={ajk:new eV.PT($,1),AX:d.R($*4)}}var z=this.EP["m"+$];d.li(c,z.AX,0);
var j=z.ajk;j.set(z.AX);this.Oa(["source","map","toGray","presLum"]);var U=eV.Yt,i=this.q3;U.uniform1f(i.toGray,Q.cU?1:0);
U.uniform1f(i.presLum,Q.ky?1:0);this.t$([i.source,x,i.map,j.cm])};eV.RV[1]=function(){eV.yF.call(this);
this.aaz=new eV.PT(256,1);this.a4s=d.R(256*4);var x="\t\t\t\tprecision mediump float;\t\t\t\t"+eV.ST.XZ+"\t\t\t\t"+eV.ST.Zb+"\t\t\t\t"+eV.ST.qs+"\t\t\t\t\t\t\t\tuniform sampler2D source;\t\t\t\tuniform sampler2D map;\t\t\t\tuniform float cfa; \t\t\t\tuniform float cfb; \t\t\t\tuniform int colorize; \t\t\t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\t\t\tvoid main(void) { \t\t\t\t\tvec4 src = texture2D(source, sCoord);\t\t\t\t\tvec3 rgb = src.rgb;\t\t\t\t\tfloat mn=min(rgb.r,min(rgb.g,rgb.b)), mx = max(rgb.r,max(rgb.g,rgb.b));\t\t\t\t\t\t\t\t\t\tvec3 hsl = rgbToHsl(rgb); \t\t\t\t\tfloat h = hsl.r, s = hsl.g, l = hsl.b; \t\t\t\t\t\t\t\t\t\tvec4 mapv = texture2D(map, vec2(h, 0));\t\t\t\t\tfloat nh = mapv.r; \t\t\t\t\tfloat sc = mapv.g*2.0-1.0; \t\t\t\t\tfloat lc = mapv.b*2.0-1.0; \t\t\t\t\t\t\t\t\t\tfloat cf = -lc, tv=mn;\t\t\t\t\tif(0.0<lc) {  cf=lc;  tv=mx;  }\t\t\t\t\t\t\t\t\t\tfloat a0 = cfa + cfb*cf*tv, a1 = cfb*(1.0-cf);\t\t\t\t\trgb = a0 + a1 * rgb;\t\t\t\t\t\t\t\t\t\thsl = rgbToHsl(rgb);  s = hsl.g;  l = hsl.b; \t\t\t\t\tfloat ns = sc; \t\t\t\t\tif(colorize==0) {\t\t\t\t\t\tif(sc>0.0) sc = pow(tan((3.14159265359/2.0)*sc),1.3);\t\t\t\t\t\tns = min(s * (1.0 + sc), 1.0); \t\t\t\t\t} \t\t\t\t\t\t\t\t\t\tgl_FragColor = vec4(hslToRgb(nh,ns,l),src.w); \t\t\t\t\t\t\t\t\t}";
this.bN(x,eV.wU.wk)};eV.RV[1].prototype=new eV.yF;eV.RV[1].prototype.dX=function(x,Q){d.li({Z:Q.ajb,r:Q.WU,J:Q.aj0,V:d.R(256)},this.a4s);
this.aaz.set(this.a4s);this.Oa(["source","map","cfa","cfb","colorize"]);var c=eV.Yt,$=this.q3;c.uniform1f($.cfa,Q.aaC);
c.uniform1f($.cfb,Q.B_);c.uniform1i($.colorize,Q.abO);this.t$([$.source,x,$.map,this.aaz.cm])};eV.RV[2]=function(){eV.yF.call(this);
var x="\t\t\tprecision mediump float;\t\t\t"+eV.ST.XZ+"\t\t\t"+eV.ST.a$+"\t\t\t"+eV.ST.Us+"\t\t\t"+eV.ST.Zb+"\t\t\t"+eV.ST.qs+"\t\t\t"+eV.ST.aoa+"\t\t\t"+eV.ST.a8W+"\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform float vib; \t\t\tuniform float sat; \t\t\tuniform vec3  yF; \t\t\tconst float PI = 3.141592653; \t\t\t\t\t\tvarying vec2 sCoord;\t\t\tvec3 vibrate(vec3 rgb) {  \t\t\t\tvec3 yuv = rgbToYuv * rgb; \t\t\t\treturn yuvToRgb * (yuv * yF); \t\t\t} \t\t\t\t\t\tvoid main(void) { \t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\tvec3 rgb = src.rgb; \t\t\t\trgb = pow(rgb,vec3(2.4)); \t\t\t\t\t\t\t\trgb = clamp(vibrate(rgb), 0.0, 1.0); \t\t\t\t\t\t\t\trgb = pow(rgb,vec3(1.0/2.4)); \t\t\t\t\t\t\t\tvec3 hsl = rgbToHsl(rgb);  \t\t\t\tfloat nsat = max(0.0, min(1.0, hsl.y*(1.0+sat)));  \t\t\t\trgb = hslToRgb(hsl.x, nsat, hsl.z);  \t\t\t\t\t\t\t\tgl_FragColor = vec4(rgb,src.w); \t\t\t}";
this.bN(x,eV.wU.wk)};eV.RV[2].prototype=new eV.yF;eV.RV[2].prototype.dX=function(x,Q){this.Oa(["source","vib","sat","yF"]);
var c=eV.Yt,$=this.q3;c.uniform1f($.vib,Q.hF[0]);c.uniform1f($.sat,Q.hF[1]);c.uniform3fv($.yF,new Float32Array([Q.hF[2],Q.hF[3],Q.hF[3]]));
this.t$([$.source,x])};eV.RV[3]=function(){eV.yF.call(this);var x="\t\t\tprecision mediump float;\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform mat4  trf; \t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\tvoid main(void) { \t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\tvec4 nsr = vec4(src.rgb,1.0); \t\t\t\tgl_FragColor = vec4((trf*nsr).rgb,src.w); \t\t\t\t\t\t\t}";
this.bN(x,eV.wU.wk)};eV.RV[3].prototype=new eV.yF;eV.RV[3].prototype.dX=function(x,Q){this.Oa(["source","trf"]);
var c=eV.Yt,$=this.q3;c.uniformMatrix4fv($.trf,!1,new Float32Array(d.gg.Ny(Q.BS)));this.t$([$.source,x])};
eV.RV[4]=function(){eV.yF.call(this);var x="\t\t\tprecision mediump float; \t\t\t"+eV.ST.eC+"\t\t\t"+eV.ST.XZ+"\t\t\t"+eV.ST.qs+"\t\t\t"+eV.ST.Zb+"\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform vec3 mnm;\t  \t\t\tuniform vec3 mxm;\t  \t\t\tuniform vec3 shift;   \t\t\tuniform float lim;    \t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\tvoid main(void) { \t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\t\t\t\t\tvec3 lab = rgbToLab(src.rgb);\t\t\t\tfloat scl = labSimilar(lab, mnm,mxm, lim);\t\t\t\t\t\t\t\tvec3 hsv = rgbToHsl(src.rgb); \t\t\t\tfloat nh = 2.0 + hsv[0]+shift[0]; \t\t\t\thsv[0] = fract(nh); \t\t\t\thsv[1] = max(0.0, min(1.0, hsv[1] + shift[1])); \t\t\t\thsv[2] = max(0.0, min(1.0, hsv[2] + shift[2])); \t\t\t\t\t\t\t\tvec3 rgb = hslToRgb(hsv[0], hsv[1], hsv[2]); \t\t\t\t\t\t\t\tgl_FragColor = vec4(mix(src.rgb,rgb,scl),src.w); \t\t\t\t\t\t\t}";
this.bN(x,eV.wU.wk)};eV.RV[4].prototype=new eV.yF;eV.RV[4].prototype.dX=function(x,Q){this.Oa(["source","mnm","mxm","shift","lim"]);
var c=eV.Yt,$=this.q3;c.uniform3fv($.mnm,new Float32Array(Q.qH));c.uniform3fv($.mxm,new Float32Array(Q.L6));
c.uniform3fv($.shift,new Float32Array(Q.shift));c.uniform1f($.lim,Q.Ql);this.t$([$.source,x])};eV.RV[5]=function(){eV.yF.call(this);
var x="\t\t\tprecision mediump float;\t\t\t"+eV.ST.Aq+"\t\t\t"+eV.ST.vV+"\t\t\t"+eV.ST.ayG+"\t\t\t"+eV.ST.Zb+"\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform vec3 cfs[18]; \t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\tvoid main(void) { \t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\tvec3 rgb = src.rgb; \t\t\t\tvec3 hsl = rgbToHsl(rgb); \t\t\t\tfloat mx = max(rgb.r, max(rgb.g, rgb.b)); \t\t\t\tfloat mn = min(rgb.r, min(rgb.g, rgb.b)); \t\t\t\t\t\t\t\tvec3 CMY = ONE3 - rgb; \t\t\t\tvec3 d = ZERO3; \t\t\t\t\t\t\t\tfor(int j=0; j<9; j++) \t\t\t\t{ \t\t\t\t    vec3 NCMY = CMY * cfs[j+j] + cfs[j+j+1]; \t\t\t\t\t\t\t\t\t\tfloat cfK = 0.0;\t\t\t\t\tif     (j< 6) { \t\t\t\t\t\tcfK = hueCF(float(j)*(1.0/6.0), hsl.x); \t\t\t\t\t\tcfK = cfK * hsl.y * 2.0*min(hsl.z, 1.0-hsl.z); \t\t\t\t\t} \t\t\t\t\telse if(j==6) cfK = max(0.0,mn-0.5)*2.0;\t\t\t\t\telse if(j==7) cfK = 1.0-(abs(mx-0.5)+abs(mn-0.5));\t\t\t\t\telse          cfK = max(0.0,0.5-mx)*2.0;\t\t\t\t\t\t\t\t\t\td += (max(ZERO3, min(ONE3, NCMY))-CMY)*cfK; \t\t\t\t} \t\t\t\t\t\t\t\tCMY = max(ZERO3, min(ONE3, CMY+d)); \t\t\t\trgb = ONE3 - CMY; \t\t\t\t\t\t\t\tgl_FragColor = vec4(rgb,src.w); \t\t\t\t\t\t\t}";
this.bN(x,eV.wU.wk)};eV.RV[5].prototype=new eV.yF;eV.RV[5].prototype.dX=function(x,Q){this.Oa(["source","cfs"]);
var c=eV.Yt,$=this.q3;c.uniform3fv($.cfs,Q.amS);this.t$([$.source,x])};eV.RV[6]=function(){eV.yF.call(this);
var x="\t\t\tprecision mediump float;\t\t\t"+eV.ST.XZ+"\t\t\t"+eV.ST.vV+"\t\t\t"+eV.ST.ayG+"\t\t\t"+eV.ST.Zb+"\t\t\t"+eV.ST.qs+"\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform float wght[6]; \t\t\tuniform float prms[6]; \t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\tvoid main(void) { \t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\tvec3 rgb = src.rgb; \t\t\t\t\t\t\t\tfloat tint=prms[0], hue=prms[1], lum=prms[2], mcf=prms[3], x0=prms[4], x1=prms[5]; \t\t\t\tvec3 hsl = rgbToHsl(rgb); \t\t\t\t\t\t\t\tfloat cf = 0.0;\t\t\t\tfor(int j=0; j<6; j++) cf += min(1.0, 1.7*(1.0-hsl.z)) * hsl.y *  wght[j] * hueCF(hsl.x, float(j)*(1.0/6.0));\t\t\t\t\t\t\t\tfloat lig = max(0.0, min(1.0, hsl.z*(1.0+cf)));\t\t\t\tif(tint==1.0) {  \t\t\t\t\tfloat totl = 0.0;\t\t\t\t\tif     (lig<x0) totl = lig*(0.5/lum); \t\t\t\t\telse if(lig<x1) totl = lig + (mcf)*(0.5 - lum); \t\t\t\t\telse            totl = 1.0 - (1.0-lig)*0.5/(1.0-lum); \t\t\t\t\t\t\t\t\t\thsl.x = hue;  \t\t\t\t\thsl.y = min(1.0, mcf + 3.0*mcf*abs(lig-0.5*(x0+x1))); \t\t\t\t\thsl.z = totl; \t\t\t\t} \t\t\t\telse {  hsl.x=0.0;  hsl.y=0.0;  hsl.z=lig;  } \t\t\t\t\t\t\t\trgb = hslToRgb(hsl.x, hsl.y, hsl.z); \t\t\t\t\t\t\t\tgl_FragColor = vec4(rgb,src.w); \t\t\t\t\t\t\t}";
this.bN(x,eV.wU.wk)};eV.RV[6].prototype=new eV.yF;eV.RV[6].prototype.dX=function(x,Q){this.Oa(["source","wght","prms"]);
var c=eV.Yt,$=this.q3,z=[Q.OG,Q.arq,Q.jY,Q.ao9,Q.GX,Q.aeM];c.uniform1fv($.wght,new Float32Array(Q.aBd));
c.uniform1fv($.prms,new Float32Array(z));this.t$([$.source,x])};eV.RV[7]=function(){eV.yF.call(this);
this.zX={};var x="\t\t\tprecision mediump float;\t\t\t"+eV.ST.agj+"\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform sampler2D lut;\t\t\tuniform float N;\t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\tvoid main(void) { \t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\tvec4 rs = mapLut(src, lut, N); \t\t\t\tgl_FragColor = vec4(rs.rgb,src.w); \t\t\t\t\t\t\t}";
this.bN(x,eV.wU.wk)};eV.RV[7].prototype=new eV.yF;eV.RV[7].prototype.dX=function(x,Q){this.Oa(["source","lut","N"]);
var c=eV.Yt,$=this.q3,z=Q.sE,j=Q.aJ;if(this.zX["m"+z]==null)this.zX["m"+z]=new eV.PT(z,z*z);var U=this.zX["m"+z];
U.set(j);c.uniform1f($.N,z);this.t$([$.source,x,$.lut,U.cm]);c.activeTexture(c.TEXTURE1);var i=c.LINEAR;
c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,i);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,i);
c.activeTexture(c.TEXTURE0)};eV.filter={Jl:{},wk:"1u,/0*&<>2OI;<m^XJZ;]d/vp^r|ows/)z{M>5g7:@5nVPLIGeVMX`|njge-'&-$V&)/$BbHB4D%GNx`KSI=_f_menp%E+%vwKB4&'XQY``edhootpjxp&%*'vhxY{#>5HINMDXX]YnVW",abW:0,akK:1,WT:2,aDz:3,aB0:4,a7Q:5,W7:6,ahP:7};
eV.filter.NP=function(x,Q){var c=eV.filter,$,z=x.type+":"+(x.Zz?x.Zz.join(","):""),$=eV.filter.Jl[z];
if($==null)$=eV.filter.Jl[z]=new eV.Jl[x.type](x.Zz);$.z3();$.dX(Q,x);eV.Yt.drawArrays(eV.Yt.TRIANGLES,0,6)};
eV.Jl=[0,0,0,0,0,0,0,0,0,0,0,0];eV.Jl[7]=function(){eV.yF.call(this);var x="1%* !*709;O;?@DOaKTZOe/lhffrxv,#s#)($4VkJA@II=BzXTRR^dbwqcd6's%xN,(&&286K5>D9O]LIYXH)P1o]q{nvr.(yzL=4f69?4mLHECaRIT\\xjfca)~|noC2).)[8*+^U`_felkrn$R[aVlzaoxD:;@N|)/G)28-CQNtjkp~`&*#!&4u*-.(q}$<}'-\"8FBi_`esTz~wuz)i~\"#xvhi=,r~(U0$:9==3bw^MLUUINwne8gjpe/}opB;/FMMRQBX__d`dGXLo%P\\e$kca,Bkw!?uR.3.CQf0<E_DAQP@QYbxm!-+0.~2iJ0).)L4,*YjDIDg>zJRH2aS\\;jjpvD}#}N4";
this.bN(jk.MB(x),jk.MB(eV.filter.wk))};eV.Jl[7].prototype=new eV.yF;eV.Jl[7].prototype.dX=function(x,Q){this.Oa(["source","iwh","kern"]);
var c=eV.Yt,$=this.q3;c.uniform2fv($.iwh,Q.d$);c.uniform1fv($.kern,Q.a1$);this.t$([$.source,x])};eV.Jl[6]=function(x){eV.yF.call(this);
var Q=x[0],c=x[1],$=x[2],z="1%* !*709;O;?@DOaKTZOe/lhffrxv,#s#)($4VkJA@II=BzXTRR^dbwqcd6's%xN,(&&286K5>D9O]SEK%cQeobjf\"{mn@1(Z*-3(a@<97UF=HPl^ZWU|rpbc7&|\"|O,}~RITSZY`_fbwFOUJ`nUcl8./4Bp|#;|&,!7EAh[\"'zuV|!7<0+k!$%zkk0$J>'x~:=<d<.4[U<KMVNV`S,j\\]1 fr{I$w.-11'VkRA@II=BkbY,[^dY#qcd6/NVb<@#4(K`,8A_G?=g}GS\\zQ.ini~-Bkw!Lw&/HK^D=B=ar<JS|X]X{c[Y):sxs7mJy\"wa1#,j::@FsMRM}c",j=jk.MB(z);
j=j.replaceAll("PRC",$+".0");j=j.replaceAll("DIR",["x,0","0,x"][c]);this.bN(j,eV.wU.wk)};eV.Jl[6].prototype=new eV.yF;
eV.Jl[6].prototype.dX=function(x,Q){this.Oa(["source","iwh","rad"]);var c=eV.Yt,$=this.q3;c.uniform2fv($.iwh,Q.d$);
c.uniform1f($.rad,Q.Ui);this.t$([$.source,x])};eV.Jl[4]=function(x){eV.yF.call(this);var Q=x[0],c=x[1],$="\t\t\tprecision highp float;\t\t\tuniform sampler2D source;\t\t\tuniform vec2 iwh;\t\t\tuniform float rrad;\t\t\tuniform float tr;\t\t\t\t\t\tvarying vec2 sCoord;\t\t\tconst float PRC="+x[2]+".0; \t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 sclr = texture2D(source, sCoord);\t\t\t\tfloat rad = rrad; \t\t\t\tif(rad!=0.0) {\t\t\t\t\tvec4 sum=vec4("+["1.0,1.0,1.0,0.0","0.0,0.0,0.0,1.0","0.0"][c]+"); vec4 cnt = vec4(0.0);\t\t\t\t\tfor(float y=-PRC; y<=PRC; y++) {\t\t\t\t\t\tif(y<-rad || y>rad) continue; \t\t\t\t\t\tfor(float x=-PRC; x<=PRC; x++) { \t\t\t\t\t\t\tif("+["x<-rad || x>rad","(x*x+y*y)>rad*rad"][Q]+") continue; \t\t\t\t\t\t\tvec4 clr = texture2D(source, sCoord+vec2(x,y)*iwh);  \t\t\t\t\t\t\t"+["if(clr.w!=0.0) sum.rgb=min(sum.rgb,clr.rgb);  sum.w=max(sum.w,clr.w)","sum.rgb=max(sum.rgb,clr.rgb);  sum.w=min(sum.w,clr.w)","if(abs(sclr.r-clr.r)<tr) {  sum.r+=clr.r;  cnt.r+=1.0;  };"+"if(abs(sclr.g-clr.g)<tr) {  sum.g+=clr.g;  cnt.g+=1.0;  };"+"if(abs(sclr.b-clr.b)<tr) {  sum.b+=clr.b;  cnt.b+=1.0;  };"][c]+"; \t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\tsclr = "+(c==2?"vec4(sum.rgb/cnt.rgb, sclr.w)":"sum")+";\t\t\t\t}\t\t\t\tgl_FragColor=sclr; \t\t\t}";
this.bN($,eV.wU.wk)};eV.Jl[4].prototype=new eV.yF;eV.Jl[4].prototype.dX=function(x,Q){this.Oa(["source","iwh","rrad","tr"]);
var c=eV.Yt,$=this.q3;c.uniform2fv($.iwh,Q.d$);c.uniform1f($.rrad,Q.x$);c.uniform1f($.tr,Q.ame);this.t$([$.source,x]);
var z=c.LINEAR;z=c.NEAREST;c.activeTexture(c.TEXTURE0);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,z);
c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,z);c.activeTexture(c.TEXTURE0)};eV.Jl[5]=function(){eV.yF.call(this);
var x="1%* !*709;O;?@DOaKTZOe/lhffrxv,#s#)($4VkJA@II=BzXTRR^dbwn_ntso BW6-050`>:88DJH]WIJ{lYj^4qmkkw}{1z$*~5C(7;DmKGEEQWUjT]cXn|egmoG&s(2%-)D>01bSJ|LOUJ$O^`hlzdmsh~-bPKGLZ9520N?6AIeWSPNuki[\\0~qht}K(yzNEPQVRg6?E:P^YX]X+!\"'5sef:)xQO*}4377-\\qXGJOJkbY,[^dY!6dpv/py t+96\\OwcEjn'rThklbP\\bz\\ek`v%!H;cO0VZr^?TWXNL>?paSK(a4cfla+ykl>7+A2DH+<0eD67jYAS ZNdcgg]-B)wz z<3%|EL/gc2;A6LZ#}HV^tTf ]o+\"{mnB9DEKOUOVW^d^efpjrrwsv,Zci^t#}pIt+&@HcKLXZ]^cVd\\gssxxP_cl$()55::q!%.EISUX[^_d`cxXW\\Wlz0m`7neqz+9N,~D2&<;??5dy`ONWWKPypbZ#8}!mukU%v ^..4:g;:L^I@LUt`_d_!wocyx||rBW>-,55).WNEwGJPElriRTZ\\\"7|";
this.bN(jk.MB(x),jk.MB(eV.filter.wk))};eV.Jl[5].prototype=new eV.yF;eV.Jl[5].prototype.dX=function(x,Q){this.Oa(["source","ssum","iwh","amnt","edgf"]);
var c=eV.Yt,$=this.q3;c.uniform2fv($.iwh,Q.d$);c.uniform1f($.amnt,Q.azQ);c.uniform1f($.edgf,Q.adt);this.t$([$.source,x,$.ssum,Q.azY])};
eV.Jl[3]=function(){eV.yF.call(this);var x="1%* !*709;O@;=ETOUgQZ`Uk5rnllx~|2)y)/.*:\\qPGFOOCH!^ZXXdjh}wij<-y+~T2.,,8><Q;DJ?Uc[NR`.kgeeqwu+t}$x/=36(.gEA??KQOd^PQ#sjjbc>{wuu\"(&;5'(ZJ<@=JtRNLLX^\\qbYo2!tvv'@N,(&&286K<3IkZNPP`z(fThremi%~pqC4+]-06+d/?BBXEM2TTdugYZ.|v,\" qrF5)X,#=OAWACCSlkYoY[[k&!6pfx||{0!w2D-$>P<\\J`HhWioTKewc$s(o0|14JNDEJX>:,-_OE7G@qi[MN!pdo&|vhi<, ,>42$%WG=/H*8FySLTp\\g{&))4:;7CC;$0CSRPXZ_cg]Wd]quw~$}'-/50=wm $$#7-~8y(6L\\R<EKNTlZLeGUc#8}ykl?/yv./QI;-.`PDOe\\VHI{k_k}smcuyyx-8&w(!RJ6AW?K]bM?OHyq}}%'#lw.66B8\".@E0\"2+\\Tb`fbLXmxu\"wal %oaqj<4?@KOE/;PWXea]GRe_owv{nz~))3<\"}opC3,(&&UM?12dTHSi`ZLM oco\"wqgy}}|1'x)\"SK7BX@L^bmlqqxx},qZiksw&ox~s*8kpda^Z[`nMIFDbSJU]ykgdb* }opD3*|)2_:.DCGG=l\"hWV__SX\"xoBqtzo7Lz$*~5C+/=D;r:>RiYLP^}gZfo.z/Dr{\"v-;1#)d/3AH?cORDJ$UUygY_~>45:6,*{|O?6;6f5>D9O]T[$yz ~ubjb?66;Iw$*B$-3(>LIob).\"|^$(>C72s(+,\"rzrOFFKK+3+e77[PuiRDJehh0gY_'!gvx\"y\",~W&28P2;A6LZV}p7<0+k26LQE@!6KCBGC9'06+AO6NuTiKSK&WW{o6*rdj&)(P(y GA(79B:BL?wIImiU]Bddt&wij>5s,B3H2$*T[\\a]`c]DSU^V^h[4rde9(nz$Q, 6599/^sZIHQQEJsja4cfla+ykl>7u.D5GK.?3Vk:CI>TbIM)PTh obft4my#A.BW&/5*@N3K?wmnvpMYb!h$,-7>2nz$B~EMNTWS0<Ec;vENTI_mWfZ7pphi7%9uyB~#\\..R/G;tMMEFsbtnUaj)phfD2>>CC /#KO,8A_G?=]kcM\\Pyi[\\/'9384Iw!'{2@49>iW6:t@DRYPj-p{~^bpwn6os;D|!/6-PJgP[:>y|rsx+~ %2#ae1ko}%{?H $KNc2;A6LZAX!ww||chm7ry0En&L(-(H]'>S0<EcKCA|beywX`V@oajIxx~%R\"*n11ARD67jaippus_2adj_,y.98=<@GGLJ6h8;A6bQdonsrzx {~8rde90<:B@HFNI]=/0cZedkjqpxs)z#vm`luC qrF=,1,P8?V^^c_tZVHI{k_S2n`a4,zM| &zG5K6h8;A6bQfontp]0_bh]*w+@~pqD4(|Z7)*\\TCuEHNCo^s}{#',$pCru{p=+AJIQK8j:=C8dSezYKL~n`dk`;osp};*PSIJOBdHA=;;jbNBoWLuo-u`]tu80{o=%yCX**N8<9FcSx{rrwsm_cj_+x@tx t@/U*.5*UEhD7CLjRJHhv,yY]kri.uyv$A/BF.29.f6>4}M?H'VV\\b0i\\hq=#";
this.bN(jk.MB(x),jk.MB(eV.filter.wk))};eV.Jl[3].prototype=new eV.yF;eV.Jl[3].prototype.dX=function(x,Q){this.Oa("source iwh tdep rrad spec nois poly0 poly1".split(" "));
var c=eV.Yt,$=this.q3;c.uniform2fv($.iwh,Q.d$);c.uniform1f($.tdep,Q.ah3);c.uniform1f($.rrad,Q.x$);c.uniform2fv($.spec,Q.a73);
c.uniform3fv($.nois,Q.aoS);c.uniformMatrix4fv($.poly0,!1,Q.a5u);c.uniformMatrix4fv($.poly1,!1,Q.anV);
this.t$([$.source,x]);var z=c.LINEAR;c.activeTexture(c.TEXTURE0);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,z);
c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,z);c.activeTexture(c.TEXTURE0)};eV.Jl[0]=function(){eV.yF.call(this);
var x="1%* !*709;O@;=ETOUgQZ`Uk5|uqoo{\" 5,|,21-=_tSJIRRFK$kd`^^jpn$}opB3 1%ZB;755AGEZTFGyiYT.unjhhtzx.w!'{2@7/3;5mUO=Q[NVRmgYZ,|sFux~sM5~(.#9G23E'?;AOZm_QR$th$}|$mv|q(62M?_E=1GFJJ@o%kZYbbV[%{o-{mn@9AHHMLCVW\\X\\?PDgo\\#jT]cXn|x5&F,$w.-11'VkRA@II=BkbVsbTU' z//43*=>C?C&7+NVCiQ;DJ?Uc`zl-rj^tswwm=R9('00$)RI=ZI;<mfatuzy}%%*&*l}q5=*P8\"+1&<JGbSsYQE[Z^^T$9 nmvvjo90$A0\"#TMH[\\a`WkkplpSdX{$p7~hqwl#1x0J=]CVWc[R:Qm^~doc }l(#8 irxm$2y2L>^DWXd\\S;Sn_ epe!~n)$9!zlm@0\"6V<.286-;;O=bTFGyqyTk(#`x31(8r*DA~7ROF.E_\\:Rlgj g]Seiih|drz1xs>$AV>?D>:75SD;FNj\\XUSztszdmsh~-({6V<PPUHVN9:L.FBHVatc6ehnc+/{sw yR:%-#l<.7uEEKQa\"g_Sihllb2G.|{%%x}G>5g7:@5\\`QEzbc";
this.bN(jk.MB(x),jk.MB(eV.filter.wk))};eV.Jl[0].prototype=new eV.yF;eV.Jl[0].prototype.dX=function(x,Q){this.Oa(["source","iwh","ld","shine"]);
var c=eV.Yt,$=this.q3;c.uniform2fv($.iwh,Q.d$);c.uniform3fv($.ld,Q.a5Y);c.uniform1f($.shine,Q.amd);this.t$([$.source,x,$.tang,Q.t7])};
eV.Jl[1]=function(){eV.yF.call(this);var x="1%* !*709;O@;=ETOUgQZ`Uk5|uqoo{\" 5,|,21-=_tSJIRRFK$kd`^^jpn$}opB3 1%ZB;755AGEZDMSH^lYfY4{tpnnz!~4}'-\"8F,?9FJEAya[I]gZb^ysef8) R\"%+ YA+4:/ES?;PHjLU[Pfths*!jsyn%3'3E?>E/8>3IWM?X:HVl-ribj'r}2<??JPQMYYQ:FYihfnpuy}smzs(,.5:4=CEKFS;1'9==<PF8Q3AOeukU^dgm&se~`n|<Q9:?)28-CQ<=O,PMZOtfXY+{n+%$+%vwI:.@`FQ<ZI;<mfwuzx}|%(1+0,/3u#uP82$%VG9>PpV@IORXp\\w-tn`a3$u|]0P6*I.3`H2;A6LZQqt$]V^z'**/+@(\"stF7}M@`F-<CZDIdhUux&mgYZ,|c4&F,r\")@*/L;-._Xddihppuqtxe&)6}gpvk\"0\"6V<($91S2abPfApq`r(oYbh]s\"sz+K1|x.&H'WWE[6efUg|dNW]Rhvha @&qm#z={KL:P+[[J\\qYCLRG]k]dYw8}iezr5sDD2H#SSBTiQ;DJ?UcOzl-rcbt'p%4+|$@&-mN<OdL6?E:P^Jvg(m^]o\"kd/t{p;!(hI7J_G1:@5KYS_ eVUgy])'}i63x `A0BW?9EeKVHTsZmnxoi,o#$)6005C+t}$x/=373>LlRLXf^DWQ^b]Yv$|hdyq4r\")@,L:MQ>^a_:IPgSsbtxe&)$9!vl~##\"6,0,7OP\\\\acjhmi~fglfb_]{lcnv3%!}{C=<C=/0aRNR[{aX+Z]cX&cth>& qrF5{++AaG?3IHLLBq'm\\[ddX]'}tGvy t<Q9 //S*KkQ<=O,PMZOthl~4{fndN}oxW''-3CcI0??pXY";
this.bN(jk.MB(x),jk.MB(eV.filter.wk))};eV.Jl[1].prototype=new eV.yF;eV.Jl[1].prototype.dX=function(x,Q){this.Oa(["source","iwh","isc","bristle"]);
var c=eV.Yt,$=this.q3;c.uniform2fv($.iwh,Q.d$);c.uniform1f($.isc,Q.abX);c.uniform1f($.bristle,Q.aed);
this.t$([$.source,x])};eV.Jl[2]=function(){eV.yF.call(this);var x="1%* !*709;O@;=ETOUgQZ`Uk5|uqoo{\" 5,|,21-=_tSJIRRFK$kd`^^jpn$zkz! {,NcB:*:6lTMIGGSYWlfXY+{hymC+$ }}*0.C-6<1GULEFOF#jc_]]iom#lu{p'5}4/1_GA/CM@HD_YKL}ne8gjpe?'py t+94%,-1@NY;DJ?Uc_rlkrh^ptts(p'\"<7G.0;NBX5KFHdmivuzwd]^g^*vopyp;5AV>?D>:75SD;FNj\\XUSztszdmsh~-x+S-&'0'S?89B9u]GPVKaofmx9~338F.(yzN=494IiOG;QPTTJy/udcll`e/&|O~\"(|DYA;-._P:GYy_tsxuvfZpossi9N5%t%!H?6h8;A6]eSWmZLM~w#$.(/0:14I1+|}O@(FfL6CpXBNTlQYbp]4*8 lB;G/{@CD>=D>01bSGYy_V)X[aV0wams,mv|q(6,YOPUcKAmfgjmns\"i_z}~xw~xjk=.~x7W=RQVSTD8NMQQGv,rbRb^&|p,4\"&<)z{MFQR\\V]^h_bw_LLpP^f|e_*e-C:;@<65<-'bU93lTUZB`!fWQ+rfx'<\"rl5w)|R:$-3(>LGRrXSDKLP_uc|2ypup&4I/*?-!76::0_t[JIRRFKtk_z0wnu,A~E-yy>,Z\\+=QK1D:9Fx`afN*|Yf4{|\"ltjT$u~]--39IiOFKFefrrwyah|2yz";
this.bN(jk.MB(x),jk.MB(eV.filter.wk))};eV.Jl[2].prototype=new eV.yF;eV.Jl[2].prototype.dX=function(x,Q){this.Oa(["source","tang","iwh","sigma","expo"]);
var c=eV.Yt,$=this.q3;c.uniform2fv($.iwh,Q.d$);c.uniform1f($.sigma,Q.a2y);c.uniform1f($.expo,Q.aD3);
this.t$([$.source,x,$.tang,Q.t7]);var z=c.LINEAR;c.activeTexture(c.TEXTURE0);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,z);
c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,z);c.activeTexture(c.TEXTURE0)};function d(){}d.X={};
d.aE4={};d.apL=function(){var x=[64,64,128,256,512,1024,2048],Q=[];for(var F=0;F<x.length;F++){var c=x[F],$=document.createElement("canvas");
$.width=c;$.height=c;Q.push($.getContext("2d",{willReadFrequently:!0}))}return Q}();d.nc=function(x,Q){var c,$=d.apL,F=1,z=Math.max(x,Q);
while(F<$.length&&z>$[F].canvas.width)F++;if(F==$.length){c=$[0];var j=c.canvas;j.width=x;j.height=Q}else{c=$[F];
c.clearRect(0,0,x,Q)}return c};d.l8=function(x,Q,c){var $=new Uint32Array(Q*c);$[0]=x[0];for(var z=1;
z<Q;z++)$[z]=$[z-1]+x[z];for(var j=1;j<c;j++){var F=j*Q;$[F]=$[F-Q]+x[F];for(var z=1;z<Q;z++)$[F+z]=x[F+z]+$[F+z-1]+$[F+z-Q]-$[F+z-Q-1]}return $};
d.WA=function(x,Q,c,$,z,j){var U=(z-1)*Q,i=j*Q;return x[i+$]-x[i+c-1]-x[U+$]+x[U+c-1]};d.dJ=function(x,Q,c){var $={},z=0,j=0,U=new Uint32Array(x.buffer),i=U.length,b=Date.now();
for(var e=1;e<c-1;e++)for(var k=1;k<Q-1;k++){var K=e*Q+k,g=U[K];if(g>>>24<230)j++;if($[g]==null){$[g]=!0;
z++}}if(j!=0||z<20)return!1;return!0};d.ma=function(x,Q,c,$,z,j){if(z==null)z=j=0;$=Math.log($)/Math.log(2);
$=Math.round($);var U=new Uint32Array(x.buffer);for(var F=0;F<c;F++)for(var i=0;i<Q;i++){U[F*Q+i]=d.ai5(F+j,i+z,$)}};
d.azG=function(F,x,Q){return 255-((F>>>Q)+(x>>>Q)&1)*51};d.ai5=function(F,x,Q){return 4294967295-((F>>>Q)+(x>>>Q)&1)*3355443};
d.RD=function(x,Q){var c=Q==null?1:Q/255;return{Z:(x>>>16&255)*c,r:(x>>>8&255)*c,J:(x&255)*c}};d.SD=function(x,Q){var c=Q==null?1:255/Q;
return Math.round(x.Z*c)<<16|Math.round(x.r*c)<<8|Math.round(x.J*c)};d.vg=function(x){var Q=x.toString(16);
while(Q.length<6)Q="0"+Q;return Q};d.az4=function(x){return parseInt(x,16)};d.jY=function(x){return.3*x.Z+.59*x.r+.11*x.J};
d.kI=function(x){return Math.max(x.Z,x.r,x.J)-Math.min(x.Z,x.r,x.J)};d.I5=function(x,Q,c){return.3*x+.59*Q+.11*c};
d.aaI=function(x,Q,c){return Math.max(x,Q,c)-Math.min(x,Q,c)};d.vV=function(x,Q){var c=Q-x,$=Math.abs(c),z=c-1,j=c+1;
if(Math.abs(z)<$)c=z;else if(Math.abs(j)<$)c=j;return c};d.Yw=function(x){return x<.0031308?12.92*x:1.055*Math.pow(x,1/2.4)-.055};
d.t9=function(x){return x<.04045?x/12.92:Math.pow((x+.055)/1.055,2.4)};d.aBl=function(x,Q){var c=Math.min(x.length,Q.length);
for(var F=0;F<c;F+=4){var $=x[F],z=x[F+1],j=x[F+2];Q[F]=16+Math.floor(65.481/255*$+128.553/255*z+24.966/255*j+.5);
Q[F+1]=128-Math.floor(37.797/255*$-74.203/255*z+112/255*j+.5);Q[F+2]=128+Math.floor(112/255*$-93.786/255*z-18.214/255*j+.5);
Q[F+3]=x[F+3]}};d.aks=function(x,Q,c){var $,z,j,U=Math.max(x,Q,c),i=Math.min(x,Q,c);j=U;if(U!=0)z=(U-i)/U;
else z=0;if(z==0)$=0;else{var b=U-i,e=(U-x)/b,k=(U-Q)/b,K=(U-c)/b;if(x==U)$=K-k;else if(Q==U)$=2+e-K;
else $=4+k-e;$*=1/6;if($<0)$=$+1}return{R0:$,ks:z,J:j}};d.aAL=function(x,Q,c){var $=0,z=0,j=0;if(Q==0)$=z=j=c;
else{var U=(x-Math.floor(x))*6,i=Math.floor(U),b=U-Math.floor(U),e=c*(1-Q),k=c*(1-Q*b),K=c*(1-Q*(1-b));
switch(i){case 0:$=c;z=K;j=e;break;case 1:$=k;z=c;j=e;break;case 2:$=e;z=c;j=K;break;case 3:$=e;z=k;
j=c;break;case 4:$=K;z=e;j=c;break;case 5:$=c;z=e;j=k;break}}return{Z:$,r:z,J:j}};d.Zb=function(x,Q,c){var $=Math.max(x,Q,c),z=Math.min(x,Q,c),j=0,U=0,i=($+z)*.5;
if($!=z){var b=$-z;U=i>.5?b/(2-($+z)):b/($+z);switch($){case x:j=(Q-c)/b+(Q<c?6:0);break;case Q:j=(c-x)/b+2;
break;case c:j=(x-Q)/b+4;break}j*=1/6}return{R0:j,ks:U,UZ:i}};d.qs=function(x,Q,c){var $,z,j;if(Q==0)$=z=j=c;
else{var U=c<.5?c*(1+Q):c+Q-c*Q,i=2*c-U;$=d.XZ(i,U,x+1/3);z=d.XZ(i,U,x);j=d.XZ(i,U,x-1/3)}return{Z:$,r:z,J:j}};
d.XZ=function(x,Q,c){if(c<0)c+=1;if(c>1)c-=1;if(c<1/6)return x+(Q-x)*6*c;if(c<1/2)return Q;if(c<2/3)return x+(Q-x)*(2/3-c)*6;
return x};d.a$=function(x,Q,c){var $=Math.max(x,Q,c),z=Math.min(x,Q,c),j,U,i=$,b=$-z;U=$==0?0:b/$;if($==z)j=0;
else{switch($){case x:j=(Q-c)/b+(Q<c?6:0);break;case Q:j=(c-x)/b+2;break;case c:j=(x-Q)/b+4;break}j*=1/6}return{R0:j,ks:U,_B:i}};
d.Us=function(x,Q,c){var $,z,j,F,U,i,b,e;F=Math.floor(x*6);U=x*6-F;i=c*(1-Q);b=c*(1-U*Q);e=c*(1-(1-U)*Q);
switch(F%6){case 0:$=c,z=e,j=i;break;case 1:$=b,z=c,j=i;break;case 2:$=i,z=c,j=e;break;case 3:$=i,z=b,j=c;
break;case 4:$=e,z=i,j=c;break;case 5:$=c,z=i,j=b;break}return{Z:$,r:z,J:j}};d.Jv=function(){var x=[],Q=[];
for(var F=0;F<8e3;F++){var c=F*(1/4e3);x[F]=d.t9(c);Q[F]=c>.008856?Math.pow(c,1/3):(903.3*c+16)*(1/116)}return[x,Q]}();
d.eC=function(x,Q,c,$){if($==null)$=[.9642,1,.8249];var z=d.Jv[0],j=d.Jv[1];x=z[~~(.5+x*(4e3/255))];
Q=z[~~(.5+Q*(4e3/255))];c=z[~~(.5+c*(4e3/255))];var U=d.gg.azZ,i=U[0]*x+U[1]*Q+U[2]*c,b=U[4]*x+U[5]*Q+U[6]*c,e=U[8]*x+U[9]*Q+U[10]*c;
i=i*(1/$[0]);b=b*(1/$[1]);e=e*(1/$[2]);return d.a0k(i,b,e)};d.a0k=function(x,Q,c){var $=d.Jv[1],z=$[~~(.5+x*4e3)],j=$[~~(.5+Q*4e3)],U=$[~~(.5+c*4e3)];
return{xv:116*j-16,V:500*(z-j),J:200*(j-U)}};d.Ay=function(x,Q,c){var $=903.3,z=.008856,j=(x+16)/116,U=j*j*j,i=j-c/200,b=i*i*i,e=Q/500+j,k=e*e*e,K=b>z?b:(116*i-16)/$,g=U>z?U:(116*j-16)/$,R=k>z?k:(116*e-16)/$,T=R*96.42,D=g*100,a=K*82.49,_=d.gg.V3(d.gg.PV,[T/100,D/100,a/100,0]);
for(var F=0;F<4;F++)_[F]=Math.max(0,Math.min(255,d.Yw(_[F])*255));return{Z:_[0],r:_[1],J:_[2]}};d.awB=function(x,Q,c,$,z){var j=x.xv,U=x.V,i=x.J,b=(j<Q.xv?Q.xv-j:c.xv<j?c.xv-j:0)*(1/100),e=(U<Q.V?Q.V-U:c.V<U?c.V-U:0)*(1/116),k=(i<Q.J?Q.J-i:c.J<i?c.J-i:0)*(1/116),K=Math.sqrt(b*b+e*e+k*k)*1.35;
return K<=$?Math.min(1,1.17*(1-K*z)):0};d.i2=function(x){var Q=d.N0("cmykToRgb"),c=Q[2],$=Q[3],z=[0,0,0,0];
ICC.U.applyLUT4Float($,c,x,z);return z};d.aD1=function(){var x=function(jF){return Math.round(jF*255)},Q="",c=3;
for(var F=0;F<tab.length;F++){var $=x(tab[F]);if(c<=F)$=$-x(tab[F-c])+256&255;Q+=$.toString(16).padStart(2,"0")}return Q};
d.N0=function(x){var Q=LUTS["_"+x];if(Q==null){var c=LUTS[x],$=c[0],jF=c[1],z=c[2],j=c[3],U=[];for(var F=0;
F<j.length;F+=2)U.push(parseInt(j.slice(F,F+2),16));for(var F=jF;F<U.length;F++)U[F]=U[F]+U[F-jF]&255;
for(var F=0;F<U.length;F++)U[F]*=1/255;Q=LUTS["_"+x]=[$,jF,z,U]}return Q};d.ru=function(x){var Q=d.N0("rgbToCmyk"),c=Q[2],$=Q[3],z=[0,0,0,0];
ICC.U.applyLUT3to4Float($,c,x,z);return z};d.auQ=function(x){for(var F=0;F<x.length;F+=4){var Q=[x[F+0]*(1/255),x[F+1]*(1/255),x[F+2]*(1/255)],c=d.ru(Q);
x[F+0]=255-Math.floor(.5+c[0]*255);x[F+1]=255-Math.floor(.5+c[1]*255);x[F+2]=255-Math.floor(.5+c[2]*255);
x[F+3]=255-Math.floor(.5+c[3]*255)}};d._8=function(x,Q,c){var $=x.length,z=.3,j=.59,U=.11;if(c){z=c[0];
j=c[1];U=c[2]}for(var F=0;F<$;F+=4)Q[F>>2]=~~(x[F+0]*z+x[F+1]*j+x[F+2]*U+.5)};d.ZM=function(x,Q){var c=Q.length;
for(var F=0;F<c;F+=4){var $=x[F>>>2];Q[F]=$;Q[F+1]=$;Q[F+2]=$}};d.li=function(x,Q){var c=x.V,$=x.Z,z=x.r,j=x.J,U=Math.min(x.V.length,Q.buffer.byteLength>>>2),i=4*Math.floor(U/4),b=new Uint32Array(Q.buffer),e=new Uint32Array(c.buffer),k=new Uint32Array($.buffer),K=new Uint32Array(z.buffer),g=new Uint32Array(j.buffer);
for(var F=0;F<i;F+=4){var R=e[F>>2],T=g[F>>2],D=K[F>>2],a=k[F>>2];b[F]=R<<24|(T&255)<<16|(D&255)<<8|a&255;
b[F+1]=(R&65280)<<16|(T&65280)<<8|D&65280|(a&65280)>>>8;b[F+2]=(R&16711680)<<8|T&16711680|(D&16711680)>>>8|(a&16711680)>>>16;
b[F+3]=R&4278190080|(T&4278190080)>>>8|(D&4278190080)>>>16|(a&4278190080)>>>24}for(var F=i;F<U;F++)b[F]=c[F]<<24|j[F]<<16|z[F]<<8|$[F]};
d.jy=function(x,Q){var c=Q.V,$=Q.Z,z=Q.r,j=Q.J,U=Math.min(Q.V.length,x.buffer.byteLength>>>2),i=4*Math.floor(U/4),b=new Uint32Array(x.buffer),e=new Uint32Array(c.buffer),k=new Uint32Array($.buffer),K=new Uint32Array(z.buffer),g=new Uint32Array(j.buffer);
for(var F=0;F<i;F+=4){var R=b[F],T=b[F+1],D=b[F+2],a=b[F+3];k[F>>2]=R&255|(T&255)<<8|(D&255)<<16|a<<24;
K[F>>2]=(R&65280)>>8|T&65280|(D&65280)<<8|(a&65280)<<16;g[F>>2]=(R&16711680)>>16|(T&16711680)>>8|D&16711680|(a&16711680)<<8;
e[F>>2]=R>>>24|T>>>24<<8|D>>>24<<16|a&4278190080}for(var F=i;F<U;F++){var _=b[F];$[F]=_>>0&255;z[F]=_>>8&255;
j[F]=_>>16&255;c[F]=_>>24&255}};d.GS=function(x,Q,c){var $=new Uint8Array(x.buffer),z=Math.min($.length/4,Q.length);
for(var F=0;F<z;F++){Q[F]=$[(F<<2)+c]}};d.Dm=function(x,Q,c){var $=new Uint8Array(Q.buffer),z=new Uint32Array(x.buffer),j=Math.min($.length/4,x.length),F=0;
while(F+4<j){var U=z[F>>>2];$[(F<<2)+c]=U&255;$[(F<<2)+c+4]=U>>>8&255;$[(F<<2)+c+8]=U>>>16&255;$[(F<<2)+c+12]=U>>>24;
F+=4}while(F<j){$[(F<<2)+c]=x[F];F++}};d.h4=function(x,Q,c){if(c==null)c=0;var $=new Uint32Array(x.buffer),z=$.length;
for(var F=0;F<z;F++)$[F]=$[F]&c|Q};d.apy=function(x,Q,c,$,z){if(z==null)z=0;var j=new Uint32Array(x.buffer);
c=c.y_(Q);var U=c.x-Q.x,i=c.y-Q.y,b=c.m,e=c.e,k=Q.m;for(var K=0;K<e;K++){var F=(i+K)*k+U;for(var g=0;
g<b;g++){j[F]=j[F]&z|$;F++}}};d.SO=function(x,Q){var c=Math.min(x.buffer.byteLength,Q.buffer.byteLength),$=c>>>2,x=new Uint32Array(x.buffer,0,$),Q=new Uint32Array(Q.buffer,0,$);
Q.set(x)};d.HM=function(x,Q){var c=x.buffer.byteLength,$=Q.buffer.byteLength,z=new Uint32Array(x.buffer,0,c>>2),j=new Uint32Array(Q.buffer,0,$>>2);
if(c!=$)return!1;var U=z.length;for(var F=0;F<U;F++)if(j[F]!=z[F])return!1;return!0};d.HQ=function(x){var Q=new Uint32Array(x.buffer),c=Q.length;
for(var F=0;F<c;F++)Q[F]=~Q[F]};d.a2p=function(x){var Q=x.length;for(var F=0;F<Q;F+=4){x[F]=~x[F];x[F+1]=~x[F+1];
x[F+2]=~x[F+2]}};d.aC6=function(x){var Q=x.length;for(var F=3;F<Q;F+=4)x[F]=~x[F]};d.a8P=function(x){return x+(x%4==0?0:4-x%4)};
d.R=function(x,Q){if(Q==null)Q=!1;if(!Q)x=d.a8P(x);try{var c=new Uint8Array(x)}catch(dQ){alert("Not enough RAM! (need "+Math.round(x/(1<<20))+" MB)",7e3);
throw"low_ram"}return c};d.a19=function(x,Q,c,$){if($==null)$=0;var z=0;while(z+3<x.length&&x[z+3].P()>=$&&Q.c0()*(1<<(z>>>1))<c)z+=2;
var j=x[1],U=x[z+1],i=new bI;i.translate(-j.x,-j.y);i.scale(j.m/U.m,j.e/U.e);i.translate(j.x,j.y);i.concat(Q);
return[z,i]};d.gk=function(x){var Q=x.length,c=x[Q-2],$=x[Q-1];while($.m>=2&&$.e>=2){var z=d.t1(c,$);
x.push(z.AX,z.rect);c=z.AX;$=z.rect}};d.t8=function(x){var Q=x.length,c=x[Q-2],$=x[Q-1];while($.m>=2&&$.e>=2){var z=d.hq(c,$);
x.push(z.AX,z.rect);c=z.AX;$=z.rect}};d.t1=function(x,Q,c){var $=Q.m,z=Q.e,j=$>>1,U=z>>1,i=new gh(Q.x,Q.y,j,U),b=c&&c.length==j*U*4?c:d.R(j*U*4),e=new Uint32Array(x.buffer),k=new Uint32Array(b.buffer);
for(var K=0;K<U;K++)for(var g=0;g<j;g++){var R=K*j+g,T=(K<<1)*$+(g<<1),D=e[T],a=e[T+1],_=e[T+$],I=e[T+$+1],f=D>>>24,y=a>>>24,Z=_>>>24,v=I>>>24,G=f+y+Z+v;
if(G==1020){var q=(D>>>0&255)+(a>>>0&255)+(_>>>0&255)+(I>>>0&255)+2>>>2,h=(D>>>8&255)+(a>>>8&255)+(_>>>8&255)+(I>>>8&255)+2>>>2,r=(D>>>16&255)+(a>>>16&255)+(_>>>16&255)+(I>>>16&255)+2>>>2;
k[R]=255<<24|r<<16|h<<8|q}else if(G==0)k[R]=0;else{var q=(D>>>0&255)*f+(a>>>0&255)*y+(_>>>0&255)*Z+(I>>>0&255)*v,h=(D>>>8&255)*f+(a>>>8&255)*y+(_>>>8&255)*Z+(I>>>8&255)*v,r=(D>>>16&255)*f+(a>>>16&255)*y+(_>>>16&255)*Z+(I>>>16&255)*v,H=1/G;
q=~~(q*H+.5);h=~~(h*H+.5);r=~~(r*H+.5);k[R]=G+2>>>2<<24|r<<16|h<<8|q}}return{rect:i,AX:b}};d.aej=function(x,Q,c){var $=Q.m,z=Q.e,j=$>>1,U=z>>1,i=new gh(Q.x,Q.y,j,U),b=c&&c.length==j*U*4?c:d.R(j*U*4),e=new Uint32Array(x.buffer),k=new Uint32Array(b.buffer);
for(var K=0;K<U;K++)for(var g=0;g<j;g++){var R=K*j+g,T=(K<<1)*$+(g<<1),D=e[T],a=e[T+1],_=e[T+$],I=e[T+$+1],f=2+(D>>>0&255)+(a>>>0&255)+(_>>>0&255)+(I>>>0&255)>>>2,y=2+(D>>>8&255)+(a>>>8&255)+(_>>>8&255)+(I>>>8&255)>>>2,Z=2+(D>>>16&255)+(a>>>16&255)+(_>>>16&255)+(I>>>16&255)>>>2,v=2+(D>>>24&255)+(a>>>24&255)+(_>>>24&255)+(I>>>24&255)>>>2;
k[R]=v<<24|Z<<16|y<<8|f}return{rect:i,AX:b}};d.aCk=function(x,Q,c){var $=Q.m,z=Q.e,j=2*Math.floor($/3),U=2*Math.floor(z/3),i=new gh(Q.x,Q.y,j,U),b=c&&c.length==j*U*4?c:d.R(j*U*4),e=new Uint32Array(x.buffer),k=new Uint32Array(b.buffer);
for(var K=0;K<U;K+=2)for(var g=0;g<j;g+=2){var R=K*j+g,T=(K*3>>>1)*$+(g*3>>>1),D=e[T],a=e[T+1],_=e[T+2],I=e[T+$],f=e[T+1+$],y=e[T+2+$],Z=e[T+$+$],v=e[T+1+$+$],G=e[T+2+$+$],q=D>>>24<<2,h=(D>>>16&255)*q,r=(D>>>8&255)*q,H=(D&255)*q,o=a>>>24<<1,P=(a>>>16&255)*o,O=(a>>>8&255)*o,p=(a&255)*o,C=_>>>24<<2,W=(_>>>16&255)*C,J=(_>>>8&255)*C,t=(_&255)*C,Y=I>>>24<<1,l=(I>>>16&255)*Y,m=(I>>>8&255)*Y,B=(I&255)*Y,L=f>>>24,A=(f>>>16&255)*L,S=(f>>>8&255)*L,M=(f&255)*L,N=y>>>24<<1,s=(y>>>16&255)*N,V=(y>>>8&255)*N,g8=(y&255)*N,n=Z>>>24<<2,cQ=(Z>>>16&255)*n,hk=(Z>>>8&255)*n,eG=(Z&255)*n,ie=v>>>24<<1,eN=(v>>>16&255)*ie,gr=(v>>>8&255)*ie,ek=(v&255)*ie,jK=G>>>24<<2,iE=(G>>>16&255)*jK,e9=(G>>>8&255)*jK,dm=(G&255)*jK,kD=q+o+Y+L,gJ=C+o+N+L,dR=n+ie+Y+L,fO=jK+ie+N+L,ko=kD==0?0:1/kD,d8=gJ==0?0:1/gJ,fj=dR==0?0:1/dR,ja=fO==0?0:1/fO,eD=0,d3=0,fP=0,jE=0;
eD=~~(.5+(H+p+B+M)*ko);d3=~~(.5+(r+O+m+S)*ko);fP=~~(.5+(h+P+l+A)*ko);jE=~~(.5+kD*(1/9));k[R]=jE<<24|fP<<16|d3<<8|eD;
eD=~~(.5+(t+p+g8+M)*d8);d3=~~(.5+(J+O+V+S)*d8);fP=~~(.5+(W+P+s+A)*d8);jE=~~(.5+gJ*(1/9));k[R+1]=jE<<24|fP<<16|d3<<8|eD;
eD=~~(.5+(eG+ek+B+M)*fj);d3=~~(.5+(hk+gr+m+S)*fj);fP=~~(.5+(cQ+eN+l+A)*fj);jE=~~(.5+dR*(1/9));k[R+j]=jE<<24|fP<<16|d3<<8|eD;
eD=~~(.5+(dm+ek+g8+M)*ja);d3=~~(.5+(e9+gr+V+S)*ja);fP=~~(.5+(iE+eN+s+A)*ja);jE=~~(.5+fO*(1/9));k[R+j+1]=jE<<24|fP<<16|d3<<8|eD}return{rect:i,AX:b}};
d.apa=function(x,Q,c){var $=Q.m,z=Q.e,j=2*Math.floor($/3),U=2*Math.floor(z/3),i=new gh(Q.x,Q.y,j,U),b=c&&c.length==j*U*4?c:d.R(j*U*4),e=new Uint32Array(x.buffer),k=new Uint32Array(b.buffer);
for(var K=0;K<U;K+=2)for(var g=0;g<j;g+=2){var R=K*j+g,T=(K*3>>>1)*$+(g*3>>>1),D=e[T],a=e[T+1],_=e[T+2],I=e[T+$],f=e[T+1+$],y=e[T+2+$],Z=e[T+$+$],v=e[T+1+$+$],G=e[T+2+$+$],q=(D>>>16&255)<<2,h=(D>>>8&255)<<2,r=(D&255)<<2,H=(a>>>16&255)<<1,o=(a>>>8&255)<<1,P=(a&255)<<1,O=(_>>>16&255)<<2,p=(_>>>8&255)<<2,C=(_&255)<<2,W=(I>>>16&255)<<1,J=(I>>>8&255)<<1,t=(I&255)<<1,Y=f>>>16&255,l=f>>>8&255,m=f&255,B=(y>>>16&255)<<1,L=(y>>>8&255)<<1,A=(y&255)<<1,S=(Z>>>16&255)<<2,M=(Z>>>8&255)<<2,N=(Z&255)<<2,s=(v>>>16&255)<<1,V=(v>>>8&255)<<1,g8=(v&255)<<1,n=(G>>>16&255)<<2,cQ=(G>>>8&255)<<2,hk=(G&255)<<2,eG=0,ie=0,eN=0;
eG=~~(.5+(r+P+t+m)*(1/9));ie=~~(.5+(h+o+J+l)*(1/9));eN=~~(.5+(q+H+W+Y)*(1/9));k[R]=255<<24|eN<<16|ie<<8|eG;
eG=~~(.5+(C+P+A+m)*(1/9));ie=~~(.5+(p+o+L+l)*(1/9));eN=~~(.5+(O+H+B+Y)*(1/9));k[R+1]=255<<24|eN<<16|ie<<8|eG;
eG=~~(.5+(N+g8+t+m)*(1/9));ie=~~(.5+(M+V+J+l)*(1/9));eN=~~(.5+(S+s+W+Y)*(1/9));k[R+j]=255<<24|eN<<16|ie<<8|eG;
eG=~~(.5+(hk+g8+A+m)*(1/9));ie=~~(.5+(cQ+V+L+l)*(1/9));eN=~~(.5+(n+s+B+Y)*(1/9));k[R+j+1]=255<<24|eN<<16|ie<<8|eG}return{rect:i,AX:b}};
d.Ty=function(x){var Q=255,c=x.length;c-=c&31;for(var F=3;F<c;F+=32)Q=Q&x[F]&x[F+4]&x[F+8]&x[F+12]&x[F+16]&x[F+20]&x[F+24]&x[F+28];
return Q!=255};d.$_=function(x,Q,c,$){var z=d.t1,j=d.aCk;if(!d.Ty(x)){z=d.aej;j=d.apa}var U={AX:x,rect:Q},i=d.iE(c);
for(var F=0;F<i.length;F++){if(i[F]==2)U=z(U.AX,U.rect,$);else U=j(U.AX,U.rect,$)}return U};d.af8=function(x,Q,c,$){var z=d.hq,j=d.anv,U={AX:x,rect:Q},i=d.iE(c);
for(var F=0;F<i.length;F++){if(i[F]==2)U=z(U.AX,U.rect,$);else U=j(U.AX,U.rect,$)}return U};d.iE=function(x){var Q=[],c=x;
while(c<.499){Q.push(2);c*=2}Q.push(c<.5001?2:3);return Q};d.hq=function(x,Q,c){var $=Q.m,z=Q.e,j=$>>1,U=z>>1,i=new gh(Q.x,Q.y,j,U);
if(x==null)return{rect:i};var b=c&&c.length>=j*U?c:d.R(j*U);for(var e=0;e<U;e++){var k=e*j;for(var K=0;
K<j;K++){var g=(e<<1)*$+(K<<1);b[k+K]=2+x[g]+x[g+1]+x[g+$]+x[g+$+1]>>>2}}return{rect:i,AX:b}};d.anv=function(x,Q,c){var $=Q.m,z=Q.e,j=2*Math.floor($/3),U=2*Math.floor(z/3),i=new gh(Q.x,Q.y,j,U);
if(x==null)return{rect:i};var b=c&&c.length>=j*U?c:d.R(j*U);for(var e=0;e<U;e+=2)for(var k=0;k<j;k+=2){var K=e*j+k,g=(e*3>>>1)*$+(k*3>>>1),R=x[g]<<2,T=x[g+1]<<1,D=x[g+2]<<2,a=x[g+$]<<1,_=x[g+1+$],I=x[g+2+$]<<1,f=x[g+$+$]<<2,y=x[g+1+$+$]<<1,Z=x[g+2+$+$]<<2;
b[K]=~~(.5+(R+T+a+_)*(1/9));b[K+1]=~~(.5+(D+T+I+_)*(1/9));b[K+j]=~~(.5+(f+y+a+_)*(1/9));b[K+j+1]=~~(.5+(Z+y+I+_)*(1/9))}return{rect:i,AX:b}};
d.aud=function(x,Q,c,$,z){var j=Q.y_($);if(z)j=j.y_(z);var U=Math.max(0,j.x-Q.x),i=Math.max(0,j.x-$.x),b=Math.max(0,j.y-Q.y),e=Math.max(0,j.y-$.y),k=j.m,K=j.e;
for(var F=0;F<K;F++){var g=(b+F)*Q.m+U,R=(e+F)*$.m+i;for(var T=0;T<k;T++){c[R+T]=Math.max(c[R+T],x[g+T])}}};
d.L2=function(x,Q,c,$,z){var j=Q.y_($);if(z)j=j.y_(z);var U=Math.max(0,j.x-Q.x),i=Math.max(0,j.x-$.x),b=Math.max(0,j.y-Q.y),e=Math.max(0,j.y-$.y),k=j.m,K=j.e;
for(var F=0;F<K;F++){var g=(b+F)*Q.m+U,R=(e+F)*$.m+i;c.set(new Uint8Array(x.buffer,g,k),R)}};d.a58=function(x,Q,c,$){if(Q.HM($)){d.Dm(x,c,3);
return}var z=Q.y_($),j=Math.max(0,z.x-Q.x),U=Math.max(0,z.x-$.x),i=Math.max(0,z.y-Q.y),b=Math.max(0,z.y-$.y),e=z.m,k=z.e;
for(var F=0;F<k;F++){var K=(i+F)*Q.m+j,g=(b+F)*$.m+U;for(var R=0;R<e;R++)c[(g+R<<2)+3]=x[K+R]}};d.df=function(x,Q,c,$){var z=Q.y_($),j=Math.max(0,z.x-Q.x),U=Math.max(0,z.x-$.x),i=Math.max(0,z.y-Q.y),b=Math.max(0,z.y-$.y),e=z.m,k=z.e;
for(var F=0;F<k;F++){var K=(i+F)*Q.m+j,g=(b+F)*$.m+U;for(var R=0;R<e;R++)c[g+R]=x[(K+R<<2)+3]}};d.WK=function(x,Q,c,$,z){if(Q.HM($)&&(z==null||z.HM($))){d.SO(x,c);
return}x=new Uint32Array(x.buffer),c=new Uint32Array(c.buffer);var j=Q.y_($);if(z)j=j.y_(z);var U=Math.max(0,j.x-Q.x),i=Math.max(0,j.x-$.x),b=Math.max(0,j.y-Q.y),e=Math.max(0,j.y-$.y),k=j.m,K=j.e,g=k&3,R=g==0?k:k-g;
for(var F=0;F<K;F++){var T=(b+F)*Q.m+U,D=(e+F)*$.m+i;c.set(new Uint32Array(x.buffer,T*4,k),D)}};d.zJ=function(x,Q,c,$){var z=Q.y_($),j=Math.max(0,z.x-Q.x),U=Math.max(0,z.x-$.x),i=Math.max(0,z.y-Q.y),b=Math.max(0,z.y-$.y),e=z.m,k=z.e,K=x.V,g=x.Z,R=x.r,T=x.J,D=c.V,a=c.Z,_=c.r,I=c.J;
for(var F=0;F<k;F++){var f=(i+F)*Q.m+j,y=(b+F)*$.m+U;for(var Z=0;Z<e;Z++){D[y+Z]=K[f+Z];a[y+Z]=g[f+Z];
_[y+Z]=R[f+Z];I[y+Z]=T[f+Z]}}};d.HO=function(x){var Q=x.length;for(var F=0;F<Q;F+=4){var c=x[F+3];if(c==255)continue;
x[F]=~~(x[F]*c*(1/255)+.5);x[F+1]=~~(x[F+1]*c*(1/255)+.5);x[F+2]=~~(x[F+2]*c*(1/255)+.5)}};d.mQ=function(x){var Q=x.length;
for(var F=0;F<Q;F+=4){var c=x[F+3];if(c==0||c==255)continue;var $=255/c;x[F]=~~(x[F]*$+.5);x[F+1]=~~(x[F+1]*$+.5);
x[F+2]=~~(x[F+2]*$+.5)}};d.Go=function(x,Q){for(var F=0;F<x.length;F++)if(x[F]!=Q)return!1;return!0};
d.P7=function(x){return x+1+(x>>>8)>>>8};d.round=function(x,Q){if(Q==null)Q=128;var c=x.length;for(var F=0;
F<c;F++)x[F]=x[F]<Q?0:255};d.AL=function(x,Q){var c=x.length;for(var F=0;F<c;F++)x[F]=Math.round(x[F]*Q)};
d.Tt=function(x,Q){var c=new Uint32Array(x.buffer),$=new Uint32Array(Q.buffer),z=c.length;for(var F=0;
F<z;F++){var j=c[F],U=$[F];$[F]=d.P7((j>>>24)*(U>>>24))<<24|d.P7((j>>>16&255)*(U>>>16&255))<<16|d.P7((j>>>8&255)*(U>>>8&255))<<8|d.P7((j&255)*(U&255))}};
d.nb=function(x,Q){var c=x.length;for(var F=0;F<c;F++)Q[(F<<2)+3]=d.P7(Q[(F<<2)+3]*x[F])};d.am9=function(x,Q,c,$){var z=Math.max(0,$.x-Q.x),j=Math.max(0,Q.x-$.x),U=Math.max(0,$.y-Q.y),i=Math.max(0,Q.y-$.y),b=Math.min(Q.x+Q.m,$.x+$.m)-Math.max(Q.x,$.x),e=Math.min(Q.y+Q.e,$.y+$.e)-Math.max(Q.y,$.y);
for(var F=0;F<e;F++){var k=(U+F)*Q.m+z,K=(i+F)*$.m+j;for(var g=0;g<b;g++){c[K]=d.P7(c[K]*x[k]);k++;K++}}};
d.Pp=function(x,Q,c,$){var z=Math.max(0,$.x-Q.x),j=Math.max(0,Q.x-$.x),U=Math.max(0,$.y-Q.y),i=Math.max(0,Q.y-$.y),b=Math.min(Q.x+Q.m,$.x+$.m)-Math.max(Q.x,$.x),e=Math.min(Q.y+Q.e,$.y+$.e)-Math.max(Q.y,$.y);
for(var F=0;F<e;F++){var k=(U+F)*Q.m+z,K=((i+F)*$.m+j<<2)+3;for(var g=0;g<b;g++){c[K]=d.P7(c[K]*x[k]);
k++;K+=4}}};d.$V=function(x,Q,c,$){var z=Math.max(0,$.x-Q.x),j=Math.max(0,Q.x-$.x),U=Math.max(0,$.y-Q.y),i=Math.max(0,Q.y-$.y),b=Math.min(Q.x+Q.m,$.x+$.m)-Math.max(Q.x,$.x),e=Math.min(Q.y+Q.e,$.y+$.e)-Math.max(Q.y,$.y);
for(var F=0;F<e;F++){var k=((U+F)*Q.m+z<<2)+3,K=((i+F)*$.m+j<<2)+3;for(var g=0;g<b;g++){c[K]=d.P7(c[K]*x[k]);
k+=4;K+=4}}};d.q9=function(x,Q){if(Q==null)Q=1;var c=4*Q,$=x.length>>>2,z=new Float64Array(256),j=new Float64Array(256),U=new Float64Array(256),i=new Float64Array(256),b=4*Math.floor($/Q)*Q,e=0;
for(var F=0;F<b;F+=c){var k=x[F+0],K=x[F+1],g=x[F+2],R=x[F+3]*Q,T=R*(1/255);j[k]+=T;U[K]+=T;i[g]+=T;
e+=R}for(var F=0;F<256;F++)z[F]=j[F]+U[F]+i[F];return[z,j,U,i,$,e/255]};d.a9K=function(x,Q){function c(v,G){var q=-1,h=0;
while(h<=G){q++;h+=v[q]}return q}function $(v,G){var q=256,h=0;while(h<=G){q--;h+=v[q]}return q}function z(v){var G=0,q=0;
for(var F=0;F<256;F++){q+=v[F];G+=v[F]*F*(1/255)}return G/q}var j=x[0],U=x[1]/100,i=x[2]/100,b=[],e=[];
for(var F=0;F<4;F++){var k=F==0?3:1;b[F]=c(Q[F],k*U*Q[5]);e[F]=$(Q[F],k*i*Q[5])}var K=[z(Q[1]),z(Q[2]),z(Q[3])],g=K.slice(0);
g.sort(function(v,G){return v-G});var R=K.indexOf(g[1]),T=(K[0]+K[1]+K[2])/3,D=[];for(var F=0;F<4;F++){var a=0,_=255,I=b[F],f=e[F];
if(j==0&&F==0){a=I;_=f}if(j==1&&F!=0){a=I;_=f}if(j==2&&F!=0){var k=K[F-1]/T;_=Math.max(0,Math.min(255,e[R]*k))}var y=[a,_];
D.push(y);if(j==3&&F==0){var Z=255*(1-T);y.push(Z)}}return D};d.ad5=function(x,Q){var c=new Uint32Array(x.buffer),$=c.length;
for(var F=0;F<$;F++){var z=c[F],j=z&255,U=z>>8&255,i=z>>16&255,b=z>>24&255;c[F]=Q[j]|Q[U]<<8|Q[i]<<16|Q[b]<<24}};
d.ajI=function(x,Q,c,$,z,j,U){var i=new Uint32Array(x.buffer),b=new Uint32Array(Q.buffer),e=i.length,k=0;
while(256<<k<c.length)k++;if(!U&&!j){for(var F=0;F!=e;F++){var K=i[F],g=(K&255)<<k,R=(K>>>8&255)<<k,T=(K>>>16&255)<<k,D=c[g],a=$[R],_=z[T];
b[F]=D|a<<8|_<<16|K&4278190080}return}for(var F=0;F<e;F++){var K=i[F],g=(K&255)<<k,R=(K>>>8&255)<<k,T=(K>>>16&255)<<k;
if(j)g=R=T=Math.round(g*.3+R*.59+T*.11);var D=c[g],a=$[R],_=z[T];if(U){var I=d.I5(g,R,T),f=d.I5(D,a,_);
if(I>f){var y=(I-f)/(255-f);D+=y*(255-D);a+=y*(255-a);_+=y*(255-_)}else if(f==0)D=a=_=0;else{var y=I/f;
D=y*D;a=y*a;_=y*_}}b[F]=D|a<<8|_<<16|K&4278190080}};d.qQ=function(x,Q){var c=Q.m,$=Q.e,top=0,z=0,j=0,U=0,i=0;
i=0;for(var b=0;b<$;b++){var e=b*c;for(var F=0;F<c;F++)i|=x[e+F];if(i!=0)break;top++}if(top==$)return new gh(0,0,0,0);
i=0;for(var b=$-1;b>=0;b--){var e=b*c;for(var F=0;F<c;F++)i|=x[e+F];if(i!=0)break;j++}var k=$-j;i=0;
for(var F=0;F<c;F++){for(var b=top;b<k;b++)i|=x[b*c+F];if(i!=0)break;z++}i=0;for(var F=c-1;F>=0;F--){for(var b=top;
b<k;b++)i|=x[b*c+F];if(i!=0)break;U++}var K=new gh(Q.x+z,Q.y+top,c-z-U,$-top-j);return K};d.kH=function(x,Q,c,$,z){if($==null)$=[!0,!0,!0,!0];
if(c==null)c=0;if(z==null)z=4294967295;var j=new Uint32Array(x.buffer),U=Q.m,i=Q.e,top=0,b=0,e=0,k=0,K=!1,g=[j[0],j[j.length-1],0][c];
K=!1;if($[0])for(var R=0;R<i;R++){var T=R*U;for(var F=0;F<U;F++)if(j[T+F]&z^g)K=!0;if(K)break;top++}K=!1;
if($[2])for(var R=i-1;R>=0;R--){var T=R*U;for(var F=0;F<U;F++)if(j[T+F]&z^g)K=!0;if(K)break;e++}K=!1;
if($[1])for(var F=0;F<U;F++){for(var R=0;R<i;R++)if(j[R*U+F]&z^g)K=!0;if(K)break;b++}K=!1;if($[3])for(var F=U-1;
F>=0;F--){for(var R=0;R<i;R++)if(j[R*U+F]&z^g)K=!0;if(K)break;k++}var D=new gh(Q.x+b,Q.y+top,U-b-k,i-top-e);
return D._6()?new gh(0,0,0,0):D};d.NK=function(x){var Q=d.qQ(x.channel,x.rect);if(Q.HM(x.rect))return;
var c=d.R(Q.P());d.L2(x.channel,x.rect,c,Q);x.channel=c;x.rect=Q};d.HT=function(x){var Q=d.kH(x.buffer,x.rect,2,null,4278190080);
if(Q.HM(x.rect))return;var c=new d.R(Q.P()*4);d.WK(x.buffer,x.rect,c,Q);x.buffer=c;x.rect=Q};d.extend=function(x,Q,c){if(x.rect.PC(Q))return;
var $=x.rect.iO(Q),z=d.R($.P());if(c!=null)z.fill(c);d.L2(x.channel,x.rect,z,$);x.rect=$;x.channel=z};
d.asG=function(x,Q){if(Q._6()||x.rect.PC(Q))return;var c=x.rect.iO(Q),$=d.R(c.P()*4);d.WK(x.buffer,x.rect,$,c);
x.rect=c;x.buffer=$};d.e$=function(x,Q,c){if(!c.Wl(x))return!1;var $=Math.floor(x.x)-c.x,z=Math.floor(x.y)-c.y,F=z*c.m+$;
return Q[F]>128};d.anO=function(x,Q,c){if(!c.Wl(x))return!1;var $=Math.floor(x.x)-c.x,z=Math.floor(x.y)-c.y,F=z*c.m+$;
return Q[4*F+3]>128};d.JB=function(x){if(d.ay.length<x){d.ay=d.R(x);d.ay.fill(255)}return d.ay};d.ay=d.R(0);
d.rB=function(x){if(d.cg.length<x)d.cg=d.R(x);return d.cg};d.cg=d.R(0);d.PT=function(x){this.V=d.R(x);
this.Z=d.R(x);this.r=d.R(x);this.J=d.R(x)};d.PT.prototype.clone=function(){var x=this.V.length,Q=new d.PT(1);
Q.V=this.V.slice(0);Q.Z=this.Z.slice(0);Q.r=this.r.slice(0);Q.J=this.J.slice(0);return Q};d.X.a74=function(x,Q,c,$,z){var j=z[0]+1,U=z[1],i=Math.abs(U-25)/4,b=z[2],e=b%2+b*b>>1,k=d.X.s;
k.bN(Q,c);var K=k.zA(1),g=k.zA(1),R=k.zA(1);k.N2(x,$,b,b,e);k.Gy($);k.xT($,K);k.p$(K,g,j,j,1);k.p$(K,R,j,j,j*j);
k.sub(R,g);k.Tt(g,i);(U<25?k.sub:k.add)(K,g);k.N4(g,$);k.wc($)};d.X.art=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);var U=z[0]*2.55,i=z[1],b=i>>1,e=z[2]*.25,k=j.zA(4),K=j.zA(1),g=j.zA(1);j.pk(x,k,i,1,!0,b);
j.pk(x,$,i,1,!1,b);j.nV(x,K);j.Xs(K,U);j.md(K,g,3);j.dY($,g,k);j.C5(k,$,e)};d.X.a5p=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);j.lv(z[3]);var U=z[0]*-3+80,i=z[1]*-3+80,b=z[2]/2+.5,e=z[4],k=z[5],K=j.zA(1),g=j.zA(1),R=j.zA(1),T=j.zA(1),D=j.zA(4),a=j.zA(4);
j.nV(x,K);j.SO(K,g);j.nl(K,i,5);j.aiC(K,.4,0);j.md(K,R,3);j.p4(R,K,9,3,!0,27);j.SO(g,R);j.HQ(R);var _=j.NT(U,5,R);
for(var F=0;F<j.bc;F++){g[F]=_[255-g[F]]}j.aiC(g,.4,0);j.SO(g,R);j.md(R,T,2);j.p4(T,R,5,3,!1,15);j.Tt(K,b);
j.Tt(R,b);j.YI($,2155905279);j.YI(a,e);j.YI(D,k);j.dY(a,K,$);j.dY(D,R,$)};d.X.azw=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);var U=new Uint8Array(256),i=5+10*z[1];i+=z[1]>3?(z[1]-3)*10:0;var b=~~(z[2]*.73)+50,e=Math.min(b+i,128),k=e-b,K=-255*b;
for(var F=0;F<256;F++){var g=F*65;U[F]=j.Uo(K/k);K+=255}var R=j.zA(1),T=j.zA(1),D=j.zA(1);j.nV(x,R);
j.SO(R,D);j.md(R,T,2*z[0]+1);j.sub(T,R);j.Tt(R,65);j.p4(R,T,9,3,!0,20);for(var F=0;F<j.bc;F++){var a=D[F],_=T[F];
R[F]=_>0?~~((_*a+(255-_)*128)/255):128}j.md(R,T,3);j.p4(T,R,15,2,!0,16);j.p4(T,D,15,2,!1,15);j.tx(R,D);
j.bu(D,T,2);j.rk(T,U);j.md(T,R,2);j.jt(R,$)};d.X.afw=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);var U=2*z[0]+1,i=j.aqO[z[1]],b=z[2]*5.1,e=z[3],k=j.zA(1),K=j.zA(1),g=j.zA(4),R=j.zA(4);
j.YI(g,e);j.Gy(g,$);j.aBW(k,b);j.N4(k,$);j.wc($,g);j.nV(x,K);j.md(K,k,U);j.sub(k,K);j.Tt(K,i);j.p4(K,k,9,3,!0,20);
j.dY(x,k,g);j.$n(g,$,3);j.pk($,g,15,2,!0,16);j.pk($,R,15,2,!1,16);j.tx(g,R);j.C5(R,$,2)};d.X.a5T=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);var U=(15-z[0])/4+1,i=(15-z[1])/4+1,b=z[2],e=z[3],k=j.wJ(z[4]),K=z[5]+1,g=z[6],R=z[7],T=z[8],D=j.zA(1),a=j.zA(1),_=j.zA(1),I=j.zA(1),f=j.zA(4),y=j.zA(4);
j.kR(_,b,e,g);j.nV(x,a);j.md(a,D,5);j.DZ(_,D,I,K,k);j.Tt(I,U);j.Tq(I,2);j.HQ(D);j.DZ(_,D,a,K,k);j.Tt(a,i);
j.Tq(a,2);j.YI(f,2155905279);j.YI(y,R);j.YI($,T);j.dY(f,a,y);j.dY(y,I,$)};d.X.auc=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);j.lv(z[3]);var U=z[0],i=z[1]/10,b=z[2]/10,e=j.zA(1),k=j.zA(1),K=j.zA(1),g=j._E(),R=j._E(),T=j._E();
j.Jx(e);j.md(e,k,11);j.md(k,e,11);j.KF(e,g);j.zv(x,e);j.SO(e,K);j.md(e,k,9);j.md(k,e,9);j.KF(e,R);j.kx(R,T,5);
j.kx(T,R,5);j.a0Z(g,.8);j.aA$(g,R,.8,.9);j.alT(R,e,U);j.p$(e,k,2,2,1);j.p$(k,e,2,2,3);j.p$(e,k,2,2,3);
j.p$(K,e,5,5,13);j.Ls(k,e,k,i);j.JN(e,k,k,b);j.DZ(k,k,e,5,1);j.Gy(x,$);j.N4(e,$);j.wc($)};d.X.alA=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);var U=z[0],i=z[1]/2,b=z[2],e=U/2,k=j.zA(4),K=j.zA(4);j.SO(x,$);for(var g=0;g<b;g++){j.pk($,k,U,1,!0,e);
j.pk($,K,U,1,!1,e);j.tx(K,k);j.$n(k,K,2);j.C5(K,$,i)}};d.X.aAG=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);
var U=z[0]*10,i=z[1]*4.9,b=z[2]*4.9,e=j.zA(1),k=j.zA(1),K=j.zA(4),g=j.zA(4);j.nV(x,e);j.Xs(e,j.aA2(e,U));
j.md(e,k,3);j.pk(x,K,5,1,!1,1);j.pk(x,$,15,2,!0,16);j.dY($,k,K);j.Gy(K,$);j.xT($,e);j.nl(e,i,b);j.N4(e,$);
j.wc($)};d.X.aqA=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);j.lv(z[4]);var U=z[0]/20,i=[0,.75,1,1.05,1.1,1.15,1.2,1.25,1.3,1.35,1.4,1.45,1.5,1.6,1.7,1.8,2,2.5,3,3.5,4][z[1]],b=[0,.25,.5,.75,.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,2.25,2.5,3,3.5,4][z[2]],e=z[3],k=new Int16Array(256);
for(var F=0;F<256;F++){k[F]=~~((F-128)*U)}var K=j.zA(1),g=j.zA(1),R=j.zA(4);j.nV(x,K);j.md(K,g,25);j.Tt(g,i);
j.Tq(g,b);j.md(g,K,25);j.Jx(g);j.azv(K,g,k);j.SO(x,$);j.YI(R,e);j.dY(R,K,$)};d.X.aAR=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);var U=z[0]+5,i=15-z[1],b=U*U/2,e=1-(3-z[2])/10,k=~~(i*i*e-1),K=~~(i*i*(1-e));if(K==0)K=1;var g=j.zA(1),R=j.zA(1),T=j.zA(1),D=j.zA(4);
j.nV(x,T);j.p$(T,g,U,U,b);j.md(T,R,U);j.sub(g,R);j.Xs(R,1);j.N2(x,D,i,i,k);j.N2(x,$,i,i,K);j.dY(D,R,$)};
d.X.azX=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);j.lv(z[3]);var U=(20-z[0])*.05,i=z[1]*-2.75+60,b=65-i,e=z[2]/10,k=j.zA(1),K=j.zA(1);
j.zv(x,K);var g=j.NT(i,b,K);j.Gy(x,$);j.xT($,K);j.Jx(k);j.v5(K,k,U);j.rk(K,g);j.Tt(K,z[2]/10);j.add(k,K);
j.N4(K,$);j.wc($)};d.X.acI=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);var U=5+z[0],i=15-z[1],b=z[2],e=U*U/2+U*U%2*1,k=1-(3-z[2])/10,K=~~(i*i*k-1),g=~~(i*i*(1-k));
if(g==0)g=1;var R=j.zA(1),T=j.zA(1),D=j.zA(1),a=j.zA(1),_=j.zA(1);j.zv(x,T);j.bu(T,R,3);j.p$(R,T,2,2,1);
var I=j.NT(20,20,T);j.rk(T,I);j.md(T,_,5);j.p$(_,R,U,U,e);j.p$(_,T,i,i,K);j.p$(_,D,i,i,g);j.md(_,a,U);
j.sub(R,a);j.Xs(a,1);j.asq(T,a,D);j.Gy(x,$);j.N4(D,$);j.wc($)};d.X.aDw=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);j.lv(z[5]);var U=j.bc,i=j.pf,b=z[0],e=z[1],k=z[2],K=z[3],g=z[4],R=.05*b+1,T=b/100,D=b>>1,a=2*b-100,_=+(e==9),I=+(e==7),f=[4,1][_],y=[3,2][_],Z=[1,2][I],v=[2,1][I],G=[50,75][_],q=e<4?k:(k>>1)+50,h=j.asb(G,q),r=j.hE(K),H=j.hE(g),o=j.zA(4),P=j.zA(4),O=j.zA(1),p=j.zA(1);
function C($,h){if(q!=50){j.as1($,h)}}function W(x,s){for(var F=0;F<U;F++){x[F]=j.Uo(x[F]+(s[F]-128)*T)}}function J(x,s){for(var F=0,V=0;
F<U;F++){x[V]=j.Uo(x[V]+(s[V]-128)*T);x[V+1]=j.Uo(x[V+1]+(s[V+1]-128)*T);x[V+2]=j.Uo(x[V+2]+(s[V+2]-128)*T);
V+=4}}function t(x,$){j.Jx(P);j.SO(x,$);J($,P);C($,h)}function Y(s){var V=0;for(var g8=0;g8<12;g8++)V+=j.random();
return j.Uo(D*(V-6)+s)}function l(x,$){j.SO(x,$);for(var F=0;F<i;F+=4){$[F]=Y($[F]);$[F+1]=Y($[F+1]);
$[F+2]=Y($[F+2])}C($,h)}function m(x,$){j.SO(x,$);for(var F=0;F<i;F+=4){if(j.random()<T){$[F]=r[0];$[F+1]=r[1];
$[F+2]=r[2]}}C($,h)}function B(x,$){j.Jx(o);j.N2(o,P,y,y,f);j.SO(x,o);J(o,P);j.N2(o,$,5,5,13);C($,h)}function L(x,$){j.Jx(P);
j.SO(x,o);J(o,P);C($,h);j.N2(o,$,y,y,f)}function A(x,$){j.SO(x,o);C($,h);j.nV(o,O);for(var F=0,s=0;F<U;
F++){var V=((a-O[F]+255)*128.5+.5)/32767;if(j.random()<=V){$[s++]=H[0];$[s++]=H[1];$[s++]=H[2]}else{$[s++]=r[0];
$[s++]=r[1];$[s++]=r[2]}$[s]=x[s];s++}}function S(x,$){j.Gy(x,$);j.xT($,O);j.bu(O,p,R);j.p$(p,O,y,y,f);
j.rk(O,h);j.N4(O,$);j.wc($)}function M(x){var s=0;if(e==8){for(var V=0;V<Q;V++){x[s++]=~~(j.random()*255)}for(var F=1;
F<c;F++){for(var V=0;V<Q;V++){x[s++]=x[V]}}}else{for(var F=0;F<c;F++){var g8=~~(j.random()*255);for(var V=0;
V<Q;V++){x[s++]=g8}}}}function N(x,$){j.nV(x,O);j.Jx(p);W(O,p);M(p);W(O,p);j.$n(x,o,9);j.$n(o,P,9);j.md(O,p,2);
j.rk(p,h);j.md(p,O,2);j.Gy(P,$);j.N4(O,$);j.wc($)}[t,l,m,B,B,L,A,N,N,S][e](x,$)};d.X.awv=function(x,Q,c,$,z){var j=[-1e3,34,51,61,71,80,87,95,101,108,113,119,124,129,134,139,143,148,153,157,161,165,168,172,175,180,183,186,190,194,197,200,203,207,210,213,216,218,222,225,228,230,233,236,239,241,244,247,250,252,255],U=d.X.s,D=0,a,F,Z,v,G,q=0,h=1,r=255;
U.bN(Q,c);U.lv(z[3]);var i=U.zA(1),b=U.zA(1);U.nV(x,i);var e=z[0],k=z[1],K=k<=50?j[k]/255:1+(255-j[101-k])/255,g=z[2],R=i.length,T=new Float32Array(R),_=1+1/10*e,I=(1-1/_)/2,f=16/256,y=Q-1;
for(F=0;F<U.bc;F++){T[F]=i[F]/255;b[F]=e==1?U.random()<1/255?r:h:h}function H(o,P){var O=o*Q+P;if(b[O]!=h||o>=c||P>=Q){return}var v=T[O],p=K-v,C=U.random(),W=C/_+I;
if(D==0||Math.abs(G-v)>f){a=W<=p?q:r;D=~~(U.random()*e)}else if(.1<C){D--}else{D=0}b[O]=a;G=v}if(g==0){for(F=0;
F<Q;F++){for(Z=0;Z<Q;Z++){v=F+Z;if(v>=Q)break;H(Z,y-v)}D=0}for(F=1;F<c;F++){for(Z=0;Z<c;Z++){v=F+Z;if(v>=c||Z>=Q)break;
H(v,y-Z)}D=0}}else if(g==1){for(F=0;F<c;F++){for(Z=0;Z<Q;Z++){H(F,Z)}D=0}}else if(g==2){for(F=0;F<Q;
F++){for(Z=0;Z<Q;Z++){v=F+Z;if(v>=Q)break;H(Z,v)}D=0}for(F=1;F<c;F++){for(Z=0;Z<c;Z++){v=F+Z;if(v>=c||Z>=Q)break;
H(v,Z)}D=0}}else{for(F=0;F<Q;F++){for(Z=0;Z<c;Z++){H(Z,F)}D=0}}U.jt(b,$)};d.X.ait=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);var U=z[0],i=z[1],b=z[2],e=j.zA(1),k=j.zA(1),K=j.zA(1),g=j.zA(1),R=j.zA(4),T=j.zA(4);j.xT(x,g,3,4);
j.nV(x,e);j.p$(e,k,3,3,1);j.p$(e,K,3,3,9);j.sub(K,k);j.md(k,e,3);j.nl(e,40,10,g);j.pk(x,$,U,2,!1,U);
j.pk(x,R,U,2,!0,U);j.YI(T,255);j.dY($,e,T);j.dY(T,e,R);j.C5(R,$,1);j.Gy($);j.xT($,e);j.nl(e,i,b,g);j.N4(e,$);
j.wc($)};d.X.abe=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);j.lv(z[3]);var U=z[0],i=z[1],b=z[2]/10;U=U+i;
var e=j.zA(1),k=j.zA(1),K=j._E(),g=j._E();j.Jx(e);j.md(e,k,11);j.md(k,e,11);j.KF(e,K);j.kx(K,g,5);j.kx(g,K,5);
j.a0Z(g,.97);j.alT(g,e,U);j.p$(e,k,i,i,1);j.zv(x,e);j.Ls(k,e,k,.6);j.JN(e,k,k,b);j.DZ(k,k,e,5,1);j.Gy(x,$);
j.N4(e,$);j.wc($)};d.X.akc=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);var U=Math.abs(z[0]),i=U+[1,0,1,2,1,2,1,2,3,2,3,2,3,2,3,2,3,4,3,4,5,4,5,4,5][U],b=2*U+1,e=z[1]/10,k=e*13/15,K=j.zA(1),g=j.zA(1),R=j.zA(1),T=j.zA(1),D=j.zA(4),a=j.zA(4),_=j.zA(4),I=j.zA(4),f=j.zA(4);
j.nV(x,K);if(z[0]>=0){j.HQ(K)}j.SO(K,R);j.md(K,T,i);j.md(T,K,i);j.Tt(K,e);j.SO(K,g);j.md(K,T,b);j.md(T,K,b);
j.Tt(K,k);j.YI(_,z[2]);j.YI(I,z[3]);j.YI(f,z[4]);j.dY(_,K,I,D);j.dY(f,g,D,a);j.dY(I,R,a,$);j.xT(x,R,3);
j.N4(R,$,3)};d.X.awS=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);j.lv(z[5]);var U=z[0]*5.1,i=z[1]/100,b=j.aAA[z[2]],e=j.zA(1),k=j.zA(1),K=j.zA(1);
j.nV(x,e);j.aBW(k,255);j.Jx(K);j.Xs(e,U);j.v5(k,e,.7);j.v5(K,e,i);j.DZ(e,e,k,5,b);j.SO(x,$);j.acn($,U,z[4],z[3]);
j.Gy($);j.N4(k,$);j.wc($)};d.X.aCd=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);var U=z[0],i=4-z[1],b=11-z[2],e=j.zA(1),k=j.zA(1),K=j.zA(4);
j.zv(x,k);for(var F=0;F<i;F++){j.SO(k,e);j.aiQ(e,k,U,U)}j.$n(x,K,U);j.Gy(K,K);j.N4(k,K);j.wc(K,K);(b<11?j.am4:j.SO)(K,$,b)};
d.X.az9=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);j.lv(z[2]);var U=z[0]+5,i=~~(U/5+1),b=~~(U/2)+1,e=b*b,k=~~(U/3),K=j.aAA[z[1]],g=new Array(256);
for(var F=0;F<256;F++){g[F]=~~(.2*(F-128))}var R=j.zA(1),T=j.zA(1);j.aC9(x,$,U);j.Gy($);j.xT($,R);j.Jx(T);
j.azv(R,T,g);j.ag5(T,U,U,i,i);j.Ls(R,T,R,1);j.md(R,T,k);j.md(T,R,k);j.p$(R,T,b,b,e);j.DZ(T,T,R,5,K);
j.N4(R,$);j.wc($)};d.X.aBf=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);var U=j.zA(1),i=j.zA(1),b=j.zA(1),e=j._E(),k=j._E();
j.nV(x,U);j.md(U,i,z[2]);j.Xs(i,z[0]*5.1);j.p$(i,U,2,2,4);j.md(U,i,3);j.md(i,U,3);j.SO(U,b);j.md(U,i,5);
j.md(i,U,5);j.KF(U,e);j.kx(e,k,5);j.kx(k,e,5);j.a4k(e,i,z[1]);j.HQ(i);j.Ls(b,i,b,1);j.jt(b,$)};d.X.a76=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);var U=1<<7-z[2],i=j.zA(1),b=j.zA(1),e=j.zA(1);j.zv(x,b);j.md(b,i,3);j.SO(i,b);j.md(i,e,z[0]+5);
j.sub(e,b);j.nl(b,1,z[1]);j.Tt(i,1/U);j.Tt(i,U);j.sub(i,b);j.Gy(x,$);j.N4(b,$);j.wc($)};d.X.aDm=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);j.lv(z[3]);var U=j.zA(1),i=j.zA(1),b=j.zA(1);j.nV(x,U);j.azE(i,z[0]/50);j.md(i,b,3);j.p$(U,i,9,9,41);
j.nl(i,z[1],z[2]);j.Ls(i,b,b,.75);j.JN(i,b,i,.5);j.SO(i,U);j.p$(U,b,3,3,8);j.Ls(b,i,b,.75);j.Tt(b,1.2);
j.bu(b,U,1);j.md(U,b,2);j.bu(b,U,2);j.Tt(U,1.2);j.md(U,b,2);j.jt(b,$)};d.X.ayk=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);var U=z[0]+9,i=z[1]/2,b=z[2],e=z[3],k=j.wJ(z[4]),K=z[5]+1,g=z[6],R=j.zA(1),T=j.zA(1),D=j.zA(4),a=j.zA(4);
j.kR(T,b,e,g);j.aiJ(x,$,U,1,1);j.aiJ($,D,U,1,1);j.api(D,D,a,7,i);j.Tt(a,1.2);j.Tq(a,1.2);j.DZ(T,R,R,K,k);
j.Tt(R,3);j.SO(x,$);j.dY(a,R,$)};d.X.agv=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);j.lv(z[3]);var U=z[0]+4,i=U*2/5+(U%5|0);
U--;var b=z[1]*-2.75+60,e=65-b,k=z[2]/10,K=j.zA(1),g=j.zA(1);j.Jx(K);j.zv(x,g);var R=j.NT(b,e,g);j.Gy(x,$);
j.xT($,g);j.v5(g,K,.8);j.rk(g,R);j.Tt(g,k);j.add(K,g);j.p4(g,K,U,3,!1,i);j.N4(K,$);j.wc($)};d.X.adK=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);j.lv(z[3]);var U=z[0]+5,i=(U*U>>1)+U%2,b=z[1]/10,e=z[2],k=(e*e>>1)+e%2,K=j.zA(1),g=j.zA(1),R=j.zA(1),T=j.zA(4),D=j.zA(4),a=j.zA(4);
j.Jx(R);j.Gy(x,a);j.xT(a,K);j.v5(K,R,.8);j.md(R,K,3);j.bu(K,R,b);j.N4(R,a);j.wc(a,a);j.nV(a,R);j.p$(R,K,U,U,i);
j.md(R,g,U);j.sub(K,g);j.Xs(g,1);j.N2(a,T,7,7,40);j.N2(a,D,7,7,10);j.dY(T,g,D);j.N2(D,$,e,e,k)};d.X.a2V=function(x,Q,c,$,z){var j=d.X.s,i=255,F,e;
j.bN(Q,c);var U=z[0];if(U<2)i=U;else if(U<12)i=5*U-5;else if(U<47)i=2*U+28;else if(U<50){F=U-47;i=125+12.5*F+12.5*F*F}var b=new Uint8Array(256);
for(F=75,e=15;F<256;F++,e+=24)b[F]=Math.min(255,e);var k=j.zA(1),K=j.zA(1),g=j.zA(1);j.nV(x,k);j.md(k,K,11);
j.md(K,g,11);j.sub(g,k);j.Tt(k,8);j.sub(g,k);j.Xs(k,i);j.HQ(k);j.md(k,K,5);j.Xs(K,51);j.md(K,k,z[1]);
j.md(k,K,z[1]);j.HQ(K);j.rk(K,b);j.jt(K,$)};d.X.axU=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);var U=j.aqO[z[1]],i=z[2],b=i*1.5,e=j.zA(1),k=j.zA(1),K=j.zA(1);
j.zv(x,e);j.p4(e,k,15,2,!0,15);j.SO(k,K);j.nl(K,i,b);j.md(K,e,3);j.md(k,K,z[0]);j.sub(K,k);j.Tt(k,U);
j.sub(e,k);j.md(k,e,3);j.p4(e,k,3,1,!1,1);j.$n(x,$,15);j.Gy($);j.N4(k,$);j.wc($)};d.X.aE1=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);j.lv(z[3]);var U=z[0]*5.1,i=16-z[1],b=[1,1,1.05,1.1,1.15,1.2,1.25,1.3,1.35,1.4,1.45,1.5,1.6,1.7,1.8,2,2.25,2.5,2.75,3,3.5,4,5,6,8,10][z[2]],e=j.zA(1),k=j.zA(1),K=j.zA(1);
j.nV(x,e);j.Xs(e,U);j.md(e,k,i);j.md(k,e,i);j.Jx(K);j.JN(e,K,K,1);j.Ls(e,K,e,.75);j.Tt(e,b);j.Tq(e,b);
j.p$(e,k,2,2,2);j.jt(k,$)};d.X.a1C=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);var U=z[0]+9,i=z[1]+9,b=z[2],e=z[3],k=j.wJ(z[4]),K=z[5]+1,g=z[6],R=j.zA(1),T=j.zA(1),D=j.zA(1),a=j.zA(1),_=j.zA(1),I=j.zA(4);
j.zv(x,R);j.aiQ(R,D,U,U);j.md(D,R,i);j.SO(D,_);j.SO(R,a);j.sub(_,a);j.sub(R,_);j.add(_,a);j.Tt(a,10);
j.kR(T,b,e,g);j.DZ(T,R,_,K,k);j.asq(_,a,D,.8);j.$n(x,I,9);j.$n(I,$,9);j.Gy($);j.N4(D,$);j.wc($)};d.X.a39=function(x,Q,c,$,z){var j=d.X.s;
j.bN(Q,c);var U=16-z[0],i=z[1]*8,b=1-(3-z[2])/10,e=~~(U*U*b-1),k=~~(U*U*(1-b));if(k==0)k=1;var K=j.zA(1),g=j.zA(1),R=j.zA(1),T=j.zA(4);
j.nV(x,R);j.p$(R,K,7,7,25);j.md(R,g,7);j.sub(K,g);j.Xs(g,1);j.N2(x,T,U,U,e);j.N2(x,$,U,U,k);j.dY(T,g,$);
j.Gy($);j.xT($,K);j.p$(K,R,3,3,1);j.p$(K,g,3,3,9);j.sub(g,R);j.SO(R,g);j.sub(K,R);j.sub(R,g);j.p$(g,K,3,3,8);
j.nl(K,i,1);j.N4(K,$);j.wc($)};d.X.a5N=function(x,Q,c,$,z){var j=d.X.s;j.bN(Q,c);j.lv(z[3]);var U=z[0],i=z[1],b=z[2],e=U>>1,k=Math.max(~~(U/5),1),K=Math.max(~~(U*2/3),1),g=j.asb(i,b),R=j.zA(1),T=j.zA(1),D=j.zA(1),a=j.zA(1),_=j.zA(4);
j.zv(x,R);j.asX(2147483647,4,2,2,0,255,T);j.asX(4,2147483647,2,2,0,255,a);j.Jx(D);j.JN(T,D,T,1);j.JN(a,D,a,1);
j.JN(T,R,T,1);j.JN(a,R,a,1);j.$n(x,_,e);j.$n(_,$,e);j.p$(T,R,1,U,k);j.p$(R,T,3,U,K);j.p$(a,R,U,1,k);
j.p$(R,a,U,3,K);j.tx(T,a);j.Gy($);j.N4(a,$);j.wc($);j.as1($,g)};d.X.P8=function(x,Q,c){var $=c.asM,z=c.bc,j=c.zA(1),top=c.zA(1),U=c.zA(1),i=c.zA(1),b=c.zA(1),e=c.zA(1),k=c.zA(1),K=c.zA(1),g=c.zA(1),R=c.ww,T=c.R0,D=d.hx.iy,a=d.hx.C6;
D(x,j,R,T,a([8,5,2,5,2,-1,2,-1,-4]));D(x,top,R,T,a([5,5,5,2,2,2,-1,-1,-1]));D(x,U,R,T,a([2,5,8,-1,2,5,-4,-1,2]));
D(x,i,R,T,a([5,2,-1,5,2,-1,5,2,-1]));D(x,b,R,T,a([2,2,2,2,2,2,2,2,2]));D(x,e,R,T,a([-1,2,5,-1,2,5,-1,2,5]));
D(x,k,R,T,a([2,-1,-4,5,2,-1,8,5,2]));D(x,K,R,T,a([-1,-1,-1,2,2,2,5,5,5]));D(x,g,R,T,a([-4,-1,2,-1,2,5,2,5,8]));
var _=[j,top,U,i,b,e,k,K,g];for(var I=0;I<T;I++){for(var f=0;f<R;f++){var y=I*R+f,Z=x[y],v=null,G=0;
for(var q=-1;q<2;q++){for(var h=-1;h<2;h++){var r=_[(q+1)*3+h+1],H=Math.max(0,Math.min(I+q,T-1)),o=Math.max(0,Math.min(f+h,R-1)),P=r[H*R+o],O=Math.abs(P-Z);
if(v==null||O<v){v=O;G=P}}}Q[y]=G}}};d.X.aiX=function(x,Q,c,$,z){var self=d.X.s;self.bN(Q,c);var j=self.zA(1),U=self.zA(1);
for(var F=0;F<4;F++){self.xT(x,j,F);if(F<3){d.X.P8(j,U,self);d.X.P8(U,j,self);d.X.P8(j,U,self);d.X.P8(U,j,self);
d.X.P8(j,U,self);d.X.P8(U,j,self);d.X.P8(j,U,self);d.X.P8(U,j,self);d.X.P8(j,U,self)}else U=j;self.N4(U,$,F)}};
d.X.s={};d.X.s.ww=0;d.X.s.R0=0;d.X.s.bc=0;d.X.s.rC=0;d.X.s.pf=0;d.X.s.bN=function(x,Q){var c=x*Q,self=d.X.s;
self.ww=x;self.R0=Q;self.bc=c;self.rC=c<<1;self.pf=c<<2};d.X.s.lv=function(x){d.X.s.random=function(){var Q=x+=1831565813;
Q=Math.imul(Q^Q>>>15,Q|1);Q^=Q+Math.imul(Q^Q>>>7,Q|61);return((Q^Q>>>14)>>>0)/4294967296}};d.X.s.zA=function(x){var Q=d.X.s;
return new Uint8Array([-1,Q.bc,Q.rC,-1,Q.pf][x])};d.X.s._E=function(){return new Int32Array(d.X.s.rC)};
d.X.s.md=function(x,Q,c,$){if($==null)$=c;var self=d.X.s,z=self.ww,j=self.R0,U=$,i=$>>1,b=c,e=c>>1,k=c*$,K=0;
for(var F=0;F<j;F++){var g=0;for(var R=0;R<U;R++){for(var T=0;T<b;T++){var D=0-e+T,a=F-i+R;if(D<0)D=0;
else if(D>=z)D=z-1;if(a<0)a=0;else if(a>=j)a=j-1;g+=x[a*z+D]}}Q[K++]=~~(g/k);for(var _=1;_<z;_++){for(var R=0;
R<U;R++){var I=_-e-1,f=I+b,a=F-i+R;if(I<0)I=0;if(f>=z)f=z-1;if(a<0)a=0;else if(a>=j)a=j-1;g+=x[a*z+f]-x[a*z+I]}Q[K++]=~~(g/k)}}};
d.X.s.kx=function(x,Q,c,$){var self=d.X.s,z=new Int32Array(self.bc),j=new Int32Array(self.bc);for(var F=0;
F<2;F++){self.xT(x,z,F,2);self.md(z,j,c,$);self.N4(j,Q,F,2)}};d.X.s.$n=function(x,Q,c,$){var self=d.X.s,z=self.zA(1),j=self.zA(1);
for(var F=0;F<4;F++){self.xT(x,z,F);if(F<3)self.md(z,j,c,$);else j=z;self.N4(j,Q,F)}};d.X.s.aiJ=function(x,Q,c,$,z){var self=d.X.s,j=self.ww,U=self.R0,i=c+$-1,b=c>>1,e=i>>1,k=0,K=c*$,g=new Int32Array(c);
for(var F=0;F<U;F++){var R=0,T=0,D=0;for(var a=0;a<c;a++){var _=z?i-a-$:a;for(var I=_,f=$+_;I<f;I++){var y=0-e+I,Z=F-b+a;
if(I==_){g[a]=y}if(y<0)y=0;else if(y>=j)y=j-1;if(Z<0)Z=0;else if(Z>=U)Z=U-1;var v=j*Z+y<<2;R+=x[v];T+=x[v+1];
D+=x[v+2]}}Q[k++]=~~(R/K);Q[k++]=~~(T/K);Q[k++]=~~(D/K);Q[k]=x[k];k++;for(var G=1;G<j;G++){for(var a=0;
a<c;a++){var Z=F-b+a,_=g[a]+1;g[a]=_;var q=_-1,h=_+$-1;if(Z<0)Z=0;else if(Z>=U)Z=U-1;if(q<0)q=0;else if(q>=j)q=j-1;
if(h<0)h=0;else if(h>=j)h=j-1;var r=Z*j+q<<2,H=Z*j+h<<2;R=R+x[H]-x[r];T=T+x[H+1]-x[r+1];D=D+x[H+2]-x[r+2]}Q[k++]=~~(R/K);
Q[k++]=~~(T/K);Q[k++]=~~(D/K);Q[k]=x[k];k++}}};d.X.s.p4=function(x,Q,c,$,z,j){var self=d.X.s,U=self.ww,i=self.R0,b=c+$-1,e=c>>1,k=b>>1,K=0,g=new Int32Array(c),R=new Int32Array(256),T=new Int32Array(16);
for(var F=0;F<i;F++){for(var D=0;D<256;D++){R[D]=0}for(var D=0;D<16;D++){T[D]=0}for(var a=0;a<c;a++){var _=z?b-a-$:a;
for(var I=_,f=$+_;I<f;I++){var y=0-k+I,Z=F-e+a;if(I==_){g[a]=y}if(y<0)y=0;else if(y>=U)y=U-1;if(Z<0)Z=0;
else if(Z>=i)Z=i-1;R[x[Z*U+y]]++;T[x[Z*U+y]>>>4]++}}var v=0,G=0;while(v+T[G>>>4]<j){v+=T[G>>>4];G+=16}for(;
G<256;G++){v+=R[G];if(v>=j)break}Q[K++]=G;for(var D=1;D<U;D++){for(var a=0;a<c;a++){var Z=F-e+a,_=g[a]+1;
g[a]=_;var q=_-1,h=_+$-1;if(Z<0)Z=0;else if(Z>=i)Z=i-1;if(q<0)q=0;else if(q>=U)q=U-1;if(h<0)h=0;else if(h>=U)h=U-1;
R[x[Z*U+q]]--;R[x[Z*U+h]]++;T[x[Z*U+q]>>>4]--;T[x[Z*U+h]>>>4]++}v=0;G=0;while(v+T[G>>>4]<j){v+=T[G>>>4];
G+=16}for(;G<256;G++){v+=R[G];if(v>=j)break}Q[K++]=G}}};d.X.s.pk=function(x,Q,c,$,z,j){var self=d.X.s,U=self.zA(1),i=self.zA(1);
for(var F=0;F<4;F++){self.xT(x,U,F);if(F<3)self.p4(U,i,c,$,z,j);else i=U;self.N4(i,Q,F)}};d.X.s.p$=function(x,Q,c,$,z){z=Math.min($*c,z);
var self=d.X.s,j=self.ww,U=self.R0,i=$>>1,b=c>>1,e=0,k=new Int32Array($),K=new Int32Array(256),g=new Int32Array(16);
for(var F=0;F<U;F++){for(var R=0;R<256;R++){K[R]=0}for(var R=0;R<16;R++){g[R]=0}for(var T=0;T<$;T++){for(var D=0,a=c;
D<a;D++){var _=0-b+D,I=F-i+T;if(D==0){k[T]=_}if(_<0)_=0;else if(_>=j)_=j-1;if(I<0)I=0;else if(I>=U)I=U-1;
K[x[I*j+_]]++;g[x[I*j+_]>>>4]++}}var f=0,y=0;while(f+g[y>>>4]<z){f+=g[y>>>4];y+=16}for(;y<256;y++){f+=K[y];
if(f>=z)break}Q[e++]=y;for(var R=1;R<j;R++){for(var T=0;T<$;T++){var I=F-i+T,Z=k[T]+1;k[T]=Z;var v=Z-1,G=Z+c-1;
if(I<0)I=0;else if(I>=U)I=U-1;if(v<0)v=0;else if(v>=j)v=j-1;if(G<0)G=0;else if(G>=j)G=j-1;K[x[I*j+v]]--;
K[x[I*j+G]]++;g[x[I*j+v]>>>4]--;g[x[I*j+G]>>>4]++}f=0;for(y=0;y<256;y++){f+=K[y];if(f>=z)break}Q[e++]=y}}};
d.X.s.N2=function(x,Q,c,$,z){var self=d.X.s,j=self.zA(1),U=self.zA(1);for(var F=0;F<4;F++){self.xT(x,j,F);
if(F<3)self.p$(j,U,c,$,z);else U=j;self.N4(U,Q,F)}};d.X.s.bu=function(x,Q,c){var self=d.X.s,$=self.ww,z=self.R0,j=0;
for(var F=0;F<z;F++){var U=F*$,i=(F-1)*$,b=(F+1)*$;if(i<0)i=U;if(b>=z)b=U;for(var e=0;e<$;e++){var k=e-1,K=e+1;
if(k<0)k=e;if(K>=$)K=e;var g=U+k,R=U+K,T=i+e,D=b+e,a=U+e,_=x[g],I=x[R],f=x[T],y=x[D],Z=x[a],v=Z+(Z*4*c+.5);
v=v-((_+I+y+f)*c+.5);Q[j++]=self.Uo(v)}}};d.X.s.C5=function(x,Q,c){var self=d.X.s,$=self.zA(1),z=self.zA(1);
for(var F=0;F<4;F++){self.xT(x,$,F);if(F<3)self.bu($,z,c);else z=$;self.N4(z,Q,F)}};d.X.s.am4=function(x,Q,c){var self=d.X.s,$=self.ww,z=self.R0,j=0,U=c+4;
for(var F=0;F<z;F++){var i=F*$,b=(F-1)*$,e=(F+1)*$;if(b<0)b=i;if(e>=z)e=i;for(var k=0;k<$;k++){var K=k-1,g=k+1;
if(K<0)K=k;if(g>=$)g=k;var R=i+K<<2,T=i+g<<2,D=b+k<<2,a=e+k<<2,_=i+k<<2;for(var I=0;I<3;I++){var f=x[R+I],y=x[T+I],Z=x[D+I],v=x[a+I],G=x[_+I];
Q[j++]=(G*c+f+y+v+Z)/U}Q[j]=x[j];j++}}};d.X.s.aiQ=function(x,Q,c,$){var self=d.X.s,z=self.ww,j=self.R0,U=c>>1,i=$>>1,b=0,e=new Int32Array(c),k=new Int32Array(256);
for(var F=0;F<j;F++){for(var K=0;K<256;K++){k[K]=0}for(var g=0;g<c;g++){for(var R=0,T=$;R<T;R++){var D=0-i+R,a=F-U+g;
if(R==0){e[g]=D}if(D<0)D=0;else if(D>=z)D=z-1;if(a<0)a=0;else if(a>=j)a=j-1;k[x[a*z+D]]++}}var _=0,I=0;
for(var f=0;f<256;f++){if(_<k[f]){I=f;_=k[f]}}Q[b++]=I;for(var K=1;K<z;K++){for(var g=0;g<c;g++){var a=F-U+g,y=e[g]+1;
e[g]=y;var Z=y-1,v=y+$-1;if(a<0)a=0;else if(a>=j)a=j-1;if(Z<0)Z=0;else if(Z>=z)Z=z-1;if(v<0)v=0;else if(v>=z)v=z-1;
k[x[a*z+Z]]--;k[x[a*z+v]]++}_=0;I=0;for(var f=0;f<256;f++){if(_<k[f]){I=f;_=k[f]}}Q[b++]=I}}};d.X.s.a4Z=[function(x,Q,c,$,z,j,U,i,b,e){return z+(x+Q+c)*e-(b+i+U)*e},function(x,Q,c,$,z,j,U,i,b,e){return z+(Q+c+j)*e-(i+U+$)*e},function(x,Q,c,$,z,j,U,i,b,e){return z+(c+j+b)*e-(U+$+x)*e},function(x,Q,c,$,z,j,U,i,b,e){return z+(j+b+i)*e-($+x+Q)*e},function(x,Q,c,$,z,j,U,i,b,e){return z+(b+i+U)*e-(x+Q+c)*e},function(x,Q,c,$,z,j,U,i,b,e){return z+(i+U+$)*e-(Q+c+j)*e},function(x,Q,c,$,z,j,U,i,b,e){return z+(U+$+x)*e-(c+j+b)*e},function(x,Q,c,$,z,j,U,i,b,e){return z+($+x+Q)*e-(j+b+i)*e}];
d.X.s.DZ=function(x,Q,c,$,z){var self=d.X.s,j=self.ww,U=self.R0,i=j,b=self.a4Z[$-1];for(var F=0;F<U;
F++){var e=(F>0?F-1:0)*i,k=F*i,K=(F<U?F+1:F)*i;for(var g=0;g<j;g++){var R=g>0?g-1:0,T=g<j?g+1:g,D=k+g,a=x[e+R],_=x[e+g],I=x[e+T],f=x[k+R],y=Q[D],Z=x[k+T],v=x[K+R],G=x[K+g],q=x[K+T];
c[D]=self.Uo(b(a,_,I,f,y,Z,v,G,q,z))}}};d.X.s.api=function(x,Q,c,$,z){var self=d.X.s,j=self.zA(1),U=self.zA(1),i=self.zA(1);
for(var F=0;F<3;F++){self.xT(x,j,F);self.xT(Q,U,F);self.DZ(j,U,i,$,z);self.N4(i,c,F)}self.xT(Q,j,3);
self.N4(j,c,3)};d.X.s.nV=function(x,Q){var c=x.length,$=0;for(var F=0;F<c;F++){Q[$++]=~~((x[F++]+x[F++]+x[F++]+2)/3)}};
d.X.s.jt=function(x,Q){var c=Q.length,$=0;for(var F=0;F<c;F++){var z=x[F];Q[$++]=z;Q[$++]=z;Q[$++]=z;
Q[$++]=255}if(Q[0]==255)Q[0]--;else Q[0]++};d.X.s.zv=function(x,Q){var c=Q.length,$=0;for(var F=0;F<c;
F++){var z=x[$++],j=x[$++],U=x[$++];$++;if(j>z)z=j;if(U>z)z=U;Q[F]=z}};d.X.s.Gy=function(x,Q){if(Q==null)Q=x;
var c=x.length;for(var $=0;$<c;$+=4){var z=x[$],j=x[$+1],U=x[$+2],i=z,b=0,e=z,K;if(j<=z){z=j}else{b=1;
e=j}if(U<=e){if(z>U){z=U}}else{b=2;e=U}var k=e-z;if(k!=0){if(b==0){K=~~(43*(j-U)/k)}else if(b==1){K=~~(43*(U+2*k-i)/k)}else{K=43*(i+4*k-j)/k}if(K<0){K=255&K-1}Q[$]=K;
Q[$+1]=~~(255*k/e)}else{Q[$]=k;Q[$+1]=k}Q[$+2]=e;Q[$+3]=x[$+3]}};d.X.s.wc=function(x,Q){if(Q==null)Q=x;
var c=x.length;for(var $=0;$<c;$+=4){var z=x[$],j=x[$+1],U=x[$+2];if(j){if(z==255)z=0;var i=~~(6*z/255),b=~~(-255*i+6*z);
if(i==0){Q[$]=U;Q[$+1]=~~(U*(255-j*(255-b)/255)/255);Q[$+2]=~~(U*(255-j)/255)}else if(i==1){Q[$]=~~(U*(255-j*b/255)/255);
Q[$+1]=U;Q[$+2]=~~(U*(255-j)/255)}else if(i==2){Q[$]=~~(U*(255-j)/255);Q[$+1]=U;Q[$+2]=~~(U*(255-j*(255-b)/255)/255)}else if(i==3){Q[$]=~~(U*(255-j)/255);
Q[$+1]=~~(U*(255-j*b/255)/255);Q[$+2]=U}else if(i==4){Q[$]=~~(U*(255-j*(255-b)/255)/255);Q[$+1]=~~(U*(255-j)/255);
Q[$+2]=U}else{Q[$]=U;Q[$+1]=~~(U*(255-j)/255);Q[$+2]=~~(U*(255-j*b/255)/255)}}else{Q[$]=U;Q[$+1]=U;Q[$+2]=U}Q[$+3]=x[$+3]}};
d.X.s.N4=function(x,Q,c,$){if(c==null)c=2;if($==null)$=4;var z=x.length;for(var F=0;F<z;F++){Q[c]=x[F];
c+=$}};d.X.s.xT=function(x,Q,c,$){if(c==null)c=2;if($==null)$=4;var z=Q.length;for(var F=0;F<z;F++){Q[F]=x[c];
c+=$}};d.X.s.asq=function(x,Q,c,$){if($==null)$=1;var z=Q.length,j=0,U;for(var j=0;j<z;j++){U=Q[j];if(U){U*=$;
c[j]=~~((U*x[j]+(255-U)*c[j])/255)}}};d.X.s.dY=function(x,Q,c,$){if($==null)$=c;var z=Q.length,j=0,U,i;
for(var F=0;F<z;F++){U=Q[F];if(U){i=255-U;$[j]=~~((U*x[j]+i*c[j])/255);$[j+1]=~~((U*x[j+1]+i*c[j+1])/255);
$[j+2]=~~((U*x[j+2]+i*c[j+2])/255)}$[j+3]=x[j+3];j+=4}};d.X.s.Ls=function(x,Q,c,$){var z=~~($*255),j=c.length;
for(var F=0;F<j;F++){c[F]=((255-z*(255-x[F])/255)*Q[F]+x[F]*(z*(255-x[F])/255))/255}};d.X.s.JN=function(x,Q,c,$){var z=~~($*255),j=c.length;
for(var F=0;F<j;F++){c[F]=((255-z*x[F]/255)*Q[F]+x[F]*(z*x[F]/255))/255}};d.X.s.v5=function(x,Q,c){var $=Q.length;
for(var F=0;F<$;F++){Q[F]=~~(x[F]*c+.5)+(Q[F]-~~(Q[F]*c+.5))}};d.X.s.sub=function(x,Q){var c=x.length;
for(var F=0;F<c;F++){Q[F]=Math.max(x[F]-Q[F],0)}};d.X.s.add=function(x,Q){var c=x.length;for(var F=0;
F<c;F++){Q[F]=Math.min(x[F]+Q[F],255)}};d.X.s.asM=function(x,Q){var c=x.length;for(var F=0;F<c;F++){Q[F]=x[F]+Q[F]}};
d.X.s.tx=function(x,Q){var c=x.length;for(var F=0;F<c;F++){Q[F]=x[F]+Q[F]>>1}};d.X.s.SO=function(x,Q){var c=x.length;
for(var F=0;F<c;F++){Q[F]=x[F]}};d.X.s.rk=function(x,Q){var c=x.length;for(var F=0;F<c;F++){x[F]=Q[x[F]]}};
d.X.s.as1=function(x,Q){var c=d.X.s.pf;for(var F=0;F<c;F+=4){var $=x[F],z=x[F+1],j=x[F+2],U=$;if(z>$)U=z;
if(j>$)U=j;var i=Q[U];if(i){x[F]=~~(i*$/U);x[F+1]=~~(i*z/U);x[F+2]=~~(i*j/U)}else{x[F]=i;x[F+1]=i;x[F+2]=i}}};
d.X.s.Tt=function(x,Q){for(var F=0,c=x.length;F<c;F++){x[F]=Math.min(255,~~(.5+x[F]*Q))}};d.X.s.Tq=function(x,Q){for(var F=0,c=x.length;
F<c;F++){x[F]=255-Math.min(255,~~(.5+(255-x[F])*Q))}};d.X.s.HQ=function(x){var Q=x.length;for(var F=0;
F<Q;F++){x[F]=255-x[F]}};d.X.s.Xs=function(x,Q,c,$){if(c==null)c=0;if($==null)$=255;for(var F=0,z=x.length;
F<z;F++){x[F]=x[F]>=Q?$:c}};d.X.s.hE=function(x){return[x>>24&255,x>>16&255,x>>8&255,x&255]};d.X.s.acn=function(x,Q,c,$){if(c==null)c=255;
if($==null)$=4278190335;var z=d.X.s,j=z.pf,U=z.hE(c),i=z.hE($);for(var F=0;F<j;F+=4){var b=~~((x[F]+x[F+1]+x[F+2]+2)/3);
if(b>=Q){x[F]=U[0];x[F+1]=U[1];x[F+2]=U[2]}else{x[F]=i[0];x[F+1]=i[1];x[F+2]=i[2]}}};d.X.s.YI=function(x,Q){var c=d.X.s,$=c.pf,z=c.hE(Q);
for(var F=0;F<$;){x[F++]=z[0];x[F++]=z[1];x[F++]=z[2];x[F++]=z[3]}};d.X.s.aBW=function(x,Q){var c=x.length;
for(var F=0;F<c;){x[F++]=Q}};d.X.s.asb=function(x,Q){x=x>5?(100-Math.max(4,x))/100:.95;Q=Q!=100?Math.max(4,Q)/100:.9995;
var c=new Uint8Array(256),$=Q>.5?.5/(1-Q):Q*2,z=~~($*256),j=~~((.5-x*$)*256)<<8;for(var F=0;F<256;F++){c[F]=d.X.s.Uo(j>>8);
j+=z}return c};d.X.s.Jx=function(x){for(var F=0,Q=d.X.s,c=x.length;F<c;F++){x[F]=~~(Q.random()*256)}};
d.X.s.azE=function(x,Q){for(var F=0,c=d.X.s,$=x.length;F<$;F++){x[F]=c.random()<Q?255:0}};d.X.s.aiC=function(x,Q,c){for(var F=0,$=d.X.s,z=x.length;
F<z;F++){if($.random()<Q)x[F]=c}};d.X.s.azv=function(x,Q,c){var $=x.length;for(var F=0;F<$;F++){x[F]=d.X.s.Uo(x[F]+c[Q[F]])}};
d.X.s.wL=function(x){var Q=new Uint32Array(256);for(var F=0,c=x.length;F<c;F++)Q[x[F]]++;return Q};d.X.s.aCe=function(x,Q){var c=0,$=0,z=new Uint32Array(256),j=new Float32Array(256);
for(var F=0,U=x.length;F<U;F++){var i=x[F],b=Q[F];if(b==255){z[i]++;c++}else if(b>0){b/=255;$+=b;j[i]+=b;
if($>=1){$--;c++}if(j[i]>=1){j[i]--;z[i]++}}}return[c,z]};d.X.s.NT=function(x,Q,c,$){var self=d.X.s,z,j,k=0,g=256;
if($){var U=self.aCe(c,$);z=U[1];j=U[0]/100}else{z=self.wL(c);j=self.bc/100}var i=new Uint8Array(256),b=j*x,e=j*Q,K=-1;
do{k+=z[++K]}while(k<=b);k=0;do{k+=z[--g]}while(k<=e);if(g-K<=0)g=K+1;if(g>255){g=255;K=254}var R=255/(g-K),T=-K;
for(var F=0;F<256;F++){i[F]=self.Uo(R*T+.5);T++}return i};d.X.s.nl=function(x,Q,c,$){var z=d.X.s;z.rk(x,z.NT(Q,c,x,$))};
d.X.s.aA2=function(x,Q){var self=d.X.s,c=self.wL(x),$=self.bc*Q/100,z=0,j=-1;do{z+=c[++j]}while(z<=$);
return j};d.X.s.KF=function(x,Q){var c=0,self=d.X.s,$=self.ww,z=self.R0,j=1/Math.PI,U=j*255;for(var F=0;
F<z;F++){var i=F+1;if(i==z)i--;var b=F*$,e=~~((1-(F+1)/z)*255);for(var k=0;k<$;k++){var K=k+1;if(K==$)K--;
var g=x[b+k],R=x[b+K],T=x[i*$+k];if(g-T==0){Q[c++]=e}else{var D=g-T+255;if(D==255){D=0}else{D=~~(Math.atan2(1/(255-D),1)*U+.5);
if(D<0)D+=255}Q[c++]=D}if(g-R==0){Q[c++]=~~((1-(k+1)/$)*255)}else{var D=g-R+255;if(D==255){D=0}else{D=~~(Math.atan2(1/(255-D),1)*U+.5);
if(D<0)D+=255}Q[c++]=D}}}};d.X.s.a0Z=function(x,Q){var self=d.X.s,c=self.ww,$=self.R0,z=0;for(var F=0;
F<$;F++){for(var j=0;j<c;j++){x[z]=~~(F*Q+.5)+~~(x[z]*(1-Q)+.5);z++;x[z]=~~(j*Q+.5)+~~(x[z]*(1-Q)+.5);
z++}}};d.X.s.aA$=function(x,Q,c,$){var self=d.X.s,z=self.ww,j=self.R0,U=0;for(var F=0;F<j;F++){for(var i=0;
i<z;i++){Q[U]=~~(Q[U]*(1-c)+.5)+~~(x[U]*$+.5);U++;Q[U]=~~(Q[U]*(1-c)+.5)+~~(x[U]*$+.5);U++}}};d.X.s.alT=function(x,Q,c){var self=d.X.s,$=self.ww,z=self.R0,j=0,U=0;
for(var F=0;F<z;F++){for(var i=0;i<$;i++){var b=x[j++],e=x[j++];Q[U++]=e%c>=2&&b%c>=2?255:0}}};d.X.s.asX=function(x,Q,c,$,z,j,U){var self=d.X.s,i=self.ww,b=self.R0,e=0,k=0,K=0;
for(var F=0;F<b;F++){var g=F%x<c||b-c<=F;for(var R=0;R<i;R++){U[e++]=g||R%Q<$||i-$<=R?z:j}}};d.X.s.kR=function(x,Q,c,$){var self=d.X.s,z=self.ww,j=self.R0,U=ag.kR(Q),i=U[1],b=U[0].m,e=U[0].e,k=100/c;
for(var K=0;K<j;K++)for(var g=0;g<z;g++){var R=d.D.k3(g*k,K*k,i,b,e);x[K*z+g]=$?255-R:R}};d.X.s.Uo=function(x){return~~Math.min(255,Math.max(0,x))};
d.X.s.aqO=[0,5,10,15,20,25,35,45,65,85,105,125,145,165,185,205];d.X.s.aAA=[0,.2,.4,.5,.6,.7,.8,.9,1,1.1,1.2,1.3,1.4,1.5,1.7,2,2.5,3,3.5,4,5,6,7,8,9,10];
d.X.s.wJ=function(x){return x>40?[1.25,1.5,1.75,2,2.5,3,4,5,7.5,10][x-41]:x/40};d.X.s.aC9=function(x,Q,c){var self=d.X.s,$=self.ww,z=self.R0,j=c,U=c>>1,i=U-1,b=j*j,e=0;
for(var F=0;F<z;F++){var k=0,K=0,g=0,R=~~(F/c)*c,T=0;for(var D=0;D<j;D++){for(var a=0;a<j;a++){var _=T+a,I=R+D;
if(_>=$)_=$-1;if(I>=z)I=z-1;k+=x[I*$+_<<2];K+=x[(I*$+_<<2)+1];g+=x[(I*$+_<<2)+2]}}var f=~~(k/b),y=~~(K/b),Z=~~(g/b);
Q[e]=f;Q[e+1]=y;Q[e+2]=Z;Q[e+3]=x[e+3];e+=4;for(var v=1;v<$;v++){for(var D=0;D<j;D++){var G=v-1,q=G+j,I=R+D;
if(q>=$)q=$-1;if(I>=z)I=z-1;var h=I*$,r=h+q<<2,H=h+G<<2;k+=x[r]-x[H];K+=x[r+1]-x[H+1];g+=x[r+2]-x[H+2]}if(v%c==0){f=~~(k/b);
y=~~(K/b);Z=~~(g/b)}Q[e]=f;Q[e+1]=y;Q[e+2]=Z;Q[e+3]=x[e+3];e+=4}}};d.X.s.ag5=function(x,Q,c,$,z){var self=d.X.s,j=self.ww,U=self.R0,i=0,b=0,e=0,k=0;
for(var F=k;F<U+k;F++){var K=F%Q>=$||F<$||U+k-$<=F;for(var g=0;g<j;g++){x[i++]=K&&(g%c>=z||g<z||j-z<=g)?255:0}}};
d.X.s.a4k=function(x,Q,c){var $=function(e,k){return k<=e?e/k&1?k-e%k:e%k:e},z=[function(i,b){return $(i,255)/255},function(i,b){return(255+$(i,255)-$(b,255))/510},function(i,b){return(255-$(b,255))/255},function(i,b){return(510-$(i,255)-$(b,255))/510},function(i,b){return(255-$(i,255))/255},function(i,b){return(255-$(i,255)+$(b,255))/510},function(i,b){return $(b,255)/255},function(i,b){return($(i,255)+$(b,255))/510}][c],j=0,U=0;
for(var F=0;F<d.X.s.bc;F++){var i=x[j++],b=x[j++];Q[U++]=~~(255*z(i,b))}};d.X.ach=function(){var x=[],Q=new Uint8Array(512),c=new Float32Array(512),$=new Float32Array(512),z=[1,-1,1,-1,1,-1,0,0],j=[1,1,-1,-1,0,0,1,-1],U=0,i,T=0;
for(;U<256;U++)x[U]=U;while(U!=0){U--;i=Math.floor(Math.random()*U);x[i]^=x[U]^(x[U]=x[i])}function b(b){b=Math.floor(b*65536);
if(b<256){b|=b<<8}for(var F=0;F<256;F++){var _=F+256,I=x[F]^(F&1?b:b>>8)&255;Q[F]=Q[_]=I;I=I%8;c[F]=c[_]=z[I];
$[F]=$[_]=j[I]}}function e(_){return _*_*_*(_*(_*6-15)+10)}function k(_,I,f){return(1-f)*_+f*I}function K(_,I){return _&I}function g(_,I){return _%I}function R(_,I,f,y,Z){var v=Math.floor(_),G=Math.floor(I),U,q,h,r,H,o;
_=_-v;I=I-G;v=v&255;G=G&255;U=v+Q[G];r=c[U]*_+$[U]*I;U=v+Q[Z(G+1,y)];h=c[U]*_+$[U]*(I-1);U=Z(v+1,f)+Q[G];
H=c[U]*(_-1)+$[U]*I;U=Z(v+1,f)+Q[Z(G+1,y)];o=c[U]*(_-1)+$[U]*(I-1);q=e(_);return k(k(r,H,q),k(h,o,q),e(I))}function D(_,U,I){_[U]=I}function a(_,I,f,y,Z){var v=Math.min(Math.min(I,256),Math.min(256,f)),G=v==256||v<8,q=8,h=new Uint32Array(q),r=new Uint32Array(q),H=new Float32Array(q),o=new Float32Array(q),P=1,O=1,p=G?K:g,C=D,W;
for(var F=0;F<q;F++){W=O*1/v;if(G){r[F]=(1<<Math.ceil(Math.log2(f*W)))-1;h[F]=(1<<Math.ceil(Math.log2(I*W)))-1}else{r[F]=W*f;
h[F]=W*I}H[F]=P;o[F]=W;P*=.5;O=O<<1}b(Math.random());for(var J=0,U=0;J<f;J++){for(var t=0;t<I;t++){var Y=0;
for(var l=0;l<q;l++){W=o[l];Y+=R(t*W,J*W,h[l],r[l],p)*H[l]}C(y,U++,Math.round(Math.max(0,255*Math.min(1,.5+Y*.5))))}}}return a}();
d.X.at1=function(){function x(Q,c,$,z){var j=new Uint8Array(Q.length>>>2),U=new Uint8Array(Q.length>>>2),i=new Uint8Array(Q.length);
for(var F=0;F<Q.length;F+=4){var b=Q[F+0]*.3+Q[F+1]*.59+Q[F+2]*.11;U[F>>>2]=b;i[F]=Q[F];i[F+1]=Q[F+1];
i[F+2]=Q[F+2]}d.hx.ayX(U,j,c,$);d.hx.QY(Q,z,c,$,d.hx.tY[1],0,!0);for(var F=0;F<Q.length;F+=4){i[F+3]=255-j[F>>>2]}for(var F=0,e=Q.length;
F<e;F+=4){var k=i[F+3]/255;z[F]=i[F]*k+z[F]*(1-k);z[F+1]=i[F+1]*k+z[F+1]*(1-k);z[F+2]=i[F+2]*k+z[F+2]*(1-k)}}return x}();
d.X.atZ=function(){function x(j,U,i,b,e){var k=new Uint32Array(j.buffer),K=0;for(var F=0;F<i;F++){for(var g=0;
g<U;g++,K+=4){var R=k[F*U+g],T=R&255,D=R>>>8&255,a=R>>>16&255,_=R>>>24&255,I=~~(Math.random()*8),f=I%3,y=0,Z=0;
if(I<3){Z--}else if(I>4){Z++}if(f==0){y--}else if(f==2){y++}var v=g+y,G=F+Z;if(v<0)v=0;else if(v>U-1)v=U-1;
if(G<0)G=0;else if(G>i-1)G=i-1;var R=k[G*U+v],q=R&255,h=R>>>8&255,r=R>>>16&255,H=R>>>24&255;b[K]=e(T,q);
b[K+1]=e(D,h);b[K+2]=e(a,r);b[K+3]=e(_,H)}}}function Q(j,U){return U}function c(j,U){return j>U?U:j}function $(j,U){return j<U?U:j}function z(j,U,i,b,e){var k=e[0];
if(k==0)x(j,U,i,b,Q);else if(k==1)x(j,U,i,b,c);else if(k==2)x(j,U,i,b,$);else if(k==3){console.error("Not implemented")}else console.error("Mew mew")}return z}();
d.X.a9s=function(){function x(Q,c,$,z,j){var U=j&&j[0]?j[0]:4,i,b,e,k,K,g,R;for(var F=0;F<$;F++){var T=Math.max(F-U,0),D=Math.min(F+U,$-1);
for(var a=0;a<c;a++){var _=Math.max(a-U,0),I=Math.min(a+U,c-1);i=T*c+_<<2;k=Q[i];K=Q[i+1];g=Q[i+2];R=Q[i+3];
i=T*c+I<<2;k+=Q[i];K+=Q[i+1];g+=Q[i+2];R+=Q[i+3];i=D*c+_<<2;k+=Q[i];K+=Q[i+1];g+=Q[i+2];R+=Q[i+3];i=D*c+I<<2;
k+=Q[i];K+=Q[i+1];g+=Q[i+2];R+=Q[i+3];i=F*c+a<<2;z[i]=k+2>>>2;z[i+1]=K+2>>>2;z[i+2]=g+2>>>2;z[i+3]=R+2>>>2}}}return x}();
d.X.a2R=function(){function x(Q,c,$,z){var j=new Uint8Array(Q.length),U=new Uint8Array(Q.length>>>2),i=new Uint8Array(Q.length>>>2);
d.hx.QY(Q,j,c,$,d.hx.tY[2],0,!0);for(var F=0;F<Q.length;F+=4){var b=j[F+0]*.3+j[F+1]*.59+j[F+2]*.11;
U[F>>>2]=b;z[F+0]=Q[F+0];z[F+1]=Q[F+1];z[F+2]=Q[F+2];z[F+3]=Q[F+3]}d.hx.ayX(U,i,c,$);for(var F=0;F<Q.length;
F+=4){j[F+3]=~~(Math.max(0,255-i[F>>>2]-50)*(255/205))}for(var F=0,e=Q.length;F<e;F+=4){var k=j[F+3]/255;
z[F]=j[F]*k+z[F]*(1-k);z[F+1]=j[F+1]*k+z[F+1]*(1-k);z[F+2]=j[F+2]*k+z[F+2]*(1-k)}}return x}();d.X.AD=function(){function x(I,f){return I[f]+I[f+1]+I[f+2]+I[f+3]}function Q(I,f){return I[f]+I[f+1]+I[f+2]+2*I[f+3]}function c(I,f,y,Z){I[f]=y[Z];
I[f+1]=y[Z+1];I[f+2]=y[Z+2];I[f+3]=y[Z+3]}function $(I,f,y){I[f]=I[y];I[f+1]=I[y+1];I[f+2]=I[y+2];I[f+3]=I[y+3]}function z(I,f,y){I[y]=f[y];
I[y+1]=f[y+1];I[y+2]=f[y+2];I[y+3]=255-f[y+3]}function j(I){for(var F=0,f=I.length;F<f;F+=4){I[F+3]=255-I[F+3]}}function U(){var I=Math.random();
if(I>.5)return 0;if(I>.25)return 1;if(I>.1)return 2;if(I>.02143)return 3;if(I>.00445)return 4;if(I>65e-5)return 5;
if(I>415e-6)return 6;if(I>55e-6)return 7;return 8}function i(I,f,y,Z,v,G){I[f]=y[Z]+(v[G]-y[Z]>>1);I[f+1]=y[Z+1]+(v[G+1]-y[Z+1]>>1);
I[f+2]=y[Z+2]+(v[G+2]-y[Z+2]>>1);I[f+3]=y[Z+3]+(v[G+3]-y[Z+3]>>1)}function b(I,f,y,Z,v,G){I[f]=v[G]+y[Z]>>1;
I[f+1]=v[G+1]+y[Z+1]>>1;I[f+2]=v[G+2]+y[Z+2]>>1;I[f+3]=v[G+3]+y[Z+3]>>1}function e(I,f,y,Z,v,G,q,h,r){var H=0,o=0,P=0,F,O=v[G],p;
i(h,0,I,f,I,y);for(F=0;F<O;F++){i(h,(F+1)*4,h,F*4,I,y)}o=(O+1)*4;P+=O;G--;c(I,f,h,o-4);Z[G]=x(I,f);f-=r;
while(G>0&&Z[G-1]<Z[G]){p=h;h=q;q=p;H=o;b(h,0,I,f-r,q,0);for(F=4;F<H;F+=4){b(h,F,h,F-4,q,F)}O=v[G];for(F=P;
F<O;F++){i(h,o,h,o-4,q,H-4);o+=4;P++}G--;c(I,f,h,o-4);Z[G]=x(I,f);f-=r}}function k(I,f,y,Z,v){var G=f*4,q=0,h,r,H=new Uint8Array(f+1),o=new Uint8Array(10*4),P=new Uint8Array(10*4);
for(var F=0;F<y;F++){z(Z,I,q);v[0]=x(Z,q);H[0]=U();h=q;q+=4;for(var O=1;O<f;O++){z(Z,I,q);v[O]=x(Z,q);
r=U();H[O]=r;if(v[O-1]<v[O]&&r>0){e(Z,q-4,q,v,H,O,o,P,4)}q+=4}v[f]=v[0];H[f]=H[0];if(v[f-1]<v[f]&&r>0){e(Z,q,h,v,H,f,o,P,4)}}j(Z)}function K(){var I=Math.random();
if(I>.659755)return 0;if(I>.1625)return 10;if(I>.06)return 20;if(I>.01)return 30;if(I>.0035)return 40;
if(I>65e-5)return 50;if(I>415e-6)return 60;if(I>55e-6)return 70;return 80}function g(I,f,y,Z,v,G){var q=K()+1,h=Z[v];
for(var F=1;F<q;F++){if(0>v)break;if(Z[v-F]<h){$(I,f,y)}else{break}f+=G}}function R(I,f,y,Z,v){var G=f*4,q=0;
for(var F=0;F<y;F++){z(Z,I,q);v[0]=x(Z,q);q+=4;for(var h=1;h<f;h++){z(Z,I,q);v[h]=x(I,q);if(v[h-1]<v[h]){g(Z,q-4,q,v,h,-4)}q+=4}v[f]=v[0];
if(v[h-1]<v[h]){g(Z,q-4,q-G,v,h,-4)}}j(Z)}function T(I,f,y,Z,v,G){var q=1,h,r,H=new Uint8Array(4),o,P=f;
while(Math.random()<1/q){P=f;if(Z<=1)break;h=y[Z];r=y[Z-1];if(h<=r)break;c(H,0,I,P-G);o=!0;for(var F=Z;
F<v;F++){if(r>y[F]){c(I,P-G,H,0);y[F-1]=r;o=!1;break}c(I,P-G,I,P);y[F-1]=y[F];P+=G}if(o){c(I,P-G,H,0);
y[v-1]=r}q++;Z--;f-=G}}function D(I,f,y,Z,v){var G=0,q=0,h=f*4;for(var F=0;F<y;F++){q=G;for(var r=0;
r<f;r++){z(Z,I,G);v[r]=Q(Z,G);G+=4}G=q;for(var r=1;r<f;r++){if(v[r-1]<v[r]&&Math.random()<.66){T(Z,G+4,v,r,f,4)}G+=4}G+=4}j(Z)}function a(I,f,y,Z,v){var G=v[0],q=v[1],h=new Uint16Array(f+1),r=I,H=Z,o;
if(q){o=Z.slice(0);_(I,Z,f,y);r=Z;H=o}if(G==0)k(r,f,y,H,h);else if(G==1)R(r,f,y,H,h);else if(G==2)D(r,f,y,H,h);
if(q){_(o,Z,f,y)}}function _(I,f,y,Z){for(var v=0;v<Z;v++)for(var G=0;G<y;G++){var q=v*y+G<<2,h=v*y+(y-1-G)<<2;
f[h]=I[q];f[h+1]=I[q+1];f[h+2]=I[q+2];f[h+3]=I[q+3]}}return a}();d.X.atC=function(x,Q,c,$,z){var j=d.X.s,U=1,a=0,f=0;
j.bN(Q,c);j.lv(z[2]);var i=3<<13,b=Math.PI/2.43,e=b/256,k=Math.PI*2/256;function K(){var G=j.random()*256,q=j.random()*256;
return U*~~(Math.tan(b-G*e)*325*Math.cos(q*k)*256)+i>>16}U=z[0];var g=z[1],R=(g+2)/2,T=j.random()*255,D=j.zA(1);
for(var F=0;F<c;F++){var _=j.Uo(K()+T);for(var I=0;I<Q;I++){_=j.Uo(K()+_);D[a++]=_}}a=Q;for(var F=1;
F<c;F++){var y=j.Uo(K()+D[f++]);D[a++]=y;for(var I=1;I<Q;I++){var Z=f+1;if(I+1==Q){Z--}var v=(R+y+D[Z]+D[f]*g)/(g+2);
y=j.Uo(K()+v);D[a++]=y;f++}}j.jt(D,$)};var gU=function(){function x(L){L=L^61^L>>>16;L=L+(L<<3);L=L^L>>>4;
L=L*668265261;L=L^L>>>15;return L}var Q=function(){var Q=function(L){if(L){this.V=L}this.V=x(this.V);
return(this.V&16777215)*(1/16777215)};return Q};function c(L,A){if(A==null){A=[0,0]}return Math.sqrt((A[0]-L[0])*(A[0]-L[0])+(A[1]-L[1])*(A[1]-L[1]))}function $(L,A){if(A==null){A=[0,0]}return[-(A[1]-L[1])/c(L,A),(A[0]-L[0])/c(L,A)]}function z(L){return[Math.cos(L),Math.sin(L)]}function j(L){var A=c(L,[0,0]),S=[L[0]/A,L[1]/A],M=Math.atan(S[1]/S[0]);
if(S[0]>0&&S[1]<0){M+=2*Math.PI}else if(S[0]<0&&S[1]<0){M+=Math.PI}else if(S[0]<0&&S[1]>0){M+=Math.PI}return M}function U(L){var U=0;
for(var F=1;F<L.length/2;++F){U+=c([L[2*F],L[2*F+1]],[L[2*(F-1)],L[2*(F-1)+1]])}return U}function i(L,A,S){var M=new Float32Array(L.length),N=1/(L.length/2),s=Z(S);
for(var F=0;F<L.length/2;++F){var V=F*N,g8=V/2+.5,n=1,cQ=0;if(S.shape==2){n=1/(2*g8)}if(S.shape==3){g8=(1-V)/2+.5;
n=1/(2*g8)+.5}if(S.shape==4){g8=V;n=Math.sin(3/2*Math.PI*g8)/4+1}if(S.shape==5){g8=(V-.5)*6;n=(-Math.atan(g8)/1.25+1)/5+.6-.2*V}var hk=[null,null];
if(F==0){hk=$([L[2*F],L[2*F+1]],[L[2*(F+1)],L[2*(F+1)+1]])}else if(F==L.length/2-1){hk=$([L[2*(F-1)],L[2*(F-1)+1]],[L[2*F],L[2*F+1]])}else{hk=$([L[2*(F-1)],L[2*(F-1)+1]],[L[2*(F+1)],L[2*(F+1)+1]])}M[2*F]=L[2*F]+(n*A+cQ)*hk[0];
M[2*F+1]=L[2*F+1]+(n*A+cQ)*hk[1];if(S.style==2){M[2*F]+=v(2*F/M.length,s,S)}}return M}function b(L,A,S){var M=new Float32Array(L.length),N=1/(L.length/2);
for(var F=0;F<L.length/2;++F){var s=F*N,V=[null,null],g8=.6*S.Ye*h(s,A.al2)*S.nf/100,n=.6*S.Ye*h(s,A.aiB)*S.nf/100,cQ=A.amn*g8+(1-A.amn)*n;
if(F==0){V=$([L[2*F],L[2*F+1]],[L[2*(F+1)],L[2*(F+1)+1]])}else if(F==L.length/2-1){V=$([L[2*(F-1)],L[2*(F-1)+1]],[L[2*F],L[2*F+1]])}else{V=$([L[2*(F-1)],L[2*(F-1)+1]],[L[2*(F+1)],L[2*(F+1)+1]])}M[2*F]=L[2*F]+cQ*V[0];
M[2*F+1]=L[2*F+1]+cQ*V[1]}return M}function e(L){if(L.e_==1){return[.150684932,.205479452,.465753425,.178082192]}else if(L.e_==2){return[.126829268,.131707317,.156097561,.317073171,.141463415,.126829268]}else{var A=[],S=1/(P(L)-1);
for(var F=0;F<P(L)-1;++F){A.push(S)}return A}}function k(L,A,S){var M=[],N=A-L,s=L;for(var F=0;F<S.length-1;
++F){M.push(s+S[F]*N);s=M[F]}return M}function K(L,A,S,M){var N=new Float32Array(S.length),s=0,V={shape:Math.floor(M.random()*2.99),ahT:M.random()*.1+.15};
for(var F=0;F<S.length-1;++F){var g8=s+S[F];N[F]=((1-g8)*L+g8*A)*_(M,g8,V);s=g8}return N}function g(L,A,S,M){var N=H(M),s=M.random(),V=s*20+(1-s)*26,g8=new Float32Array(S.length),n=0;
for(var F=0;F<S.length-1;++F){var cQ=n+S[F];g8[F]=(1-cQ)*L+cQ*A+N/V*(2/3*Math.sin(Math.PI*cQ)+1/3*Math.sqrt(Math.sin(Math.PI*cQ)));
n=cQ}return g8}function R(L,A,S){var M=[];for(var F=0;F<A.length-1;++F){M.push(A[F].slice());var N=F*(P(S)-1),s=(F+1)*(P(S)-1),V=L[s]-L[N];
for(var g8=N+1;g8<s;++g8){var n=Z(S),cQ=new Float32Array(A[0].length),hk=(L[g8]-L[N])/V;for(var eG=0;
eG<A[0].length/2;++eG){cQ[2*eG]=(1-hk)*A[F][2*eG]+hk*A[F+1][2*eG];cQ[2*eG+1]=(1-hk)*A[F][2*eG+1]+hk*A[F+1][2*eG+1];
if(S.style==2){cQ[2*eG]+=v(2*eG/A[0].length,n,S)}}M.push(cQ)}}M.push(A[A.length-1]);return M}function T(L,A,S){var M=new Array(A.length),N=Y(L),V=null;
for(var F=0;F<A.length;++F){M[F]=i(N,(A[F]-.5)*S.nf,S)}var s=1+.05*S.aoO*H(S)/H({e_:1});for(var F=0;
F<A.length;++F){if(A[F]==0){V=F}}for(var F=0;F<A.length;++F){var g8=(S.random()-.5)*2,n=Math.round(S.random()*9+1),cQ=new Float32Array(n*2+2);
for(var hk=0;hk<=n;++hk){cQ[2*hk]=M[F][0]-(M[F][2*hk]-M[F][0]);cQ[2*hk+1]=M[F][1]-(M[F][2*hk+1]-M[F][1])}if(F==V){g8*=.1}for(var hk=(M[F].length-1)/2;
hk>n;--hk){M[F][2*hk]=(1-g8)*M[F][2*hk]+g8*(M[F][2*(hk-n)]+s*(M[F][2*hk]-M[F][2*(hk-n)]));M[F][2*hk+1]=(1-g8)*M[F][2*hk+1]+g8*(M[F][2*(hk-n)+1]+s*(M[F][2*hk+1]-M[F][2*(hk-n)+1]))}for(var hk=n-1;
hk>=0;--hk){M[F][2*hk]=(1-g8)*M[F][2*hk]+g8*(cQ[2*(n-hk)]+s*(M[F][2*hk]-cQ[2*(n-hk)]));M[F][2*hk+1]=(1-g8)*M[F][2*hk+1]+g8*(cQ[2*(n-hk)+1]+s*(M[F][2*hk+1]-cQ[2*(n-hk)+1]))}}var eG=q(A,S);
if(S.Ye>0){var ie=0;for(var F=0;F<A.length;++F){if(F==0){ie+=A[F]}else{ie+=Math.abs(A[F]-A[F-1])}var eN=ie-Math.floor(ie),gr=1;
if(eN==0){gr=0}M[F]=b(M[F],{al2:eG[Math.floor(ie)],aiB:eG[Math.floor(ie)+gr],amn:eN},S)}}return M}function D(L,A){var S=C(A,L),M=W(A,L),N=[],s=[],V=[],g8=e(L);
for(var F=0;F<A.length-1;++F){N.push(A[F]);s.push(S[F]);V.push(M[F]);var n=k(A[F],A[F+1],g8),cQ=K(S[F],S[F+1],g8,L),hk=g(M[F],M[F+1],g8,L);
for(var eG=0;eG<n.length;++eG){N.push(n[eG]);s.push(cQ[eG]);V.push(hk[eG])}}N.push(A[A.length-1]);s.push(S[S.length-1]);
V.push(M[M.length-1]);return{aic:N,arI:s,Hl:V}}function a(L,A,S,M){var N=new Float32Array(2*M),s=L.length/2,V=s-A,g8=S*V,n=g8/M;
for(var F=0;F<M;++F){var cQ=Math.floor(A+F*n),hk=Math.ceil(A+F*n),S=A+F*n,eG=hk-cQ,ie=1,eN=0;if(eG!=0){ie=(hk-S)/eG;
eN=(S-cQ)/eG}N[2*F]=ie*L[2*cQ]+eN*L[2*hk];N[2*F+1]=ie*L[2*cQ+1]+eN*L[2*hk+1]}return N}function _(L,A,S){var M=S.ahT,N=A*2*Math.PI,s=N,V=0;
if(S.shape==0){V=(Math.sin(2*s+Math.PI/2)+1)/2}else if(S.shape==1){V=(Math.sin(s+Math.PI/2)+1)/2}else{V=(4*Math.sin(3/4*s+Math.PI)+Math.sin(Math.PI/2+2*s)-2*s/Math.PI+6)/7}return Math.min(1,1-M+M*V)}function I(L,A,S,M){var N=[];
for(var F=0;F<L.length;++F){N.push(a(L[F],A[F],S[F],M))}return N}function f(L,A,S){var M=[];for(var F=0;
F<L.length;++F){var N=z(2*Math.PI*S.random()),s=z(2*Math.PI*S.random()),V=S.Jp*.5*O({e_:1})/O(S),g8=V*S.nf/200,n=V*A/500,cQ=new Float32Array(L[0].length);
for(var hk=0;hk<L[0].length/2;++hk){var eG=z(2*Math.PI*S.random()),ie=2*hk/L[0].length;cQ[2*hk]=L[F][2*hk]+g8*(eG[0]+((1-ie)*N[0]+ie*s[0]));
cQ[2*hk+1]=L[F][2*hk+1]+n*(eG[1]+((1-ie)*N[1]+ie*s[1]))}M.push(cQ)}return M}function y(L,A,S){var M=S.zn,N=2/M,s=[1/10,1/30,1/40,1/45,1/100],V=s[S.e_-1],g8=4*(S.opacity/25*N*V)*(1-S.Jp/150),eG=0,eN=0;
if(S.style==3){return g8*.09}var n=2.2*(L-.5),cQ=n*n*n*n+.27+Math.max(0,(S.opacity-50)/15),hk=2*(Math.sin(3*Math.PI*A)/(Math.PI*A+2)+1.1)-A/2;
A=2*A;if(A<.41){var ie=2*Math.PI*A/.41;eG=(Math.sin(ie-Math.PI/2)+1)/4+.5}else if(A<.77){var ie=2*Math.PI*(A-.41)/.36;
eG=(Math.sin(ie-Math.PI/2)+1)/4+.5-ie/2/Math.PI*.5}else{var ie=2*Math.PI*(A-.77)/.23;eG=(Math.sin(ie-Math.PI/2)+1)/2*.12}eG*=3;
eG+=Math.max(0,(S.opacity-50)/15);if(S.type==6){eN=hk}else{eN=eG}return g8*cQ*eN}function Z(L){return{H:L.random()*7/2+.5,HK:L.random()*2*Math.PI}}function v(L,A,S){return S.nf/300*P({e_:1})/P(S)*10*(Math.sin(A.H*2*Math.PI*L+A.HK)+10*(S.random()-.5))}function G(L){var A=Math.exp(-L.Ye/25);
return{H:L.random()*3/2+.5,HK:L.random()*2*Math.PI,tt:(L.random()-.5)*10*A}}function q(L,A){var S=Math.ceil(J(L)),M=[];
for(var F=0;F<=S;++F){M.push(G(A))}return M}function h(L,A){var S=A.H*4*Math.PI*L+A.HK;return Math.exp(-1/2*Math.PI*L)*Math.cos(S)*Math.cos(S)*Math.cos(S)*Math.cos(S)*Math.cos(S)+L*A.tt-A.tt/4}function r(L,A,S,M,N){var s=0,V=O(A)-1;
for(var F=0;F<V;++F){for(var g8=0;g8<L.length-1;g8+=P(A)-1){for(var n=F;n<L[0].length/2-V;n+=V){for(var cQ=g8;
cQ<g8+(P(A)-1);++cQ){S[N+s]=y(cQ*(A.zn-1)/(L.length-1)%1,n/L[0].length,A);var hk=0,eG=0;if(A.type==6&&cQ!=0&&cQ!=L.length-1){eG=(L[cQ][2*(n+1)+1]-L[cQ][2*n+1])/2;
hk=(L[cQ][2*(n+1)]-L[cQ][2*n])/2}M[8*N+8*s]=L[cQ][2*n]+hk;M[8*N+8*s+1]=L[cQ][2*n+1]+eG;M[8*N+8*s+2]=L[cQ][2*(n+V)]+hk;
M[8*N+8*s+3]=L[cQ][2*(n+V)+1]+eG;M[8*N+8*s+4]=L[cQ+1][2*(n+V)];M[8*N+8*s+5]=L[cQ+1][2*(n+V)+1];M[8*N+8*s+6]=L[cQ+1][2*n];
M[8*N+8*s+7]=L[cQ+1][2*n+1];++s}}}}}function H(L){var A=[100,300,500,700,1e3];return A[L.e_-1]}function o(L){var A=[30,70,100,140,300];
return A[L.e_-1]}function P(L){var A=[5,7,26,40,100];return A[L.e_-1]}function O(L){if(L.e_==1){return 4}else if(L.e_==2){return 8}else{return Math.floor(o(L)/9)}}function p(L){var A=L.zn,S=new Float32Array(A),M=null;
for(var F=0;F<A;++F){S[F]=L.random()}if(L.zn<=3){S[0]=0;S[L.zn-1]=1}else{for(var F=0;F<2;++F){var N=Math.floor(L.random()*A);
if(M==null||M!=N){S[N]=F;M=N}else{S[N+1]=F}}}return S}function C(L,A){var S=[],M=.2,s=0;for(var F=0;
F<L.length;++F){var N=A.random()*(1-M)+M;S.push(N)}var V=Math.min(3,A.zn);for(var F=0;F<L.length;++F){if(S[F]>.9){++s}}while(s<V){var g8=Math.floor(A.random()*L.length);
if(S[g8]<=.9){S[g8]=.9+.1*A.random();++s}}return S}function W(L,A){var S=H(A),M=H({e_:1}),N=[];for(var F=0;
F<L.length;++F){N.push(Math.max(1,(A.random()*10+2)*S/M))}return N}function J(L){var A=0;for(var F=0;
F<L.length;++F){if(F==0){A+=L[F]}else{A+=Math.abs(L[F]-L[F-1])}}return A}function t(L,A){if(L.length/2-1==H(A)){return L}var S=new Float32Array(2*(H(A)+1)),M=(L.length-2)/(S.length-2);
for(var F=0;F<S.length/2;++F){var N=F*M,s=Math.floor(N),V=Math.ceil(N),g8=V-s,n=1,cQ=0;if(g8!=0){n=(V-N)/g8;
cQ=(N-s)/g8}S[2*F]=n*L[2*s]+cQ*L[2*V];S[2*F+1]=n*L[2*s+1]+cQ*L[2*V+1]}return S}function Y(L,A){var S=L.length/2,M=U(L),N=M/S,s=!1,n=0,cQ=0,hk=1;
if(A){var V=Math.floor(M/A.avV),g8=A.avV;if(A.ano&&L[0]==L[L.length-2]&&L[1]==L[L.length-1]){s=!0;g8=M/(V+1)}if(A.type==2&&!s&&g8*V+A.length>M){S=V+1}else{S=V+2}N=g8}var eG=new Float32Array(S*2);
eG[0]=L[0];eG[1]=L[1];for(var F=1;F<S;++F){while(n<=F*N){cQ=n;n+=c([L[2*hk],L[2*hk+1]],[L[2*(hk-1)],L[2*(hk-1)+1]]);
++hk}var ie=1-(F*N-cQ)/(n-cQ);eG[2*F]=(1-ie)*L[2*hk]+ie*L[2*(hk-1)];eG[2*F+1]=(1-ie)*L[2*hk+1]+ie*L[2*(hk-1)+1]}eG[eG.length-2]=L[L.length-2];
eG[eG.length-1]=L[L.length-1];return eG}function l(L,A){var S=Y(L,A),M=[];for(var F=0;F<(S.length-2)/2;
++F){var N=[];N.push(S[2*F]);N.push(S[2*F+1]);var s=c([S[2*(F+1)],S[2*(F+1)+1]],[S[2*F],S[2*F+1]]),V=[(S[2*(F+1)]-S[2*F])/s,(S[2*(F+1)+1]-S[2*F+1])/s],g8=z((A.arA-90)/360*2*Math.PI),n=V;
if(A.type==3){n=g8}else if(A.type==4){n=z(j(V)+j(g8))}else if(A.type==5){n=z(((A.random()-.5)*A.arA-90)/360*2*Math.PI)}var cQ=A.length;
if(A.aA0){cQ=2*A.random()*A.length}N.push(S[2*F]+n[0]*cQ);N.push(S[2*F+1]+n[1]*cQ);M.push(N)}return M}function m(L){if(L.a7N){L.mV=100*Math.random()}else{L.mV=L.aC8}L.random=new Q;
L.random(L.mV);if(L.type==6){L.zn=2;L.shape=5;L.aoO=0}}function B(L,A){L=t(L,A);var S=[L],cQ=0;if(A.type>=2&&A.type<6){S=l(L,A)}var M=O(A)-1,N=o(A)-M,s=(A.zn-1)*(P(A)-1),V=S.length*N*s,g8=new Float32Array(V),n=new Float32Array(8*V);
for(var F=0;F<S.length;++F){for(var hk=0;hk<1e4;++hk){A.mV=x(A.mV)}A.random(A.mV);var L=t(S[F],A),eG=p(A),ie=J(eG),eN=T(L,eG,A),gr=D(A,eG),ek=R(gr.aic,eN,A);
ek=I(ek,gr.Hl,gr.arI,o(A));if(A.Jp>0){ek=f(ek,U(S[F]),A)}r(ek,A,g8,n,cQ);cQ+=N*s}return[g8,n]}var gU=function(L){var A=performance.now(),S=L[0],M=L[1];
m(M);var N=[new Float32Array(0),new Float32Array(0)];for(var F=0;F<S.length;++F){M.mV=x(M.mV);var s=B(S[F],M),V=new Float32Array(N[0].length+s[0].length),g8=new Float32Array(N[1].length+s[1].length);
V.set(N[0]);V.set(s[0],N[0].length);N[0]=V;g8.set(N[1]);g8.set(s[1],N[1].length);N[1]=g8}var n=performance.now();
if(M.aAN){console.pO("Geometry: "+String(n-A)+"ms")}return N};return gU}(),aA=function(){function x(z,j){var U=[],i=0,b=j.length,e=0,k=0,K=new gh,g=0,R=1e9;
for(k=0;k<b;k++){var T=k*8,D=j[k];if(D<R)R=D;var a=z[T+0],_=z[T+1],I=z[T+2],f=z[T+3],y=z[T+4],Z=z[T+5],v=z[T+6],G=z[T+7],q=Math.min(a,I,y,v),h=Math.max(a,I,y,v),r=Math.min(_,f,Z,G),H=Math.max(_,f,Z,G),o=new gh(q,r,h-q,H-r),P=o.iO(K),O=g+D;
if(k-e<10&&(k==e||P.P()*.8<o.P()+K.P())){K=P;g=O}else{U.push(k-e);e=k;K=o;g=D;R=D}}if(k!=e)U.push(k-e);
return U}function Q(z,j,U,i,b,e){var k=document.createElement("canvas"),_=0,V=.8;k.width=j;k.height=U;
var K=k.getContext("2d"),g=b[0],R=b[1],T=new Float64Array(j*U),D=Date.now(),a=x(R,g);for(var I=0;I<a.length;
I++){var f=_,y=_+a[I],G=1e9,h=1e9,C=0;_=y;var Z=f*8,v=y*8,q=-G,r=-h;for(var H=Z;H<v;H+=2){var o=R[H],P=R[H+1];
if(o<G)G=o;if(o>q)q=o;if(P<h)h=P;if(P>r)r=P}G=Math.floor(G);q=Math.ceil(q);h=Math.floor(h);r=Math.ceil(r);
var O=q-G,p=r-h;for(var W=f;W<y;W++)C+=g[W];for(var H=Z;H<v;H+=8){var J=g[H>>>3],t=R[H+0],Y=R[H+1],l=R[H+2],m=R[H+3],B=R[H+4],L=R[H+5],A=R[H+6],S=R[H+7];
K.fillStyle="rgba(0,0,0,"+J/C+")";K.beginPath();K.moveTo(t,Y);K.lineTo(l,m);K.lineTo(B,L);K.lineTo(A,S);
K.closePath();K.fill()}var M=K.getImageData(G,h,O,p).data;for(var P=0;P<p;P++)for(var o=0;o<O;o++){var F=P*O+o,N=M[F*4+3],s=(h+P)*j+G+o;
if(N!=0)T[s]+=N*C}K.clearRect(G,h,O,p)}var g8=e[1].color,n=Math.pow(g8.Z/255,V),cQ=Math.pow(g8.r/255,V),hk=Math.pow(g8.J/255,V),eG=new gh(0,0,j,U),ie=d.R(j*U*4);
for(var P=0;P<U;P++)for(var o=0;o<j;o++){var F=P*j+o,W=F*4,g=T[F]*(1/255);ie[W]=$(n,g);ie[W+1]=$(cQ,g);
ie[W+2]=$(hk,g);ie[W+3]=Math.min(255,g*255)}d.l.UY("norm",ie,eG,i,eG,eG,1)}var c=new Uint8Array(2e3);
for(var F=0;F<2e3;F++)c[F]=255*Math.min(1,Math.log(F/700+1));function $(z,j){return c[Math.min(1500,~~(z*j*1e3))]}return Q}(),hi=function(){var x=new Float32Array(3e3),Q=new Float32Array(3e3),c=new Float32Array(256),$=new Float32Array(3e3);
function z(){var R=x.length;x[0]=Math.log10(157647e-9);for(var F=1;F<R;++F)x[F]=Math.log10(F/R)}function j(){var R=Q.length;
for(var F=0;F<R;++F)Q[F]=Math.pow(10,20*(F-R/2)/R)}function U(){var R=c.length;for(var F=0;F<R;++F)c[F]=d.t9(F/255)}function i(){var R=$.length;
for(var F=0;F<R;++F)$[F]=255*d.Yw(F/(R-1))}function b(R,T){var D=R.length>>>2;for(var F=0;F<D;++F){var a=c[R[4*F]],_=c[R[4*F+1]],I=c[R[4*F+2]],f=.3811*a+.5783*_+.0402*I,y=.1967*a+.7244*_+.0782*I,Z=.0241*a+.1288*_+.8444*I;
f=x[~~(f*x.length)];y=x[~~(y*x.length)];Z=x[~~(Z*x.length)];T[3*F]=(f+y+Z)*.5773502692;T[3*F+1]=(f+y-2*Z)*.4082482905;
T[3*F+2]=(f-y)*.7071067812}}function e(R,T){var D=T.length>>>2,a=$.length-1;for(var F=0;F<D;++F){var _=.5773502692*R[3*F],I=.4082482905*R[3*F+1],f=.7071067812*R[3*F+2],y=Q[~~((_+I+f+10)*(3e3/20))],Z=Q[~~((_+I-f+10)*(3e3/20))],v=Q[~~((_-2*I+10)*(3e3/20))],G=4.4679*y-3.5873*Z+.1193*v,q=-1.2186*y+2.3809*Z-.1624*v,h=.0497*y-.2439*Z+1.2045*v;
T[4*F]=$[~~(a*Math.max(0,Math.min(1,G)))];T[4*F+1]=$[~~(a*Math.max(0,Math.min(1,q)))];T[4*F+2]=$[~~(a*Math.max(0,Math.min(1,h)))]}}function k(R){var T=0,D=0,a=0;
for(var F=0;F<R.length;F+=3){T+=R[F];D+=R[F+1];a+=R[F+2]}return[T/(R.length/3),D/(R.length/3),a/(R.length/3)]}function K(R,k){var T=0,D=0,a=0;
for(var F=0;F<R.length;F+=3){var _=R[F]-k[0],I=R[F+1]-k[1],f=R[F+2]-k[2];T+=_*_;D+=I*I;a+=f*f}return[Math.sqrt(T/(R.length/3)),Math.sqrt(D/(R.length/3)),Math.sqrt(a/(R.length/3))]}function g(R,T,D,a,_,I){z();
j();U();i();var f=0,Y,l;if(I[0]>100)f=-(I[0]-100)/100*.13;else if(I[0]>=75)f=(100-I[0])/25*.04;else if(I[0]>=50)f=.04+(75-I[0])/25*.04;
else if(I[0]>=25)f=.08+(50-I[0])/25*.08;else f=.16+(25-I[0])/25*.24;var y=(I[1]-100+100)/100,Z=I[2]/100,v=I[3],G=new Float32Array(R.length*3/4),q=new Float32Array(a.length*3/4),h=Date.now();
b(R,G);b(a,q);var r=Date.now(),H=k(G),o=k(q),P=Date.now(),O=K(G,H),p=K(q,o),C=Date.now();o[0]*=Math.pow(10,f);
var W=[p[0]/O[0],p[1]/O[1],p[2]/O[2]],J=G.length,t=1/-1.1546978950500488;for(var F=0;F<J;F+=3){if(v){var m=Math.max(0,Math.min(1,G[F]*t));
m=1-Math.sqrt(m);Y=m*o[1];l=m*o[2]}else{Y=o[1];l=o[2]}G[F]=(G[F]-H[0])*W[0]+o[0];G[F+1]=(G[F+1]-H[1])*W[1]*y+Y;
G[F+2]=(G[F+2]-H[2])*W[2]*y+l}var B=Date.now();e(G,_);var L=_.length>>>2;for(var F=0;F<L;++F){_[4*F]=(1-Z)*_[4*F]+Z*R[4*F];
_[4*F+1]=(1-Z)*_[4*F+1]+Z*R[4*F+1];_[4*F+2]=(1-Z)*_[4*F+2]+Z*R[4*F+2];_[4*F+3]=255}}return g}(),eK=function(){function x(Q,c,$,z,j){var U=[-1,-1,-1,-1],i=255,b=160,e,k=!1,K=new Array(4);
K[0]=new Array(c);K[1]=new Array($);K[2]=new Array(c);K[3]=new Array($);var g=new Array(2);g[0]=new Array($);
g[1]=new Array($);function R(p,C,W,J,t){this.start=J;this.axis=t;this.dir=p;this.end=-1;this.source=C;
this.P=W}function T(p,C,W,J,t){if(W%2==0){if(!K[W][p])K[W][p]=new Array;K[W][p].push(new R(W,J,t,C,p))}else{if(!K[W][C])K[W][C]=new Array;
K[W][C].push(new R(W,J,t,p,C))}var Y=Date.now()}function D(F){var p=!1,C=0;if(Q[4*F+3]<i)return p;var W=F%c,J=Math.floor(F/c);
a(W,J);if(F+c<c*$&&Q[4*(F+c)+3]<i&&Q[4*(F-c)+3]>=i&&Q[4*(F-2*c)+3]>=i){var t=2;if(Q[4*(F+c)+3]<=b)C=-1;
if(Q[4*(F+2*c-1)+3]<i&&Q[4*(F+2*c+1)+3]<i)p=!0;else if(Q[4*(F+2*c-1)+3]>=i&&Q[4*(F+1)+3]>=i)p=!0;else if(Q[4*(F+2*c+1)+3]>=i&&Q[4*(F-1)+3]>=i)p=!0;
T(W,J,t,C,p)}else if(F-c>=0&&Q[4*(F-c)+3]<i&&Q[4*(F+c)+3]>=i&&Q[4*(F+2*c)+3]>=i){var t=0;if(Q[4*(F-c)+3]<=b)C=-1;
if(Q[4*(F-2*c-1)+3]<i&&Q[4*(F-2*c+1)+3]<i)p=!0;else if(Q[4*(F-2*c-1)+3]>=i&&Q[4*(F+1)+3]>=i)p=!0;else if(Q[4*(F-2*c+1)+3]>=i&&Q[4*(F-1)+3]>=i)p=!0;
T(W,J,t,C,p)}C=0;if(F+1<c*$&&Q[4*(F+1)+3]<i&&Q[4*(F-1)+3]>=i&&Q[4*(F-2)+3]>=i){var t=3;if(Q[4*(F+1)+3]<=b)C=-1;
if(!p&&Q[4*(F+c+2)+3]<i&&Q[4*(F-c+2)+3]<i){p=!0;T(W,J,t,C,!0)}else T(W,J,t,C,!1)}else if(F>=1&&Q[4*(F-1)+3]<i&&Q[4*(F+1)+3]>=i&&Q[4*(F+2)+3]>=i){var t=1;
if(Q[4*(F-1)+3]<=b)C=-1;if(!p&&Q[4*(F+c-2)+3]<i&&Q[4*(F-c-2)+3]<i){p=!0;T(W,J,t,C,!0)}else T(W,J,t,C,!1)}return p}function a(F,p){if(U[0]==-1){U[0]=F;
U[1]=p;U[2]=1;U[3]=1}if(F<U[0]){U[2]+=U[0]-F;U[0]=F}if(F>U[0]+U[2])U[2]=F-U[0];if(p<U[1]){U[3]+=U[1]-p;
U[1]=p}if(p>U[1]+U[3])U[3]=p-U[1]}function _(p,F,C,W){if(!C.P)return;var J=(p+2)%4,t=C.start,Y=U[1];
if(p==2)Y+=U[3];else if(p==1)Y=U[0];else if(p==3)Y=U[0]+U[2];var l=C.source;if(K[J][F])for(var m=0;m<K[J][F].length;
++m){if(p>1){var B=t+Math.floor((K[J][F][m].start-t)/2);if(K[J][F][m].start>t&&B<Y)Y=B}else{var B=t-Math.floor((t-K[J][F][m].start)/2);
if(K[J][F][m].start<t&&B>Y)Y=B}}for(var L=1;L<Math.abs(Y-t);++L){var m=t+L;if(p==1||p==0)m=t-L;for(var A=0;
A<2;++A){var S=2*A,M=!1;if(p%2==0)S+=1;if(K[S][m]){for(var N=0;N<K[S][m].length;++N){if(K[S][m][N].P){var s=K[S][m][N].start,V=F-s,g8=m-t;
if(S==0||S==1)V=-V;if(V<=0)continue;if(p==0||p==1)g8=-g8;if(g8>V){Y=m;M=!0;break}}}if(M)break}}}C.end=Y;
y(p,F,t,Y,l)}function I(p){for(var F=0;F<K[p].length;++F){if(K[p][F])for(var C=0;C<K[p][F].length;++C){_(p,F,K[p][F][C])}}}function f(){var p=[2,0,3,1];
for(var F=0;F<p.length;++F)I(p[F])}function y(p,F,C,W,J){if(p==2)for(var t=C;t<=W;++t){if(!Z(t*c+F,(C+J)*c+F))return!1}else if(p==0)for(var t=C;
t>=W;--t){if(!Z(t*c+F,(C-J)*c+F))return!1}else if(p==1)for(var t=C;t>=W;--t){if(!Z(F*c+t,F*c+C-J))return!1}else if(p==3)for(var t=C;
t<=W;++t){if(!Z(F*c+t,F*c+C+J))return!1}}function Z(p,C){if(!e[p]){z[4*p]=z[4*C];z[4*p+1]=z[4*C+1];z[4*p+2]=z[4*C+2];
if(k)z[4*p+3]=255;e[p]=!0;return!0}return!1}function v(){for(var F=0;F<4;F+=1){for(var p=0;p<K[F].length;
++p){if(K[F][p])for(var C=0;C<K[F][p].length;++C){var W=K[F][p][C];for(var J=1;J<3;J+=2){var t=(F+J)%4;
if(K[t][W.start])for(var Y=0;Y<K[t][W.start].length;++Y){if(K[t][W.start][Y].start==W.axis){var jF=c*W.start+W.axis;
if(F%2==1){jF=W.start+c*W.axis;G(K[t][W.start][Y])}else G(W)}}}}}}}function G(p){if(p.dir%2==0){var jF=c*p.start+p.axis,C=p.start,W=1;
if(!e[jF+1])W=3;else if(e[jF-1])return;var J=z[4*jF],t=z[4*jF+1],Y=z[4*jF+2];while(z[4*jF]==J&&z[4*jF+1]==t&&z[4*jF+2]==Y){if(W==1){if(!g[0][C])g[0][C]=new Array;
g[0][C].push(new R(W,0,!1,p.axis,C))}else{if(!g[1][C])g[1][C]=new Array;g[1][C].push(new R(W,0,!1,p.axis,C))}if(p.dir==2){jF+=c;
C++}else{jF-=c;C--}}}}function q(){for(var p=0;p<2;++p){var C=(p+1)%2;for(var F=0;F<g[p].length;++F){if(g[p][F])for(var W=0;
W<g[p][F].length;++W){var J=U[0];if(p==1)J+=U[2];var t=g[p][F][W].start;if(g[C][F])for(var Y=0;Y<g[C][F].length;
++Y){var l=g[C][F][Y].ks;if(p==0){if(l>J&&l<t){J=t-Math.floor((t-l)/2)}}else{if(l<J&&l>t){J=t+Math.ceil((l-t)/2)}}}if(p==0)y(g[p][F][W].dir,F,t-1,J,-1);
else y(g[p][F][W].dir,F,t+1,J,-1)}}}for(var F=0;F<e.length;++F){if(!e[F]&&F%c>=U[0]&&F%c<=U[0]+U[2]&&Math.floor(F/c)>=U[1]&&Math.floor(F/c)<=U[1]+U[3]){var t=c;
if(F<t||!e[F-t])t=1;z[4*F]=z[4*(F-t)];z[4*F+1]=z[4*(F-t)+1];z[4*F+2]=z[4*(F-t)+2];e[F]=!0;if(k)z[4*F+3]=255}}}function h(){e=new Array(Q.length/4);
for(var F=0;F<z.length/4;++F){e[F]=!1;z[4*F]=Q[4*F];z[4*F+1]=Q[4*F+1];z[4*F+2]=Q[4*F+2];z[4*F+3]=Q[4*F+3];
if(z[4*F+3]==255)e[F]=!0;if(D(F))e[F]=!1}if(U[0]>0){U[0]--;U[2]++}if(U[1]>0){U[1]--;U[3]++}if(U[0]+U[2]<c){U[2]++}if(U[1]+U[3]<$){U[3]++}}var r=Date.now();
h();var H=Date.now();f();var o=Date.now();v();var P=Date.now();q();var O=Date.now();console.log("Init: "+String(H-r));
console.log("Filling: "+String(o-H));console.log("Check areas: "+String(P-o));console.log("Fill areas: "+String(O-P))}return x}();
function eC(){}eC.ajm=function(x){var Q=[d.t9(x[0]),d.t9(x[1]),d.t9(x[2]),0];return d.gg.V3(d.gg.azZ,Q)};
eC.asg=function(x){var Q=d.gg.V3(d.gg.PV,x);return[d.Yw(Q[0]),d.Yw(Q[1]),d.Yw(Q[2])]};eC.u_=function(x,Q){var c={},$=5003,z=1667,j=25e3,U=57.4,i=16.1,b=1.8,e=0,k=1.54,K=.75,T=0;
if(Q>0){x-=Q/100*4}if(x<0){i=22.54;U=80.36;k=.756}if(Q>0){b=1.3;K=.2}var g=Math.min($+U*x,j),R=Math.max($-i*x,z);
if(x<0){g=Math.max($+i*x,z);R=Math.min($-U*x,j)}if(x>0){if(x<=14){T=(x-1)/13*.075+.025}else if(x<=29){T=.1}else if(x<=60){T=.1-.1*(x-29)/(60-29)}else{var D=x-60;
e=-20*(D/40);T=-.3*(D/40)}}else{if(x<-60){var D=x+60;e=-20*(D/40)}}var a=Math.abs(x)/100*k+Math.abs(Q)/100*K+T,_=-(Q*b+e),I=f5.s1(g,-_),f=f5.yB(I),y=f5.s1(R,0),Z=f5.yB(y),v=f5.arS(f,Z);
c.a7M=a;c.a0i=v;if(x==0&&Q==0)c.a2H=!0;else c.a2H=!1;return c};eC.awY=function(x,Q,c,$){if($.a2H){return[x,Q,c]}var z=this.ajm([x,Q,c]),j=z[0],U=z[1],i=z[2],b=U+1e-12,e=[j/b,U/b,i/b,0],k=d.gg.V3($.a0i,e),K=0,g=.4;
k[0]*=b;k[1]*=b;k[2]*=b;if(b>g)K=1/(1-g)*(b-g);z[0]=(1-K)*k[0]+K*j;z[1]=(1-K)*k[1]+K*U;z[2]=(1-K)*k[2]+K*i;
return this.asg(z)};d.a65={Mh:function(x,Q){var F=x.length;x.push(Q);var c=F>>>1;while(c!=0&&x[F][0]<x[c][0]){var $=x[F];
x[F]=x[c];x[c]=$;F=c;c=F>>>1}},Zc:function(x){if(x.length==2)return x.pop();var top=x[1],F=1;x[1]=x.pop();
var Q=x.length;while(!0){var c=F<<1,$=c+1,z=F;if(c<Q&&x[c][0]<x[z][0])z=c;if($<Q&&x[$][0]<x[z][0])z=$;
if(z==F)break;var j=x[F];x[F]=x[z];x[z]=j;F=z}return top},avm:function(x){for(var F=1;F<x.length;F++){var Q=F,c=1e9;
while(Q!=0){var $=x[Q][0];if($>c){console.log(F);throw"e"}c=$;Q=Q>>>1}}}};d.l={};d.l.DV=new Float64Array(256);
d.l.$$=new Uint8Array(256*256);d.l.bK=new Uint8Array(256*256);(function(){for(var F=0;F<256;F++)d.l.DV[F]=255/F;
for(var F=0;F<256;F++)for(var x=0;x<256;x++)d.l.$$[F*256+x]=F==0?0:Math.round(x*255/F);for(var F=0;F<256;
F++)for(var x=0;x<256;x++)d.l.bK[F*256+x]=Math.round(F*(255-x)/255)}());d.l.UY=function(x,Q,c,$,z,j,U,i){if(i==null)i=en.co();
if("idiv,lbrn,div ,lddg,vLit,lLit,hMix,diff".split(",").indexOf(x)==-1){U=U*i.fill;i.fill=1;i.style=!1}var b="norm,dark,mul ,idiv,lbrn,lite,scrn,div ,lddg,over,sLit,hLit,vLit,lLit,pLit,hMix,diff,smud,fsub,fdiv".split(","),e="dkCl,lgCl,hue ,sat ,colr,lum ".split(","),k=d.l[x+"F"];
if(i.lf==null&&x=="norm")d.l.ae0(Q,c,$,z,j,U,k,i.N9?1:0);else if(x=="diss")d.l.adY(Q,c,$,z,j,U,k,i.N9?1:0);
else if(b.indexOf(x)!=-1)d.l.ayL(Q,c,$,z,j,U,k,i);else if(e.indexOf(x)!=-1)d.l.ai_(Q,c,$,z,j,U,k,i)};
d.l.a9L=function(x,Q,c){var $=x*c+1-c;return $<.001?0:1-Math.min(1,(1-Q)/$)};d.l.aoD=function(x,Q,c){return x*c==1?1:Math.min(1,Q/(1-x*c))};
d.l.MC=function(x){return x<=.25?((16*x-12)*x+4)*x:Math.sqrt(x)};d.l.normF=function(x,Q,c){return x};
d.l.darkF=function(x,Q,c){return Math.min(x,Q)};d.l["mul F"]=function(x,Q,c){return x*Q};d.l.idivF=function(x,Q,c){var $=x*c+1-c;
return Q==1?1:1-Q>=$?0:1-(1-Q)/$};d.l.lbrnF=function(x,Q,c){return Math.max(0,x*c+Q-c)};d.l.dkClF=function(x,Q,c){var $=d.jY(x)<d.jY(Q)?x:Q;
c.Z=$.Z;c.r=$.r;c.J=$.J;return c};d.l.liteF=function(x,Q,c){return Math.max(x,Q)};d.l.scrnF=function(x,Q,c){return Q+x-Q*x};
d.l["div F"]=function(x,Q,c){x*=c;return Q==0?0:Q>=1-x?1:Q/(1-x)};d.l.lddgF=function(x,Q,c){x*=c;return Math.min(1,x+Q)};
d.l.lgClF=function(x,Q,c){var $=d.jY(x)>d.jY(Q)?x:Q;c.Z=$.Z;c.r=$.r;c.J=$.J;return c};d.l.overF=function(x,Q,c){return d.l.hLitF(Q,x,c)};
d.l.sLitF=function(x,Q,c){return x<=.5?Q-(1-2*x)*Q*(1-Q):Q+(2*x-1)*(d.l.MC(Q)-Q)};d.l.hLitF=function(x,Q,c){return x<=.5?d.l["mul F"](2*x,Q,c):d.l.scrnF(2*x-1,Q,c)};
d.l.vLitF=function(x,Q,c){return x<=.5?d.l.a9L(2*x,Q,c):d.l.aoD(2*x-1,Q,c)};d.l.lLitF=function(x,Q,c){return x<=.5?d.l.lbrnF(2*x,Q,c):d.l.lddgF(2*x-1,Q,c)};
d.l.pLitF=function(x,Q,c){return x<=.5?d.l.darkF(2*x,Q,c):d.l.liteF(2*x-1,Q,c)};d.l.hMixF=function(x,Q,c){if(c>.99)return x+Q<1?0:1;
return Math.min(1,Math.max(0,(Q+x*c-c)/(1-c+1e-6)))};d.l.diffF=function(x,Q,c){x*=c;return Math.abs(x-Q)};
d.l.smudF=function(x,Q,c){return x+Q-2*x*Q};d.l.fsubF=function(x,Q,c){return Math.max(Q-x,0)};d.l.fdivF=function(x,Q,c){return Math.min(Q/x,1)};
d.l["hue F"]=function(x,Q,c){d.l.p8(x,d.kI(Q),c);d.l.y6(c,d.jY(Q),c)};d.l["sat F"]=function(x,Q,c){d.l.p8(Q,d.kI(x),c);
d.l.y6(c,d.jY(Q),c)};d.l.colrF=function(x,Q,c){d.l.y6(x,d.jY(Q),c)};d.l["lum F"]=function(x,Q,c){d.l.y6(Q,d.jY(x),c)};
d.l.y6=function(x,Q,c){var $=Q-d.jY(x);c.Z=x.Z+$;c.r=x.r+$;c.J=x.J+$;d.l.a8h(c)};d.l.a8h=function(x){var Q=x.Z,c=x.r,$=x.J,z=d.I5(Q,c,$),jF=Math.min(Q,c,$),j=Math.max(Q,c,$);
if(jF<0){var U=z/(z-jF);Q=z+(Q-z)*U;c=z+(c-z)*U;$=z+($-z)*U}if(j>1){var U=(1-z)/(j-z);Q=z+(Q-z)*U;c=z+(c-z)*U;
$=z+($-z)*U}x.Z=Q;x.r=c;x.J=$};d.l.p8=function(x,Q,c){var $=d.l.ag8,z=x.Z,j=x.r,U=x.J;if(z==j&&j==U){c.Z=c.r=c.J=0}else if(z>j){if(z>U){if(j>U){c.Z=Q;
c.r=$(z,j,U,Q);c.J=0}else{c.Z=Q;c.J=$(z,U,j,Q);c.r=0}}else{c.J=Q;c.Z=$(U,z,j,Q);c.r=0}}else{if(z<U){if(j>U){c.r=Q;
c.J=$(j,U,z,Q);c.Z=0}else{c.J=Q;c.r=$(U,j,z,Q);c.Z=0}}else{c.r=Q;c.Z=$(j,z,U,Q);c.J=0}}};d.l.ag8=function(x,Q,c,$){return(Q-c)*$/(x-c)};
d.l.ae0=function(x,Q,c,$,z,j,U,i){var b=Q.y_($).y_(z),e=Math.max(0,b.x-Q.x),k=Math.max(0,b.x-$.x),K=Math.max(0,b.y-Q.y),g=Math.max(0,b.y-$.y),R=b.m,T=b.e,D=Q.m,a=$.m,_=d.l.$$,I=d.l.bK,f=new Uint32Array(x.buffer),y=new Uint32Array(c.buffer);
for(var F=0;F<T;F++){var Z=(K+F)*D+e,v=(g+F)*a+k;for(var G=0;G<R;G++){var q=f[Z+G],W=1;if(q>>>24==0)continue;
if(q>>>24==255&&j==1&&i==0){y[v+G]=f[Z+G];continue}var h=y[v+G],r=q&255,H=q>>>8&255,o=q>>>16&255,P=h&255,O=h>>>8&255,p=h>>>16&255,C=j,J=(h>>>24)*(1/255);
if(i==0){C=(q>>>24)*j*(1/255);W=J}var t=W*(1-C),Y=C+t,l=1/Y;y[v+G]=~~(.5+(i*J+(1-i)*Y)*255)<<24|~~(.5+(o*C+p*t)*l)<<16|~~(.5+(H*C+O*t)*l)<<8|~~(.5+(r*C+P*t)*l)}}};
d.l.a4L=function(x,Q,c,$,z,j){var U=Q.y_($).y_(z),i=Math.max(0,U.x-Q.x),b=Math.max(0,U.x-$.x),e=Math.max(0,U.y-Q.y),k=Math.max(0,U.y-$.y),K=U.m,g=U.e,R=Q.m,T=$.m,D=d.l.$$,a=d.l.bK,_=new Uint32Array(x.buffer),I=new Uint32Array(c.buffer),f=Math.floor(Math.random()*16777215),y=0;
for(var F=0;F<g;F++){var Z=(e+F)*R+i,v=(k+F)*T+b;for(var G=0;G<K;G++){var q=_[Z+G];if(q>>>24==0)continue;
if(q>>24==255&&j==1){I[v+G]=q;continue}var h=I[v+G],r=(q>>>24)*j*(1/255),H=(h>>>24)*(1/255),o=H*(1-r),P=r+o,O=q&255,p=q>>>8&255,C=q>>>16&255,W=h&255,J=h>>>8&255,t=h>>>16&255;
y>>>=8;if((G&3)==0)y=d.l.fo(v+G+f);var Y=P==0?0:1/P,l=Math.floor(P*(256*255))+(y&255)>>>8,m=Math.floor((C*r+t*o)*Y+.5),B=Math.floor((p*r+J*o)*Y+.5),L=Math.floor((O*r+W*o)*Y+.5);
I[v+G]=l<<24|m<<16|B<<8|L}}};d.l.sW=function(x,Q,c,$,z,j,U,i){var b=d.I5(x,Q,c),e=d.I5($,z,j),k=Math.min,K=d.l.adl,g=K(b,i,0);
g=k(g,K(x,i,8));g=k(g,K(Q,i,16));g=k(g,K(c,i,24));var R=K(e,i,4);R=k(R,K($,i,12));R=k(R,K(z,i,20));R=k(R,K(j,i,28));
R=Math.max(R,1-U);var T=Math.min(g,R);return T<0?0:T>1?1:T};d.l.adl=function(x,Q,F){return Math.min((x-Q[F])*Q[F+1],(x-Q[F+3])*Q[F+2])};
d.l.ayL=function(x,Q,c,$,z,j,U,i){var b=1/255,e=b*j,k=i.N9?1:0,K=i.fill,g=i.style,R=Q.y_($).y_(z),T=Math.max(0,R.x-Q.x),D=Math.max(0,R.x-$.x),a=Math.max(0,R.y-Q.y),_=Math.max(0,R.y-$.y),I=R.m,f=R.e,y=Q.m,Z=$.m,v=new Uint32Array(x.buffer),G=new Uint32Array(c.buffer);
for(var F=0;F<f;F++){var q=(a+F)*y+T,h=(_+F)*Z+D;for(var r=0;r<I;r++,q++,h++){var H=v[q],Y=1;if(H>>>24==0)continue;
var o=G[h],P=(H&255)*b,O=(H>>>8&255)*b,p=(H>>>16&255)*b,C=(o&255)*b,W=(o>>>8&255)*b,J=(o>>>16&255)*b,t=j;
if(k==0){t=(H>>>24)*e;Y=(o>>>24)*b}if(i.lf)t*=d.l.sW(P,O,p,C,W,J,Y,i.lf);var l=Y*(1-t),m=t+l,B=m==0?0:255/m,L=g?1:t,A=((1-Y)*t*P+(1-L)*Y*C+L*Y*U(P,C,(1+t-L)*K))*B,S=((1-Y)*t*O+(1-L)*Y*W+L*Y*U(O,W,(1+t-L)*K))*B,M=((1-Y)*t*p+(1-L)*Y*J+L*Y*U(p,J,(1+t-L)*K))*B;
m=t*K+Y*(1-t*K);var N=~~(m*255+.5);G[h]=k*(o>>>24)+(1-k)*N<<24|M<<16|S<<8|A}}};d.l.ai_=function(x,Q,c,$,z,j,U,i){var b=1/255,e=b*j,k=i.N9?1:0,K=Q.y_($).y_(z),g=Math.max(0,K.x-Q.x),R=Math.max(0,K.x-$.x),T=Math.max(0,K.y-Q.y),D=Math.max(0,K.y-$.y),a=K.m,_=K.e,I=new Uint32Array(x.buffer),f=new Uint32Array(c.buffer),y={Z:0,r:0,J:0},Z={Z:0,r:0,J:0},v={Z:0,r:0,J:0};
for(var F=0;F<_;F++){var G=(T+F)*Q.m+g,q=(D+F)*$.m+R;for(var h=0;h<a;h++,G++,q++){var r=I[G],H=f[q],o=(r&255)*b,P=(r>>>8&255)*b,O=(r>>>16&255)*b,p=(H&255)*b,C=(H>>>8&255)*b,W=(H>>>16&255)*b,J=j,t=1;
if(k==0){J=(r>>>24)*e;t=(H>>>24)*b}if(i.lf)J*=d.l.sW(o,P,O,p,C,W,t,i.lf);var Y=t*(1-J),l=J+Y,m=255/l;
y.Z=o;y.r=P;y.J=O;Z.Z=p;Z.r=C;Z.J=W;U(y,Z,v);var B=(((1-t)*o+t*v.Z)*J+p*Y)*m,L=(((1-t)*P+t*v.r)*J+C*Y)*m,A=(((1-t)*O+t*v.J)*J+W*Y)*m,S=k*(H>>>24)+(1-k)*Math.round(l*255);
f[q]=S<<24|A<<16|L<<8|B}}};d.l.xk=function(x){x=x^61^x>>>16;x=x+(x<<3);x=x^x>>>4;x=x*668265261;x=x^x>>15;
return(x&16777215)*(1/16777215)};d.l.fo=function(x){x=x^61^x>>>16;x=x+(x<<3);x=x^x>>>4;x=x*668265261;
x=x^x>>>15;return x};d.l.Zg=function(x){this.lv=x};d.l.Zg.prototype.get=function(){var x=this.lv=d.l.fo(this.lv);
return(x&16777215)*(1/16777215)};d.l.adY=function(x,Q,c,$,z,j,U,i){var b=1/255,e=b*j,k=Math.round(j*(256*256*256/255)),K=Q.y_($).y_(z),g=Math.max(0,K.x-Q.x),R=Math.max(0,K.x-$.x),T=Math.max(0,K.y-Q.y),D=Math.max(0,K.y-$.y),a=K.m,_=K.e,I=new Uint32Array(x.buffer),f=new Uint32Array(c.buffer);
for(var F=0;F<_;F++){var y=(T+F)*Q.m+g,Z=(D+F)*$.m+R;for(var v=0;v<a;v++,y++,Z++){var G=I[y],q=f[Z],h=i*255+(1-i)*(G>>>24);
if((d.l.fo(y)&16777215)>=h*k)continue;f[Z]=G&16777215|i*(q>>>24)+(1-i)*255<<24}}};d.l.a1h=function(x,Q,c){for(var F=0;
F<x.length;F+=4){var $=c[F>>>2];if($==0)continue;var z=$*(1/255),j=1/z,U=Q[F],i=Q[F+1],b=Q[F+2],e=x[F],k=x[F+1],K=x[F+2];
Q[F]=Math.min(255,Math.max(0,Math.round((U-(1-z)*e)*j)));Q[F+1]=Math.min(255,Math.max(0,Math.round((i-(1-z)*k)*j)));
Q[F+2]=Math.min(255,Math.max(0,Math.round((b-(1-z)*K)*j)));Q[F+3]=255}};d.l.$A=function(x,Q,c,$,z,j,U,i,b,e,k){if(e==null)e=!1;
if(k==null)k=[1,1,1];var K=255<<24|k[2]*16711680|k[1]*65280|k[0]*255,g=~K;if(z&&!Q.HM(j)){var R=d.R(Q.P()*4);
R.fill(U);d.L2(z,j,R,Q);z=R;j=Q}if(e){if(z==null)d.l.aeK(x,Q,c,$,z,i,b,K,g);else d.l.alV(x,Q,c,$,z,i,b)}else{if(z==null)d.l.apY(x,Q,c,$,z,i,b,K,g);
else d.l.a1Y(x,Q,c,$,z,i,b)}};d.l.apY=function(x,Q,c,$,z,j,U,i,b){var e=1/255,k=Q.y_($).y_(j),K=Math.max(0,k.x-Q.x),g=Math.max(0,k.x-$.x),R=Math.max(0,k.y-Q.y),T=Math.max(0,k.y-$.y),D=k.m,a=k.e,_=new Uint32Array(x.buffer),I=new Uint32Array(c.buffer),f=d.l.$$,y=U*255&255;
for(var F=0;F<a;F++){var Z=(R+F)*Q.m+K,v=(T+F)*$.m+g;for(var G=0;G<D;G++,Z++,v++){var q=_[Z],h=I[v],r=q>>>24,H=h>>>24,o=d.P7(y*r+(255-y)*H),P=d.P7(r*y),O=d.P7(H*(255-y)),p=q&255,C=q>>>8&255,W=q>>>16&255,J=h&255,t=h>>>8&255,Y=h>>>16&255,l=P*p+J*O,m=P*C+t*O,B=P*W+Y*O;
l=f[o<<8|d.P7(l)];m=f[o<<8|d.P7(m)];B=f[o<<8|d.P7(B)];var L=o<<24|B<<16|m<<8|l;I[v]=b&h|i&L}}};d.l.aeK=function(x,Q,c,$,z,j,U,i,b){var e=1/255,k=Q.y_($).y_(j),K=Math.max(0,k.x-Q.x),g=Math.max(0,k.x-$.x),R=Math.max(0,k.y-Q.y),T=Math.max(0,k.y-$.y),D=k.m,a=k.e,_=new Uint32Array(x.buffer),I=new Uint32Array(c.buffer),f=d.l.$$,y=U*16777215&16777215;
for(var F=0;F<a;F++){var Z=(R+F)*Q.m+K,v=(T+F)*$.m+g;for(var G=0;G<D;G++,Z++,v++){if((d.l.fo(Z)&16777215)<y){I[v]=b&I[v]|i&_[Z]}}}};
d.l.a1Y=function(x,Q,c,$,z,j,U){var i=1/255,b=Q.y_($).y_(j),e=Math.max(0,b.x-Q.x),k=Math.max(0,b.x-$.x),K=Math.max(0,b.y-Q.y),g=Math.max(0,b.y-$.y),R=b.m,T=b.e,D=new Uint32Array(x.buffer),a=new Uint32Array(c.buffer),_=d.l.$$;
for(var F=0;F<T;F++){var I=(K+F)*Q.m+e,f=(g+F)*$.m+k;for(var y=0;y<R;y++,I++,f++){var Z=z[I]*U&255;if(Z==0)continue;
if(Z==255){a[f]=D[I];continue}var v=D[I],G=a[f],q=v>>>24,h=G>>>24,r=d.P7(Z*q+(255-Z)*h),H=d.P7(q*Z),o=d.P7(h*(255-Z)),P=v&255,O=v>>>8&255,p=v>>>16&255,C=G&255,W=G>>>8&255,J=G>>>16&255,t=_[r<<8|d.P7(H*P+C*o)],Y=_[r<<8|d.P7(H*O+W*o)],l=_[r<<8|d.P7(H*p+J*o)];
a[f]=r<<24|l<<16|Y<<8|t}}};d.l.alV=function(x,Q,c,$,z,j,U){var i=1/255,b=Q.y_($).y_(j),e=Math.max(0,b.x-Q.x),k=Math.max(0,b.x-$.x),K=Math.max(0,b.y-Q.y),g=Math.max(0,b.y-$.y),R=b.m,T=b.e,D=new Uint32Array(x.buffer),a=new Uint32Array(c.buffer),_=d.l.$$,I=Math.round(U*257);
for(var F=0;F<T;F++){var f=(K+F)*Q.m+e,y=(g+F)*$.m+k;for(var Z=0;Z<R;Z++,f++,y++){var v=z[f]*I;if((d.l.fo(f)&65535)<v)a[y]=D[f]}}};
d.l.alW=function(x,Q,c,$,z,j,U){var i=1/255,b=Q.y_($).y_(j),e=Math.max(0,b.x-Q.x),k=Math.max(0,b.x-$.x),K=Math.max(0,b.y-Q.y),g=Math.max(0,b.y-$.y),R=b.m,T=b.e,D=new Uint32Array(x.buffer),a=new Uint32Array(c.buffer),_=Math.floor(Math.random()*$.P()),I=d.l.a71;
for(var F=0;F<T;F++){var f=(K+F)*Q.m+e,y=(g+F)*$.m+k;for(var Z=0;Z<R;Z++){var v=z[f+Z]*U;if(v==0)continue;
if(v==255){a[y+Z]=D[f+Z];continue}var G=D[f+Z],q=a[y+Z],h=G>>>24,r=q>>>24,H=h*v*(1/255),o=r*(255-v)*(1/255),P=G&255,O=G>>>8&255,p=G>>>16&255,C=q&255,W=q>>>8&255,J=q>>>16&255,t=d.l.fo(y+Z+_),Y=Math.floor((H+o)*256+.5)+(t>>>0&255)>>>8,l=Y==0?0:256/(H+o),m=P*H+C*o,B=O*H+W*o,L=p*H+J*o,A=Math.floor(m*l+.5)+(t>>>8&255)>>>8,S=Math.floor(B*l+.5)+(t>>>16&255)>>>8,M=Math.floor(L*l+.5)+(t>>>24&255)>>>8;
a[y+Z]=Y<<24|M<<16|S<<8|A}}};d.l.a71=function(x){return Math.floor(x+Math.random())};d.l.oM=function(x,Q,c,$,z,j,U){var i=1/255,b=Q.y_($).y_(j),e=Math.max(0,b.x-Q.x),k=Math.max(0,b.x-$.x),K=Math.max(0,b.y-Q.y),g=Math.max(0,b.y-$.y),R=b.m,T=b.e;
for(var F=0;F<T;F++){var D=(K+F)*Q.m+e,a=(g+F)*$.m+k;for(var _=0;_<R;_++,D++,a++){var I=U*z[D]*i;if(I==0)continue;
if(I==1){c[a]=x[D];continue}c[a]=x[D]*I+c[a]*(1-I)}}};d.a3d=function(){function x(j){var U=j*.85;return Math.exp(-(U*U)*(1/(2*.4*.4)))*(1/(.4*Math.sqrt(2*Math.PI)))}function Q(j,U){var i=j<U?1:x((j-U)/Math.pow(1.001-U,.86));
return i}var c=[];function $(j){if(c[j])return c[j];var U=Math.pow(j,.55),i=new Float64Array(8e3),b=0,e=8e3;
for(var F=0;F<8e3;F++){var k=Q(F*(1.55/4e3),U);if(k>=1)b=F;else if(k<=0&&e==8e3)e=F;i[F]=k}var K=[i,b,e];
c[j]=K;return K}function z(j,U,i){if(j<4)U=1;var b=1+.55*(1-U),e=Math.round(i*j*b)+2,k=new gh(0,0,e,e),K=d.R(e*e),g=[K,k],R=e/2,T=b/(R-1);
if(j==2)T*=2;if(j==3)T*=1.6;var D=Date.now(),a=$(U),_=Math.round(8e3/R),I=a[0],f=a[1]-_,y=a[2]+_,Z=Math.min(e,e+1>>>1),v=T*.4*(4e3/1.55),G=d.R(8e3);
for(var F=0;F<8e3;F++){var q=F,h=F,r=~~Math.max(0,q-v-v),H=~~Math.max(0,q-v),o=~~Math.min(7999,q+v),P=~~Math.min(7999,q+v+v),O=~~(.5+255*(1/5)*(I[h]+I[r]+I[H]+I[o]+I[P]));
G[F]=O;if(O==0)break}for(var F=0;F<Z;F++){var p=T*(F-R+.5),C=p*p,W=F*e,J=(e-1-F)*e;for(var t=0;t<Z;t++){var Y=T*(t-R+.5),h=~~(Math.sqrt(Y*Y+C)*(4e3/1.55));
if(y<h)continue;else if(h<f){var O=255;while(t<Z){var l=e-1-t;K[W+t]=O;K[W+l]=O;K[J+t]=O;K[J+l]=O;t++}break}else{var O=G[h],l=e-1-t;
K[W+t]=O;K[W+l]=O;K[J+t]=O;K[J+l]=O}}}return g}return{aok:z}}();d.X3={};d.X3.aoL=function(x,Q,c,$,z,j){d.X3.ek(x,Q,c,$,z,j,null,0)};
d.X3.ael=function(x,Q,c,$,z){d.X3.ek(x,Q,c,$,z,null,null,0)};d.X3.aw4=function(x,Q,c,$,z,j,U){d.X3.ek(x,Q,c,$,z,null,j,U*.5)};
d.X3.ek=function(x,Q,c,$,z,j,U,i){var b=0,o=0,P=1e9,O=0,p=1e9,C=0,W=1e9,J=0,t=0,Y=0,l=0;if(j){b=z*.5;
z=3+Math.round((z-3)*.75)}if(U){z=Math.round(z*2.2)}var e=1/z,k=Math.floor(Q*e)+1,K=Math.floor(c*e)+1,g=[],R=new Uint8Array(k*K*4),T=U?.5:1,D=j?64:0;
for(var a=0;a<K;a++){var _=U?.5*(a&1):0;for(var I=0;I<k;I++){var f=(I+Math.random()*T+_)*z,y=(a+Math.random()*T)*z;
g.push(f,y);var Z=Math.min(Q-1,Math.floor(f)),v=Math.min(c-1,Math.floor(y)),G=(v*Q+Z)*4,q=(a*k+I)*4;
for(var F=0;F<4;F++)R[q+F]=Math.max(0,Math.min(255,Math.floor(x[G+F]+(Math.random()-.5)*D)))}}var h=j?j:U?U:[0,0,0],r=k*K*2,H=[-k-1,-k,-k+1,-1,0,1,k-1,k,k+1];
for(var a=0;a<c;a++){Y=0;for(var I=0;I<Q;I++){var m=I+.5,B=a+.5,L=Math.floor(B*e),A=Math.floor(m*e),S=L*k+A,s=0,V=0;
if(Y>1+i){P=d.X3.ab4(g,o,m,B);J=Math.sqrt(P);Y--;l++}else{P=p=W=1e9;for(var F=0;F<H.length;F++){var M=(S+H[F])*2;
if(M<0||M>=r)continue;var N=d.X3.ab4(g,M,m,B);if(N<W){if(N<p){if(N<P){C=O;W=p;O=o;p=P;o=M;P=N}else{C=O;
W=p;O=M;p=N}}else{C=M;W=N}}}J=Math.sqrt(P);t=Math.sqrt(p);Y=t-(J+t)*.5}if(U==null){var g8=(J+t)*.5,n=j?Math.max(0,g8-b):0;
s=Math.max(0,Math.min(1,.5+g8-J-n));V=Math.max(0,Math.min(1,1-(.5+g8-J)-n))}else{var cQ=Math.min(d.X3.adu(g,o,O,m,B),d.X3.adu(g,o,C,m,B));
s=Math.max(0,Math.min(1,cQ-i*.5));if(m<i||Q-i<m||B<i||c-i<B)s=0;V=0}var hk=1-V-s,q=a*Q+I<<2,eG=o<<1,ie=O<<1;
$[q+0]=Math.floor(.5+s*R[eG+0]+V*R[ie+0]+hk*h[0]);$[q+1]=Math.floor(.5+s*R[eG+1]+V*R[ie+1]+hk*h[1]);
$[q+2]=Math.floor(.5+s*R[eG+2]+V*R[ie+2]+hk*h[2]);$[q+3]=x[q+3]}}};d.X3.ab4=function(x,Q,c,$){var z=c-x[Q],j=$-x[Q+1];
return z*z+j*j};d.X3.adu=function(x,Q,c,$,z){var j=x[Q],U=x[Q+1],i=x[c],b=x[c+1],e=(j+i)*.5,k=(U+b)*.5,K=e+(b-U),g=k-(i-j),R=g-k,T=K-e;
return Math.abs(R*$-T*z+K*k-g*e)/Math.sqrt(T*T+R*R)};d.yg={};d.yg.wM=function(x){if(d.yg.Cv.length<x)d.yg.Cv=d.R(x);
return d.yg.Cv};d.yg.Cv=d.R(0);d.yg.aDK=function(x){if(d.yg.tk.length<x)d.yg.tk=new Float32Array(x);
return d.yg.tk};d.yg.tk=new Float32Array(0);d.yg.ZA=function(x,Q,c,$){var z=c.m,j=c.e;d.yg.azy(x,Q,z,j,$)};
d.yg.hh=function(x,Q,c,$){var z=c.m,j=c.e;d.yg.agu(x,Q,z,j,$)};d.yg.a1A=function(x,Q,c){var $=Q.m,z=Q.e;
d.yg.afV(x,$,z,c)};d.yg.U2=function(x,Q,c,$){var z=Q.m,j=Q.e;d.yg.ajq(x,z,j,c,$)};d.yg.asP=function(x,Q,c,$){var z=c.m,j=c.e;
$=Math.round($);var U=d.yg.wM(z*j);d.SO(x,Q);d.yg.Cz(Q,U,z,j,$)};d.yg.k_=function(x,Q,c){var $=Q.m,z=Q.e;
c=Math.round(c);var j=d.yg.wM($*z*4);d.yg.pb(x,j,$,z,c)};d.yg.ajy=function(x,Q,c){var $=Q.m,z=Q.e;c=Math.round(c);
d.yg.agQ(x,d.yg.aDK($*z),$,z,c)};d.yg.a0P=function(x,Q,c){var $=Q.m,z=Q.e;c=Math.round(c);var j=d.yg.wM($*z*4);
d.yg.a4O(x,j,$,z,c);d.SO(j,x)};d.yg.E0=function(x,jF){var Q=Math.sqrt(12*x*x/jF+1),c=Math.floor(Q);if(c%2==0)c--;
var $=c+2,z=(12*x*x-jF*c*c-4*jF*c-3*jF)/(-4*c-4),j=Math.round(z),U=[];for(var F=0;F<jF;F++)U.push(F<j?c:$);
return U};d.yg.azy=function(x,Q,c,$,z){var j=d.yg.E0(z,3),U=d.yg.wM(c*$);d.SO(x,Q);d.yg.Cz(Q,U,c,$,j[0]-1>>1);
d.yg.Cz(Q,U,c,$,j[1]-1>>1);d.yg.Cz(Q,U,c,$,j[2]-1>>1)};d.yg.agu=function(x,Q,c,$,z){var j=d.yg.E0(z,2),U=d.yg.wM(c*$);
d.SO(x,Q);d.yg.Cz(Q,U,c,$,j[0]-1>>1);d.yg.Cz(Q,U,c,$,j[1]-1>>1)};d.yg.afV=function(x,Q,c,$){var z=d.yg.E0($,3),j=d.yg.wM(Q*c*4);
d.yg.pb(x,j,Q,c,z[0]-1>>1);d.yg.pb(x,j,Q,c,z[1]-1>>1);d.yg.pb(x,j,Q,c,z[2]-1>>1)};d.yg.ajq=function(x,Q,c,$,z){if(z==null)z=3;
var j=d.yg.E0($,z),U=d.yg.aDK(Q*c);for(var F=0;F<z;F++)d.yg.agQ(x,U,Q,c,(j[F]-1)/2)};d.yg.Cz=function(x,Q,c,$,z){d.yg.a9T(x,Q,c,$,z);
d.yg.aC_(Q,x,c,$,z)};d.yg.pb=function(x,Q,c,$,z){d.yg.a4O(x,Q,c,$,z);d.yg.a37(Q,x,c,$,z)};d.yg.agQ=function(x,Q,c,$,z){d.yg.alf(x,Q,c,$,z);
d.yg.arV(Q,x,c,$,z)};d.yg.Jz=[];d.yg.Y$=function(x){if(d.yg.Jz[x])return d.yg.Jz[x];var Q=1/(x+x+1),c=(x+x+1)*256,$=d.R(c);
for(var F=0;F<c;F++)$[F]=Math.round(F*Q);d.yg.Jz[x]=$;return $};d.yg.a9T=function(x,Q,c,$,z){var j=1/(z+z+1),U=c-z-z-1,i=d.yg.Y$(z);
for(var F=0;F<$;F++){var b=F*c,e=b,k=b+z,K=x[b],g=x[b+c-1],R=(z+1)*K;for(var T=0;T<z;T++)R+=x[b+T];for(var T=0;
T<=z;T++){R+=x[k+T]-K;Q[b+T]=i[R]}k+=z+1;b+=z+1;for(var T=0;T<U;T++){R+=x[k+T]-x[e+T];Q[b+T]=i[R]}k+=U;
e+=U;b+=U;for(var T=c-z;T<c;T++){R+=g-x[e++];Q[b++]=i[R]}}};d.yg.a4O=function(x,Q,c,$,z){var j=c<<2,U=z<<2,i=1/(z+z+1),b=c-z-z-1,e=b<<2,k=d.yg.Y$(z);
for(var F=0;F<$;F++){var K=F*j,g=K,R=K+U,T=K+j,D=x[K],a=x[K+1],_=x[K+2],I=x[K+3],f=(z+1)*D,y=(z+1)*a,Z=(z+1)*_,v=(z+1)*I;
for(var G=0;G<U;G+=4){f+=x[K+G];y+=x[K+G+1];Z+=x[K+G+2];v+=x[K+G+3]}for(var G=0;G<=U;G+=4){f+=x[R]-D;
Q[K]=k[f];y+=x[R+1]-a;Q[K+1]=k[y];Z+=x[R+2]-_;Q[K+2]=k[Z];v+=x[R+3]-I;Q[K+3]=k[v];R+=4;K+=4}for(var G=0;
G<e;G+=4){f+=x[R+G]-x[g+G];Q[K+G]=k[f];y+=x[R+G+1]-x[g+G+1];Q[K+G+1]=k[y];Z+=x[R+G+2]-x[g+G+2];Q[K+G+2]=k[Z];
v+=x[R+G+3]-x[g+G+3];Q[K+G+3]=k[v]}R+=e;g+=e;K+=e;D=x[T-4];a=x[T-3];_=x[T-2];I=x[T-1];for(var G=c-z;
G<c;G++){f+=D-x[g];Q[K]=k[f];y+=a-x[g+1];Q[K+1]=k[y];Z+=_-x[g+2];Q[K+2]=k[Z];v+=I-x[g+3];Q[K+3]=k[v];
g+=4;K+=4}}};d.yg.alf=function(x,Q,c,$,z){var j=1/(z+z+1),U=c-z-z-1;for(var F=0;F<$;F++){var i=F*c,b=i,e=i+z,k=x[i],K=x[i+c-1],g=(z+1)*k;
for(var R=0;R<z;R++)g+=x[i+R];for(var R=0;R<=z;R++){g+=x[e+R]-k;Q[i+R]=g*j}e+=z+1;i+=z+1;for(var R=0;
R<U;R++){g+=x[e+R]-x[b+R];Q[i+R]=g*j}e+=U;b+=U;i+=U;for(var R=c-z;R<c;R++){g+=K-x[b++];Q[i++]=g*j}}};
d.yg.aC_=function(x,Q,c,$,z){var j=1/(z+z+1),U=$-z-z-1,i=d.yg.Y$(z);for(var F=0;F<c;F++){var b=F,e=b,k=b+z*c,K=x[b],g=x[b+c*($-1)],R=(z+1)*K;
for(var T=0;T<z;T++)R+=x[b+T*c];for(var T=0;T<=z;T++){R+=x[k]-K;Q[b]=i[R];k+=c;b+=c}for(var T=0;T<U;
T++){var D=T*c;R+=x[k+D]-x[e+D];Q[b+D]=i[R]}e+=U*c;k+=U*c;b+=U*c;for(var T=$-z;T<$;T++){R+=g-x[e];Q[b]=i[R];
e+=c;b+=c}}};d.yg.a37=function(x,Q,c,$,z){var j=c<<2,U=z<<2,i=1/(z+z+1),b=$-z-z-1,e=b<<2,k=d.yg.Y$(z);
for(var F=0;F<c;F++){var K=F<<2,g=K,R=K+z*j,T=K+j*($-1),D=x[K],a=x[K+1],_=x[K+2],I=x[K+3],f=(z+1)*D,y=(z+1)*a,Z=(z+1)*_,v=(z+1)*I;
for(var G=0;G<z;G++){var q=K+G*j;f+=x[q];y+=x[q+1];Z+=x[q+2];v+=x[q+3]}for(var G=0;G<=z;G++){f+=x[R]-D;
Q[K]=k[f];y+=x[R+1]-a;Q[K+1]=k[y];Z+=x[R+2]-_;Q[K+2]=k[Z];v+=x[R+3]-I;Q[K+3]=k[v];R+=j;K+=j}for(var G=0;
G<b;G++){var h=G*j;f+=x[R+h]-x[g+h];Q[K+h]=k[f];y+=x[R+h+1]-x[g+h+1];Q[K+h+1]=k[y];Z+=x[R+h+2]-x[g+h+2];
Q[K+h+2]=k[Z];v+=x[R+h+3]-x[g+h+3];Q[K+h+3]=k[v]}g+=b*j;R+=b*j;K+=b*j;D=x[T];a=x[T+1];_=x[T+2];I=x[T+3];
for(var G=$-z;G<$;G++){f+=D-x[g];Q[K]=k[f];y+=a-x[g+1];Q[K+1]=k[y];Z+=_-x[g+2];Q[K+2]=k[Z];v+=I-x[g+3];
Q[K+3]=k[v];g+=j;K+=j}}};d.yg.arV=function(x,Q,c,$,z){var j=1/(z+z+1),U=$-z-z-1;for(var F=0;F<c;F++){var i=F,b=i,e=i+z*c,k=x[i],K=x[i+c*($-1)],g=(z+1)*k;
for(var R=0;R<z;R++)g+=x[i+R*c];for(var R=0;R<=z;R++){g+=x[e]-k;Q[i]=g*j;e+=c;i+=c}for(var R=0;R<U;R++){var T=R*c;
g+=x[e+T]-x[b+T];Q[i+T]=g*j}b+=U*c;e+=U*c;i+=U*c;for(var R=$-z;R<$;R++){g+=K-x[b];Q[i]=g*j;b+=c;i+=c}}};
d.uE={};d.uE.R=function(x,Q,c,$){var z=[];for(var j=0;j<4;j++)for(var U=0;U<4;U++)z.push(x+c*U/3,Q+$*j/3);
return z};d.uE.agT=function(x,Q){var c=x.slice(0);for(var F=0;F<4;F++)for(var $=0;$<4;$++){var z=2*(F*4+$),j=2*($*4+(3-F));
if(Q){var U=z;z=j;j=U}c[j]=x[z];c[j+1]=x[z+1]}return c};d.uE.c6=d.R(0);d.uE.drawImage=function(x,Q,c,$,z,j,U){var i=!1,b=Date.now(),e=2,k=c+2*e,K=$+2*e,g=new gh(e,e,c,$),R=g.clone();
R.ss(e,e);var T=d.uE.c6;if(T.length!=R.P()*4)T=d.uE.c6=d.R(R.P()*4);else T.fill(0);d.WK(Q,g,T,R);if(i)console.log(Date.now()-b,"copy rect");
b=Date.now();d.HO(T);if(i)console.log(Date.now()-b,"multiply alpha");b=Date.now();var D=Math.max(c,$),a=Math.round(50*c/D),_=Math.round(Math.sqrt(3)*.5*50*$/D),I=a-.5,f=[],y=[],Z=[];
for(var v=0;v<_+1;v++){var G=(v&1)==0;for(var q=0;q<a+1;q++){var h=(q-(G?.5:0))/I,r=v/_;if(q==0)h=0;
if(q==a)h=1;f.push(k*h,K*r);if(q<a&&v<_){var H=v*(a+1)+q,o=H+1,P=H+a+1,O=P+1;if(G)y.push(H,o,P,P,o,O);
else y.push(H,o,O,H,O,P)}var p=d.uE.axG(x,h,r);Z.push(-p)}}var C=f.slice(0);d.uE.i(x,C,g);d.A.i(C,new bI(1,0,0,1,-j.x,-j.y),C);
if(i)console.log(Date.now()-b,"mesh built");b=Date.now();var W=j.m,J=j.e;d.NO.i6(T,k,K,z,W,J,f,C,Z,y,U);
if(i)console.log(Date.now()-b,"rendered");b=Date.now();d.mQ(z);if(i)console.log(Date.now()-b,"divided");
b=Date.now()};d.uE.ba=new Array(10);d.uE.da=function(x,Q){var c=200,$=0,z=0,j=1e9,U=d.uE.ba;for(var i=0;
i<c+1;i++)for(var b=0;b<c+1;b++){var e=b/c,k=i/c;d.uE.a2C(x,e,k,U);var K=U[8]-Q.x,g=U[9]-Q.y,R=K*K+g*g;
if(R<j){j=R;$=e;z=k}}return[$,z]};d.uE.i=function(x,Q,c){var $=c.x,z=c.y,j=1/c.m,U=1/c.e,i=d.uE.ba;for(var b=0;
b<Q.length;b+=2){var e=(Q[b]-$)*j,k=(Q[b+1]-z)*U;d.uE.a2C(x,e,k,i);Q[b]=i[8];Q[b+1]=i[9]}};d.uE.axG=function(x,Q,c){var $,z,j,U,i=d.uE.ba;
d.uE.anf(x,Q,c,i);$=i[8];z=i[9];d.uE.ado(x,Q,c,i);j=i[8];U=i[9];return $*U-z*j};d.uE.g7=function(x,Q,c){var $=0,z=0,j=x[2][0],U=x[2][1];
while($+2<j.length&&j[$+1]<Q)$++;Q=(Q-j[$])/(j[$+1]-j[$]);while(z+2<U.length&&U[z+1]<c)z++;c=(c-U[z])/(U[z+1]-U[z]);
return[$*3,z*3,Q,c]};d.uE.a2C=function(x,Q,c,$){var z=d.uE.g7(x,Q,c);d.uE.IO($,0,z[3]);d.uE.IO($,4,z[2]);
d.uE.lb(x[3],z[0],z[1],x[0],$)};d.uE.anf=function(x,Q,c,$){var z=d.uE.g7(x,Q,c);d.uE.IO($,0,z[3]);d.uE.awb($,4,z[2]);
d.uE.lb(x[3],z[0],z[1],x[0],$)};d.uE.ado=function(x,Q,c,$){var z=d.uE.g7(x,Q,c);d.uE.awb($,0,z[3]);d.uE.IO($,4,z[2]);
d.uE.lb(x[3],z[0],z[1],x[0],$)};d.uE.awb=function(x,F,Q){var c=1-Q;x[F]=-3*(c*c);x[F+1]=3*(c*c)-6*(Q*c);
x[F+2]=6*(Q*c)-3*(Q*Q);x[F+3]=3*(Q*Q)};d.uE.IO=function(x,F,Q){var c=1-Q;x[F]=c*(c*c);x[F+1]=3*Q*(c*c);
x[F+2]=3*(Q*Q)*c;x[F+3]=Q*Q*Q};d.uE.a49=function(x,Q,c,$,z){var j=d.uE.g7(x,Q,c),U=j[0],i=j[1],b=j[2],e=j[3],k=x[0],K=Math.floor(b*3),g=Math.floor(e*3),R=d.uE.ba,T=16,G=0;
d.uE.IO(R,0,e);d.uE.IO(R,4,b);var D=[],a=[],_=[];for(var I=0;I<4;I++){for(var f=0;f<4;f++){var F=I*4+f,y=R[I]*R[4+f];
D.push(y);a.push((i+I)*k+U+f);if((I==g||I==g+1)&&(f==K||f==K+1)){var Z=b*3-K;if(f==K)Z=1-Z;var v=e*3-g;
if(I==g)v=1-v;_[F]=Z*v/y}else _[F]=0}}for(var F=0;F<T;F++)G+=D[F]*_[F];for(var F=0;F<T;F++)_[F]/=G;for(var F=0;
F<T;F++){var y=D[F],q=a[F];x[3][q*2]+=_[F]*$;x[3][q*2+1]+=_[F]*z}};d.uE.Ny=function(x){var Q=x[0],c=x[1],$=x[2],z=x[3],j=z.slice(0);
for(var U=0;U<c;U++)for(var i=0;i<Q;i++){z[(i*c+U)*2]=j[(U*Q+i)*2];z[(i*c+U)*2+1]=j[(U*Q+i)*2+1]}x[0]=c;
x[1]=Q;x[2]=[$[1],$[0]]};d.uE.split=function(x,Q,c){if(Q==1)d.uE.Ny(x);var $=x[0],z=x[1],j=x[2][0],U=x[3],i=0;
while(j[i+1]&&j[i+1]<c)i++;var b=(c-j[i])/(j[i+1]-j[i]),e=1-b;for(var k=0;k<z;k++){var F=(k*($+3)+i*3)*2,K=e*U[F]+b*U[F+2],g=e*U[F+1]+b*U[F+3],R=e*U[F+2]+b*U[F+4],T=e*U[F+3]+b*U[F+5],D=e*U[F+4]+b*U[F+6],a=e*U[F+5]+b*U[F+7],_=e*K+b*R,I=e*g+b*T,f=e*R+b*D,y=e*T+b*a,Z=e*_+b*f,v=e*I+b*y;
U.splice(F+2,4,K,g,_,I,Z,v,f,y,D,a)}j.push(c);j.sort();x[0]+=3;if(Q==1)d.uE.Ny(x)};d.uE.lb=function(x,Q,c,$,z){var j=0,U=0,i=0,b=z[0],e=z[1],k=z[2],K=z[3],g=z[4],R=z[5],T=z[6],D=z[7],F=(c*$+Q)*2;
i=b*g;j+=x[F+0]*i;U+=x[F+1]*i;i=b*R;j+=x[F+2]*i;U+=x[F+3]*i;i=b*T;j+=x[F+4]*i;U+=x[F+5]*i;i=b*D;j+=x[F+6]*i;
U+=x[F+7]*i;F+=$+$;i=e*g;j+=x[F+0]*i;U+=x[F+1]*i;i=e*R;j+=x[F+2]*i;U+=x[F+3]*i;i=e*T;j+=x[F+4]*i;U+=x[F+5]*i;
i=e*D;j+=x[F+6]*i;U+=x[F+7]*i;F+=$+$;i=k*g;j+=x[F+0]*i;U+=x[F+1]*i;i=k*R;j+=x[F+2]*i;U+=x[F+3]*i;i=k*T;
j+=x[F+4]*i;U+=x[F+5]*i;i=k*D;j+=x[F+6]*i;U+=x[F+7]*i;F+=$+$;i=K*g;j+=x[F+0]*i;U+=x[F+1]*i;i=K*R;j+=x[F+2]*i;
U+=x[F+3]*i;i=K*T;j+=x[F+4]*i;U+=x[F+5]*i;i=K*D;j+=x[F+6]*i;U+=x[F+7]*i;F+=$+$;z[8]=j;z[9]=U};d.yS={};
d.yS.arE=function(x,Q,c){var $=Date.now(),z=new ArrayBuffer(Q*c*16),j=d.yS.apv(x,Q,c,z),U=d.yS.aeF(Q,c,z);
return{sE:U,UZ:j}};d.yS.asz=function(x,Q,c){var $=Math.round(x.length/8),z=new Uint32Array($),j=new Uint8Array($),U=new Uint32Array($);
d.h4(z,4294967295,0);z[c]=0;var i=new iU($);i.push(c,z[c]);var b={sE:x,UZ:Q,eW:z,pg:j,AV:U,xv:i,au3:c};
return b};d.yS.S9=function(x,Q){var c=x.sE,$=x.UZ,z=x.eW,j=x.pg,U=x.AV,i=x.xv;while(!i._6()&&(Q==null||j[Q]==0)){var b=i.pop();
j[b]=1;for(var F=0;F<8;F++){var e=c[8*b+F],k=b+e;if(e==0||j[k])continue;var K=z[b]+$[8*b+F];if(i.contains(k)&&K<z[k])i.remove(k,z[k]);
if(!i.contains(k)){z[k]=K;U[k]=b;i.push(k,z[k])}}}};function iU(x){this.fz=new Uint32Array(x);this.list=[];
this.JS=0;this.dH=4294967295}iU.prototype._6=function(){return this.JS==0};iU.prototype.push=function(x,Q){var c=this.list;
if(c[Q]==null)c[Q]=[];c[Q].push(x);this.JS++;this.fz[x]=c[Q].length-1+1;this.dH=Math.min(this.dH,Q)};
iU.prototype.pop=function(){this.JS--;var x=this.list,Q=this.dH,c=x[Q].pop();if(x[Q].length==0)x[Q]=null;
this.ay8();this.fz[c]=0;return c};iU.prototype.contains=function(x){return this.fz[x]!=0};iU.prototype.remove=function(x,Q){this.JS--;
var c=this.list,F=this.fz[x]-1;if(F==c[Q].length-1)c[Q].pop();else{var $=c[Q].pop();c[Q][F]=$;this.fz[$]=F+1}if(c[Q].length==0)c[Q]=null;
this.fz[x]=0;this.ay8()};iU.prototype.ay8=function(){if(this.JS==0){this.dH=4294967295;return}var x=this.dH,Q=this.list;
while(Q[x]==null)x++;this.dH=x};d.yS.ak_=function(x,Q,c,$){var z=new Int16Array($);for(var j=0;j<c;j++)for(var U=0;
U<Q;U++){var F=j*Q+U,i=0;if(1<U&&U<Q-2&&1<j&&j<c-2){i+=x[F-Q-Q];i+=x[F-Q-1]+2*x[F-Q]+x[F-Q+1];i+=x[F-2]+2*x[F-1]-16*x[F]+2*x[F+1]+x[F+2];
i+=x[F+Q-1]+2*x[F+Q]+x[F+Q+1];i+=x[F+Q+Q]}else i=-16*x[F];z[F]=i}return z};d.yS.a08=function(x,Q,c,$){if($==null)$=128;
var z=new Uint8Array(Q*c);for(var j=1;j<c-1;j++)for(var U=1;U<Q-1;U++){var F=j*Q+U;z[F]=d.yS.az5(x[F],x[F-1],x[F+1],x[F-Q],x[F+Q],$)}return z};
d.yS.az5=function(x,Q,c,$,z,j){var U=Math.abs(x);return x*Q<0&&U<Math.abs(Q)&&Math.abs(Q-x)>j||x*c<0&&U<Math.abs(c)&&Math.abs(c-x)>j||x*$<0&&U<Math.abs($)&&Math.abs($-x)>j||x*z<0&&U<Math.abs(z)&&Math.abs(z-x)>j?1:0};
d.yS.a1Q=function(x,Q,c,$){var z=new Float32Array($),j=0;new Uint32Array($).fill(0);for(var U=0;U<c;
U++)for(var i=0;i<Q;i++){var b=0,e=0,F=U*Q+i,k=F*3;if(0<i&&i<Q-1)b=x[F+1]-x[F-1];if(0<U&&U<c-1)e=x[F+Q]-x[F-Q];
var K=z[k+2]=Math.sqrt(b*b+e*e);if(K!=0){var g=1/K;z[k]=b*g;z[k+1]=e*g}if(K>j)j=K}var R=Q*c,T=j==0?0:1/j;
for(var F=0;F<R;F++)z[F*3+2]=1-z[F*3+2]*T;return z};d.yS.axY=function(x,Q,c){return c[~~((.5+.5*x)*255)]+c[~~((.5+.5*Q)*255)]};
d.yS.apv=function(x,Q,c,$){var z=Date.now(),j=d.yS.ak_(x,Q,c,$),U=d.yS.a08(j,Q,c),i=d.yS.a1Q(x,Q,c,$),b=new Float32Array(256);
for(var F=0;F<256;F++)b[F]=Math.acos(-1+2*F/255)*(.95/Math.PI);var e=[-1,0,1,1,1,0,-1,-1],k=[-1,-1,-1,0,1,1,1,0];
for(var F=0;F<8;F++){var K=1/Math.sqrt(e[F]*e[F]+k[F]*k[F]);e[F]*=K;k[F]*=K}var g=[e[0],k[0],e[1],k[1],e[2],k[2],e[3],k[3]],R=[-Q-1,-Q,-Q+1,1],T=new Uint8Array(Q*c*8);
new Uint32Array(T.buffer).fill(4294967295);var D=Q*c;for(var a=1;a<c-1;a++)for(var _=1;_<Q-1;_++){var I=a*Q+_,f=1-U[I],y=i[I*3+2],Z=i[3*I+1],v=-i[3*I];
for(var G=0;G<4;G++){var q=I+R[G];d.yS.apn(I,q,G,T,U,i,f,y,Z,v,g,b)}}return T};d.yS.apn=function(x,Q,c,$,z,j,U,i,b,e,k,K){var g=1-z[Q],R=(c&1)==0?1:Math.SQRT1_2,T=j[Q*3+2]*R,D=j[3*Q+1],a=-j[3*Q],_=i*R,I=k[c+c],f=k[c+c+1],y=b*I+e*f,Z=D*I+a*f;
if(y+Z<0){y=-y;Z=-Z}var v=d.yS.axY(y,Z,K);$[(x<<3)+c]=d.yS.adI(g,v,T);$[(Q<<3)+c+4]=d.yS.adI(U,v,_)};
d.yS.adI=function(x,Q,c){return 1+~~(.5+20*(.43*x+.43*Q+.14*c))};d.yS.aeF=function(x,Q,c){var $=new Int16Array(c),z=$,F=0,j=0;
new Uint32Array(c).fill(0);for(var U=0;U<Q;U++)for(var i=0;i<x;i++){if(U>0&&i>0)z[j+0]=-x-1;if(U>0)z[j+1]=-x;
if(U>0&&i<x-1)z[j+2]=-x+1;if(i<x-1)z[j+3]=1;if(U<Q-1&&i<x-1)z[j+4]=x+1;if(U<Q-1)z[j+5]=x;if(U<Q-1&&i>0)z[j+6]=x-1;
if(i>0)z[j+7]=-1;F++;j+=8}return $};d.hx={};d.hx.C6=function(x){var Q=x.slice(0),c=0;for(var F=0;F<x.length;
F++)c+=x[F];for(var F=0;F<x.length;F++)Q[F]/=c;return Q};d.hx.tY=[d.hx.C6([1,2,1,2,16,2,1,2,1]),d.hx.C6([1,2,1,2,4,2,1,2,1]),d.hx.C6([0,-1,0,-1,8,-1,0,-1,0]),d.hx.C6([-.7,-1,-.7,-1,10,-1,-.7,-1,-.7]),[-1,0,1,-2,0,2,-1,0,1],[1,2,1,0,0,0,-1,-2,-1]];
d.hx.QY=function(x,Q,c,$,z,j,U,i){if(U==null)U=!1;if(i==null)i=!1;var b=Math.floor(Math.sqrt(z.length)),e=b-1>>>1,k=new Uint32Array(x.buffer),Q=new Uint8ClampedArray(Q.buffer);
for(var F=0;F<$;F++)for(var K=0;K<c;K++){var g=0,R=0,T=0,D=0;for(var a=0;a<b;a++)for(var _=0;_<b;_++){var I=z[a*b+_];
if(I==0)continue;var f=K-e+_,y=F-e+a;if(f<0)f=0;else if(f>c-1)f=c-1;if(y<0)y=0;else if(y>$-1)y=$-1;if(i&&k[y*c+f]>>>24==0){y=F;
f=K}var Z=k[y*c+f];g+=(Z&255)*I;R+=(Z>>>8&255)*I;T+=(Z>>>16&255)*I;D+=(Z>>>24&255)*I}if(U){if(g<0)g=-g;
if(R<0)R=-R;if(T<0)T=-T;if(D<0)D=-D}if(i){g=Math.max(0,Math.min(255,g));R=Math.max(0,Math.min(255,R));
T=Math.max(0,Math.min(255,T));D=Math.max(0,Math.min(255,D))}var v=F*c+K<<2;Q[v]=~~(.5+g);Q[v+1]=~~(.5+R);
Q[v+2]=~~(.5+T);Q[v+3]=255-j&Q[v+3]|j&~~(.5+D)}};d.hx.a2g=function(x,Q,c,$){var z=x.length,j=new Uint8Array(z);
d.hx.QY(x,Q,c,$,d.hx.tY[4],0,!0);d.hx.QY(x,j,c,$,d.hx.tY[5],0,!0);for(var F=0;F<z;F+=4){var U=Q[F],i=Q[F+1],b=Q[F+2],e=Q[F+3],k=j[F],K=j[F+1],g=j[F+2],R=j[F+3];
Q[F]=255-Math.max(0,Math.min(255,Math.sqrt(U*U+k*k)));Q[F+1]=255-Math.max(0,Math.min(255,Math.sqrt(i*i+K*K)));
Q[F+2]=255-Math.max(0,Math.min(255,Math.sqrt(b*b+g*g)))}};d.hx.ayX=function(x,Q,c,$){var z=x.length,j=new Uint8Array(z);
d.hx.iy(x,Q,c,$,d.hx.tY[4],!0);d.hx.iy(x,j,c,$,d.hx.tY[5],!0);for(var F=0;F<z;F++){var U=Q[F],i=j[F];
Q[F]=255-Math.max(0,Math.min(255,Math.sqrt(U*U+i*i)))}};d.hx.iy=function(x,Q,c,$,z,j){Q=new Uint8ClampedArray(Q.buffer);
var U=[-c-1,-c,-c+1,-1,0,1,c-1,c,c+1],i=$-1,b=c-1;for(var F=1;F<i;F++)for(var e=1;e<b;e++){var k=F*c+e,K=d.hx.aI(x,k,c,z);
if(j){if(K<0)K=-K}Q[k]=~~(K+.5)}};d.hx.aI=function(x,Q,c,$){return x[Q-c-1]*$[0]+x[Q-c]*$[1]+x[Q-c+1]*$[2]+x[Q-1]*$[3]+x[Q]*$[4]+x[Q+1]*$[5]+x[Q+c-1]*$[6]+x[Q+c]*$[7]+x[Q+c+1]*$[8]};
d.hx.aAH=function(x,Q,c,$,z){var j=[-c-1,-c,-c+1,-1,0,1,c-1,c,c+1],U=$-1,i=c-1;for(var F=1;F<U;F++)for(var b=1;
b<i;b++){var e=F*c+b;Q[e]=d.hx.aup(x,e,c,z)}};d.hx.aup=function(x,Q,c,$){return x[Q-c-1]*$[0]+x[Q-c]*$[1]+x[Q-c+1]*$[2]+x[Q-1]*$[3]+x[Q]*$[4]+x[Q+1]*$[5]+x[Q+c-1]*$[6]+x[Q+c]*$[7]+x[Q+c+1]*$[8]};
d.Zt={};d.Zt.fO=function(){function x(U,i,b,e,k,K){if(k==0){i.set(U);return}var g=d.R(b*e),R=d.R(b*e);
if(d.Ty(U)){Q(U,i,b,e,k,K);d.GS(U,g,3);d.Zt.a6z(g,R,b,e,k,K);d.Dm(R,i,3)}else{for(var F=0;F<3;F++){d.GS(U,g,F);
d.Zt.a6z(g,R,b,e,k,K);d.Dm(R,i,F)}}}function Q(U,i,b,e,k,K){var g=0,R=new ArrayBuffer(512*4*3),T=[new Int32Array(R,0),new Int32Array(R,2048),new Int32Array(R,2*2048)],D=1+2*Math.round(Math.sqrt(k)),a=D>>>1,_=new Array(D),I=new Array(D);
for(var F=0;F<D;F++){var R=new ArrayBuffer(512*4*3);_[F]=[new Int32Array(R,0),new Int32Array(R,2048),new Int32Array(R,2*2048)];
I[F]=_[F][0]}var f=[d.Zt.tN,d.Zt.by][K],y=f[0],Z=f[1],v=T[0];for(var G=0;G<b;G++)if(G<k||G>b-k-D-1){v.fill(0);
var q=Math.max(G-k,0),h=Math.min(b,G+k+1),r=h-q;for(var H=0;H<k;H++)$(v,U,H*b+q,H*b+h,1);for(var H=0;
H<e;H++){var o=H-k-1,P=H+k;if(P<e)$(v,U,P*b+q,P*b+h,1);if(o>=0)$(v,U,o*b+q,o*b+h,-1);var O=H*b+G<<2;
g=v[300];if(g!=0)for(var F=0;F<3;F++)i[O+F]=y(T[F],U[O+F],g)}}else{for(var F=0;F<D;F++)I[F].fill(0);
var q=G-k+a,h=G+k+1+a;for(var H=0;H<k;H++)c(I,U,H*b+q,H*b+h,1,a);for(var H=0;H<e;H++){var o=H-k-1,P=H+k;
if(o>=0)c(I,U,o*b+q,o*b+h,-1,a);if(P<e)c(I,U,P*b+q,P*b+h,1,a);var p=_[a];g=p[0][300];for(var F=0;F<a;
F++){var C=a-1-F,W=a+1+F,J=_[C],t=_[W],Y=g+J[0][300],l=g+t[0][300],m=H*b+G+C<<2,B=H*b+G+W<<2;if(Y!=0)for(var L=0;
L<3;L++)i[m+L]=Z(p[L],J[L],U[m+L],Y);if(l!=0)for(var L=0;L<3;L++)i[B+L]=Z(p[L],t[L],U[B+L],l)}var O=H*b+G+a<<2;
if(g!=0)for(var L=0;L<3;L++)i[O+L]=y(p[L],U[O+L],g)}G+=D-1}}function c(U,i,b,e,k,K){var g=z,R=b<<2,T=e<<2;
g(U[K-1],i,b-1<<2,k);g(U[K-1],i,e-1<<2,-k);g(U[K+1],i,e<<2,k);g(U[K+1],i,b<<2,-k);for(var F=1;F<K;F++){var D=U[K-F-1],a=U[K+F+1];
for(var _=0;_<=F;_++){var I=_<<2;g(D,i,b-1-_<<2,k);g(D,i,e-1-_<<2,-k);g(a,i,e+_<<2,k);g(a,i,b+_<<2,-k)}}$(U[K],i,b,e,k)}function $(U,i,F,b,e){var k=F<<2,K=b<<2;
while(k<K){z(U,i,k,e);k+=4}}function z(U,i,b,e){var k=e*i[b+3];U[300]+=k;j(U,i[b],0,k);j(U,i[b+1],512,k);
j(U,i[b+2],1024,k)}function j(U,i,b,e){U[b|i]+=e;U[b|256|i>>>4]+=e}return x}();d.Zt.a6z=function(){function x(K,g,R,T,D,a){if(D==0){g.set(K);
return}if(D<=200)Q(K,g,R,T,D,a);else j(K,g,R,T,D,a)}function Q(K,g,R,T,D,a){var _=0,I=new Int32Array(512),f=1+2*Math.round(Math.sqrt(D)),y=f>>>1,Z=new Array(f);
for(var F=0;F<f;F++)Z[F]=new Int32Array(512);var v=[d.Zt.tN,d.Zt.by][a],G=v[0],q=v[1];for(var h=0;h<R;
h++)if(h<D||h>R-D-f-1){I.fill(0);_=0;var r=Math.max(h-D,0),H=Math.min(R,h+D+1),o=H-r;for(var P=0;P<D;
P++){_+=o;$(I,K,P*R+r,P*R+H,1)}for(var P=0;P<T;P++){var O=P-D-1,p=P+D;if(O>=0){_-=o;$(I,K,O*R+r,O*R+H,-1)}if(p<T){_+=o;
$(I,K,p*R+r,p*R+H,1)}var C=G(I,K[P*R+h],_);g[P*R+h]=C}}else{for(var F=0;F<f;F++)Z[F].fill(0);_=0;var r=h-D+y,H=h+D+1+y,o=H-r;
for(var P=0;P<D;P++){_+=o;c(Z,K,P*R+r,P*R+H,1,y)}for(var P=0;P<T;P++){var O=P-D-1,p=P+D;if(O>=0){_-=o;
c(Z,K,O*R+r,O*R+H,-1,y)}if(p<T){_+=o;c(Z,K,p*R+r,p*R+H,1,y)}for(var F=0;F<y;F++){var W=y-1-F,J=y+1+F;
g[P*R+h+W]=q(Z[y],Z[W],K[P*R+h+W],_);g[P*R+h+J]=q(Z[y],Z[J],K[P*R+h+J],_)}g[P*R+h+y]=G(Z[y],K[P*R+h+y],_)}h+=f-1}}function c(K,g,R,T,D,a){var _=z;
_(K[a-1],g[R-1],0,D);_(K[a-1],g[T-1],0,-D);_(K[a+1],g[T],0,D);_(K[a+1],g[R],0,-D);for(var F=1;F<a;F++){var I=K[a-F-1],f=K[a+F+1];
for(var y=0;y<=F;y++){_(I,g[R-1-y],0,D);_(I,g[T-1-y],0,-D);_(f,g[T+y],0,D);_(f,g[R+y],0,-D)}}$(K[a],g,R,T,D)}function $(K,g,F,R,T){while(F<R)z(K,g[F++],0,T)}function z(K,g,R,T){K[R|g]+=T;
K[R|256|g>>>4]+=T}function j(K,g,R,T,D,a){var _=0,I=new Int32Array(512),f=new Int32Array(1*R),y=new Int32Array(512*R),Z=Math.min(D,R),v=Math.min(D,T),G=[d.Zt.tN,d.Zt.by][a],q=G[0];
for(var h=0;h<v;h++)U(y,f,K,R,h,1);for(var h=0;h<T;h++){if(h+D<T)U(y,f,K,R,h+D,1);if(h-D-1>=0)U(y,f,K,R,h-D-1,-1);
I.fill(0);_=0;for(var r=0;r<Z;r++){_+=f[r];i(I,y,r)}for(var r=0;r<R;r++){var H=r-D-1,o=r+D;if(H>=0&&f[H]!=0){_-=f[H];
b(I,y,H)}if(o<R&&f[o]!=0){_+=f[o];i(I,y,o)}var P=_==0?0:q(I,K[h*R+r],_);g[h*R+r]=P}}}function U(K,g,R,T,D,a){var F=D*T;
for(var _=0;_<T;_++){z(K,R[F+_],_<<9,a);g[_]+=a}}function i(K,g,R){for(var F=0;F<16;F++){var T=g[R<<9|256|F];
if(T==0)continue;K[256|F]+=T;var D=F<<4,a=R<<9|D;e(K,g,D,a);e(K,g,D+4,a+4);e(K,g,D+8,a+8);e(K,g,D+12,a+12)}}function b(K,g,R){for(var F=0;
F<16;F++){var T=g[R<<9|256|F];if(T==0)continue;K[256|F]-=T;var D=F<<4,a=R<<9|D;k(K,g,D,a);k(K,g,D+4,a+4);
k(K,g,D+8,a+8);k(K,g,D+12,a+12)}}function e(K,g,R,T){K[R]+=g[T];K[R+1]+=g[T+1];K[R+2]+=g[T+2];K[R+3]+=g[T+3]}function k(K,g,R,T){K[R]-=g[T];
K[R+1]-=g[T+1];K[R+2]-=g[T+2];K[R+3]-=g[T+3]}return x}();d.Zt.LP=.5;d.Zt.tN=[function(x,Q,c){var $=~~(.5+d.Zt.LP*c),z=0,F=256;
while(z+x[F]<$)z+=x[F++];F=F-256<<4;while(z<$)z+=x[F++];return F-1},function(x,Q,c,$){var z=~~(.5+d.Zt.LP*$),j=0,F=256;
while(j+x[F]+Q[F]<z){j+=x[F]+Q[F];F++}F=F-256<<4;while(j<z){j+=x[F]+Q[F];F++}return F-1}];d.Zt.St=100;
d.Zt.by=[function(x,Q,c){var $=d.Zt.St,z=0,j=0,F=Math.max(0,Q-$),U=Math.min(256,Q+$+1);while(F<U){var i=x[F];
z+=F*i;j+=i;F++}return j==0?0:z/j},function(x,Q,c,$){var z=d.Zt.St,j=0,U=0,F=Math.max(0,c-z),i=Math.min(256,c+z+1);
while(F<i){var b=x[F]+Q[F];j+=F*b;U+=b;F++}return U==0?0:j/U}];d.D={};d.D.Tn=function(x){var Q=X.Y.e3(x.Trnf),c=x.Sz.v,$=d.D.u_(Q,new gh(0,0,c.Wdth.v,c.Hght.v));
return d.D.uL($)};d.D.u_=function(x,Q){var c=x[0],$=x[1],z=x[2],j=x[3],U=x[6],i=x[7],b=x[4],e=x[5],k=0,K=0,g=1,R=0,T=0,D=1,a=1,_=1;
if(Q){k=Q.x;K=Q.y;g=Q.x+Q.m;R=Q.y;T=Q.x;D=Q.y+Q.e;a=Q.x+Q.m;_=Q.y+Q.e}return d.D.asA(x,[k,K,g,R,a,_,T,D])};
d.D.anp=function(x){function Q(j,U){for(var F=0;F<U.length;F+=2)if(!c(j,U[F],U[F+1]))return!1;return!0}function c(j,U,i){return j[2*U]==j[2*i]&&j[2*U+1]==j[2*i+1]}var $=0;
if(Q(x,[0,1,2,3]))$+=1;if(Q(x,[0,3,1,2]))$+=2;return $};d.D.asA=function(x,Q){function c(C,F,W){var P=C[F*2]-C[W*2],O=C[F*2+1]-C[W*2+1];
return Math.sqrt(P*P+O*O)}var $=x[0],z=x[1],j=x[2],U=x[3],i=x[6],b=x[7],e=x[4],k=x[5],K=Q[0],g=Q[1],R=Q[2],T=Q[3],D=Q[6],a=Q[7],_=Q[4],I=Q[5],f=[[K,g,1,0,0,0,-K*$,-g*$,$],[0,0,0,K,g,1,-K*z,-g*z,z],[R,T,1,0,0,0,-R*j,-T*j,j],[0,0,0,R,T,1,-R*U,-T*U,U],[D,a,1,0,0,0,-D*i,-a*i,i],[0,0,0,D,a,1,-D*b,-a*b,b],[_,I,1,0,0,0,-_*e,-I*e,e],[0,0,0,_,I,1,-_*k,-I*k,k]],y=[0,0,0,0,0,0,0,0],Z=d.BS.I1(f,y);
if(Z!=0){y=[0,0,0,0,0,0,0,0];var v=d.D.anp(x),G=d.D.anp(Q);if(v==G&&v!=0){var q=v==1,h=q?3:1,r=c(x,0,h),H=c(Q,0,h),o=H/r,P=x[2*h]-x[0],O=x[2*h+1]-x[1],p=new bI;
p.translate(-$,-z);p.rotate(Math.atan2(O,P)-(q?Math.PI/2:0));if(q)p.scale(1,o);else p.scale(o,1);p.translate(K,g);
p.HQ();y=d.D.Gr(p)}}return y};d.D.R=function(x,Q){if(x==null)x=Q=0;return[1,0,x,0,1,Q,0,0]};d.D.up=function(x){return Math.abs(x[6])<1e-10&&Math.abs(x[7])<1e-10};
d.D.uL=function(x){return new bI(x[0],x[3],x[1],x[4],x[2],x[5])};d.D.Gr=function(x){return[x.V,x.dC,x.DX,x.J,x.xq,x.ti,0,0]};
d.D.i=function(x,Q){var c=new Float64Array(2);for(var $=0;$<Q.length;$+=2){var z=Q[$],j=Q[$+1];d.D.YO(z,j,x,c);
Q[$]=c[0];Q[$+1]=c[1]}};d.D.YO=function(x,Q,c,$){var z=1/(c[6]*x+c[7]*Q+1);$[0]=(c[0]*x+c[1]*Q+c[2])*z;
$[1]=(c[3]*x+c[4]*Q+c[5])*z};d.D.ayn=function(x,Q){var c=new Float64Array(2);d.D.YO(Q.x,Q.y,x,c);return new bC(c[0],c[1])};
d.D.Ny=function(x,Q,c,$){x=new Uint32Array(x.buffer);Q=new Uint32Array(Q.buffer);for(var z=0;z<$;z++){for(var j=0;
j<c;j++){Q[j*$+z]=x[z*c+j]}}};d.D.qf=function(x,Q,c,$){x=new Uint32Array(x.buffer);Q=new Uint32Array(Q.buffer);
for(var z=0;z<$;z++){for(var j=0;j<c;j++){Q[z*c+j]=x[z*c+c-1-j]}}};d.D.aeL=function(x,Q,c,$){x=new Uint32Array(x.buffer);
Q=new Uint32Array(Q.buffer);for(var z=0;z<$;z++){for(var j=0;j<c;j++){Q[z*c+j]=x[($-1-z)*c+j]}}};d.D.akn=function(x){return Math.abs(x[6])<1e-9&&Math.abs(x[7])<1e-9};
d.D.ala=function(x){return Math.abs(x[0])<1e-9&&Math.abs(x[4])<1e-9||Math.abs(x[1])<1e-9&&Math.abs(x[3])<1e-9};
d.D.drawImage=function(x,Q,c,$,z,j,U,i,b){if(U==null)U=!1;if(i==null)i=!1;var e=d.D.HQ(x),k=!0,K=0;for(var F=0;
F<8;F++){var g=Math.round(x[F]);if(F!=2&&F!=5)K+=Math.abs(g);if(Math.abs(g-x[F])>1e-9)k=!1}var R=d.D.akn(x),T=d.D.ala(x)&&R,D=T?1:0;
if(U||k&&K==c+$&&R){d.D.aD$(e,Q,c,$,z,j,i,R,b);return}var a=j.m,_=j.e,I=new Float64Array(2);z=new Uint32Array(z.buffer);
Q=new Uint32Array(Q.buffer);for(var f=0;f<_;f++)for(var y=0;y<a;y++){var Z=f*a+y,v,G,q,h,Y=0,l=0,m=0,B=0;
z[Z]=0;var r=y+j.x+.5,H=f+j.y+.5;v=r;G=H;q=e;var o=q[0]*v+q[1]*G+q[2],P=q[3]*v+q[4]*G+q[5];if(!R){h=1/(q[6]*v+q[7]*G+1);
o*=h;P*=h}var O=o*c,p=P*$,C=O<-1||O>c+1||p<-1||p>$+1;if(i){O=Math.max(.001,Math.min(c-1,O));p=Math.max(.001,Math.min($-1,p))}else if(C)continue;
var W=d.D.a0B(x,c,$,r,H,o,P),J=Math.round(W*2.3);if(W<1.1){d.D.Sj(O,p,Q,c,$,z,Z,D);continue}if(!i&&(O<.6||O>c-.6||p<.6||p>$-.6)){J=Math.max(J,5)}if(i&&C)J=1;
var t=1/J,L=j.x+y,A=j.y+f;q=e;for(var F=0;F<J;F++)for(var S=0;S<J;S++){v=L+(F+.5)*t;G=A+(S+.5)*t;var O=q[0]*v+q[1]*G+q[2],p=q[3]*v+q[4]*G+q[5];
if(!R){h=1/(q[6]*v+q[7]*G+1);O*=h;p*=h}if(i){O=Math.max(.001,Math.min(.999,O));p=Math.max(.001,Math.min(.999,p))}else if(O<0||O>=1||p<0||p>=1)continue;
O=Math.floor(O*c);p=Math.floor(p*$);var M=p*c+O,N=Q[M],s=N>>>24;Y+=(N&255)*s;l+=(N>>>8&255)*s;m+=(N>>>16&255)*s;
B+=s}if(B!=0){var V=1/B;Y=~~(Y*V+.5);l=~~(l*V+.5);m=~~(m*V+.5);B=~~(B*t*t+.5);z[Z]=B<<24|m<<16|l<<8|Y}}};
d.D.a0B=function(x,Q,c,$,z,j,U){var i=d.D.avL(x,$,z,j+1/Q,U),b=d.D.avL(x,$,z,j,U+1/c);return 1/Math.sqrt(Math.max(i,b))};
d.D.avL=function(x,Q,c,$,z){var j=1/(x[6]*$+x[7]*z+1),U=(x[0]*$+x[1]*z+x[2])*j-Q,i=(x[3]*$+x[4]*z+x[5])*j-c;
return U*U+i*i};d.D.aD$=function(x,Q,c,$,z,j,U,i,b){if(i&&!U&&j.P()>4e6&&b){d.D.a0G(x,Q,c,$,z,j,U,i,b);
return}var e=j.x+j.m,k=j.y+j.e,K=0,g=new Uint32Array(z.buffer),R=new Uint32Array(Q.buffer),T=x[0]*c,D=x[1]*c,a=x[2]*c,_=x[3]*$,I=x[4]*$,f=x[5]*$,y=x[6],Z=x[7];
if(i&&!U)for(var v=j.y+.5;v<k;v++)for(var G=j.x+.5;G<e;G++){var q=T*G+D*v+a,h=_*G+I*v+f;if(0<q&&q<c&&0<h&&h<$){var r=~~h*c+~~q;
g[K]=R[r]}else g[K]=0;K++}else for(var v=j.y+.5;v<k;v++)for(var G=j.x+.5;G<e;G++){var H=1/(y*G+Z*v+1),q=(T*G+D*v+a)*H,h=(_*G+I*v+f)*H;
if(U){q=Math.max(.001,Math.min(c-1,q));h=Math.max(.001,Math.min($-1,h))}if(0<q&&q<c&&0<h&&h<$){var r=Math.floor(h)*c+Math.floor(q);
g[K]=R[r]}else g[K]=0;K++}};d.D.a0G=function(x,Q,c,$,z,j,U,i,b){var e=new Uint32Array(z.buffer),k=new Uint32Array(Q.buffer),Z=0;
if(b&&(j.m&3)!=0)throw"e";var K=x[0]*c,g=x[1]*c,R=x[2]*c,T=x[3]*$,D=x[4]*$,a=x[5]*$,_=x[6],I=x[7],f=j.m,y=j.e,v=j.x+.5,G=j.y+.5,q=(f>>>2<<2)-1e-9,h=-.1+(y>>>1<<1)-1e-9,r=~~c,H=K==0?0:1/K,o=T==0?0:1/T;
for(var P=0;P<y;P++){var O=v*K+g*(P+G)+R,p=v*T+D*(P+G)+a,C=0,W=f;if(K==0){}else if(H>0){C=Math.max(C,-O*H);
W=Math.min(W,(c-O)*H)}else{W=Math.min(W,-O*H);C=Math.max(C,(c-O)*H)}if(T==0){}else if(o>0){C=Math.max(C,-p*o);
W=Math.min(W,($-p)*o)}else{W=Math.min(W,-p*o);C=Math.max(C,($-p)*o)}if(W<0)W=0;if(C>W)C=W;C=~~Math.ceil(C);
W=~~W;Z=~~(P*f);e.fill(0,Z,Z+C);Z+=C;for(var J=C;J<W;J+=4){var t=K*J+O,Y=T*J+p,l=~~Y*r+~~t,m=k[l];e[Z]=m;
e[Z+1]=m;e[Z+2]=m;e[Z+3]=m;Z+=4}e.fill(0,Z,Z+f-W)}};d.D.HQ=function(x){var Q=x[4]-x[5]*x[7],c=x[2]*x[7]-x[1],$=x[1]*x[5]-x[2]*x[4],z=x[5]*x[6]-x[3],j=x[0]-x[2]*x[6],U=x[3]*x[2]-x[0]*x[5],i=x[3]*x[7]-x[4]*x[6],b=x[1]*x[6]-x[0]*x[7],e=1/(x[0]*x[4]-x[1]*x[3]);
return[Q*e,c*e,$*e,z*e,j*e,U*e,i*e,b*e]};d.D.Vi=function(x,Q){var c=x[0],$=x[1],z=x[2],j=x[3],U=x[4],i=x[5],b=x[6],e=x[7],k=Q[0],K=Q[1],g=Q[2],R=Q[3],T=Q[4],D=Q[5],a=Q[6],_=Q[7],I=[c*k+$*R+z*a,c*K+$*T+z*_,c*g+$*D+z,j*k+U*R+i*a,j*K+U*T+i*_,j*g+U*D+i,b*k+e*R+a,b*K+e*T+_],f=1/(b*g+e*D+1);
for(var F=0;F<8;F++)I[F]*=f;return I};d.D.Sj=function(x,Q,c,$,z,j,U,i){var b=x,e=Q,g=0,R=0,T=0,D=0;x-=.499999;
Q-=.499999;var k=Math.floor(x),K=Math.floor(Q);if(i==0){var F=K*$+k,a=k>=0&&k<$,_=k+1>=0&&k+1<$,I=K>=0&&K<z,f=K+1>=0&&K+1<z;
if(a&&I)g=c[F];if(_&&I)R=c[F+1];if(a&&f)T=c[F+$];if(_&&f)D=c[F+$+1]}else if(i==1){var y=k<0?0:k>$-1?$-1:k,Z=k<-1?0:k>$-2?$-1:k+1,v=K<0?0:K>z-1?z-1:K,G=K<-1?0:K>z-2?z-1:K+1;
g=c[v*$+y];R=c[v*$+Z];T=c[G*$+y];D=c[G*$+Z]}else{var y=(k+50*$)%$,Z=(k+50*$+1)%$,v=(K+50*z)%z,G=(K+50*z+1)%z;
g=c[v*$+y];R=c[v*$+Z];T=c[G*$+y];D=c[G*$+Z]}var q=x-k,h=Q-K,r=(1-h)*(1-q)*(g>>>24),H=(1-h)*q*(R>>>24),o=h*(1-q)*(T>>>24),P=h*q*(D>>>24),O=r+H+o+P,p=r*(g&255)+H*(R&255)+o*(T&255)+P*(D&255),C=r*(g>>>8&255)+H*(R>>>8&255)+o*(T>>>8&255)+P*(D>>>8&255),W=r*(g>>>16&255)+H*(R>>>16&255)+o*(T>>>16&255)+P*(D>>>16&255);
if(O==0)j[U]=0;else{var J=1/O;p=~~(p*J+.5);C=~~(C*J+.5);W=~~(W*J+.5);O=~~(O+.5);j[U]=O<<24|W<<16|C<<8|p}};
d.D.aBI=function(x,Q,c,$,z,j){var U=x-.499999,i=Q-.499999,b=~~U,e=~~i,k=U-b,K=i-e,g=(1-K)*(1-k),R=(1-K)*k,T=K*(1-k),D=K*k,a=e*$+b<<2,_=(e+1)*$+b<<2,I=g*c[a]+R*c[a+4]+T*c[_]+D*c[_+4],f=g*c[a+1]+R*c[a+5]+T*c[_+1]+D*c[_+5],y=g*c[a+2]+R*c[a+6]+T*c[_+2]+D*c[_+6],Z=g*c[a+3]+R*c[a+7]+T*c[_+3]+D*c[_+7];
j[0]=I;j[1]=f;j[2]=y;j[3]=Z};d.D.k3=function(x,Q,c,$,z){x-=.499999;Q-=.499999;var j=Math.floor(x),U=Math.floor(Q),i=x-j,b=Q-U,e=(1-b)*(1-i),k=(1-b)*i,K=b*(1-i),g=b*i,R=(j+50*$)%$,T=(j+1+50*$)%$,D=(U+50*z)%z,a=(U+1+50*z)%z,_=c[D*$+R],I=c[D*$+T],f=c[a*$+R],y=c[a*$+T];
if(_==null||y==null)throw"e";return e*_+k*I+K*f+g*y};d.D.a8r=function(x,Q,c,$,z){x-=.499999;Q-=.499999;
var j=Math.floor(x),U=Math.floor(Q),i=x-j,b=Q-U,e=(1-b)*(1-i),k=(1-b)*i,K=b*(1-i),g=b*i,R=0,T=U*$+j,D=T+$;
if(0<=U&&U<z&&0<=j&&j<$)R+=e*c[T];if(0<=U&&U<z&&0<=j+1&&j+1<$)R+=k*c[T+1];if(0<=U+1&&U+1<z&&0<=j&&j<$)R+=K*c[D];
if(0<=U+1&&U+1<z&&0<=j+1&&j+1<$)R+=g*c[D+1];return R};d.D.a3I=function(x,Q,c,$,z,j,U,i,b,e,k,K){var g=new Uint32Array(x.buffer),R=new Uint32Array($.buffer),T=(1+2*e)/z,D=[],a=[];
for(var _=0;_<z;_++){var I=-.25+e-_*T;D.push(Math.cos(2*Math.PI*I)*K/k);D.push(Math.sin(2*Math.PI*I)/k)}U*=Q;
i*=c;for(var f=0;f<j;f++){var y=Math.pow(f/j,b)*j;for(var _=0;_<z;_++){var Z=U+D[_<<1]*y,v=i+D[(_<<1)+1]*y,G=~~(.5+(Z<0?0:Z>Q-1?Q-1:Z)),q=~~(.5+(v<0?0:v>c-1?c-1:v));
R[f*z+_]=g[q*Q+G]}}};d.D.ax7=function(x,Q,c,$,z,j,U,i,b,e,k,K){var g=new Uint32Array(x.buffer),R=new Uint32Array($.buffer),T=1/K,D=[],a=c*4,_=1/a;
for(var I=0;I<a+10;I++)D.push(Math.pow(I*_,1/b)*c*k);U*=z;i*=j;for(var I=0;I<j;I++)for(var f=0;f<z;f++){var y=T*(f-U),Z=I-i,v=1.75-Math.atan2(Z,y)*(1/(2*Math.PI));
v=v-~~v;v=(v+e)*(1/(1+2*e));var G=Math.sqrt(y*y+Z*Z);G=D[~~(G*4)];d.D.Sj(v*Q+.5,G+.5,g,Q,c,R,I*z+f,1)}};
d.D.KL=function(x,Q,c,$,z){var j=z[0],U=z[1];for(var i=0;i<U;i++)for(var b=0;b<j;b++){var e=z[2]*b+z[3]*i+z[4],k=z[5]*b+z[6]*i+z[7],K=i*j+b<<2,g=k*Q+e<<2;
$[K]=x[g+0];$[K+1]=x[g+1];$[K+2]=x[g+2];$[K+3]=x[g+3]}};d.I={rV:function(x,Q){var c=~~(.499+x*Q);return c<0?0:c>Q?Q:c},amA:function(x,Q,c,$,z,j,U,i){var b=c[0],e=c[1],k=c[2],K=c[3],g=$.m,R=$.e,T=new Float64Array(g*4+8),D=new Float64Array(g*4+8);
for(var a=0,F=0;a<R;a++){var _=T;T=D;D=_;D.fill(0);for(var I=0;I<g;I++,F++){var f=I+z,y=a+j,Z=b*f+e*y,v=k*f+K*y,G=0,r=0;
if(i==0)G=Z+.5;else if(i==1)G=2*Math.sqrt(Z*Z+v*v);else if(i==2)G=(Math.PI+Math.atan2(-v,-Z))/(2*Math.PI);
else if(i==3)G=Math.abs(Z*2);else if(i==4)G=2*(Math.abs(Z)+Math.abs(v));var q=d.I.rV(G,U)*4,h=I*4;for(var H=0;
H<4;H++){var o=Math.max(0,Math.min(254.999,Q[q+H]+T[h+4+H])),P=Math.floor(o);if(Math.random()<o-P)P++;
var O=o-P;T[h+8+H]=O*(7/16);D[h+0+H]=O*(3/16);D[h+4+H]=O*(5/16);D[h+8+H]=O*(1/16);r|=P<<H*8}x[F]=r}}},ft:[function(x,Q,c,$,z,j,U){var i=c[0],b=c[1],e=c[2],k=c[3],K=$.m,g=$.e;
for(var R=0,F=0;R<g;R++)for(var T=0;T<K;T++,F++){var D=T+z,a=R+j,_=i*D+b*a,I=e*D+k*a,f=_+.5;x[F]=Q[d.I.rV(f,U)]}},function(x,Q,c,$,z,j,U){var i=c[0],b=c[1],e=c[2],k=c[3],K=$.m,g=$.e;
for(var R=0,F=0;R<g;R++)for(var T=0;T<K;T++,F++){var D=T+z,a=R+j,_=i*D+b*a,I=e*D+k*a,f=2*Math.sqrt(_*_+I*I);
x[F]=Q[d.I.rV(f,U)]}},function(x,Q,c,$,z,j,U){var i=c[0],b=c[1],e=c[2],k=c[3],K=$.m,g=$.e;for(var R=0,F=0;
R<g;R++)for(var T=0;T<K;T++,F++){var D=T+z,a=R+j,_=i*D+b*a,I=e*D+k*a,f=(Math.PI+Math.atan2(-I,-_))/(2*Math.PI);
x[F]=Q[d.I.rV(f,U)]}},function(x,Q,c,$,z,j,U){var i=c[0],b=c[1],e=c[2],k=c[3],K=$.m,g=$.e;for(var R=0,F=0;
R<g;R++)for(var T=0;T<K;T++,F++){var D=T+z,a=R+j,_=i*D+b*a,I=e*D+k*a,f=Math.abs(_*2);x[F]=Q[d.I.rV(f,U)]}},function(x,Q,c,$,z,j,U){var i=c[0],b=c[1],e=c[2],k=c[3],K=$.m,g=$.e;
for(var R=0,F=0;R<g;R++)for(var T=0;T<K;T++,F++){var D=T+z,a=R+j,_=i*D+b*a,I=e*D+k*a,f=2*(Math.abs(_)+Math.abs(I));
x[F]=Q[d.I.rV(f,U)]}}]};d.I.aAP=function(x,Q){return x+.5};d.I.afR=function(x,Q){return 2*Math.sqrt(x*x+Q*Q)};
d.I.a1q=function(x,Q){return(Math.PI+Math.atan2(-Q,-x))/(2*Math.PI)};d.I.ar3=function(x,Q){return Math.abs(x*2)};
d.I.acJ=function(x,Q){return 2*(Math.abs(x)+Math.abs(Q))};d.I.yV=function(x,Q,c,$,z,j,U,i,b,e,k,K){var g=x.Clrs,R=new Uint32Array(Q.buffer),T=1023,D=g?d.I.rr(x,b,e):null;
if(K&&g){var a=d.I.abM(x,D,T+1,U);d.I.amA(R,a,$,c,c.x-z,c.y-j,T,i)}else{var _=g?d.I.aeX(x,D,T+1,U):d.I.aCT(x,T+1,U);
if(i<5){d.I.ft[i](R,_,$,c,c.x-z,c.y-j,T)}else{var I=new Uint8Array(_.buffer),f=c.m,y=c.e,Z=k.Mr-k.b$,v=1/Z,G=k.I$.m-c.m>>1,q=k.I$.e-c.e>>1,h=k.I$.m,r=-.6*v,H=(-.6+.4)*v,o=(-.6+2*.4)*v,P=(-.6+3*.4)*v;
for(var O=0,F=0;O<y;O++)for(var p=0;p<f;p++,F+=4){var C=0,W=0,J=0,t=0,Y=(O+q)*h+p+G,l=(k.Tu[Y]-k.b$)*v,m=0;
if(l<=0||l>=1){m=(l<=0?0:T)<<2;Q[F]=I[m];Q[F+1]=I[m+1];Q[F+2]=I[m+2];Q[F+3]=I[m+3];continue}m=Math.max(0,Math.min(T-1,Math.round((l+r)*T)))<<2;
W+=I[m];J+=I[m+1];t+=I[m+2];C+=I[m+3];m=Math.max(0,Math.min(T-1,Math.round((l+H)*T)))<<2;W+=I[m];J+=I[m+1];
t+=I[m+2];C+=I[m+3];m=Math.max(0,Math.min(T-1,Math.round((l+o)*T)))<<2;W+=I[m];J+=I[m+1];t+=I[m+2];C+=I[m+3];
m=Math.max(0,Math.min(T-1,Math.round((l+P)*T)))<<2;W+=I[m];J+=I[m+1];t+=I[m+2];C+=I[m+3];Q[F]=W>>>2;
Q[F+1]=J>>>2;Q[F+2]=t>>>2;Q[F+3]=C>>>2}}}};d.I.rr=function(x,Q,c){var $=[x.Clrs.v,x.Trns.v],z=[[],[]],j=255;
for(var U=0;U<2;U++)for(var F=0;F<$[U].length;F++){var i,b=$[U][F].v;if(U==0){var e=b.Type.v.Clry;if(e=="FrgC")i={Z:Q>>16&255,r:Q>>8&255,J:Q&255};
else if(e=="BckC")i={Z:c>>16&255,r:c>>8&255,J:c&255};else i=d.I.Du(b.Clr.v)}else{i=b.Opct.v.val*(255/100);
if(i<j)j=i}z[U].push([i,b.Lctn.v/4096,b.Mdpn.v/100])}z.push(j>254);return z};d.I.Du=function(x){var Q,c=x.classID;
if(c=="RGBC"){if(x.Rd)Q={Z:x.Rd.v,r:x.Grn.v,J:x.Bl.v};else Q={Z:x.redFloat.v*255,r:x.greenFloat.v*255,J:x.blueFloat.v*255}}else if(c=="HSBC"){Q=d.Us(x.H.v.val/360,x.Strt.v/100,x.Brgh.v/100);
Q.Z*=255;Q.r*=255;Q.J*=255}else if(c=="CMYC"){var $=100-x.Cyn.v,z=100-x.Mgnt.v,j=100-x.Ylw.v,U=100-x.Blck.v,i=255*$*U*1e-4,b=255*(.2*$+.8*z)*U*1e-4,e=255*(.2*z+.8*j)*U*1e-4;
Q={Z:i,r:b,J:e}}else if(c=="Grsc")Q={Z:255-x.Gry.v,r:255-x.Gry.v,J:255-x.Gry.v};else if(c=="LbCl"){Q=d.Ay(x.Lmnc.v,x.A.v,x.B.v)}else if(c=="BkCl")Q={Z:0,r:0,J:0};
else console.log(x);if(isNaN(Q.Z))Q.Z=Q.r=Q.J=0;return Q};d.I.aCT=function(x,Q,c){var $=new Uint32Array(Q),z=new Uint8Array($.buffer);
$.fill(4278190080);var j=[],U=[],i=x.RndS.v,b=x.Smth.v/4096;for(var F=0;F<4;F++){j[F]=~~(x.Mnm.v[F].v*255/100);
U[F]=~~(x.Mxm.v[F].v*255/100)}var e=d.R(Q*4),k=d.R(Q);for(var K=0;K<3;K++){d.X.atC(null,Q,1,e,[1+Math.round(b*b*b*60),22,i*(2+K)]);
d.GS(e,k,0);d.Dm(k,z,K);var g=j[K],R=U[K];for(var F=0;F<Q;F++)z[4*F+K]=Math.max(g,Math.min(R,z[4*F+K]))}if(c)for(var F=0;
F<Q/2;F++){var T=$[F];$[F]=$[Q-1-F];$[Q-1-F]=T}return $};d.I.lV=function(x){return{classID:"RGBC",Rd:{t:"doub",v:x.Z},Grn:{t:"doub",v:x.r},Bl:{t:"doub",v:x.J}}};
d.I.abM=function(x,Q,c,$){var z=[],j=1/(c-0);for(var F=0;F<c;F++){var U=F*4,i=d.I.US(x,Q,($?c-1-F:F)*j);
z[U]=i[0];z[U+1]=i[1];z[U+2]=i[2];z[U+3]=i[3]}return z};d.I.aeX=function(x,Q,c,$){var z=new Uint32Array(c),j=1/(c-0);
for(var F=0;F<c;F++)z[F]=d.I.uw(x,Q,($?c-1-F:F)*j);return z};d.I.US=function(x,Q,c){var $=x.Intr.v*(1/4096),z=Q[0],j=Q[1],U=z.length-1,i=j.length-1,F=-1,b=0,e=0,k=0,K=0;
if(Q[2])b=255;else{while(F<i&&j[F+1][1]<=c)F++;if(F==-1){b=j[0][0]}else if(F==i){b=j[F][0]}else{var g=d.I.ay$(j,F,c,$);
b=g*j[F][0]+(1-g)*j[F+1][0]}}F=-1;while(F<U&&z[F+1][1]<=c)F++;if(F==-1){var R=z[0][0];e=R.Z;k=R.r;K=R.J}else if(F==U){var R=z[F][0];
e=R.Z;k=R.r;K=R.J}else{var T=z[F][0],D=z[F+1][0],a=d.I.ay$(z,F,c,$);e=a*T.Z+(1-a)*D.Z;k=a*T.r+(1-a)*D.r;
K=a*T.J+(1-a)*D.J}return[e,k,K,b]};d.I.uw=function(x,Q,c){var $=d.I.US(x,Q,c),z=~~(.5+$[0]),j=~~(.5+$[1]),U=~~(.5+$[2]),i=~~(.5+$[3]);
return i<<24|U<<16|j<<8|z};d.I.ay$=function(x,F,Q,c){if(x.length==2)c*=.5;var $=x[F][1],z=x[F+1][1],j=$+x[F+1][2]*(z-$),U;
if(Q<j)U=.5*(Q-$)/(j-$);else U=.5+.5*(Q-j)/(z-j);U=.5+.5*(c*Math.cos(Math.PI*U)+(1-c)*(1-2*U));return U};
d.I.ar9=function(x,Q,c){var $=.5*c.e,z=$*(x/Q),j=Math.sqrt($*$+z*z),U=.5*c.m,i=U*(Q/x),b=Math.sqrt(U*U+i*i);
return Math.min(j,b)};d.I.R9=function(x,Q){var c=Math.PI*x.Angl.v.val/180,$=x.Scl.v.val/100,z=x.Ofst.v,j=z.Hrzn.v.val/100,U=z.Vrtc.v.val/100,i=Math.cos(c),b=-Math.sin(c),e=d.I.ar9(i,b,Q),k=e*$,K=Q.x+Q.m/2+j*Q.m,g=Q.y+Q.e/2+U*Q.e;
return[new bC(K,g),new bC(K+i*k,g+b*k)]};d.I.vO=function(x,Q,c,$){var z=Q.x-x.x,j=-(Q.y-x.y),U=Math.sqrt(z*z+j*j),i=Math.atan2(j,z),b=Math.cos(i),e=-Math.sin(i),k=d.I.ar9(b,e,c),K=U/k,g=(x.x-c.x-c.m/2)/c.m,R=(x.y-c.y-c.e/2)/c.e;
$.Angl.v.val=180*i/Math.PI;$.Scl.v.val=K*100;var T=$.Ofst.v;T.Hrzn.v.val=g*100;T.Vrtc.v.val=R*100};d.I.q1=function(x,Q){for(var F=0;
F<x.length;F++){var c=x[F],$=Math.round(c[0]*4096),z=c[1],j=c[2],U=c[3];if(j==null)j=1;if(U==null)U=.5;
var i=d.I.lV({Z:z[0]*255,r:z[1]*255,J:z[2]*255});Q.Clrs.v[F]={t:"Objc",v:{classID:"Clrt",Lctn:{t:"long",v:$},Mdpn:{t:"long",v:Math.round(U*100)},Clr:{t:"Objc",v:i},Type:{t:"enum",v:{Clry:"UsrS"}}}};
Q.Trns.v[F]={t:"Objc",v:{classID:"TrnS",Lctn:{t:"long",v:$},Mdpn:{t:"long",v:Math.round(U*100)},Opct:{t:"UntF",v:{type:"#Prc",val:Math.round(j*100)}}}}}};
d.I.d9=function(x,Q,c){if(Q){x=JSON.parse(JSON.stringify(x));for(var F=0;F<2;F++){var $=x[F==0?"Clrs":"Trns"].v;
for(var z=0;z<$.length;z++)$[z].v.Lctn.v=4096-$[z].v.Lctn.v;$.reverse()}}var j=[],U=1/255,i=x.Clrs.v,b=x.Trns.v,$=i;
if(i9==0||i.length!=b.length){if(i9!=0)console.log("strange gradient");if(c!=!0)$=i.concat(b);var e=d.I.rr(x,0,0);
for(var F=0;F<$.length;F++){var k=$[F].v,K=k.Lctn.v/4096,g=d.I.US(x,e,K);j.push([K,[g[0]*U,g[1]*U,g[2]*U],g[3]*U])}j.sort(function(T,D){return T[0]-D[0]});
for(var F=1;F<j.length;F++)if(j[F][0]-j[F-1][0]<.001){j.splice(F,1);F--}}else{for(var F=0;F<$.length;
F++){var k=i[F].v,R=k.Clr.v,K=k.Lctn.v/4096;j.push([K,[R.Rd.v*U,R.Grn.v*U,R.Bl.v*U],b[F].v.Opct.v.val*.01])}}return j};
d.a6j={};d.a6j.Z8=function(x,Q,c,$,z,j,U,i,b,e,k,K){var g,R,T,D=Date.now(),a=!1,_=U,I=e,f,y,Z,v,G=j*255,q=255-b*255,h=1+z*6,r=1+i*6,H=1+K*4,o=(H-1)/7,P=0,O=255-0,p,C,W,J,t,Y,l,m,B,L,A,S,M,N=0,s=1,V,g8,n,cQ,hk,eG,ie,eN,gr,ek,jK=1+k,iE,e9=d.R(c*$),dm=d.R(c*$),kD=d.R(c*$),gJ=d.R(c*$),dR=255/G,fO=255/(255-q);
for(R=0;R<$;R++){for(g=0;g<c;g++){var F=R*c+g,ko=F<<2;V=d.I5(x[ko],x[ko+1],x[ko+2]);gJ[F]=V;if(V<G)e9[F]=255-V*dR;
if(V>q)dm[F]=255-(255-V)*fO}}if(a)console.log("init",Date.now()-D);D=Date.now();if(z*_>0){kD.set(e9);
d.yg.hh(kD,e9,new gh(0,0,c,$),_)}if(i*I>0){kD.set(dm);d.yg.hh(kD,dm,new gh(0,0,c,$),I)}if(a)console.log("blur",Date.now()-D);
D=Date.now();var d8=d.R(256),fj=d.R(256);for(var F=0;F<256;F++){var ja=F*(1/255),eD=0;eD=(1-Math.pow(1-ja,h))*255;
d8[F]=Math.max(0,Math.min(255,~~(eD+.5)));eD=Math.pow(ja,r)*255;fj[F]=Math.max(0,Math.min(255,~~(eD+.5)))}var d3=new Uint8ClampedArray(Q.buffer),fP=new Float32Array(32768);
for(var F=0;F<32768;F++){iE=Math.sqrt(F)*(1/128);if(jK>1)iE=(1-iE)*(jK-1)+1;else iE=iE*(jK-1)+1;fP[F]=iE}for(R=0;
R<$;R++){for(g=0;g<c;g++){var F=R*c+g,ko=F<<2,eD=gJ[F],jE=e9[F]*(1/255),cR=dm[F]*(1/255);eD=(1-jE)*eD+jE*d8[~~eD];
eD=(1-cR)*eD+cR*fj[~~eD];V=eD;var ex=x[ko],er=x[ko+1],cE=x[ko+2];g8=-ex*.168736-er*.331264+cE*.5;n=ex*.5-er*.418688-cE*.081312;
iE=fP[~~(.5+g8*g8+n*n)];cQ=g8*iE;eG=n*iE;s=1-Math.min(2-(jE+cR),1);g8=s*g8+(1-s)*cQ;n=s*n+(1-s)*eG;eN=V+1.402*n;
gr=V-.34414*g8-.71414*n;ek=V+1.772*g8;d3[ko]=~~(.5+eN);d3[ko+1]=~~(.5+gr);d3[ko+2]=~~(.5+ek)}}if(a)console.log("apply masks",Date.now()-D);
D=Date.now()};d.yW={};d.yW.rT=function(x,Q,c,$,z){var j=Date.now(),U=!1,D=1,O=0,B=0;if(!Q.PC(z)){var i=Q.iO(z),b=d.R(i.P()*4);
d.WK(x,Q,b,i);x=b;Q=i}var e=d.R(Q.P());d.L2(c,z,e,Q);d.round(e);z=z.y_(Q);var k=z.m,K=z.e,g=k*3<K?2:1,R=K*3<k?2:1;
if(z.P()*(g*2+1)*(R*2+1)<Q.P()){var i=new gh(z.x-k*g,z.y-K*g,k*(g*2+1),K*(R*2+1)).y_(Q),b=d.R(i.P()*4);
d.WK(x,Q,b,i);var T=d.R(i.P());d.L2(e,Q,T,i);Q=i;x=b;e=T}while((Q.m+Q.e)/2/D>400)D++;var a=x,_=Q,I=e,f=Math.floor(_.m/D),y=Math.floor(_.e/D);
x=d.R(f*y*4);d.scale.hR(a,_.m,_.e,x,f,y,1/D);e=d.R(f*y);d.scale.KL(I,_.m,_.e,e,f,y,1/D);d.round(e,1);
if(U)console.log("scale down:",D,f,y);var Z=d.qQ(e,new gh(0,0,f,y));if(Z._6())return 1;var v=Math.round((Z.m+Z.e)/2/15);
if(U)console.log(Date.now()-j,"preprocess");j=Date.now();var G=d.R(f*y*4);d.aBl(x,G);var q=Int16Array,h=new q(f*y*24),r=new q(64),H=new q(64),o=new q(64),P=new q(64);
for(var p=3;p<y-4;p++)for(var C=3;C<f-4;C++){var W=p*f+C;if(e[W]==255)continue;if(d.yW.a3W(G,e,C,p,f,y,r,H,o)!=0)continue;
d.yW.F$(r,P);var J=O*24;h[J]=C;h[J+1]=p;d.yW.SO(r,h,J+4,12);d.yW.F$(H,P);d.yW.SO(H,h,J+16,4);d.yW.F$(o,P);
d.yW.SO(o,h,J+20,4);var t=h[J+5],Y=h[J+6];h[J+5]=h[J+16];h[J+6]=h[J+20];h[J+16]=t;h[J+20]=Y;O++}if(O==0)return 2;
if(U)console.log(Date.now()-j,"FWHT computed");j=Date.now();var l=[];d.yW.Xa(0,O-1,l,h,new q(2*24));
if(U)console.log(Date.now()-j,"KD tree computed");j=Date.now();var m=new Uint32Array(f*y*4);for(var F=0;
F<O;F++){var L=F,A=d.yW.ap_(L,h,l,v);if(A==-1)continue;var S=L*24,M=A*24,N=h[S],s=h[S+1],V=h[M],g8=h[M+1];
B+=d.yW.getError(M,S,h,1e99);var n=V-N,cQ=g8-s;m[(y+cQ)*2*f+(f+n)]+=1}if(U)console.log(Date.now()-j,"NN found");
j=Date.now();var hk=[],eG=1/(2*f);for(var F=0;F<m.length;F++){if(m[F]>0){var p=Math.floor(F*eG),C=F-p*2*f;
hk.push({x:C-f,y:p-y,b:m[F],FY:-1})}}hk.sort(function(d3,fP){return fP.b-d3.b});var ie=new Int32Array(f*y),eN=[];
for(var F=0;F<f*y;F++){if(e[F]==255){ie[F]=eN.length>>>1;eN.push(F%f,Math.floor(F/f))}else if(x[(F<<2)+3]<200){ie[F]=-2}else{ie[F]=-1}}var gr=d.yW.ai7(f,y,hk,ie,eN);
if(gr==null){if(U)console.log("no appropriate labeling");return 3}var ek=gr._Q,top=gr.top;ek=d.yW.arC(ek,x,f,y,top,ie,eN);
if(U)console.log(Date.now()-j,"optimal labeling found");j=Date.now();var i=z.clone();i.ss(1,1);i=i.y_(_);
var jK=d.R(i.P()*4),iE=d.R(i.P());d.WK(a,_,jK,i);var e9=_.m,dm=_.e;for(var p=0;p<dm;p++)for(var C=0;
C<e9;C++){if(I[p*e9+C]==0)continue;var kD=Math.min(Math.floor(C/D),f-1),gJ=Math.min(Math.floor(p/D),y-1),dR=ie[gJ*f+kD];
if(dR==-1)continue;var fO=ek[dR],ko=top[fO],d8=C+ko.x*D,fj=p+ko.y*D,ja=fj*e9+d8<<2,eD=(p-i.y+_.y)*i.m+(C-i.x+_.x)<<2;
jK[eD]=a[ja];jK[eD+1]=a[ja+1];jK[eD+2]=a[ja+2];jK[eD+3]=a[ja+3];jK[eD+3]=a[ja+3];iE[eD>>2]=fO+1}if(U)console.log(Date.now()-j,"copied back");
j=Date.now();d.vj.rT(jK,iE,i,null,1e3);if(U)console.log(Date.now()-j,"poisson smooth");j=Date.now();
d.WK(jK,i,$,z);return 0};d.yW.aew=function(x,Q,c,$,z,j){return d.yW.zD(x+z.x,Q+z.y,c,$,j)?0:1e9};d.yW.arC=function(x,Q,c,$,top,z,j){var U=Date.now(),i=j.length>>>1,b=[-1,0,0,-1,1,0,0,1],e=1e99,k=[],K=[],g=2*(i*2*3+i*2),R=null,T=0,D=0,a=0,_=1e99;
while(!0&&Date.now()<U+12e3){a++;var I=null,f=e;for(var y=0;y<top.length;y++){var Z=top[y],v=0,G=i+2,q=0;
for(var F=0;F<i;F++){var h=j[F*2],r=j[F*2+1],H=top[x[F]],o=d.yW.aew(h,r,c,$,Z,z),P=x[F]==y?1e9:d.yW.aew(h,r,c,$,H,z);
for(var jF=0;jF<4;jF++){if(jF==0&&h==0||jF==1&&r==0||jF==2&&h==c-1||jF==3&&r==$-1)continue;var O=b[2*jF],p=b[2*jF+1],C=h+O,W=r+p,J=z[W*c+C];
if(J==-2){}else if(J==-1){o+=3*d.yW.EV(C+Z.x,W+Z.y,C,W,c,$,Q,z);o+=2*d.yW.EV(C+Z.x+O,W+Z.y+p,C+O,W+p,c,$,Q,z);
P+=3*d.yW.EV(C+H.x,W+H.y,C,W,c,$,Q,z);P+=2*d.yW.EV(C+H.x+O,W+H.y+p,C+O,W+p,c,$,Q,z)}else if(jF>1){if(x[F]==x[J]){var t=0;
t+=d.yW.EV(h+H.x,r+H.y,h+Z.x,r+Z.y,c,$,Q,z);t+=d.yW.EV(C+H.x,W+H.y,C+Z.x,W+Z.y,c,$,Q,z);k[v]=F;k[v+1]=J;
K[v]=t;K[v+1]=t;v+=2}else{var Y=top[x[J]],l=G,m=0,B=0,L=0;G++;m+=d.yW.EV(h+H.x,r+H.y,h+Z.x,r+Z.y,c,$,Q,z);
m+=d.yW.EV(C+H.x,W+H.y,C+Z.x,W+Z.y,c,$,Q,z);B+=d.yW.EV(h+Y.x,r+Y.y,h+Z.x,r+Z.y,c,$,Q,z);B+=d.yW.EV(C+Y.x,W+Y.y,C+Z.x,W+Z.y,c,$,Q,z);
L+=d.yW.EV(h+Y.x,r+Y.y,h+H.x,r+H.y,c,$,Q,z);L+=d.yW.EV(C+Y.x,W+Y.y,C+H.x,W+H.y,c,$,Q,z);k[v]=F;k[v+1]=l;
K[v]=m;K[v+1]=m;v+=2;k[v]=J;k[v+1]=l;K[v]=B;K[v+1]=B;v+=2;k[v]=l;k[v+1]=i+1;K[v]=L;K[v+1]=0;v+=2}}}k[v]=i;
k[v+1]=F;K[v]=o;K[v+1]=0;v+=2;k[v]=F;k[v+1]=i+1;K[v]=P;K[v+1]=0;v+=2;q+=Math.min(o,P)}if(q>f)continue;
var A=d.RF.I1(G,v,i,i+1,k,K,f);if(A.eW<f){f=A.eW;var S=x.slice(0);d.yW.axI(S,v,k,A.nU,y,i);I=S}}if(f*1>=e){break}e=f;
x=I;if((a&3)==0){if(f*1.03>=_)break;_=f}if((a&3)==0){var M=0*top.length;for(var F=0;F<top.length&&top.length>M;
F++){if(x.indexOf(F)!=-1)continue;top.splice(F,1);for(var J=0;J<x.length;J++)if(x[J]>F)x[J]--;F--}}}return x};
d.yW.axI=function(x,Q,c,$,z,j){for(var F=0;F<$.length;F++){var U=$[F]<<1,i=0,b=0;if(U<Q){i=c[U];b=c[U+1]}else{b=c[U];
i=c[U+1]}if(i==j&&x[b]!=z)x[b]=z}};d.yW.aCw=function(top,x,Q,c,$,z,j,U,i){for(var F=0;F<Q.length;F++){var b=Q[F],e=!0;
if(U!=null&&!d.yW.zD(U+b.x,i+b.y,z,j,c))continue;if(b.FY==-1)b.FY=d.yW.ax$(b,c,$,z,j);if(b.FY<=0)continue;
for(var k=0;k<top.length;k++){var K=top[k],g=b.x-K.x,R=b.y-K.y;if(g*g+R*R<x){e=!1;break}}if(e)return b}return null};
d.yW.ax$=function(x,Q,c,$,z){var j=0;for(var F=0;F<c.length;F+=2){var U=c[F]+x.x,i=c[F+1]+x.y;if(d.yW.zD(U,i,$,z,Q))j++}return j/(c.length>>1)};
d.yW.ai7=function(x,Q,c,$,z){var j=z.length>>>1,top=[];for(var F=0;F<60;F++){var U=d.yW.aCw(top,25,c,$,z,x,Q);
if(U==null)break;else top.push(U)}if(top.length==0)return null;var i=[];for(var F=0;F<j;F++){var b=z[F*2],e=z[F*2+1],k=-1,K=0;
while(!0){K++;var g=Math.random();k=Math.floor(g*.99999*top.length);var R=top[k],T=b+R.x,D=e+R.y;if(d.yW.zD(T,D,x,Q,$))break;
if(K>1e3){var U;U=d.yW.aCw(top,0,c,$,z,x,Q,b,e);if(U==null)for(var a=0;a<4;a++){var _,I,f=0;while(!0){_=~~(Math.random()*x);
I=~~(Math.random()*Q);if(d.yW.zD(_,I,x,Q,$))break;f++;if(f>500)throw"e"}U={x:_-b,y:I-e,b:1,FY:-1};c.push(U);
top.push(U)}else top.push(U);K=0}}i.push(k)}return{top:top,_Q:i}};d.yW.EV=function(x,Q,c,$,z,j,U,i){if(x==c&&Q==$)return 0;
if(x<0||Q<0||x>=z||Q>=j||c<0||$<0||c>=z||$>=j||i[Q*z+x]!=-1||i[$*z+c]!=-1)return 1e7;var b=Q*z+x<<2,e=$*z+c<<2,k=U[b]-U[e],K=U[b+1]-U[e+1],g=U[b+2]-U[e+2];
return 1+(k*k+K*K+g*g)};d.yW.zD=function(x,Q,c,$,z){return x>=0&&x<c&&Q>=0&&Q<$&&z[Q*c+x]==-1};d.yW.ap_=function(x,Q,c,$){var z=24*x,j=Q[z],U=Q[z+1],i=$*$,b=0,g=1e9;
while(c[b]!=99)if(Q[z+c[b]]<c[b+1])b=c[b+2];else b=c[b+3];var e=c[b+1],k=c[b+2],K=-1;for(var F=e;F<=k;
F++){var b=F,R=b*24,T=Q[R],D=Q[R+1];if((T-j)*(T-j)+(D-U)*(D-U)<i)continue;var a=d.yW.getError(R,z,Q,g);
if(a<g){g=a;K=b}}return K};d.yW.getError=function(x,Q,c,$){var z=0;for(var j=4;j<24;j+=4){var U=c[Q+j]-c[x+j],i=c[Q+j+1]-c[x+j+1],b=c[Q+j+2]-c[x+j+2],e=c[Q+j+3]-c[x+j+3];
z+=U*U+i*i+b*b+e*e;if(z>=$)return z+1}return z};d.yW.Xa=function(x,Q,c,$,z){var j=16,g=0;if(Q-x<=j){c.push(99,x,Q);
return}d.yW.pA(x,Q,$,z);var U=-1,i=-1;for(var F=4;F<24;F++){var b=z[2*F+1]-z[2*F];if(b>i){i=b;U=F}}var e=x+Q>>1,k=d.yW.aCV(e,x,Q,$,U),K=-1;
for(var F=x;F<=Q;F++)if($[24*F+U]==k){if(K==-1)K=F;g=F}if(x+8<K&&K-x>Q-g)e=K;else if(g+1<Q-8)e=g+1;else if(Q-x<64){c.push(99,x,Q);
return}else e=e;var R=c.length;c.push(U,k,0,0);c[R+2]=R+4;d.yW.Xa(x,e-1,c,$,z);c[R+3]=c.length;d.yW.Xa(e,Q,c,$,z)};
d.yW.pA=function(x,Q,c,$){for(var F=0;F<48;F+=4){$[F]=3e4;$[F+1]=-3e4;$[F+2]=3e4;$[F+3]=-3e4}for(var F=x;
F<=Q;F++){var z=F*24;for(var j=0;j<24;j++){var U=c[z+j],i=$[j<<1],b=$[(j<<1)+1];if(U<i)$[j<<1]=U;if(U>b)$[(j<<1)+1]=U}}};
d.yW.dL=function(x,Q,c){var $=0,F=0;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;
F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;
F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;
F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;
F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;
F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;
F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;
F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;
F++;$=c[x+F];c[x+F]=c[Q+F];c[Q+F]=$;F++};d.yW.pc=function(x,Q,c,$){var z=c+$>>>1,j=x[24*z+Q];while(c<=$){while(x[24*c+Q]<j)c++;
while(x[24*$+Q]>j)$--;if(c<=$){if(x[24*c+Q]!=x[24*$+Q])d.yW.dL(c*24,$*24,x);c++;$--}}return c};d.yW.aCV=function(x,Q,c,$,z){var j=0;
while(Q!=c){j=d.yW.pc($,z,Q,c);if(x<j)c=j-1;else Q=j}return $[x*24+z]};d.yW.SO=function(x,Q,c,$){for(var F=0;
F<$;F++)Q[c+F]=x[F]};d.yW.a3W=function(x,Q,c,$,z,j,U,i,b){var e=($-3)*z+(c-3),k=e<<2;for(var K=0;K<8;
K++){if(Q[e]+Q[e+1]+Q[e+2]+Q[e+3]+Q[e+4]+Q[e+5]+Q[e+6]+Q[e+7]!=0||x[k+3]<200||x[k+7]<200||x[k+11]<200||x[k+15]<200||x[k+19]<200||x[k+23]<200||x[k+27]<200||x[k+31]<200)return 1;
var F=K<<3;U[F+0]=x[k+0];i[F+0]=x[k+1];b[F+0]=x[k+2];U[F+1]=x[k+4];i[F+1]=x[k+5];b[F+1]=x[k+6];U[F+2]=x[k+8];
i[F+2]=x[k+9];b[F+2]=x[k+10];U[F+3]=x[k+12];i[F+3]=x[k+13];b[F+3]=x[k+14];U[F+4]=x[k+16];i[F+4]=x[k+17];
b[F+4]=x[k+18];U[F+5]=x[k+20];i[F+5]=x[k+21];b[F+5]=x[k+22];U[F+6]=x[k+24];i[F+6]=x[k+25];b[F+6]=x[k+26];
U[F+7]=x[k+28];i[F+7]=x[k+29];b[F+7]=x[k+30];k+=z<<2;e+=z}return 0};d.yW.F$=function(x,Q){Q[0]=x[32]+x[0];
Q[1]=x[33]+x[1];Q[2]=x[34]+x[2];Q[3]=x[35]+x[3];Q[4]=x[36]+x[4];Q[5]=x[37]+x[5];Q[6]=x[38]+x[6];Q[7]=x[39]+x[7];
Q[8]=x[40]+x[8];Q[9]=x[41]+x[9];Q[10]=x[42]+x[10];Q[11]=x[43]+x[11];Q[12]=x[44]+x[12];Q[13]=x[45]+x[13];
Q[14]=x[46]+x[14];Q[15]=x[47]+x[15];Q[16]=x[48]+x[16];Q[17]=x[49]+x[17];Q[18]=x[50]+x[18];Q[19]=x[51]+x[19];
Q[20]=x[52]+x[20];Q[21]=x[53]+x[21];Q[22]=x[54]+x[22];Q[23]=x[55]+x[23];Q[24]=x[56]+x[24];Q[25]=x[57]+x[25];
Q[26]=x[58]+x[26];Q[27]=x[59]+x[27];Q[28]=x[60]+x[28];Q[29]=x[61]+x[29];Q[30]=x[62]+x[30];Q[31]=x[63]+x[31];
Q[32]=x[0]-x[32];Q[33]=x[1]-x[33];Q[34]=x[2]-x[34];Q[35]=x[3]-x[35];Q[36]=x[4]-x[36];Q[37]=x[5]-x[37];
Q[38]=x[6]-x[38];Q[39]=x[7]-x[39];Q[40]=x[8]-x[40];Q[41]=x[9]-x[41];Q[42]=x[10]-x[42];Q[43]=x[11]-x[43];
Q[44]=x[12]-x[44];Q[45]=x[13]-x[45];Q[46]=x[14]-x[46];Q[47]=x[15]-x[47];Q[48]=x[16]-x[48];Q[49]=x[17]-x[49];
Q[50]=x[18]-x[50];Q[51]=x[19]-x[51];Q[52]=x[20]-x[52];Q[53]=x[21]-x[53];Q[54]=x[22]-x[54];Q[55]=x[23]-x[55];
Q[56]=x[24]-x[56];Q[57]=x[25]-x[57];Q[58]=x[26]-x[58];Q[59]=x[27]-x[59];Q[60]=x[28]-x[60];Q[61]=x[29]-x[61];
Q[62]=x[30]-x[62];Q[63]=x[31]-x[63];x[0]=Q[16]+Q[0];x[1]=Q[17]+Q[1];x[2]=Q[18]+Q[2];x[3]=Q[19]+Q[3];
x[4]=Q[20]+Q[4];x[5]=Q[21]+Q[5];x[6]=Q[22]+Q[6];x[7]=Q[23]+Q[7];x[8]=Q[24]+Q[8];x[9]=Q[25]+Q[9];x[10]=Q[26]+Q[10];
x[11]=Q[27]+Q[11];x[12]=Q[28]+Q[12];x[13]=Q[29]+Q[13];x[14]=Q[30]+Q[14];x[15]=Q[31]+Q[15];x[16]=Q[0]-Q[16];
x[17]=Q[1]-Q[17];x[18]=Q[2]-Q[18];x[19]=Q[3]-Q[19];x[20]=Q[4]-Q[20];x[21]=Q[5]-Q[21];x[22]=Q[6]-Q[22];
x[23]=Q[7]-Q[23];x[24]=Q[8]-Q[24];x[25]=Q[9]-Q[25];x[26]=Q[10]-Q[26];x[27]=Q[11]-Q[27];x[28]=Q[12]-Q[28];
x[29]=Q[13]-Q[29];x[30]=Q[14]-Q[30];x[31]=Q[15]-Q[31];Q[0]=x[8]+x[0];Q[1]=x[9]+x[1];Q[2]=x[10]+x[2];
Q[3]=x[11]+x[3];Q[4]=x[12]+x[4];Q[5]=x[13]+x[5];Q[6]=x[14]+x[6];Q[7]=x[15]+x[7];Q[8]=x[0]-x[8];Q[9]=x[1]-x[9];
Q[10]=x[2]-x[10];Q[11]=x[3]-x[11];Q[12]=x[4]-x[12];Q[13]=x[5]-x[13];Q[14]=x[6]-x[14];Q[15]=x[7]-x[15];
x[0]=Q[4]+Q[0];x[1]=Q[5]+Q[1];x[2]=Q[6]+Q[2];x[3]=Q[7]+Q[3];x[4]=Q[0]-Q[4];x[5]=Q[1]-Q[5];x[6]=Q[2]-Q[6];
x[7]=Q[3]-Q[7];x[8]=Q[12]+Q[8];x[9]=Q[13]+Q[9];x[10]=Q[14]+Q[10];x[11]=Q[15]+Q[11];x[12]=Q[8]-Q[12];
x[13]=Q[9]-Q[13];x[14]=Q[10]-Q[14];x[15]=Q[11]-Q[15];Q[0]=x[2]+x[0];Q[1]=x[3]+x[1];Q[2]=x[0]-x[2];Q[3]=x[1]-x[3];
Q[4]=x[6]+x[4];Q[5]=x[7]+x[5];Q[6]=x[4]-x[6];Q[7]=x[5]-x[7];Q[8]=x[10]+x[8];Q[9]=x[11]+x[9];Q[10]=x[8]-x[10];
Q[11]=x[9]-x[11];Q[12]=x[14]+x[12];Q[13]=x[15]+x[13];Q[14]=x[12]-x[14];Q[15]=x[13]-x[15];x[0]=Q[1]+Q[0];
x[1]=Q[0]-Q[1];x[2]=Q[3]+Q[2];x[3]=Q[2]-Q[3];x[4]=Q[5]+Q[4];x[5]=Q[4]-Q[5];x[6]=Q[7]+Q[6];x[7]=Q[6]-Q[7];
x[8]=Q[9]+Q[8];x[9]=Q[8]-Q[9];x[10]=Q[11]+Q[10];x[11]=Q[10]-Q[11];x[12]=Q[13]+Q[12];x[13]=Q[12]-Q[13];
x[14]=Q[15]+Q[14];x[15]=Q[14]-Q[15]};d.yW.a3s=function(){var x="",jF=64,Q="v",c="t",$="a",z=5,F,j,U;
for(F=jF>>1;F>0;F>>=1,z--){for(j=0;j<jF;j++){U=(j>>z&1)!=0;if(U){x+=c+"["+j+"] = "+Q+"["+(-F+j)+"] - "+Q+"["+j+"];  "}else{x+=c+"["+j+"] = "+Q+"["+(F+j)+"] + "+Q+"["+j+"];  "}}$=Q;
Q=c;c=$;x+="\n"}console.log(x)};d.yW.akq=function(jF,x,Q){var c=x,$=Q,z=c,j=0,F,i,b;while(jF>>j!=2)j++;
var U=j;for(F=jF>>1;F>0;F>>=1,j--){for(i=0;i<jF;i++){b=(i>>j&1)!=0;if(b)$[i]=c[-F+i]-c[i];else $[i]=c[F+i]+c[i]}z=c;
c=$;$=z}if((U&1)==1)for(F=0;F<jF;F++)Q[F]=c[F]};d.pX={};d.pX.rz=function(x,Q,c,$,z,j,U,i,b){var e=Date.now(),k=new Uint32Array(x.buffer),K=new Uint32Array(Q.buffer),g=U/c,R=i/$,T=1/g,D=1/R,a=new Float64Array(2),_=3,I=1/_,f=1/(_*_),y=0,Z=0,v=c,G=$;
if(z){y=z.x;Z=z.y;v=z.m;G=z.e}for(var q=0;q<G;q++)for(var h=0;h<v;h++){var r=y+h,H=Z+q,F=H*c+r,o=F<<1,P=F<<2;
d.pX.abt(j,U,i,(r+.5)*g,(H+.5)*R,a);var O=a[0]*T,p=a[1]*D;if(O==0&&p==0)K[F]=k[F];else{d.D.Sj(r+O+.5,H+p+.5,k,c,$,K,F,b)}}};
d.pX.abt=function(x,Q,c,$,z,j){$-=.499999;z-=.499999;var U=~~$,i=~~z,b=$-U,e=z-i,k=(1-e)*(1-b),K=(1-e)*b,g=e*(1-b),R=e*b,T=U<Q-1?U+1:U,D=i<c-1?i+1:i,a=i*Q+U<<1,_=i*Q+T<<1,I=D*Q+U<<1,f=D*Q+T<<1;
j[0]=k*x[a]+K*x[_]+g*x[I]+R*x[f];j[1]=k*x[a+1]+K*x[_+1]+g*x[I+1]+R*x[f+1]};d.pX.arQ=function(x,Q,c,$,z){var j=1/x,U=[-1,1,-x,x],i=$.length;
for(var b=0;b<i;b++){var F=$[b],e=F<<1,k=b<<1,K=~~(F*j),g=F-x*K,R=c[e],T=c[e+1],D=0,a=0;if(g!=0&&g!=x-1){var _=F-1<<1,I=F+1<<1,f=c[_],y=c[I],Z=c[_+1],v=c[I+1],G=R-(f+y)*.5,q=T-(Z+v)*.5;
D-=G*z;a-=q*z}if(K!=0&&K!=Q-1){var _=F-x<<1,I=F+x<<1,f=c[_],y=c[I],Z=c[_+1],v=c[I+1],G=R-(f+y)*.5,q=T-(Z+v)*.5;
D-=G*z;a-=q*z}c[e]=R+D;c[e+1]=T+a}};d.pX.ae$=function(x,Q){var c=x+","+Q;if(d.pX.acp==c)return d.pX.avM;
var $=d.pX.avM=[];d.pX.acp=c;for(var F=0;F<=1e3;F++){var z=F*.001,j=Math.sqrt(z),U=Math.exp(-4*j),i=.96*(1-j*j),b=Q*((1-x)*U+x*i);
$[F]=b}return $};d.pX.acp="";d.pX.avM=[];d.pX.auV=function(x,Q,c,$,z,j,U,i,b,e,k,K,g){var R=Math.max(0,Math.floor(z-U-1)),T=Math.min(Q,Math.ceil(z+U+1)),D=Math.max(0,Math.floor(j-U-1)),a=Math.min(c,Math.ceil(j+U+1)),_=2*Q,I=U*U,f=1/U,y=0;
if(g&&($==3||$==6))b=-b;var Z=d.pX.ae$(i,b);for(var v=D;v<a;v++)for(var G=R;G<T;G++){var F=v*Q+G,q=F<<1,h=(z-G)*f,r=(j-v)*f,H=h*h+r*r;
if(H<1){K[y]=F;var o=Z[~~(H*1e3)];if($==1){x[q]=x[q]*(1-o*.05);x[q+1]=x[q+1]*(1-o*.05)}else{var P=0,O=0,W,J,t,Y;
if($==0){P=e*o;O=k*o}else if($==2){}else if($==3){P=o*r;O=-o*h}else if($==4){P=o*h;O=o*r}else if($==5){P=-o*h;
O=-o*r}else if($==6){P=k*o;O=-e*o}var p=x[q],C=x[q+1];if(G==0||G!=Q-1&&P<0){W=1+x[q+2]-p;t=x[q+3]-C}else{W=p-x[q-2]+1;
t=C-x[q-1]}if(v==0||v!=c-1&&O<0){J=x[q+_]-p;Y=1+x[q+_+1]-C}else{J=p-x[q-_];Y=C-x[q-_+1]+1}x[q]=-(W*P+J*O-p);
x[q+1]=-(t*P+Y*O-C)}y++}}};d.pX.aw2=function(x){var Q=x[0],c=x[0],$=x[1],z=x[1];for(var F=0;F<x.length;
F+=2){var j=x[F],U=x[F+1];if(j<Q)Q=j;else if(j>c)c=j;if(U<$)$=U;else if(U>z)z=U}return[Q,$,c,z]};d.ab$=function(x,Q,c,$,z){function j(V,g8,n,cQ){return Math.sqrt((V-n)*(V-n)+(g8-cQ)*(g8-cQ))}function U(V,g8){return V>=0&&V<Q&&g8>=0&&g8<c}function i(V){if(V<0)return 0;
if(V>=Q)return Q-1;return V}function b(V){if(V<0)return 0;if(V>=c)return c-1;return V}function e(F,V){var g8=V[3]*(1/255),n=$[F]+V[0]*g8;
if(n>255)n=255;$[F]=n;n=$[F+1]+V[1]*g8;if(n>255)n=255;$[F+1]=n;n=$[F+2]+V[2]*g8;if(n>255)n=255;$[F+2]=n}function k(V,g8,n){if(!l(V,g8))return;
if(n[3]<0)n[3]=0;e((g8*Q+V)*4,n)}function K(V){var g8=V.slice(0,3);g8[3]=0;return g8}var g=Q/800;function R(V){return Math.round(V*g)}function T(){for(var F=0;
F<=300;F++){B[F]=D(F)}}function D(c){var V=.8,g8=.2,n=V*g8,cQ=c/60%2-1,hk=n*(1-cQ*cQ),eG=g8-n,ie;if(c<60){ie=[n+eG,hk,0]}else if(c<120){ie=[hk,n,0]}else if(c<180){ie=[0,n,hk]}else if(c<240){ie=[0,hk,n]}else if(c<300){ie=[hk,0,n]}else{ie=[n,0,hk]}return[(ie[0]+eG)*255,(ie[1]+eG)*255,(ie[2]+eG)*255]}function a(c){return B[~~c]}function _(V){return 1-I(V)}function I(V){return V-~~V}function f(V,g8,n,cQ){t(V,g8,n,0,g8+1,1,cQ)}function y(V,g8,n,cQ,hk,eG){t(V,g8,n,0,cQ,1,hk,eG)}function Z(V){for(var F=0;
F<$.length;F+=4){e(F,V)}}function v(V,g8,n,cQ,hk,eG,ie,eN){G(V,g8,n,cQ,hk,1,eG,ie,eN)}function G(V,g8,n,cQ,hk,eG,ie,eN,gr){if(eG==null)eG=.5;
if(ie==null)ie=0;if(eN==null)eN=0;if(gr==null)gr=!1;var ek=V.x,jK=V.y,iE=n.slice(0),e9=~~(n[3]*A);cQ=cQ*A;
if(!gr){g8=Y(g8);hk=Y(hk);ie=Y(ie);eN=Y(eN)}var dm=i(ek-g8),kD=i(ek+g8);for(var gJ=dm;gJ<=kD;gJ++){var dR=gJ-ek,fO=Math.floor(Math.sqrt(g8*g8-dR*dR)),ko=b(jK-fO),d8=b(jK);
for(var fj=ko;fj<=d8;fj++){var ja=j(gJ,fj,ek,jK);if(ja>g8||ja<=g8-hk)break;var eD=(ja-g8+hk)/hk;iE[3]=e9-cQ*(eG==1?eD:Math.pow(eD,eG));
e((fj*Q+gJ)*4,iE)}ko=b(jK+fO);for(var fj=ko;fj>d8;fj--){var ja=j(gJ,fj,ek,jK);if(ja>g8||ja<=g8-hk)break;
var eD=(ja-g8+hk)/hk;iE[3]=e9-cQ*(eG==1?eD:Math.pow(eD,eG));e((fj*Q+gJ)*4,iE)}}if(ie>0){t(V,g8+ie,iE,iE[3],ie,1,0,0,!0)}if(eN>0){t(V,g8-hk,m(n),-n[3],eN,1,0,0,!0)}}function q(V,g8,n,cQ,hk,eG){t(V,g8,n,n[3],g8+1,1,cQ,hk,eG)}function h(V,g8,n,cQ,hk){if(hk==null)hk=!1;
var eG=V.x,ie=V.y;cQ*=A;if(!hk){g8=Y(g8);n=Y(n)}var eN=i(eG-g8),gr=i(eG+g8);for(var ek=eN;ek<gr;ek++){var jK=ek-eG,iE=~~Math.sqrt(g8*g8-jK*jK),e9=b(ie-iE),dm=b(ie);
for(var kD=e9;kD<=dm;kD++){var gJ=j(ek,kD,eG,ie);if(gJ>g8||gJ<=g8-n)break;var dR=(g8-gJ)/n,fO=a(300*dR);
fO[3]=cQ;e((kD*Q+ek)*4,fO)}e9=b(ie+iE);for(var kD=e9;kD>dm;kD--){var gJ=j(ek,kD,eG,ie);if(gJ>g8||gJ<=g8-n)break;
var dR=(g8-gJ)/n,fO=a(300*dR);fO[3]=cQ;e((kD*Q+ek)*4,fO)}}}function r(L,V){var g8=L.Hv,n=L.zk,cQ=V.slice(0),hk=V[3]*A,eG=Math.abs(n.y-g8.y)>Math.abs(n.x-g8.x);
if(eG){var ie=g8.x;g8.x=g8.y;g8.y=ie;ie=n.x;n.x=n.y;n.y=ie}if(g8.x>n.x){var ie=g8;g8=n;n=ie}var eN=n.x-g8.x,gr=n.y-g8.y,ek=eN==0?1:gr/eN,jK=Math.round(g8.x),iE=g8.y+ek*(jK-g8.x),e9=_(g8.x+.5),dm=jK,kD=~~iE;
if(eG){cQ[3]=hk*_(iE)*e9;k(kD,dm,cQ);cQ[3]=hk*I(iE)*e9;k(kD+1,dm,cQ)}else{cQ[3]=hk*_(iE)*e9;k(dm,kD,cQ);
cQ[3]=hk*I(iE)*e9;k(dm,kD+1,cQ)}var gJ=iE-ek;jK=Math.round(n.x);iE=n.y+ek*(jK-n.x);e9=I(n.x+.5);var dR=jK,fO=~~iE;
if(eG){cQ[3]=hk*_(iE)*e9;k(fO,dR,cQ);cQ[3]=hk*I(iE)*e9;k(fO+1,dR,cQ)}else{cQ[3]=hk*_(iE)*e9;k(dR,fO,cQ);
cQ[3]=hk*I(iE)*e9;k(dR,fO+1,cQ)}if(eG){for(var ko=dm+1;ko<=dR-1;ko++){cQ[3]=hk*_(gJ);k(~~gJ,ko,cQ);cQ[3]=hk*I(gJ);
k(~~gJ+1,ko,cQ);gJ+=ek}}else{for(var ko=dm+1;ko<=dR-1;ko++){cQ[3]=hk*_(gJ);k(ko,~~gJ,cQ);cQ[3]=hk*I(gJ);
k(ko,~~gJ+1,cQ);gJ+=ek}}}function H(V,g8,n,cQ){for(var F=0;F<4;F++){var hk=V.vE(g8+1.3*F,n);r(hk,cQ,1)}}function bC(V,g8){this.x=Math.round(V);
this.y=Math.round(g8)}var o=Math.PI/180;bC.prototype.vE=function(V,g8){V=V*o;var n=this.x+g8*Math.cos(V),cQ=this.y+g8*Math.sin(V);
return new P(this.x,this.y,n,cQ)};bC.prototype.ai1=function(V,g8){V=V*o;var n=this.S3+g8*Math.cos(V),cQ=this.qG+g8*Math.sin(V);
return new bC(n,cQ)};function P(V,g8,n,cQ){this.Hv=new bC(V,g8);this.zk=new bC(n,cQ)}P.prototype.V0=function(V){var g8=V*this.Hv.x+(1-V)*this.zk.x,n=V*this.Hv.y+(1-V)*this.zk.y;
return new bC(g8,n)};var O=v,p=q,C=f,W=y,J=h,t=G,Y=R,l=U,m=K,B=[];T();for(var F=0;F<x.length;F++){$[F]=x[F]}var L=new P(Q*z[2],c*z[3],Q/2,c/2),A=z[1],S=[];
S[0]=function M(){var V=[80,40,15,60],n=0,cQ=0;C(L.V0(1.4),260,V,10);C(L.V0(1),100,[240,50,50,30],30);
p(L.V0(1),60,[255,40,0,40]);var g8=[255,255,255,255];t(L.V0(1),70,g8,g8[3],58,.5);C(L.V0(1),12,g8);g8[3]=40;
O(L.V0(1),150,g8,g8[3],150);for(var F=0;F<40;F++){n+=Math.random()*25;cQ=Math.random()*Y(300)+Y(100);
var hk=L.V0(1).vE(n,cQ);r(L.V0(1).vE(n,cQ),[110,110,110,30])}p(L.V0(1),130,[255,255,255,8]);var eG=[170,30,23,70];
W(L.V0(1),70,eG,1,3,3);var ie=[60,60,130,40];C(L.V0(.47),44,ie,5);C(L.V0(.43),22,ie,3);ie[3]=16;C(L.V0(.53),15,ie,2);
var eN=[138,94,42,100];C(L.V0(.2),16,eN,2);var gr=[130,255,170,180];p(L.V0(0),4,gr);p(L.V0(-.25),5,gr);
eN=[150,90,0,50];O(L.V0(-.45),55,m(eN),-eN[3],40,2);C(L.V0(-.42),35,eN,2);C(L.V0(-.5),15,eN,2);J(L.V0(-1.28),145,11,70);
var ek=a(0);ek[3]=50;O(L.V0(-1.28),149,ek,ek[3],4);ek=a(300);ek[3]=50;O(L.V0(-1.28),155-1,m(ek),-ek[3],3);
var jK=[130,130,10,50];W(L.V0(-1),73,jK,3,2);var iE=[40,130,70,40];O(L.V0(-1),70,m(iE),-iE[3],35);iE=[40,170,60,50];
C(L.V0(-.7),25,iE,4);var iE=[70,110,50,60];O(L.V0(1.3),30,m(iE),-iE[3],11,3);ie=[0,50,210,80];p(L.V0(-.72),20,ie)};
S[1]=function N(){p(L.V0(1),150,[240,70,70,60]);C(L.V0(1),100,[200,60,60,40],30);var V=[255,255,255,255],g8=0,n=0;
t(L.V0(1),75,V,V[3],63);C(L.V0(1),12,V);p(L.V0(1),270,[200,200,200,20],10);for(var F=0;F<10;F++){g8+=10+Math.random()*40;
n=Math.random()*Y(250)+Y(80);var cQ=L.V0(1).vE(g8,n);r(cQ,[110,110,110,35])}g8=5;n=100;for(var F=0;F<12;
F++){g8+=30;H(L.V0(1),g8,n,[90,90,90,40])}var hk=[150,40,23,100];W(L.V0(1),70,hk,1,3,3);var eG=[30,100,60,40];
p(L.V0(-.9),180,[255,255,255,20]);C(L.V0(-.9),140,eG,15);var ie=[170,80,25,15];W(L.V0(-.9),120,ie,1,4,4);
var eN=[110,240,190,200];p(L.V0(-.6),3,eN);eN[3]=100;p(L.V0(-.6),7,eN);var gr=[230,120,40,85];p(L.V0(-.73),9,gr);
var ek=[60,60,190,50];C(L.V0(.3),28,ek,6);ek[3]=25;C(L.V0(.34),20,ek,3)};S[2]=function s(){var V=[255,255,255,255],n=0,cQ=0;
C(L.V0(1),13,V);t(L.V0(1),150,V,V[3],137);var g8=[120,80,35,20];C(L.V0(1.4),260,g8,10);for(var F=0;F<40;
F++){n+=5+Math.random()*30;cQ=Math.random()*Y(300);r(L.V0(1).vE(n,cQ),[110,110,110,20])}var hk=[10,30,255,30];
C(L.V0(1),70,hk,50);var eG=[15,90,170,15];C(L.V0(1.5),60,eG);var ie=[220,220,20,50];C(L.V0(-1.15),8,ie,2);
var V=[255,255,255,40];p(L.V0(-1.18),6,V);p(L.V0(-1.18),4,V);ie=[110,110,10,8];O(L.V0(-1.2),32,m(ie),-ie[3],20,3);
var eN=[5,0,16,255];for(var F=0;F<4;F++){C(L.V0(-1.36),10,eN,3)}var gr=[90,200,150,20],ek=gr.slice(0);
ek[3]*=2;C(L.V0(-1.32),7,ek,3);C(L.V0(-1.36),7,ek,3);C(L.V0(-1.4),7,ek,3);var V=[230,230,230,100];p(L.V0(-1.36),2,V);
V[3]=3;C(L.V0(-.55),10,V);ie=[120,100,10,18];C(L.V0(-.55),160,ie,8);C(L.V0(-.55),80,ie,4);gr[3]=3;ek[3]=6;
O(L.V0(-.49),13,m(ek),-ek[3],13,2);O(L.V0(-.55),13,m(ek),-ek[3],13,2);gr[3]=20;C(L.V0(.15),25,gr,3);
ie[3]=100;p(L.V0(-.52),3,ie);ie=[200,200,50,40];C(L.V0(.27),1,ie,4);var jK=[150,40,23,30];O(L.V0(1),80,m(jK),-jK[3],2,1)};
return S[z[0]]()};d.BS={};d.BS.Ny=function(x){var Q=x.length,jF=x[0].length,c=new Array(jF);for(var F=0;
F<jF;F++)c[F]=new Array(Q);for(var F=0;F<jF;F++)for(var $=0;$<Q;$++)c[F][$]=x[$][F];return c};d.BS.HY=function(x,Q){var c=x.length,jF=x[0].length,$=new Array(c);
for(var F=0;F<c;F++)$[F]=new Array(jF);for(var F=0;F<c;F++)for(var z=0;z<jF;z++)$[F][z]=x[F][z]-Q[F][z];
return $};d.BS.add=function(x,Q){var c=x.length,jF=x[0].length,$=new Array(c);for(var F=0;F<c;F++)$[F]=new Array(jF);
for(var F=0;F<c;F++)for(var z=0;z<jF;z++)$[F][z]=x[F][z]+Q[F][z];return $};d.BS.multiply=function(x,Q){var c=x.length,$=x[0].length,jF=Q[0].length;
if($!=Q.length)throw"e";var z=new Array(c);for(var F=0;F<c;F++)z[F]=new Array(jF);if(($&1)!=0)for(var F=0;
F<c;F++){var j=x[F],U=z[F];for(var i=0;i<jF;i++){var b=0;for(var e=0;e<$;e++)b+=j[e]*Q[e][i];U[i]=b}}else for(var F=0;
F<c;F++){var j=x[F],U=z[F];for(var i=0;i<jF;i++){var b=0;for(var e=0;e<$;e+=2)b+=j[e]*Q[e][i]+j[e+1]*Q[e+1][i];
U[i]=b}}return z};d.BS._n=function(x,Q){var c=x.length,jF=x[0].length,$=new Array(c);for(var F=0;F<c;
F++){var z=0;for(var j=0;j<jF;j++)z+=x[F][j]*Q[j];$[F]=z}return $};d.BS.Hl=function(x,Q){var c=[];for(var F=0;
F<x;F++){c.push([]);for(var $=0;$<Q;$++)c[F].push(0)}return c};d.BS.a6r=function(x){for(var F=0;F<x.length;
F++)console.log(JSON.stringify(x[F]))};d.BS.awf=function(x){var Q=[];for(var F=0;F<x.length;F++)Q.push(x[F].join(","));
return"["+Q.join(";")+"]"};d.BS.I1=function(x,Q){var c=x.length;for(var $=0;$<c;$++){var z=0,j=Number.NEGATIVE_INFINITY;
for(var F=$;F<c;F++)if(Math.abs(x[F][$])>j){z=F;j=Math.abs(x[F][$])}d.BS.aBg(x,$,z);for(var F=$+1;F<c;
F++){if(x[$][$]==0)return 1;var U=x[F][$]/x[$][$];for(var i=$;i<c+1;i++)x[F][i]-=x[$][i]*U}}for(var F=c-1;
F>=0;F--){if(x[F][F]==0)return 1;var b=x[F][c]/x[F][F];Q[F]=b;for(var i=F-1;i>=0;i--){x[i][c]-=x[i][F]*b;
x[i][F]=0}}return 0};d.BS.aBg=function(x,Q,c){var $=x[Q];x[Q]=x[c];x[c]=$};d.BS.aCL=function(x){var Q=x.length,c=d.BS.Hl(Q,Q);
for(var F=0;F<Q;F++)c[F][F]=x[F];return c};d.BS.a24=function(x){var Q=x.length,c=x[0].length,$=new Array(Q);
for(var F=0;F<Q;F++){$[F]=0;for(var z=0;z<c;z++)$[F]+=x[F][z];$[F]/=c}return $};d.BS.H9=function(x){var Q=0;
for(var F=0;F<x.length;F++)Q+=x[F]*x[F];return Math.sqrt(Q)};d.gg={};d.gg.dj=function(x){var Q=~~(x+.5);
return Q<0?0:Q>255?255:Q};d.gg.transform=function(x,Q,c){var $=d.gg.dj,z=x.Z.length;for(var F=0;F<z;
F++){var j=x.Z[F],U=x.r[F],i=x.J[F];Q.Z[F]=$(c[0]*j+c[1]*U+c[2]*i+c[3]*255);Q.r[F]=$(c[4]*j+c[5]*U+c[6]*i+c[7]*255);
Q.J[F]=$(c[8]*j+c[9]*U+c[10]*i+c[11]*255)}};d.gg.acU=function(x,Q,c){var $=d.gg.dj,z=x.length;for(var F=0;
F<z;F+=4){var j=x[F],U=x[F+1],i=x[F+2];Q[F]=$(c[0]*j+c[1]*U+c[2]*i+c[3]*255);Q[F+1]=$(c[4]*j+c[5]*U+c[6]*i+c[7]*255);
Q[F+2]=$(c[8]*j+c[9]*U+c[10]*i+c[11]*255)}};d.gg.aty=function(x){var Q=x[0]+x[1]+x[2],c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1];
if(Q==1){var $=x.indexOf(1);c[$]=c[$+4]=c[$+8]=1}else{c[0]=x[0];c[5]=x[1];c[10]=x[2]}return c};d.gg.yL=function(x,Q,c){return[1,0,0,x,0,1,0,Q,0,0,1,c,0,0,0,1]};
d.gg.G6=function(x,Q,c){return[x,0,0,0,0,Q,0,0,0,0,c,0,0,0,0,1]};d.gg.azb=function(x){return[x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]]};
d.gg.V6=function(x){return[x[0],x[1],x[2],0,x[3],x[4],x[5],0,x[6],x[7],x[8],0,0,0,0,1]};d.gg.V3=function(x,Q){return[x[0]*Q[0]+x[1]*Q[1]+x[2]*Q[2]+x[3]*Q[3],x[4]*Q[0]+x[5]*Q[1]+x[6]*Q[2]+x[7]*Q[3],x[8]*Q[0]+x[9]*Q[1]+x[10]*Q[2]+x[11]*Q[3],x[12]*Q[0]+x[13]*Q[1]+x[14]*Q[2]+x[15]*Q[3]]};
d.gg.Ny=function(x){var Q=[];Q[0]=x[0];Q[1]=x[4];Q[2]=x[8];Q[3]=x[12];Q[4]=x[1];Q[5]=x[5];Q[6]=x[9];
Q[7]=x[13];Q[8]=x[2];Q[9]=x[6];Q[10]=x[10];Q[11]=x[14];Q[12]=x[3];Q[13]=x[7];Q[14]=x[11];Q[15]=x[15];
return Q};d.gg.add=function(x,Q){var c=x.slice(0);for(var F=0;F<16;F++)c[F]+=Q[F];return c};d.gg.multiply=function(x,Q){var c=[];
c[0]=x[0]*Q[0]+x[1]*Q[4]+x[2]*Q[8]+x[3]*Q[12];c[1]=x[0]*Q[1]+x[1]*Q[5]+x[2]*Q[9]+x[3]*Q[13];c[2]=x[0]*Q[2]+x[1]*Q[6]+x[2]*Q[10]+x[3]*Q[14];
c[3]=x[0]*Q[3]+x[1]*Q[7]+x[2]*Q[11]+x[3]*Q[15];c[4]=x[4]*Q[0]+x[5]*Q[4]+x[6]*Q[8]+x[7]*Q[12];c[5]=x[4]*Q[1]+x[5]*Q[5]+x[6]*Q[9]+x[7]*Q[13];
c[6]=x[4]*Q[2]+x[5]*Q[6]+x[6]*Q[10]+x[7]*Q[14];c[7]=x[4]*Q[3]+x[5]*Q[7]+x[6]*Q[11]+x[7]*Q[15];c[8]=x[8]*Q[0]+x[9]*Q[4]+x[10]*Q[8]+x[11]*Q[12];
c[9]=x[8]*Q[1]+x[9]*Q[5]+x[10]*Q[9]+x[11]*Q[13];c[10]=x[8]*Q[2]+x[9]*Q[6]+x[10]*Q[10]+x[11]*Q[14];c[11]=x[8]*Q[3]+x[9]*Q[7]+x[10]*Q[11]+x[11]*Q[15];
c[12]=x[12]*Q[0]+x[13]*Q[4]+x[14]*Q[8]+x[15]*Q[12];c[13]=x[12]*Q[1]+x[13]*Q[5]+x[14]*Q[9]+x[15]*Q[13];
c[14]=x[12]*Q[2]+x[13]*Q[6]+x[14]*Q[10]+x[15]*Q[14];c[15]=x[12]*Q[3]+x[13]*Q[7]+x[14]*Q[11]+x[15]*Q[15];
return c};d.gg.HQ=function(x){var Q=[];Q[0]=x[5]*x[10]*x[15]-x[5]*x[14]*x[11]-x[6]*x[9]*x[15]+x[6]*x[13]*x[11]+x[7]*x[9]*x[14]-x[7]*x[13]*x[10];
Q[1]=-x[1]*x[10]*x[15]+x[1]*x[14]*x[11]+x[2]*x[9]*x[15]-x[2]*x[13]*x[11]-x[3]*x[9]*x[14]+x[3]*x[13]*x[10];
Q[2]=x[1]*x[6]*x[15]-x[1]*x[14]*x[7]-x[2]*x[5]*x[15]+x[2]*x[13]*x[7]+x[3]*x[5]*x[14]-x[3]*x[13]*x[6];
Q[3]=-x[1]*x[6]*x[11]+x[1]*x[10]*x[7]+x[2]*x[5]*x[11]-x[2]*x[9]*x[7]-x[3]*x[5]*x[10]+x[3]*x[9]*x[6];
Q[4]=-x[4]*x[10]*x[15]+x[4]*x[14]*x[11]+x[6]*x[8]*x[15]-x[6]*x[12]*x[11]-x[7]*x[8]*x[14]+x[7]*x[12]*x[10];
Q[5]=x[0]*x[10]*x[15]-x[0]*x[14]*x[11]-x[2]*x[8]*x[15]+x[2]*x[12]*x[11]+x[3]*x[8]*x[14]-x[3]*x[12]*x[10];
Q[6]=-x[0]*x[6]*x[15]+x[0]*x[14]*x[7]+x[2]*x[4]*x[15]-x[2]*x[12]*x[7]-x[3]*x[4]*x[14]+x[3]*x[12]*x[6];
Q[7]=x[0]*x[6]*x[11]-x[0]*x[10]*x[7]-x[2]*x[4]*x[11]+x[2]*x[8]*x[7]+x[3]*x[4]*x[10]-x[3]*x[8]*x[6];Q[8]=x[4]*x[9]*x[15]-x[4]*x[13]*x[11]-x[5]*x[8]*x[15]+x[5]*x[12]*x[11]+x[7]*x[8]*x[13]-x[7]*x[12]*x[9];
Q[9]=-x[0]*x[9]*x[15]+x[0]*x[13]*x[11]+x[1]*x[8]*x[15]-x[1]*x[12]*x[11]-x[3]*x[8]*x[13]+x[3]*x[12]*x[9];
Q[10]=x[0]*x[5]*x[15]-x[0]*x[13]*x[7]-x[1]*x[4]*x[15]+x[1]*x[12]*x[7]+x[3]*x[4]*x[13]-x[3]*x[12]*x[5];
Q[11]=-x[0]*x[5]*x[11]+x[0]*x[9]*x[7]+x[1]*x[4]*x[11]-x[1]*x[8]*x[7]-x[3]*x[4]*x[9]+x[3]*x[8]*x[5];Q[12]=-x[4]*x[9]*x[14]+x[4]*x[13]*x[10]+x[5]*x[8]*x[14]-x[5]*x[12]*x[10]-x[6]*x[8]*x[13]+x[6]*x[12]*x[9];
Q[13]=x[0]*x[9]*x[14]-x[0]*x[13]*x[10]-x[1]*x[8]*x[14]+x[1]*x[12]*x[10]+x[2]*x[8]*x[13]-x[2]*x[12]*x[9];
Q[14]=-x[0]*x[5]*x[14]+x[0]*x[13]*x[6]+x[1]*x[4]*x[14]-x[1]*x[12]*x[6]-x[2]*x[4]*x[13]+x[2]*x[12]*x[5];
Q[15]=x[0]*x[5]*x[10]-x[0]*x[9]*x[6]-x[1]*x[4]*x[10]+x[1]*x[8]*x[6]+x[2]*x[4]*x[9]-x[2]*x[8]*x[5];var c=x[0]*Q[0]+x[1]*Q[4]+x[2]*Q[8]+x[3]*Q[12];
for(var F=0;F<16;F++)Q[F]/=c;return Q};d.gg.atF=function(x){var Q=[],c=x[5]*x[10]*x[15]-x[5]*x[14]*x[11]-x[6]*x[9]*x[15]+x[6]*x[13]*x[11]+x[7]*x[9]*x[14]-x[7]*x[13]*x[10],$=-x[4]*x[10]*x[15]+x[4]*x[14]*x[11]+x[6]*x[8]*x[15]-x[6]*x[12]*x[11]-x[7]*x[8]*x[14]+x[7]*x[12]*x[10],z=x[4]*x[9]*x[15]-x[4]*x[13]*x[11]-x[5]*x[8]*x[15]+x[5]*x[12]*x[11]+x[7]*x[8]*x[13]-x[7]*x[12]*x[9],j=-x[4]*x[9]*x[14]+x[4]*x[13]*x[10]+x[5]*x[8]*x[14]-x[5]*x[12]*x[10]-x[6]*x[8]*x[13]+x[6]*x[12]*x[9];
return x[0]*c+x[1]*$+x[2]*z+x[3]*j};d.gg.lz=function(x,Q,c,$){var z=Math.sin($),j=Math.cos($),U=1/Math.sqrt(x*x+Q*Q+c*c);
x*=U;Q*=U;c*=U;return d.gg.V6([x*x*(1-j)+j,x*Q*(1-j)-c*z,x*c*(1-j)+Q*z,x*Q*(1-j)+c*z,Q*Q*(1-j)+j,Q*c*(1-j)-x*z,x*c*(1-j)-Q*z,Q*c*(1-j)+x*z,c*c*(1-j)+j])};
d.gg.PV=d.gg.V6([3.1338561,-1.6168667,-.4906146,-.9787684,1.9161415,.033454,.0719453,-.2289914,1.4052427]);
d.gg.a3D=d.gg.V6([1.9624274,-.6105343,-.3413404,-.9787684,1.9161415,.033454,.0286869,-.1406752,1.3487655]);
d.gg.azZ=d.gg.HQ(d.gg.PV);d.RF={};d.RF.VQ=new Uint32Array(1);d.RF.a2$=function(x,Q,c,$,z,j){var U=new Uint32Array(x),i=0,b=d.RF.VQ;
if(b.length<Q*4)d.RF.VQ=b=new Uint32Array(Q*4);var e=new Float64Array(b.buffer);for(var F=0;F<Q;F+=2){var k=z[F],K=z[F+1],g=j[F],R=j[F+1];
b[i]=K;e[i+2>>1]=g;b[i+1]=U[k];U[k]=i+1;i+=4;b[i]=k;e[i+2>>1]=R;b[i+1]=U[K];U[K]=i+1;i+=4}return{pg:b,adj:e,aoN:U}};
d.RF.I1=function(x,Q,c,$,z,j,U){var i=1,b=d.RF.a2$(x,Q,c,$,z,j),e=b.pg,k=b.adj,K=b.aoN,g=new Uint32Array(x),R=new d.RF.ji(x),D=1,y=0;
R.push(c);R.push($);var T=new d.RF.ji(x),a=new Uint8Array(x),_=new Uint32Array(x);a[c]=1;a[$]=2;var I=new Uint32Array(x),f=new Uint32Array(x);
f[c]=f[$]=0;I[c]=I[$]=1;while(!0){var Z=-1,o=0,C=1e30;while(!R.s7()&&Z==-1){var v=R.top(),G=a[v],q=K[v]-1;
while(q!=-1){var h=e[q],r=a[h],H=q^G-1<<2;if(k[H+2>>1]!=0){if(r==0){d.RF.dd(v,q,h,a,_,f,I);R.push(h)}else if(r==G&&I[h]<=I[v]&&f[h]>f[v])d.RF.dd(v,q,h,a,_,f,I);
else if(r!=G){Z=H}}q=e[q+1]-1}if(Z!=-1)break;R.pop()}if(Z==-1){break}D++;var P=Z;while(P!=-1){g[o]=P;
o++;P=_[e[P^4]]-1}var O=o>>1;for(var F=0;F<O;F++){var p=g[F];g[F]=g[o-F-1];g[o-F-1]=p}P=_[e[Z]]-1;while(P!=-1){g[o]=P^4;
o++;P=_[e[P^4]]-1}for(var F=0;F<o;F++)C=Math.min(C,k[g[F]+2>>1]);y+=C;if(y>=U)return{nU:null,eW:y};for(var F=0;
F<o;F++){var W=g[F],J=W^4,v=e[J],h=e[W];k[W+2>>1]-=C;k[J+2>>1]+=C;if(k[W+2>>1]==0&&a[v]==a[h]){if(a[v]==1){_[h]=0;
T.push(h)}if(a[v]==2){_[v]=0;T.push(v)}}}while(!T.s7()){var v=T.pop(),G=a[v],q=K[v]-1,t=G==1?4:0,Y=0,l=0,m=1e9;
while(q!=-1){var h=e[q],B=q^4,H=q^t;if(a[h]==G&&k[H+2>>1]>0&&d.RF.ac8(h,c,$,_,e,D,I,f)+1<m){Y=h;l=B;
m=f[h]+1}q=e[q+1]-1}if(l!=0){d.RF.dd(Y,l,v,a,_,f,I);continue}q=K[v]-1;while(q!=-1){var h=e[q],H=q^t;
if(a[h]==G){if(k[H+2>>1]>0){R.push(h)}if(_[h]==q+1){_[h]=0;T.push(h)}}q=e[q+1]-1}a[v]=0;R.remove(v)}}var L=[];
for(var F=0;F<Q;F+=2){var v=z[F],h=z[F+1];if(a[v]==1&&a[h]!=1){L.push(F>>1)}if(a[h]==1&&a[v]!=1){L.push(Q+F>>1)}}return{nU:L,eW:y}};
d.RF.dd=function(x,Q,c,$,z,j,U){$[c]=$[x];z[c]=Q+1;j[c]=j[x]+1;U[c]=U[x]};d.RF.ac8=function(x,Q,c,$,z,j,U,i){var b=x,e=$[x]-1,k=0;
while(e!=-1&&U[x]!=j){x=z[e^4];e=$[x]-1;k++}if(e==-1&&x!=Q&&x!=c)return 1e9;var K=i[x]+k;k=0;e=$[b]-1;
while(b!=x){i[b]=K-k;k++;U[b]=j;b=z[e^4];e=$[b]-1}return K};d.RF.avd=function(x,Q,c,$,z,j){var U=d.RF.a2$(x,Q,c,$,z,j),i=U.pg,b=U.adj,e=U.aoN,k=0,K=0,g=new Uint32Array(x*2),R=new d.RF.aha(x),T=0;
while(!0){R.reset();R.push(c);for(var F=0;F<x;F++)g[F<<1]=0;while(!R.s7()){var D=R.pop(),a=e[D]-1;while(a!=-1){T=i[a];
if(g[T<<1]==0&&b[a+2>>1]>0&&T!=c){g[T<<1]=D+1;g[(T<<1)+1]=a;R.push(T)}a=i[a+1]-1}if(g[$<<1]!=0){break}}if(g[$<<1]==0){break}var _=1e30;
T=$;while(!0){var I=g[T<<1]-1;if(I==-1)break;var f=g[(T<<1)+1];_=Math.min(_,b[f+2>>1]);T=I}T=$;while(!0){var I=g[T<<1]-1;
if(I==-1)break;var f=g[(T<<1)+1],y=f^4;b[f+2>>1]-=_;b[y+2>>1]+=_;T=I}k+=_}var Z=[];for(var F=0;F<Q;F+=2){var I=z[F],T=z[F+1];
if((g[I<<1]!=0||I==c)&&g[T<<1]==0&&T!=c){Z.push(F>>1)}if((g[T<<1]!=0||T==c)&&g[I<<1]==0&&I!=c){Z.push(Q+F>>1)}}return{nU:Z,eW:k}};
d.RF.aha=function(x){x|=x>>1;x|=x>>2;x|=x>>4;x|=x>>8;x|=x>>16;this.eR=new Uint32Array(x+1);this.qw=x;
this.CA=0;this.Jk=0};d.RF.aha.prototype={push:function(x){var Q=this.Jk;this.eR[Q]=x;this.Jk=Q+1&this.qw},pop:function(){var x=this.CA,Q=this.eR[x];
this.CA=x+1&this.qw;return Q},s7:function(){return this.CA==this.Jk},reset:function(){this.CA=0;this.Jk=0}};
d.RF.ji=function(x){x|=x>>1;x|=x>>2;x|=x>>4;x|=x>>8;x|=x>>16;this.eR=new Uint32Array(x+1);this.le=new Uint32Array(x+1);
this.qw=x;this.CA=0;this.Jk=0};d.RF.ji.prototype={top:function(){return this.eR[this.CA]},ayH:function(){return this.eR[this.Jk]},push:function(x){if(this.le[x]!=0)return;
this.le[x]=this.Jk+1;var Q=this.Jk;this.eR[Q]=x;this.Jk=Q+1&this.qw},pop:function(){var x=this.CA,Q=this.eR[x];
this.le[Q]=0;this.CA=x+1&this.qw;return Q},s7:function(){return this.CA==this.Jk},remove:function(x){var Q=this.le[x]-1;
if(Q==-1)return;this.le[x]=0;if(Q==this.CA){this.pop();return}var c=this.pop();this.eR[Q]=c;this.le[c]=Q+1},qM:function(F){return F+this.qw+1&this.qw}};
d.RF.abV=function(x,Q,c){var $=d.RF.pc(x,Q,c);if(Q<$-1)d.RF.abV(x,Q,$-1);if($<c)d.RF.abV(x,$,c)};d.RF.pc=function(x,Q,c){var $=x[Q+c>>>1];
while(Q<=c){while(x[Q]<$)Q++;while(x[c]>$)c--;if(Q<=c){d.RF.dL(x,Q,c);Q++;c--}}return Q};d.RF.dL=function(x,Q,c){var $=x[Q];
x[Q]=x[c];x[c]=$};d.VT=function(){var x,Q;function c(U,i,jF){var b=jF-1,e=i+jF;x[jF-2]=U[e-2];Q[0]=U[e-1];
var k=Math.max;for(var F=1;F<b;F++){x[jF-2-F]=k(x[jF-1-F],U[e-2-F]);Q[F]=k(Q[F-1],U[e-1+F])}for(var F=0;
F<b;F++)U[i+F]=k(x[F],Q[F])}function $(U,i,jF){var b=jF-1,e=Math.ceil(i/b)*b;for(var k=0;k<e;k+=b)c(U,k,jF)}function z(U,i,b,e,jF,k){i.set(U);
if(jF==1)return;x=d.R(jF-1);Q=d.R(jF-1);var K=jF>>>1,g=d.R(Math.ceil(Math.max(b,e)/(jF-1))*(jF-1)+(jF-2)),R=new Uint8Array(g.buffer,0,b);
if(!k)d.HQ(i);for(var T=0;T<e;T++){g.fill(0);g.set(new Uint8Array(i.buffer,T*b,b),K);$(g,b,jF);i.set(R,T*b)}for(var D=0;
D<b;D++){g.fill(0);for(var T=0;T<e;T++)g[T+K]=i[T*b+D];$(g,e,jF);for(var T=0;T<e;T++)i[T*b+D]=g[T]}if(!k)d.HQ(i)}function j(U,i,b,e,jF,k){var K=d.R(b*e);
for(var g=0;g<4;g++){d.GS(U,K,g);if(g==3)d.HQ(K);z(K,K,b,e,jF,k);if(g==3)d.HQ(K);d.Dm(K,i,g)}}return{Z8:z,ay2:j}}();
d.eV={};d.eV.axu=function(x){for(var F=0;F<x.length;F++)d.eV.Bq(x,F)};d.eV.Bq=function(x,F){x[F].v.keyShapeInvalidated={t:"bool",v:!0}};
d.eV.alR=function(x){for(var F=0;F<x.length;F++)x[F].v.keyOriginIndex.v=F};d.eV.rB=function(){return{t:"Objc",v:{classID:"null",keyOriginIndex:{t:"long",v:0},keyShapeInvalidated:{t:"bool",v:!0}}}};
d.eV.Yy=function(x){x=x.v;var Q={Rctn:2,Ln:4,Elps:5},c=Q[x.classID],$=x.topLeft?d.eV.ajp(x):null,z=null,j=0,U=[!1,!1,0,0,0];
if(c==4){var i=x.Strt.v,b=x.End.v;z=[i.Hrzn.v.val,i.Vrtc.v.val,b.Hrzn.v.val,b.Vrtc.v.val];j=x.Wdth.v.val;
for(var F=0;F<2;F++){var e=x[F==0?"StrA":"EndA"];if(e==null)continue;e=e.v;U[F]=e.On.v;U[2]=e.Wdth.v;
U[3]=e.Lngt.v;U[4]=e.Cncv.v.val}}if(c==null)return null;return d.eV.YB(c,c==4?null:d.eV.Nu(x),$,z,j,U)};
d.eV.Xt=function(x,Q,c,$,z,j,U){var i={classID:x,unitValueQuadVersion:{t:"long",v:1}};if(Q)d.eV.E8(i,["Left","Top","Rght","Btom"],Q);
if(c)d.eV.E8(i,["topLeft","topRight","bottomRight","bottomLeft"],c);if(x=="Ln"){i.Strt={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Pxl",val:$[0]}},Vrtc:{t:"UntF",v:{type:"#Pxl",val:$[1]}}}},i.End={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Pxl",val:$[2]}},Vrtc:{t:"UntF",v:{type:"#Pxl",val:$[3]}}}},i.Wdth={t:"UntF",v:{type:"#Pxl",val:z}};
for(var F=0;F<2;F++){var b=F==0?"StrA":"EndA";i[b]={t:"Objc",v:{classID:"cArw",On:{t:"bool",v:U[F]},Wdth:{t:"doub",v:U[2]},Lngt:{t:"doub",v:U[3]},Cncv:{t:"UntF",v:{type:"#Prc",val:U[4]}}}}}}if(j)i.Nm={t:"TEXT",v:j};
return{t:"Objc",v:i}};d.eV.au1=function(x,Q){var c=d.eV.LI(x),$=x[2]-x[0],z=x[3]-x[1],j=Math.sqrt($*$+z*z),U=[0,0,j,0,j,Q,0,Q],i=new bI;
i.rotate(-c);i.translate(x[0],x[1]);d.A.i(U,i,U);return U};d.eV.YB=function(x,Q,c,$,z,j){var U=d.eV.rB(),i=U.v,b;
delete i.keyShapeInvalidated;i.keyOriginType={t:"long",v:x};i.keyOriginResolution={t:"doub",v:75};if(x==4){i.keyOriginLineStart={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:$[0]},Vrtc:{t:"doub",v:$[1]}}};
i.keyOriginLineEnd={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:$[2]},Vrtc:{t:"doub",v:$[3]}}};b=d.eV.au1($,z);
var e=d.A.pA(b);Q=[e.x,e.y,e.x+e.m,e.y+e.e];i.keyOriginLineWeight={t:"doub",v:z};if(j)d.eV.an1(i,j)}else b=[Q[0],Q[1],Q[2],Q[1],Q[2],Q[3],Q[0],Q[3]];
i.keyOriginBoxCorners={t:"Objc",v:{classID:"null"}};d.eV.QS(i,"keyOriginBoxCorners",b);var k={classID:"unitRect",unitValueQuadVersion:{t:"long",v:1}};
i.keyOriginShapeBBox={t:"Objc",v:k};d.eV.acc(i,Q);if(c!=null){var K={classID:"radii",unitValueQuadVersion:{t:"long",v:1}};
i.keyOriginRRectRadii={t:"Objc",v:K};d.eV.CX(i,c)}return U};d.eV.i=function(x,Q,c,$){var z=d.D.ala(Q),j=d.D.akn(Q),U=d.D.uL(Q),i=U.V*U.xq-U.J*U.dC;
for(var F=0;F<x.length;F++){var b=x[F].v;if(!d.eV.Sc(b))continue;if(c.length!=0&&c.indexOf(F)==-1)continue;
var e=b.keyOriginType.v,k=Q;if(i<0&&e==2){var K=d.eV.Ll(b),g=0;g=K[0];K[0]=K[1];K[1]=g;g=K[2];K[2]=K[3];
K[3]=g;d.eV.CX(b,K);var R=d.eV.qp(b,"keyOriginBoxCorners"),T=d.A.pA(R),D=T.x+T.m/2,a=new bI;a.translate(-D,0);
a.scale(-1,1);a.translate(D,0);k=d.D.Vi(k,d.D.Gr(a))}var _=["keyOriginPolyTrueRectCorners","keyOriginBoxCorners"];
for(var I=0;I<_.length;I++){var R=d.eV.qp(b,_[I]);if(R==null)continue;d.D.i(k,R);d.eV.QS(b,_[I],R);var T=d.A.pA(R);
d.eV.acc(b,[T.x,T.y,T.x+T.m,T.y+T.e]);var f=new bI;f.rotate(-d.eV.LI(R));var y={classID:"Trnf"};b.Trnf={t:"Objc",v:y};
var Z="xx xy yx yy tx ty".split(" "),v=[f.V,f.J,f.dC,f.xq,f.DX,f.ti];for(var G=0;G<6;G++)y[Z[G]]={t:"doub",v:v[G]}}if(e==2&&$){var K=d.eV.Ll(b);
for(var I=0;I<4;I++)K[I]=Math.round(K[I]*Q[0]);d.eV.CX(b,K)}var R=d.eV.qp(b,"keyOriginBoxCorners"),q=R[2]-R[0],h=R[3]-R[1],r=Math.sqrt(q*q+h*h);
q/=r;h/=r;var H=R[6]-R[0],o=R[7]-R[1],P=Math.sqrt(H*H+o*o);H/=P;o/=P;if(e==4){b.keyOriginLineWeight.v=P;
var O=d.eV.wB(b);d.D.i(Q,O);d.eV.amB(b,O)}var p=q*H+h*o;if(Math.abs(p)>.001){d.eV.Bq(x,F)}}};d.eV.Sc=function(x){var Q=x.keyShapeInvalidated,c=x.keyOriginType;
return(Q==null||!Q.v)&&c!=null&&c.v!=9};d.eV.ald=function(x){var Q=x.keyOriginType.v,c=d.eV._A(x),$=c[0],z=c[1],j=c[2],U=c[3],i=new bI,b=x.keyOriginPolyCornerRadius,R;
b=b?b.v:0;var e=d.eV.qp(x,Q==7||Q==8?"keyOriginPolyTrueRectCorners":"keyOriginBoxCorners"),k=d.eV.aDb(e),K=k[2],g=k[3];
$=-K/2;j=K/2;z=-g/2;U=g/2;i.rotate(-d.eV.LI(e));i.DX=k[0];i.ti=k[1];if(Q==1||Q==2){var T=Q==1?0:d.eV.Ll(x);
R=d.o.JE.Rect($,z,j-$,U-z,T)}else if(Q==4){var D=d.eV.wB(x),a=d.eV.a93(x);i=new bI;if(a==null)R=d.o.JE.AE(D[0],D[1],D[2],D[3],x.keyOriginLineWeight.v);
else R=d.o.JE.ec(D[0],D[1],D[2],D[3],x.keyOriginLineWeight.v,a)}else if(Q==5){R=d.o.JE.Sl($,z,j-$,U-z)}else if(Q==7||Q==8){var _=Q==7?3:x.keyOriginPolySides.v;
R=d.o.JE.sY(0,0,100,Math.PI/_-Math.PI/2,_,b,j,U)}d.o.Of(R,i);return R};d.eV.Rt=function(x,Q){var c=Q.$;
for(var F=0;F<x.length;F++){var $=x[F].v;if(!d.eV.Sc($))continue;var z=d.eV.ald($),j=d.o.dQ(c,F),U=d.o.T_(c,F);
z[2].Kp=c[j].Kp;var i=c;c=c.slice(0,j);for(var b=2;b<z.length;b++)c.push(z[b]);for(var b=j+U;b<i.length;
b++)c.push(i[b])}Q.$=c;Q.ha=!0};d.eV.u_=function(x){var Q=1e9,c=-Q,$=1e9,z=-$,j=[],U=x.zo(),i=U[0],b=U[1];
for(var e=0;e<b.length;e++){var k=i[b[e]],K=k.add.vogk;if(K==null)continue;var g=k.add.vmsk.g;for(var R=0;
R<K.length;R++){var T=K[R].v,_=0;if(!d.eV.Sc(T))continue;if(b.length==1&&g.length!=0&&g.indexOf(R)==-1)continue;
var D=T.keyOriginType.v;if(D==9)continue;var a=d.eV._A(T);Q=Math.min(Q,a[0]);$=Math.min($,a[1]);c=Math.max(c,a[2]);
z=Math.max(z,a[3]);var I=d.eV.qp(T,"keyOriginBoxCorners");if(I){var f=d.eV.aDb(I),y=f[2],Z=f[3];a[2]=a[0]+y;
a[3]=a[1]+Z;_=d.eV.LI(I)}var v=[D,a,_];j.push(v);var G=T.keyOriginPolyCornerRadius;if(D==2)v.push(d.eV.Ll(T));
if(D==7||D==8)v.push(G?G.v:0);if(D==8)v.push(T.keyOriginPolySides.v)}}return j.length==1?j[0]:[0,Q<c?[Q,$,c,z]:null,0]};
d.eV.LI=function(x){var Q=x[2]-x[0],c=x[3]-x[1];return-Math.atan2(-c,Q)};d.eV.a7q=function(x){var Q=d.eV._A(x);
return d.eV.LI(Q)};d.eV.a8$=function(x,Q,c){var $=d.eV.u_(x),z=-1;for(var F=0;F<Q.length;F++)if(JSON.stringify(Q[F])!=JSON.stringify($[F]))z=F;
if(z==1||z==2){}var j=x.zo(),U=j[0],i=j[1];for(var b=0;b<i.length;b++){var e=U[i[b]],k=e.add.vogk;if(k==null)continue;
var K=e.add.vmsk.g;for(var g=0;g<k.length;g++){var R=k[g].v;if(!d.eV.Sc(R))continue;if(i.length==1&&K.length!=0&&K.indexOf(g)==-1)continue;
var T=R.keyOriginType.v;if(z==1||z==2){d.eV.i(k,d.eV.aiq(z,R,$,Q),K,!1);break}if(z==3)if(T==2)d.eV.CX(R,Q[3]);
else R.keyOriginPolyCornerRadius={t:"doub",v:Q[3]};if(z==4)R.keyOriginPolySides.v=Q[4];if(c)d.eV.Bq(k,g)}}};
d.eV.aiq=function(x,Q,c,$){var z=$[1],j=c[1],U=(z[2]-z[0])/(j[2]-j[0]),i=(z[3]-z[1])/(j[3]-j[1]),b=new bI;
if(x==1){if(Math.max(Math.abs(U-1),Math.abs(i-1))>1e-8){var e=z[0],k=z[1];if($[0]!=0){var K=d.eV.qp(Q,"keyOriginBoxCorners");
e=K[0];k=K[1]}b.translate(-e,-k);b.rotate($[2]);b.scale(U,i);b.rotate(-$[2]);b.translate(e,k)}else{b.translate(-j[0],-j[1]);
b.translate(z[0],z[1])}}else{if($[0]!=0)z=d.eV._A(Q);var e=(z[0]+z[2])/2,k=(z[1]+z[3])/2;b.translate(-e,-k);
if(c[0]!=0)b.rotate(c[2]);b.rotate(-$[2]);b.translate(e,k)}return d.D.Gr(b)};d.eV.aDb=function(x){var Q=x[0],c=x[1],$=x[2],z=x[3],j=x[4],U=x[5],i=x[6],b=x[7],e=$-Q,k=z-c,K=Math.sqrt(e*e+k*k),e=j-$,k=U-z,g=Math.sqrt(e*e+k*k);
return[(Q+j)/2,(c+U)/2,K,g]};d.eV.qp=function(x,Q){var c=x[Q];if(c==null)return null;var $=[];c=c.v;
for(var z=0;z<4;z++){var j=c["rectangleCorner"+["A","B","C","D"][z]].v;$.push(j.Hrzn.v,j.Vrtc.v)}return $};
d.eV.QS=function(x,Q,c){var $=x[Q];if($==null)return null;$=$.v;for(var z=0;z<4;z++){var j="rectangleCorner"+["A","B","C","D"][z];
$[j]={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:c[2*z]},Vrtc:{t:"doub",v:c[2*z+1]}}}}};d.eV._A=function(x){return d.eV.Nu(x.keyOriginShapeBBox.v)};
d.eV.Nu=function(x){var Q=x.classID,c=x.Left.v,$=x.Rght.v,z=x.Top.v,j=x.Btom.v;if(c.val!=null){c=c.val;
$=$.val;z=z.val;j=j.val}return[c,z,$,j]};d.eV.acc=function(x,Q){d.eV.E8(x.keyOriginShapeBBox.v,["Left","Top","Rght","Btom"],Q)};
d.eV.Ll=function(x){var Q=x.keyOriginRRectRadii;if(Q==null)return[0,0,0,0];return d.eV.ajp(Q.v)};d.eV.ajp=function(x){var Q=[],c=["topLeft","topRight","bottomRight","bottomLeft"];
for(var $=0;$<4;$++)Q.push(x[c[$]].v.val);return Q};d.eV.CX=function(x,Q){d.eV.E8(x.keyOriginRRectRadii.v,["topLeft","topRight","bottomRight","bottomLeft"],Q)};
d.eV.E8=function(x,Q,c){var $=x.classID;if($=="unitRect"||$=="radii"||$=="Rctn"){for(var F=0;F<4;F++)if(c[F]!=null)x[Q[F]]={t:"UntF",v:{type:"#Pxl",val:c[F]}}}else{for(var F=0;
F<4;F++)if(c[F]!=null)x[Q[F]]={t:"doub",v:c[F]}}};d.eV.wB=function(x){var Q=x.keyOriginLineStart.v,c=x.keyOriginLineEnd.v;
return[Q.Hrzn.v,Q.Vrtc.v,c.Hrzn.v,c.Vrtc.v]};d.eV.amB=function(x,Q){var c=x.keyOriginLineStart.v,$=x.keyOriginLineEnd.v;
c.Hrzn.v=Q[0];c.Vrtc.v=Q[1];$.Hrzn.v=Q[2];$.Vrtc.v=Q[3]};d.eV.a93=function(x){var Q=[],c=["owSt","owEnd","Wdth","Lngth","Conc"];
for(var F=0;F<5;F++){var $=x["keyOriginLineArr"+c[F]];if($==null)return null;Q[F]=$.v}return Q};d.eV.an1=function(x,Q){x.keyOriginLineArrowSt={t:"bool",v:Q[0]};
x.keyOriginLineArrowEnd={t:"bool",v:Q[1]};x.keyOriginLineArrWdth={t:"doub",v:Q[2]};x.keyOriginLineArrLngth={t:"doub",v:Q[3]};
x.keyOriginLineArrConc={t:"long",v:Q[4]}};d.eV.asl=function(x){function Q(v,G){return Math.abs(v-G)<.5}function c(v,G){return Q(v.x,G.x)&&Q(v.y,G.y)}function j(v,G,q,h,r,H,o){for(var F=0;
F<o;F++){var P=v[G+(q+F)%o],O=h[r+(H+F)%o];if(!(c(P.L,O.L)&&c(P.Hw,O.Hw)&&c(P.Im,O.Im)))return!1}return!0}var U=[];
for(var i=0;i<x.length;i++){var b=x[i],k=null;if(b.type!=0&&b.type!=3||b.Kp==-1)continue;var e=i;if(b.length==4||b.length==8){var K=d.o.a7V(x.slice(0,2).concat(x.slice(e,e+b.length+1)));
e=2;if(b.length==4){var g=d.o.pG(K,e+1,4),R=g.x,T=g.y,D=R+g.m,a=T+g.e;if(g.P()>4){if(d.o.Uu(K.slice(e-2,e+5)))k=d.eV.YB(2,[R,T,D,a],[0,0,0,0]);
else{var _=-1;for(var F=0;F<4;F++)if(Q(K[e+1+F].L.y,a))_=F;if(_!=-1){var I=d.o.JE.Sl(R,T,D-R,a-T),f=j(K,e+1,_,I,3,0,4);
if(f)k=d.eV.YB(5,[R,T,D,a])}}}}if(b.length==8){var g=d.o.pG(K,e+1,8),R=g.x,T=g.y,D=R+g.m,a=T+g.e;if(g.P()>4){var _=-1;
for(var F=0;F<8;F++)if(Q(K[e+1+(F+1&7)].L.y,T)&&Q(K[e+1+(F+2&7)].L.y,T))_=F;if(_!=-1){var y=Math.abs(K[e+1+_].L.y-T),Z=[y,y,y,y];
if(y>.5){var I=d.o.JE.Rect(R,T,D-R,a-T,Z),f=j(K,e+1,_,I,3,0,8);if(f)k=d.eV.YB(2,[R,T,D,a],Z)}}}}}U.push(k?k:d.eV.rB())}return U};
d.A={};d.A.clone=function(x){return{G:x.G.slice(0),j:x.j.slice(0)}};d.A.afD=function(x){if(x.length<6)return!0;
var Q=x.length-4;for(var F=0;F<Q;F+=2)if(!d.A.ql(x[F],x[F+1],x[F+2],x[F+3],x[F+4],x[F+5]))return!1;if(!d.A.ql(x[Q],x[Q+1],x[Q+2],x[Q+3],x[0],x[1]))return!1;
if(!d.A.ql(x[Q+2],x[Q+3],x[0],x[1],x[2],x[3]))return!1;return!0};d.A.ql=function(x,Q,c,$,z,j){return(Q-$)*(z-c)+(c-x)*(j-$)>=0};
d.A.j9=function(x){var Q={},c=null,$=0,z={M:2,L:2,Q:4,C:6},j="",U="";for(var F=0;F<x.G.length;F++){var i=x.G[F];
if(i[0]=="#")j=i;else if(i[0]=="X")j="";else if(i[0]=="O"&&i[1]=="-")U=i;else if(i=="OX")U="";else{var b=j+U;
c=Q[b];if(c==null)c=Q[b]={j:[],G:[]};c.G.push(i);var e=z[i];if(e==null)e=0;for(var k=0;k<e;k++)c.j.push(x.j[$+k]);
$+=e}}return Q};d.A.acP=function(x,Q,c){var $=x[Q]-x[c-2],z=x[Q+1]-x[c-1];return $*$+z*z<1e-4};d.A.tf=function(x,Q,c){x=d.A._w(x);
var $=x.j,z=x.G,j=0,U="",i=0,b=0,j=0,K=null;for(var F=0;F<z.length;F++){var e=z[F];if(e=="M"){i=$[j];
b=$[j+1];j+=2;U=e}if(e=="C"){if(U=="Z"){z.splice(F,0,"M");$.splice(j,0,i,b);F--;continue}j+=6;U=e}if(e=="Z"){U=e}}var k=[];
j=0;for(var F=0;F<z.length;F++){var e=z[F];if(e=="M"){K={MY:j,bc:0,Dt:!1};k.push(K);j+=2}if(e=="C"){K.bc++;
j+=6}if(e=="Z"&&K!=null){K.Dt=!0}}var g=[];for(var F=0;F<k.length;F++)if(k[F].bc!=0)g.push(k[F]);k=g;
for(var F=0;F<k.length;F++){var R=k[F],T=R.MY,D=T+2+R.bc*6,_=0;R.LB=d.A.pA($,T,D);var a=d.A.acP($,T,D);
for(var I=0;I<R.bc;I++){var f=T+I*6,y=f+6;_+=($[y]-$[f])*($[y+1]+$[f+1])}if(R.bc==2){var Z=function(N,s,V){var g8=1-V;
return g8*g8*g8*N[s]+3*g8*g8*V*N[s+2]+3*g8*V*V*N[s+4]+V*V*V*N[s+6]},v=$[T],G=$[T+1],q=$[T+6],h=$[T+7],r=$[T+6],H=$[T+7],o=Z($,T,.5),P=Z($,T+1,.5),O=Z($,T+6,.5),p=Z($,T+7,.5);
_=(o-v)*(P-G)+(q-o)*(h-P)+(O-q)*(p-h)+(r-O)*(H-p)}if(!a)_+=($[T]-$[D-2])*($[T+1]+$[D-1]);R.tE=_<=0}for(var F=0;
F<k.length-1;F++)for(var f=F+1;f<k.length;f++){var C=k[F],W=k[f];if(W.LB.PC(C.LB)){k[F]=W;k[f]=C}}var J=k.length==0?!0:k[0].tE,t=[{type:6},{type:8,all:0}];
for(var F=0;F<k.length;F++){var R=k[F],T=R.MY,D=T+2+R.bc*6,a=d.A.acP($,T,D);if(R.bc==1)a=!1;var Y=R.Dt||a?0:3,l=R.tE==J&&!Q?1:0;
if(!Q&&F!=0){if(k[F-1].LB.PC(R.LB)&&k[F-1].tE!=R.tE)l=0;for(var f=0;f<k.length;f++)if(f!=F&&k[f].LB.PC(R.LB))l=0}t.push({type:Y,length:R.bc+(a?0:1),Kp:c?0:l,YS:2});
for(var f=0;f<R.bc;f++){var j=T+f*6,m=new bC($[j],$[j+1]),B=new bC($[j+2],$[j+3]),L;if(f==0){if(a){L=new bC($[D-4],$[D-3]);
if(bC.Xc(L,m)<1e-5)L=m.clone()}else L=m.clone()}else L=new bC($[j-2],$[j-1]);t.push({type:Y+2,Hw:L,L:m,Im:B})}if(!a){var A=new bC($[D-2],$[D-1]);
t.push({type:Y+2,Hw:new bC($[D-4],$[D-3]),L:A,Im:A.clone()})}}for(var f=0;f<t.length;f++){var S=t[f];
if(S.type>5||S.type==0||S.type==3)continue;var M=S.Hw.HM(S.L)||S.Im.HM(S.Im);if(!M){var C=S.Hw.x*(S.L.y-S.Im.y)+S.L.x*(S.Im.y-S.Hw.y)+S.Im.x*(S.Hw.y-S.L.y);
if(Math.abs(C)<1e-6)M=!0}if(M)S.type--}return t};d.A.bO=function(x,Q){var c=d.o.WV(x),$=[];for(var F=2;
F<x.length;F++){var z=x[F].Kp;if(z!=null){if(z==2||z==0||z==3||z==-1)$.push(z)}}var j=$.length!=0;if((j||Q)&&x.length<2e3&&1<c&&c<200)x=d.o.nv(x);
var U=d.A.CJ(x);return{Fg:U,hX:j?1:0}};d.A.CJ=function(){function x($,z,j,U){if(U!=2&&$.Im.HM($.L)&&z.Hw.HM(z.L)){j.j.push(z.L.x,z.L.y);
j.G.push("L")}else{var i=$.L,b=$.Im,e=z.Hw,k=z.L,K=3/2*b.x-1/2*i.x,g=3/2*b.y-1/2*i.y,R=3/2*e.x-1/2*k.x,T=3/2*e.y-1/2*k.y,D=R-K,a=T-g;
if(U==0&&D*D+a*a<.001){j.j.push((K+R)*.5,(g+T)*.5,k.x,k.y);j.G.push("Q")}else{j.j.push(b.x,b.y,e.x,e.y,k.x,k.y);
j.G.push("C")}}}function Q($,z,F,j,U,i){var b=z[F];$.j.push(b.L.x,b.L.y);$.G.push("M");for(var e=F;e<F+j-1;
e++)x(z[e],z[e+1],$,i);if(!U)x(z[e],z[F],$,i)}function c($,z){if(z==null)z=0;var j={j:[],G:[]};for(var F=0;
F<$.length;F++){if($[F].type>5)continue;var U=$[F].length;if(U==0)continue;if(F==$.length-1)break;var i=$[F].type==3;
Q(j,$,F+1,U,i,z);if(!i)j.G.push("Z");F+=U}return j}return c}();d.A.a8H=function(x){var Q=x.j,c=[],$,z=0;
for(var F=0;F<x.G.length;F++){var j=x.G[F];if(j=="C"){$.push(Q[z++],Q[z++],Q[z++],Q[z++],Q[z++],Q[z++])}else if(j=="Z"){}else{$=[];
if(j!="M"){$.push(j);F++}$.push(Q[z++],Q[z++]);c.push($)}}return c};d.A.b2=function(x,Q,c,$){if($==null)$=1e9;
var z=1e9,j=0;for(var F=0;F<x.length;F+=2){var U=Q-x[F],i=c-x[F+1],b=U*U+i*i;if(b<z){z=b;j=F>>>1}}return z<$*$?j:-1};
d.A.dW=function(x,Q,c,$){for(var F=0;F<x.length;F+=2){var z=x[F],j=x[F+1],U=Q[F],i=Q[F+1];c[F]=z+(U-z)*$;
c[F+1]=j+(i-j)*$}};d.A.i=function(x,Q,c){for(var F=0;F<x.length;F+=2){var $=x[F],z=x[F+1];c[F]=$*Q.V+z*Q.dC+Q.DX;
c[F+1]=$*Q.J+z*Q.xq+Q.ti}};d.A.pA=function(x,Q,c){if(Q==null)Q=0;if(c==null)c=x.length;var $=99999999999,z=-$,j=99999999999,U=-j;
for(var F=Q;F<c;F+=2){var i=x[F],b=x[F+1];$=Math.min($,i);j=Math.min(j,b);z=Math.max(z,i);U=Math.max(U,b)}return new gh($,j,z-$,U-j)};
d.A.aep=function(x,Q){var c=Math.max(Q.x,Math.min(Q.x+Q.m,x.x)),$=Math.max(Q.y,Math.min(Q.y+Q.e,x.y)),z=x.x-c,j=x.y-$;
return Math.sqrt(z*z+j*j)};d.A.Yc=function(x,Q){var c=Math.floor,$=Math.ceil;if(Q){c=Math.ceil;$=Math.floor}var z=c(x.x),j=$(x.x+x.m),U=c(x.y),i=$(x.y+x.e);
return new gh(z,U,j-z,i-U)};d.A.cl=function(x,Q){return d.A.Yc(d.A.pA(x),Q)};d.A.Hg=function(x,Q){var c=x.x,$=x.y,z=x.x+x.m,j=x.y+x.e,U=[c,$,z,$,z,j,c,j];
if(Q){var i=Q.clone();i.HQ();d.A.i(U,i,U)}return{G:["M","L","L","L","Z"],j:U}};d.A.concat=function(x,Q,c){if(c==null)c=new bI;
for(var F=0;F<Q.j.length;F+=2){var $=Q.j[F],z=Q.j[F+1];x.j.push($*c.V+z*c.dC+c.DX);x.j.push($*c.J+z*c.xq+c.ti)}for(var F=0;
F<Q.G.length;F++)x.G.push(Q.G[F])};d.A.a1f=function(x,Q,c,$,z){function j(g,R,T){return new bC(g.x*(1-T)+R.x*T,g.y*(1-T)+R.y*T)}var U=j(x,Q,z),i=j(c,$,z),b=j(Q,c,z),e=j(U,b,z),k=j(b,i,z),K=j(e,k,z);
return[U,e,K,k,i]};d.A._w=function(x){var Q=x.j,c=[],$=[],z=0,j=0,U=0,i=0,b=0,e=0,k=0,K=0,g=0,R=0,T=0;
for(var F=0;F<x.G.length;F++){var D=x.G[F];if(D=="M"){j=Q[z];U=Q[z+1];z+=2;$.push(D);c.push(j,U);R=j;
T=U}else if(D=="C"){i=Q[z];b=Q[z+1];e=Q[z+2];k=Q[z+3];K=Q[z+4];g=Q[z+5];z+=6;$.push(D);c.push(i,b,e,k,K,g);
j=K;U=g}else if(D=="Q"){i=Q[z];b=Q[z+1];e=Q[z+2];k=Q[z+3];z+=4;var a=i-j,_=b-U,I=e-i,f=k-b;$.push("C");
c.push(j+2/3*a,U+2/3*_,i+1/3*I,b+1/3*f,e,k);j=e;U=k}else if(D=="L"){i=Q[z];b=Q[z+1];z+=2;if(i!=j||b!=U){$.push("C");
c.push(j,U,i,b,i,b);j=i;U=b}}else{if(D=="Z"){j=R;U=T}$.push(D)}}return{G:$,j:c}};d.A.ayE=function(x){var Q=x.j,c=[],$=[],z=0;
for(var F=0;F<x.G.length;F++){var j=x.G[F];if(j=="Q"){var U=Q[z-2],i=Q[z-1],b=Q[z],e=Q[z+1],k=Q[z+2],K=Q[z+3];
z+=4;var g=b-U,R=e-i,T=k-b,D=K-e;$.push("C");c.push(U+2/3*g,i+2/3*R,b+1/3*T,e+1/3*D,k,K)}else{var a=0;
if(j=="M"||j=="L")a=2;else if(j=="C")a=6;for(var _=0;_<a;_++)c.push(Q[z+_]);z+=a;$.push(j)}}return{G:$,j:c}};
d.A.TP=function(x,Q){var c=x.j,$=[],z=[],j=0,U=0,i=0,b=0,e=0,k=0,K=0,g=0,R=0;for(var F=0;F<x.G.length;
F++){var T=x.G[F];if(T=="M"){U=c[j];i=c[j+1];j+=2;z.push(T);$.push(U,i)}else if(T=="C"){b=c[j];e=c[j+1];
k=c[j+2];K=c[j+3];g=c[j+4];R=c[j+5];j+=6;d.A.rj(U,i,b,e,k,K,g,R,Q,z,$,0);U=g;i=R}else z.push(T)}return{G:z,j:$}};
d.A.rj=function(x,Q,c,$,z,j,U,i,b,e,k,K){var g=Math.sqrt((U-x)*(U-x)+(i-Q)*(i-Q)),R=Math.sqrt((U-z)*(U-z)+(i-j)*(i-j))+Math.sqrt((z-c)*(z-c)+(j-$)*(j-$))+Math.sqrt((c-x)*(c-x)+($-Q)*($-Q)),T=(g+R)/2;
if(T<=b){e.push("C");k.push(c,$,z,j,U,i)}else{var D=0,a=0,_=0,I=0,f=0,y=0,Z=0,v=0,G=0,q=0,h=0,r=0,H=0;
a=(x+c)/2;_=(Q+$)/2;I=(c+z)/2;f=($+j)/2;y=(z+U)/2;Z=(j+i)/2;v=(a+I)/2;G=(_+f)/2;q=(I+y)/2;h=(f+Z)/2;
r=(v+q)/2;H=(G+h)/2;d.A.rj(x,Q,a,_,v,G,r,H,b,e,k,K+1);d.A.rj(r,H,q,h,y,Z,U,i,b,e,k,K+1)}};d.A.aeY=function(x,Q,c,$,z){var j=Date.now(),U=d.A.a1L(x,Q,c);
if(z){console.log("trace polygons",Date.now()-j);j=Date.now()}var i=[];for(var F=0;F<U.length;F++){var b=U[F],e=b[0],k=["M"],K=x[e[1]*Q+e[0]];
if(e.length>8)e=d.A.a6x(e,$,b[1]);if(e.length<=4)continue;for(var g=2;g<e.length;g+=2)k.push("L");k.push("Z");
i.push({path:{j:e,G:k},color:K,parent:-1,LB:d.A.pA(e)})}if(z){console.log("simplify polygons",Date.now()-j);
j=Date.now()}for(var F=1;F<i.length;F++){var R=i[F],T=R.path.j,D=T[0],a=T[1],_=T[2],I=T[3],f=_-D,y=I-a,Z=D+.5*f-.001*y,v=a+.5*y+.001*f;
for(var g=F-1;g>=0;g--){var G=i[g];if(!G.LB.PC(R.LB))continue;if(!iw.LW(G.path.j,Z,v))continue;R.parent=g;
break}}if(z){console.log("checking parents",Date.now()-j);j=Date.now()}return i};d.A.a1L=function(x,Q,c){var $=Q*c,z=new Uint16Array(Q*c),U=0;
for(var F=0;F<$;F++)z[F]=x[F];var j=new Uint8Array(Q*c);j[1*Q+1]=j[(c-1)*Q+1]=j[1*Q+Q-1]=j[(c-1)*Q+Q-1]=1;
for(var i=1;i<c;i++)for(var b=1;b<Q;b++){var F=i*Q+b,e=z[F-Q-1],k=z[F-Q],K=z[F-1],g=z[F],R=e==g&&k==K&&e!=k,T=0;
if(g<K){U=g;g=K;K=U}if(K<k){U=K;K=k;k=U}if(k<e){U=k;k=e;e=U}if(g<K){U=g;g=K;K=U}if(K<k){U=K;K=k;k=U}if(g<K){U=g;
g=K;K=U}if(e!=k)T++;if(k!=K)T++;if(K!=g)T++;if(g!=e)T++;if(T>=3||R)j[F]=1}var D=[];for(var i=1;i<c;i++)for(var b=1;
b<Q;b++){var F=i*Q+b;if(z[F]!=z[F-1]){var a=d.A.ase(z,Q,c,b,i),_=[];for(var I=0;I<a.length;I+=2)if(j[a[I+1]*Q+a[I]]==1)_.push(I>>>1);
D.push([a,_]);d.A.nZ(z,Q,c,b,i)}}return D};d.A.nZ=function(x,Q,c,$,z){var j=[z*Q+$],U=x[z*Q+$];x[z*Q+$]=65535;
while(j.length!=0){var F=j.pop();x[F]=0;if(x[F+Q]==U){j.push(F+Q);x[F+Q]=65535}if(x[F-Q]==U){j.push(F-Q);
x[F-Q]=65535}if(x[F-1]==U){j.push(F-1);x[F-1]=65535}if(x[F+1]==U){j.push(F+1);x[F+1]=65535}}};d.A.ase=function(x,Q,c,$,z){var j=[0,-1,1,0,0,1,-1,0],k=1;
function U(g,R,k){var F=e*Q+b,T=0;if(k==0)T=F-Q;else if(k==1)T=F;else if(k==2)T=F-1;else if(k==3)T=F-Q-1;
return x[T]}var i=[],b=$,e=z,K=U(b,e,k);do{i.push(b,e);b+=j[k*2];e+=j[k*2+1];if(U(b,e,k)!=K)k=k+1&3;
else if(U(b,e,k+3&3)!=K)k=k;else if(U(b,e,k+2&3)!=K)k=k+3&3}while(b!=$||e!=z);return i};d.A.a6x=function(x,Q,c){var $=x.length-2;
if(c&&c.length!=0){var z=c[0]*2,j=c[c.length-1]*2,U=z==0?$:z-2,i=x.slice(j);for(var F=0;F<z;F++)i.push(x[F]);
if(z==j)i.push(.9*x[z]+.1*x[U],.9*x[z+1]+.1*x[U+1]);else i.push(x[z],x[z+1]);i=d.A.fI(i,Q);i.pop();i.pop();
for(var F=0;F<c.length-1;F++){var b=x.slice(c[F]*2,c[F+1]*2+2);b=d.A.fI(b,Q);for(var e=0;e<b.length-2;
e++)i.push(b[e])}return i}var k=x.slice(0);k.push(.9*x[0]+.1*x[$],.9*x[1]+.1*x[$+1]);k=d.A.fI(k,Q);k.pop();
k.pop();return k};d.A.fI=function(x,Q){var c=x.length-2,$=x[0],z=x[1],j=x[c],U=x[c+1],i=j-$,b=U-z,e=1/Math.sqrt(i*i+b*b),k=j*z-U*$,K=-1,g=-1,R=0;
for(var F=2;F<c;F+=2){var T=x[F],D=x[F+1],a=D*D*1e6+T*T,_=Math.abs(b*T-i*D+k)*e;if(_>g||_==g&&a>R){g=_;
K=F;R=a}}if(g<Q)return[$,z,j,U];var I=d.A.fI(x.slice(0,K+2),Q),f=d.A.fI(x.slice(K),Q);for(var F=2;F<f.length;
F++)I.push(f[F]);return I};d.A.axJ=function(){var x=function($,z,j,U,i,b){return(z-U)*(i-j)+(j-$)*(b-U)>=0},Q=function($,z,j,U,i,b,e,k){var K=e-j,g=k-U,R=i-j,T=b-U,D=$-j,a=z-U,_=K*K+g*g,I=K*R+g*T,f=K*D+g*a,y=R*R+T*T,Z=R*D+T*a,v=1/(_*y-I*I),G=(y*f-I*Z)*v,q=(_*Z-I*f)*v;
return G>=0&&q>=0&&G+q<1},c=function($){var jF=$.length>>>1,F=0;if(jF<3)return[];var z=[],j=[];for(var F=0;
F<jF;F++)j.push(F);var U=jF;while(U>3){var i=j[(F+0)%U],b=j[(F+1)%U],e=j[(F+2)%U],k=$[2*i],K=$[2*i+1],g=$[2*b],R=$[2*b+1],T=$[2*e],D=$[2*e+1],a=!1;
if(x(k,K,g,R,T,D)){a=!0;for(var _=0;_<U;_++){var I=j[_];if(I==i||I==b||I==e)continue;if(Q($[2*I],$[2*I+1],k,K,g,R,T,D)){a=!1;
break}}}if(a){z.push(i,b,e);j.splice((F+1)%U,1);U--;F=0}else if(F++>3*U)break}z.push(j[0],j[1],j[2]);
return z};return c}();d.A.ap5=function(x,Q){var c={},$={G:[],j:[]};for(var F=0;F<Q.length;F+=3){var z=Q[F]*2,j=Q[F+1]*2,U=Q[F+2]*2;
d.A.cf(x,z,j,$,c);d.A.cf(x,z,U,$,c);d.A.cf(x,j,U,$,c)}return $};d.A.cf=function(x,Q,c,$,z){if(Q>c){var j=c;
c=Q;Q=j}if(z[Q+","+c])return;z[Q+","+c]=!0;$.G.push("M","L");$.j.push(x[Q],x[Q+1],x[c],x[c+1])};d.A.agg=function(x,Q){var c=[],$=x.length;
for(var F=0;F<$;F+=2){var z=x[F],j=x[F+1],U=x[(F+2)%$],i=x[(F+3)%$];if(i<j){var b=j;j=i;i=b}if(j<Q&&Q<i){var e=(Q-j)/(i-j);
c.push(z+e*(U-z))}}c.sort(function(k,K){return k-K});return c};d.A.aaX=function(x,Q,c,$,z,j,U){var i=x-c,b=Q-$,e=z-c,k=j-$,K=1/Math.sqrt(i*i+b*b),g=1/Math.sqrt(e*e+k*k),R=i*K,T=b*K,D=e*g,a=k*g,_=T*U,I=-R*U,f=-a*U,y=D*U,Z=d.A.Ad(_,I,R,T,f,y,D,a),v=_+R*Z,G=I+T*Z,Z=d.A.Ad(0,0,R,T,v,G,-T,R),q=R*Z,h=T*Z;
return[Math.sqrt(q*q+h*h),R,T,D,a]};d.A.a1d=function(x,Q,c,$,z,j,U){var i=d.A.aaX(x,Q,c,$,z,j,U),b=i[0],e=i[1],k=i[2],K=i[3],g=i[4],R=Math.atan2(e*g-k*K,e*K+k*g);
if(R<0){R=R*-1}var T=Math.PI-R,D=4/3*Math.tan(T/4),a=c+b*e,_=$+b*k,I=c+b*K,f=$+b*g,y=a+D*U*-e,Z=_+D*U*-k,v=I+D*U*-K,G=f+D*U*-g;
return[0,0,a,_,y,Z,v,G,I,f]};d.A.Ad=function(x,Q,c,$,z,j,U,i){var b=U*(Q-j)-i*(x-z),e=i*c-U*$;if(e==0)return 0;
return b/e};d.A.bV=function(x,Q,c,$,z,j){return x*($-j)+c*(j-Q)+z*(Q-$)};d.A.ag_=function(x){function Q(O,p,C,W,J,t,Y,l,m){var B=d.A.Ad(O,p,C,W,J,t,Y,l);
m.push(O+C*B,p+W*B)}var c=[],$=x.length,z=[];for(var F=0;F<$;F+=2){var j=F==0?$-2:F-2,U=F==$-2?0:F+2,i=x[F],b=x[F+1],e=i-x[j],k=b-x[j+1],K=x[U]-i,g=x[U+1]-b,R=Math.sqrt(e*e+k*k),T=Math.sqrt(K*K+g*g);
z.push(T);var D=R/(R+T),a=i-e*.5,_=b-k*.5,I=i+K*.5,f=b+g*.5,y=(x[U]+x[j])*.5,Z=(x[U+1]+x[j+1])*.5,v=a+D*(I-a),G=_+D*(f-_),q=i-v,h=b-G,r=(K*-e+g*-k)/(R*T),H=(D-.5)*7,o=1+H*D,P=1-H*(1-D);
c.push(a+q*o,_+h*o,I+q*P,f+h*P)}return c};d.vj=function(){};d.vj.rT=function(x,Q,c,$,z){var j=c.m,U=c.e,i=j*U,b=new Int32Array(i),jF=0;
for(var F=0;F<i;F++)if(Q[F]!=0){b[F]=jF;jF++}else if(x[(F<<2)+3]<200){b[F]=-2}else b[F]=-1;if(jF==0)return;
var e=new d.w_(jF,jF),k=new Array(3*jF),K=new Array(3*jF);for(var F=0;F<K.length;F++)K[F]=k[F]=0;var g=1/255,R=[-j,-1,1,j],T=[],D=[];
for(var a=0;a<U;a++)for(var _=0;_<j;_++){var I=a*j+_,f=I<<2,F=b[I],y=F*3,Z=0,v=0,G=0;if(F==-1||F==-2)continue;
for(var q=0;q<4;q++){if(q==2){v=G;T[G]=0;D[G]=F;G++}var h=I+R[q],r=h<<2,H=b[h];if(q==0&&a==0||q==1&&_==0||q==2&&_==j-1||q==3&&a==U-1||H==-2)continue;
Z++;if(H==-1){k[y+0]+=x[r+0];k[y+1]+=x[r+1];k[y+2]+=x[r+2]}else{T[G]=-1;D[G]=H;G++;if(Q[I]==Q[h]){k[y+0]+=x[f+0]-x[r+0];
k[y+1]+=x[f+1]-x[r+1];k[y+2]+=x[f+2]-x[r+2]}}}T[v]=Z;e.Gt(T,D,G)}for(var F=0;F<i;F++)if(b[F]!=-1){var o=F<<2,P=b[F],O=P*3;
K[O]=x[o+0];K[O+1]=x[o+1];K[O+2]=x[o+2]}var p=Date.now();e.aae(K,k,$,z);console.log(Date.now()-p);for(var F=0;
F<i;F++){var P=b[F],C=P*3,o=F<<2;if(P==-1||x[o+3]!=255)continue;x[o+0]=~~(.5+Math.max(0,Math.min(255,K[C+0])));
x[o+1]=~~(.5+Math.max(0,Math.min(255,K[C+1])));x[o+2]=~~(.5+Math.max(0,Math.min(255,K[C+2])))}};d.rect={};
d.rect.atp=function(x,Q){var c=[x],$=[];for(var F=0;F<Q.length;F++){var z=Q[F],j=!1;for(var U=F+1;U<Q.length;
U++){var i=Q[U];if(i[0]<=z[0]&&i[1]<=z[1]&&z[2]<=i[2]&&z[3]<=i[3]){j=!0;break}}if(!j)$.push(z)}Q=$;for(var F=0;
F<Q.length;F++){var z=Q[F];for(var U=0;U<c.length;U++){var i=c[U],b=Math.max(z[0],i[0]),e=Math.min(z[2],i[2]),k=Math.max(z[1],i[1]),K=Math.min(z[3],i[3]);
if(b<e&&k<K){var g=[];if(i[1]<z[1]){var R=i.slice(0);R[3]=z[1];g.push(R)}if(i[0]<z[0]){var T=i.slice(0);
T[1]=k;T[2]=z[0];g.push(T)}if(z[2]<i[2]){var D=i.slice(0);D[1]=k;D[0]=z[2];g.push(D)}if(z[3]<i[3]){var a=[b,K,e,i[3]];
g.push(a)}if(g.length!=0){c[U]=g[0];for(var _=1;_<g.length;_++)c.push(g[_])}}}c.push(z);c=d.rect.aoW(c)}c.sort(function(z,i){return z[1]!=i[1]?z[1]-i[1]:z[0]-i[0]});
for(var F=1;F<c.length;F++){var z=c[F-1],i=c[F];if(z[0]==i[0]&&z[1]==i[1]&&z[2]==i[2]&&z[3]==i[3]){c.splice(z[4]==null?F-1:F,1);
F--}}return c};d.rect.aoW=function(x){x=x.slice(0);for(var F=0;F<x.length;F++){var Q=x[F],c=null;if(Q[4]!=null)continue;
for(var $=0;$<x.length;$++){var z=x[$];if(F==$||z[4]!=null)continue;var j=Q[0]==z[0],U=Q[1]==z[1],i=Q[2]==z[2],b=Q[3]==z[3];
if(U&&b&&(Q[2]==z[0]||Q[0]==z[2])){c=[Math.min(Q[0],z[0]),Q[1],Math.max(Q[2],z[2]),Q[3]]}if(j&&i&&(Q[3]==z[1]||Q[1]==z[3])){c=[Q[0],Math.min(Q[1],z[1]),Q[2],Math.max(Q[3],z[3])]}if(c){x[F]=c;
x.splice($,1);break}}if(c){F--}}return x};d.rect.kV=function(x){var Q=new gh;for(var F=0;F<x.length;
F++)Q=Q.iO(x[F]);return Q};d.rect.aj4=function(x,Q){var c=d.rect.kV,$=new UnionFind(x.length),v=1e3,G=1e3;
for(var F=0;F<x.length;F++)for(var z=F+1;z<x.length;z++){if(!Q)continue;var j=x[F],U=x[z],K=1e9,g=1e9;
if(j.dM(U)){$.link(F,z);continue}var i=j.x+j.m,b=j.y+j.e,e=U.x+U.m,k=U.y+U.e;if((i<U.x||e<j.x)&&(b<U.y||k<j.y))continue;
if(!(b<U.y||k<j.y))K=Math.min(Math.abs(i-U.x),Math.abs(j.x-e));if(!(i<U.x||e<j.x))g=Math.min(Math.abs(b-U.y),Math.abs(j.y-k));
var R=Math.min(K,g),T=Math.min(j.m,j.e,U.m,U.e);if(R<.3*T)$.link(F,z)}var D=[],a={};for(var F=0;F<x.length;
F++){var _=$.find(F),I=x[F];if(a[_]==null){a[_]=D.length;D.push([])}D[a[_]].push(I)}var f=[],y=[];for(var F=0;
F<D.length;F++){f.push(c(D[F]));var Z=c(D[F]);Z.qM=F;y.push(Z)}y.sort(function(W,J){return Math.max(J.e,J.m)-Math.max(W.e,W.m)});
var q=new NETXUS.RectanglePacker(v,G);while(!0){var h=!1;q.reset(v,G);for(var F=0;F<y.length;F++){var r=q.findCoords(y[F].m,y[F].e);
if(r){y[F].x=r.x;y[F].y=r.y}else{v=Math.floor(v*1.1);G=Math.floor(G*1.1);h=!0;break}}if(h)continue;break}for(var F=0;
F<D.length;F++){var H=y[F],o=H.qM,P=f[o],O=D[o],p=H.x-P.x,C=H.y-P.y;for(var z=0;z<O.length;z++)O[z].offset(p,C)}};
d.fR=function(){};d.fR.P0=Math.floor(16*window.devicePixelRatio);d.fR.GT={};d.fR.i0=0;d.fR.$P=[[12,76,2],[12,76,3],[12,76,4],[12,76,5],[12,76,6]];
d.fR.arp=["px","in","cm","mm","%"];d.fR.X_=function(x,Q,c,$){var z=[1,Q,Q/2.54,Q/25.4,c/100][$];return x*z};
d.fR.apX=function(x,Q,c,$){var z=[1,Q,Q/2.54,Q/25.4,c/100][$];return x/z};d.fR.Z0=function(x,Q,c,$,z){var j=c.Zo.IM,U=[1,Q,Q/2.54,Q/25.4,$/100][j],i=[2,3,2,1,2][j];
x=x/U;var b=Math.round(x),e=j==0&&Math.abs(x-b)<1e-6?b+"":x.toFixed(i);if(z)e+=" "+d.fR.arp[j];return e};
d.fR.avS=function(x,Q,c,$){var z=c.Zo.IM,j=[1,Q,Q/2.54,Q/25.4,$/100][z];x=parseFloat(x)*j;return x};
d.fR.ajo=function(x,Q){var c=x+","+Q;if(d.fR.GT.clr==c)return;var $=Math.round(d.fR.P0*.5);d.fR.i0=$;
var z=d.nc($,$);z.save();z.font=$*1.5+"px monospace";var j="0 1 2 3 4 5 6 7 8 9 -".split(" ");for(var F=0;
F<j.length;F++){z.fillStyle="#"+d.vg(Q);z.fillRect(0,0,$,$);z.fillStyle="#"+d.vg(x);z.fillText(j[F],0,$);
d.fR.GT[j[F]]=new Uint8Array(z.getImageData(0,0,$,$).data.buffer)}d.fR.GT.clr=c;z.restore()};d.fR.a0T=function(x,Q,c){var $=0,z=0,j=4*d.fR.P0;
for(var F=9;F>=0;F--){var U=Math.pow(10,F);if(5*U*x<=j){$=5*U;z=10;break}if(2*U*x<=j){$=2*U;z=4;break}if(1*U*x<=j){$=1*U;
z=10;break}}if($==0){$=1;z=10}var i=Math.ceil($*x),b=d.R(i*d.fR.P0*4);d.h4(b,4278190080|c);for(var F=0;
F<d.fR.P0;F++)d.fR.hb(b,4*F*i,Q);for(var F=0;F<i;F++)d.fR.hb(b,4*((d.fR.P0-1)*i+F),Q);if($==2)z=2;if($==5)z=5;
if($>1||$==1&&i>20)for(var F=1;F<z;F++)d.fR.aj7(b,F*(i/z),i,(F&1)==1?.8:.7,Q);return{QK:b,step:$}};d.fR.aj7=function(x,Q,c,$,z){var Q=Math.round(Q);
for(var j=Math.round(d.fR.P0*$);j<d.fR.P0-1;j++)d.fR.hb(x,4*(j*c+Q),z)};d.fR.hb=function(x,Q,c){x[Q+0]=c>>16&255;
x[Q+1]=c>>8&255;x[Q+2]=c&255};d.fR.aqN=function(x,Q,c,$,z,j,U){var i=x.yY.m,b=x.yY.e,e=d.fR.P0,k=Q&255,K=Q>>8&255,g=Q>>16&255;
Q=Math.round(k*.6)<<16|Math.round(K*.6)<<8|Math.round(g*.6);d.fR.ajo(Math.round(k*.8)<<16|Math.round(K*.8)<<8|Math.round(g*.8),c);
var R=x.W,T=x.z,D=x.A6;for(var a=0;a<2;a++){var _=a==0?j:U;x.W=_[0];x.z=_[1];x.A6=0;var I=this.a0T(x.W,Q,c),f=x.$X(0,0),y=x.$X(i,b),Z=Math.floor(f.x/I.step)*I.step,v=Math.ceil(y.x/I.step)*I.step,G=Math.floor(f.y/I.step)*I.step,q=Math.ceil(y.y/I.step)*I.step,h=x.wu(Z,G),r=x.wu(v,G),H=I.step*x.W,o=Math.ceil(H);
if(a==1){var P=I.QK;I.QK=d.R(P.length*4);d.D.Ny(P,I.QK,o,e)}var O=a==0?x.Wf.data:x.Vq.data,p=new gh(0,0,[i,e][a],[e,b][a]),C=new gh(0,0,[o,e][a],[e,o][a]),W=new gh([0,Math.round(e*.2)][a],[Math.round(e*.08),0][a],d.fR.i0,d.fR.i0),J=(a==0?v-Z:q-G)/I.step;
for(var F=0;F<J;F++){if(a==0)C.x=Math.round(h.x+F*H);else C.y=Math.round(h.y+F*H);d.WK(I.QK,C,O,p,C);
var t=(a==0?Z+F*I.step:Math.abs(G+F*I.step)).toString(10);for(var Y=0;Y<t.length;Y++){if(a==0)W.x=C.x+3+Y*Math.round(d.fR.i0*.8);
else W.y=C.y+3+Y*Math.round(d.fR.i0*1.15);var l=d.fR.GT[t[Y]];d.WK(l,W,O,p,W)}}}x.W=R;x.z=T;x.A6=D;var m=Math.floor(e*.6),B=new Uint32Array(x.Wf.data.buffer),L=new Uint32Array(x.Vq.data.buffer),A=k<128?4278190080:4294967295;
if(0<$&&$<i)for(var F=0;F<m;F++)B[F*i+$]=A;if(0<z&&z<b)for(var F=0;F<m;F++)L[z*e+F]=A};d.scale={};d.scale.GP=document.createElement("canvas");
d.scale.Yt=d.scale.GP.getContext("2d");d.scale.nz=function(x,Q,c){var $=d.scale.GP,z=d.scale.Yt;$.width=Q;
$.height=c;var j=new ImageData(new Uint8ClampedArray(x.buffer),Q,c);z.putImageData(j,0,0);return z.createPattern(z.canvas,"repeat")};
d.scale.arB=function(x,Q,c,$,z,j,U,i,b){var e=d.scale.ar7(x,c,$,z,j,U,i,b);if(Q)Q.set(e);return new Uint8Array(e.buffer)};
d.scale.ar7=function(x,Q,c,$,z,j,U,i){var b=d.nc(Q,c);b.save();b.rect(0,0,Q,c);b.translate(j,U);b.scale($,z);
if(i!=null)b.rotate(-i);b.fillStyle=x;b.fill();b.restore();return new Uint8Array(b.getImageData(0,0,Q,c).data.buffer)};
d.scale.i=function(x,Q,c,$,z){var j=c.J==0&&c.dC==0,U=z.m,i=z.e,b=d.A.Hg(Q,c).j,e=d.A.cl(b,j).y_(z),k=e.x,K=e.y,g=k+e.m,R=K+e.e,T=~~Q.x,D=~~Q.y,a=~~Q.m,_=~~Q.e;
if(j)for(var I=K;I<R;I++){var f=c.xq*(I+.5)+c.ti-D,y=~~f*a;for(var Z=k;Z<g;Z++){var v=c.V*(Z+.5)+c.DX-T;
$[I*U+Z]=x[y+~~v]}}else for(var I=K;I<R;I++)for(var Z=k;Z<g;Z++){var G=Z+.5,q=I+.5,v=c.V*G+c.dC*q+c.DX-T,f=c.J*G+c.xq*q+c.ti-D;
if(0<=v&&0<=f&&v<a&&f<_)$[I*U+Z]=x[~~f*a+~~v]}};d.scale.azx=function(x,Q,c,$,z,j){var U=new Uint32Array(x.buffer),i=new Uint32Array($.buffer),b=z.m,e=z.e,k=d.A.Hg(Q,c).j,K=j?z:d.A.cl(k).y_(z),g=K.x,R=K.y,T=g+K.m,D=R+K.e,a=~~Q.x,_=~~Q.y,I=~~Q.m,f=~~Q.e;
for(var y=R;y<D;y++)for(var Z=g;Z<T;Z++){var v=Z+.5,G=y+.5,q=c.V*v+c.dC*G+c.DX-a,h=c.J*v+c.xq*G+c.ti-_;
if(j){q=((I<<10)+q)%I;h=((f<<10)+h)%f}if(0<=q&&0<=h&&q<I&&h<f)i[y*b+Z]=U[~~h*I+~~q]}};d.scale.KL=function(x,Q,c,$,z,j,U){if(U<1)d.scale.a78(x,Q,c,$,z,j,Math.round(1/U));
else d.scale.aE8(x,Q,c,$,z,j,U)};d.scale.hR=function(x,Q,c,$,z,j,U,i){if(i)i=i.y_(new gh(0,0,Q,c));x=new Uint32Array(x.buffer);
$=new Uint32Array($.buffer);if(U<1)d.scale.aqK(x,Q,c,$,z,j,Math.round(1/U),i);else d.scale.a0$(x,Q,c,$,z,j,U)};
d.scale.aE8=function(x,Q,c,$,z,j,U){for(var i=0;i<c;i++)for(var b=0;b<Q;b++){var e=x[i*Q+b],k=Math.min(U,z-b*U),K=Math.min(U,j-i*U);
for(var F=0;F<K;F++)for(var g=0;g<k;g++)$[(U*i+F)*z+U*b+g]=e}};d.scale.a78=function(x,Q,c,$,z,j,U){for(var i=0;
i<j;i++)for(var b=0;b<z;b++){var e=0,k=Math.min(U,Q-b*U),K=Math.min(U,c-i*U);for(var F=0;F<K;F++)for(var g=0;
g<k;g++)e+=x[(U*i+F)*Q+(U*b+g)];$[i*z+b]=Math.round(e/(k*K))}};d.scale.a0$=function(x,Q,c,$,z,j,U){for(var i=0;
i<c;i++)for(var b=0;b<Q;b++){var e=x[i*Q+b],k=Math.min(U,z-b*U),K=Math.min(U,j-i*U);for(var F=0;F<K;
F++)for(var g=0;g<k;g++)$[(U*i+F)*z+U*b+g]=e}};d.scale.a7F=function(x,Q,c){return(x>>>c&255)+(Q>>>c&255)>>>1};
d.scale.ZP=function(x,Q){var c=d.scale.a7F;return c(x,Q,24)<<24|c(x,Q,16)<<16|c(x,Q,8)<<8|c(x,Q,0)};
d.scale.aap=function(x,Q,c,$,z,j){var U=new Uint32Array(x.buffer),i=new Uint32Array($.buffer);for(var b=0;
b<c;b++){for(var e=0;e<Q;e++){var k=b*Q+e,K=U[k],g=K,R=K,T=K;if(e<Q-1)g=d.scale.ZP(K,U[k+1]);if(b<c-1)R=d.scale.ZP(K,U[k+Q]);
if(e<Q-1&&b<c-1)T=d.scale.ZP(K,U[k+Q+1]);var D=(b*z+e)*2;i[D]=K;i[D+1]=g;i[D+z]=R;i[D+z+1]=T}}if((z&1)==1)for(var b=0;
b<j;b++)i[b*z+z-1]=i[b*z+z-2];var a=z*(j-1);if((j&1)==1)for(var e=0;e<z;e++)i[a+e]=i[a-z+e]};d.scale.aqK=function(x,Q,c,$,z,j,U,i){var b=0,e=z,k=0,K=j;
if(i){b=Math.floor(i.x/U);e=Math.ceil((i.x+i.m)/U);k=Math.floor(i.y/U);K=Math.ceil((i.y+i.e)/U)}for(var g=k;
g<K;g++)for(var R=b;R<e;R++){var T=0,D=0,a=0,_=0,I=Math.min(U,Q-R*U),f=Math.min(U,c-g*U);for(var F=0;
F<f;F++)for(var y=0;y<I;y++){var Z=x[(U*g+F)*Q+U*R+y],v=Z>>>24;T+=v;D+=v*(Z>>>16&255);a+=v*(Z>>>8&255);
_+=v*(Z&255)}if(T!=0){var G=1/T;$[g*z+R]=T/(I*f)<<24|D*G<<16|a*G<<8|_*G}else $[g*z+R]=0}};d.u=function(){function x(i,b,F){return(128&i[F-b-1]&i[F-b]&i[F-2]&i[F-1]&i[F+1]&i[F+b-1]&i[F+b])==0}function Q(i,b,F){return(128&i[F-b-b]&i[F-b+1]&i[F+2]&i[F+b+1]&i[F+b+b])==0}function c(i,b,F){return(i[F-b]&i[F-1]&i[F+1]&i[F+b]&128)==0}function $(i,F){return(i[F]&128)!=0}function z(i,b,e,k){var F=0,K=e.m,g=e.e;
if(k)for(var R=0;R<g;R++)for(var T=0;T<K;T++){if($(i,F)&&(T<2||R<2||T>K-3||R>g-3||((i[F-1]&128)==0||b[F-1]!=0)&&x(i,K,F)||Q(i,K,F)))b[F]=255;
F++}else for(var R=0;R<g;R++)for(var T=0;T<K;T++){if($(i,F)&&(T==0||R==0||T==K-1||R==g-1||c(i,K,F)))b[F]=255;
F++}}function j(i,b,e,k,K){var g=e.m,R=e.e,T=new Uint8Array(b.buffer),D=new Uint32Array(b.buffer);if(K)for(var a=2;
a<R-2;a++)for(var _=2;_<g-2;_++){var F=a*g+_;if($(i,F)&&(((i[F-1]&128)==0||D[F-1]!=0)&&x(i,g,F)||Q(i,g,F)))D[F]=k[(_+a&4)>>>2]}else for(var a=1;
a<R-1;a++)for(var _=1;_<g-1;_++){var F=a*g+_;if($(i,F)&&c(i,g,F)){D[F]=k[(_+a&4)>>>2]}}}function U(i,b,e,k,K){var g=e.m,R=e.e,T=new Uint8Array(b.buffer),D=new Uint32Array(b.buffer),F=0;
if(k==1)for(var a=0;a<R;a++)for(var _=0;_<g;_++,F++){var I=i[F];D[F]=255-I>>>1<<24|255}else for(var a=0;
a<R;a++)for(var _=0;_<g;_++,F++){var I=i[F];D[F]=255<<24|(I<<16|I<<8|I)}}return{axj:z,adz:j,avr:U}}();
d.NE={};d.NE.B2=function(x,Q,c){var $,z;if(c==0){$=x.rect.clone();z=d.NE.ayI}if(c==1){$=x.rect.iO(Q.rect);
z=d.NE.iO}if(c==2){$=Q.rect.clone();z=d.NE.ad7}if(c==3){$=x.rect.y_(Q.rect);z=d.NE.y_}if(c==4){$=x.rect.iO(Q.rect);
z=d.NE.ayt}if($._6())return null;var j=d.R($.P());d.L2(Q.channel,Q.rect,j,$);var U=d.R($.P());d.L2(x.channel,x.rect,U,$);
z(U,j,j);var i=d.qQ(j,$);if(i._6())return null;if(!i.HM($)){var b=d.R(i.P());d.L2(j,$,b,i);j=b;$=i}return{channel:j,rect:$}};
d.NE.ayI=function(x,Q,c){for(var F=0;F<x.length;F++)c[F]=x[F]};d.NE.iO=function(x,Q,c){for(var F=0;F<x.length;
F++)c[F]=Math.min(x[F]+Q[F],255)};d.NE.ad7=function(x,Q,c){for(var F=0;F<x.length;F++)c[F]=Math.max(Q[F]-x[F],0)};
d.NE.y_=function(x,Q,c){var $=1/255;for(var F=0;F<x.length;F++)c[F]=x[F]*Q[F]*$};d.NE.ayt=function(x,Q,c){var $=1/255;
for(var F=0;F<x.length;F++)c[F]=Math.min(x[F]+Q[F],255)-x[F]*Q[F]*$};d.w_=function(x,Q){this.H=[];this.XJ=[0];
this.KJ=[];this.Hu=[];this.v1=[0];this.vw=[];this.qI=[];this.rows=x;this.cols=Q};d.w_.prototype.clone=function(){var x=this,Q=x.rows,c=x.cols,$=new d.w_(Q,c);
$.H=x.H.slice(0);$.XJ=x.XJ.slice(0);$.KJ=x.KJ.slice(0);$.Hu=x.Hu.slice(0);$.v1=x.v1.slice(0);$.vw=x.vw.slice(0);
$.qI=x.qI.slice(0);return $};d.w_.prototype.Gt=function(x,Q,c){var $=this.XJ.length-1;for(var F=0;F<c;
F++){var z=x[F],j=Q[F];this.H.push(z);this.KJ.push(j);if(j==$){this.qI.push(z==0?0:1/z)}else{this.Hu.push(z);
this.vw.push(j)}}this.XJ.push(this.H.length);this.v1.push(this.Hu.length)};d.w_.prototype._n=function(x,Q){var c=this,$=c.rows,z=c.H,j=c.KJ;
if(Q==null)Q=new Array($);for(var F=0;F<$;F++){var U=c.XJ[F],i=c.XJ[F+1],b=0;while((i-U&3)!=0){b+=z[U]*x[j[U]];
U++}for(var e=U;e<i;e+=4)b+=z[e]*x[j[e]]+z[e+1]*x[j[e+1]]+z[e+2]*x[j[e+2]]+z[e+3]*x[j[e+3]];Q[F]=b}return Q};
d.w_.prototype.multiply=function(x){return this.$K(x.Ny())};d.w_.prototype.$K=function(x){var Q=this,c=Q.rows,$=Q.cols,z=x.rows,j=new d.w_(c,z),U=Q.KJ,i=x.KJ;
for(var F=0;F<c;F++){var b=[],e=[],k=Q.XJ[F],K=Q.XJ[F+1];for(var g=0;g<z;g++){var R=x.XJ[g],T=x.XJ[g+1],D=0,a=k,_=R;
while(a<K&&_<T){var I=Math.max(U[a],i[_]);while(a<K&&U[a]<I)a++;while(_<T&&i[_]<I)_++;if(a<K&&_<T&&U[a]==i[_])D+=Q.H[a++]*x.H[_++]}if(D!=0){b.push(D);
e.push(g)}}j.Gt(b,e,b.length)}return j};d.w_.prototype.Ny=function(){var x=this.rows,Q=this.cols,c=[];
for(var F=0;F<Q;F++)c.push([[],[]]);var $=this.H,z=this.XJ,j=this.KJ;for(var F=0;F<x;F++){var U=z[F],i=z[F+1];
for(var b=U;b<i;b++){var e=c[j[b]];e[0].push($[b]);e[1].push(F)}}var k=new d.w_(Q,x);for(var F=0;F<Q;
F++)k.Gt(c[F][0],c[F][1],c[F][1].length);return k};d.w_.prototype.JB=function(){var x=this.rows,Q=this.cols,c=new Array(x),$=this.H,z=this.XJ,j=this.KJ;
for(var F=0;F<x;F++){var U=c[F]=new Array(Q);for(var i=0;i<Q;i++)U[i]=0;var b=z[F],e=z[F+1];for(var k=b;
k<e;k++)U[j[k]]=$[k]}return c};d.w_.prototype.fn=function(x,Q,c,$,z){function j(G,Q,q,h){var r=G.length;
for(var F=0;F<r;F++)h[F]=G[F]-Q[F]*q}function U(G,Q,q,h){var r=G.length,H=0;while((r-H&3)!=0){h[H]=G[H]+Q[H]*q;
H++}for(var F=H;F<r;F+=4){h[F]=G[F]+Q[F]*q;h[F+1]=G[F+1]+Q[F+1]*q;h[F+2]=G[F+2]+Q[F+2]*q;h[F+3]=G[F+3]+Q[F+3]*q}}function i(G,Q,q){var h=G.length;
for(var F=0;F<h;F++)q[F]=G[F]*Q[F]}function b(G,Q){var q=G.length,h=0,r=0;while((q-h&3)!=0){r+=G[h]*Q[h];
h++}for(var F=h;F<q;F+=4)r+=G[F]*Q[F]+G[F+1]*Q[F+1]+G[F+2]*Q[F+2]+G[F+3]*Q[F+3];return r}var e=$!=null?2:1,k=Date.now(),K=0,g=this,R=x.slice(0),T=x.slice(0);
g._n(x,T);j(Q,T,1,R);var D=this.qI;if(e==0){D=R.slice(0);D.fill(1)}var a=R.slice(0);i(D,R,a);var _=a.slice(0),I=b(R,a);
while(!0){g._n(_,T);var f=I/b(_,T);U(x,_,f,x);j(R,T,f,R);if((K&7)==0&&Math.sqrt(b(R,R))<c)break;if(e<=1)i(D,R,a);
else{var y=R.slice(0);$.ayv(y,R);z.afQ(a,y)}var Z=b(R,a),v=Z/I;U(a,_,v,_);I=Z;K++}};d.w_.prototype.agd=function(x,Q,c,$){var z=Date.now(),j=1.96,i=0;
if(c==null)c=5e-6;if($==null)$=1e9;var U=1-j,jF=this.rows,b=this.Hu,e=this.v1,k=this.vw,K=this.qI;while(!0){var g=0;
for(var F=0;F<jF;F++){var R=Q[F],T=e[F],D=e[F+1];if(D-T==4)R-=b[T]*x[k[T]]+b[T+1]*x[k[T+1]]+b[T+2]*x[k[T+2]]+b[T+3]*x[k[T+3]];
else for(var a=T;a<D;a++)R-=b[a]*x[k[a]];var _=x[F]*U+K[F]*R*j,I=_-x[F];g+=I*I;x[F]=_}if(g/jF<c||Date.now()>z+$)break}};
d.w_.prototype.aae=function(x,Q,c,$){var z=Date.now(),j=1.96,i=0;if(c==null)c=5e-5;if($==null)$=1e9;
var U=1-j,jF=this.rows,b=this.Hu,e=this.v1,k=this.vw,K=this.qI;while(!0){var g=0;for(var F=0;F<jF;F++){var R=F*3,T=Q[R],D=Q[R+1],a=Q[R+2],_=e[F],I=e[F+1];
for(var f=_;f<I;f++){var y=b[f],Z=k[f]*3;T-=y*x[Z+0];D-=y*x[Z+1];a-=y*x[Z+2]}var v=K[F]*j,G=x[R+0]*U+T*v,q=x[R+1]*U+D*v,h=x[R+2]*U+a*v,r=G-x[R+0],H=q-x[R+1],o=h-x[R+2];
g+=.4*r*r+.5*H*H+.1*o*o;x[R+0]=G;x[R+1]=q;x[R+2]=h}if(g/jF<c||Date.now()>z+$)break}};d.eu={};d.eu.UW=function(x,Q,c){return{t:"Objc",v:{classID:"CrPt",Hrzn:{t:"doub",v:x},Vrtc:{t:"doub",v:Q},Cnty:{t:"bool",v:c}}}};
d.eu.i=function(x,Q){for(var F=0;F<x.length;F++){var c=x[F].v,$=Q.RE(new bC(c.Hrzn.v,c.Vrtc.v));c.Hrzn.v=Math.round($.x);
c.Vrtc.v=Math.round($.y)}};d.eu.alc=function(x,Q,c){var jF=x.length-1,$=d.BS.Hl(jF+1,jF+2);for(var F=1;
F<jF;F++){$[F][F-1]=1/(x[F]-x[F-1]);$[F][F]=2*(1/(x[F]-x[F-1])+1/(x[F+1]-x[F]));$[F][F+1]=1/(x[F+1]-x[F]);
$[F][jF+1]=3*((Q[F]-Q[F-1])/((x[F]-x[F-1])*(x[F]-x[F-1]))+(Q[F+1]-Q[F])/((x[F+1]-x[F])*(x[F+1]-x[F])))}$[0][0]=2/(x[1]-x[0]);
$[0][1]=1/(x[1]-x[0]);$[0][jF+1]=3*(Q[1]-Q[0])/((x[1]-x[0])*(x[1]-x[0]));$[jF][jF-1]=1/(x[jF]-x[jF-1]);
$[jF][jF]=2/(x[jF]-x[jF-1]);$[jF][jF+1]=3*(Q[jF]-Q[jF-1])/((x[jF]-x[jF-1])*(x[jF]-x[jF-1]));d.BS.I1($,c)};
d.eu.ayg=function(x,Q,c,$){if(x<=Q[0])return c[0];if(x>=Q[Q.length-1])return c[Q.length-1];var F=1;while(Q[F]<x)F++;
var z=Q[F],j=Q[F-1],U=c[F],i=c[F-1],b=(x-j)/(z-j),e=$[F-1]*(z-j)-(U-i),k=-$[F]*(z-j)+(U-i),K=(1-b)*i+b*U+b*(1-b)*(e*(1-b)+k*b);
return K};d.eu.abq=function(x,Q,c,$){var z={N8:[x[0]],B9:[Q[0]],bl:[]};$[0]=z;for(var F=1;F<x.length-1;
F++){z.N8.push(x[F]);z.B9.push(Q[F]);if(c[F]==!1){d.eu.alc(z.N8,z.B9,z.bl);z={N8:[x[F]],B9:[Q[F]],bl:[]}}$[F]=z}z.N8.push(x[F]);
z.B9.push(Q[F]);d.eu.alc(z.N8,z.B9,z.bl);$[F]=z};d.eu.agm=function(x,Q,c,$){if(x<=Q[0])return c[0];if(x>=Q[Q.length-1])return c[Q.length-1];
var F=1;while(Q[F]<x)F++;var z=$[F-1];return d.eu.ayg(x,z.N8,z.B9,z.bl)};d.eu.atL=function(x){var Q={N8:[],B9:[],WU:[]};
for(var F=0;F<x.length;F++){Q.N8[F]=x[F].v.Hrzn.v;Q.B9[F]=x[F].v.Vrtc.v;Q.WU[F]=x[F].v.Cnty?x[F].v.Cnty.v:!0}return Q};
d.eu.ho=function(x,jF,Q){var c=0,$=255;if(Q){c=-1e9;$=1e9}var z=d.eu.atL(x),j=[];d.eu.abq(z.N8,z.B9,z.WU,j);
var U=[];for(var F=0;F<jF;F++)U[F]=1/255*Math.max(c,Math.min($,d.eu.agm(F*(255/(jF-1)),z.N8,z.B9,j)));
return U};d.eu.aE5=function(x,jF,Q){var c=Math.round(x.length/20),$=jF-x.length,z=Q?(x[c]-x[0])/c:0,j=Q?x[0]-$*z:x[x.length-1],U=[];
for(var F=0;F<$;F++)U.push(j+F*z);return Q?U.concat(x):x.concat(U)};d.eu.WN=function(x,jF,Q){var c=d.eu.atL(x),$=[];
d.eu.abq(c.N8,c.B9,c.WU,$);var z=new Uint8Array(jF),j=jF/256;for(var F=0;F<jF;F++)z[F]=Math.max(0,Math.min(jF-1,d.eu.agm(F*j,c.N8,c.B9,$)));
if(Q){z[0]=0;if(z[1]>100)z[1]=.4*z[1];if(z[2]>150)z[1]=.7*z[2]}return z};d.eu.anP=function(x,Q){var c=new Uint8Array(x.length);
for(var F=0;F<x.length;F++)c[F]=Q[x[F]];return c};d.eu.Zh=function(x,Q,c){var $=document.createElement("canvas");
$.width=Q;$.height=c;var z=$.getContext("2d"),j=d.eu.WN(x,256);z.scale(Q/255,c/255);z.fillStyle="#fff";
z.fillRect(0,0,255,255);z.fillStyle="#333";z.beginPath();z.moveTo(0,255);for(var F=0;F<j.length;F++)z.lineTo(F,255-j[F]);
z.lineTo(255,255);z.closePath();z.fill();return $.toDataURL()};d.style={};d.style.stroke=function(x,Q,c,$){var z=c.m,j=c.e,U=d.style.Jw(x,z,j);
d.style.yP(Q,c,U,c,$)};d.style.yP=function(x,Q,c,$,z){var j=Q.y_($),U=j.m,i=j.e;z+=.5;var b=j.x-Q.x,e=j.y-Q.y,k=Q.m,K=j.x-$.x,g=j.y-$.y,R=$.m;
for(var T=0;T<i;T++){var D=(T+g)*R+K,a=(T+e)*k+b;for(var _=0;_<U;_++){var I=Math.max(0,Math.min(1,z-c[D+_]));
x[a+_]=Math.round(I*255)}}};d.style.a8j=function(x,Q,c,$){for(var z=0;z<c;z++)for(var j=0;j<Q;j++){var U=z*Q+j,i=0,b=0,e=x[U];
if(j==0||z==0){i=x[U+1]-e;b=x[U+Q]-e}else if(j==c-1||z==Q-1){i=e-x[U-1];b=e-x[U-Q]}else{i=x[U+1]-x[U-1];
b=x[U+Q]-x[U-Q]}if(i!=0||b!=0){var k=1/Math.sqrt(i*i+b*b);i*=k;b*=k}$[U+U]=i;$[U+U+1]=b}};d.style.Jw=function(x,Q,c){var $=Q*c,z=new ArrayBuffer(($+Q*4)*4),j=new Float32Array(z,0,$),U=new Uint16Array(z,0,$<<1),i=new Int32Array(z,$*4,Q),b=new Int32Array(z,($+Q)*4,Q),e=new Int32Array(z,($+Q*2)*4,Q),k=new Int32Array(z,($+Q*3)*4,Q),K=1/255;
for(let F=0;F<Q;++F){let g=-c-Q,R=0,T=F,D=0;for(;D<c;++D,T+=Q){if(x[T]>128)g=D,R=x[T];U[T<<1]=D-g;U[(T<<1)+1]=R}g=U[T+=T-Q-Q],R=U[T+1];
for(;D>1;--D){if(U[T-=Q+Q]>g)U[T]=++g,U[T+1]=R;else g=U[T],R=U[T+1]}}for(let a=0;a<$;a+=Q){var _=a+Q,I=U[a<<1]*U[a<<1],f=0;
let y=i[0]=a,Z=b[0]=a,v=I,G=v;for(let T=a+1;T<_;++T){var q=U[T<<1]*U[T<<1];while(f&&G>(Z-T)*(Z-T)+q){Z=b[--f],y=i[f],v=U[y<<1]*U[y<<1],G=(Z-y)*(Z-y)+v}if(f||G<=(Z-T)*(Z-T)+q){var h=T-y,r=a+Math.floor((h*(T+y-a-a)+q-v)/(h<<1))+1;
if(r<_){Z=b[++f]=r,y=i[f]=T,v=q,G=(Z-y)*(Z-y)+v}}else Z=a,y=i[0]=T,v=q,G=(Z-y)*(Z-y)+v}for(let F=0;F<f;
++F){var H=i[F]<<1;e[F]=U[H]*U[H];k[F]=U[H+1]}let o=.5-U[(i[f]<<1)+1]*K;for(let T=_-1;T>=a;--T){j[T]=Math.max(0,Math.sqrt((T-y)*(T-y)+v)+o);
if(f&&T==Z){Z=b[--f],y=i[f],v=e[f],o=.5-k[f]*K}}}return j};d.style.a6q=function(x,Q,c){var $=new Float64Array(Q*c),z=0,j=Q*c;
for(var F=0;F<j;F++)z|=x[F];if(z==0){$.fill(1e9);return}var U=d.style.qD(x,Q,c);for(var i=0;i<c;i++)for(var b=0;
b<Q;b++){var F=i*Q+b,e=U[F*2],k=U[F*2+1];if(e==0&&k==0){$[F]=0;continue}var K=Math.sqrt(e*e+k*k),g=x[(i+k)*Q+b+e]*(1/255);
$[F]=K+.5-g}return $};d.style.aih=function(x,Q,c){return(.5-c)*x};d.style.qD=function(x,Q,c,$){var z=new Int16Array(Q*c*2);
d.style.a6X(x,z,Q,c,128);return z};d.style.a6X=function(x,Q,c,$,z){var j=new Int32Array(c*$);d.style.adM(x,j,c,$,z);
d.style.ad4(j,Q,c,$)};d.style.adM=function(x,Q,c,$,z){var j=new Int32Array($);for(var U=0;U<c;U++){var i=c+$;
for(var b=$-1;b>=0;b--){if(x[b*c+U]>z)i=0;else i++;j[b]=i}i=c+$;for(var b=0;b<$;b++){if(x[b*c+U]>z)i=0;
else i++;Q[b*c+U]=i<j[b]?-i:j[b]}}};d.style.ad4=function(x,Q,c,$){var z=(c+$)*(c+$),j=new Float64Array(c),U=new Uint16Array(c);
for(var i=0;i<$;i++){var b=i*c,e=0;U[0]=0;j[0]=-z;j[1]=+z;for(var k=1;k<c;k++){var K=x[k+b]*x[k+b]+k*k,g=(K-(x[U[e]+b]*x[U[e]+b]+U[e]*U[e]))/(2*k-2*U[e]);
while(g<=j[e]){e--;g=(K-(x[U[e]+b]*x[U[e]+b]+U[e]*U[e]))/(2*k-2*U[e])}e++;U[e]=k;j[e]=g;j[e+1]=z}e=0;
for(var k=0;k<c;k++){while(j[e+1]<k)e++;var R=U[e]-k,T=x[U[e]+b],F=i*c+k<<1;Q[F]=R;Q[F+1]=T}}};d.style.Sk=function(x,Q,c){if(c)for(var F=0;
F<x.length;F++){var $=x[F];if($>0)x[F]=Math.max(0,Math.min(255,$+Q*2*(d.style.xk(F)-128)))}else for(var F=0;
F<x.length;F++){var $=x[F];if($>0)x[F]=Math.max(0,Math.min(255,$+Math.min($*3,Q*2*(d.style.xk(F)-128))))}};
d.style.xk=function(x){x=x^61^x>>16;x=x+(x<<3);x=x^x>>4;x=x*668265261;x=x^x>>15;return x&255};d.k5={};
d.k5.Lu=function(x,Q,c){var $=x.canvas;if($.width!=Q||$.height!=c){$.width=Q;$.height=c}};d.k5.wI=function(x,Q,c,$,z,j){d.k5.Lu(x,Q,c);
if(j==null)j=!1;var U=z.channel,i=z.rect,b=!z.isEnabled;if(Q*c==0)return;var e=x.createImageData(Q,c),k=e.data,K=1/Q,g=1/c;
for(var F=0;F<c;F++)for(var R=0;R<Q;R++){var T=F*Q+R,D=T*4,a=Math.round($.x+R*K*$.m),_=Math.round($.y+F*g*$.e),I=0;
if(a<i.x||a>=i.x+i.m||_<i.y||_>=i.y+i.e)I=z.color;else I=U[(_-i.y)*i.m+(a-i.x)];I=255*(255-z.f4)+I*z.f4>>>8;
if(j)I=170+Math.round(.4*(I-170));k[D]=I;k[D+1]=I;k[D+2]=I;k[D+3]=255}x.putImageData(e,0,0);if(b)d.k5.aCx(x,Q,c)};
d.k5.auf=[];d.k5.asi=function(x,Q,c,$){var z,j,U;z=Math.ceil(Math.max(Q,c)*.35);j=Q-z;U=c-z;var i=d.k5.auf[z];
if(i==null){var b=d.nc(z,z);b.fillStyle="#eeeeee";b.fillRect(0,0,z,z);var e=Math.round(z*.27),k=b.lineWidth=Math.max(1,Math.round(z*.12)),K=k/2;
b.strokeRect(1+K,1+K,z-k-2,z-k-2);b.strokeRect(e+K,e+K,z-e-e-k,z-e-e-k);i=d.k5.auf[z]=b.getImageData(0,0,z,z)}x.putImageData(i,j,U)};
d.k5.ayA=[];d.k5.a0m=function(x,Q,c){var $,z,j;$=Math.ceil(Math.max(Q,c)*.35);z=Q-$;j=c-$;var U=d.k5.ayA[$];
if(U==null){var i=d.nc($,$);i.fillStyle="#eeeeee";i.fillRect(0,0,$,$);i.lineWidth=1;i.strokeRect(2.5,2.5,$-5,$-5);
var b=i.createImageData(3,3);d.h4(b.data,4278190080);b.data[4*4]=b.data[4*4+1]=b.data[4*4+2]=238;i.putImageData(b,1,1);
i.putImageData(b,$-4,1);i.putImageData(b,1,$-4);i.putImageData(b,$-4,$-4);U=d.k5.ayA[$]=i.getImageData(0,0,$,$)}x.putImageData(U,z,j)};
d.k5.anl=function(x,Q,c,$,z){d.k5.Lu(x,Q,c);var j=Q/$.m;if(Q*c==0)return;x.fillStyle="#999999";x.setTransform(1,0,0,1,0,0);
x.clearRect(0,0,Q,c);var U=d.k5.hw;if(U==null)U=d.k5.hw=aF.XM.$H(!0,!0);U.strokeStyleLineWidth.v.val=1/j;
x.fillStyle="#ffffff";x.scale(j,j);d.o.U1(z.$,x,0,0);d.o.U1(z.$,x,0,0,U)};d.k5.aDX=null;d.k5.PO=function(x,Q,c,$,z,j,U,i,b){d.k5.Lu(x,Q,c);
if(Q*c==0)return;var e=Math.max(Q,c),k=d.k5.aDX;if(k==null||k.width<e||k.height<e){d.k5.aDX=k=x.createImageData(e,e)}e=k.width;
var K=k.data,g=$.m/Q,R=$.e/c,T=j.x,D=j.x+j.m,a=j.y,_=j.y+j.e;for(var F=0;F<c;F++)for(var I=0;I<Q;I++){var f=F*e+I,y=f*4,Z=~~($.x+I*g),v=~~($.y+F*R),G=d.azG(F,I,2);
if(Z<T||Z>=D||v<a||v>=_||b){K[y]=G;K[y+1]=G;K[y+2]=G;K[y+3]=255}else{var q=(v-j.y)*j.m+(Z-j.x)<<2,h=z[q+3]*(1/255);
K[y]=z[q+0]*h+G*(1-h);K[y+1]=z[q+1]*h+G*(1-h);K[y+2]=z[q+2]*h+G*(1-h);K[y+3]=255}}if(i!=null)for(var F=0;
F<K.length;F+=4)K[F]=K[F+1]=K[F+2]=K[F+i];x.putImageData(k,0,0);if(U)d.k5.aCx(x,Q,c)};d.k5.a8A=function(x,Q,c,$){d.k5.Lu(x,Q,c);
x.fillStyle=d.k5.Du($.Clr.v);x.fillRect(0,0,Q,c);d.k5.L0(x,Q,c)};d.k5.aDn=null;d.k5.aoe=function(x,Q,c,$){d.k5.Lu(x,Q,c);
var z=x.canvas.width,j=x.canvas.height,U=d.k5.aDn;if(U==null||U.width!=z||U.height!=j){x.fillStyle="#ffffff";
x.fillRect(0,0,Q,c);x.fillStyle="#000000";x.font=""+c*.7+"px serif";x.fillText("T",(Q-c*.43)/2,c*.75);
x.fillText("T",(Q-c*.43)/2,c*.75);d.k5.aDn=x.getImageData(0,0,z,j)}else x.putImageData(U,0,0)};d.k5.ail=function(x,Q,c){d.k5.Lu(x,Q,c);
x.clearRect(0,0,Q,c);x.font=c*.7+"px serif";x.fillText(":(",(Q-c*.43)/2,c*.7)};d.k5.av4=function(x,Q,c,$){d.k5.Lu(x,Q,c);
var z=k5.get($),j=x.canvas.width,U=d.k5.aio[j+z];if(U==null){var i=PIMG["adj/"+z],b=ar.DM(i),e=UPNG.decode(b.buffer),k=new Uint8Array(UPNG.toRGBA8(e)[0]),K=new gh(0,0,160,160),g=0,R=j-g*2,T=X.Y.rN([k,K],new bI(R/160,0,0,R/160,0,0)),D=new gh(0,0,j,j),a=d.R(D.P()*4);
d.l.UY("norm",T.buffer,T.rect,a,D,T.rect,1);U=d.k5.aio[j+z]=new ImageData(new Uint8ClampedArray(a.buffer),j,j)}x.putImageData(U,0,0)};
d.k5.aio={};d.k5.aps=function(x,Q,c,$){d.k5.Lu(x,Q,c);var z=x.canvas.width,j=x.canvas.height,U=x.getImageData(0,0,z,j);
d.I.yV($.Grad.v,new Uint8Array(U.data.buffer),new gh(0,0,z,j),[1/z,0,0,1/j],z/2,j/2,!1,0,16711680,65280);
x.putImageData(U,0,0);d.k5.L0(x,Q,c)};d.k5.apM=function(x,Q,c,$,z){d.k5.Lu(x,Q,c);var j=x,U=en.yr($.Ptrn.v,z.add.Patt);
if(U==null)return;var i=U.GD[1];d.k5.PO(x,Q,c,i,U.GD[0],i,!1);d.k5.L0(j,Q,c)};d.k5.aCx=function(x,Q,c){x.strokeStyle="#bb0000";
x.lineWidth=3;x.beginPath();x.moveTo(Q*.15,c*.15);x.lineTo(Q*.85,c*.85);x.moveTo(Q*.85,c*.15);x.lineTo(Q*.15,c*.85);
x.closePath();x.stroke()};d.k5.L0=function(x,Q,c){x.fillStyle="#eeeeee";x.fillRect(0,c*.75,Q,c*.25);
x.beginPath();x.moveTo(0,c*.75);x.lineTo(Q,c*.75);x.moveTo(Q*.1,c*.875);x.lineTo(Q*.9,c*.875);x.moveTo(Q*.65,c*.825);
x.lineTo(Q*.65,c*.95);x.closePath();x.stroke()};d.k5.Du=function(x){var Q=d.I.Du(x),c=Math.round(Q.Z)<<16|Math.round(Q.r)<<8|Math.round(Q.J);
return"#"+d.vg(c)};d.o={};d.o.Mn=function(x,Q,c){var $=[],z=-1;for(var F=0;F<x.length;F++){var j=x[F];
if((j.type==0||j.type==3)&&j.Kp!=-1)z++;if(j.type>5||j.type==0||j.type==3)continue;if(Q!=null&&Q.indexOf(z)==-1)continue;
if(c!=null&&c.indexOf(F)==-1)continue;$.push(j.Hw.x);$.push(j.Hw.y);$.push(j.L.x);$.push(j.L.y);$.push(j.Im.x);
$.push(j.Im.y)}return $};d.o.q2=function(x,Q,c,$){var z=0,j=-1;for(var F=0;F<Q.length;F++){var U=Q[F];
if((U.type==0||U.type==3)&&U.Kp!=-1)j++;if(U.type>5||U.type==0||U.type==3)continue;if(c!=null&&c.indexOf(j)==-1)continue;
if($!=null&&$.indexOf(F)==-1)continue;U.Hw.r$(x[z],x[z+1]);U.L.r$(x[z+2],x[z+3]);U.Im.r$(x[z+4],x[z+5]);
z+=6}};d.o.Of=function(x,Q,c,$){var z=d.o.Mn(x,c,$);d.A.i(z,Q,z);d.o.q2(z,x,c,$)};d.o.a2Y=function(x,Q,c,$){var z=d.o.Mn(x,c,$);
d.D.i(Q,z);d.o.q2(z,x,c,$)};d.o.aiv=function(x,Q,c,$){if($==null){var z=d.o.alh(x,40,c);for(var F=0;
F<z.length;F++)x[F]=z[F]}var j=d.o.Mn(x,c,$);d.uE.i(Q,j,d.A.pA(j));d.o.q2(j,x,c,$)};d.o.alh=function(x,Q,c){var $=[],z=-1;
for(var F=0;F<x.length;F++){var j=x[F],U=j.length;if(j.type>5){$.push(JSON.parse(JSON.stringify(j)));
continue}j=JSON.parse(JSON.stringify(j));$.push(j);if(j.Kp!=-1)z++;if(c&&c.indexOf(z)==-1){$=$.concat(x.slice(F+1,F+1+U))}else{var i=d.o.a5W(x,F+1,U);
i=d.A.TP(i,Q);var b=d.o.adv(i);j.length=b.length;for(var e=0;e<b.length;e++)$.push(b[e])}F+=U}return $};
d.o.a5W=function(x,Q,c){var $={G:["M"],j:[]},z=x[Q],j=x[Q+c-1];$.j.push(z.L.x,z.L.y);for(var F=1;F<c;
F++){var U=x[Q+F-1],i=x[Q+F];$.G.push("C");$.j.push(U.Im.x,U.Im.y,i.Hw.x,i.Hw.y,i.L.x,i.L.y)}$.G.push("C");
$.j.push(j.Im.x,j.Im.y,z.Hw.x,z.Hw.y,z.L.x,z.L.y);return $};d.o.adv=function(x){var Q=[],c=x.G,$=x.j,z=0,jF=$.length;
Q.push({type:2,Hw:new bC($[jF-4],$[jF-3]),L:new bC($[0],$[1]),Im:new bC($[2],$[3])});for(var F=0;F<c.length-2;
F++){var j=F*6+4;Q.push({type:2,Hw:new bC($[j],$[j+1]),L:new bC($[j+2],$[j+3]),Im:new bC($[j+4],$[j+5])})}return Q};
d.o.aB_=function(x){for(var F=0;F<x.length;F++){if(x[F].type>5)continue;var Q=x[F].length;if(!(Q==4||Q==6||Q==8)){F+=Q;
continue}for(var c=0;c<Q;c++){var $=x[F+1+c],z=x[F+1+(c+1)%Q],j=Math.min($.L.x,z.L.x),U=Math.min($.L.y,z.L.y),i=0,b=0;
if($.L.x<z.L.x){i=$.L.y-U;b=i-(z.L.x-j)}else{i=z.L.y-U;b=i-($.L.x-j)}if(Math.abs(b)<.2*i)return i}}return-1};
d.o.sP=function(x,Q,c){function $(g,R){var T=Math.min(g.x,R.x),D=Math.min(g.y,R.y),a=Math.max(g.x+g.m,R.x+R.m),_=Math.max(g.y+g.e,R.y+R.e);
return new gh(T,D,a-T,_-D)}var z=null,j=-1,U=!d.o.cP(x);for(var F=0;F<x.length;F++){var i=x[F];if(i.type>5)continue;
if((i.type==0||i.type==3)&&i.Kp!=-1)j++;if(Q!=null&&Q.indexOf(j)==-1)continue;if(F==x.length-1)break;
var b=i.type==3,e=i.length,k=i.Kp,K=d.o.pG(x,F+1,e,b);if(z==null)z=K;else if(c)z=$(z,K);else if(U){if(Q!=null||k==0||k==-1||k==2)z=$(z,K);
else if(k==1)z=z;else if(k==3){z=K;U=!1}}else{if(Q!=null||k==0||k==-1||k==1)z=$(z,K);else if(k==2)z=z;
else if(k==3)z=z.y_(K)}F+=e}if(z==null||z.m<0||z.e<0)z=new gh(0,0,0,0);return z};d.o.abU=new Float64Array(4);
d.o.pG=function(x,F,Q,c){var $=d.o.abU;$[0]=1e30;$[1]=1e30;$[2]=-1e30;$[3]=-1e30;var z=x[F+Q-1];if(!c)d.o.af_(z.L.x,z.L.y,z.Im.x,z.Im.y,x[F].Hw.x,x[F].Hw.y,x[F].L.x,x[F].L.y,$);
for(var j=F;j<F+Q-1;j++){var U=x[j],i=x[j+1];d.o.af_(U.L.x,U.L.y,U.Im.x,U.Im.y,i.Hw.x,i.Hw.y,i.L.x,i.L.y,$)}return new gh($[0],$[1],$[2]-$[0],$[3]-$[1])};
d.o.af_=function(x,Q,c,$,z,j,U,i,b){if(x==c&&Q==$&&z==U&&j==i){b[0]=Math.min(b[0],Math.min(x,U));b[1]=Math.min(b[1],Math.min(Q,i));
b[2]=Math.max(b[2],Math.max(x,U));b[3]=Math.max(b[3],Math.max(Q,i));return}var e=x,k=Q,K=x,g=Q,R=40,T=1/(R-1);
for(var D=0;D<R;D++){var a=D*T,_=1-a,I=_*_*_,f=3*_*_*a,y=3*_*a*a,Z=a*a*a,v=I*x+f*c+y*z+Z*U,G=I*Q+f*$+y*j+Z*i;
if(v<e)e=v;else if(v>K)K=v;if(G<k)k=G;else if(G>g)g=G}if(e<b[0])b[0]=e;if(k<b[1])b[1]=k;if(K>b[2])b[2]=K;
if(g>b[3])b[3]=g};d.o.ar1=function(x,Q){var c=x.length-3,$=Q%c,z=Math.floor($);if(Q<0||z>=c)return null;
var j=x[3+z],U=x[3+(z+1)%c],i=j.L,b=j.Im,e=U.Hw,k=U.L,K=$-z,g=1-K,R=g*g*g*i.x+3*g*g*K*b.x+3*g*K*K*e.x+K*K*K*k.x,T=g*g*g*i.y+3*g*g*K*b.y+3*g*K*K*e.y+K*K*K*k.y;
return new bC(R,T)};d.o.vb=function(x,Q){var c=d.A.bO(x),$=c.Fg;c.Fg=Typr.U.pathToSVG({crds:$.j,cmds:$.G},Q==null?2:Q);
return c};d.o.nv=function(x){d.o.jG();var Q,c=d.o.lU(x),$=[];for(var F=0;F<c.length;F++){var z=c[F][0],j=c[F][1];
if(Math.abs(z.area)<1e-5)$.push(z);else if(Q==null)Q=z;else{if(!z.closed)z.closed=!0;Q=Q[j](z);Q.remove()}}if(Q==null)Q=new paper.CompoundPath($);
else{if(Q.segments)Q=new paper.CompoundPath(Q);for(var F=0;F<$.length;F++){Q.addChild($[F])}}var U=x.slice(0,2);
U=U.concat(d.o.zW(Q));d.o.fs(c);d.o.fs([[Q]]);if(U[2])U[2].Kp=1;for(var F=3;F<U.length;F++)if(U[F].Kp!=null)U[F].Kp=-1;
return U};d.o.jG=function(){if(d.o.a64==null){var x=document.createElement("canvas");paper.setup(x);
d.o.a64=!0}};d.o.ahB=function(x,Q){d.o.jG();var c=[],$=d.o.lU(x),z=new paper.Path.Rectangle(new paper.Rectangle(Q.x,Q.y,Q.m,Q.e));
z.remove();z.fillColor=new paper.Color(1,0,0);for(var F=0;F<$.length;F++){if(z.intersects($[F][0])||z.contains($[F][0].children[0].segments[0].point))c.push(F)}d.o.fs($);
return c};d.o.e$=function(x,Q,c,$){d.o.jG();var z=c?{curves:!0,tolerance:$}:null,j=new paper.Point(Q.x,Q.y),U=d.o.lU(x);
d.o.fs(U);for(var F=U.length-1;F>=0;F--){var i=U[F][0],b=i.hitTest(j,z);if(b!=null)return{xR:F,xu:c?b.location.index:null,JC:c?b.location.time:0}}return{xR:-1}};
d.o.qy=function(x,Q,c,$){var z=[[],[],[]];for(var F=0;F<x.length;F++){var j=x[F];if(j.type>5||j.type==0||j.type==3)continue;
var U=Q.Wl(j.L),i=Q.Wl(j.Hw),b=Q.Wl(j.Im);if(c&&c.indexOf(F)==-1){if($){if(c.indexOf(F-1)==-1)i=!1;if(c.indexOf(F+1)==-1)b=!1}else i=b=!1}if(U)z[0].push(F);
if(i)z[1].push(F);if(b)z[2].push(F)}z[3]=z[0].length+z[1].length+z[2].length;return z};d.o.al1=function(x,Q,c){var $=x[Q];
for(var z=Q+1;z<c;z++)x[z-1]=x[z];x[c-1]=$};d.o.aB1=function(x,Q,c,$){var F,z,j,U=0;x=x.slice(0);Q.sort(function(T,D){return T-D});
j=-1;for(F=2;F<x.length;){var i=x[F],b=i.length;if(i.Kp!=-1)j++;var e=U;while(e<Q.length&&Q[e]<F+1+b)e++;
if(U!=e){var k=Q.slice(U,e);U=e;for(z=0;z<b;z++)if(k.indexOf(F+1+z)!=-1)x[F+1+z]=null;if(i.type==0){var K=k[0]-(F+1);
while(K!=0){d.o.al1(x,F+1,F+1+b);K--}}var g=i;g.length=0;z=0;while(z<b&&x[F+1+z]==null)z++;while(z<b){var R=x[F+1+z];
if(R!=null)g.length++;else if(z<b+1&&x[F+1+z+1]&&$){g=x[F+1+z]={type:0,Kp:-1,length:0,kO:0,QQ:0,YS:1}}z++}if($)for(z=-1;
z<b;z++)if(x[F+1+z]&&x[F+1+z].type<3)x[F+1+z].type+=3;d.eV.Bq(c,j)}F+=1+b}for(F=0;F<x.length;F++)if(x[F]==null){x.splice(F,1);
F--}j=0;for(F=2;F<x.length;F++){var i=x[F];if(i.length==0){if(x[F+1]&&x[F+1].Kp==-1)x[F+1].Kp=i.Kp;else if(i.Kp!=-1)c.splice(j,1);
x.splice(F,1);F--}else if(i.length!=null&&i.Kp!=-1)j++}return x};d.o.azr=function(x,Q){var c=x.slice(0,2),$=-1;
for(var F=2;F<x.length;F++){if((x[F].type==0||x[F].type==3)&&x[F].Kp!=-1)$++;if(Q.indexOf($)==-1)c.push(x[F])}return c};
d.o.auZ=function(x,Q){var c=x.slice(0,2),$=-1;for(var F=2;F<x.length;F++){if((x[F].type==0||x[F].type==3)&&x[F].Kp!=-1)$++;
if(Q.indexOf($)!=-1)c.push(x[F])}return c};d.o.aeW=function(x){var Q=0;for(var F=0;F<x.length;F++)if(x[F].type==0||x[F].type==3)Q=F;
return x[Q]};d.o.WV=function(x){var Q=-1;for(var F=0;F<x.length;F++)if((x[F].type==0||x[F].type==3)&&x[F].Kp!=-1)Q++;
return Q+1};d.o.dQ=function(x,Q,c){var $=-1;for(var F=0;F<x.length;F++)if((x[F].type==0||x[F].type==3)&&(c||x[F].Kp!=-1)){$++;
if($==Q)return F}return-1};d.o.Js=function(x,Q,c){var $=-1;for(var F=0;F<x.length;F++)if((x[F].type==0||x[F].type==3)&&(c||x[F].Kp!=-1)){if(F>=Q)return $;
$++}return $};d.o.T_=function(x,Q){var c=-1,$=0;for(var F=0;F<x.length;F++){if((x[F].type==0||x[F].type==3)&&x[F].Kp!=-1)c++;
if(c==Q)$++}return $};d.o.adL=function(x){var Q=180;for(var F=0;F<x.length;F++){if(x[F].type!=0&&x[F].type!=3)continue;
var c=x[F].length;if(c<3)continue;for(var $=0;$<c;$++){var z=x[F+1+($-1+c)%c],j=x[F+1+$],U=x[F+1+($+1)%c],i=j.L,b=j.Hw.HM(i)?z.Im:j.Hw,e=j.Im.HM(i)?U.Hw:j.Im;
if(i.HM(b)||i.HM(e))continue;var k=b.x-i.x,K=b.y-i.y,g=e.x-i.x,R=e.y-i.y,b=Math.atan2(b.y-i.y,b.x-i.x)*180/Math.PI,e=Math.atan2(e.y-i.y,e.x-i.x)*180/Math.PI,T=Math.abs(e-b)%360,D=T>180?360-T:T;
if(D<Q)Q=D}}return Q*Math.PI/180};d.o.zW=function(x){var Q=x.segments?[x]:x.children,c=[];for(var F=0;
F<Q.length;F++){var $=Q[F],z=$.segments,j=$.closed?0:3,U=c.length,i=null;if(z.length<=1)continue;c.push({type:j,length:z.length,Kp:0,YS:2});
for(var b=0;b<z.length;b++){var e=z[b],k=new bC(e.handleIn.x,e.handleIn.y),K=new bC(e.handleOut.x,e.handleOut.y),g=new bC(e.point.x,e.point.y),R={type:j+1,Hw:g.add(k),L:g,Im:g.add(K)};
if(i==null)i=R;c.push(R);if(b+1==z.length&&bC.Xc(i.L,R.L)<1e-5){c.pop();c[U].length--;i.Hw=R.Hw;if(j==3)for(var T=U;
T<c.length;T++)c[T].type-=3}}}return c};d.o.lU=function(x){d.o.jG();var Q=[],c,$=new paper.Color(1,0,0);
function z(R,i){R.remove();R.closed=!i;R.fillRule="evenodd"}for(var F=0;F<x.length;F++){if(x[F].type>5)continue;
var j=x[F].length,U;if(F==x.length-1)break;var i=x[F].type==3;if(F==2){if(!d.o.Qx(x))U="subtract";else U="unite"}else{if(x[F].Kp==0)U="exclude";
if(x[F].Kp==1)U="unite";if(x[F].Kp==2)U="subtract";if(x[F].Kp==3)U="intersect"}if(x[F].Kp!=-1){c=new paper.CompoundPath;
Q.push([c,U]);c.fillRule="evenodd";c.fillColor=$}var b=[];for(var e=0;e<j;e++){var k=x[F+1+e],K=k.Hw.HY(k.L),g=k.Im.HY(k.L);
b.push([[k.L.x,k.L.y],[K.x,K.y],[g.x,g.y]])}var R=new paper.Path(b);z(R,i);c.addChild(R);F+=j}return Q};
d.o.fs=function(x){for(var F=0;F<x.length;F++)x[F][0].remove()};d.o.DS=function(x){for(var F=0;F<x.length;
F++){var Q=x[F];if(Q.L==null)continue;if(!Q.L.HM(Q.Hw)||!Q.L.HM(Q.Im))return!1}return!0};d.o.a97=function(x){if(x.length<=5)return 0;
var Q=0,c=x.length-3-1;for(var F=0;F<c;F++){var $=x[3+F],z=x[3+F+1];if($.type==0||z.type==0)return 0;
Q+=(z.L.x-$.L.x)*($.L.y+z.L.y)}Q+=(x[3].L.x-x[3+c].L.x)*(x[3+c].L.y+x[3+1].L.y);return-Q*.5};d.o.cP=function(x){var Q=x[2],c=!1;
if(x.length==2)c=x[1].all==0;else if(x[1].all==1){if(Q.Kp==1||Q.Kp==3)c=!0;else c=!1}else{if(Q.Kp==1||Q.Kp==3||Q.Kp==0)c=!0;
else c=!1}return c};d.o.Qx=function(x){var Q=d.o.cP(x);for(var F=3;F<x.length;F++)if(x[F].Kp==3)Q=!0;
return Q};d.o.a0b=0;d.o.ahR=0;d.o.aaK=0;d.o.ahw=function(x,Q,c,$){if(c._6())return;var z=c.P(),_=16384;
d.o.a0b+=z;if(z>d.o.ahR){d.o.ahR=z}var j=c.m,U=c.e;if($==null&&d.o.DS(x)&&x[2]&&x[2].Kp!=2){var i=!0;
for(var F=2;F<x.length;)if(x[F].length==2)F+=3;else{i=!1;break}if(i){return}if(d.o.Uu(x)){Q.fill(255);
var b=d.o.sP(x);if(b.P()!=z){var e=1-(b.x-c.x),k=1-(b.y-c.y),K=1-(c.x+c.m-(b.x+b.m)),g=1-(c.y+c.e-(b.y+b.e)),R=~~(e*255),T=~~(K*255),D=~~(k*255),a=~~(g*255);
Q.fill(D,0,j);Q[0]=~~(e*k*255);Q[j-1]=~~(K*k*255);for(var F=j;F<z;F+=j){Q[F]=R;Q[F+j-1]=T}Q.fill(a,(U-1)*j,U*j);
Q[z-j]=~~(e*g*255);Q[z-1]=~~(K*g*255)}return}}var I=Math.ceil(j/_),f=Math.ceil(U/_),y=Math.ceil(j/I),Z=Math.ceil(U/f),v=Date.now();
for(var G=0;G<f;G++)for(var q=0;q<I;q++){var h=q*y,r=G*Z,H=y,o=Z,P=d.nc(H,o);if(!d.o.cP(x))P.fillRect(0,0,H,o);
d.o.U1(x,P,-c.x-h,-c.y-r,$);var O=new Uint8Array(P.getImageData(0,0,H,o).data.buffer);if(H==j&&o==U)d.GS(O,Q,3);
else d.df(O,new gh(h,r,H,o),Q,new gh(0,0,j,U))}};d.o.a5e=function(x){var Q=!1,c=!1,$=0,z=!1;for(var F=0;
F<x.length;F++){var j=x[F].Kp;if(j!=null){$++;if(j==-1)Q=!0;if(j==1||j==2||j==3)c=!0;if(x[F].type==0)z=!0}}if(!Q&&$<20&&z&&c)x=d.o.nv(x);
return x};d.o.U1=function(x,Q,c,$,z,j){if(z!=null){x=d.o.a5e(x)}for(var F=0;F<x.length;F++){if(x[F].type>5)continue;
var U=x[F].length;if(U==0)continue;if(F==x.length-1)break;var i=x[F].type==3,b=x[F].Kp;if(b!=-1&&z==null){var e=["xor","source-over","destination-out","source-in"][b];
Q.globalCompositeOperation=e}if(x[F].Kp!=-1){Q.beginPath();if(z)d.o.dz(aF.XM.bh(z,null,1),Q)}d.o.a1i(Q,x,F+1,U,c,$,i);
if(i){}else Q.closePath();if(x[F+1+U]==null||x[F+1+U].Kp!=-1){if(z){if(j)Q.clip();Q.stroke()}else Q.fill(b==-1?"nonzero":"evenodd")}F+=U}Q.globalCompositeOperation="source-over";
Q.setLineDash([])};d.o.dz=function(x,Q){var c=x.lwidth;Q.setLineDash(x.dash);Q.lineCap=["butt","round","square"][x.lcap];
Q.lineJoin=["miter","round","bevel"][x.ljoin];Q.lineWidth=x.sal==1?c:c*2;Q.miterLimit=x.mlimit};d.o.a1i=function(x,Q,F,c,$,z,j){var U=Q[F],i=null;
x.moveTo(U.L.x+$,U.L.y+z);for(var b=F;b<F+c-1;b++){U=Q[b];i=Q[b+1];x.bezierCurveTo(U.Im.x+$,U.Im.y+z,i.Hw.x+$,i.Hw.y+z,i.L.x+$,i.L.y+z)}if(!j){U=Q[b];
i=Q[F];x.bezierCurveTo(U.Im.x+$,U.Im.y+z,i.Hw.x+$,i.Hw.y+z,i.L.x+$,i.L.y+z)}};d.o.ahv=function(x,Q){var c=[],$=Q?4:1;
for(var F=0;F<x.length;F+=2){var z=new bC(x[F],x[F+1]);c.push({type:$,Hw:z.clone(),L:z.clone(),Im:z.clone()})}return c};
d.o.atq=function(x,Q,c){var $=(1-(c!=null?c:25)*.01)*10;if($>0){for(var F=0;F<Q.length;F++){var z=Q[F],j=d.o.dQ(x,z),U=d.o.T_(x,z),i=x.slice(j,j+U);
d.o.jG();var b=new paper.Path;b.remove();b.closed=!0;for(var e=1;e<i.length;e++)b.add(new paper.Point(i[e].L.x,i[e].L.y));
var k=b.simplify($);if(k)x.splice(j,U,...d.o.zW(b))}}return x};d.o.S8=function(x,Q,c){var $=d.A.pA(x),z=Math.sqrt(Math.sqrt($.P()))*.2,j=.2;
x=x.slice(0);var U=x.length,i=Q?0:2;for(var b=0;b<5;b++)for(var F=i;F<x.length-i;F+=2){var e=(F-2+U)%U,k=(F+2)%U,K=x[F],g=x[F+1],R=(x[e]+x[k])*.5,T=(x[e+1]+x[k+1])*.5;
x[F]=K+(R-K)*j;x[F+1]=g+(T-g)*j}if(c)return d.o.JE.vf(x,null,!Q);d.o.jG();var D=new paper.Path;D.remove();
D.closed=Q;for(var F=0;F<x.length;F+=2)D.add(new paper.Point(x[F],x[F+1]));D.simplify(z);var a=[{type:6},{type:8,all:0}];
a=a.concat(d.o.zW(D));return a};d.o.Hs=function(x,Q,c){var $=x[Q].length,z=x[Q].type,j=0,U=x.slice(Q+1,Q+1+$);
for(var F=0;F<$;F++){var i=c[(F-1+$)%$],b=c[(F+1+$)%$],e=c[F];if(e!=0){var k=U[(F-1+$)%$].L,K=U[(F+0+$)%$].L,g=U[(F+1+$)%$].L,R=bC.Xc(K,k),T=bC.Xc(K,g),D=d.A.aaX(k.x,k.y,K.x,K.y,g.x,g.y,e)[0],a=Math.min(D,i==0?R:R/2,b==0?T:T/2);
e*=a/D;var _=d.A.a1d(k.x,k.y,K.x,K.y,g.x,g.y,e),I={type:z+1,Hw:new bC(_[2],_[3]),L:new bC(_[2],_[3]),Im:new bC(_[4],_[5])},f={type:z+1,Hw:new bC(_[6],_[7]),L:new bC(_[8],_[9]),Im:new bC(_[8],_[9])};
x.splice(Q+j+1,1,I,f);j++;x[Q].length++}j++}};d.o.DS=function(x){for(var F=0;F<x.length;F++){var Q=x[F],c=Q.type;
if(c==1||c==2||c==4||c==5)if(!Q.L.HM(Q.Hw)||!Q.L.HM(Q.Im))return!1}return!0};d.o.Uu=function(x){if(x.length!=7||x[2].length!=4||!d.o.DS(x))return!1;
for(var F=0;F<4;F++){var Q=!0;for(var c=0;c<4;c++){var $=x[3+(F+c&3)],z=x[3+(F+c+1&3)];if($.L.x!=z.L.x&&$.L.y!=z.L.y)Q=!1}if(Q)return!0}return!1};
d.o.agr=function(x){if(x.length<6)return 0;var Q=x.length-2,c=0;for(var F=0;F<Q;F+=2)c+=(x[F+2]-x[F])*(x[F+1]+x[F+3]);
c+=(x[0]-x[Q])*(x[Q+1]+x[1]);return-c*.5};d.o.a7V=function(x){x=eM.hn.gG(x);var Q=d.o.WV(x);for(var c=0;
c<Q;c++){var $=d.o.dQ(x,c)+1,z=x[$-1].length,j=[];for(var F=0;F<z;F++){var U=x[$+F].L;j.push(U.x,U.y)}var i=d.o.agr(j);
if(i<0)d.o.awn(x,$-1)}return x};d.o.awn=function(x,Q){var c=Q+1,$=x[Q].length,z=[];for(var F=0;F<$;F++){var j=x[c+F],U=j.Hw;
j.Hw=j.Im;j.Im=U;z.push(j)}for(var F=0;F<$;F++)x[c+F]=z[$-1-F]};d.o.JE={};d.o.JE.vf=function(x,Q,c){var $=[{type:6},{type:8,all:0}],z=null;
$.push({type:c?3:0,Kp:1,length:0,kO:0,QQ:0,YS:1});if(Q==0||Q==null)z=null;else if(Q instanceof Array)z=Q;
else{z=[];for(var F=0;F<x.length;F+=2)z.push(Q)}$=$.concat(d.o.ahv(x,c));$[2].length=$.length-3;if(z)d.o.Hs($,2,z);
return $};d.o.JE.a8d=function(x,Q,c,$,z){var j=[],U=[],i=.553,b=1,e=-1;j.push({type:1,Hw:new bC(0,i),L:new bC(0,0),Im:new bC(0,-i)});
z+=2;for(var F=0;F<z;F++){var k={type:1};if(F==0){k.L=new bC(1,-1);k.Hw=new bC(1-i,-1);k.Im=new bC(1+i,-1)}else{var K=-(F+2)*Math.PI/2,g=1+((F&1)==1?F-1:F),R=Math.sin(K),T=Math.cos(K);
b+=g*(R-T);e+=g*(T+R);k.L=new bC(b,e);k.Hw=new bC(b+g*T*i,e-g*R*i);if((F&1)==1)g+=2;k.Im=new bC(b-g*T*i,e+g*R*i)}var D={type:1,Hw:new bC(-k.Im.x,-k.Im.y),L:new bC(-k.L.x,-k.L.y),Im:new bC(-k.Hw.x,-k.Hw.y)};
j.push(k);if(F<z-2)U.push(D)}U.reverse();j=j.concat(U);var a=[{type:6},{type:8,all:0}];a.push({type:0,Kp:1,length:j.length,kO:0,QQ:0,YS:1});
a=a.concat(j);var _=new bI(c/z,0,0,c/z,0,0);_.rotate($);_.translate(x,Q);d.o.Of(a,_);return a};d.o.JE.Rect=function(x,Q,c,$,z){var j=[x,Q,x+c,Q,x+c,Q+$,x,Q+$];
return d.o.JE.vf(j,z)};d.o.JE.sY=function(x,Q,c,$,z,j,U,i){var b=[],e=2*Math.PI/z;for(var F=0;F<z;F++)b.push(Math.cos(F*e-$),Math.sin(F*e-$));
if(U!=null){var k=d.A.pA(b),K=k.m,g=k.e,R=U/(K/2),T=i/(g/2);for(var F=0;F<b.length;F+=2){b[F]=(b[F]-(k.x+K/2))*R;
b[F+1]=(b[F+1]-(k.y+g/2))*T}c=1}var D=new bI(c,0,0,c,0,0);D.translate(x,Q);d.A.i(b,D,b);return d.o.JE.vf(b,j)};
d.o.JE.aAI=function(x,Q,c,$,z,j,U){var i=[],b=Math.PI/z;for(var F=0;F<z*2;F++){var e=(F&1)==0?1:U;i.push(e*Math.cos(F*b),e*Math.sin(F*b))}var k=new bI(c,0,0,c,0,0);
k.rotate($);k.translate(x,Q);d.A.i(i,k,i);return d.o.JE.vf(i,j)};d.o.JE.AE=function(x,Q,c,$,z){return d.o.JE.T5(0,x,Q,c,$,z)};
d.o.JE.a6P=function(x,Q,c,$,z,j){return d.o.JE.T5(1,x,Q,c,$,z,j)};d.o.JE.ec=function(x,Q,c,$,z,j){return d.o.JE.T5(2,x,Q,c,$,z,j)};
d.o.JE.T5=function(x,Q,c,$,z,j,U){var i=Math.sqrt(($-Q)*($-Q)+(z-c)*(z-c)),b;j/=2;if(x==0)b=[-j,0,j,0,j,i,-j,i];
if(x==1){var e=j*2*U*1.3/1.5,k=j*U;b=[-j,0,j,0,j,i-e,k,i-e,0,i,-k,i-e,-j,i-e]}if(x==2){var e=U[3],k=U[2]/2,K=e*(2/3)*U[4]/100,g=e-K,R=e;
b=[];if(U[0])b.push(-j,g,-k,R,0,0,k,R,j,g);else if(j==0)b.push(0,0);else b.push(-j,0,j,0);if(U[1])b.push(j,i-g,k,i-R,0,i,-k,i-R,-j,i-g);
else if(j==0)b.push(0,i);else b.push(j,i,-j,i)}var T=new bI(1,0,0,1,0,0);T.rotate(Math.atan2(-z+c,$-Q)+Math.PI/2);
T.translate(Q,c);d.A.i(b,T,b);return d.o.JE.vf(b,0)};d.o.JE.Sl=function(x,Q,c,$){var z=[{type:6},{type:8,all:0}],K=.553;
z.push({type:0,Kp:1,length:4,kO:0,QQ:0,YS:1});var j=x,U=Q,i=x+c,b=Q+$,x=(j+i)/2,Q=(U+b)/2,e=(j-i)/2,k=(U-b)/2;
z.push({type:1,Hw:new bC(x-K*e,Q-k),L:new bC(x,Q-k),Im:new bC(x+K*e,Q-k)});z.push({type:1,Hw:new bC(x+e,Q-K*k),L:new bC(x+e,Q),Im:new bC(x+e,Q+K*k)});
z.push({type:1,Hw:new bC(x+K*e,Q+k),L:new bC(x,Q+k),Im:new bC(x-K*e,Q+k)});z.push({type:1,Hw:new bC(x-e,Q+K*k),L:new bC(x-e,Q),Im:new bC(x-e,Q-K*k)});
return z};d.o.JE.a8l=function(x,Q,c,$,z){var j=[{type:6},{type:8,all:0}];j.push({type:3,Kp:1,length:5,kO:0,QQ:0,YS:1});
var U=(z-$)/4;for(var F=0;F<5;F++){var i=F*U,b=Math.cos(i),e=Math.sin(i),k=.553*(U/(Math.PI/2)),K=e*k,g=-b*k,R=new bC(b,e);
j.push({type:4,Hw:F==0?R.clone():new bC(b+K,e+g),L:R,Im:F==4?R.clone():new bC(b-K,e-g)})}var T=new bI;
T.rotate(-$);T.scale(c,c);T.translate(x,Q);d.o.Of(j,T);return j};d.fr={};d.fr.type={warpNone:[22,5,0],warpCustom:[22,5,16],warpArc:[22,5,1],warpArcLower:[22,5,2],warpArcUpper:[22,5,3],warpArch:[22,5,4],warpBulge:[22,5,5],warpShellLower:[22,5,6],warpShellUpper:[22,5,7],warpFlag:[22,5,8],warpWave:[22,5,9],warpFish:[22,5,10],warpRise:[22,5,11],warpFisheye:[22,5,12],warpInflate:[22,5,13],warpSqueeze:[22,5,14],warpTwist:[22,5,15],warpCylinder:"Cylinder"};
d.fr.a21={warpNone:[],warpCustom:[],warpArc:[.5,0,.5,1],warpArcLower:[.5,1,.5,1],warpArcUpper:[.5,0,.5,1],warpArch:[.5,0,.5,1],warpBulge:[.5,0,.5,1],warpShellLower:[.5,1,.5,1],warpShellUpper:[.5,0,.5,1],warpFlag:[.25,0,.5],warpWave:[.25,.501,.25],warpFish:[.25,0,.5],warpRise:[0,1,2],warpFisheye:[.5,.66,.1],warpInflate:[.5,0,.25],warpSqueeze:[.5,0,.25],warpTwist:[.33,.5,.16]};
d.fr.Cu=function(x){var Q=x.warpStyle.v.warpStyle;if(Q=="warpNone")return!0;else if(Q=="warpCylinder")return!1;
else if(Q=="warpCustom"){var c=!1,$=d.fr.ai4(x);for(var F=0;F<4;F++)for(var z=0;z<4;z++){var j=$[F*2]-$[(z*4+F)*2],U=$[F*4*2+1]-$[(F*4+z)*2+1];
if(j*j>1||U*U>1)c=!0}return!c}else return x.warpValue.v==0&&x.warpPerspective.v==0&&x.warpPerspectiveOther.v==0};
d.fr.anR=function(x){var Q=JSON.parse(JSON.stringify(x));Q.v.classID="quiltWarp";Q.v.deformNumRows={t:"long",v:4};
Q.v.deformNumCols={t:"long",v:4};if(Q.v.customEnvelopeWarp)d.fr.asQ(Q.v,[[0,1],[0,1]]);return Q};d.fr.afj=function(x){var Q;
if(d.fr.ZD(x.v)==16)Q=JSON.parse(JSON.stringify(x));else Q={t:"Objc",v:d.fr.R(d.fr.Pe(x.v))};Q.v.classID="warp";
delete Q.v.deformNumRows;delete Q.v.deformNumCols;var c=Q.v.customEnvelopeWarp;if(c){delete c.v.quiltSliceX;
delete c.v.quiltSliceY}return Q};d.fr.ZD=function(x){return x.deformNumRows.v*x.deformNumCols.v};d.fr.R=function(x){var Q={classID:"warp",warpStyle:{t:"enum",v:{warpStyle:"warpNone"}},warpValue:{t:"doub",v:0},warpPerspective:{t:"doub",v:0},warpPerspectiveOther:{t:"doub",v:0},warpRotate:{t:"enum",v:{Ornt:"Hrzn"}}};
if(x){Q.classID="quiltWarp";Q.bounds={t:"Objc",v:{classID:"Rctn",Top:{t:"UntF",v:{type:"#Pxl",val:x.y}},Left:{t:"UntF",v:{type:"#Pxl",val:x.x}},Btom:{t:"UntF",v:{type:"#Pxl",val:x.y+x.e}},Rght:{t:"UntF",v:{type:"#Pxl",val:x.x+x.m}}}};
Q.uOrder={t:"long",v:4};Q.vOrder={t:"long",v:4};Q.deformNumRows={t:"long",v:4};Q.deformNumCols={t:"long",v:4}}return Q};
d.fr.as7=function(x,Q,c){for(var F=0;F<x.length;F+=2){var $=x[F],z=x[F+1],j=(1-Q)/2,U=1-j,i=j+$*(U-j);
z=.5+(z-.5)*i*2;var b=(1-c)/2,e=1-b,k=b+z*(e-b);$=.5+($-.5)*k*2;x[F]=$;x[F+1]=z}};d.fr.vI=function(x,Q){return{id:x,type:"UnFl",uID:"#Pxl",arr:Q}};
d.fr.asQ=function(x,Q){var c=d.fr.Pe(x);function $(j,U){j=j.slice(0);var i=j.length,F;for(F=0;F<i;F++)j[F]*=U;
j[0]-=.6;j[i-1]+=.6;return j}var z=x.customEnvelopeWarp.v;z.quiltSliceX={t:"ObAr",v:{classID:"UntF",arr:[d.fr.vI("quiltSliceX",$(Q[0],c.m))]}};
z.quiltSliceY={t:"ObAr",v:{classID:"UntF",arr:[d.fr.vI("quiltSliceY",$(Q[1],c.e))]}}};d.fr.aqS=function(x){var Q=d.fr.Pe(x);
function c(U,i){U=U.slice(0);var j=U.length,F,b=1e9,e=-b;for(F=0;F<j;F++){if(U[F]<b)b=U[F];if(U[F]>e)e=U[F]}for(F=0;
F<j;F++)U[F]=(U[F]-b)/(e-b);U[0]=0;U[j-1]=1;return U}var $=x.customEnvelopeWarp.v,z=[],j=["X","Y"];for(var F=0;
F<2;F++)z.push(c($["quiltSlice"+(F==0?"X":"Y")].v.arr[0].arr.slice(0),F==0?Q.m:Q.e));return z};d.fr.aos=function(x,Q){var c=[],$=[];
for(var F=0;F<Q.length;F+=2){c.push(Q[F]);$.push(Q[F+1])}x.customEnvelopeWarp.v.meshPoints.v.arr=[d.fr.vI("Hrzn",c),d.fr.vI("Vrtc",$)]};
d.fr.ai4=function(x){var Q=[],c=x.customEnvelopeWarp.v.meshPoints.v.arr,$=c[0].arr,z=c[1].arr;for(var F=0;
F<$.length;F++)Q.push($[F],z[F]);return Q};d.fr.ES=function(x,Q){var c,$=x.warpStyle.v.warpStyle;if($=="warpCustom")c=[x.deformNumCols.v,x.deformNumRows.v,d.fr.aqS(x),d.fr.ai4(x)];
else{if(Q==null)Q=d.fr.Pe(x);if(Q._6())Q.m=Q.e=1;if($=="warpCylinder"){var z=X.Y.e3(x.warpValues);c=d.fr.fr($,z)}else{var j="warpPerspective";
c=d.fr.fr($,x.warpValue.v/100,x.warpRotate.v.Ornt=="Hrzn",x[j].v/100,x[j+"Other"].v/100,Q.m/Q.e)}d.fr.agb(c[3],Q)}return c};
d.fr.agb=function(x,Q){for(var F=0;F<x.length;F+=2){x[F]=Q.x+x[F]*Q.m;x[F+1]=Q.y+x[F+1]*Q.e}};d.fr.aC$=function(x){var Q=Math.sin(x*Math.PI/2),c=Math.pow(x,1/3.5),$=(1-x)*Q+x*c;
$=Math.pow($,1.045);var z=.1725+.0573*$,j=1-(.96*Q+.04*c);j=Math.pow(j,1.27);var U=1/129+(.167684-1/129)*j;
return[z,U]};d.fr.TE=function(x,Q){x.warpStyle.v.warpStyle="warpCustom";x.deformNumCols.v=Q[0];x.deformNumRows.v=Q[1];
var c="customEnvelopeWarp";if(x[c]==null)x[c]={t:"Objc",v:{classID:"customEnvelopeWarp",meshPoints:{t:"ObAr",v:{classID:"rationalPoint",arr:[]}}}};
d.fr.asQ(x,Q[2]);d.fr.aos(x,Q[3])};d.fr.Pe=function(x){var Q=x.bounds.v,c=Q.Left.v.val,$=Q.Rght.v.val,z=Q.Top.v.val,j=Q.Btom.v.val;
if(c==null){c=Q.Left.v,$=Q.Rght.v;z=Q.Top.v,j=Q.Btom.v}return new gh(c,z,$-c,j-z)};d.fr.fr=function(x,Q,c,$,z,j){if(x=="warpCylinder"){var U=Q,i=U[0],b=U[1],e=U[2],k=U[3],K=U[4],g=U[5],R=U[6],T=[];
for(var D=0;D<4;D++)for(var a=0;a<13;a++)T.push(a/12,D/3);var _=e-i,I=b-k,f=K*.5*(_/I),y=g*.5*(_/I),Z=d.fr.aC$(R),v=[0,0,0,0,0,Z[0],.5],G=[0,0,0,0,f*.42,f,f],q=[0,0,0,0,y*.42,y,y];
for(var D=0;D<4;D++)for(var a=0;a<7;a++){var F=D*13+a;T[F*2]=v[a];var h=G[a],r=1+q[a],H=D/3;T[F*2+1]=h*(1-H)+r*H}for(var D=0;
D<4;D++)for(var a=0;a<6;a++){var F=D*13+a,o=D*13+12-a;T[o*2]=1-T[F*2];T[o*2+1]=T[F*2+1]}var H=Z[1];return[13,4,[[0,H,.5,1-H,1],[0,1]],T]}var P=d.uE.R(0,0,1,1);
if(x!="warpNone"){if(!c)j=1/j;d.fr.aoV(P,x,Q,$,z,j);var O=P.slice(0);if(!c)for(var D=0;D<4;D++)for(var a=0;
a<4;a++){P[(D*4+a)*2]=O[(a*4+D)*2+1];P[(D*4+a)*2+1]=O[(a*4+D)*2]}if(Q==0)d.fr.as7(P,$,z);else{var p=new bI;
p.translate(-.5,-.5);d.A.i(P,p,P);d.fr.aA1(P,z,$);p.HQ();d.A.i(P,p,P)}}return[4,4,[[0,1],[0,1]],P]};
d.fr.aoV=function(x,Q,c,$,z,j){var U=new gh(0,0,j,1);for(var F=0;F<x.length;F+=2)x[F]*=j;for(var F=0;
F<4;F++){for(var i=0;i<4;i++){var b=2*(4*F+i),e=x[b]-U.x,k=x[b+1]-U.y,K=e,g=k;if(c!=0){var R=U.m/2,T=U.e/2;
K-=R;g-=T;var D=K,a=K,_=-T,I=T,f=Math.abs(c),y=Math.tan((1-f)*Math.PI/2),Z=Math.sqrt(y*y+1),v=Math.atan2(1,y),G=K/R*v,q=R*Z,h=R*Z+U.e,r=Math.cos(v),H=Math.sin(v),o=d.fr.aub(r,H),P=d.fr.a3$(r,H),O=-y*R+o*q;
if(Q=="warpArc"){D=Math.sin(G)*h;_=y*R-Math.cos(v)*h+T;a=Math.sin(G)*q;I=y*R-Math.cos(v)*q+T;if(i==1||i==2){D=i==1?-P*h:P*h;
a=i==1?-P*q:P*q;_=y*R+T-o*h;I=y*R+T-o*q}if(c<0){var p=D;D=a;a=p;p=_;_=-I;I=-p}}if(Q=="warpArcLower"){if(i==1||i==2){a=i==1?-P*q:P*q;
I=c<0?T-O:T+O}}if(Q=="warpArcUpper"||Q=="warpArch"||Q=="warpBulge"){if(i==1||i==2){D=i==1?-P*q:P*q;_=c<0?-T+O:-T-O}if(Q=="warpArch"){a=D;
I=_+2*T}if(Q=="warpBulge"){a=D;I=-_}}if(Q=="warpFish"||Q=="warpFlag"||Q=="warpWave"){var C=i;if(Q=="warpFlag")C=3-i;
if(C==1){_-=c*4*T;I+=c*4*T}if(C==2){_+=c*4*T;I-=c*4*T}if(Q=="warpFlag"||Q=="warpWave")_=I-2*T}if(Q=="warpRise"){if(i<2)_=-T+c*T*4;
I=_+2*T}var W=(g+T)/U.e;K=D+W*(a-D);g=_+W*(I-_);if(Q=="warpWave"){if(F==0)g=-T;if(F==3)g=T;if(F==1||F==2)g=2*T*(F/3-.5)*(1/3)+g*(2/3)}if(Q=="warpFisheye"){if((F==1||F==2)&&(i==1||i==2)){K=K+4*K*c;
g=g+4*g*c}}if(Q=="warpInflate"){var J=2/3;if((F==1||F==2)&&(i==1||i==2)){K=K+.5*K*c;g=g+.5*g*c}else if(F==1||F==2)K=K+J*K*c;
else if(i==1||i==2)g=g+J*g*c}if(Q=="warpSqueeze"){var J=2/3;if((F==1||F==2)&&(i==1||i==2)){if(c>0)K=K-J*K*c;
else g=g+J*g*c}else if(F==1||F==2)K=K-J*K*c;else if(i==1||i==2)g=g+J*g*c}if(Q=="warpTwist"){if((F==1||F==2)&&(i==1||i==2)){var t=c*Math.PI/2,Z=1+Math.abs(c)*2,Y=K*Math.cos(t)-g*Math.sin(t),l=K*Math.sin(t)+g*Math.cos(t);
K=Y*Z;g=l*Z}}if(Q=="warpShellLower"||Q=="warpShellUpper"){if(Q=="warpShellUpper"){F=3-F;g=-g}if(F>2||F==2&&(i==0||i==3)){if(c>0){var m=q+F/3*2*T;
K=Math.sin(G)*m;g=-y*R-T+Math.cos(G)*m;if(i==1||i==2){K=i==1?-P*m:P*m;g=-y*R-T+o*m}}else{if((i==1||i==2)&&F==3){K=i==1?-P*q:P*q;
g=y*R-o*q+T}else if(F==2){g=T-T*(2/3)*Math.cos(G);K=K+T*(2/3)*Math.sin(G)}}}if(Q=="warpShellUpper"){F=3-F;
g=-g}}K+=R;g+=T}e=K,k=g;x[b]=e+U.x;x[b+1]=k+U.y}}for(var F=0;F<x.length;F+=2)x[F]/=j};d.fr.aA1=function(x,Q,c){var $=[];
for(var z=0;z<4;z++)$.push(1-c+z/3*2*c);var j=[];for(var z=0;z<4;z++)j.push(1-Q+z/3*2*Q);var U=[0,0,0,0],i=[0,0,0,0];
for(var F=0;F<4;F++)for(var z=0;z<4;z++){var b=2*(4*F+z),e=x[b],k=x[b+1];U[z]+=e/4;i[z]+=k/4}for(var F=0;
F<4;F++)for(var z=0;z<4;z++){var K=$[z],b=2*(4*F+z),e=x[b],k=x[b+1],g=U[z],R=i[z];x[b]=g+K*(e-g);x[b+1]=R+K*(k-R)}var T=x.slice(0);
for(var F=0;F<4;F++)for(var z=1;z<3;z++){var b=2*(4*F+z),e=x[b],k=x[b+1],D=b+(z==1?-2:2),a=x[D],_=x[D+1];
x[b]=e-a;x[b+1]=k-_}var I=x[0],f=x[1],y=x[8],Z=x[9],v=x[16],G=x[17],q=x[24],h=x[25],r=x[6],H=x[7],o=x[14],P=x[15],O=x[22],p=x[23],C=x[30],W=x[31],J=r-I,t=H-f,Y=o-y,l=P-Z,m=O-v,B=p-G,L=C-q,A=W-h;
for(var F=0;F<4;F++){var S=2*F*4,M=0,N=0,s=F==1?.33:.66,V=1-s;if(F==0){M=J;N=t}if(F==1){M=V*J+s*-L;N=V*t+s*-A}if(F==2){M=V*J+s*-L;
N=V*t+s*-A}if(F==3){M=-L;N=-A}x[S]=x[S]+M/2;x[S+1]=x[S+1]+N/2;x[S+6]=x[S+6]-M/2;x[S+7]=x[S+7]-N/2}for(var F=0;
F<4;F++)for(var z=1;z<3;z++){var b=2*(4*F+z),e=x[b],k=x[b+1],D=b+(z==1?-2:2),a=x[D],_=x[D+1],K=2*F/3;
x[b]=a+K*e;x[b+1]=_+K*k}for(var F=1;F<3;F++)for(var z=1;z<3;z++){var b=2*(4*F+z),e=x[b],k=x[b+1],g8=F==1?-8:-16,n=F==1?16:8,cQ=x[b+g8],hk=x[b+g8+1],eG=x[b+n],ie=x[b+n+1],K=F/3;
e=(1-K)*cQ+K*eG;k=(1-K)*hk+K*ie;x[b]=e;x[b+1]=k}d.A.dW(T,x,x,Q)};d.fr.aub=function(x,Q){return(4-x)*(1/3)};
d.fr.a3$=function(x,Q){return(1-x)*(3-x)/(3*Q)};d.Ws={};d.Ws.abp=function(x,Q,c,$,z,j,U,i,b,e){for(var k=0;
k<i;k++)for(var K=0;K<U;K++){var g=3*(k*U+K),R=k+j,T=K+z,D=x[R*Q+T];$[g]=D;$[g+1]=D;$[g+2]=D}};d.Ws.KL=function(x,Q,c,$,z,j,U,i,b,e){var k=[0,1,1/2,1/3,1/4,1/5,1/6,1/7,1/8,1/9],K=1/b,g=[-1,-1,0,-1,1,-1,-1,0,1,0,-1,1,0,1,1,1],R=new Uint32Array(6);
for(var T=0;T<i;T++){for(var D=0;D<U;D++){var a=3*(T*U+D),_=T+j,I=D+z;R[0]=0;R[1]=0;R[2]=0;R[3]=0;R[4]=0;
R[5]=0;for(var F=0;F<16;F+=2){var f=I+g[F],y=_+g[F+1],Z=f-b*~~(f*K),v=y-b*~~(y*K),G=e[v*b+Z];R[G]+=x[y*Q+f];
R[G+3]++}var f=I,y=_,Z=f-b*~~(f*K),v=y-b*~~(y*K),G=e[v*b+Z];R[G]=x[_*Q+I];R[G+3]=1;$[a]=R[0]*k[R[3]];
$[a+1]=R[1]*k[R[4]];$[a+2]=R[2]*k[R[5]]}}};d.Ws.axy=function(x,Q,c){for(var F=0;F<c;F+=2)x[Q+F]=x[Q+F+1];
Q=Q+c;for(var F=0;F<c;F+=2)x[Q+F+1]=x[Q+F]};d.Ws.acG=function(x,Q,c,$){for(var F=0;F<$;F+=2){var z=Q+F*c;
x[z]=x[z+c];x[z+c+1]=x[z+1]}};d.Ws.azK=function(x,Q,c,$,z,j){var U=$[z],i=$[z+1],b=$[j],e=$[j+1],k=i+b>>>1;
x[Q]=x[Q+3]=x[c]=x[c+3]=U;x[Q+1]=k;x[Q+4]=i;x[c+1]=b;x[c+4]=k;x[Q+2]=x[Q+5]=x[c+2]=x[c+5]=e};d.Ws.ass=function(x,Q,c,$,z,j){var U=j*3;
for(var F=0;F<j;F+=2){var i=Q+F,b=z+F*3;d.Ws.azK($,b,b+U,x,i,i+c)}};d.Ws.aDC=function(x,Q,c,$,z,j,U){var i=j*3;
for(var F=0;F<U;F+=2){var b=Q+F*c,e=z+F*j*3;d.Ws.azK($,e,e+i,x,b,b+c)}};d.Ws.a8m=function(x,F,Q){var c=x[F-Q-Q],$=x[F-Q],z=x[F-2],j=x[F-1],U=x[F],i=x[F+1],b=x[F+2],e=x[F+Q],k=x[F+Q+Q],K=Math.abs($-e),g=Math.abs(j-i),R=Math.abs(U-c)*2+K,T=Math.abs(U-b)*2+g,D=Math.abs(U-z)*2+g,a=Math.abs(U-k)*2+K,_=Math.min(R,Math.min(T,Math.min(D,a)));
if(_==R)return $*3+e+U-c>>2;if(_==T)return i*3+j+U-b>>2;if(_==D)return j*3+i+U-z>>2;return e*3+$+U-k>>2};
d.Ws.sH=function(x,Q,c,$,z){if(x<Q&&Q<c||x>Q&&Q>c)return~~(.5+$+(z-$)*(Q-x)/(c-x));else return($+z>>1)+(Q+Q-x-c>>2)};
d.Ws.a5y=function(x,Q,F,c){var $=Q[F-c-1],z=Q[F-c+1],j=Q[F],U=Q[F+c-1],i=Q[F+c+1],b=x[F-c-1],e=x[F-c+1],k=x[F],K=x[F+c-1],g=x[F+c+1],R=Math.abs(e-K)+Math.abs(x[F-c-c+2]-k)+Math.abs(k-x[F+c+c-2])+Math.abs(z-j)+Math.abs(j-U),T=Math.abs(b-g)+Math.abs(x[F-c-c-2]-k)+Math.abs(k-x[F+c+c+2])+Math.abs($-j)+Math.abs(j-i);
if(R<T)return d.Ws.sH(z,j,U,e,K);else return d.Ws.sH($,j,i,b,g)};d.Ws.LU=function(x,Q,c,$,z,j){x[Q+0]=c[z];
x[Q+1]=$[z];x[Q+2]=d.Ws.a5y(c,$,z,j)};d.Ws.yG=function(x,Q,c,$,z,j){var U=$[z];x[Q+0]=d.Ws.sH($[z-1],U,$[z+1],c[z-1],c[z+1]);
x[Q+1]=U;x[Q+2]=d.Ws.sH($[z-j],U,$[z+j],c[z-j],c[z+j])};d.Ws.$Y=function(x,Q,c,$,z,j){var U=$[z];x[Q+0]=d.Ws.sH($[z-j],U,$[z+j],c[z-j],c[z+j]);
x[Q+1]=U;x[Q+2]=d.Ws.sH($[z-1],U,$[z+1],c[z-1],c[z+1])};d.Ws.jg=function(x,Q,c,$,z,j){x[Q+0]=d.Ws.a5y(c,$,z,j);
x[Q+1]=$[z];x[Q+2]=c[z]};d.Ws.a3c=function(x,Q,c,$,z,j,U,i,b){var e=Date.now(),k=2,K=Q-2,g=2;if((z&1)==1){k++;
K--}var R=c-2;if((j&1)==1){g++;R--}if(b==1||b==3){k++;K--}var T=x.slice(0);d.Ws.axy(T,0,Q);d.Ws.acG(T,0,Q,c);
d.Ws.acG(T,Q-2,Q,c);d.Ws.axy(T,(c-2)*Q,Q);for(var D=g;D<R;D+=2)for(var a=k;a<K;a+=2){var F=D*Q+a,_=d.Ws.a8m(T,F,Q),I=d.Ws.a8m(T,F+Q+1,Q);
T[F]=Math.max(0,_);T[F+Q+1]=Math.max(0,I)}var f=U,y=i;if(j+i==c){y-=2;d.Ws.ass(x,(c-2)*Q+z,Q,$,(i-2)*U*3,U)}if(z+U==Q){f-=2;
d.Ws.aDC(x,j*Q+z+U-2,Q,$,(U-2)*3,U,i)}if(b==0)for(var D=0;D<y;D+=2)for(var a=0;a<f;a+=2){var Z=(D+j)*Q+a+z,v=(D*U+a)*3;
d.Ws.LU($,v,x,T,Z,Q);d.Ws.yG($,v+3,x,T,Z+1,Q);Z+=Q;v+=3*U;d.Ws.$Y($,v,x,T,Z,Q);d.Ws.jg($,v+3,x,T,Z+1,Q)}else if(b==1)for(var D=0;
D<y;D+=2)for(var a=0;a<f;a+=2){var Z=(D+j)*Q+a+z,v=(D*U+a)*3;d.Ws.yG($,v,x,T,Z,Q);d.Ws.LU($,v+3,x,T,Z+1,Q);
Z+=Q;v+=3*U;d.Ws.jg($,v,x,T,Z,Q);d.Ws.$Y($,v+3,x,T,Z+1,Q)}else if(b==2)for(var D=0;D<y;D+=2)for(var a=0;
a<f;a+=2){var Z=(D+j)*Q+a+z,v=(D*U+a)*3;d.Ws.jg($,v,x,T,Z,Q);d.Ws.$Y($,v+3,x,T,Z+1,Q);Z+=Q;v+=3*U;d.Ws.yG($,v,x,T,Z,Q);
d.Ws.LU($,v+3,x,T,Z+1,Q)}else if(b==3)for(var D=0;D<y;D+=2)for(var a=0;a<f;a+=2){var Z=(D+j)*Q+a+z,v=(D*U+a)*3;
d.Ws.$Y($,v,x,T,Z,Q);d.Ws.jg($,v+3,x,T,Z+1,Q);Z+=Q;v+=3*U;d.Ws.LU($,v,x,T,Z,Q);d.Ws.yG($,v+3,x,T,Z+1,Q)}};
d.raw={};d.raw.al0=function(x){var Q=Date.now(),c=x.width,$=x.height,z=0,j=0,U=c,i=$;if(x.t50829){var b=x.t50829;
z=b[1];j=b[0];U=b[3];i=b[2]}if(x.t50720&&x.t50720[0]*1.2>c){if(x.t50719){var e=x.t50719;z+=e[0]>>1<<1;
j+=e[1]>>1<<1}if(x.t50720){var k=x.t50720;U=z+k[0];i=j+k[1]}}var K=U-z,g=i-j,R=d.raw.a4U(x),T=x.t33422,D=x.t33421;
if(D){var k=D[0],a=T.slice(0);for(var _=0;_<k;_++)for(var I=0;I<k;I++){var f=(I+(z&1))%k,y=(_+(j&1))%k;
a[_*k+I]=T[y*k+f]}T=a}if(x.t277[0]==1&&T)d.raw.app(R,c,$,x,T);d.raw.o$(2,x,R,c,$);var Z=new Float32Array(K*g*3);
if(x.t277[0]==1){if(D==null){d.Ws.abp(R,c,$,Z,z,j,K,g)}else if(D.length!=2||D[0]!=2||D[1]!=2){console.log("Unknown CFA pattern size",D);
d.Ws.KL(R,c,$,Z,z,j,K,g,D[0],T)}else{var v=x.t33422.join(","),G=0;if(v=="0,1,1,2")G=0;else if(v=="1,0,2,1")G=1;
else if(v=="2,1,1,0")G=2;else if(v=="1,2,0,1")G=3;else throw"Unknown CFA pattern "+v;if((K&1)!=0||(g&1)!=0)throw"e";
d.Ws.a3c(R,c,$,Z,z,j,K,g,G)}}else{for(var _=0;_<g;_++)for(var I=0;I<K;I++){var q=((_+j)*c+I+z)*3,h=(_*K+I)*3;
Z[h+0]=R[q+0];Z[h+1]=R[q+1];Z[h+2]=R[q+2]}}var r=Z,H=Z.length,o=d.raw.jU(x),P=1/o;for(var F=0;F<H;F+=3){Z[F]=r[F]*P;
Z[F+1]=r[F+1]*P;Z[F+2]=r[F+2]*P}d.raw.o$(3,x,Z,K,g);var O=x.Lj,p=K,C=g;if(O==1||O==9){}else{var W=d.raw.a0O(O,K,g),h=0;
p=W[0];C=W[1];var J=Z.slice(0);for(var _=0;_<C;_++)for(var I=0;I<p;I++){var t=W[2]*I+W[3]*_+W[4],Y=W[5]*I+W[6]*_+W[7],q=(Y*K+t)*3;
Z[h]=J[q];Z[h+1]=J[q+1];Z[h+2]=J[q+2];h+=3}}return{AX:Z,ni:p,UL:C}};d.raw.a0O=function(x,Q,c){var $=Q,z=c;
if(!1){}else if(x==2)return[Q,c,-1,0,Q-1,0,1,0];else if(x==3)return[Q,c,-1,0,Q-1,0,-1,c-1];else if(x==4)return[Q,c,1,0,0,0,-1,c-1];
else if(x==5)return[c,Q,0,1,0,1,0,0];else if(x==6)return[c,Q,0,1,0,-1,0,c-1];else if(x==7)return[c,Q,0,-1,Q-1,-1,0,c-1];
else if(x==8)return[c,Q,0,-1,Q-1,1,0,0];else throw"unknown orientation "+x};d.raw.app=function(x,Q,c,$,z){var j=Date.now(),P=0,C=0;
if(d.raw.jU($)>4e4){for(var F=0;F<x.length;F++)x[F]>>=1;var U=["t50714","t50715","t50712","t50717"];
for(var F=0;F<U.length;F++){var i=$[U[F]];if(i)for(var b=0;b<i.length;b++)i[b]>>>=1}console.log("remapping to lower bit depth")}var e=~~Math.sqrt(z.length),k=[-1,-1,0,-1,0,1,-1,0,0,0,1,0,-1,1,0,1,1,1],K=[];
for(var g=0;g<e;g++)for(var R=0;R<e;R++){var F=g*e+R,T=z[F],D=4,a=4,_=8,I=0,f=0;for(var b=0;b<18;b+=2){var y=(e+R+k[b])%e,Z=(e+g+k[b+1])%e,v=z[Z*e+y];
if(v==T){}else if(D==4){D=v;I=b}else if(a==4&&v!=D){a=v;f=b;break}}if(a<D){var G=a;a=D;D=G;G=f;f=I;I=G}if(D<T){var G=D;
D=T;T=G;G=I;I=_;_=G}if(a<D){var G=a;a=D;D=G;G=f;f=I;I=G}K[F*3]=k[_+1]*Q+k[_];K[F*3+1]=k[I+1]*Q+k[I];
K[F*3+2]=k[f+1]*Q+k[f]}var q=~~(.996*d.raw.jU($)),h=~~(.992*d.raw.jU($)),r=$.t50728;if(r==null||r[0]==0)r=[1,1,1];
var H=[],o=[0,0,0];for(var g=1;g<c-1;g++)for(var R=1;R<Q-1;R++){var F=g*Q+R,O=g%e*e+R%e,T=x[F+K[O*3+0]],D=x[F+K[O*3+1]],a=x[F+K[O*3+2]],p=Math.max(T,D,a);
if(p>q)H.push(F);else if(p>h){o[0]+=T;o[1]+=D;o[2]+=a;P++}}if(H.length==0)return;if(P/(Q*c)<1e-5){console.log("not enough semi-saturated pixels",P);
o=r}if(o[1]<o[C])C=1;if(o[2]<o[C])C=2;var W=[o[0]/o[C],o[1]/o[C],o[2]/o[C]],J=x.slice(0);for(var t=0;
t<H.length;t++){var F=H[t],g=~~(F/Q),R=F-g*Q,O=g%e*e+R%e,Y=Math.min(65535,~~(x[F+K[O*3+C]]*W[z[O]]));
if(Y>J[F])J[F]=Y}x.set(J)};d.raw.Zd=function(x,Q,c,$){var z=Math.round(x.length/3),j=f5.s1($[0],$[1]),U=d.raw.adJ(c,j),i=d.gg.multiply(d.gg.PV,U),b=Math.pow(2,c.t50730?c.t50730[0]:0);
i=d.gg.multiply(i,d.gg.G6(b,b,b));var e=d.raw.Zd.atv;if(e==null){e=d.raw.Zd.atv=new Float64Array(8e3);
for(var F=0;F<8e3;F++)e[F]=d.Yw(F*(1/1e3))}for(var F=0;F<z;F++){var k=F<<2,K=k-F,g=x[K],R=x[K+1],T=x[K+2],D=i[0]*g+i[1]*R+i[2]*T,a=i[4]*g+i[5]*R+i[6]*T,_=i[8]*g+i[9]*R+i[10]*T;
if(D<0)D=0;if(a<0)a=0;if(_<0)_=0;Q[K]=e[~~(D*1e3)];Q[K+1]=e[~~(a*1e3)];Q[K+2]=e[~~(_*1e3)]}};d.raw.a4U=function(x){var Q=x.width,c=x.height,$=Q*c*x.t277,z=new Uint16Array($),j=null,U=0;
d.raw.avB(x,z);d.raw.o$(1,x,z,Q,c);if(x.t50712){j=x.t50712;U=j.length-1;if(j[U]>65535)throw"too big values"}var i=d.raw.a2P(x),b=d.raw.arM(x);
if(j==null)for(var F=0;F<$;F++)z[F]=Math.max(0,z[F]-i);else for(var F=0;F<$;F++){var e=z[F];if(e>U)e=U;
e=j[e];z[F]=Math.max(0,e-i)}return z};d.raw.a2P=function(x){var Q=x.t50714,c=Q?Q[0]:0,$=x.t50715,z=x.t50716;
if($)c+=$[0][0]/$[0][1];if(z)c+=z[0][0]/z[0][1];return Math.round(c)};d.raw.arM=function(x){var Q=null,c=0;
if(x.t50712){Q=x.t50712;c=Q.length-1}var $=x.t50717?x.t50717[0]:(1<<x.t258[0])-1;if(Q)$=Math.min($,Q[c]);
return $};d.raw.jU=function(x){var Q=d.raw.a2P(x),c=d.raw.arM(x);return c-Q};d.raw.avB=function(x,Q){var c=Q.length,$=x.data,z=x.t258[0];
if(z!=16&&z!=14&&z!=12&&z!=10&&z!=8)throw"Unsupported Bits Per Sample:"+z;z=Math.round($.length*8/c);
if(z==16&&x.isLE){d.SO($,Q);return}for(var F=0;F<c;F+=2){var j=0,U=0,i=0;if(z==16){j=F<<1;U=$[j]<<8|$[j+1];
i=$[j+2]<<8|$[j+3]}else if(z==14){var b=F*14,e=b>>>3,k=$[e]<<24|$[e+1]<<16|$[e+2]<<8|$[e+3];if((b&7)==0){U=k>>>18;
i=k>>>4&16383}else{U=k>>>14&16383;i=k&16383}}else if(z==12){j=F+(F>>>1);U=$[j]<<4|$[j+1]>>4;i=($[j+1]&15)<<8|$[j+2]}else if(z==10){var b=F*10,e=b>>>3;
if((b&7)==0){U=($[e]<<2|$[e+1]>>6)&1023;i=($[e+1]<<4|$[e+2]>>4)&1023}else{U=($[e]<<6|$[e+1]>>2)&1023;
i=($[e+1]<<8|$[e+2]>>0)&1023}}else if(z==8){j=F;U=$[j];i=$[j+1]}Q[F]=U;Q[F+1]=i}};d.raw.ab0=function(x,Q,c,$,z,j,U){var i=x-.499999,b=Q-.499999,e=~~i,k=~~b,K=i-e,g=b-k,R=(1-g)*(1-K),T=(1-g)*K,D=g*(1-K),a=g*K,_=(k*$+e)*3,I=((k+1)*$+e)*3,f=R*c[_]+T*c[_+3]+D*c[I]+a*c[I+3],y=R*c[_+1]+T*c[_+4]+D*c[I+1]+a*c[I+4],Z=R*c[_+2]+T*c[_+5]+D*c[I+2]+a*c[I+5];
j[U]=f;j[U+1]=y;j[U+2]=Z};d.raw.o$=function(x,Q,c,$,z){var j=Q["t"+[51008,51009,51022][x-1]],k=0;if(j==null)return;
var U=$*z,i=w.q,b=w.rY,e=new Uint8Array(j),au=w.q(e,k);k+=4;for(var K=0;K<au;K++){var g=i(e,k);k+=4;
var R=i(e,k);k+=4;var T=i(e,k);k+=4;var D=i(e,k);k+=4;if(!1){}else if(g==1&&x==3){var a=k,_=i(e,a);a+=4;
var I=b(e,a);a+=8;var f=b(e,a);a+=8;var y=b(e,a);a+=8;var Z=b(e,a);a+=8;var v=b(e,a);a+=8;var G=b(e,a);
a+=8;a+=(_-1)*8*6;var q=b(e,a);a+=8;var h=b(e,a);a+=8;var r=q*$,H=h*z,o=Math.max(r,$-r),P=Math.max(H,z-H),O=Math.sqrt(o*o+P*P),p=1/O,C=c.slice(0);
for(var W=0;W<z;W++)for(var J=0;J<$;J++){var t=(J+.5-r)*p,Y=(W+.5-H)*p,l=t*t+Y*Y,m=I+f*l+y*(l*l)+Z*(l*l)*l,B=v*(2*t*Y)+G*(l+2*t*t),L=G*(2*t*Y)+v*(l+2*Y*Y),A=Math.min(r+O*(m*t+B),$-1),S=Math.min(H+O*(m*Y+L),z-1),M=(W*$+J)*3;
d.raw.ab0(A,S,C,$,z,c,M)}}else if(g==3&&x==3){var a=k,N=b(e,a);a+=8;var s=b(e,a);a+=8;var V=b(e,a);a+=8;
var g8=b(e,a);a+=8;var n=b(e,a);a+=8;var q=b(e,a);a+=8;var h=b(e,a);a+=8;var r=q*$,H=h*z,o=Math.max(r,$-r),P=Math.max(H,z-H),O=Math.sqrt(o*o+P*P),p=1/O;
for(var W=0;W<z;W++)for(var J=0;J<$;J++){var t=(J+.5-r)*p,Y=(W+.5-H)*p,l=t*t+Y*Y,cQ=1+(N+(s+(V+(g8+n*l)*l)*l)*l)*l,M=(W*$+J)*3;
c[M]=cQ*c[M];c[M+1]=cQ*c[M+1];c[M+2]=cQ*c[M+2]}}else if(g==4&&x==1){var a=k,hk=i(e,a);a+=4;var eG=i(e,a);
a+=4;for(var F=0;F<U;F++)if(c[F]==hk)c[F]=c[F-2]+c[F+2]>>1}else if(g==5&&x==1){var a=k,ie=i(e,a);a+=4;
var eN=i(e,a);a+=4;var gr=i(e,a);a+=4;for(var F=0;F<eN;F++){var ek=i(e,a);a+=4;var jK=i(e,a);a+=4;var F=ek*$+jK;
c[F]=c[F-2]+c[F+2]>>1}}else if(g==7&&x==1){var a=k,iE=w.Ky(e,a);a+=16;var e9=i(e,a);a+=4;var dm=i(e,a);
a+=4;var kD=i(e,a),gJ=i(e,a+4);a+=8;var dR=i(e,a);a+=4;var fO=new Uint16Array(dR);for(var F=0;F<dR;F++)fO[F]=w._C(e,a+2*F);
var ko=iE.m,d8=iE.e;for(var W=0;W<d8;W+=kD)for(var J=0;J<ko;J+=gJ){var F=(iE.y+W)*$+(iE.x+J);c[F]=fO[c[F]]}}else if(g==8&&x==2){var a=k,iE=w.Ky(e,a);
a+=16;var e9=i(e,a);a+=4;var dm=i(e,a);a+=4;var kD=i(e,a),gJ=i(e,a+4);a+=8;var fj=i(e,a);a+=4;var ja=[];
for(var F=0;F<=fj;F++)ja[F]=w.rY(e,a+F*8);var eD=iE.x,d3=iE.x+iE.m,fP=iE.y,jE=iE.y+iE.e,cR=Q.t50717[0],ex=1/cR;
for(var er=0;er<dm;er++)for(var W=fP;W<jE;W+=kD){var M=3*W*$+e9+er;for(var J=eD;J<d3;J+=gJ){var F=M+3*J,cE=c[F]*ex,a7=ja[fj];
for(var dl=fj;dl>0;dl--)a7=a7*cE+ja[dl-1];c[F]=Math.max(0,Math.min(65535,~~(a7*cR)))}}}else if(g==9&&x==2){var a=k,iE=w.Ky(e,a),jL=!0;
a+=16;var e9=i(e,a);a+=4;var dm=i(e,a);a+=4;var kD=i(e,a),gJ=i(e,a+4);a+=8;var hl=i(e,a),f4=i(e,a+4);
a+=8;var em=b(e,a),e$=b(e,a+8);a+=16;var iP=b(e,a),b2=b(e,a+8);a+=16;var k7=i(e,a);a+=4;if(k7!=1)throw"more than one map plane";
var at=hl*f4,ju=new Float32Array(at);for(var dl=0;dl<at;dl++)ju[dl]=w.lw(e,a+dl*4);for(var dl=0;dl<at;
dl++)if(ju[dl]!=1)jL=!1;if(!jL){var ko=iE.m,d8=iE.e,fJ=.9999*(f4-1)/ko,h6=.9999*(hl-1)/d8;for(var W=0;
W<d8;W+=kD)for(var J=0;J<ko;J+=gJ){var F=(iE.y+W)*$+(iE.x+J),iq=J*fJ,iI=W*h6,dM=Math.floor(iq),ik=Math.floor(iI),jp=iq-dM,eA=iI-ik,M=ik*f4+dM,k8=ju[M]*(1-jp)+ju[M+1]*jp,ay=ju[M+f4]*(1-jp)+ju[M+1+f4]*jp,bK=k8*(1-eA)+ay*eA;
c[F]=Math.max(0,Math.min(65535,~~(c[F]*bK+.5)))}}}else console.log("Unknown opcode "+g+" in OpcodeList"+x+". Length: "+D);
k+=D}};d.raw.adJ=function(x,Q){var c=f5.yB(Q),$=d.raw.asj(x,Q),z=d.gg.HQ($),j=f5.arS(c,f5.yB(f5.auu)),U=d.gg.multiply(j,z);
return U};d.raw.apR=function(x){var Q=x.t50728,z=1;if(Q==null||Q[0]==0)Q=[1,1,1];var c=Q.slice(0);c.push(0);
var $={x:.34567,y:.3585};do{var j=d.gg.HQ(d.raw.asj(x,$)),U=d.gg.V3(j,c),i=f5.alb(U);z=Math.abs($.x-i.x)+Math.abs($.y-i.y);
$=i}while(z>1e-7);return $};d.raw.asj=function(x,Q){var c=f5.a5c(Q),$=d.raw.afz,z=x.t50778?x.t50778[0]:0,j=x.t50779?x.t50779[0]:0,U=x.t50723,i=x.t50724;
if(U&&U.length==3)U=null;if(i&&i.length==3)i=null;var b=$(x.t50721,x.t50722,z,j,c.Ud),e=$(U,i,z,j,c.Ud);
b=b||[1,0,0,0,1,0,0,0,1];e=e||[1,0,0,0,1,0,0,0,1];var k=x.t50727?[x.t50727[0],0,0,0,x.t50727[1],0,0,0,x.t50727[2]]:[1,0,0,0,1,0,0,0,1];
return d.gg.multiply(d.gg.V6(k),d.gg.multiply(d.gg.V6(e),d.gg.V6(b)))};d.raw.afz=function(x,Q,c,$,z){if(!x&&!Q){return null}else if(x&&!Q){return x}else if(z<c){return x}else if(z>$){return Q}else{var j=(1/z-1/$)/(1/c-1/$),U=1-j,i=[];
for(var F=0;F<9;F++)i[F]=x[F]*j+Q[F]*U;return i}};var f5={};f5.auu={x:.34567,y:.3585};f5.aCR=[{Z:0,mC:.18006,_B:.26352,z_:-.24341},{Z:10,mC:.18066,_B:.26589,z_:-.25479},{Z:20,mC:.18133,_B:.26846,z_:-.26876},{Z:30,mC:.18208,_B:.27119,z_:-.28539},{Z:40,mC:.18293,_B:.27407,z_:-.3047},{Z:50,mC:.18388,_B:.27709,z_:-.32675},{Z:60,mC:.18494,_B:.28021,z_:-.35156},{Z:70,mC:.18611,_B:.28342,z_:-.37915},{Z:80,mC:.1874,_B:.28668,z_:-.40955},{Z:90,mC:.1888,_B:.28997,z_:-.44278},{Z:100,mC:.19032,_B:.29326,z_:-.47888},{Z:125,mC:.19462,_B:.30141,z_:-.58204},{Z:150,mC:.19962,_B:.30921,z_:-.70471},{Z:175,mC:.20525,_B:.31647,z_:-.84901},{Z:200,mC:.21142,_B:.32312,z_:-1.0182},{Z:225,mC:.21807,_B:.32909,z_:-1.2168},{Z:250,mC:.22511,_B:.33439,z_:-1.4512},{Z:275,mC:.23247,_B:.33904,z_:-1.7298},{Z:300,mC:.2401,_B:.34308,z_:-2.0637},{Z:325,mC:.24792,_B:.34655,z_:-2.4681},{Z:350,mC:.25591,_B:.34951,z_:-2.9641},{Z:375,mC:.264,_B:.352,z_:-3.5814},{Z:400,mC:.27218,_B:.35407,z_:-4.3633},{Z:425,mC:.28039,_B:.35577,z_:-5.3762},{Z:450,mC:.28863,_B:.35714,z_:-6.7262},{Z:475,mC:.29685,_B:.35823,z_:-8.5955},{Z:500,mC:.30505,_B:.35907,z_:-11.324},{Z:525,mC:.3132,_B:.35968,z_:-15.628},{Z:550,mC:.32129,_B:.36011,z_:-23.325},{Z:575,mC:.32931,_B:.36038,z_:-40.77},{Z:600,mC:.33724,_B:.36051,z_:-116.45}];
f5.a5c=function(x){var Q=f5.aCR,c=2*x.x/(1.5-x.x+6*x.y),$=3*x.y/(1.5-x.x+6*x.y),z=0,j=0,U=0;for(;U<31;
U++){z=$-Q[U]._B-Q[U].z_*(c-Q[U].mC);if(U>0&&z<0){break}j=z}while(U>=Q.length)U--;z/=Math.sqrt(1+Q[U].z_*Q[U].z_);
j/=Math.sqrt(1+Q[U-1].z_*Q[U-1].z_);var i=j/(j-z),b=1e6/((Q[U].Z-Q[U-1].Z)*i+Q[U-1].Z),e=c-((Q[U].mC-Q[U-1].mC)*i+Q[U-1].mC),k=$-((Q[U]._B-Q[U-1]._B)*i+Q[U-1]._B),K=Math.sqrt(1+Q[U].z_*Q[U].z_),g=1/K,R=Q[U].z_/K,T=Math.sqrt(1+Q[U-1].z_*Q[U-1].z_),D=1/T,a=Q[U-1].z_/T,_=(g-D)*i+D,I=(R-a)*i+a,f=Math.sqrt(_*_+I*I);
_/=f;I/=f;var y=(e*_+k*I)*-3e3;return{Ud:b,OG:y}};f5.s1=function(x,Q){var c=f5.aCR,$=1e6/x,z=1;for(;
z<31;z++){if($<c[z].Z){break}}var j=(c[z].Z-$)/(c[z].Z-c[z-1].Z),U=(c[z-1].mC-c[z].mC)*j+c[z].mC,i=(c[z-1]._B-c[z]._B)*j+c[z]._B,b=Math.sqrt(1+c[z].z_*c[z].z_),e=1/b,k=c[z].z_/b,K=Math.sqrt(1+c[z-1].z_*c[z-1].z_),g=1/K,R=c[z-1].z_/K,T=(g-e)*j+e,D=(R-k)*j+k,a=Math.sqrt(T*T+D*D);
T/=a;D/=a;U+=T*Q/-3e3;i+=D*Q/-3e3;return{x:1.5*U/(U-4*i+2),y:i/(U-4*i+2)}};f5.alb=function(x){var Q=x[0]+x[1]+x[2];
return{x:x[0]/Q,y:x[1]/Q}};f5.yB=function(x){return{x:x.x/x.y,y:1,wP:(1-x.x-x.y)/x.y}};f5.arS=function(x,Q){var c=d.gg.V6([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]),$=[x.x,x.y,x.wP,0],z=[Q.x,Q.y,Q.wP,0];
$=d.gg.V3(c,$);z=d.gg.V3(c,z);var j=z[0]/$[0],U=z[1]/$[1],i=z[2]/$[2],b=d.gg.V6([j,0,0,0,U,0,0,0,i]),e=d.gg.HQ(c);
return d.gg.multiply(d.gg.multiply(e,b),c)};d.raw.H9={};d.raw.Yj=function(x){x*=8;var Q=[8,10,12,14,16];
for(var c in CAMS){var $=CAMS[c];if($.length==4)continue;var z=$[4],j=$[5];for(var F=0;F<Q.length;F++)if(z*j*Q[F]==x)return[c,Q[F]]}var U=[[4e3,3e3]];
for(var F=0;F<U.length;F++){var $=U[F],z=$[0],j=$[1];for(var F=0;F<Q.length;F++)if(z*j*Q[F]==x)return[$,Q[F]]}return null};
d.raw.aAn=function(x){var x=new Uint8Array(x);for(var F=0;F<x.length;F+=2){var Q=x[F];x[F]=x[F+1];x[F+1]=Q}var c=d.raw.Yj(x.length),$=CAMS[c[0]];
if($==null)$=[[8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354],0,1e3,64383,c[0][0],c[0][1]];var z=$[4],j=$[5],U=Math.max($[2],116),i={data:x,Lj:1,width:z,height:j,t256:[z],t257:[j],t258:[c[1]],t277:[1],t33421:[2,2],t33422:d.raw.Zn[$[1]],t50706:[1,2,0,0],t50714:[U,U,U,U],t50717:[$[3]],t50721:$[0].slice(0),t50723:[1,0,0,0,1,0,0,0,1],t50728:[.64,1,.46],t50778:[17]};
for(var F=0;F<9;F++)i.t50721[F]/=1e4;return i};d.raw.ahr=function(x){if(x==null||x.length==0||typeof x[0]=="number")return x;
var Q=[];for(var F=0;F<x.length;F++)Q[F]=x[F][1]==0?0:x[F][0]/x[F][1];return Q};d.raw.Zn=[[2,1,1,0],[0,1,1,2],[1,0,2,1],[1,2,0,1]];
d.raw.normalize=function(x,Q){if(x.t50706!=null||x.t271[0].startsWith("Hasselblad")){var c=[50714,50718,50719,50720,50721,50722,50723,50724,50727,50728,50730,50731,50732,50734,50736,50738,50739,50780,50964,50965];
for(var F=0;F<c.length;F++)if(x["t"+c[F]]!=null)x["t"+c[F]]=d.raw.ahr(x["t"+c[F]]);if(x.t271&&x.t271[0].startsWith("Hasselblad")){x.t50706=[1,2,0,0];
x.t33422=d.raw.Zn[1];x.t50723=[1,0,0,0,1,0,0,0,1];x.t50778=[17];if(!x.isLE)for(var F=0;F<x.data.length;
F+=2){var $=x.data[F];x.data[F]=x.data[F+1];x.data[F+1]=$}}if(x.t272&&x.t272[0]=="HERO10 Black"){x.t50728=[.469725,1,.739884];
if(!x.t305[0].startsWith("Adobe")){var z=new Uint16Array(x.data.buffer);for(var F=0;F<z.length;F++)z[F]>>>=2}}return}var j=x.t258[0],U=x.exifIFD,Q=new Uint8Array(Q);
x.t50706=[1,2,0,0];var i=x.t271[0].trim(),b=x.t272[0].trim();if(x.t50708==null)x.t50708=[i+" "+b];var e=(i+":"+b).toLowerCase(),k=CAMS[e];
if(e=="panasonic:dmc-lx2")k[3]=1<<16;if(k==null){alert("Unknown camera:"+e);if(e.startsWith("canon"))k=[[8532,-701,-1167,-4095,11879,2508,-797,2424,7010],1,512,16e3]}if(k!=null){var K=k[2];
x.t50714=[K,K,K,K];if(x.t272=="Canon EOS REBEL T3")k[3]=13584;x.t50717=[k[3]];x.t50721=k[0].slice(0);
for(var F=0;F<9;F++)x.t50721[F]=x.t50721[F]*(1/1e4)}x.t50723=[1,0,0,0,1,0,0,0,1];if(x.t50728==null)x.t50728=[.35,1,.6];
x.t50778=[17];if(i.startsWith("OLYMPUS")||i.startsWith("OM Digital Solutions")){x.t33422=[2,1,1,0];var g=U.t41730,a;
if(g)x.t33422=[g[4],g[5],g[6],g[7]];var R=x.t50341;if(R==null)R=U.t36864;var T=d.raw.aCl(R.buffer,x);
x.data=new Uint8Array(T.buffer);if((x.height&1)==1)x.t50829=[0,0,x.height-1,x.width];var D=U.makerNote,_=D.t8256;
if(_)a=_.t256;else a=D.t12288.t256;x.t50728=[256/a[0],1,256/a[1]]}else if(x.t271[0].startsWith("SONY")){var I=UTIF["_bin"+(x.isLE?"LE":"BE")],f=x.t28688,r;
if(JSON.stringify(f)!="[8000,10400,12900,14100]")console.log(f);if(f){var y=[0,0,0,0,0,4095],Z=new Uint16Array(16385);
for(var F=0;F<4;F++){var v=f[F]>>>2;y[F+1]=v;if(v>4095)throw"e"}for(var F=0;F<16385;F++)Z[F]=F;for(var F=0;
F<5;F++)for(var G=y[F]+1;G<=y[F+1];G++)Z[G]=Z[G-1]+(1<<F);var q=Q.length*8<x.width*x.height*j;if(q)x.t50712=Z}else console.log("no curve");
var h=x.dngPrvt;if(h){var H=h.t29184[0],o=h.t29185[0],P=(x.isLE?w.K3:w.q)(h.t29217,0),O=new Uint32Array(Q.slice(H,H+(o&4294967292)).buffer),p=new Uint32Array(o>>>2);
d.raw.auX(O,p,o>>>2,P);var C=new Uint8Array(H+o);C.set(new Uint8Array(p.buffer),H);var W=[];UTIF._readIFD(I,C,H,W,0,!1);
var J=W.pop(),t=J.t29458;x.t50728=[t[1]/t[0],1,t[1]/t[3]];x.t50730=[.5];var Y=J.t29891;x.t50829=[Y[1],Y[0],Y[3],Y[2]]}else if(U.makerNote&&U.makerNote.t8208){var r=U.makerNote,l=r.t8208,m=l.length,B=0,L=new Uint8Array(256);
for(var F=249;F<256;F++)L[F]=F;for(var F=0;F<249;F++)L[F*F*F%249]=F;for(var F=0;F<m;F++)l[F]=L[l[F]];
if(m==6604)B=612;else throw"e";var t=[];for(var F=0;F<3;F++)t.push(w.ls(l,B+F*2));console.log(t);x.t50728=[t[1]/t[0],1,t[1]/t[2]]}else console.log("no white balance");
if(x.width*x.height*1.5==x.t279[0]){K=K>>>2;x.t50714=[K,K,K,K];x.t50717=[k[3]>>>2]}}else if(x.t271[0].startsWith("Canon")){var Q=x.data,A=Q.slice(0),S=x.t50752,M=[],s=0;
if(S==null||S[0]==0&&S[1]==0)M.push(x.width);else{for(var F=0;F<S[0];F++)M.push(S[1]);M.push(S[2])}var N=x.width*2,V=x.t50885&&x.t50885[0]==4;
if(!V)for(var g8=0;g8<M.length;g8++){var n=M[g8],cQ=2*s,hk=2*n;for(var eG=0;eG<x.height;eG+=2){var ie=eG*N+cQ,eN=x.height*cQ+eG*hk;
for(var F=0;F<hk;F++){Q[ie+F]=A[eN+F];Q[ie+F+N]=A[eN+F+hk]}}s+=n}else{var gr=new Uint16Array(A.buffer),ek=new Uint16Array(Q.buffer);
function jK(e9,dm){ek[dm*3+0]=gr[e9*3+0];ek[dm*3+1]=gr[e9*3+1];ek[dm*3+2]=gr[e9*3+2]}var iE=(S[0]*S[1]+S[2])/x.width;
for(var g8=0;g8<M.length;g8++){var n=Math.round(M[g8]/iE);for(var eG=0;eG<x.height;eG++){var e9=x.height*s+(iE==3?(eG>>>3)*8+[0,4,1,5,2,6,3,7][eG&7]:eG)*n,dm=eG*x.width+s;
for(var kD=0;kD<n;kD++)jK(e9+kD,dm+kD)}s+=n}var gJ=new Uint16Array(Q.buffer),dR=new Uint16Array(1),fO=new Int16Array(dR.buffer);
for(var F=0;F<gJ.length;F+=3){var ko=gJ[F],d8=gJ[F+1],fj=gJ[F+2];dR[0]=d8<<2;d8=fO[0]>>2;dR[0]=fj<<2;
fj=fO[0]>>2;gJ[F+0]=Math.max(0,fj+ko);gJ[F+1]=Math.max(0,(ko<<12)-d8*778-(fj<<11)>>12);gJ[F+2]=Math.max(0,d8+ko)}}var r=U.makerNote,e9=r.t224;
if(e9){var H=x.t50719=[e9[5],e9[6]],ja=x.t50720=[e9[7]+1-e9[5],e9[8]+1-e9[6]],eD=r.t154;if(eD){H[0]+=eD[3];
H[1]+=eD[4];ja[0]=eD[1];ja[1]=eD[2]}}if(r.t16385){var d3=r.t16385,fP=d3.length,jE=0;console.log(d3);
if(d3 instanceof Array)d3=new Uint16Array(d3);if(fP==582)jE=1;else if(fP==653)jE=2;else if(fP==796)jE=3;
else if([692,674,702,1227,1250,1251,1337,1338,1346].indexOf(fP)!=-1)jE=4;else if([1816,1820,1824,5120].indexOf(fP)!=-1){jE=5;
d3=new Int16Array(d3.slice(0).buffer)}else if(fP==1273||fP==1275)jE=6;else if([1312,1313,1316,1506].indexOf(fP)!=-1)jE=7;
else if([1560,1592,1353,1602].indexOf(fP)!=-1)jE=8;else if(fP==3656)jE=9;else if(fP==3778||fP==3973)jE=10;
else throw"e"+fP;var cR=d3[0],ex=[null,[25,166],[34,286],[63,196],[63],[71,cR==-4?333:cR==16||cR==17||cR==18||cR==19?329:264],[63,251],[63,cR==10?504:728],[63,326],[85,343],[105,363]],B=ex[jE][0],er=ex[jE][1];
if(jE==4){if(d3[0]==2)er=231;else if(d3[0]==3)er=231;else if(d3[0]==4)er=231;else if(d3[0]==5)er=231;
else if(d3[0]==6)er=231;else if(d3[0]==7)er=231;else if(d3[0]==9)er=231;else throw"e"}x.t50728=[d3[B+1]/d3[B],1,d3[B+1]/d3[B+3]];
var K=er==null?1024:d3[er];if(jE!=4)x.t50714=[K,K,K,K]}else{x.t50728=[.4,1,.6]}if(V){x.t277=[3];x.t50728=[1,1,1];
x.t50714=[0,0,0,0]}}else if(x.t271[0].startsWith("NIKON")){var r=U.makerNote,cE=x.isLE?w.ls:w.u7,e$=0,iP=0,jL,jp=0;
if(r.t61){var a7=r.t61,dl=[];for(var F=0;F<4;F++)dl[F]=a7[F]/Math.pow(2,14-j);x.t50714=dl}if(r.t3585){var hl=r.t3585,F=0,H=22;
while(H<hl.length&&F!=-4){var f4=w.K3(hl,H);H+=4;H+=14;F=w.K3(hl,H)-4;H+=4;if(f4==1990472198){if(hl[H]!=0)throw"Flip"}if(f4==1990472199){var em=w.ls(hl,H);
if(em==0)x.Lj=1;else if(em==270)x.Lj=8;else throw"e "+em}H+=F}}if(r.t183){var b2=r.t183,ja=[];for(var F=0;
F<6;F++)ja.push(cE(b2,16+F*2));e$=ja[0];iP=ja[1]}if(r.t3614){var k7=r.t3614;e$=w.K3(k7,8);iP=w.K3(k7,12)}if(e$!=0&&Math.max(e$,iP)<Math.max(x.width,x.height)){if(e$<iP){var $=e$;
e$=iP;iP=$}var kD=x.width-e$>>>1,eG=x.height-iP>>>1;x.t50829=[eG,kD,eG+iP,kD+e$]}else x.t50829=[8,8,x.height-8,x.width-56];
var at=r.t69;if(at){var ju=at[1];if((ju&1)==1)ju++;x.t50829=[ju,at[0],ju+at[3],at[0]+at[2]]}if(r.t12){var fJ=d.raw.ahr(r.t12);
jL=[1/fJ[0],1,1/fJ[1]]}else if(r.t151){var h6=d.raw.ax3(r,151),iq=h6[0],fu=h6[1],iI=h6[2];if(iq=="0100"&&fu>=80)throw"e";
else if(iq=="0102"){var dM=[];for(var F=0;F<4;F++)dM.push(cE(iI,6+F*2));jL=[dM[1]/dM[0],1,dM[1]/dM[3]]}else if(iq=="0103"&&fu>=26){var dM=[];
for(var F=0;F<4;F++)dM.push(cE(iI,16+F*2));jL=[dM[1]/dM[0],1,dM[3]/dM[2]]}else if(iq=="0204"&&fu>=564||iq=="0205"&&fu>=284){var H=iq=="0204"?6:14,dM=[];
for(var F=0;F<4;F++)dM.push(cE(iI,H+F*2));jL=[dM[1]/dM[0],1,dM[1]/dM[3]]}else throw"e"}else console.log("no white balance info");
if(b=="NIKON D1")jL=[1,1,1];if(jL)x.t50728=jL;var ik=r.t150?r.t150:r.t140;if(ik){var eA=ik[jp++],k8=ik[jp++],a4;
if(eA==73||k8==88)jp+=2110;jp+=8;var ay=1<<j&32767,bK=cE(ik,jp);jp+=2;var Z=[];if(bK>1)a4=Math.floor(ay/(bK-1));
if(eA==68&&k8==32&&a4>0){for(F=0;F<bK;F++){Z[F*a4]=cE(ik,jp);jp+=2}for(F=0;F<ay;F++)Z[F]=Math.floor((Z[F-F%a4]*(a4-F%a4)+Z[F-F%a4+a4]*(F%a4))/a4)}else if(eA!=70&&bK<=16385){ay=bK;
for(var F=0;F<bK;F++)Z[F]=cE(ik,jp+2*F);jp+=2*bK}var b=x.t272[0];if(Z.length!=0)x.t50712=new Uint16Array(Z);
if(x.t258[0]==14&&x.t50717&&x.t50717[0]<1e4){console.log("fixing white");x.t50717[0]*=4}}}else if(i.startsWith("FujiFilm")){}else if(i.startsWith("Panasonic")){if(x.t277==null)x.t277=[1]}else alert("Unknown camera "+i)};
d.raw.auX=function(x,Q,c,$){if(0==c)return;var z=new Uint32Array(128),j=new Uint8Array(z.buffer),U=127,i=0,b=0;
for(var U=0;U<4;U++)z[U]=$=($*15625>>>0)*3125+1>>>0;z[3]=z[3]<<1|(z[0]^z[2])>>>31;for(var U=4;U<127;
U++)z[U]=(z[U-4]^z[U-2])<<1|(z[U-3]^z[U-1])>>>31;for(var U=0;U<127;U++)z[U]=w.q(j,U*4);for(;c>0;c--){z[U&127]=z[U+1&127]^z[U+1+64&127];
var e=z[U&127],k=x[i];k^=e;Q[b]=k;i++;b++;U++}};d.raw.a9J=function(x,Q){var c=w.mt(Q,0,4),$=d.raw.a3o;
for(var F=0;F<$.length;F++)if($[F][0]==x&&c.startsWith($[F][1])&&($[F][2]==0||$[F][2]==Q.length))return $[F];
throw"e"};d.raw.ap3=function(x){if(x.t29==null)return[];var Q=d.raw.avX,c=d.raw.ajY,$=x.t29[0],z=0,U=0;
for(var F=0;F<$.length;F++){var j=$.charCodeAt(F);z=z*10+(48<=j&&j<=57?j-48:j%10)}var fu=x.t167[0];for(var F=0;
F<4;F++)U^=fu>>>(F<<3)&255;var i=Q[z&255],b=c[U&255];return[i,b,96]};d.raw.ax3=function(x,Q){var c=x["t"+Q],fu=c.length,$=d.raw.a9J(Q,c),z=w.mt(c,0,4),j,U=$[4];
if(U==null)j=c.slice(4);else{j=new Uint8Array(fu-U);var i=d.raw.ap3(x),b=i[0],e=i[1],k=i[2];for(var F=0;
F<j.length;F++){e=e+b*k++&255;j[F]=c[U++]^e}}return[z,fu,j]};d.raw.aCl=function(x,Q){var c=Q.t271[0],$=Q.t272[0],z=Q.t256[0],j=Q.t257[0],U=Q.t258[0],i=Q.t273[0],b=i,e=new Uint8Array(x),k,K=z-4,g=j,R=e.length-i,a=0,_=0;
function T(){var v=new Uint16Array(4096),jF=0;v[jF]=3084;for(var F=12;F--;)for(var G=0;G<2048>>F;G++)v[++jF]=F+1<<8|F;
return v}function D(){return e[b++]}function I(v,G){var q;if(v>25)return 0;if(v==0||_<0)return 0;if(v<0){a=0;
_=0;return 0}while(_<v){q=D();if(q==null)break;a=(a<<8)+(255&q);_+=8}q=_==0?0:a<<32-_>>>32-v;if(G){_-=G[q]>>8;
q=255&G[q]}else _-=v;return q}function f(){var v=T();b+=7;I(-1);for(var G=0;G<g;G++){var q=[new Int32Array(3),new Int32Array(3)];
for(var h=0;h<z;h++){var r=q[h&1],F=2*(r[2]<3),H;for(H=2+F;(65535&r[0])>>H+F;H++);var o=I(3),P=o&3;o=o<<29>>31;
var O=I(12,v);if(O==12)O=I(16-H)>>>1;var p=I(H);r[0]=O<<H|p;var C=(r[0]^o)+r[1];r[1]=C*3+r[1]>>5;r[2]=r[0]>16?0:r[2]+1;
if(h>=K)continue;var W=k[G*z+h-2],jF=k[(G-2)*z+h],J=k[(G-2)*z+h-2];k[G*z+h]=(G<2&&h<2?0:G<2?W:h<2?jF:W<J&&J<jF||jF<J&&J<W?Math.abs(W-J)>32||Math.abs(jF-J)>32?W+jF-J:W+jF>>1:Math.abs(W-J)>Math.abs(jF-J)?W:jF)+(C<<2|P)}}}function y(){var v=z*U/8,G=j+1>>1,h=0,r=0;
v+=v&6>>7;var q=v*8-z*U;for(var H=0;H<j;H++){var o=H%G*2+~~(H/G);if(o==1){h=0;b=i-(-G*v&-2048)}for(var P=0;
P<z;P++){for(h-=U;h<0;h+=8){r<<=8;for(var F=0;F<8;F+=8)r|=D()<<F}var O=r<<64-U-h>>>64-U;k[o*z+P]=O}h-=q}}function Z(){var v=!c.startsWith("OLYMPUS")||!c.startsWith("OM Digi")||!c.toLowerCase().startsWith("clauss")&&!$.toLowerCase().startsWith("pix 5oo");
return v&&R<z*j}if(Z()){k=new Uint16Array(K*g);f()}else{k=new Uint16Array(z*j);y()}return k};d.raw.a3o=[[145,"0208",0,0,4],[145,"0209",0,1,4],[145,"0210",5291,2,4],[145,"0210",5303,3,4],[145,"02",0,4,4],[145,"01",0,5,null],[151,"0100",0,0,null],[151,"0102",0,1,null],[151,"0103",0,4,null],[151,"0204",0,3,284],[151,"0205",0,2,4],[151,"0206",0,3,284],[151,"0207",0,3,284],[151,"0208",0,3,284],[151,"0209",0,5,284],[151,"02",0,3,284],[152,"0100",0,0,null],[152,"0101",0,1,null],[152,"0201",0,1,4],[152,"0202",0,1,4],[152,"0203",0,1,4],[152,"0204",0,2,4],[168,"0100",0,0,null],[168,"0101",0,0,null],[168,"0102",0,1,null],[168,"0103",0,2,null]];
d.raw.avX=[193,191,109,13,89,197,19,157,131,97,107,79,199,127,61,61,83,89,227,199,233,47,149,167,149,31,223,127,43,41,199,13,223,7,239,113,137,61,19,61,59,19,251,13,137,193,101,31,179,13,107,41,227,251,239,163,107,71,127,149,53,167,71,79,199,241,89,149,53,17,41,97,241,61,179,43,13,67,137,193,157,157,137,101,241,233,223,191,61,127,83,151,229,233,149,23,29,61,139,251,199,227,103,167,7,241,113,167,83,181,41,137,229,43,167,23,41,233,79,197,101,109,107,239,13,137,73,47,179,67,83,101,29,73,163,19,137,89,239,107,239,101,29,11,89,19,227,79,157,179,41,67,43,7,29,149,89,89,71,251,229,233,97,71,47,53,127,23,127,239,127,149,149,113,211,163,11,113,163,173,11,59,181,251,163,191,79,131,29,173,233,47,113,101,163,229,7,53,61,13,181,233,229,71,59,157,239,53,163,191,179,223,83,211,151,83,73,113,7,53,97,113,47,67,47,17,223,23,151,251,149,59,127,107,211,37,191,173,199,197,197,181,139,239,47,211,7,107,37,73,149,37,73,109,113,199];
d.raw.ajY=[167,188,201,173,145,223,133,229,212,120,213,23,70,124,41,76,77,3,233,37,104,17,134,179,189,247,111,97,34,162,38,52,42,190,30,70,20,104,157,68,24,194,64,244,126,95,27,173,11,148,182,103,180,11,225,234,149,156,102,220,231,93,108,5,218,213,223,122,239,246,219,31,130,76,192,104,71,161,189,238,57,80,86,74,221,223,165,248,198,218,202,144,202,1,66,157,139,12,115,67,117,5,148,222,36,179,128,52,229,44,220,155,63,202,51,69,208,219,95,245,82,195,33,218,226,34,114,107,62,208,91,168,135,140,6,93,15,221,9,25,147,208,185,252,139,15,132,96,51,28,155,69,241,240,163,148,58,18,119,51,77,68,120,40,60,158,253,101,87,22,148,107,251,89,208,200,34,54,219,210,99,152,67,161,4,135,134,247,166,38,187,214,89,77,191,106,46,170,43,239,230,120,182,78,224,47,220,124,190,87,25,50,126,42,208,184,186,41,0,60,82,125,168,73,59,45,235,37,73,250,163,170,57,167,197,167,80,17,54,251,198,103,74,245,165,18,101,126,176,223,175,78,179,97,127,47];
d.GQ={};d.GQ.GQ=function(x,Q,c,$,z){if($==null)$=3;if(z==null)z=!0;var j=x.m,U=x.e,i=1/j,b=j*U,e=Date.now(),k=!1,K=d.GQ.a2j(c,j,U,255,128),g=d.GQ.a2j(c,j,U,0,128),s=0;
if(k)console.log("extract contours",Date.now()-e);e=Date.now();var R=function(hl,f4){var em=hl<<2,e$=f4<<2;
return Q[em]+Q[em+1]+Q[em+2]-(Q[e$]+Q[e$+1]+Q[e$+2])};K.sort(R);g.sort(R);var T=d.R(b),D=d.R(b),a=[],_=new Uint32Array(j*U);
_.fill(4294967295);for(var F=0;F<b;F++)if(c[F]==0)D[F]=255;else if(c[F]==255)T[F]=255;else{_[F]=a.length;
a.push(F)}var I=K.length,f=g.length,y=a.length;function Z(hl,f4,em,e$){var iP=hl.length,b2=new Array(iP*2);
for(var F=0;F<iP;F++){var W=hl[F],J=~~(W*e$),t=W-J*em,ex=W<<2;b2[F*2]=t<<16|J;b2[F*2+1]=f4[ex]<<16|f4[ex+1]<<8|f4[ex+2]}return b2}var v=Z(K,Q,j,i),G=Z(g,Q,j,i),q=Z(a,Q,j,i);
if(k)console.log("Itemize",Date.now()-e,"Unknown:",y,I,f);e=Date.now();var h=d.style.qD(T,j,U,!0),r=d.style.qD(D,j,U,!0),H=new Array(y),o=new Array(y),P=new Array(y),O=new Array(y),p=new Array(y);
if(k)console.log("Dist transform",Date.now()-e);e=Date.now();var C=d.GQ.eW;for(var F=0;F<y;F++){var W=a[F],J=~~(W*i),t=W-J*j,Y=h[W<<1],l=h[(W<<1)+1],m=Math.sqrt(Y*Y+l*l),B=r[W<<1],L=r[(W<<1)+1],A=Math.sqrt(B*B+L*L);
H[F]=1/m;o[F]=1/A;var S=Math.floor(d.l.xk(W*17)*I),M=Math.floor(d.l.xk(W*19)*f);P[F]=S;O[F]=M;p[F]=C(q[F*2],q[F*2+1],v[S*2],v[S*2+1],G[M*2],G[M*2+1],H[F],o[F],1e9)}var N=[-j-1,-j,-j+1,-1,1,j-1,j,j+1];
while(Math.floor(Math.max(I,f)*Math.pow(.5,s))>1)s++;for(var V=0;V<$;V++){var g8=0;for(var F=0;F<y;F++){var W=a[F],J=~~(W*i),t=W-J*j,n=H[F],cQ=o[F],hk=q[F*2],eG=q[F*2+1],ie=p[F],S=P[F],M=O[F],e9=1;
if(J!=0&&t!=0&&t!=j-1&&J!=U-1)for(var eN=0;eN<8;eN++){var gr=_[W+N[eN]];if(gr==4294967295)continue;var ek=P[gr],jK=O[gr];
if(ek==S&&jK==M)continue;var iE=C(hk,eG,v[ek*2],v[ek*2+1],G[jK*2],G[jK*2+1],n,cQ,ie);if(iE<ie){ie=iE;
S=ek;M=jK}}for(var dm=0;dm<s;dm++){var gJ=~~(I*e9),dR=~~(f*e9);e9*=.5;var fO=d.l.xk(W+V*17+dm*31),ko=d.l.xk(W+V*29+dm*63),d8=Math.max(0,S-gJ),fj=Math.min(S+gJ,I-1),ja=Math.max(0,M-dR),eD=Math.min(M+dR,f-1),ek=d8+~~(fO*(fj-d8)),jK=ja+~~(ko*(eD-ja)),iE=C(hk,eG,v[ek*2],v[ek*2+1],G[jK*2],G[jK*2+1],n,cQ,ie);
if(iE<ie){ie=iE;S=ek;M=jK}}p[F]=ie;P[F]=S;O[F]=M;g8+=ie}}if(k)console.log(g8);if(k)console.log("iterations",Date.now()-e);
e=Date.now();var d3=c.slice(0);for(var F=0;F<y;F++){var fP=d.GQ.alpha(q[F*2+1],v[P[F]*2+1],G[O[F]*2+1]);
d3[a[F]]=~~(.5+255*fP)}d3=d.Vm.a6c(d3,Q,new gh(0,0,j,U),16,.01*.01);if(k)console.log("guided filter",Date.now()-e);
e=Date.now();if(z)for(var F=0;F<b;F++)if(c[F]==255||c[F]==0)d3[F]=c[F];var jE=Q.slice(0);for(var F=0;
F<y;F++){var cR=a[F],S=K[P[F]],ie=p[F],ex=cR<<2,er=d3[cR],dl=(er>=250?cR:S)<<2;jE[ex]=Q[dl];jE[ex+1]=Q[dl+1];
jE[ex+2]=Q[dl+2]}d.Dm(d3,jE,3);if(k)console.log(Date.now()-e);e=Date.now();return jE};d.GQ.eW=function(x,Q,c,$,z,j,U,i,b){var e=x>>>16,k=x&65535,K=e-(c>>>16),g=k-(c&65535),R=e-(z>>>16),T=k-(z&65535),D=Math.sqrt(K*K+g*g)*U,a=Math.sqrt(R*R+T*T)*i;
if(D+a>=b)return 1e9;var _=d.GQ.a8I(Q,$,j);return _+D+a};d.GQ.a8I=function(x,Q,c){var $=x>>>16,z=x>>>8&255,j=x&255,U=Q>>>16,i=Q>>>8&255,b=Q&255,e=c>>>16,k=c>>>8&255,K=c&255,g=d.GQ.alpha(x,Q,c),R=$-(g*U+(1-g)*e),T=z-(g*i+(1-g)*k),D=j-(g*b+(1-g)*K);
return Math.sqrt(R*R+T*T+D*D)};d.GQ.alpha=function(x,Q,c){var $=x>>>16,z=x>>>8&255,j=x&255,U=Q>>>16,i=Q>>>8&255,b=Q&255,e=c>>>16,k=c>>>8&255,K=c&255,g=U-e,R=i-k,T=b-K,D=$-e,a=z-k,_=j-K,I=g*g+R*R+T*T,f=I==0?.5:(D*g+a*R+_*T)/I;
return Math.max(0,Math.min(1,f))};d.GQ.abw=function(x){};d.GQ.a2j=function(x,Q,c,$,z){var j=[],U=Q-1,i=c-1;
for(var b=1;b<i;b++)for(var e=1;e<U;e++){var F=b*Q+e;if(x[F]==$&&(x[F-Q-1]==z||x[F-Q]==z||x[F-Q+1]==z||(x[F-1]==z||x[F+1]==z)||(x[F+Q-1]==z||x[F+Q]==z||x[F+Q+1]==z)))j.push(F)}return j};
d.Vm={};d.Vm.abJ=function(x,Q,c,$,z){var j=c.m,U=c.e,i=j*U,b=d.Vm.aqW,e=d.R(i*4),k;d.h4(e,4294967295);
var K=c,g=x,R=Q,T=$;d.Dm(x,e,0);k=d.t1(e,c);k=d.t1(k.AX,k.rect);K=k.rect;T=$>>>2;console.log(K,T);g=d.R(K.P());
d.GS(k.AX,g,0);d.Dm(Q,e,0);k=d.t1(e,c);k=d.t1(k.AX,k.rect);R=d.R(K.P());d.GS(k.AX,R,0);var D=d.Vm.amW(g,R,K,T,z),a=D[0],_=D[1],I=new gh(0,0,K.m*2,K.e*2);
a=b(a,K,I,!0);a=b(a,I,c,!0);_=b(_,K,I,!0);_=b(_,I,c,!0);var f=d.R(i);for(var F=0;F<i;F++)f[F]=Math.max(0,Math.min(255,Math.floor(.5+(a[F]*Q[F]+255*_[F]))));
return f};d.Vm.yg=function(x,Q,c,$){Q.set(x);d.yg.ajy(Q,c,$)};d.Vm.aqW=function(x,Q,c,$){var z=c.m,j=c.e,U=Q.m,i=Q.e,b=d.Vm.Sj,e=new Float32Array(z*j);
for(var k=0;k<i;k++){var K=(k+k)*z;for(var g=0;g<U;g++){if(!0||g==0||k==0||g==U-1||k==i-1)e[K]=e[K+1]=e[K+z]=e[K+z+1]=x[k*U+g];
else{e[K]=b(g+.25,k+.25,x,U,i);e[K+1]=b(g+.75,k+.25,x,U,i);e[K+z]=b(g+.25,k+.75,x,U,i);e[K+z+1]=b(g+.75,k+.75,x,U,i)}K+=2}}return e};
d.Vm.Sj=function(x,Q,c,$,z){x-=.499999;Q-=.499999;var j=Math.floor(x),U=Math.floor(Q),i=U*$+j,b=x-j,e=Q-U,k=(1-e)*(1-b),K=(1-e)*b,g=e*(1-b),R=e*b;
if(c[i]==null||c[i+$+1]==null){console.log(x,Q,$,z);throw"e"}return k*c[i+0]+K*c[i+1]+g*c[i+$+0]+R*c[i+$+1]};
d.Vm.amW=function(x,Q,c,$,z){var j=c.m,U=c.e,i=j*U,b=d.Vm.a3k,e=d.Vm.R,k=d.Vm.yg,K=d.Vm.Mb,Q=b(Q,i),x=b(x,i),g=e(i);
k(Q,g,c,$);var R=e(i);k(x,R,c,$);var T=e(i);K(Q,Q,T);k(T,T,c,$);var D=e(i);K(Q,x,D);k(D,D,c,$);var a=e(i),_=e(i);
for(var F=0;F<i;F++){var I=g[F],f=R[F],y=T[F]-I*I,Z=D[F]-I*f,v=Z/(y+z),G=f-v*I;a[F]=v;_[F]=G}var q=e(i);
k(a,q,c,$);var h=e(i);k(_,h,c,$);return[q,h]};d.Vm.a6c=function(x,Q,c,$,z){var j=c.m,U=c.e,i=j*U,b=d.Vm.aqW,e=Date.now(),k=!1,K=c,g=x,R=Q,T=$;
K=new gh(0,0,j>>>2,U>>>2);T=$>>>2;g=d.Vm.atR(x,j,U);R=d.Vm.aAT(Q,j,U);if(k)console.log(Date.now()-e);
e=Date.now();var D=d.Vm.axT(g,R,K,T,z),a=D[0],_=D[1],I=D[2],f=D[3];if(k)console.log(Date.now()-e);e=Date.now();
var y=d.R(i);for(var Z=0;Z<U;Z++)for(var v=0;v<j;v++){var F=Z*j+v,G=(Z>>>2)*(j>>>2)+(v>>>2),q=F<<2,h=a[G]*Q[q]+_[G]*Q[q+1]+I[G]*Q[q+2]+f[G]*255;
y[F]=Math.max(0,Math.min(255,~~(.5+h)))}if(k)console.log(Date.now()-e);e=Date.now();return y};d.Vm.atR=function(x,Q,c){var $=Q>>>2,z=c>>>2,j=d.R($*z);
for(var U=0;U<z;U++)for(var i=0;i<$;i++)j[U*$+i]=x[U*Q+i<<2];return j};d.Vm.aAT=function(x,Q,c){var $=Q>>>2,z=c>>>2,j=d.R($*z*4);
for(var U=0;U<z;U++)for(var i=0;i<$;i++){var b=U*$+i<<2,e=U*Q+i<<4;j[b]=x[e];j[b+1]=x[e+1];j[b+2]=x[e+2];
j[b+3]=x[e+3]}return j};d.Vm.axT=function(x,Q,c,$,z){var j=c.m,U=c.e,i=j*U,b=d.Vm.a3k,e=d.Vm.R,k=d.Vm.yg,K=d.Vm.Mb,x=b(x,i),g=new d.PT(j*U);
d.jy(Q,g);var Q=[b(g.Z,i),b(g.r,i),b(g.J,i)],R=d.Vm.atw(x,Q,c,$,z),T=e(i);k(x,T,c,$);var D=e(i);K(Q[0],x,D);
k(D,D,c,$);var a=e(i);K(Q[1],x,a);k(a,a,c,$);var _=e(i);K(Q[2],x,_);k(_,_,c,$);var I=e(i),f=e(i),y=e(i),Z=e(i);
for(var F=0;F<i;F++){var v=T[F],G=R.s9[F],q=R.f1[F],h=R.Nz[F],r=D[F]-G*v,H=a[F]-q*v,o=_[F]-h*v;I[F]=R.asU[F]*r+R.CP[F]*H+R.uC[F]*o;
f[F]=R.CP[F]*r+R.aaL[F]*H+R.Fv[F]*o;y[F]=R.uC[F]*r+R.Fv[F]*H+R.afh[F]*o;Z[F]=v-I[F]*G-f[F]*q-y[F]*h}k(I,I,c,$);
k(f,f,c,$);k(y,y,c,$);k(Z,Z,c,$);return[I,f,y,Z]};d.Vm.atw=function(x,Q,c,$,z){var j=c.m,U=c.e,i=j*U,b=d.Vm.R,e=d.Vm.yg,k=d.Vm.Mb,K={};
K.s9=b(i);e(Q[0],K.s9,c,$);K.f1=b(i);e(Q[1],K.f1,c,$);K.Nz=b(i);e(Q[2],K.Nz,c,$);var g=b(i);k(Q[0],Q[0],g);
e(g,g,c,$);var R=b(i);k(Q[0],Q[1],R);e(R,R,c,$);var T=b(i);k(Q[0],Q[2],T);e(T,T,c,$);var D=b(i);k(Q[1],Q[1],D);
e(D,D,c,$);var a=b(i);k(Q[1],Q[2],a);e(a,a,c,$);var _=b(i);k(Q[2],Q[2],_);e(_,_,c,$);K.asU=g;K.CP=R;
K.uC=T;K.aaL=D;K.Fv=a;K.afh=_;for(var F=0;F<i;F++){var I=K.s9[F],f=K.f1[F],y=K.Nz[F],Z=g[F]-I*I+z,v=R[F]-I*f,G=T[F]-I*y,q=D[F]-f*f+z,h=a[F]-f*y,r=_[F]-y*y+z,H=q*r-h*h,o=h*G-v*r,P=v*h-q*G,O=Z*r-G*G,p=G*v-Z*h,C=Z*q-v*v,W=H*Z+o*v+P*G,J=1/W;
K.asU[F]=H*J;K.CP[F]=o*J;K.uC[F]=P*J;K.aaL[F]=O*J;K.Fv[F]=p*J;K.afh[F]=C*J}return K};d.Vm.R=function(x){return new Float32Array(x)};
d.Vm.a3k=function(x,Q){var c=new Float32Array(Q);for(var F=0;F<Q;F++)c[F]=x[F]*(1/255);return c};d.Vm.Mb=function(x,Q,c){for(var F=0;
F<x.length;F++)c[F]=x[F]*Q[F]};d.hA={};d.hA.aj=function(x,Q,c,$){var z=x[Q]-c[$],j=x[Q+1]-c[$+1],U=x[Q+2]-c[$+2];
return Math.sqrt(z*z+j*j+U*U)*(1/441.7)};d.hA.getSelection=function(x,Q,c){var $=Q*c,z=d.R($),j=!1,U=Math.round(c*.7),i=1,b=new Uint32Array(12),e=d.R(12);
for(var k=0;k<U;k++)for(var K=0;K<Q;K++){if(K<i||k<i||K>Q-i-1||k>c-i-1){var F=k*Q+K,g=F<<2,R=0;if(k<i)R=4;
else if(K>Q-i-1)R=8;b[R]+=x[g];b[R+1]+=x[g+1];b[R+2]+=x[g+2];b[R+3]++;z[F]=255}}for(var F=0;F<12;F+=4)for(var T=0;
T<3;T++)e[F+T]=b[F+T]/b[F+3];var D=new Float32Array($);for(var F=0;F<$;F++){var g=F*4,a=d.hA.aj(x,g,e,0),_=d.hA.aj(x,g,e,4),I=d.hA.aj(x,g,e,8),f=Math.max(a,Math.max(_,I));
D[F]=a+_+I-f}d.hA.re(D);var y=Date.now(),Z=new Float32Array($),v=[],G=d.R($);for(var F=0;F<3;F++){d.GS(x,G,F);
var q=new Uint16Array($);v.push(q);d.hA.a7T(G,z,Q,c,q)}if(j)console.log("MBD",Date.now()-y);y=Date.now();
for(var F=0;F<$;F++)Z[F]=v[0][F]+v[1][F]+v[2][F];d.hA.re(Z);for(var F=0;F<$;F++)Z[F]+=.4*D[F];var h=Q>>>1,U=c>>>1,r=1/Math.sqrt(h*h+U*U);
for(var k=0;k<c;k++)for(var K=0;K<Q;K++){var H=K-h,o=k-U,P=1-Math.sqrt(H*H+o*o)*r;Z[k*Q+K]*=P}if(j)console.log("Centeredness",Date.now()-y);
y=Date.now();for(var F=0;F<$;F++)z[F]=Z[F]*255;var O=Math.round(Q/120),p=Math.round(O*.8);if(j)console.log(O,p);
d.VT.Z8(z,z,Q,c,O+O+1,!1);if(j)console.log("erosion",Date.now()-y);y=Date.now();for(var F=0;F<$;F++)Z[F]=z[F];
d.hA.re(Z);var C=d.R(256);for(var F=0;F<256;F++)C[F]=256/(1+Math.exp(-20*(F/255-.5)));for(var F=0;F<$;
F++){var W=~~(Z[F]*255+.5);z[F]=C[W]}if(j)console.log("Simoid",Date.now()-y);y=Date.now();return z};
d.hA.re=function(x){var Q=x.length,c=0;for(var F=0;F<Q;F++)c=Math.max(c,x[F]);var $=1/c;for(var F=0;
F<Q;F++)x[F]=x[F]*$};d.hA.a7T=function(x,Q,c,$,z){var j=c*$,U=x.slice(0),i=x.slice(0);for(var F=0;F<j;
F++)z[F]=Q[F]==255?0:65535;d.hA.acA(x,i,U,z,c,$);d.hA.a9p(x,i,U,z,c,$);d.hA.acA(x,i,U,z,c,$);d.hA.a9p(x,i,U,z,c,$);
return z};d.hA.acA=function(x,Q,c,$,z,j){for(var U=1;U<z;U++)d.hA.p5(U,-1,x,Q,c,$);for(var i=1;i<j;i++){d.hA.p5(i*z,-z,x,Q,c,$);
for(var U=1;U<z;U++){var F=i*z+U;d.hA.p5(F,-1,x,Q,c,$);d.hA.p5(F,-z,x,Q,c,$)}}};d.hA.a9p=function(x,Q,c,$,z,j){for(var U=z-2;
U>=0;U--)d.hA.p5(z*j-z+U,1,x,Q,c,$);for(var i=j-2;i>=0;i--){d.hA.p5(i*z+z-1,z,x,Q,c,$);for(var U=z-2;
U>=0;U--){var F=i*z+U;d.hA.p5(F,1,x,Q,c,$);d.hA.p5(F,z,x,Q,c,$)}}};d.hA.p5=function(F,x,Q,c,$,z){var j=F+x,U=Q[F],i=c[j],b=$[j];
if(i<U)i=U;else if(U<b)b=U;var e=i-b;if(z[j]!=65535&&e<z[F]){z[F]=e;c[F]=i;$[F]=b}};d.$T={};d.$T.filter=function(x,Q,c,$){var z=Q.m,j=Q.e,U=z*j,i=$[0],b=$[1],e=$[2],k=$[3],K=$[4],g=$[5],R=$[6],T=Date.now(),D=new Float32Array(z*j*4);
d.$T.alM(x,z,j,D);var a=Math.ceil(i*Math.sqrt(-2*Math.log(.1))),_=new ArrayBuffer(U*4),I=new Float32Array(_),f=new Float32Array(U),y=new Float32Array(U);
for(var F=0;F<U;F++){var Z=F*4;I[F]=D[Z];f[F]=D[Z+1];y[F]=D[Z+2]}d.yg.U2(I,Q,a*1/2.4,2);d.yg.U2(f,Q,a*1/2.4,2);
d.yg.U2(y,Q,a*1/2.4,2);for(var F=0;F<U;F++){var Z=F*4;D[Z]=I[F];D[Z+1]=f[F];D[Z+2]=y[F]}var v=new Uint8Array(_);
for(var F=0;F<U;F++){var Z=F*4,G=F*4,I=D[Z],f=D[Z+1],y=D[Z+2],q=Math.sqrt((I-y)*(I-y)+4*f*f),h=(I+y+q)*.5,r=(I+y-q)*.5,H=r-y,o=f,P=H*H+o*o;
if(P!=0){var O=Math.sqrt(P),p=1/O;H*=p;o*=p}v[G]=128+127*H;v[G+1]=128+127*o}var C=1.3*b+2,W=k*(2/10),J=x.slice();
if(eV.Mx){var t=new Float32Array([1/z,1/j]),Y=eV.Zk(0,z,j);Y.set(J);var l=eV.Zk(1,z,j);l.set(v);eV.qk(Y,Q);
if(K){Y.Zw(Q);eV.filter.NP({type:eV.filter.akK,d$:t,abX:1/e,aed:W},Y.xY)}Y.Zw(Q);eV.filter.NP({type:eV.filter.WT,t7:l.cm,d$:t,a2y:C,aD3:2},Y.xY);
if(K){Y.Zw(Q);eV.filter.NP({type:eV.filter.abW,d$:t,a5Y:new Float32Array(R),amd:g},Y.xY)}Y.get(c)}else{if(K)d.$T.Sk(1/e,W,J,z,j);
d.$T.WT(J,c,v,z,j,C);if(K)d.$T.aCA(z,j,c,R,g)}var m=U*4;for(var F=3;F<m;F+=4)c[F]=x[F]};d.$T.WT=function(x,Q,c,$,z,j){var U=Math.ceil(2*j),i=-1/(2*j*j),b=[],e=1;
for(var F=0;F<U+20;F++)b[F]=Math.exp(F*F*i);var k=[0,0,0,0];for(var K=0;K<z;K++){for(var g=0;g<$;g++){var R=K*$+g,T=R*4,D=1,a=x[T],_=x[T+1],I=x[T+2],f=x[T+3],y=(c[T]-128)*(1/127),Z=(c[T+1]-128)*(1/127),v=y,G=Z,q=g==0?.51:.49,h=K==0?.51:.49;
for(var F=0;F<2;F++){var r=g+q,H=K+h,o=0;while(o<U){if(r<.5||$-.5<r||H<.5||z-.5<H)break;var P=~~r,O=~~H,p=O*$+P,C=p*4,W=(c[C]-128)*(1/127),J=(c[C+1]-128)*(1/127);
if(W*v+J*G<0){W=-W;J=-J}v=W;G=J;r+=e*W;H+=e*J;if(r<.5||$-.5<r||H<.5||z-.5<H)break;var t=~~r,Y=~~H,l=Y*$+t<<2;
o+=e;var m=b[~~o];d.D.aBI(r,H,x,$,z,k);a+=k[0]*m;_+=k[1]*m;I+=k[2]*m;f+=k[3]*m;D+=m}v=-y;G=-Z}var B=1/D;
Q[T]=~~(.5+a*B);Q[T+1]=~~(.5+_*B);Q[T+2]=~~(.5+I*B);Q[T+3]=~~(.5+f*B)}}};d.$T.aCA=function(x,Q,c,$,z){for(var j=0;
j<Q;j++)for(var U=0;U<x;U++){var i=j*x+U<<2,b=1+d.$T.anb(U,j,c,x,Q,$)*z;c[i]=Math.max(0,Math.min(255,c[i]*b));
c[i+1]=Math.max(0,Math.min(255,c[i+1]*b));c[i+2]=Math.max(0,Math.min(255,c[i+2]*b))}};d.$T.anb=function(x,Q,c,$,z,j){var U=c[(Q*$+Math.max(0,x-1))*4+3],i=c[(Q*$+Math.min($-1,x+1))*4+3],b=c[(Math.max(0,Q-1)*$+x)*4+3],e=c[(Math.min(z-1,Q+1)*$+x)*4+3],k=.7,K=(i-U)*(1/255),g=.7,R=(e-b)*(1/255),T=-K*g,D=-k*R,a=k*g,_=Math.sqrt(T*T+D*D+a*a),I=1/_,f=T*I,y=D*I,Z=a*I,v=j[0]*f+j[1]*y+j[2]*Z;
return v};d.$T.Sk=function(x,Q,c,$,z){function j(i,e,k){return Math.max(e,Math.min(k,i))}for(var U=0;
U<z;U++)for(var i=0;i<$;i++){var b=d.$T.ada(i+.5,U+.5,x,Q);c[(U*$+i)*4+3]=Math.max(0,Math.min(255,b*255))}};
d.$T.ada=function(x,Q,c,$){function z(G,q,h){return(1-h)*G+h*q}var j=(x+613)*c,U=(Q+117)*c,i=~~j,b=~~U,e=j-i,k=U-b,K=Math.sin(11),g=Math.cos(i)*K,R=Math.cos(i+1)*K,T=Math.cos(b)*K,D=Math.cos(b+1)*K,jF=d.$T.hash(g,T),a=d.$T.hash(R,T),_=d.$T.hash(g,D),I=d.$T.hash(R,D),f=z(jF,a,e),y=z(_,I,e),Z=z(f,y,k);
Z=Z<.5?0:1;var v=Z+$*d.$T.hash(Math.cos(j)*K,Math.cos(U)*K);return v*(1/3)};d.$T.hash=function(x,Q){var c=Math.sin(x*11.697096+Q*73.32456)*12157.47691;
return c-Math.floor(c)};d.$T.alM=function(x,Q,c,$){var z=[-1,0,1,-2,0,2,-1,0,1],j=[-1,-2,-1,0,0,0,1,2,1],U=Q-1,i=c-1,b=Q*4;
for(var e=1;e<i;e++)for(var k=1;k<U;k++){var F=e*Q+k,K=F*4,g=d.$T.aI(x,K,b,z),R=d.$T.aI(x,K,b,j),T=d.$T.aI(x,K+1,b,z),D=d.$T.aI(x,K+1,b,j),a=d.$T.aI(x,K+2,b,z),_=d.$T.aI(x,K+2,b,j);
$[K]=g*g+T*T+a*a;$[K+1]=g*R+T*D+a*_;$[K+2]=R*R+D*D+_*_}d.$T.aaW($,Q,c)};d.$T.aI=function(x,Q,c,$){return x[Q-c-4]*$[0]+x[Q-c]*$[1]+x[Q-c+4]*$[2]+x[Q-4]*$[3]+x[Q]*$[4]+x[Q+4]*$[5]+x[Q+c-4]*$[6]+x[Q+c]*$[7]+x[Q+c+4]*$[8]};
d.$T.aaW=function(x,Q,c){function $(b,F,e){var k=F*4,K=e*4;b[K]=b[k];b[K+1]=b[k+1];b[K+2]=b[k+2]}var z=Q-1,j=c-1;
$(x,Q+1,0);$(x,2*Q-2,Q-1);for(var U=1;U<z;U++)$(x,Q+U,U);for(var i=1;i<j;i++){$(x,i*Q+1,i*Q);$(x,i*Q+Q-2,i*Q+Q-1)}for(var U=1;
U<z;U++)$(x,(c-2)*Q+U,(c-1)*Q+U);$(x,(i-2)*Q+1,(i-1)*Q);$(x,(i-1)*Q-2,i*Q-1)};d.rv=function(){function x(e,k,K,g){var R=new Float32Array(e*e),T=e/2;
for(var D=0;D<e;D++)for(var a=0;a<e;a++){var _=a+K-T,I=D+g-T;R[D*e+a]=Math.max(0,Math.min(1,k+.5-Math.sqrt(_*_+I*I)))}return R}var Q=[],$=null;
function c(e,k,K,g){var R=Math.floor(k*10),T=Q[R],D=e*8,a=D>>>1;if(T==null){T=Q[R]=[];var _=new gh(0,0,D,D),I=e/2/(1+.2*k),f=Math.floor(e*R*.1);
for(var y=0;y<2;y++)for(var Z=0;Z<2;Z++){var v=x(D,I,.25+Z*.5,.25+y*.5),G=0;d.yg.U2(v,_,f);while(v[D*a+G]<.005)G++;
if(G!=0)G--;var q=2*(a-G),h=new gh(G,G,q,q),r=new Float32Array(q*q);for(var H=0;H<q;H++)for(var o=0;
o<q;o++)r[H*q+o]=v[(G+H)*D+G+o];T.push([r,h])}}var P=Math.floor(K),O=Math.floor(g),p=K-P,C=g-O,W=p<.5?1:0,J=C<.5?1:0;
T=T[J*2+W];var h=T[1].clone();h.x+=P-a;h.y+=O-a;return[T[0],h]}function z(e,k,K){if($==null){$=new Uint8Array(4e4);
for(var F=0;F<4e4;F++)$[F]=Math.min(255,~~(.5+255*d.t9(F*(1/255))))}var g=e.length;for(var F=0;F<g;F++){var R=e[F],T=~~(255*R);
k[F]=$[T]<<24|K}}function j(e,k,K,g,R){var T=k.y_(g),D=Math.max(0,T.x-k.x),a=Math.max(0,T.x-g.x),_=Math.max(0,T.y-k.y),I=Math.max(0,T.y-g.y),f=T.m,y=T.e;
for(var F=0;F<y;F++){var Z=(_+F)*k.m+D,v=(I+F)*g.m+a;for(var G=0;G<f;G++){K[v+G]+=R*e[Z+G]}}}var U=-1;
function i(e,k,K,g,R){var T=Math.round(g[1]*k*K*.01),D=g[2],a=g[3],_=g[4],I=g[5],f=g[6],y=g[7],Z=g[8],v=g[9],G=g[10]?g[10]:1,m=!1;
if(D!=U){Q=[];U=D}var q=Date.now(),h=new gh(0,0,k,K),r=new b(g[0]);if(R)e.fill(0);var H=new Float32Array(R?e.buffer:k*K);
for(var F=0;F<T;F++){var o=r.get()*k,P=r.get()*K,O=r.get()*a,p=r.get()*D*4,C=(r.get()+f)*Math.PI*2,W=r.get()*D*4,J=(r.get()+2*f)*Math.PI*2;
o+=v*(p*Math.cos(C)+W*Math.cos(J));P+=v*(p*Math.sin(C)+W*Math.sin(J));if(Z)P=P+f*K*G;var t=c(D,O,o,P%K),Y=_,l=r.get();
if(y)Y=.5+.5*_*(.5+.5*Math.sin((2*f+l)*2*Math.PI));j(t[0],t[1],H,h,Y)}if(m)console.log(Date.now()-q,"add floats");
q=Date.now();var B=new Uint8Array(H.buffer);z(H,new Uint32Array(B.buffer),I.J<<16|I.r<<8|I.Z);if(m)console.log(Date.now()-q,"toInt");
q=Date.now();if(!R){d.l.UY("scrn",B,h,e,h,h,1);if(m)console.log(Date.now()-q,"blendOver")}}function b(e){this.U9=123456789;
this.ta=987654321;this.F=4294967295;this.lv(e)}b.prototype.lv=function(F){this.U9=123456789+F&this.F;
this.ta=987654321-F&this.F};b.prototype.get=function(){this.ta=36969*(this.ta&65535)+(this.ta>>16)&this.F;
this.U9=18e3*(this.U9&65535)+(this.U9>>16)&this.F;var e=(this.ta<<16)+(this.U9&65535)>>>0;e/=4294967296;
return e};return{Jg:i}}();d.KU={};d.KU.Ln=function(x,Q,c,$){var z=x[Q*2],j=x[Q*2+1],U=x[c*2],i=x[c*2+1],b=x[$*2],e=x[$*2+1];
return z*i+U*e+b*j-b*i-U*j-z*e};d.KU.auz=function(x,Q){var c=[],$=[],z=[],j={};for(var F=0;F<Q.length;
F+=3){var U=~~(F*(1/3)),i=Q[F+0],b=Q[F+1],e=Q[F+2],k=d.KU.Ln(x,i,b,e);if(k>0){var K=b;b=e;e=K}var g=j[e+"-"+b],R=j[b+"-"+i],T=j[i+"-"+e],D=[e,g,U,null],a=[b,R,U,D],_=[i,T,U,a];
D[3]=_;if(g)g[1]=D;if(R)R[1]=a;if(T)T[1]=_;j[e+"-"+i]=_;j[i+"-"+b]=a;j[b+"-"+e]=D;c[i]=a;z[F]=a;c[b]=D;
z[F+1]=D;c[e]=_;z[F+2]=_;$[U]=a}return{lR:c,SA:$,gA:z}};d.KU.a5H=function(x){var Q=[],c=x.SA;for(var F=0;
F<c.length;F++){var $=c[F];Q.push($[0]);$=$[3];Q.push($[0]);$=$[3];Q.push($[0])}return Q};d.KU.aqI=function(x,Q,c,$){var z=x[Q*2],j=x[Q*2+1],U=x[c*2],i=x[c*2+1],b=x[$*2],e=x[$*2+1],k=U-z,K=i-j,g=b-z,R=e-j,T=k*(z+U)+K*(j+i),D=g*(z+b)+R*(j+e),a=2*(k*(e-i)-K*(b-U));
if(Math.abs(a)<1e-5){var _=Math.min(z,U,b),I=Math.min(j,i,e),f=(Math.max(z,U,b)-_)*.5,y=(Math.max(j,i,e)-I)*.5;
return[_+f,I+y,f*f+y*y,1]}var Z=(R*T-K*D)/a,v=(k*D-g*T)/a,f=Z-z,y=v-j;return[Z,v,f*f+y*y,0]};d.KU.ahg=function(x,Q,c){var $=c[1],z=c[3],j=z[3],U=$[3],i=U[3],b=c[2],e=$[2],k=c[0],K=$[0],g=z[0],R=U[0],T=d.KU.aqI(x,K,R,g),D=x[k*2]-T[0],a=x[k*2+1]-T[1],_=D*D+a*a>T[2]&&T[3]==0&&d.KU.Ln(x,R,k,g)<0&&d.KU.Ln(x,g,K,R)<0;
if(_){c[0]=g;$[0]=R;c[3]=j;j[3]=U;U[3]=c;$[3]=i;i[3]=z;z[3]=$;z[2]=e;U[2]=b;Q.SA[e]=i;Q.SA[b]=j;Q.lR[K]=U;
Q.lR[k]=z}return _};d.KU.a33=function(x,Q,c){var $=x[Q*2]-x[c*2],z=x[Q*2+1]-x[c*2+1];return Math.sqrt($*$+z*z)};
d.KU.afo=function(x,Q,c){var $=c[1],z=c[3],j=z[3],U,i,b=c[2],e,k=c[0],K=j[0],g=z[0],R;if($){U=$[3];i=U[3];
e=$[2];R=U[0]}var T=x.length>>>1;x[2*T]=(x[2*K]+x[2*k])*.5;x[2*T+1]=(x[2*K+1]+x[2*k+1])*.5;if(!0){var D=b,a=c,_=Q.SA.length,I=[T,null,D,a],f=[g,I,_,j];
I[1]=f;var y=[T,null,_,f];z[3]=I;j[3]=y;j[2]=_;Q.SA[D]=z;Q.SA[_]=y;Q.lR[k]=z;Q.lR[g]=j;Q.gA.push(I,f,y)}if($){var Z=e,v=$,G=_+1;
y[1]=v,v[1]=y;var q=[T,null,Z,v],h=[R,q,G,i];q[1]=h;var r=[T,a,G,h];a[1]=r;U[3]=q;i[3]=r;i[2]=G;Q.SA[Z]=U;
Q.SA[G]=i;Q.lR[K]=U;Q.lR[R]=i;Q.gA.push(q,h,r)}Q.lR[T]=a};d.KU.avN=function(x,Q){var c=0;while(!0){var $=c;
for(var F=0;F<Q.gA.length;F++){var z=Q.gA[F];if(z[1]==null)continue;var j=d.KU.ahg(x,Q,z);if(j){c++;
break}}if($==c)break}return c!=0};d.KU.aAa=function(x,Q,c,$){var z=0;for(var F=0;F<$;F++){var j=null,U=0;
for(var i=0;i<Q.gA.length;i++){var b=Q.gA[i],e=d.KU.a33(x,b[0],b[3][3][0])*(b[1]?1:2);if(e>U){j=b;U=e}}if(U>c){d.KU.afo(x,Q,j);
z++}}return z!=0};d.KU.a7_=function(x,Q){var c=[],g=0;for(var F=0;F<x.length;F++)c.push(0);for(var F=0;
F<Q.gA.length;F++){var $=Q.gA[F],z=$[0],j=$[3][3][0],U=x[z*2],i=x[z*2+1],b=x[j*2],e=x[j*2+1],k=U-b,K=i-e;
c[z*2]+=-k;c[z*2+1]+=-K;c[j*2]+=k;c[j*2+1]+=K}for(var F=0;F<x.length;F+=2){var R=F>>>1,T=Q.lR[R],$=T,D=!0;
do{if($[1]==null){D=!1;break}$=$[1][3]}while($!=T);if(D){var a=.02;x[F]+=a*c[F];x[F+1]+=a*c[F+1];g+=a*(c[F]*c[F]+c[F+1]*c[F+1])}}return g};
d.KU.agB=function(x,Q,c){var $=d.A.pA(x),z=d.KU.auz(x,Q);d.KU.avN(x,z);for(var j=0;j<300;j++){var U=!1,i=!1;
U=d.KU.aAa(x,z,c,5);if(U)i=d.KU.avN(x,z);var b=d.KU.a7_(x,z);if(!U&&!i&&b<1e-4){break}}return d.KU.a5H(z)};
d.NO={};d.NO.avq=function(x){var Q=x.Xr,c=x.wf,$=x.AJ,z=x.sS,j=x.Sz,U=x.eI,i=x.qA,b=d.BS._n,I,f,y=0;
function e(jF){var g8=new Array(jF);for(var F=0;F<jF;F++)g8[F]=0;return g8}var k=c.length>>>1,K=e(Q.YG*2),g=e(Q.YG),R=e(Q.YG),T=Date.now();
for(var F=0;F<x.kf.length;F++){var D=Q.aA8+F,a=Q.ww*(U[F*2]+i[F*2]),_=Q.ww*(U[F*2+1]+i[F*2+1]);K[D*2]=a;
K[D*2+1]=_;g[D]=a;R[D]=_}Q.afT.fn(z,Q.arJ._n(K),.01,I,f);for(var F=0;F<Q.ahf.gA.length;F++){var Z=Q.ahf.gA[F],v=Z[3][3][0],G=Z[0],q=Z[3][0],h=Z[1]?Z[1][3][0]:q;
if(Z[1]&&v>G)continue;var r=c[v*2],H=c[v*2+1],o=c[G*2],P=c[G*2+1],O=z[v*2],p=z[v*2+1],C=z[G*2],W=z[G*2+1],J=z[q*2],t=z[q*2+1],Y=z[h*2],l=z[h*2+1],m=[O,p,C,W,J,t];
if(Z[1])m.push(Y,l);var B=b(Q.aww[y],m),L=B[0],A=B[1],S=1/Math.sqrt(L*L+A*A);L*=S;A*=S;var M=o-r,N=P-H;
g[y]=L*M+A*N;R[y]=-A*M+L*N;y++}var s=new Array(k),V=new Array(k);for(var F=0;F<k;F++){s[F]=j[F*2];V[F]=j[F*2+1]}Q.atV.fn(s,Q.aDL._n(g),.5);
Q.atV.fn(V,Q.aDL._n(R),.5);for(var F=0;F<k;F++){j[F*2]=s[F];j[F*2+1]=V[F]}};d.NO.avA=function(x){var Q=x.wf,c=x.AJ,$=x.kf,z=d.BS.multiply,j=Date.now(),U=d.KU.auz(Q,c),i=Q.length>>>1,b=0,T=0,A=1e3;
for(var F=0;F<U.gA.length;F++)b+=U.gA[F][1]?.5:1;var e=b+$.length,k=[],K=new d.w_(e*2,i*2),g=new d.w_(e,i),R=[[[-1,0,1,0,0,0],[0,-1,0,1,0,0]],[[-1,0,1,0,0,0,0,0],[0,-1,0,1,0,0,0,0]]],D=[],a=[];
for(var F=0;F<U.gA.length;F++){var _=U.gA[F],I=_[3][3][0],f=_[0],y=_[3][0],Z=_[1]?_[1][3][0]:y;if(_[1]&&I>f)continue;
var v=Q[I*2],G=Q[I*2+1],q=Q[f*2],h=Q[f*2+1],r=Q[y*2],H=Q[y*2+1],o=Q[Z*2],P=Q[Z*2+1],O=[[v,G,1,0],[G,-v,0,1],[q,h,1,0],[h,-q,0,1],[r,H,1,0],[H,-r,0,1]];
if(_[1])O.push([o,P,1,0],[P,-o,0,1]);var p=d.BS.Ny(O),C=z(linear.invert(z(p,O)),p);C.pop();C.pop();k.push(C);
var W=q-v,J=h-G,t=R[_[1]?1:0];t=d.BS.HY(t,z([[W,J],[J,-W]],C));var Y=[I*2,I*2+1,f*2,f*2+1,y*2,y*2+1,Z*2,Z*2+1],l=_[1]?8:6,m=[];
for(var B=0;B<l;B++)m.push([Y[B],t[0][B],t[1][B]]);m.sort(function(g8,n){return g8[0]-n[0]});for(var L=0;
L<2;L++){for(var B=0;B<l;B++){D[B]=m[B][0];a[B]=m[B][1+L]}K.Gt(a,D,l)}if(I<f)g.Gt([-1,1],[I,f],2);else g.Gt([1,-1],[f,I],2);
T++}for(var F=0;F<$.length;F++){var S=$[F];K.Gt([A],[S*2],1);K.Gt([A],[S*2+1],1);g.Gt([A],[S],1)}var M=K.Ny(),N=M.$K(M),s=g.Ny(),V=s.$K(s);
return{aA8:b,YG:e,arJ:M,afT:N,aDL:s,atV:V,ahf:U,aww:k,ww:A}};d.NO.agf=function(x,Q,c,$,z){var j=new gh(0,0,Q,c),U=d.R(j.P());
d.GS(x,U,3);d.round(U,70);var i=d.qQ(U,j),b=[.1,.065,.035][$]*Math.max(i.m,i.e),e=z+1,k=Q+e*2,K=c+e*2,g=new gh(-e,-e,k,K),R=d.R(g.P());
d.L2(U,j,R,g);var T=R.slice(0);for(var D=0;D<z;D++){for(var a=1;a<K-1;a++){for(var _=1;_<k-1;_++){var F=a*k+_;
T[F]=R[F-k]|R[F-1]|R[F]|R[F+1]|R[F+k]}}var I=T;T=R;R=I}var f=iw.a6(R,k,K,Math.round(i.P()*5e-4)),y=iw.zo(f),Z=new bI(1,0,0,1,-e,-e);
for(var F=0;F<y.length;F++){var v=y[F];d.A.i(v.path.j,Z,v.path.j);v.wf=d.NO.a4i(v.path);v.AJ=d.A.axJ(v.wf);
v.AJ=d.KU.agB(v.wf,v.AJ,b)}return y};d.NO.a4i=function(x){var Q=[],c=x.j,$=x.G.length-1,z=0,j=0;for(var U=0;
U<$;U++){var F=U*6,i=c[F+6]-c[F+0],b=c[F+7]-c[F+1],e=Math.ceil(Math.sqrt(i*i+b*b));for(var k=0;k<e;k++){var K=k/e,g=1-K,R=g*g*g*c[F+0]+3*g*g*K*c[F+2]+3*g*K*K*c[F+4]+K*K*K*c[F+6],T=g*g*g*c[F+1]+3*g*g*K*c[F+3]+3*g*K*K*c[F+5]+K*K*K*c[F+7];
Q.push(R,T);z=R;j=T}}Q=d.A.a6x(Q,1);var D=[],a=Q.length;for(var F=0;F<a;F+=2){var T=Q.pop(),R=Q.pop();
D.push(R,T)}return D};d.NO.aiU=function(x,Q,c,$){function z(q,h,r,H,o){var P=o[q*2]-o[h*2],O=o[q*2+1]-o[h*2+1],p=Math.sqrt(P*P+O*O);
if(r[q].indexOf(h)==-1){r[q].push(h);H[q].push(p)}if(r[h].indexOf(q)==-1){r[h].push(q);H[h].push(p)}}var j=x.length>>>1,U=new Array(j);
if(c.length==0){U.fill(0);return U}var i=new Array(j),b=new Array(j);for(var F=0;F<j;F++){i[F]=[];b[F]=[]}for(var F=0;
F<Q.length;F+=3){z(Q[F],Q[F+1],i,b,x);z(Q[F],Q[F+2],i,b,x);z(Q[F+1],Q[F+2],i,b,x)}var e=new Float64Array(j*2),k=new Uint32Array(j*2);
e.fill(1e9);var K=new Uint8Array(j);for(var g=0;g<c.length;g++){K.fill(0);var R=["---",[0,c[g]]];while(R.length!=1){var T=d.a65.Zc(R),D=T[0],a=T[1];
if(K[a]==1)continue;var _=a<<1;if(D<e[_]){e[_+1]=e[_];k[_+1]=k[_];e[_]=D;k[_]=g}else if(D<e[_+1]){e[_+1]=D;
k[_+1]=g}K[a]=1;var I=i[a],f=b[a];for(var F=0;F<I.length;F++){var y=I[F];if(K[y]!=1){d.a65.Mh(R,[D+f[F],y])}}}}for(var F=0;
F<j;F++){var _=F<<1,Z=e[_],v=e[_+1],G=1/(Z+v);U[F]=(1-Z*G)*$[k[_]]+(1-v*G)*$[k[_+1]]}return U};d.NO.aCq=function(x){var Q={G:[],j:[]},c=[x];
while(c.length!=0){var $=c.pop(),z=$.LB;if($.azn instanceof Array||$.aDq instanceof Array){Q.G.push("M","L","L","L","Z");
Q.j.push(z[0],z[1],z[2],z[1],z[2],z[3],z[0],z[3])}else c.push($.azn,$.aDq)}return Q};d.NO.i6=function(x,Q,c,$,z,j,U,i,b,e,k){var K=Math.round(e.length/3),g=new Array(K);
for(var F=0;F<K;F++)g[F]=F;g.sort(function(T,D){return b[e[T*3]]-b[e[D*3]]});for(var F=0;F<K;F++){var R=g[F]*3;
d.NO.a7B(e[R]*2,e[R+1]*2,e[R+2]*2,U,i,x,Q,c,$,z,j,k)}};d.NO.a7B=function(x,Q,c,$,z,j,U,i,b,e,k,K){var g=[x,Q,c,1.2,1.2,1.2,0],R=[0,0,0,0],T=z[x],D=z[x+1],a=z[Q],_=z[Q+1],I=z[c],f=z[c+1],y=a-T,Z=_-D,v=I-T,G=f-D,q=y*G-v*Z+1e-9,h=1/q,r=Math.max(0,Math.min(U-1,$[x])),H=Math.max(0,Math.min(U-1,$[Q])),o=Math.max(0,Math.min(U-1,$[c])),P=Math.max(0,Math.min(i-1,$[x+1])),O=Math.max(0,Math.min(i-1,$[Q+1])),p=Math.max(0,Math.min(i-1,$[c+1])),C=T<a?T<I?x:c:a<I?Q:c,W=z[C+1]+.5,J=Math.max(0,Math.floor(Math.min(T,a,I))),t=Math.min(e,Math.ceil(Math.max(T,a,I))),Y=Math.max(0,Math.floor(Math.min(D,_,f))),l=Math.min(k,Math.ceil(Math.max(D,_,f))),m=1e9;
for(var B=Y;B<l;B++){var L=B>W&&m!=1e9?m:J;m=1e9;for(var A=L;A<t;A++){var S=A+.5-T,M=B+.5-D,N=(S*G-v*M)*h,s=(y*M-S*Z)*h;
if(N>=0&&s>=0&&N+s<=1){if(m==1e9)m=A;var V=1-N-s,g8=r*V+H*N+o*s,n=P*V+O*N+p*s;if(K){var cQ=Math.floor(.5+n)*U+Math.floor(.5+g8),hk=cQ<<2,eG=B*e+A<<2;
b[eG]=j[hk];b[eG+1]=j[hk+1];b[eG+2]=j[hk+2];b[eG+3]=j[hk+3]}else{d.D.aBI(g8,n,j,U,i,R);d.NO.a0Y(R,b,B*e+A<<2)}}else if(m!=1e9)break}}};
d.NO.a0Y=function(x,Q,c){if(x[3]>250){Q[c]=~~(.5+x[0]);Q[c+1]=~~(.5+x[1]);Q[c+2]=~~(.5+x[2]);Q[c+3]=~~(.5+x[3])}else{var $=Q[c],z=Q[c+1],j=Q[c+2],U=Q[c+3],i=1-x[3]*(1/255);
Q[c]=~~(.5+x[0]+$*i);Q[c+1]=~~(.5+x[1]+z*i);Q[c+2]=~~(.5+x[2]+j*i);Q[c+3]=~~(.5+x[3]+U*i)}};d.NO.a9P=function(){var x=function(c,$,z,j){var U=j[0],i=j[1],b=j[2],e=c[U+0],k=c[U+1],K=c[i+0],g=c[i+1],R=c[b+0],T=c[b+1],D=K-e,a=g-k,_=R-e,I=T-k,f=$-e,y=z-k,Z=D*I-_*a,v=1/(Z+1e-9),G=(f*I-_*y)*v,q=(D*y-f*a)*v;
if(G>=0&&q>=0&&G+q<=1){j[3]=1-G-q;j[4]=G;j[5]=q;return 1}return 0},Q=function(c,$,z,j){var U=[0,0,0,0,0,0];
for(var F=0;F<$.length;F+=3){U[0]=$[F]*2;U[1]=$[F+1]*2;U[2]=$[F+2]*2;if(x(c,z,j,U)==1)return!0}return!1};
return{a9n:x,a0c:Q}}();d._W={};d._W.a3w=function(x,Q,c,$){x=x.slice(0);if($)d.Dm($,x,3);else for(var F=0;
F<x.length;F+=4)x[F+3]=0;var z=d.R(Q*c*4),j=!1;d.D.KL(x,Q,c,z,[c,Q,0,1,0,1,0,0]);return[d._W.ck(x,Q,c,j),d._W.ck(z,c,Q,j)]};
d._W.i=function(x,Q){var c=!1,$=x[0],z=x[1],j=$[1],U=$[2],i=$[3],b=Q.m,e=Q.e;if(U==b&&i==e)j=j.slice(0);
else if(i!=e){var k=d.R(U*e*4);d._W.au(z,e,k,c);j=d.R(U*e*4);d.D.KL(k,e,U,j,[U,e,0,1,0,1,0,0]);if(U!=b){$=d._W.ck(j,U,e,c);
j=d.R(b*e*4);d._W.au($,b,j,c)}}else if(U!=b){j=d.R(b*i*4);d._W.au($,b,j,c)}for(var F=0;F<j.length;F+=4)j[F+3]=255;
return j};d._W.ck=function(x,Q,c,$){var z=Date.now(),j=new Uint16Array(Q*c),e=1;d._W.aBk(x,Q,c,j);var U=d.R(Q*c);
d.GS(x,U,3);for(var i=0;i<c;i++)for(var b=0;b<Q;b++)j[i*Q+b]+=Math.floor((65535-j[i*Q+b])*U[i*Q+b]*(1/255));
var k=Math.ceil(Q/e),K=new Uint32Array(e),g=new Uint32Array(e),k=Math.floor(Q/e);for(var R=0;R<e;R++)g[R]=R<e-1?k:Q-(e-1)*k;
for(var i=0;i<c;i++){var F=i*Q;for(var R=0;R<e;R++){var k=g[R];for(var b=0;b<k;b++)K[R]+=j[F+b];F+=k}}if($){console.log(Date.now()-z,"cost");
z=Date.now()}var T=new Uint32Array(Q),D=new Uint32Array(Q),a=new Uint32Array(Q*c);for(var b=0;b<Q;b++){a[(c-1)*Q+b]=j[(c-1)*Q+b]}for(var i=c-2;
i>=0;i--){var _=i*Q;for(var R=0;R<e;R++){var k=g[R];a[_]=j[_]+Math.min(a[_+Q],a[_+Q+1]);for(var b=1;
b<k-1;b++){var F=_+b;a[F]=j[F]+Math.min(a[F+Q-1],Math.min(a[F+Q],a[F+Q+1]))}_+=k-1;a[_]=j[_]+Math.min(a[_+Q-1],a[_+Q]);
_++}}if($){console.log(Date.now()-z,"Building M");z=Date.now()}function I(o,P){return o<P?o:P}function f(F,o){var P=D[F],O=a[o],p=~~(P*O*1e-4);
return p}var y=new Uint8Array(Q*c),Z=new Uint32Array(Q);for(var F=0;F<Q;F++){T[F]=F;D[F]=j[F]}for(var i=1;
i<c;i++){var v=0,_=i*Q;for(var R=0;R<e;R++){var k=g[R],F=_;Z[v]=f(v,F);var G=Z[v]+f(v+1,F+1),q=f(v,F+1)+f(v+1,F);
Z[v+1]=I(G,q);for(var b=2;b<k;b++){var F=_+b,h=Z[v+b-1]+f(v+b-1,F-1),r=Z[v+b-2]+f(v+b-1,F-2)+f(v+b-2,F-1);
Z[v+b]=I(h,r)}var b=k-1;while(b>=2){var F=_+b,h=Z[v+b-1]+f(v+b-1,F-1),r=Z[v+b-2]+f(v+b-1,F-2)+f(v+b-2,F-1);
if(Z[v+b]==h){y[F-Q]=1;b-=1}else{y[F-Q]=0;y[F-Q-1]=2;b-=2}}var F=_;if(b==0){y[F-Q]=1}else{if(Z[v+1]==G){y[F+1-Q]=1;
y[F-Q]=1}else{y[F+1-Q]=0;y[F-Q]=2}}_+=k;v+=k}d._W.ayb(i,Q,y,j,T,D,!0,z)}if($){console.log(Date.now()-z,"Matching");
z=Date.now()}var H=j;return[UZIP.adler(x,0,x.length),x,Q,c,e,g,K,T,D,y,H]};d._W.au=function(x,Q,c,$){var z=x.slice(0),j=z.shift(),U=z.shift(),i=z.shift(),b=z.shift(),e=z.shift(),k=z.shift(),K=z.shift(),g=z.shift(),R=z.shift().slice(0),T=z.shift(),D=z.shift(),a=Date.now(),_=Math.abs(i-Q),I=Math.floor(_/e),f=new Uint32Array(e),Z=0,v=1e9,q=0,h=0,r=0;
for(var y=0;y<e;y++)f[y]=y<e-1?I:_-(e-1)*I;D.fill(0);for(var G=0;G<i;G++){Z=Math.max(Z,R[G]);v=Math.min(v,R[G])}for(var y=0;
y<e;y++){var H=k[y],I=f[y];for(var o=0;o<I;o++){var P=0,O=1e9;for(var G=0;G<H;G++)if(R[h+G]<O){O=R[h+G];
P=h+G}if(Q<i)R[P]=1e9;else R[P]*=1.2;if(r<i/3)q+=O;var p=g[P],C=D[p],W=C<65280?65280:C+1;if(W<65280)throw"e";
for(var J=0;J<b;J++){var F=J*i+p;D[F]=W;p+=T[F]-1}r++}h+=H}if($){console.log(Date.now()-a,"Removing best seams");
a=Date.now()}function t(F,l){var m=F<<2,B=l<<2;c[m]=U[B];c[m+1]=U[B+1];c[m+2]=U[B+2];c[m+3]=U[B+3]}for(var J=0;
J<b;J++){var Y=0,F=J*i;for(var G=0;G<Q;G++,Y++){if(Q<i){while(D[F+Y]==65280)Y++;t(J*Q+G,J*i+Y)}else{t(J*Q+G,J*i+Y);
while(D[F+Y]>=65280){D[F+Y]--;G++;t(J*Q+G,J*i+Y)}}}}if($){console.log(Date.now()-a,"Shifting image pixels");
a=Date.now()}};d._W.ayb=function(x,Q,c,$,z,j){var U=0,F=x*Q;while(U<Q){if(c[F-Q]==1){j[U]=j[U]+$[F];
U++;F++}else{var i=z[U];z[U]=z[U+1];z[U+1]=i;var b=j[U];j[U]=j[U+1]+$[F];j[U+1]=b+$[F+1];U+=2;F+=2}}};
d._W.aBk=function(x,Q,c,$){function z(x,F,b){var K=F<<2,g=b<<2,R=x[K]-x[g],T=x[K+1]-x[g+1],D=x[K+2]-x[g+2];
return Math.abs(R)+Math.abs(T)+Math.abs(D)}for(var j=1;j<Q;j++){var U=z(x,j,j-1);$[j-1]+=U;$[j]+=U}for(var i=1;
i<c;i++){var b=i*Q,U=z(x,b,b-Q);$[b]+=U;$[b-Q]+=U;for(var j=1;j<Q;j++){var F=i*Q+j,e=z(x,F,F-1),k=z(x,F,F-Q);
$[F-Q]+=k;$[F-1]+=e;$[F]+=k+e}}for(var i=0;i<c;i++){$[i*Q]*=2;$[i*Q+Q-1]*=2}for(var F=0;F<$.length;F++)if($[F]==0)$[F]=1};
d.rs=function(){function x(){return 1953e6+Math.floor(Math.random()*999999)}function Q(O,p){var C=p[0]-O[0],W=p[1]-O[1];
return C*C+W*W}function c(O,p,C,W,J,t,Y,l){var m=C-O,B=W-p,L=d.A.Ad(O,p,m,B,J,t,Y-J,l-t),A=[O+L*m,p+L*B],S=L>0?[[[O,p],A,!1,0,1],[[J,t],A,!1,0,5]]:[[[C,W],A,!1,0,1],[[Y,l],A,!1,0,5]];
return S}function $(O,p){var C=c(O[0],O[1],O[2],O[3],O[6],O[7],O[4],O[5]),W=c(O[0],O[1],O[6],O[7],O[2],O[3],O[4],O[5]),J=[C,W],t=[C[0][1],W[0][1]];
for(var F=0;F<2;F++){var Y=t[1-F],l=J[F];if(Q(l[0][0],Y)<Q(l[1][0],Y)){var m=l[0];l[0]=l[1];l[1]=m}}var B=[x(),0,-1,0,[0,0],C[0],C[1],W[0],W[1]],L=Z(B,p),A=L[1][0];
B[3]=A;B[4]=L[0][A];B[5][3]=B[6][3]=L[0].indexOf(B[5][1]);B[7][3]=B[8][3]=L[0].indexOf(B[7][1]);if((B[6][3]+1)%3!=B[7][3]){var m=B[5];
B[5]=B[7];B[7]=m;var m=B[6];B[6]=B[8];B[8]=m}for(var F=0;F<4;F++)B[5+F][4]=[1,5,7,3][F];return B}function z(O){var p=O[5],C=O[8],W=O[6],J=p[0],t=C[0],Y=W[0],l=p[1],m=C[1],B=t[0],L=t[1],A=m[0]-B,S=m[1]-L,M=d.A.Ad(B,L,A,S,Y[0],Y[1],l[0]-Y[0],l[1]-Y[1]);
return[J[0],J[1],B,L,B+M*A,L+M*S,Y[0],Y[1]]}function j(O,p){return O[0]==p[0]&&O[1]==p[1]}function U(O){return{1:0,5:1,7:2,3:3}[O]}function i(O,p,C){var W=p[5+U(O)],J=W[1],t=W[0][0]-J[0],Y=W[0][1]-J[1],l=Math.sqrt(t*t+Y*Y);
t/=l;Y/=l;for(var m=0;m<C.length;m++){var B=C[m];if(B[0]!=p[1]&&B[1]!=p[0])continue;for(var F=0;F<4;
F++){var L=B[5+F],A=L[0];if(!j(J,L[1]))continue;var S=A[0]-J[0],M=A[1]-J[1];l=Math.sqrt(S*S+M*M);S/=l;
M/=l;var N=S*t+M*Y;if(Math.abs(N-1)<1e-7)return!0}}return!1}function b(O,p){d.D.i(O,p);return p}function e(O,p){var C=[];
for(var W=0;W<O.length;W++){var J=O[W],t=J[1];for(var Y=0;Y<t.length;Y++){if(p&&p[W].indexOf(Y)==-1)continue;
var l=t[Y],m=[],B=d.D.u_(z(l),new gh(0,0,1,1));for(var F=1;F<=7;F+=2){m[F]=i(F,l,t)}if(!m[1]){if(!m[7])C.push([b(B,[0,0]),W,Y,0]);
C.push([b(B,[.5,0]),W,Y,1])}if(!m[3]){if(!m[1])C.push([b(B,[1,0]),W,Y,2]);C.push([b(B,[1,.5]),W,Y,3])}if(!m[5]){if(!m[3])C.push([b(B,[1,1]),W,Y,4]);
C.push([b(B,[.5,1]),W,Y,5])}if(!m[7]){if(!m[5])C.push([b(B,[0,1]),W,Y,6]);C.push([b(B,[0,.5]),W,Y,7])}}}return C}function k(O){var p=O.length-2,C=0;
for(var F=0;F<p;F+=2)C+=(O[F+2]-O[F])*(O[F+1]+O[F+3]);C+=(O[0]-O[p])*(O[p+1]+O[1]);return-C*.5}function K(O,p,C,W){}function g(O,F){var p=O[F+2&7]-O[F&7],C=O[F+3&7]-O[F+1&7],W=1/Math.sqrt(p*p+C*C);
return[p*W,C*W]}function R(O){var p=O[2];O[2]=O[6];O[6]=p;var p=O[3];O[3]=O[7];O[7]=p}function T(O,p,C,W){if(W==null)W=0;
var J=p[1],t=z(p),M=null,N,n,cQ,fj,ja,S,eD;if(J==0){if(k(t)<0)R(t);var Y=6,l=t[7]+t[1];for(var F=0;F<6;
F+=2){var m=t[F+1]+t[F+3];if(m<l){l=m;Y=F}}t=t.slice(Y).concat(t.slice(0,Y));var B=X.r7.DE(t,C[0],C[1]),L=Math.sqrt(Q(t,t.slice(2))),A=Math.sqrt(Q(t.slice(4),t.slice(6))),S=(L+A)*.5;
return[t,new gh(0,0,S,S/B)]}for(var F=0;F<O.length&&M==null;F++){N=O[F][1];for(var s=0;s<N.length&&M==null;
s++)if(N[s][0]==J)M=N[s]}var V=T(O,M,C,W+1),g8=V[0];V=V[1];for(var F=0;F<8;F+=2){var hk=g8[F&7],eG=g8[F+1&7],ie=g8[F+2&7],eN=g8[F+3&7];
for(var s=0;s<8;s+=2){var gr=t[s],ek=t[s+1],jK=t[s+2&7],iE=t[s+3&7],e9=Math.abs(d.A.bV(hk,eG,ie,eN,gr,ek))+Math.abs(d.A.bV(hk,eG,ie,eN,jK,iE));
if(e9<=30){n=s;cQ=F}}}var dm=g(g8,cQ),kD=g(t,n),gJ=dm[0]-kD[0],dR=dm[1]-kD[1],fO=gJ*gJ+dR*dR;if(fO<.001){R(t);
n={0:6,2:4,4:2,6:0}[n]}while(n!=(cQ+4&7)){t.unshift(t.pop());n=n+1&7}var B=X.r7.DE(t,C[0],C[1]),ko=d.D.u_(g8,V);
ko=d.D.HQ(ko);var d8=[t[n],t[n+1],t[n+2&7],t[n+3&7]];d.D.i(ko,d8);var d3=d.A.pA(d8);if(cQ==0||cQ==4){S=d3.m;
eD=S/B;fj=d3.x;ja=d3.y+(cQ==0?-eD:0)}else{eD=d3.e;S=eD*B;ja=d3.y;fj=d3.x+(cQ==6?-S:0)}return[t,new gh(fj,ja,S,eD)]}function D(O,p){function C(A,S,M,N){var s=b(A,[S,M]);
s.push(N);return s}var W=[];for(var J=0;J<O.length;J++){var t=O[J],Y=t[1];for(var l=0;l<Y.length;l++){var m=Y[l],B=T(O,m,p),L=B[0],A=d.D.u_(L,new gh(0,0,1,1));
W.push(C(A,.5,0,1));W.push(C(A,1,.5,3));W.push(C(A,.5,1,5));W.push(C(A,0,.5,7));W.push(C(A,.5,.5,[B?(B[1].m/B[1].e).toFixed(2):""].join(", ")))}}return W}function a(O,p,C,W){var J=[p],t=[p];
while(!0){var Y=[];for(var F=0;F<O.length;F++){var l=O[F],m=!1;for(var B=0;B<J.length;B++){if(l[1]==O[J[B]][0]||l[0]==O[J[B]][1])Y.push(F)}}var L=J.length;
for(var F=0;F<Y.length;F++){var A=Y[F],l=O[A];if(t.indexOf(A)!=-1)continue;t.push(A);var S=T([[10,O]],l,W);
if(S[1].dM(C))J.push(A)}if(L==J.length)break}return J}function _(O,p,C){var W=C[0],J=C[1],t=p.x-O[0],Y=p.y-O[1],l=d.A.Ad(O[0],O[1],t,Y,J[0],J[1],W[0]-J[0],W[1]-J[1]);
return[O[0]+l*t,O[1]+l*Y]}function I(O,p,C){O=JSON.parse(JSON.stringify(O));var W=O[p[1]][1][p[2]],J=p[3]>=8,t=p[3]&7;
if((t&1)==0)return O;var Y=U(t);if(t==1||t==7){var l=W[5+Y],m=W[5+2-Y],B=W[5+(t==1?3:1)],L=W[5+(t==1?1:3)],A=l[1],S=_(A,C,m);
if(!J&&Q(S,m[1])<Q(L[0],m[1]))return O;l[0]=m[0]=S;B[0]=_(A,C,B)}else{var B=W[5+Y],A=B[1],l=W[5+(t==3?0:2)],S=_(A,C,l);
if(!J&&Q(S,l[1])>Q(l[0],l[1]))return O;if(Math.sign(l[1][0]-l[0][0])!=Math.sign(l[1][0]-S[0]))return O;
B[0]=S}return O}function f(O,p,C){var W=p[0]-O[0],J=p[1]-O[1],t=d.A.Ad(C[0],C[1],-J,W,O[0],O[1],W,J);
return[C[0]-J*t,C[1]+W*t]}function y(O,p,C){var W=C[0],J=C[1],b=f(O,p,C),t=b[0],Y=b[1],l=f(O,C,p),m=d.A.Ad(t,Y,W-t,J-Y,p[0],p[1],l[0]-p[0],l[1]-p[1]);
return[t+(W-t)*m,Y+(J-Y)*m]}function Z(O,p){var C=O[5][1],W=O[7][1],J=y(C,W,p),t=[C,W,J];t.sort(function(m,B){return m[0]-B[0]});
if(k([t[0][0],t[0][1],t[1][0],t[1][1],t[2][0],t[2][1]])<0){var Y=t[1];t[1]=t[2];t[2]=Y}var l=[t.indexOf(C),t.indexOf(W),t.indexOf(J)];
return[t,l]}function v(O,p,C){O=JSON.parse(JSON.stringify(O));var W=p[1],J=O[W][1][p[2]],t=p[3];if((t&1)!=1)return O;
var Y=Z(J,C),l=Y[1][2],m=Y[0][l],B=JSON.parse(JSON.stringify(J));O[W][1].push(B);B[0]=x();B[1]=J[0];
B[2]=-10+t;B[3]=l;B[4]=m;if(t==1||t==5){B[7][3]=B[8][3]=l;B[7][1]=B[8][1]=m;if(t==5){B[5][0]=B[7][0]=J[6][0];
B[8][0]=z(J).slice(4,6)}}else{B[5][3]=B[6][3]=l;B[5][1]=B[6][1]=m;if(t==3){B[5][0]=B[7][0]=J[8][0];B[6][0]=z(J).slice(4,6)}}return O}function G(O,p,C){O=JSON.parse(JSON.stringify(O));
var W=p[1],J=O[W][1][p[2]],t=J[2]+10,Y=t+4&7,l=t==1||t==5,m=J[5+U(l?7:1)][1],B=J[5+U(Y)][0],L=J[5+U(t)][0];
J[2]=(l?90:0)+(Q(B,m)<Q(L,m)?180:0);var A=$(z(J),C);for(var F=5;F<9;F++)J[F]=A[F];return O}function q(O,p,C){var jF=O.length>>1,W,J=O[2*jF-3]-C,t=O[2*jF-2]-p,Y=O[2*jF-1]-C,l=!1,m=0;
for(var F=0;F<jF;F++){W=t;J=Y;t=O[2*F]-p;Y=O[2*F+1]-C;if(J==Y)continue;l=Y>J}for(var F=0;F<jF;F++){W=t;
J=Y;t=O[2*F]-p;Y=O[2*F+1]-C;if(J<0&&Y<0)continue;if(J>0&&Y>0)continue;if(W<0&&t<0)continue;if(J==Y&&Math.min(W,t)<=0)return!0;
if(J==Y)continue;var B=W+(t-W)*-J/(Y-J);if(B==0)return!0;if(B>0)m++;if(J==0&&l&&Y>J)m--;if(J==0&&!l&&Y<J)m--;
l=Y>J}return(m&1)==1}function h(O,p,C,W,J){var t=null;for(var Y=0;Y<O.length;Y++){var l=O[Y][1];for(var m=0;
m<l.length;m++){var B=z(l[m]);if(q(B,p,C)||J&&J[0]==Y&&J[1]==m&&t==null){t=[Y,m];if(W){var L=T(O,l[m],W),A=d.D.u_(L[0],L[1]),S=[p,C];
A=d.D.HQ(A);d.D.i(A,S);t.push(S)}}}}return t}function r(O,p){for(var C=0;C<O.length;C++){var W=O[C][1],J=p[C];
if(J.length==0)continue;var t=H(W,J);for(var Y=0;Y<W.length;Y++){if(t.indexOf(W[Y][0])!=-1){W.splice(Y,1);
Y--}}}for(var C=0;C<O.length;C++)if(O[C][1].length==0){O.splice(C,1);C--}return O}function H(O,p){var C=[];
for(var F=0;F<10;F++)for(var W=0;W<O.length;W++){var J=O[W];if(p.indexOf(W)!=-1||C.indexOf(J[1])!=-1)if(C.indexOf(J[0])==-1)C.push(J[0])}return C}function o(O){var p=w.mt(O,0,O.length),C=p.split("\n").slice(1);
function W(){return parseFloat(C.shift())}function J(){var gr=[W(),W()];t(1);return gr}function t(jF){for(var F=0;
F<jF;F++)C.shift()}var Y=[],l=W();for(var m=0;m<l;m++){var B=W(),L=W(),A=[];Y.push([B,A]);for(var S=0;
S<L;S++){var M=W(),N=W(),s=W(),V=W(),g8=J(),n=[M,N,s,V,g8];A.push(n);for(var F=0;F<4;F++){var cQ=J(),hk=J(),eG=W()==1,ie=W(),eN=W();
n.push([cQ,hk,eG,ie,eN])}}}return Y}function P(O){function p(L){C.push(L[0],L[1],"")}var C=["tNaF203"];
C.push(O.length);for(var W=0;W<O.length;W++){C.push(O[W][0]);var J=O[W][1];C.push(J.length);for(var t=0;
t<J.length;t++){var Y=J[t];C.push(Y[0],Y[1],Y[2],Y[3]);p(Y[4]);for(var F=0;F<4;F++){var l=Y[5+F];p(l[0]);
p(l[1]);C.push(l[2]?1:0,l[3],l[4])}}}var m=C.join("\n"),B=new Uint8Array(m.length);w.f3(B,0,m);return B}return{s5:o,o5:P,aib:z,adx:$,hZ:e,ahx:I,Lt:D,ai8:function(O,p){return p&&(p[3]&1)==0&&O[p[1]][1].length==1},uP:function(O,p){return p&&(p[3]&1)==1},XI:T,aCZ:v,acM:G,atI:r,ze:H,Ka:h,Bh:a}}();
d.abv=function(){var x=0,Q=0,$=15,j=256;function c(k,K,g,R,T,D){var a=(T-1)*K,_=D*K;return k[_+R]-k[_+g-1]-k[a+R]+k[a+g-1]}var z=Math.round($/8),U=[];
function i(k,K){for(var g=0;g<K.length;g++){var R=K[g],T=0,D=0,a=k[R.Th],_=a.XC,I=a.ww,f=a.R0;for(var y=-$;
y<=$;y++)for(var Z=-$;Z<=$;Z++){var v=Z+R.awc,G=y+R.a4I;if(Z*Z+y*y>$*$||v<0||G<0||v>=I||G>=I)continue;
var q=_[G*I+v];T+=Z*q;D+=y*q}R.fN=Math.atan2(D,T)}}function b(k,K,g,R,T){var D=~~(k+.5),a=~~(K+.5);return c(g,R,D-z,D+z,a-z,a+z)}function e(k,K,g,R,T){x=R;
Q=T;if(U.length==0){var D=new d.l.Zg(16200817),f=8,y=0;function a(g8){var r=g8[0]-g8[2],H=g8[1]-g8[3];
return r*r+H*H}function _(){var g8=0,n=0;while(g8===0)g8=D.get();while(n===0)n=D.get();return Math.sqrt(-2*Math.log(g8))*Math.cos(2*Math.PI*n)}var I=_,Z=[];
while(y!=j){var v=Math.max(-$,Math.min($,I()*f)),G=Math.max(-$,Math.min($,I()*f)),q=Math.max(-$,Math.min($,I()*f)),h=Math.max(-$,Math.min($,I()*f)),r=v-q,H=G-h,o=Math.sqrt(r*r+H*H);
if(o<3||o>12)continue;U.push(v,G,q,h);y++}}var P=20;for(var O=0;O<K.length;O++){var p=K[O],C=k[p.Th],W=C.Hz,g=C.XC,R=C.ww,T=C.R0,J=p.awc,t=p.a4I,Y=p.fN,l=Math.cos(Y),m=Math.sin(Y),B=new Uint8Array(j>>>3);
p.dx=B;for(var F=0;F<j;F++){var L=F*4,v=U[L+0],G=U[L+1],q=U[L+2],h=U[L+3],A=l*v-m*G,S=m*v+l*G,M=l*q-m*h,N=m*q+l*h,s=b(J+A,t+S,W,R,T),V=b(J+M,t+N,W,R,T);
B[F>>>3]|=(s<V?0:1)<<(F&7)}}}return{aeO:i,amU:e}}();d.a1O=function(){function x(Q,c){var $=[[9]],z=Date.now(),j=[];
for(var U=0;U<Q.length;U++){var i=Q[U],b=i.Hz,e=i.ww,k=i.R0,R=9,f=1,p=24;if(b==null)continue;var K=new Float32Array(e*k),g=new Uint8Array(e*k),T=R>>>1,D=T>>>1,a=Math.round(R/3);
if(a!=R/3)throw"e";var _=1/(R*R),I=1.2*(R/9);for(var y=T+1;y<k-T;y+=f)for(var Z=T+1;Z<e-T;Z+=f){var v=d.WA(b,e,Z-D,Z+D,y-T,y+T)-3*d.WA(b,e,Z-D,Z+D,y-T+a,y+T-a),G=d.WA(b,e,Z-T,Z+T,y-D,y+D)-3*d.WA(b,e,Z-T+a,Z+T-a,y-D,y+D),q=Z-T+1,h=Z+T-1,r=y-T+1,H=y+T-1,o=d.WA(b,e,q,Z-1,r,y-1)+d.WA(b,e,Z+1,h,y+1,H)-d.WA(b,e,Z+1,h,r,y-1)-d.WA(b,e,q,Z-1,y+1,H),P=(G*v-.9*o*(.9*o))*(_*_);
K[y*e+Z]=Math.abs(P);g[y*e+Z]=P<0?0:1}var O=e*f;for(var y=p;y<k-p;y+=f)for(var Z=p;Z<e-p;Z+=f){var F=y*e+Z,C=K[F];
if(C<16)continue;if(K[F-f]>=C||K[F+f]>=C)continue;if(K[F-O-f]>=C||K[F-O]>=C||K[F-O+f]>=C)continue;if(K[F+O-f]>=C||K[F+O]>=C||K[F+O+f]>=C)continue;
j.push({x:~~(Z*i.i8+.5),y:~~(y*i.i8+.5),awc:Z,a4I:y,Th:U,b:C,aCm:g[F],ks:I})}}if(c!=null){j.sort(function(L,A){return A.b-L.b});
j=j.slice(0,c)}return j;var W=[];for(var F=0;F<j.length;F++){var J=!0,t=j[F];for(var Y=0;Y<j.length;
Y++){var l=j[Y];if(Y!=F&&l.b>t.b&&(l.Th==t.Th+1||l.Th==t.Th-1)){var m=t.x-l.x,B=t.y-l.y;if(m*m+B*B<5){J=!1;
break}}}if(J)W.push(t)}console.log(j.length,W.length);return W}return{ap2:x}}();d.zQ={};d.zQ.aas=function(x){var Q=x.length,c=d.zQ.aBO(x,!1),z=0,j=1;
throw"e";var $=[];for(var F=0;F<Q;F++)$[F]=d.zQ.axf(c[F]);var U=x[0][1],i=d.zQ.match(c[z],c[j],$[j]);
console.log(i.length);var b=Math.max(Math.min(i.length,40),i.length*.54);b=Math.min(b,200);var e=i.slice(0,b),k=d.UP.alq(c[z],c[j],e,U.m,U.e),K=d.UP.a9V(k,[0,0,0],1),g=U.m/2,R=U.e/2,T=1/Math.max(g,R);
for(var F=0;F<1;F++){var D=e[F],a=c[z][D[0]],_=c[j][D[1]],I=d.UP.alp(K,T*(a.x-g),T*(a.y-R),T*(_.x-g),T*(_.y-R))}var f=d.UP.a0E(k,U),y=[];
for(var F=0;F<2;F++){var Z=f[F],v=[Z[0][0],Z[0][1],Z[0][2],Z[1][0],Z[1][1],Z[1][2],Z[2][0],Z[2][1]],G=X.Y.av(x[F],null,v);
y.push([G.buffer,G.rect])}return[d.zQ.a5X(y[0],y[1],c[z],c[j],e,k,f,U)]};d.zQ.ez=function(x,Q){var c=x.length,$=!1,z=Date.now(),j=d.zQ.aBO(x,!1,1e4);
if($)console.log("Descriptors ready",Date.now()-z);z=Date.now();for(var F=0;F<c;F++){var U=x[F][1];for(var i=0;
i<j[F].length;i++){j[F][i].x+=U.x;j[F][i].y+=U.y}}if($)console.log("shifted",Date.now()-z);z=Date.now();
var b=[];for(var F=0;F<c;F++)b[F]=d.zQ.axf(j[F]);if($)console.log("trees built",Date.now()-z);z=Date.now();
var e=[];for(var F=0;F<c-1;F++)for(var i=F+1;i<c;i++){var k=d.zQ.match(j[F],j[i],b[i]);if($)console.log("Matches found",F,i,k.length);
k=k.slice(0,k.length>>>1);if(k.length<10)continue;var K=d.zQ.a0q(j[F],j[i],k,2);e.push([F,i,k,K])}e.sort(function(h,r){return r[2].length-h[2].length});
if($)console.log("Matches found",Date.now()-z);z=Date.now();var g=[],R=new UnionFind(c);for(var F=0;
F<e.length;F++){var T=e[F],D=R.find(T[0]),a=R.find(T[1]);if(D!=a){g.push(T);R.link(D,a)}}var _=[];for(var F=0;
F<c;F++)_[F]=[1,0,0,0,1,0,0,0];var I=[0],f=new Uint8Array(c);f[I[0]]=1;while(I.length!=0){var a=I.pop(),K=_[a],y=[];
for(var F=0;F<g.length;F++){var T=g[F],Z=T[0],v=T[1];if(Z==a&&f[v]==0){_[v]=d.D.Vi(K,T[3]);I.push(v);
f[v]=1}if(v==a&&f[Z]==0){_[Z]=d.D.Vi(K,d.D.HQ(T[3]));I.push(Z);f[Z]=1}}}if(Q==null){var G=[];for(var F=0;
F<c;F++)G.push([_[F][2],F]);G.sort(function(h,r){return h[0]-r[0]});Q=G[G.length>>>1][1]}var q=d.D.HQ(_[Q]);
for(var F=0;F<c;F++)_[F]=d.D.Vi(_[F],q);if($)console.log("Transforms reordered",Date.now()-z);z=Date.now();
return _};d.zQ.aBO=function(x,Q,c){var $=[],z=!1;for(var F=0;F<x.length;F++){var j=x[F][0],U=x[F][1],i=U.m,b=U.e,e=d.R(U.P());
d._8(j,e);var k=Date.now(),K=d.zQ.aqB(e,U,!0);if(z)console.log("Pyramid built ---------------",Date.now()-k);
k=Date.now();var g=d.a1O.ap2(K,c);if(z)console.log("SURF Generation",Date.now()-k);k=Date.now();if(!Q){d.abv.aeO(K,g);
if(z)console.log("ORB Orientations",Date.now()-k);k=Date.now();d.abv.amU(K,g,e,i,b);if(z)console.log("ORB Descriptors",Date.now()-k);
k=Date.now()}$.push(g)}return $};d.zQ.aqB=function(x,Q,c){var $=[],z=[x,Q];d.t8(z);if(c){var j=d.anv(x,Q),U=j.rect,i=[j.AX,U];
d.t8(i)}for(var F=0;F<z.length;F++){var b=z[2*F],e=z[2*F+1],k=e.m,K=e.e,g=Math.min(k,K);if(g<30)break;
if(g<1600)$.push({XC:b,ww:k,R0:K,i8:1<<F,Hz:d.l8(b,k,K)});if(!c)continue;var b=i[2*F],e=i[2*F+1],k=e.m,K=e.e,g=Math.min(k,K);
if(g<30)break;if(g<1600)$.push({XC:b,ww:k,R0:K,i8:(1<<F)*3/2,Hz:d.l8(b,k,K)})}return $};d.zQ.a0q=function(x,Q,c,$){var z=Date.now(),j,U=0,i=0,b=c.length,e=new Float64Array(2);
for(var k=0;k<3e3;k++){var K=~~(Math.random()*b),g=~~(Math.random()*b),R=~~(Math.random()*b),T=~~(Math.random()*b),O=0,p=0;
if(K==g||K==R||K==T||g==R||g==T||R==T)continue;var D=c[K],a=c[g],_=c[R],I=c[T],f=x[D[0]],y=Q[D[1]],Z=x[a[0]],v=Q[a[1]],G=x[_[0]],q=Q[_[1]],h=x[I[0]],r=Q[I[1]],H=[f.x,f.y,Z.x,Z.y,G.x,G.y,h.x,h.y],o=[y.x,y.y,v.x,v.y,q.x,q.y,r.x,r.y],P=d.D.asA(H,o);
if(P[0]==0&&P[1]==0&&P[3]==0&&P[4]==0)continue;var C=b-U+2;for(var F=0;F<b&&F-O<C;F++){var W=x[c[F][0]],J=Q[c[F][1]];
d.D.YO(J.x,J.y,P,e);var t=e[0]-W.x,Y=e[1]-W.y,l=t*t+Y*Y;if(l<$){O++;p+=l}}if(O>U||O==U&&p<i){j=P;U=O;
i=p}}return j};var au=new Uint8Array(256);for(var F=0;F<256;F++){var fu=0,jF=F;while(jF!=0){jF=jF&jF-1;
fu++}au[F]=fu}d.zQ.amV=function(x,Q,c){var $=0,z=x.length;for(var F=0;F<z&&$<c;F++)$+=au[x[F]^Q[F]];
return $};d.zQ.azW=function(x,Q,c,top,$){if($[c]==1)return;var z=d.zQ.amV(x.dx,Q.dx,top[0]);if(z<top[0]){if(z<top[2]){top[0]=top[2];
top[1]=top[3];top[2]=z;top[3]=c}else{top[0]=z;top[1]=c}}$[c]=1};d.zQ.axf=function(x){var Q=[],c=[],$=[[],[]],z=4;
for(var F=0;F<x.length;F++)(x[F].aCm==0?Q:c).push(F);for(var j=0;j<2;j++){var U=new Array(z),i=[],b=j==0?Q:c,e=b.length/256,k=[];
for(var K=0;K<32;K++){var g=new Array(256),D=0;for(var R=0;R<256;R++)g[R]=[];for(var R=0;R<b.length;
R++){var T=b[R];g[x[T].dx[K]].push(T)}for(var R=0;R<256;R++)D+=Math.abs(g[R].length-e);k.push([D,K,g])}k.sort(function(a,_){return a[0]-_[0]});
var i=[],U=[];$[j]=[i,U];for(var F=0;F<z;F++){i.push(k[F][1]);U.push(k[F][2])}}return $};d.zQ.match=function(x,Q,c){var $=[],z=new Uint16Array(Q.length);
z.fill(65535);var j=new Uint8Array(Q.length),top=new Uint32Array(4),U=[];for(var i=0;i<x.length;i++){var b=x[i],e=b.dx;
top.fill(1e6);j.fill(0);var k=c[b.aCm];for(var K=0;K<k[1].length;K++){var g=k[1][K][e[k[0][K]]];for(var R=0;
R<g.length;R++){var T=g[R];d.zQ.azW(b,Q[T],T,top,j)}}if(top[2]<50&&top[2]<top[0]*.5){var D=z[top[3]];
if(D==65535){z[top[3]]=$.length;$.push([i,top[3],top[2]])}else if(top[2]<$[D][2]){$[D]=[i,top[3],top[2]]}}}$.sort(function(a,_){return a[2]-_[2]});
return $};d.zQ.aac=function(x){var Q=new gh;for(var F=0;F<x.length;F++)Q=Q.iO(x[F][1]);var c=d.R(Q.P()*4);
for(var F=0;F<x.length;F++)d.l.UY("norm",x[F][0],x[F][1],c,Q,Q,1);return[c,Q]};d.zQ.a5X=function(x,Q,c,$,z,j,U,i){var b=x[1].clone(),e=b.clone();
b.x=b.y=0;var k=Q[1].clone(),K=k.clone();k.x=k.y=0;k.x=b.m;var g=b.iO(k),R=K.y-e.y,T=d.R(g.P()*4);d.WK(x[0],b,T,g);
d.WK(Q[0],new gh(k.x,k.y+R,k.m,k.e),T,g);var D=document.createElement("canvas");D.width=g.m;D.height=g.e;
var a=D.getContext("2d");a.lineWidth=.5;a.putImageData(new ImageData(new Uint8ClampedArray(T.buffer),g.m,g.e),0,0);
if(j){var _=j[0],I=d.BS.Ny(_),f=b.m,y=i.m;for(var F=0;F<z.length;F++){var Z=z[F],x=c[Z[0]],Q=$[Z[1]];
a.strokeStyle="#"+"ff0000";a.beginPath();var v=d.UP.a84(I,U[0],Q,0,y),G=d.UP.a84(_,U[1],x,0,y);a.moveTo(-e.x+v[0],-e.y+v[1]);
a.lineTo(-e.x+v[2],-e.y+v[3]);a.moveTo(f-K.x+G[0],-K.y+R+G[1]);a.lineTo(f-K.x+G[2],-K.y+R+G[3]);a.stroke()}}if(z){var q=z.length;
for(var F=0;F<q;F++){var Z=z[F],x=c[Z[0]],Q=$[Z[1]];a.strokeStyle="#"+"ffff00"}}var h=new Uint8Array(a.getImageData(0,0,g.m,g.e).data.buffer);
if(!1){for(var r=0;r<2;r++){var H=r==0?c:$,o=r*b.m;for(var F=0;F<H.length;F++){var P=H[F],O=~~P.x,p=~~P.y,C=(p*g.m+O+o)*4;
h[C+1]=h[C+2]=P.az2*60;h[C+0]=0;h[C+3]=255}}}return[h,g]};d.stack={};d.stack.stack=function(x,Q,c){var $=x.length,z=Q.length;
if($==1){Q.set(x[0]);return}if(c=="avrg"||c=="stdv"||c=="summ"||c=="vari"){var j=1/$;for(var F=0;F<z;
F++){var U=0;for(var i=0;i<$;i++)U+=x[i][F];var b=~~(U*j+.5);if(c=="avrg"||(F&3)==3)Q[F]=b;else if(c=="summ")Q[F]=255*Math.pow(Math.min(255,U)*(1/255),1/2.4);
else{var e=0;for(var i=0;i<$;i++){var k=x[i][F]-b;e+=k*k}var K=Math.sqrt(e*j)*(1/255);if(c=="stdv")Q[F]=255*Math.pow(K,1/2.4);
else Q[F]=255*Math.pow(K*K,1/2.4)}}}else if(c=="maxx"){for(var F=0;F<z;F++){var g=0;for(var i=0;i<$;
i++)g=Math.max(g,x[i][F]);Q[F]=g}}else if(c=="minn"){for(var F=0;F<z;F++){var g=255;for(var i=0;i<$;
i++)g=Math.min(g,x[i][F]);Q[F]=g}}else if(c=="medn"||c=="rang"){var R=function(_,I){return _-I},T=new Array($),D=0,a=0;
if(($&1)==0){a=$>>>1;D=a-1}else{D=a=$>>>1}for(var F=0;F<z;F++){for(var i=0;i<$;i++)T[i]=x[i][F];T.sort(R);
if(c=="medn")Q[F]=T[D]+T[a]>>>1;else Q[F]=(F&3)==3?T[$-1]:T[$-1]-T[0]}}else console.log(c)};d.w9={};
d.w9.a9I=function(x,Q,c,$){var z=Date.now(),j=new Uint32Array(Q*c),U=new Uint8Array(Q*c);while(!0){U.fill(0);
j.fill(0);var i=[],b=0;for(var e=0;e<c;e++){for(var k=0;k<Q;k++){var F=e*Q+k;if(U[F]==0){var K=i.length,g=d.w9.nZ(x,Q,c,k,e,U,j,K);
i.push([K,k,e,g[0],g[1],x[F]]);if(g[0]<$)b++}}}if(b==0)break;var R=i.length,T=new UnionFind(R),D=[];
for(var F=0;F<R;F++)D.push([]);for(var F=0;F<R;F++){var g=i[F],a=g[4],_=0,I=0;if(g[3]>=$)continue;var K=g[0];
for(var f=0;f<a.length;f+=2){var y=j[a[f+1]*Q+a[f]],Z=i[y];if(Z[3]>I){I=Z[3];_=y}}if(T.find(K)!=T.find(_)){T.link(K,_);
D[K].push(_);D[_].push(K)}}var v=new Uint32Array(R);v.fill(4294967295);var G=new Uint32Array(R);for(var F=0;
F<R;F++){if(v[F]!=4294967295||D[F].length==0)continue;var q=[F],h=[F],r=F,H=i[F][3];while(h.length!=0){var o=h.pop(),P=D[o];
for(var f=0;f<P.length;f++){var O=P[f];if(q.indexOf(O)==-1){q.push(O);h.push(O);var p=i[O];if(p[3]>H){H=p[3];
r=O}}}}for(var f=0;f<q.length;f++){v[q[f]]=r;var C=i[r];G[q[f]]=x[C[2]*Q+C[1]]}}for(var e=0;e<c;e++)for(var k=0;
k<Q;k++){var F=e*Q+k,W=v[j[F]];if(W!=4294967295)x[F]=G[W]}}};d.w9.nZ=function(x,Q,c,$,z,j,U,i){var b=[$,z],e=x[z*Q+$],k=0,K=[];
j[z*Q+$]=1;while(b.length!=0){var g=b.pop(),R=b.pop(),F=g*Q+R;U[F]=i;k++;if(g!=c-1)if(x[F+Q]==e){if(j[F+Q]==0){b.push(R,g+1);
j[F+Q]=1}}else K.push(R,g+1);if(g!=0)if(x[F-Q]==e){if(j[F-Q]==0){b.push(R,g-1);j[F-Q]=1}}else K.push(R,g-1);
if(R!=Q-1)if(x[F+1]==e){if(j[F+1]==0){b.push(R+1,g);j[F+1]=1}}else K.push(R+1,g);if(R!=0)if(x[F-1]==e){if(j[F-1]==0){b.push(R-1,g);
j[F-1]=1}}else K.push(R-1,g)}return[k,K]};d.w9.a8w=function(x,Q,c){var $=new Uint32Array(Q*c);for(var F=0;
F<$.length;F++)$[F]=x[F];var z=[];for(var j=0;j<c;j++){for(var U=0;U<Q;U++){var F=j*Q+U,i=$[F];if(i<1e3){var b=d.w9.aq$($,Q,c,U,j,1e3+z.length);
z.push([U,j,i,b,0])}}}for(var F=0;F<$.length;F++)$[F]-=1e3;var e=new Float32Array(Q*c);e.fill(Q+c);for(var j=0;
j<c;j++)for(var U=0;U<Q;U++){var F=j*Q+U,i=$[F];if(U==0||j==0||$[F-1]!=i||$[F-Q]!=i)e[F]=0;else{var k=Math.min(e[F],e[F-1]+1,e[F-Q]+1);
if($[F-Q-1]==i)k=Math.min(k,e[F-Q-1]+1.414);e[F]=k}}for(var j=c-1;j>=0;j--)for(var U=Q-1;U>=0;U--){var F=j*Q+U,i=$[F];
if(U==Q-1||j==c-1||$[F+1]!=i||$[F+Q]!=i)e[F]=0;else{var k=Math.min(e[F],e[F+1]+1,e[F+Q]+1);if($[F+Q+1]==i)k=Math.min(k,e[F+Q+1]+1.414);
e[F]=k}}for(var j=0;j<c;j++)for(var U=0;U<Q;U++){var F=j*Q+U,K=z[$[F]];if(e[F]>K[4]){K[4]=e[F];K[0]=U;
K[1]=j}}return z};d.w9.aq$=function(x,Q,c,$,z,j){var U=[$,z],i=x[z*Q+$],b=0;x[z*Q+$]=4294967295;while(U.length!=0){var z=U.pop(),$=U.pop(),F=z*Q+$;
b++;x[F]=j;if(z<c-1&&x[F+Q]==i){U.push($,z+1);x[F+Q]=4294967295}if(z>0&&x[F-Q]==i){U.push($,z-1);x[F-Q]=4294967295}if($>0&&x[F-1]==i){U.push($-1,z);
x[F-1]=4294967295}if($<Q-1&&x[F+1]==i){U.push($+1,z);x[F+1]=4294967295}}return b};d.w9.a5I=function(x,Q,c,$,z){var j=d.w9.afv(x.buffer,Q,c).cA,U=Date.now(),i=[];
for(var F=0;F<j.length;F++){var b=j[F],e=1;for(var k=0;k<e;k++)i.push(b.dC)}var K=new Uint32Array(i),g=UPNG.quantize.getKDtree(new Uint8Array(K.buffer),$),R=[Q,1,-Q,-1,Q+1,-Q+1,-Q-1,Q-1,Q+Q,2,-Q-Q,-2,Q+Q-1,Q+Q+1,Q+2,-Q+2,-Q-Q+1,-Q-Q-1,-Q-2,Q-2,Q+Q+2,-Q-Q+2-Q-Q-2,Q+Q-2],T=new Uint8Array(Q*c),D=x;
for(var a=0;a<c;a++)for(var _=0;_<Q;_++){var F=a*Q+_<<2,I=D[F]*(1/255),f=D[F+1]*(1/255),y=D[F+2]*(1/255),Z=D[F+3]*(1/255),v=d.w9.vd(g,I,f,y,Z,z);
if(v==null){var G=[],q=0;while(q<20){var h=a*Q+_+R[q]<<2,r=D[h]*(1/255),H=D[h+1]*(1/255),o=D[h+2]*(1/255),P=D[h+3]*(1/255),O=d.w9.vd(g,r,H,o,P,.005);
if(O!=null){if(G.indexOf(O)==-1){G.push(O);O.yi=1}else O.yi++}q++}G.sort(function(Z,y){return y.yi-Z.yi});
while(G.length!=0&&G[G.length-1].yi<3)G.pop();if(G.length==0)v=d.w9.vd(g,I,f,y,Z,100);else if(G.length==1)v=G[0];
else if(G.length==2){var p=G[0],C=G[1],W=p.est.q,J=C.est.q,t=J[0]-W[0],Y=J[1]-W[1],l=J[2]-W[2],m=J[3]-W[3],B=I-W[0],L=f-W[1],A=y-W[2],S=Z-W[3],M=t*t+Y*Y+l*l+m*m,N=B*B+L*L+A*A+S*S,s=(B*t+L*Y+A*l+S*m)/M,V=N-s*s*M;
if(V<.5)v=s<.5?p:C;else{v=d.w9.vd(g,I,f,y,Z,100)}}else{var p=G[0],C=G[1],g8=G[2],W=p.est.q,J=C.est.q,n=g8.est.q,cQ=W[0]-n[0],hk=W[1]-n[1],eG=W[2]-n[2],ie=W[3]-n[3],eN=J[0]-n[0],gr=J[1]-n[1],ek=J[2]-n[2],jK=J[3]-n[3],iE=n[0]-I,e9=n[1]-f,dm=n[2]-y,kD=n[3]-Z,gJ=cQ*cQ+hk*hk+eG*eG+ie*ie,dR=cQ*eN+hk*gr+eG*ek+ie*jK,fO=iE*cQ+e9*hk+dm*eG+kD*ie,ko=cQ*eN+hk*gr+eG*ek+ie*jK,d8=eN*eN+gr*gr+ek*ek+jK*jK,fj=iE*eN+e9*gr+dm*ek+kD*jK,ja=1/(dR*ko-gJ*d8),s=(d8*fO-fj*dR)*ja,eD=(fj*gJ-fO*ko)*ja,d3=1-s-eD,fP=Math.max(s,eD,d3);
if(fP==s)v=p;else if(fP==eD)v=C;else v=g8}}T[F>>2]=v.ind}return{AJ:T,cA:g[1]}};d.w9.afv=function(x,Q,c){var $=[],z={},j=Q-1,U=c-1,i=0,b=new Uint32Array(x),e=[-Q-1,-Q,-Q+1,-1,1,Q-1,Q,Q+1,Q+Q,2,-Q-Q,-2,Q+Q-1,Q+Q+1,Q+2,-Q+2,-Q-Q+1,-Q-Q-1,-Q-2,Q-2,Q+Q+2,-Q-Q+2-Q-Q-2,Q+Q-2];
for(var k=1;k<U;k++)for(var K=1;K<j;K++){var g=k*Q+K,R=b[g],T=!0;for(var F=0;F<8;F++)T=T&&b[g+e[F]]==R;
if(T){i++;var D=z[R];if(D==null){z[R]=$.length;$.push({dC:R,sE:1})}else $[D].sE++}}return{cA:$,abR:i}};
d.w9.vd=function(x,Q,c,$,z,j){var U=UPNG.quantize.getNearest(x[0],Q,c,$,z);return d.w9.ark(U,Q,c,$,z)<j?U:null};
d.w9.ark=function(x,Q,c,$,z){var j=x.est.q,U=Q-j[0],i=c-j[1],b=$-j[2],e=z-j[3];return U*U+i*i+b*b+e*e};
(function(){d.w9.S8=function(i,b,e,k,K){var g=i.ui,R=b*e,T=i.f8,D=i.AJ,a=$(k,D,g,R),_=new UnionFind(g),G=0;
for(var I=1;I<e;I++)for(var f=1;f<b;f++){var F=I*b+f,y=D[F],Z=0;if((Z=D[F-1])!=y&&a[Z]==a[y]&&x(T,0,y*6,Z*6)<K)_.link(y,Z);
if((Z=D[F-b])!=y&&a[Z]==a[y]&&x(T,0,y*6,Z*6)<K)_.link(y,Z)}var v=new Uint16Array(g);v.fill(65535);var q=new Uint16Array(g);
for(var F=0;F<g;F++){var h=_.find(F);if(v[h]==65535)v[h]=G++;q[F]=v[h]}var r=new Uint16Array(R);for(var F=0;
F<R;F++)r[F]=q[D[F]];return{AJ:r,ui:G}};d.w9.ZV=function(i,b,e){var k=d.R(b),K=i.length;for(var F=0;
F<K;F++){var g=e[F];if(g==0||g==255){var R=i[F],T=2-(g>>>7),D=k[R]=k[R]|T;if(D==3)return R}}return-1};
function x(i,b,e,k){var K=1/i[e+5],g=1/i[k+5],R=i[e]*K-i[k]*g,T=i[e+1]*K-i[k+1]*g,D=i[e+2]*K-i[k+2]*g,a=i[e+3]*K-i[k+3]*g,_=i[e+4]*K-i[k+4]*g,I=Math.sqrt(R*R+T*T+D*D),f=Math.sqrt(a*a+_*_);
return~~(I+b*f+.5)}function Q(i,b){var F=0,e=i.length;while(F!=e&&i[F]!=b)F+=2;return F==e?-1:F}function c(i,F){if(F==i.length-2){i.pop();
i.pop()}else{i[F+1]=i.pop();i[F]=i.pop()}}d.w9.axH=function(i,b,e,k,K){var g=new Uint32Array(K*4400),R=[];
for(var F=0;F<K;F++)R.push([]);for(var T=0;T<e;T++)for(var D=0;D<b;D++){var F=T*b+D,a=F<<2,_=k[F],I=0,f=i[a]>>>4,y=i[a+1]>>>4,Z=i[a+2]>>>4;
g[_*4400+(f<<8|y<<4|Z)]++;g[_*4400+4096]++;g[_*4400+4100+(f<<4|y)]++;g[_*4400+4360+f]++;if(D!=0&&(I=k[F-1])!=_&&Q(R[_],I)==-1){R[_].push(I,0);
R[I].push(_,0)}if(T!=0&&(I=k[F-b])!=_&&Q(R[_],I)==-1){R[_].push(I,0);R[I].push(_,0)}}for(var F=0;F<K;
F++){var Z=R[F];for(var v=0;v<Z.length;v+=2)Z[v+1]=U(g,F,Z[v])}return[g,R]};function $(i,b,e,k){var K=d.R(e);
for(var F=0;F<k;F++){var g=i[F];if(g==0||g==255)K[b[F]]=2-(g>>>7)}return K}d.w9.ao1=function(i,b,e,k,K,g,R){var T=b*e,D=R[0],a=R[1],_=new UnionFind(k),I=$(K,i,k,T),f=-1,y=!0,Z=0;
for(var F=0;F<k;F++)if(I[F]==1){if(f==-1)f=F;else _.link(F,f)}if(f==-1){for(var F=0;F<T;F++)g[F]=K[F]==255?255:0;
return}while(y){while(y){y=!1;for(var F=0;F<k;F++){if(I[F]==0){var v=z(a[F]);if(I[v]==1){I[F]=I[v];y=!0;
_.link(F,v)}}}}y=!0;Z=0;while(y){y=!1;for(var F=0;F<k;F++){if(I[F]==0){var v=z(a[F]);if(I[v]==0){var G=F*4400,q=v*4400;
for(var h=0;h<4400;h+=2){D[G+h]+=D[q+h];D[G+h+1]+=D[q+h+1]}j(a,D,F,v);Z++;I[v]=3;y=!0;_.link(F,v)}}}}y=Z!=0}var r=_.find(f);
for(var F=0;F<k;F++)I[F]=_.find(F)==r?255:0;for(var F=0;F<T;F++){g[F]=I[i[F]]}for(var F=0;F<T;F++){var v=K[F];
if(v==0||v==255)g[F]=v}};function z(i){var b=0,e=0,k=i.length;for(var K=0;K<k;K+=2){var g=i[K+1];if(g>e){e=g;
b=K}}return i[b]}function j(i,b,e,k){var K=i[e],g=i[k];c(K,Q(K,k));c(g,Q(g,e));for(var F=0;F<g.length;
F+=2){var R=g[F],T=i[R];c(T,Q(T,k));if(Q(T,e)==-1){T.push(e,0);K.push(R,0)}}for(var F=0;F<K.length;F+=2){var R=K[F],T=i[R],D=U(b,e,R);
K[F+1]=D;T[Q(T,e)+1]=D}}function U(i,b,e){var k=0,K=4096,g=b*4400,R=e*4400;for(var T=0;T<16;T++){if(i[g+4360+T]==0||i[R+4360+T]==0)continue;
for(var D=0;D<16;D++){var a=T<<4|D;if(i[g+4100+a]==0||i[R+4100+a]==0)continue;var _=g+(a<<4),I=R+(a<<4);
for(var F=0;F<16;F++)k+=Math.sqrt(i[_+F]*i[I+F])}}var f=k/Math.sqrt(i[g+K]*i[R+K]);return~~(999.99999*f)}}());
d.w9.ew=function(){var x,Q,c,U=0,i=0;function $(R,T,D){var a=[],_=D,I=D,f=D>>>2;for(var y=0;y<T;y++)for(var Z=0;
Z<R;Z++){var v=~~((Z+.5)*_),G=~~((y+.5)*I),q=1e9,h=Math.max(0,v-f),r=Math.min(Q,v+f+1),H=Math.max(0,G-f),o=Math.min(c,G+f+1);
for(var P=H;P<o;P++)for(var O=h;O<r;O++){var p=z(O,P);if(p<q){v=O;G=P;q=p}}a.push(v,G)}return a}function z(R,T){var D=(T*Q+R)*4,a=Q*4,_=j(D-4,D)+j(D,D+4),I=j(D-a,D)+j(D,D+a);
return _+I}function j(R,T){var D=x[R]-x[T],a=x[R+1]-x[T+1],_=x[R+2]-x[T+2];return D*D+a*a+_*_}function b(R,T,D,a){i++;
if(a<U)U=a;R[a].push(T,D)}function e(R){i--;while(R[U].length==0)U++}function k(R,T,D,a,_){var I=(D*Q+T)*4,f=a[_+5],y=1/f,Z=x[I]*f-a[_],v=x[I+1]*f-a[_+1],G=x[I+2]*f-a[_+2],q=T*f-a[_+3],h=D*f-a[_+4],r=Math.sqrt(Z*Z+v*v+G*G),H=Math.sqrt(q*q+h*h);
return~~((r+R*H)*y+.5)}function K(R,T,D,a,_){x=R;Q=T;c=D;U=0;i=0;var I=Q*c,f=Math.round(Math.min(Q,c)/(a?a:30));
if(f==0)f=1;var y=(_?_:30)/f,Z=Math.floor(Q/f),v=Math.floor(c/f),G=new Uint16Array(I);for(var F=0;F<I;
F++)G[F]=65535;var q=$(Z,v,f),h=q.length>>>1;if(h>65535)throw h;var r=new Uint32Array(h*6),H=[];for(var F=0;
F<1e3+c;F++)H.push([]);var o=1e3*700/(Q*c),P=Math.floor(v*o);P=Math.min(v,Math.max(4,P));P=v;var r=new Uint32Array(h*6);
for(var O=0;O<v;O+=P){var p=Math.min(O+P,v);for(var C=O;C<p;C++)for(var W=0;W<Z;W++){var F=C*Z+W;b(H,q[F*2+1]<<16|q[F*2],F,0)}var J=Math.min(c,p*f);
if(O+P>=v)J=c;g(r,H,G,y,J)}x=null;return{AJ:G,ui:h,f8:r,adb:y}}function g(R,T,D,a,_){while(i!=0){e(T);
var I=T[U].pop(),f=T[U].pop(),y=f>>>16,Z=f&65535,F=y*Q+Z;if(D[F]==null)throw"e";if(D[F]==65535){var v=I*6,G=F<<2;
D[F]=I;R[v]+=x[G];R[v+1]+=x[G+1];R[v+2]+=x[G+2];R[v+3]+=Z;R[v+4]+=y;R[v+5]++;if(y!=_-1&&D[F+Q]==65535)b(T,y+1<<16|Z,I,k(a,Z,y+1,R,v));
if(y!=0&&D[F-Q]==65535)b(T,y-1<<16|Z,I,k(a,Z,y-1,R,v));if(Z!=0&&D[F-1]==65535)b(T,y<<16|Z-1,I,k(a,Z-1,y,R,v));
if(Z!=Q-1&&D[F+1]==65535)b(T,y<<16|Z+1,I,k(a,Z+1,y,R,v))}}}K.TP=function(R,T,D,a,_,I){x=R;Q=T;c=D;var f=a.ui=a.ui+1,y=a.AJ,Z=a.f8,v=a.f8=new Uint32Array(f*6);
v.set(Z,0);var G=y[_[1]*Q+_[0]];for(var F=0;F<y.length;F++)if(y[F]==G)y[F]=65535;for(var F=0;F<6;F++)v[G*6+F]=0;
var q=[];for(var F=0;F<1e3+c;F++)q.push([]);for(var F=0;F<_.length;F+=2)b(q,_[F+1]<<16|_[F],G,0);for(var F=0;
F<I.length;F+=2)b(q,I[F+1]<<16|I[F],f-1,0);g(v,q,y,a.adb,c);x=null};return K}();d.ave={};d.ave.a1g=function(){var x=11,Q=7,c=x>>>1,jF=Q>>>1,$=2,z=2e3/$,j=[],i=null,b="";
function U(k,K,g){var R=(k[K+0]-k[g+0])*(1/255),T=(k[K+1]-k[g+1])*(1/255),D=(k[K+2]-k[g+2])*(1/255),a=(k[K+3]-k[g+3])*(1/255),_=R*R*.125+T*T*.25+D*D*.5+a*a;
return j[~~(_*z)]}function e(k,K,g,R,T,D){var a=Date.now(),_=d.R(K*g);d._8(k,_);var I=UZIP.adler(_,0,K*g);
if(I!=b){var f=d.l8(_,K,g);i=d.R(K*g*4);b=I;var y=[1,1/9,1/25,1/49,1/81];for(var Z=0;Z<g;Z++)for(var v=0;
v<K;v++)for(var F=0;F<4;F++){var G=Math.max(1,v-F),q=Math.min(K-1,v+F),h=Math.max(1,Z-F),r=Math.min(g-1,Z+F),H=d.WA(f,K,G,q,h,r);
if(isNaN(H))throw v+","+Z+","+F+","+H;i[(Z*K+v)*4+F]=H*y[F]}}if(eV.Mx){var o=eV.Zk(0,K,g);o.set(k);var P=eV.Zk(1,K,g);
P.set(i);var O=eV.Zk(2,K,g);eV.qk(O);eV.filter.NP({type:eV.filter.a7Q,d$:new Float32Array([1/K,1/g]),azY:P.cm,azQ:T,adt:D},o.cm);
O.get(R)}else{for(var F=0;F<2e3;F++)j[F]=Math.exp(-(F/2e3)*$*(100+(1-T)*(1-T)*1e4));var p=jF+2;for(var Z=p;
Z<g-p;Z++)for(var v=p;v<K-p;v++){var C=0,W=0,J=0,t=0;for(var Y=0;Y<x;Y++)for(var l=0;l<x;l++){var m=v+l-c,B=Z+Y-c;
if(m==v&&B==Z||m<p||B<p||m>=K-p||B>=g-p)continue;var L=U(i,(Z*K+v)*4,(B*K+m)*4),A=B*K+m<<2;C+=L*k[A+0];
W+=L*k[A+1];J+=L*k[A+2];t+=L}if(t==0){continue}var S=1/t,M=(Z*K+v)*4;R[M+0]=~~((1-D)*S*C+D*R[M+0]);R[M+1]=~~((1-D)*S*W+D*R[M+1]);
R[M+2]=~~((1-D)*S*J+D*R[M+2])}}}return e}();d.avx=function(){var x=6,Q=x>>>1,c=[[-.0662912607,-.0855816496],[.1104854346,-.0855816496],[.6629126074,.1711632992],[.6629126074,.1711632992],[.1104854346,-.0855816496],[-.0662912607,-.0855816496],[0,0],[0,0]],$=[[-.0662912607,.0855816496],[-.1104854346,-.0855816496],[.6629126074,-.1711632992],[-.6629126074,.1711632992],[.1104854346,.0855816496],[.0662912607,-.0855816496],[0,0],[0,0]];
function z(D,a){var _=!1,I=D.length,f=a[0],G=5,h=0,r=0;for(var F=1;F<I;F++)f=f.iO(a[F]);if((f.m&1)!=0)f.m++;
if((f.e&1)!=0)f.e++;var y=f.m,Z=f.e,v=Math.max(y,Z);while(v>>>G>8&&G<10)G++;var q=1<<G;if(y%q!=0)h=q-y%q;
if(Z%q!=0)r=q-Z%q;f.ss(h>>>1,r>>>1);y=f.m;Z=f.e;if(y%q!=0||Z%q!=0)throw"e";var H=Date.now(),o=[],P=d.R(f.P()),O=[],p=y*Z,C=new Float32Array(y*Z*2);
for(var F=0;F<I;F++){var W=a[F],J=d.R(W.P());d._8(D[F],J);P.fill(0);d.L2(J,W,P,f);o.push(P.slice(0));
var t=W.x-f.x,Y=W.y-f.y,l=t+W.m-2,m=Y+W.e;for(var B=0;B<W.e;B++){var L=(B+Y)*y;for(var A=0;A<t;A++)P[L+A]=P[L+t];
for(var A=l;A<y;A++)P[L+A]=P[L+l-1]}for(var A=0;A<y;A++){for(var B=0;B<Y;B++)P[B*y+A]=P[Y*y+A];for(var B=m;
B<Z;B++)P[B*y+A]=P[(m-1)*y+A]}var S=new Float32Array(y*Z*2);O.push(S);for(var M=0;M<p;M++)S[M*2]=P[M]*(1/255);
b(S,C,y,Z,G);j(S,y,Z,G)}if(_)console.log("to gray, decompose",Date.now()-H);H=Date.now();var N=d.R(y*Z);
for(var B=0;B<Z;B++)for(var A=0;A<y;A++){var s=0,V=0,g8=B*y+A<<1;for(var F=0;F<I;F++){var n=O[F],cQ=n[g8],hk=n[g8+1],eG=cQ*cQ+hk*hk;
if(eG>V){V=eG;s=F}}N[g8>>>1]=s}if(_)console.log("max abs value",Date.now()-H);H=Date.now();U(N,y,Z,G);
i(N,y,Z);if(_)console.log("denoise",Date.now()-H);H=Date.now();var ie=C.slice(0);for(var B=0;B<Z;B++)for(var A=0;
A<y;A++){var F=B*y+A,g8=F<<1,eN=O[N[F]];ie[g8]=eN[g8];ie[g8+1]=eN[g8+1]}e(ie,C,y,Z,G);if(_)console.log("compose",Date.now()-H);
H=Date.now();for(var M=0;M<p;M++){var eG=ie[M*2]*255,s=0,V=1e9;for(var F=0;F<I;F++){var gr=Math.abs(o[F][M]-eG);
if(gr<V){V=gr;s=F}o[F][M]=0}o[s][M]=255}if(_)console.log("toRGB",Date.now()-H);H=Date.now();return[o,f]}function j(D,a,_,I){var f=a>>>I,y=_>>>I,Z=1e-4;
for(var v=0;v<_;v++)for(var G=0;G<a;G++){if(G<f&&v<y)continue;var q=(v*a+G)*2,h=D[q],r=D[q+1],H=h*h+r*r;
if(H<Z)h=r=0;else{var o=(H-Z)/H;h*=o;r*=o}D[q]=h;D[q+1]=r}}function U(D,a,_,I){for(var f=0;f<I;f++){var y=a>>>f,Z=_>>>f,v=y>>>1,G=Z>>>1;
for(var q=0;q<G;q++)for(var h=0;h<v;h++){var r=q*a+v+h,H=(q+G)*a+v+h,o=(q+G)*a+h,P=D[r],O=D[H],p=D[o];
if(P==O==p){}else if(P==O)D[o]=P;else if(O==p)D[r]=O;else if(P==p)D[H]=P}}}function i(D,a,_){for(var I=1;
I<_-1;I++)for(var f=1;f<a-1;f++){var F=I*a+f,y=D[F-a],Z=D[F-1],v=D[F],G=D[F+1],q=D[F+a],h=y==Z&&y==G||y==G&&G==q||G==q&&Z==q||y==Z&&q==Z;
if(h)D[F]=y==Z?y:Z==G?Z:y;else if(v>y&&v>Z&&v>G&&v>q)D[F]=y+Z+G+q>>>2;else if(v<y&&v<Z&&v<G&&v<q)D[F]=y+Z+G+q>>>2}}function b(D,a,_,I,f){for(var F=0;
F<f;F++){var y=_>>>F,Z=I>>>F;k(D,a,_,I,y,Z)}}function e(D,a,_,I,f){for(var F=f-1;F>=0;F--){var y=_>>F,Z=I>>F;
K(D,a,_,I,y,Z)}}function k(D,a,_,I,f,y){R(D,a,_,I,f,y,!0);R(a,D,_,I,f,y,!1)}function K(D,a,_,I,f,y){T(D,a,_,I,f,y,!0);
T(a,D,_,I,f,y,!1)}function g(D,a,_,I,f,y){var Z=_*I+a<<1;D[Z]=f;D[Z+1]=y}function R(D,a,_,I,f,y,Z){var fu=Z?f:y,v=Z?y:f,G=v>>>1;
for(var q=0;q<fu;q++){for(var h=0;h<v;h+=2){var r=0,H=0,o=0,P=0,O=h>>>1;for(var p=0;p<6;p++){var C=h+p-3;
if(C<0)C=v+C;if(C>=v)C=C-v;var W=(Z?C*_+q:q*_+C)<<1,J=D[W],t=D[W+1],Y=c[p],l=$[p];r+=J*Y[0]-t*Y[1];H+=t*Y[0]+J*Y[1];
o+=J*l[0]-t*l[1];P+=t*l[0]+J*l[1]}if(Z){g(a,q,O,_,r,H);g(a,q,O+G,_,o,P)}else{g(a,O,q,_,r,H);g(a,O+G,q,_,o,P)}}}}function T(D,a,_,I,f,y,Z){var fu=Z?f:y,v=Z?y:f,G=v>>>1,q,h,r,H;
for(var o=0;o<fu;o++){for(var P=0;P<v;P++){var O=0,p=0;for(var C=P+3&1;C<6;C+=2){var W=P-C+3>>1;if(W<0)W=G+W;
if(W>=G)W=W-G;if(Z){q=o;h=W;r=o;H=W+G}else{h=o;q=W;H=o;r=W+G}var J=h*_+q<<1,t=H*_+r<<1,Y=D[J],l=D[J+1],m=D[t],B=D[t+1],L=c[C],A=$[C];
O+=Y*L[0]+m*A[0];O+=l*L[1]+B*A[1];p+=l*L[0]+B*A[0];p-=Y*L[1]+m*A[1]}if(Z)g(a,o,P,_,O,p);else g(a,P,o,_,O,p)}}}return{Z8:z}}();
d.aCf=function(){var x=Math.floor(12e3/8),Q=UPNG.quantize.findNearest,c,$,z,j;function U(g,R,T,D){var a=[g,new gh(0,0,R,T)],I;
d.gk(a);var _=Date.now(),f=R+T>>>1;for(var F=f<1e3?2:4;F>=0;F-=2){var y=a[F+1],$=y.m,z=y.e;if(I==null){I=new Uint8Array($*z);
Q(a[F],I,D)}i(a[F],$,z,D,I);if(F!=0){var Z=a[F-1],v=Z.m,G=Z.e,q=new Uint8Array(v*G);for(var h=0;h<G;
h++)for(var r=0;r<v;r++)q[h*v+r]=I[(h>>>1)*$+(r>>>1)];I=q}}return I}function i(g,R,T,D,a){c=g;$=R;z=T;
j=D;var _=j.length>>>2,I=[-1,-$,1,$],f=[-1,-$,-$+1,2,$+1,$],y=[-1,-$,1,$+1,$+$,$-1],Z=8,v=$+z>>>1,G=1e9;
while(v>512){Z>>=1;v>>=1}Z=Math.max(1,Math.min(4,Z));for(var q=0;q<Z;q++){var h=0;for(var r=0;r<z;r++)for(var H=0;
H<$;H++){if(k(a,H,r)<2)continue;var o=r*$+H,P=a[o],O=1e9,p=0,C=H==0||r==0||H>$-3||r>z-3;if(C){O=1e9;
for(var F=0;F<_;F++){a[o]=F;var W=K(a,H,r,2);if(W<O){O=W;p=F}}a[o]=p;if(p==P&&H+1<$&&a[o+1]==P){O=1e9;
for(var F=0;F<_;F++){a[o]=a[o+1]=F;var W=K(a,H,r,2)+K(a,H+1,r,2);if(W<O){O=W;p=F}}a[o]=a[o+1]=p}if(p==P&&r+1<z&&a[o+$]==P){O=1e9;
for(var F=0;F<_;F++){a[o]=a[o+$]=F;var W=K(a,H,r,2)+K(a,H,r+1,2);if(W<O){O=W;p=F}}a[o]=a[o+$]=p}}else{O=1e9;
p=-1;for(var F=0;F<4;F++){var J=a[o+I[F]];if(J==p)continue;a[o]=J;var W=K(a,H,r,2);if(W<O){O=W;p=J}}a[o]=p;
if(p==P&&H+1<$&&a[o+1]==P){O=1e9;p=-1;for(var F=0;F<6;F++){var J=a[o+f[F]];if(J==p)continue;a[o]=a[o+1]=J;
var W=K(a,H,r,2)+K(a,H+1,r,2);if(W<O){O=W;p=J}}a[o]=a[o+1]=p}if(p==P&&r+1<z&&a[o+$]==P){O=1e9;p=-1;for(var F=0;
F<6;F++){var J=a[o+y[F]];if(J==p)continue;a[o]=a[o+$]=J;var W=K(a,H,r,2)+K(a,H,r+1,2);if(W<O){O=W;p=J}}a[o]=a[o+$]=p}}h+=O}}}function b(g){var R=0;
for(var T=0;T<z;T++)for(var D=0;D<$;D++)R+=K(g,D,T,1);return R/($*z)}function e(g,R,T){var F=T*$+R,D=F*4,a=g[F]*4,_=c[D]-j[a],I=c[D+1]-j[a+1],f=c[D+2]-j[a+2],y=c[D+3]-j[a+3];
return _*_+I*I+f*f+y*y}function k(g,R,T){if(R<0||R>=$||T<0||T>=z)throw"e";var F=T*$+R,D=g[F],a=0;if(T>0&&D!=g[F-$])a+=2;
if(R>0&&D!=g[F-1])a+=2;if(R<$-1&&D!=g[F+1])a+=2;if(T<z-1&&D!=g[F+$])a+=2;if(T>0&&R>0&&D!=g[F-$-1])a++;
if(T<z-1&&R>0&&D!=g[F+$-1])a++;if(T>0&&R<$-1&&D!=g[F-$+1])a++;if(T<z-1&&R<$-1&&D!=g[F+$+1])a++;return a}function K(g,R,T,D){return e(g,R,T)+k(g,R,T)*D*x}return U}();
var iw=function(){function x(){this.P=0;this.bc=0;this.td={};this.FW=[];this._a=1e5;this.Hp=1e5;this.Ps=-1;
this.ju=-1;this.color=0}function Q(jF){this.vG=jF;this.PU=new Array(jF);this.dC=new Array(jF*6);this.a7s=0;
this.ts=new Array(jF*2);this.alpha=new Array(jF);this.Kb=new Array(jF);this.HS=new Array(jF)}function c(z,j,U,i){function b(a,_,z,j){return z[j*_+a]}function e(F){var G=z.length;
while(F<G&&z[F]==0)F++;return F<G?F:-1}function k(a,_,G){for(var F=2;F<5;F++){var q=0;for(var h=-F+1;
h<=F-1;h++){q+=b(a+h,_+F-1,z,j)==G?1:-1;q+=b(a+F-1,_+h-1,z,j)==G?1:-1;q+=b(a+h-1,_-F,z,j)==G?1:-1;q+=b(a-F,_+h,z,j)==G?1:-1}if(q>0)return 1;
else if(q<0)return 0}return 0}function K(G,T){var D=new x,a=G,_=T,q=0,h=1,r;D.color=z[T*j+G];D.sign=b(G,T,z,j)==D.color?"+":"-";
while(1){D.FW.push(a,_);if(a>D.Ps)D.Ps=a;if(a<D._a)D._a=a;if(_>D.ju)D.ju=_;if(_<D.Hp)D.Hp=_;D.bc++;a+=q;
_+=h;D.P-=a*h;if(a==G&&_==T)break;var H=b(a+(q+h-1>>1),_+(h-q-1>>1),z,j)==D.color,o=b(a+(q-h-1>>1),_+(h+q-1>>1),z,j)==D.color;
if(o&&!H){if(i.OK=="right"||i.OK=="black"&&D.sign=="+"||i.OK=="white"&&D.sign=="-"||i.OK=="majority"&&k(a,_,D.color)||i.OK=="minority"&&!k(a,_,D.color)){r=q;
q=-h;h=r}else{r=q;q=h;h=-r}}else if(o){r=q;q=-h;h=r}else if(!H){r=q;q=h;h=-r}}return D}var g=0,R=[];
while(!0){var g=e(g);if(g==-1)break;var T=Math.floor(g/j),D=K(g-T*j,T);for(var F=0;F<D.FW.length-2;F+=2){var a=D.FW[F],_=D.FW[F+1],I=_*j+a;
if(a==D.FW[F+2]&&_+1==D.FW[F+3]&&z[I]!=0)iw.fill(I,z,j,0)}if(D.P>i.abL)R.push(D)}for(var F=0;F<R.length;
F++)R[F].parent=-1;var f=Date.now();for(var F=1;F<R.length;F++){var y=R[F];for(var Z=F-1;Z>=0;Z--){var v=R[Z];
if(y._a<v._a||y.Ps>v.Ps||y.Hp<v.Hp||y.ju>v.ju)continue;if(!iw.LW(v.FW,y.FW[0]+.5,y.FW[1]+.5))continue;
y.parent=Z;break}}return R}function $(z,j){function U(q,h,r,H,o){this.x=q;this.y=h;this.z8=r;this._D=H;
this.gK=o}function i(q,jF){return(jF+q)%jF}function b(q,h,r,H){return q*H-r*h}function e(q,h,r,H){return q*r+h*H}function k(q,h,r){if(q<=r)return q<=h&&h<r;
else return q<=h||h<r}function K(q,h,r){var H=0;H+=h*q[0]*h;H+=h*q[1]*r;H+=h*q[2];H+=r*q[3]*h;H+=r*q[4]*r;
H+=r*q[5];H+=q[6]*h;H+=q[7]*r;H+=q[8];return H}function g(q,h,r){return h+q*(r-h)}function R(q,h,r,H){var o=Math.sign(r-q),P=-Math.sign(H-h);
return o*(r-q)-P*(H-h)}function T(q,h){return Math.sqrt(q*q+h*h)}function D(q,h,r,H,o){var P=1-q;return P*P*P*h+3*(P*P*q)*r+3*(q*q*P)*H+q*q*q*o}function a(q,h,r,H,o,P,O,p){var C=b(q,h,O,p),W=b(r,H,O,p),J=b(o,P,O,p),t=C-2*W+J,Y=-2*C+2*W,l=C,m=Y*Y-4*t*l;
if(t==0||m<0)return-1;var B=Math.sqrt(m),L=(-Y+B)/(2*t),A=(-Y-B)/(2*t);if(L>=0&&L<=1)return L;else if(A>=0&&A<=1)return A;
else return-1}function _(G){var F,q,h;G.GX=G.FW[0];G.apW=G.FW[1];G.UX=[];var r=G.UX;r.push(new U(0,0,0,0,0));
for(F=0;F<G.bc;F++){q=G.FW[F<<1]-G.GX;h=G.FW[(F<<1)+1]-G.apW;r.push(new U(r[F].x+q,r[F].y+h,r[F].z8+q*h,r[F]._D+q*q,r[F].gK+h*h))}}function I(G){var jF=G.bc,q=G.FW,h,r=new Array(jF),H=new Array(jF),o=new Array(4),P,O,p,C,W,J,t,Y,l,m,B,F,L,A,S,M,N,s,V=0;
G.wl=new Array(jF);for(F=jF-1;F>=0;F--){if(q[F<<1]!=q[V<<1]&&q[(F<<1)+1]!=q[(V<<1)+1])V=F+1;H[F]=V}for(F=jF-1;
F>=0;F--){var g8=i(F+1,jF)<<1;o[0]=o[1]=o[2]=o[3]=0;h=(3+3*(q[g8]-q[F<<1])+(q[g8+1]-q[(F<<1)+1]))/2;
o[h]++;P=0;O=0;p=0;C=0;V=H[F];A=F;while(1){B=0;h=(3+3*Math.sign(q[V*2]-q[A*2])+Math.sign(q[V*2+1]-q[A*2+1]))/2;
o[h]++;if(o[0]&&o[1]&&o[2]&&o[3]){r[F]=A;B=1;break}l=q[V*2]-q[F*2];m=q[V*2+1]-q[F*2+1];if(b(P,O,l,m)<0||b(p,C,l,m)>0){break}if(Math.abs(l)<=1&&Math.abs(m)<=1){}else{W=l+(m>=0&&(m>0||l<0)?1:-1);
J=m+(l<=0&&(l<0||m<0)?1:-1);if(b(P,O,W,J)>=0){P=W;O=J}W=l+(m<=0&&(m<0||l<0)?1:-1);J=m+(l>=0&&(l>0||m<0)?1:-1);
if(b(p,C,W,J)<=0){p=W;C=J}}A=V;V=H[A];if(!k(V,F,A)){break}}if(B==0){t=Math.sign(q[V*2]-q[A*2]);Y=Math.sign(q[V*2+1]-q[A*2+1]);
l=q[A*2]-q[F*2];m=q[A*2+1]-q[F*2+1];S=b(P,O,l,m);M=b(P,O,t,Y);N=b(p,C,l,m);s=b(p,C,t,Y);L=1e7;if(M<0){L=Math.floor(S/-M)}if(s>0){L=Math.min(L,Math.floor(-N/s))}r[F]=i(A+L,jF)}}L=r[jF-1];
G.wl[jF-1]=L;for(F=jF-2;F>=0;F--){if(k(F+1,r[F],L)){L=r[F]}G.wl[F]=L}for(F=jF-1;k(i(F+1,jF),L,G.wl[F]);
F--){G.wl[F]=L}}function f(G){function q(G,F,h){var jF=G.bc,l=G.FW,m=G.UX,B,L,A,S,M,H,N,s,Y,V,g8,n,cQ,hk,eG=0;
if(h>=jF){h-=jF;eG=1}if(eG==0){B=m[h+1].x-m[F].x;L=m[h+1].y-m[F].y;S=m[h+1]._D-m[F]._D;A=m[h+1].z8-m[F].z8;
M=m[h+1].gK-m[F].gK;H=h+1-F}else{B=m[h+1].x-m[F].x+m[jF].x;L=m[h+1].y-m[F].y+m[jF].y;S=m[h+1]._D-m[F]._D+m[jF]._D;
A=m[h+1].z8-m[F].z8+m[jF].z8;M=m[h+1].gK-m[F].gK+m[jF].gK;H=h+1-F+jF}g8=(l[F<<1]+l[h<<1])/2-l[0];n=(l[(F<<1)+1]+l[(h<<1)+1])/2-l[1];
hk=l[h<<1]-l[F<<1];cQ=-(l[(h<<1)+1]-l[(F<<1)+1]);N=(S-2*B*g8)/H+g8*g8;s=(A-B*n-L*g8)/H+g8*n;Y=(M-2*L*n)/H+n*n;
V=cQ*cQ*N+2*cQ*hk*s+hk*hk*Y;return Math.sqrt(V)}var F,h,r,H,jF=G.bc,o=new Array(jF+1),P=new Array(jF+1),O=new Array(jF),p=new Array(jF+1),C=new Array(jF+1),W=new Array(jF+1),J,t,Y;
for(F=0;F<jF;F++){Y=i(G.wl[i(F-1,jF)]-1,jF);if(Y==F){Y=i(F+1,jF)}if(Y<F){O[F]=jF}else{O[F]=Y}}h=1;for(F=0;
F<jF;F++){while(h<=O[F]){p[h]=F;h++}}F=0;for(h=0;F<jF;h++){C[h]=F;F=O[F]}C[h]=jF;r=h;F=jF;for(h=r;h>0;
h--){W[h]=F;F=p[F]}W[0]=0;o[0]=0;for(h=1;h<=r;h++){for(F=W[h];F<=C[h];F++){t=-1;for(H=C[h-1];H>=p[F];
H--){J=q(G,H,F)+o[H];if(t<0||J<t){P[F]=H;t=J}}o[F]=t}}G.a4v=r;G.acR=new Array(r);for(F=jF,h=r-1;F>0;
h--){F=P[F];G.acR[h]=F}}function y(G){function q(G,F,J,O,p,ie){var jF=G.bc,eN=G.UX,gr=0,Y;while(J>=jF){J-=jF;
gr+=1}while(F>=jF){F-=jF;gr-=1}while(J<0){J+=jF;gr-=1}while(F<0){F+=jF;gr+=1}var ek=eN[J+1].x-eN[F].x+gr*eN[jF].x,jK=eN[J+1].y-eN[F].y+gr*eN[jF].y,iE=eN[J+1]._D-eN[F]._D+gr*eN[jF]._D,e9=eN[J+1].z8-eN[F].z8+gr*eN[jF].z8,dm=eN[J+1].gK-eN[F].gK+gr*eN[jF].gK,t=J+1-F+gr*jF;
O[ie]=ek/t;O[ie+1]=jK/t;var kD=(iE-ek*ek/t)/t,gJ=(e9-ek*jK/t)/t,dR=(dm-jK*jK/t)/t,fO=(kD+dR+Math.sqrt((kD-dR)*(kD-dR)+4*gJ*gJ))/2;
kD-=fO;dR-=fO;if(Math.abs(kD)>=Math.abs(dR)){Y=Math.sqrt(kD*kD+gJ*gJ);if(Y!=0){p[ie]=-gJ/Y;p[ie+1]=kD/Y}}else{Y=Math.sqrt(dR*dR+gJ*gJ);
if(Y!=0){p[ie]=-dR/Y;p[ie+1]=gJ/Y}}if(Y==0){p[ie]=p[ie+1]=0}}var h=G.a4v,r=G.acR,jF=G.bc,H=G.FW,o=G.GX,P=G.apW,O=new Array(h*2),p=new Array(h*2),C=new Array(h),W=new Array(3),F,J,t,Y,L,A,S,M,N,s,V;
G.td=new Q(h);for(F=0;F<h;F++){J=r[i(F+1,h)];J=i(J-r[F],jF)+r[F];O[F<<1]=0;O[(F<<1)+1]=0;p[F<<1]=0;p[(F<<1)+1]=0;
q(G,r[F],J,O,p,F<<1)}for(F=0;F<h;F++){C[F]=[0,0,0,0,0,0,0,0,0];var l=p[F<<1]*p[F<<1]+p[(F<<1)+1]*p[(F<<1)+1],m=1/l;
if(l!=0){W[0]=p[(F<<1)+1];W[1]=-p[F<<1];W[2]=-W[1]*O[(F<<1)+1]-W[0]*O[F<<1];for(Y=0;Y<3;Y++){C[F][Y*3+0]=W[Y]*W[0]*m;
C[F][Y*3+1]=W[Y]*W[1]*m;C[F][Y*3+2]=W[Y]*W[2]*m}}}var B=[0,0,0,0,0,0,0,0,0];for(F=0;F<h;F++){B[0]=B[1]=B[2]=B[3]=B[4]=B[5]=B[6]=B[7]=B[8]=B[9]=0;
var g8=H[r[F]<<1]-o,n=H[(r[F]<<1)+1]-P,cQ=0,hk=0;J=i(F-1,h);for(Y=0;Y<9;Y+=3){B[Y+0]=C[J][Y+0]+C[F][Y+0];
B[Y+1]=C[J][Y+1]+C[F][Y+1];B[Y+2]=C[J][Y+2]+C[F][Y+2]}while(1){var eG=B[0]*B[4]-B[1]*B[3];if(eG!=0){cQ=(-B[2]*B[4]+B[5]*B[0])/eG;
hk=(B[2]*B[3]-B[5]*B[0])/eG;break}if(B[0]>B[4]){W[0]=-B[1];W[1]=B[0]}else if(B[4]){W[0]=-B[4];W[1]=B[3]}else{W[0]=1;
W[1]=0}var l=W[0]*W[0]+W[1]*W[1],m=1/l;W[2]=-W[1]*n-W[0]*g8;for(Y=0;Y<3;Y++){B[Y*3+0]+=W[Y]*W[0]*m;B[Y*3+1]+=W[Y]*W[1]*m;
B[Y*3+2]+=W[Y]*W[2]*m}}L=Math.abs(cQ-g8);A=Math.abs(hk-n);if(L<=.5&&A<=.5){G.td.ts[F<<1]=cQ+o;G.td.ts[(F<<1)+1]=hk+P;
continue}S=K(B,g8,n);N=g8;s=n;if(B[0]!=0){for(V=0;V<2;V++){hk=n-.5+V;cQ=-(B[1]*hk+B[2])/B[0];L=Math.abs(cQ-g8);
M=K(B,cQ,hk);if(L<=.5&&M<S){S=M;N=cQ;s=hk}}}if(B[4]!=0){for(V=0;V<2;V++){cQ=g8-.5+V;hk=-(B[3]*cQ+B[5])/B[4];
A=Math.abs(hk-n);M=K(B,cQ,hk);if(A<=.5&&M<S){S=M;N=cQ;s=hk}}}for(Y=0;Y<2;Y++){for(t=0;t<2;t++){cQ=g8-.5+Y;
hk=n-.5+t;M=K(B,cQ,hk);if(M<S){S=M;N=cQ;s=hk}}}G.td.ts[F<<1]=N+o;G.td.ts[(F<<1)+1]=s+P}}function Z(G){var q=G.td.vG,h=G.td,F,r,H,o,P,O,p,C,W;
for(F=0;F<q;F++){r=i(F+1,q);H=i(F+2,q);var J=h.ts[F<<1],t=h.ts[(F<<1)+1],Y=h.ts[H<<1],l=h.ts[(H<<1)+1],m=h.ts[r<<1],B=h.ts[(r<<1)+1],L=g(.5,Y,m),A=g(.5,l,B);
P=R(J,t,Y,l);if(P!=0){o=b(m-J,B-t,Y-J,l-t)/P;o=Math.abs(o);O=o>1?1-1/o:0;O=O*(1/.75)}else{O=4/3}h.Kb[r]=O;
var S=3*r<<1;if(O>=j.aft){h.PU[r]=0;h.dC[S+0]=h.dC[S+1]=0;h.dC[S+2]=m;h.dC[S+3]=B;h.dC[S+4]=L;h.dC[S+5]=A}else{if(O<.55){O=.55}else if(O>1){O=1}var M=.5+.5*O;
h.PU[r]=1;h.dC[S]=g(M,J,m);h.dC[S+1]=g(M,t,B);h.dC[S+2]=g(M,Y,m);h.dC[S+3]=g(M,l,B);h.dC[S+4]=L;h.dC[S+5]=A}h.alpha[r]=O;
h.HS[r]=.5}h.aaJ=1}function v(G){function q(){this.vy=0;this.Zj=0;this.t6=0;this.oD=0;this.mq=0;this.z_=0;
this.ks=0;this.alpha=0}function h(G,F,J,d8,fj,N,s){var H=G.td.vG,ja=G.td.dC,eD=G.td.ts;if(F==J)return 1;
var d3=F,m=i(F+1,H),fP=i(d3+1,H),e9=eD[F<<1],dm=eD[(F<<1)+1],jE=eD[m<<1],cR=eD[(m<<1)+1],ex=N[fP];if(ex==0)return 1;
var er=T(e9-jE,dm-cR);for(d3=fP;d3!=J;d3=fP){var fP=i(d3+1,H),cE=i(d3+2,H),a7=eD[fP<<1],dl=eD[(fP<<1)+1],hl=eD[cE<<1],f4=eD[(cE<<1)+1];
if(N[fP]!=ex)return 1;if(Math.sign(b(jE-e9,cR-dm,hl-a7,f4-dl))!=ex)return 1;if(e(jE-e9,cR-dm,hl-a7,f4-dl)<er*T(a7-hl,dl-f4)*-.999847695156)return 1}var em=i(F,H)*3+2<<1,e$=i(F+1,H)<<1,iP=i(J,H)<<1,b2=i(J,H)*3+2<<1,ie=ja[em],eN=ja[em+1],k7=eD[e$],at=eD[e$+1],ju=eD[iP],jL=eD[iP+1],fJ=ja[b2],h6=ja[b2+1],V=eD[0],g8=eD[1];
em=J*3+2<<1;var iq=ja[em],iI=ja[em+1],B=s[J]-s[F];B-=b(iq-V,iI-g8,iq-V,iI-g8)/2;if(F>=J){B+=s[H]}var dM=k7-ie,ik=at-eN,jp=ju-ie,eA=jL-eN,k8=fJ-ie,ay=h6-eN,bK=b(dM,ik,jp,eA),a4=b(dM,ik,k8,ay),h_=b(jp,eA,k8,ay),bj=bK+h_-a4;
if(a4==bK)return 1;var M=h_/(h_-bj),S=a4/(a4-bK),gs=a4*M/2;if(gs==0)return 1;var bs=B/gs,L=2-Math.sqrt(4-bs/.3);
d8.Zj=g(M*L,ie,k7);d8.t6=g(M*L,eN,at);d8.oD=g(S*L,fJ,ju);d8.mq=g(S*L,h6,jL);d8.alpha=L;d8.z_=M;d8.ks=S;
k7=d8.Zj;at=d8.t6;ju=d8.oD;jL=d8.mq;d8.vy=0;for(d3=i(F+1,H);d3!=J;d3=fP){fP=i(d3+1,H);var e3=eD[d3<<1],jA=eD[(d3<<1)+1],a7=eD[fP<<1],dl=eD[(fP<<1)+1];
M=a(k7-ie,at-eN,ju-k7,jL-at,fJ-ju,h6-jL,a7-e3,dl-jA);if(M<-.5)return 1;var kn=D(M,ie,k7,ju,fJ),j6=D(M,eN,at,jL,h6),er=T(a7-e3,dl-jA);
if(er==0)return 1;var cL=b(a7-e3,dl-jA,kn-e3,j6-jA)/er;if(Math.abs(cL)>fj)return 1;if(e(a7-e3,dl-jA,kn-e3,j6-jA)<0||e(e3-a7,jA-dl,kn-a7,j6-dl)<0){return 1}d8.vy+=cL*cL}for(d3=F;
d3!=J;d3=fP){fP=i(d3+1,H);var em=d3*3+2<<1,e$=fP*3+2<<1,eb=ja[em],dY=ja[em+1],aP=ja[e$],ks=ja[e$+1];
M=a(k7-ie,at-eN,ju-k7,jL-at,fJ-ju,h6-jL,aP-eb,ks-dY);if(M<-.5)return 1;var kn=D(M,ie,k7,ju,fJ),j6=D(M,eN,at,jL,h6),er=T(aP-eb,ks-dY);
if(er==0)return 1;var cL=b(aP-eb,ks-dY,kn-eb,j6-dY)/er,jC=b(aP-eb,ks-dY,eD[fP<<1]-eb,eD[(fP<<1)+1]-dY)/er;
jC*=.75*G.td.alpha[fP];if(jC<0){cL=-cL;jC=-jC}if(cL<jC-fj)return 1;if(cL<jC){d8.vy+=(cL-jC)*(cL-jC)}}return 0}var r=G.td,H=r.vG,o=r.ts,P=new Array(H+1),O=new Array(H+1),p=new Array(H+1),C=new Array(H+1),W,F,J,t,Y=new q,l,m,B,L,A,S,M,N=new Array(H),s=new Array(H+1);
for(F=0;F<H;F++){if(r.PU[F]=="CURVE"){var V=o[i(F-1,H)<<1],g8=o[(i(F-1,H)<<1)+1],n=o[F<<1],cQ=o[(F<<1)+1],hk=o[i(F+1,H)<<1],eG=o[(i(F+1,H)<<1)+1];
N[F]=Math.sign(b(n-V,cQ-g8,hk-n,eG-cQ))}else{N[F]=0}}B=0;s[0]=0;var ie=r.ts[0],eN=r.ts[1];for(F=0;F<H;
F++){m=i(F+1,H);if(r.PU[m]=="CURVE"){L=r.alpha[m];var gr=F*3+2<<1,ek=m*3+2<<1,jK=r.dC[gr],iE=r.dC[gr+1],e9=o[m<<1],dm=o[(m<<1)+1],kD=r.dC[ek],gJ=r.dC[ek+1];
B+=.3*L*(4-L)*b(e9-jK,dm-iE,kD-jK,gJ-iE)/2;B+=b(jK-ie,iE-eN,kD-ie,gJ-eN)/2}s[F+1]=B}P[0]=-1;O[0]=0;p[0]=0;
for(J=1;J<=H;J++){P[J]=J-1;O[J]=O[J-1];p[J]=p[J-1]+1;for(F=J-2;F>=0;F--){t=h(G,F,i(J,H),Y,j.ayJ,N,s);
if(t){break}if(p[J]>p[F]+1||p[J]==p[F]+1&&O[J]>O[F]+Y.vy){P[J]=F;O[J]=O[F]+Y.vy;p[J]=p[F]+1;C[J]=Y;Y=new q}}}W=p[H];
A=new Q(W);S=new Array(W);M=new Array(W);J=H;for(F=W-1;F>=0;F--){var dR=i(J,H),fO=F*3+0<<1,ko=dR*3+0<<1;
if(P[J]==J-1){A.PU[F]=r.PU[dR];A.dC[fO]=r.dC[ko];A.dC[fO+1]=r.dC[ko+1];A.dC[fO+2]=r.dC[ko+2];A.dC[fO+3]=r.dC[ko+3];
A.dC[fO+4]=r.dC[ko+4];A.dC[fO+5]=r.dC[ko+5];A.ts[F<<1]=r.ts[dR<<1];A.ts[(F<<1)+1]=r.ts[(dR<<1)+1];A.alpha[F]=r.alpha[dR];
A.Kb[F]=r.Kb[dR];A.HS[F]=r.HS[dR];S[F]=M[F]=1}else{A.PU[F]="CURVE";A.dC[fO]=C[J].Zj;A.dC[fO+1]=C[J].t6;
A.dC[fO+2]=C[J].oD;A.dC[fO+3]=C[J].mq;A.dC[fO+4]=r.dC[ko+4];A.dC[fO+5]=r.dC[ko+5];A.ts[F<<1]=g(C[J].ks,r.dC[ko+4],o[dR<<1]);
A.ts[(F<<1)+1]=g(C[J].ks,r.dC[ko+5],o[(dR<<1)+1]);A.alpha[F]=C[J].alpha;A.Kb[F]=C[J].alpha;S[F]=C[J].ks;
M[F]=C[J].z_}J=P[J]}for(F=0;F<W;F++){m=i(F+1,W);A.HS[F]=S[F]/(S[F]+M[m])}A.aaJ=1;G.td=A}for(var F=0;
F<z.length;F++){var G=z[F];_(G);I(G);f(G);y(G);Z(G);if(j.ahh)v(G)}}return{alC:c,aCr:$}}();iw.a6=function(x,Q,c,$){var z={OK:"minority",abL:$,ahh:!0,aft:1,ayJ:.2},j=iw.alC(x,Q,c,z);
iw.aCr(j,z);return j};iw.zo=function(x){var Q=[];for(var F=0;F<x.length;F++){var c=x[F],$=c.td,z=["M"],j=[$.dC[($.vG-1)*6+4],$.dC[($.vG-1)*6+5]];
for(var U=0;U<$.vG;U++){var i=U*6;if($.PU[U]==1){z.push("C");for(var b=0;b<6;b++)j.push($.dC[i+b])}else if($.PU[U]==0){z.push("L");
for(var b=2;b<4;b++)j.push($.dC[i+b])}}z.push("Z");Q.push({parent:c.parent,color:c.color,path:{j:j,G:z}})}return Q};
iw.LW=function(x,Q,c){var jF=x.length>>1,$,z=x[2*jF-3]-c,j=x[2*jF-2]-Q,U=x[2*jF-1]-c,i=U>z,b=0;for(var F=0;
F<jF;F++){$=j;z=U;j=x[2*F]-Q;U=x[2*F+1]-c;if(z==U)continue;i=U>z}for(var F=0;F<jF;F++){$=j;z=U;j=x[2*F]-Q;
U=x[2*F+1]-c;if(z<0&&U<0)continue;if(z>0&&U>0)continue;if($<0&&j<0)continue;if(z==U&&Math.min($,j)<=0)return!0;
if(z==U)continue;var e=$+(j-$)*-z/(U-z);if(e==0)return!0;if(e>0)b++;if(z==0&&i&&U>z)b--;if(z==0&&!i&&U<z)b--;
i=U>z}return(b&1)==1};iw.fill=function(x,Q,c,$){var z=Q[x],j=[x],U=0;while(U<j.length){var i=j[U];U++;
Q[i]=$;if(Q[i-c]==z){j.push(i-c);Q[i-c]=254}if(Q[i-1]==z){j.push(i-1);Q[i-1]=254}if(Q[i+1]==z){j.push(i+1);
Q[i+1]=254}if(Q[i+c]==z){j.push(i+c);Q[i+c]=254}}};var cc=function(){function x(i){return Math.max(0,Math.min(1,i))}function Q(i,b){var e=b<0?-b:b;
if(i>1)i=.99;i=i*.99;var k=Math.pow(e/5,.16),g=Math.pow(2,e<1?e:1+(e-1)*.8);if(b<0)g=1/g;i=k*(1-Math.pow(1-i,g))+(1-k)*i;
return i}function c(i,b){var e=b/100;i=i*.99;i=e*(.5-.5*Math.cos(i*Math.PI))+(1-e)*i;return i}var $=d.gg.lz(1,1,1,-.3),z=d.gg.HQ($);
function j(i,b,e,k,K,g,R){var T=i[e],D=i[e+1],a=i[e+2],_=d.gg.V3($,[T,D,a,1]);T=_[0];D=_[1];a=_[2];T=Q(T,k);
D=Q(D,k);a=Q(a,k);var _=d.gg.V3(z,[T,D,a,1]);T=_[0];D=_[1];a=_[2];T=x(T);D=x(D);a=x(a);T=c(T,K);D=c(D,K);
a=c(a,K);var I=eC.awY(T,D,a,g);T=I[0];D=I[1];a=I[2];T=x(T);D=x(D);a=x(a);if(R){var f=new Uint8Array(4);
f[0]=~~(.5+T*255);f[1]=~~(.5+D*255);f[2]=~~(.5+a*255);k5.NH(R,f,f,new gh(0,0,1,1));T=f[0]/255;D=f[1]/255;
a=f[2]/255}b[e]=T;b[e+1]=D;b[e+2]=a}function U(i,b,e,k,K,g){var R=K.Temp?K.Temp.v:0,T=K.Tint?K.Tint.v:0,D=K.Ex12?K.Ex12.v:0,a=K.Cr12?K.Cr12.v:0,_=K.Vibr?K.Vibr.v:0,I=K.Strt?K.Strt.v:0,f=eC.u_(R,T),y=null;
D+=f.a7M;if(_!=0||I!=0)y=k5.hd("vibA",{Strt:K.Strt,vibrance:K.Vibr});var Z=Date.now();if(g){var v=Math.pow(2,D),G=i.length;
D=0;var q=new Float32Array(4e3);for(var F=0;F<4e3;F++){var h=F*(1/1e3);h=d.t9(h);h*=v;h=d.Yw(h);h=x(h);
q[F]=h}for(var F=0;F<G;F+=3){k[F]=q[~~(i[F]*1e3)];k[F+1]=q[~~(i[F+1]*1e3)];k[F+2]=q[~~(i[F+2]*1e3)]}console.log(Date.now()-Z,"Exposure normalizing");
Z=Date.now()}else k.set(i);if(D!=0||a!=0||R!=0||T!=0||y){var r=17,H=1/(r-1),o=r*r*r,P=new Array(o*3);
for(var O=0;O<r;O++)for(var p=0;p<r;p++)for(var C=0;C<r;C++){var F=O*r*r+p*r+C,W=F*3;P[W]=O*H;P[W+1]=p*H;
P[W+2]=C*H}for(var F=0;F<o;F++)j(P,P,F*3,D,a,f,y);console.log(Date.now()-Z,"making LUT");Z=Date.now();
ICC.U.applyLUTFloat(P,r,k,k);console.log(Date.now()-Z,"applying LUT");Z=Date.now()}}return U}();function eW(){}eW.s5=function(x,Q){var c=new Uint8Array(x),$=0,z=Q.split("/").pop().split(".")[0];
function j(a){for(var F=0;F<a.length;F++)a[F].v.Nm.v=z+"/"+a[F].v.Nm.v.split("/").pop()}var U={Dq:[],Rk:[],list:[]},i=w._C(c,$);
$+=2;if(i<=2){U=eW.acO(c);j(U.list);return U}var b=w._C(c,$);$+=2;var e=w.mt(c,$,8);$+=8;var k=w.q(c,$);
$+=4;if(k>0)U.Dq=eW.abl(c,$,k,b,i);$+=k;var K=w.mt(c,$,8);$+=8;var g=w.q(c,$);$+=4;if(g>0)U.Rk=dN.dq(c,$,g);
$+=g;var R=w.mt(c,$,8);$+=8;var T=w.q(c,$);$+=4;if(T>0){var D={};e0.$x(c,D,$+4);U.list=D.Brsh.v}$+=T;
var a=U.list;for(var F=0;F<a.length;F++){d1.H9.check(a[F].v)}j(a);return U};eW.ki=function(x,Q){x.v.Nm.v=Q};
eW.acO=function(x){var Q={Dq:[],Rk:[],list:[]},c=0,$=w._C(x,c);c+=2;var z=w._C(x,c);c+=2;for(var F=0;
F<z;F++){var j=w._C(x,c);c+=2;var U=w.q(x,c);c+=4;var i=c;if(j==2){var b={};Q.Dq.push(b);var e=w.q(x,i);
i+=4;var k=w._C(x,i);i+=2;if($==2){var K=w.Ez(x,i);i+=4+K.length*2+2}b.id=hf.KN()+"-d71c-11e5-b1ae-a548a96e5f9f";
i++;i+=8;b.W4=w.Ky(x,i);i+=16;var g=w._C(x,i);i+=2;var R=x[i];i++;var T=bo.$c(!1,g,x,b.W4.m,b.W4.e,i,R);
eW.a4S(b,T);var D=d1.Bk(b.id),a=D.Brsh.v;a.Dmtr.v.val=b.W4.m;a.Spcn.v.val=k;Q.list.push({t:"Objc",v:D})}c+=U}return Q};
eW.gS=function(x){var Q=new ij,c=0,$=0;w.Lv(Q,c,6);c+=2;w.Lv(Q,c,2);c+=2;var z={},j=[],U={},i=[];for(var F=0;
F<x.list.length;F++){var b=x.list[F].v,e=b.Brsh.v;if(e.classID=="sampledBrush")z[e.sampledData.v]=!0;
if(b.Txtr)U[b.Txtr.v.Idnt.v]=!0}for(var F=0;F<x.Dq.length;F++)if(z[x.Dq[F].id])j.push(x.Dq[F]);for(var F=0;
F<x.Rk.length;F++)if(z[x.Rk[F].id])i.push(x.Rk[F]);w.RP(Q,c,"8BIMsamp");c+=8;c+=4;$=c;c=eW.aql(Q,c,j);
w.Rj(Q,$-4,c-$);w.RP(Q,c,"8BIMpatt");c+=8;c+=4;$=c;c=dN.ZF(Q,c,i);w.Rj(Q,$-4,c-$);var k=JSON.parse(JSON.stringify(x.list));
for(var F=0;F<k.length;F++)k[F].v.Nm.v=k[F].v.Nm.v.split("/").pop();var K={classID:"null",Brsh:{t:"VlLs",v:k}};
w.RP(Q,c,"8BIMdesc");c+=8;c+=4;$=c;w.Rj(Q,c,16);c+=4;c+=e0.lD(Q,K,c);w.Rj(Q,$-4,c-$);return Q.data.slice(0,c).buffer};
eW.abl=function(x,Q,c,$,z){var j=w.q,U=w.Ky,i=Q+c,b=[];while(Q<i){var e={};b.push(e);var k=j(x,Q);Q+=4;
var K=Q,g=w.D4(x,Q);Q+=g.length;e.id=g.fY;if($==1){Q+=9;e.W4=U(x,Q);Q+=16}else{Q+=7;var R=j(x,Q);Q+=4;
e.W4=U(x,Q);Q+=16;var T=j(x,Q);Q+=4;Q+=T*4;var D=j(x,Q);Q+=4;var a=j(x,Q);Q+=4;var _=U(x,Q);Q+=16}var I=w._C(x,Q);
Q+=2;var f=x[Q];Q+=1;var y=bo.$c(!1,I,x,e.W4.m,e.W4.e,Q,f);eW.a4S(e,y);if(k%4!=0)k+=4-k%4;Q=K+k}return b};
eW.a4S=function(x,Q){var c=x.W4.clone();c.x=c.y=0;x.GD=[Q,c]};eW.aql=function(x,Q,c){var $=w.Rj,z=w.xC;
for(var F=0;F<c.length;F++){var j=c[F],U=Q+4,b=56,k=1;Q+=4;w.$v(x,Q,j.id);Q+=j.id.length+2;x.qN(Q,1);
x.data[Q]=1;Q+=3;$(x,Q,3);Q+=4;var i=Q;Q+=4;z(x,Q,j.W4);Q+=16;$(x,Q,b);Q+=4;Q+=b*4;$(x,Q-4,1);var e=Q;
Q+=4;$(x,Q,8);Q+=4;z(x,Q,j.W4);Q+=16;w.Lv(x,Q,8);Q+=2;x.qN(Q,1);x.data[Q]=k;Q++;var K=j.GD[0];x.qN(Q,j.W4.P()*2);
Q=bo.Iw(!1,K,x.data,j.W4.m,j.W4.e,Q,k);x.qN(Q,8);Q+=8;var g=Q-U;$(x,U-4,g);$(x,i,g-49);$(x,e,g-305);
if(g%4!=0)Q+=4-g%4}return Q};function jq(){}jq.s5=function(x,Q){var c=new Uint8Array(x),$=[],z=0,j=w._C(c,z);
z+=2;if(j!=4){throw"Unknown version of curves: "+j}var U=w._C(c,z);z+=2;for(var F=0;F<U;F++){var i=jq.aCX(c,z);
z+=2+2*i.length;$.push(i)}if(z!=c.length){var b=w.mt(c,z,4);z+=4;var e=w._C(c,z);z+=2;var k=w._C(c,z);
z+=2;if(k!=0)throw"extra curves for channels"}var K=jq.aAW($,0);K.presetKind={t:"long",v:3};K.presetFileName={t:"TEXT",v:Q.split("/").pop().split(".")[0]};
return[K]};jq.a1=function(x,Q,c){var $=Q,z=[],j=x[Q];Q+=3;var U=w.q(x,Q);Q+=4;for(var F=0;F<4;F++){var i=U>>>F&1;
if(i){if(j==0){var b=jq.aCX(x,Q);Q+=2+2*b.length}else{var b=jq.avt(x,Q);Q+=256}z.push(b)}else z.push(j==0?[0,0,255,255]:jq.aog())}var e=jq.aAW(z,j);
return e};jq.aAW=function(x,Q){var c=fK.$H("curv");for(var F=0;F<4;F++){if(Q==0){var $=x[F],z=[];for(var j=0;
j<$.length;j+=2)z.push(d.eu.UW($[j],$[j+1],!0));jq.SU(c,F,z)}else jq.SU(c,F,x[F])}return c};jq.PF=function(x,Q,c){var $=[];
for(var F=0;F<4;F++){var z=jq.Hb(c,F);if(z.length==256)$.push(z);else{var j=[];for(var U=0;U<z.length;
U++)j.push(z[U].v.Hrzn.v,z[U].v.Vrtc.v);$.push(j)}}var i=Q,b=$[0].length==256?1:0;x.qN(Q,3);x.data[Q]=b;
x.data[Q+1]=0;x.data[Q+2]=1;Q+=3;w.Rj(x,Q,15);Q+=4;for(var F=0;F<4;F++){var e=$[F];if(b==0){jq.avu(x,Q,e);
Q+=2+2*e.length}else{jq.amP(x,Q,e);Q+=256}}return Q-i};jq.aog=function(){var x=[];for(var F=0;F<256;
F++)x.push(F);return x};jq.SU=function(x,Q,c){var $=bV.Oh("CrvA",Q);if(c.length<256)$.Crv={t:"VlLs",v:c};
else{$.Mpng={t:"VlLs",v:[]};for(var F=0;F<256;F++)$.Mpng.v[F]={t:"long",v:c[F]}}$={t:"Objc",v:$};var z=x.Adjs.v,j=bV.Ni(z,Q);
if(j==-1)z.push($);else z[j]=$};jq.Hb=function(x,Q){var c=x.Adjs.v,$=bV.Ni(c,Q);if($==-1){if(c.length==0||c[0].v.Crv)return[d.eu.UW(0,0,!0),d.eu.UW(255,255,!0)];
if(c[0].v.autoMachineLearning||c[0].v.AuCo)return[d.eu.UW(0,0,!0),d.eu.UW(128,160,!0),d.eu.UW(255,255,!0)];
var z=[];for(var F=0;F<256;F++)z.push(F);return z}var j=c[$].v;if(j.Crv)return j.Crv.v;if(j.Mpng){var z=[];
for(var F=0;F<256;F++)z.push(j.Mpng.v[F].v);return z}return[d.eu.UW(0,0,!0),d.eu.UW(255,255,!0)]};jq.aCX=function(x,Q){var c=[],$=w._C(x,Q);
Q+=2;for(var z=0;z<$;z++){var j=w._C(x,Q);Q+=2;var U=w._C(x,Q);Q+=2;c.push(U,j)}return c};jq.avu=function(x,Q,c){var $=c.length/2;
w.Lv(x,Q,$);Q+=2;for(var z=0;z<$;z++){w.Lv(x,Q,c[z*2+1]);Q+=2;w.Lv(x,Q,c[z*2+0]);Q+=2}};jq.avt=function(x,Q){var c=[];
for(var F=0;F<256;F++)c.push(x[Q+F]);return c};jq.amP=function(x,Q,c){x.qN(Q,256);for(var F=0;F<256;
F++)x.data[Q+F]=c[F]};function hu(){}hu.a1=function(x,Q,c){var $={},z=w._C(x,Q);Q+=2;$.MQ=x[Q]==1;Q++;
Q++;$.zU=[w.u7(x,Q),w.u7(x,Q+2),w.u7(x,Q+4)];Q+=6;$.q6=[w.u7(x,Q),w.u7(x,Q+2),w.u7(x,Q+4)];Q+=6;$.ge=[];
for(var F=0;F<6;F++){var j={};j.XS=[w.u7(x,Q),w.u7(x,Q+2),w.u7(x,Q+4),w.u7(x,Q+6)];Q+=8;j.qR=[w.u7(x,Q),w.u7(x,Q+2),w.u7(x,Q+4)];
Q+=6;$.ge.push(j)}var U=fK.$H("hue2"),i=$;if(U.Clrz==null)U.Clrz={t:"bool",v:!1};U.Clrz.v=i.MQ;for(var F=0;
F<7;F++){var b=F==0?i.MQ?i.zU:i.q6:i.ge[F-1];hu.SU(U,F,b)}return U};hu.a4G=function(x){return{classID:"Hst2",H:{t:"long",v:x[0]},Strt:{t:"long",v:x[1]},Lght:{t:"long",v:x[2]}}};
hu.Ni=function(x,Q){for(var F=0;F<x.length;F++){var c=x[F].v.LclR;if(Q==0&&c==null||c!=null&&c.v==Q)return F}return-1};
hu.SU=function(x,Q,c){var $=Q==0?c:c.qR,z=hu.a4G($);if(Q!=0){var j=c.XS;z.LclR={t:"long",v:Q},z.BgnR={t:"long",v:j[0]};
z.BgnS={t:"long",v:j[1]};z.EndS={t:"long",v:j[2]};z.EndR={t:"long",v:j[3]}}z={t:"Objc",v:z};var U=x.Adjs.v,i=hu.Ni(U,Q);
if(i==-1)U.push(z);else U[i]=z};hu.Hb=function(x,Q){var c=x.Adjs.v,$=hu.Ni(c,Q);if($==-1){if(Q==0)return[0,0,0];
else return[{XS:[315,345,15,45],qR:[0,0,0]},{XS:[15,45,75,105],qR:[0,0,0]},{XS:[75,105,135,165],qR:[0,0,0]},{XS:[135,165,195,225],qR:[0,0,0]},{XS:[195,225,255,285],qR:[0,0,0]},{XS:[255,285,315,345],qR:[0,0,0]}][Q-1]}var z=c[$].v,j=[z.H.v,z.Strt.v,z.Lght.v];
if(Q==0)return j;return{qR:j,XS:[z.BgnR.v,z.BgnS.v,z.EndS.v,z.EndR.v]}};hu.PF=function(x,Q,c){var $={MQ:c.Clrz?c.Clrz.v:!1,ge:[]};
$.zU=$.q6=hu.Hb(c,0);for(var F=1;F<7;F++)$.ge.push(hu.Hb(c,F));var z=2+2+12+6*14,j=x.data;x.qN(Q,z);
w.Dr(j,Q,2);Q+=2;j[Q]=$.MQ?1:0;Q++;Q++;w.$m(j,Q+0,$.zU[0]);w.$m(j,Q+2,$.zU[1]);w.$m(j,Q+4,$.zU[2]);Q+=6;
w.$m(j,Q+0,$.q6[0]);w.$m(j,Q+2,$.q6[1]);w.$m(j,Q+4,$.q6[2]);Q+=6;for(var F=0;F<6;F++){var U=$.ge[F].XS,i=$.ge[F].qR;
w.$m(j,Q+0,U[0]);w.$m(j,Q+2,U[1]);w.$m(j,Q+4,U[2]);w.$m(j,Q+6,U[3]);Q+=8;w.$m(j,Q+0,i[0]);w.$m(j,Q+2,i[1]);
w.$m(j,Q+4,i[2]);Q+=6}return z};function bV(){}bV.s5=function(x){var Q=new Uint8Array(x),c=2,$=[];for(var F=0;
F<29;F++){var z=[];$.push(z);for(var j=0;j<5;j++)z.push(w._C(Q,c+F*10+j*2))}c+=29*10;if(c<Q.length){var U=w.mt(Q,c,4);
c+=4;var i=w._C(Q,c);c+=2;var b=w._C(Q,c);c+=2;var e=b-29;for(var F=0;F<e;F++){var z=[];$.push(z);for(var j=0;
j<5;j++)z.push(w._C(Q,c+F*10+j*2))}}var k=fK.$H("levl");for(var F=0;F<4;F++)bV.SU(k,F,$[F]);return k};
bV.Oh=function(x,F){var Q=["Cmps","Rd","Grn","Bl"],c={t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:Q[F]}}]};
return{classID:x,Chnl:c}};bV.Ni=function(x,Q){var c={Cmps:0,Rd:1,Grn:2,Bl:3};for(var F=0;F<x.length;
F++){var $=x[F].v,z=c[$.Chnl.v[0].v.enum];if(z==Q)return F}return-1};bV.SU=function(x,Q,c){var $=bV.Oh("LvlA",Q);
$.Inpt={t:"VlLs",v:[{t:"long",v:c[0]},{t:"long",v:c[1]}]};$.Otpt={t:"VlLs",v:[{t:"long",v:c[2]},{t:"long",v:c[3]}]};
$.Gmm={t:"doub",v:c[4]/100};$={t:"Objc",v:$};var z=x.Adjs.v,j=bV.Ni(z,Q);if(j==-1)z.push($);else z[j]=$};
bV.Hb=function(x,Q){var c=[0,255,0,255,100],$=x.Adjs.v,z=bV.Ni($,Q);if(z==-1)return c;var j=$[z].v;if(j.Inpt){c[0]=j.Inpt.v[0].v;
c[1]=j.Inpt.v[1].v}if(j.Otpt){c[2]=j.Otpt.v[0].v;c[3]=j.Otpt.v[1].v}if(j.Gmm){c[4]=Math.round(j.Gmm.v*100)}return c};
bV.gS=function(x,Q){var c=[],$=0;for(var F=0;F<4;F++)c.push(bV.Hb(Q,F));while(c.length<29)c.push([0,255,0,255,100]);
x.qN(0,2+10*29);w.Dr(x.data,$,2);$+=2;for(var F=0;F<29;F++){var z=c[F];for(var j=0;j<5;j++)w.Dr(x.data,$+F*10+j*2,z[j])}$+=29*10;
if(c.length==29)return $;x.qN($,8+10*(c.length-29));w.f3(x.data,$,"Lvls");$+=4;w.Dr(x.data,$,3);$+=2;
w.Dr(x.data,$,c.length);$+=2;var U=c.length-29;for(var F=0;F<U;F++){var z=c[29+F];for(var j=0;j<5;j++)w.Dr(x.data,$+F*10+j*2,z[j])}$+=10*U;
return $};function kb(){}kb.s5=function(x,Q){var c=new Uint8Array(x),$=2,z=Q.split("/").pop().split(".")[0],j={RI:[],DL:[]},U=w.mt(c,$,4);
$+=4;var i=w._C(c,$);$+=2;var b=w.q(c,$);$+=4;j.RI=dN.dq(c,$,b);$+=b;var e=w.q(c,$);$+=4;for(var F=0;
F<e;F++){var k=w.q(c,$);$+=4;var K=$,g={Uz:{},Ry:{}};j.DL.push(g);$+=4;$+=e0.$x(c,g.Uz,$);g.Uz.Nm.v=z+"/"+g.Uz.Nm.v.split("=").pop();
$+=4;$+=e0.$x(c,g.Ry,$);$=K+k;var R=g.Ry.blendOptions,T=g.Ry.Lefx;if(R&&Object.keys(R.v).length>1){}if(T){if(T.v.masterFXSwitch==null)T.v.masterFXSwitch={t:"bool",v:!0};
hz.wo(T.v)}}return j};kb.ki=function(x,Q){x.Uz.Nm.v=Q};kb.gS=function(x){var Q=new ij,c=0;w.Lv(Q,c,2);
c+=2;w.RP(Q,c,"8BSL");c+=4;w.Lv(Q,c,3);c+=2;var $=c;c+=4;c=dN.ZF(Q,c,x.RI);w.Rj(Q,$,c-$-4);var z=x.DL.length;
w.Rj(Q,c,z);c+=4;for(var F=0;F<z;F++){c+=4;var j=c,U=x.DL[F];w.Rj(Q,c,16);c+=4;var i=U.Uz.Nm.v;U.Uz.Nm.v=U.Uz.Nm.v.split("/").pop();
c+=e0.lD(Q,U.Uz,c);U.Uz.Nm.v=i;var b=U.Ry.Lefx;if(b){U.Ry.Lefx=JSON.parse(JSON.stringify(b));hz.p6(U.Ry.Lefx.v)}w.Rj(Q,c,16);
c+=4;c+=e0.lD(Q,U.Ry,c);if(b)U.Ry.Lefx=b;w.Rj(Q,j-4,c-j)}return Q.data.slice(0,c).buffer};function cP(){}cP.a1=function(x,Q,c){var $=w._C(x,Q);
Q+=2;var z={};z.ak=w._C(x,Q)==1;Q+=2;z.OQ=[];for(var F=0;F<10;F++){var j=[];z.OQ.push(j);for(var U=0;
U<4;U++)j.push(w.u7(x,Q+U*2));Q+=8}var i=fK.$H("selc");i.Mthd.v.CrcM=z.ak?"Absl":"Rltv";for(var F=1;
F<10;F++)cP.SU(i,F-1,z.OQ[F]);return i};cP.y5="Rds Ylws Grns Cyns Bls Mgnt Whts Ntrl Blks".split(" ");
cP.Oh=function(x,F){var Q=["Cmps","Rd","Grn","Bl"],c={t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:Q[F]}}]};
return{classID:x,Chnl:c}};cP.Ni=function(x,Q){var c=cP.y5;for(var F=0;F<x.length;F++){var $=x[F].v,z=c.indexOf($.Clrs.v.Clrs);
if(z==Q)return F}return-1};cP.SU=function(x,Q,c){var $=["Cyn","Mgnt","Ylw","Blck"],z={classID:"ClrC",Clrs:{t:"enum",v:{Clrs:cP.y5[Q]}}};
for(var j=0;j<4;j++)z[$[j]]={t:"UntF",v:{type:"#Prc",val:c[j]}};z={t:"Objc",v:z};var U=x.ClrC.v,i=cP.Ni(U,Q);
if(i==-1)U.push(z);else U[i]=z};cP.Hb=function(x,Q){var c=[0,0,0,0],$=x.ClrC.v,z=cP.Ni($,Q);if(z==-1)return c;
var j=["Cyn","Mgnt","Ylw","Blck"];for(var F=0;F<4;F++)if($[z].v[j[F]])c[F]=$[z].v[j[F]].v.val;return c};
cP.PF=function(x,Q,c){var $={ak:c.Mthd.v.CrcM=="Absl",OQ:[[0,0,0,0]]};for(var F=0;F<9;F++)$.OQ.push(cP.Hb(c,F));
x.qN(Q,84);w.Dr(x.data,Q,1);Q+=2;w.Dr(x.data,Q,$.ak?1:0);Q+=2;for(var F=0;F<10;F++){var z=$.OQ[F];for(var j=0;
j<4;j++)w.$m(x.data,Q+j*2,z[j]);Q+=8}return 84};function dJ(){}dJ.$H=function(){return{LB:new gh(0,0,50,50),Uz:"",mk:"play",$:d.o.JE.vf([.1,.1,.9,.5,.1,.9],0)}};
dJ.s5=function(x,Q){x=new Uint8Array(x);var c=0,$=[],z=Q.split("/").pop().split(".")[0],j=Date.now(),U=w.mt(x,0,4);
c+=4;var i=w.q(x,c);c+=4;var b=w.q(x,c);c+=4;for(var F=0;F<b;F++){var e=w.Ez(x,c);c+=e.length*2+4+2;
if((e.length&1)==0)c+=2;c=dJ.adw(x,c,e,$);$[F].mk=z+"/"+$[F].mk}return $};dJ.adw=function(x,Q,c,$){var z=w.q(x,Q);
Q+=4;var j=w.q(x,Q);Q+=4;var U=Q,i=w.D4(x,U).fY;U+=i.length+1;var b=w.Ky(x,U);U+=16;var e=dJ.ur(x,U,j-(U-Q)),k=d.o.Mn(e),K=d.A.pA(k),g=1/K.m,R=1/K.e;
d.o.Of(e,new bI(g,0,0,R,-K.x*g,-K.y*R));$.push({mk:c,Uz:i,$:e,LB:b});Q+=j;return Q};dJ.ki=function(x,Q){x.mk=Q};
dJ.gS=function(x){var Q=new ij,c=0;w.RP(Q,c,"cush");c+=4;w.Rj(Q,c,2);c+=4;w.Rj(Q,c,x.length);c+=4;for(var F=0;
F<x.length;F++){var $=x[F],z=$.mk.split("/").pop()+"\0";w.KY(Q,c,z);c+=4+z.length*2;if((z.length&1)==1)c+=2;
w.Rj(Q,c,1);c+=4;c+=4;var j=c;w.$v(Q,c,$.Uz);c+=$.Uz.length+1;w.xC(Q,c,$.LB);c+=16;Q.qN(c,$.$.length*26);
dJ.Wg(Q.data,c,$.$,1,1);c+=$.$.length*26;var U=c-j;if((U&3)!=0)U+=4-(U&3);w.Rj(Q,j-4,U);c=j+U}return Q.data.slice(0,c).buffer};
dJ.a9r=function(x){var Q=[];for(var F=0;F<x.length;F++){var c=x[F],$=c.type,z={type:$};Q.push(z);if($==6){}else if($==8)z.all=c.all;
else if($==0||$==3){z.length=c.length;z.frule=c.Kp;z.third=c.YS;z.prmA=c.kO;z.prmB=c.QQ}else{z.c=[c.Hw.x,c.Hw.y,c.L.x,c.L.y,c.Im.x,c.Im.y]}}return Q};
dJ.ah8=function(x){var Q=[];for(var F=0;F<x.length;F++){var c=x[F],$=c.type,z={type:$};Q.push(z);if($==6){}else if($==8)z.all=c.all;
else if($==0||$==3){z.length=c.length;z.Kp=c.frule;z.YS=c.third;z.kO=c.prmA;z.QQ=c.prmB}else{var j=c.c;
z.Hw=new bC(j[0],j[1]);z.L=new bC(j[2],j[3]);z.Im=new bC(j[4],j[5])}}return Q};dJ.ur=function(x,Q,c,$,z){if($==null)$=1;
if(z==null)z=1;function j(D,a,_){var I=w.atr(D,a)*_,f=Math.round(I);return Math.abs(I-f)<1e-6?f:I}var U=w.u7,i=[],b=Math.floor(c/26);
for(var F=0;F<b;F++){var e=Q+F*26,k={},K=0;i.push(k);k.type=U(x,e);e+=2;if(k.type==6){K=24}if(k.type==8){k.all=U(x,e);
e+=2;K=22}if(k.type==0||k.type==3){k.length=U(x,e);e+=2;k.Kp=U(x,e);e+=2;k.YS=U(x,e);e+=2;k.kO=w.q(x,e);
e+=4;k.QQ=w.q(x,e);e+=4;K=10}if(k.type==1||k.type==2||k.type==4||k.type==5){var g,R;R=j(x,e,z);e+=4;
g=j(x,e,$);e+=4;k.Hw=new bC(g,R);R=j(x,e,z);e+=4;g=j(x,e,$);e+=4;k.L=new bC(g,R);R=j(x,e,z);e+=4;g=j(x,e,$);
e+=4;k.Im=new bC(g,R);K=0}for(var T=0;T<K;T++)if(x[e+T]!=0){console.log("Unexpected non-zero byte!",k,T,x[e+T])}}return i};
dJ.Wg=function(x,Q,c,$,z){var j=w.$m,U=w.akH,i=c.length;for(var F=0;F<i;F++){var b=Q+F*26,e=c[F];j(x,b,e.type);
b+=2;if(e.type==6){}if(e.type==8)j(x,b,e.all);if(e.type==0||e.type==3){j(x,b,e.length);b+=2;j(x,b,e.Kp);
b+=2;j(x,b,e.YS);b+=2}if(e.type==1||e.type==2||e.type==4||e.type==5){U(x,b,e.Hw.y/z);b+=4;U(x,b,e.Hw.x/$);
b+=4;U(x,b,e.L.y/z);b+=4;U(x,b,e.L.x/$);b+=4;U(x,b,e.Im.y/z);b+=4;U(x,b,e.Im.x/$);b+=4}}};function gR(){}gR.s5=function(x){var Q=new Uint8Array(x),c=[],$=0;
if(w.mt(Q,0,4)=="ASEF")c=gR.aDe(Q);else{$=gR.a3a(Q,$,c);if($+3<Q.length){c=[];$=gR.a3a(Q,$,c)}}return c};
gR.aDe=function(x){var Q=[],c=8,$=w.q(x,c),z,j=null,U,i,b,e;c+=4;for(var k=0;k<$;k++){var K=w._C(x,c);
c+=2;var g=w.q(x,c);c+=4;var R=c+g;if(K==49153||K==1){var T=w._C(x,c);c+=2;var D=w.fy(x,c,T-1);c+=T*2;
if(K==1)z=D;else j=D}if(K==1){var a=w.mt(x,c,4);c+=4;U=w.lw(x,c);c+=4;i=w.lw(x,c);c+=4;b=w.lw(x,c);c+=4;
if(a=="RGB "){}else if(a=="CMYK"){e=w.lw(x,c);c+=4;var _=UDOC.C.cmykToRgb([U,i,b,e]);U=_[0];i=_[1];b=_[2]}else alert("Unknown color space: "+a);
Q.push({Z:U*255,r:i*255,J:b*255,J4:(j?j+" : ":"")+z})}c=R}return Q};gR.a3a=function(x,Q,c){var $=w._C,z=w.u7,j=$(x,Q);
Q+=2;var U=$(x,Q);Q+=2;for(var F=0;F<U;F++){var i=gR.zH(x,Q);Q+=10;if(j==2){i.J4=w.Ez(x,Q);Q+=4+i.J4.length*2+2}c.push(i)}return Q};
gR.zH=function(x,Q){var c=w._C,$=w.u7,z=c(x,Q),R=null;Q+=2;var j=c(x,Q);Q+=2;var U=c(x,Q);Q+=2;var i=c(x,Q);
Q+=2;var b=c(x,Q);Q+=2;var e=1/65535,k=255/65535,K=100/65535,g=255/1e4;if(z==0)R={Z:j*k,r:U*k,J:i*k};
else if(z==1){R=d.Us(j*e,U*e,i*e);R.Z*=255;R.r*=255;R.J*=255}else if(z==2)R=d.I.Du({classID:"CMYC",Cyn:{t:"doub",v:100-j*K},Mgnt:{t:"doub",v:100-U*K},Ylw:{t:"doub",v:100-i*K},Blck:{t:"doub",v:100-b*K}});
else if(z==7){var T=d.Ay(j/100,$(x,Q-6)/100,$(x,Q-4)/100);R=T}else if(z==8){R={Z:255-j*g,r:255-U*g,J:255-i*g}}else if(z==18){var D=255*j/16384;
R={Z:D,r:D,J:D}}else{throw z}return R};gR.gS=function(x){var Q=new ij,c=0,$=w.Lv;$(Q,c,2);c+=2;$(Q,c,x.length);
c+=2;for(var F=0;F<x.length;F++){var z=x[F];Q.qN(c,10);gR.Au(Q.data,c,z);c+=10;var j=(z.J4?z.J4:"")+"\0";
w.KY(Q,c,j);c+=4+j.length*2}return Q.data.slice(0,c).buffer};gR.ki=function(x,Q){x.J4=Q};gR.Au=function(x,Q,c){var $=65535/255,z=w.Dr;
z(x,Q,0);z(x,Q+2,Math.round(c.Z*$));z(x,Q+4,Math.round(c.r*$));z(x,Q+6,Math.round(c.J*$));z(x,Q+8,0)};
function i0(){}i0.s5=function(x){var Q=new Uint8Array(x),c=4,$={};$.LX=w.Ez(Q,c);c+=4+$.LX.length*2+2;
$.exp=Q[c++]==1;$.yY=[];var z=w.q(Q,c);c+=4;for(var F=0;F<z;F++){var j={};$.yY.push(j);j.xR=w._C(Q,c);
c+=2;j.shift=Q[c++]==1;j.axO=Q[c++]==1;j.color=w._C(Q,c);c+=2;j.LX=w.Ez(Q,c);c+=4+j.LX.length*2+2;j.exp=Q[c++]==1;
j.yY=[];var U=w.q(Q,c);c+=4;for(var i=0;i<U;i++){var b={};j.yY.push(b);b.exp=Q[c++]==1;b.w=Q[c++]==1;
b.awJ=Q[c++]==1;b.a1t=Q[c++];var e=w.mt(Q,c,4);c+=4;if(e=="TEXT"){b.q4=i0.a7x(Q,c);c+=4+b.q4.length}else if(e=="long"){b.q4=w.mt(Q,c,4);
c+=4}else throw"e";b.R3=i0.a7x(Q,c);c+=4+b.R3.length;var k=w.c4(Q,c);c+=4;if(k==-1){b.dx={};var K=e0.$x(Q,b.dx,c);
c+=K}}}console.log($);var g=new Uint8Array(i0.gS($));for(var F=0;F<g.length;F++)if(g[F]!=Q[F]&&w.mt(Q,F+1,4)!="None"){console.log(Q.length,g.length);
var R=4*(F>>>2)-16;console.log(w.Mm(Q,R,64));console.log(w.Mm(g,R,64));console.log(Q.slice(R,R+64));
console.log(g.slice(R,R+64));throw"i"}return[$]};i0.a7x=function(x,Q){var c=w.q(x,Q);return w.mt(x,Q+4,c)};
i0.aak=function(x,Q,c){w.Rj(x,Q,c.length);w.RP(x,Q+4,c)};i0.gS=function(x){var Q=new ij,c=0;w.Rj(Q,c,16);
c+=4;w.KY(Q,c,x.LX+"\0");c+=4+x.LX.length*2+2;Q.qN(c,1);Q.data[c++]=x.exp?1:0;var $=x.yY.length;w.Rj(Q,c,$);
c+=4;for(var F=0;F<$;F++){var z=x.yY[F];w.Lv(Q,c,z.xR);c+=2;Q.qN(c,2);Q.data[c++]=z.shift?1:0;Q.data[c++]=z.axO?1:0;
w.Lv(Q,c,z.color);c+=2;w.KY(Q,c,z.LX+"\0");c+=4+z.LX.length*2+2;Q.qN(c,1);Q.data[c++]=z.exp?1:0;var j=z.yY.length;
w.Rj(Q,c,j);c+=4;for(var U=0;U<j;U++){var i=z.yY[U];Q.qN(c,4);Q.data[c++]=i.exp?1:0;Q.data[c++]=i.w?1:0;
Q.data[c++]=i.awJ?1:0;Q.data[c++]=i.a1t;var b="LqFy Avrg GEfc PbPl Fbrs Bokh LnCr HsbP".split(" ").indexOf(i.q4)!=-1;
w.RP(Q,c,b?"long":"TEXT");c+=4;if(!b){i0.aak(Q,c,i.q4);c+=4+i.q4.length}else{w.RP(Q,c,i.q4);c+=4}i0.aak(Q,c,i.R3);
c+=4+i.R3.length;w.gv(Q,c,i.dx?-1:0);c+=4;if(i.dx){var e=e0.lD(Q,i.dx,c);c+=e}}}return Q.data.slice(0,c).buffer};
function id(){}id.s5=function(x){var Q=new Uint8Array(x),c=0,$=w.q(Q,c),b;c+=4;var z=w.mt(Q,c,8);c+=8;
var j=w.K3(Q,c);c+=4;var U=w.K3(Q,c);c+=4;var i=w.K3(Q,c);c+=4;console.log(j,U,i);if($==2){b=new Float32Array(x,32,x.byteLength-32>>>2)}else if($==3||$==4){b=new Float32Array(U*i*2);
var e=0,k=0,K=!0;c=$==3?32:16+8+40;while(c<Q.length){var g=w.K3(Q,c);c+=4;if(K)k+=g;else{for(var F=0;
F<g;F++){b[e+k+F<<1]=w.Q0(Q,c);b[(e+k+F<<1)+1]=w.Q0(Q,c+4);c+=8}k+=g}K=!K;if(g!=0&&k==U){e+=U;k=0;K=!0;
if(e==U*i)break}}}else throw"unknown Mesh version: "+$;return{ww:U,R0:i,map:b}};id.o5=function(x){var Q=x.ww,c=x.R0,$=x.map,z=new Uint8Array(32+c*Q*8+c*8),j=0,U=0;
w.EO(z,j,3);j+=4;w.f3(z,j,"yfqLhseM");j+=8;w.aa(z,j,2);j+=4;w.aa(z,j,Q);j+=4;w.aa(z,j,c);j+=4;w.aa(z,j,0);
j+=4;w.aa(z,j,1);j+=4;for(var i=0;i<c;i++){w.aa(z,j,0);j+=4;w.aa(z,j,Q);j+=4;for(var b=0;b<Q;b++){w.r1(z,j,$[U]);
w.r1(z,j+4,$[U+1]);U+=2;j+=8}}return z.buffer};function de(){}de.s5=function(x){var Q=new Uint8Array(x),c=0,$=w.mt(Q,c,4);
c+=4;var z=w._C(Q,c);c+=2;var j=w.q(Q,c);c+=4;var U=[];for(var F=0;F<j;F++){var i=w.q(Q,c);c+=4;var b={classID:"ShpC",Nm:{t:"TEXT",v:""},Crv:{t:"VlLs",v:[]}};
U.push(b);var e=w.Ez(Q,c);b.Nm.v=e;c+=4+e.length*2+2;var k=w._C(Q,c);c+=2;var K=w._C(Q,c);c+=2;for(var g=0;
g<K;g++){var R=d.eu.UW(0,0,!0);R.v.Vrtc.v=w._C(Q,c);c+=2;R.v.Hrzn.v=w._C(Q,c);c+=2;b.Crv.v.push(R)}if(i==1){}else if(i==2){for(var g=0;
g<K;g++){b.Crv.v[g].v.Cnty.v=Q[c]==1;c+=1}}else throw"error";var T=w.q(Q,c);c+=4;var D=w.q(Q,c);c+=4}return U};
de.ki=function(x,Q){x.Nm.v=Q};de.gS=function(x){var Q=new ij,c=0;w.RP(Q,c,"8BFS");c+=4;w.Lv(Q,c,1);c+=2;
w.Rj(Q,c,x.length);c+=4;for(var F=0;F<x.length;F++){w.Rj(Q,c,2);c+=4;var $=x[F];w.KY(Q,c,$.Nm.v+"\0");
c+=4+$.Nm.v.length*2+2;w.Lv(Q,c,2);c+=2;var z=$.Crv.v.length;w.Lv(Q,c,z);c+=2;for(var j=0;j<z;j++){var U=$.Crv.v[j];
w.Lv(Q,c,U.v.Vrtc.v);c+=2;w.Lv(Q,c,U.v.Hrzn.v);c+=2}Q.qN(c,z);for(var j=0;j<z;j++){Q.data[c]=$.Crv.v[j].v.Cnty.v;
c++}w.Rj(Q,c,0);c+=4;w.Rj(Q,c,0);c+=4}return Q.data.slice(0,c).buffer};function dN(){}dN.s5=function(x,Q){var c=new Uint8Array(x),$=4,z=Q.split("/").pop().split(".")[0],j=w._C(c,$);
$+=2;var U=w.q(c,$);$+=4;var i=[];for(var F=0;F<U;F++){var b={};i.push(b);$=dN.ati(c,$,b);b.name=z+"/"+b.name.split("=").pop()}return i};
dN.ki=function(x,Q){x.name=Q};dN.gS=function(x){var Q=new ij,c=0;w.RP(Q,c,"8BPT");c+=4;w.Lv(Q,c,1);c+=2;
w.Rj(Q,c,x.length);c+=4;for(var F=0;F<x.length;F++){var $=x[F],z=$.name;$.name=$.name.split("/").pop();
c=dN.aDI(Q,c,$);$.name=z}return Q.data.slice(0,c).buffer};dN.dq=function(x,Q,c){var $=Q+c,z=[];while(Q<$){var j={},U=w.q(x,Q);
Q+=4;var i=Q;Q=dN.ati(x,Q,j);if(!j.GD[1]._6())z.push(j);if(U%4!=0)U+=4-U%4;Q=i+U}return z};dN.ZF=function(x,Q,c){for(var F=0;
F<c.length;F++){var $=c[F];Q+=4;var z=Q;Q=dN.aDI(x,Q,$);var j=Q-z;w.Rj(x,z-4,j);if(j%4!=0)z+=4-j%4;Q=z+j}return Q};
dN.ati=function(x,Q,c){var $=w.q(x,Q);Q+=4;if($!=1)alert("Unknown version of pattern");var z=w.q(x,Q);
Q+=4;if(z!=1&&z!=2&&z!=3)console.log("Unsupported mode of pattern: "+z);var j=w._C(x,Q);Q+=2;var U=w._C(x,Q);
Q+=2;var i=new gh(0,0,U,j);c.name=w.Ez(x,Q);Q+=4+2*c.name.length+2;var b=x[Q];Q++;c.id=w.mt(x,Q,b);Q+=c.id.length;
var e=-1;if(z==2){e=Q;Q+=3*256+4}var k=new d.PT(U*j);Q=dN.auC(x,Q,k);if(z==2){for(var F=0;F<k.Z.length;
F++){var K=3*k.Z[F];k.Z[F]=x[e+K+0];k.r[F]=x[e+K+1];k.J[F]=x[e+K+2]}}var g=d.R(i.P()*4);d.li(k,g);c.GD=[g,i];
return Q};dN.aDI=function(x,Q,c){var $=c.GD[0],z=c.GD[1];w.Rj(x,Q,1);Q+=4;w.Rj(x,Q,3);Q+=4;w.Lv(x,Q,z.e);
Q+=2;w.Lv(x,Q,z.m);Q+=2;w.KY(x,Q,c.name+"\0");Q+=4+2*c.name.length+2;w.Xx(x,Q,c.id.length);Q++;w.RP(x,Q,c.id);
Q+=c.id.length;var j=new d.PT(z.P());d.jy($,j);Q=dN.a6S(x,Q,j,z);return Q};dN.auC=function(x,Q,c){var $=Q,z={W4:null,O:[],aqQ:null,GN:null},j=w.q(x,Q);
Q+=4;var U=w.q(x,Q);Q+=4;z.W4=w.Ky(x,Q);Q+=16;var i=w.q(x,Q);Q+=4;for(var F=0;F<i+2;F++){var b=w.q(x,Q);
Q+=4;if(b==0)continue;var e=w.q(x,Q);Q+=4;if(e==0)continue;var k=w.q(x,Q);Q+=4;var K=w.Ky(x,Q);Q+=16;
var g=w._C(x,Q);Q+=2;var R=x[Q];Q++;var T=bo.$c(!1,k,x,K.m,K.e,Q,R);if(F<i)z.O.push(T);if(F==i)z.aqQ=T;
if(F==i+1)z.GN=T;Q+=e-23}if(!z.W4._6()){if(z.O[0])c.Z=z.O[0];if(z.O[1])c.r=z.O[1];else c.r=z.O[0].slice(0);
if(z.O[2])c.J=z.O[2];else c.J=z.O[0].slice(0);if(z.GN)c.V=z.GN;else c.V.fill(255)}return Q};dN.a6S=function(x,Q,c,$){var z=Q,j={W4:$,O:[c.Z,c.r,c.J],aqQ:null,GN:c.V};
w.Rj(x,Q,3);Q+=4;w.Rj(x,Q,0);Q+=4;w.xC(x,Q,$);Q+=16;w.Rj(x,Q,24);Q+=4;for(var F=0;F<24+2;F++){var U=Q,i=F<3||F==25?1:0;
w.Rj(x,Q,i);Q+=4;if(i==0)continue;w.Rj(x,Q,0);Q+=4;w.Rj(x,Q,8);Q+=4;w.xC(x,Q,$);Q+=16;w.Lv(x,Q,8);Q+=2;
w.Xx(x,Q,1,1);Q++;var b=F<3?j.O[F]:j.GN;x.qN(Q,$.P()+2);Q=bo.Iw(!1,b,x.data,$.m,$.e,Q,1);w.Rj(x,U+4,Q-U-8)}w.Rj(x,z+4,Q-z-8);
return Q};function ib(){}ib.s5=function(x,Q){var c=new Uint8Array(x),z=0;if(c[0]==71)return ib.a9R(c);
var $=Q.split("/").pop().split(".")[0],j=w.mt(c,z,4);z+=4;var U=w._C(c,z);z+=2;var i=[];if(U<=3){var b=w._C(c,z);
z+=2;for(var F=0;F<b;F++){var e=c[z++],k=w.mt(c,z,e);z+=e;var K=ib.adq(c,z,k),g=K[0];z=K[1];i.push(g)}}else{var K={},R=e0.$x(c,K,z+4),T=K.GrdL.v;
for(var F=0;F<T.length;F++)i[F]=T[F].v.Grad.v}for(var F=0;F<i.length;F++){var D=i[F].Nm.v.split("/").pop().split("=").pop();
i[F].Nm.v=$+"/"+D}return i};ib.ki=function(x,Q){x.Nm.v=Q};ib.gS=function(x){var Q=new ij,c=0;w.RP(Q,c,"8BGR");
c+=4;w.Lv(Q,c,5);c+=2;w.Rj(Q,c,16);c+=4;var $={classID:"null",GrdL:{t:"VlLs",v:[]}},z=$.GrdL.v;for(var F=0;
F<x.length;F++){var j=JSON.parse(JSON.stringify(x[F]));j.Nm.v=j.Nm.v.split("/").pop();z[F]={t:"Objc",v:{classID:"Grdn",__name:"Gradient ",Grad:{t:"Objc",v:j}}}}c+=e0.lD(Q,$,c);
return Q.data.slice(0,c).buffer};ib.adq=function(x,Q,c){var $={classID:"Grdn",Clrs:{t:"VlLs",v:[]},GrdF:{t:"enum",v:{GrdF:"CstS"}},Intr:{t:"doub",v:4096},Nm:{t:"TEXT",v:c},Trns:{t:"VlLs",v:[]}},z=w._C(x,Q);
Q+=2;if(z==0)throw"e";for(var F=0;F<z;F++){var j=w.q(x,Q),U=w.q(x,Q+4),i=gR.zH(x,Q+8),b={t:"Objc",v:{classID:"Clrt",Clr:{t:"Objc",v:{classID:"RGBC",Rd:{t:"doub",v:i.Z},Grn:{t:"doub",v:i.r},Bl:{t:"doub",v:i.J}}},Type:{t:"enum",v:{Clry:"UsrS"}},Lctn:{t:"long",v:j},Mdpn:{t:"long",v:U}}};
$.Clrs.v.push(b);Q+=20}var e=w._C(x,Q);Q+=2;for(var F=0;F<e;F++){var j=w.q(x,Q),U=w.q(x,Q+4),k=w._C(x,Q+8),b={t:"Objc",v:{classID:"TrnS",Opct:{t:"UntF",v:{type:"#Prc",val:Math.round(100*k/255)}},Lctn:{t:"long",v:j},Mdpn:{t:"long",v:U}}};
$.Trns.v.push(b);Q+=10}var K=w._C(x,Q);Q+=2;$.Intr.v=K==2?w._C(x,Q):4096;Q+=2;var g=w._C(x,Q);Q+=2;return[$,Q]};
ib.aiw=function(x,Q,c){var $=c.Clrs.v.length;w.Lv(x,Q,$);Q+=2;for(var F=0;F<$;F++){var z=c.Clrs.v[F];
w.Rj(x,Q,z.v.Lctn.v);w.Rj(x,Q+4,z.v.Mdpn.v);w.Lv(x,Q+8,0);var j=d.I.lV(d.I.Du(z.v.Clr.v)),U=[j.Rd.v,j.Grn.v,j.Bl.v,0];
for(var i=0;i<4;i++)w.Lv(x,Q+10+i*2,Math.round(65535*(U[i]/255)));Q+=20}var b=c.Trns.v.length;w.Lv(x,Q,b);
Q+=2;for(var F=0;F<b;F++){var z=c.Trns.v[F];w.Rj(x,Q,z.v.Lctn.v);w.Rj(x,Q+4,z.v.Mdpn.v);w.Lv(x,Q+8,Math.round(255*z.v.Opct.v.val/100));
Q+=10}w.Lv(x,Q,2);Q+=2;w.Lv(x,Q,c.Intr.v);Q+=2;w.Lv(x,Q,32);Q+=2;return Q};ib.a9R=function(x){var Q=w.IV(x,0,x.length).split("\n"),c=parseFloat(Q[2]),$=[],z=JSON.parse(aF.lF[aF.order.indexOf("GrFl")]).Grad.v;
z.Intr.v=0;z.Nm.v=Q[1];for(var F=0;F<c;F++){var j=Q[3+F].split(" ").map(parseFloat),U=j[11],i=j[12];
$.push([j[0],j.slice(3,6),j[6]]);if(i!=0){var b=d.a$(j[3],j[4],j[5]),e=d.a$(j[7],j[8],j[9]),k=b.R0,K=e.R0;
if(i==1&&k>K)K++;if(i==2&&k<K)k++;var g=Math.round(Math.abs(K-k)*7);if(g>1)for(var R=0;R<g;R++){var T=1-(R+1)/(g+1),D=1-T,a=d.Us(T*k+D*K,T*b.ks+D*e.ks,T*b._B+D*e._B);
$.push([T*j[0]+D*j[2],[a.Z,a.r,a.J],T*j[6]+D*j[10]])}}$.push([j[2],j.slice(7,10),j[10]])}$.sort(function(_,I){return _[0]-I[0]});
d.I.q1($,z);return[z]};function k6(){}k6.s5=function(x){var Q=new Uint8Array(x),c=[],$=[],z=[],j=[],U=[],i=0,b=w.mt(Q,i,4);
i+=4;var e=w.q(Q,i);i+=4;var k=w.q(Q,i);i+=4;while(i<Q.length){var K=w.mt(Q,i,4);i+=4;var g=w.mt(Q,i,4);
i+=4;var R=w.q(Q,i);i+=4;if(g=="tppa"){$=dN.dq(Q,i,R);i+=R}else if(g=="tpbd"){z=eW.abl(Q,i,R,1,1);i+=R}else if(g=="tptp"){var T=w.q(Q,i);
i+=4;for(var F=0;F<T;F++){var D=w.Ez(Q,i);i+=6+D.length*2;i+=4;var a={};i+=e0.$x(Q,a,i);c.push([D,a])}while((i&3)!=0)i++}else if(g=="tpsh"){var _=i,I=Q.slice(i,i+R);
while(i<_+R){var f=w.q(Q,i);i+=4;i=dJ.adw(Q,i,"Shape",j)}i=_+R}else if(g=="tpst"){var _=i;i+=4;while(i<_+R){var y=w.q(Q,i);
i+=4;var Z=i,v=w.q(Q,i);i+=4;var a={Uz:{},Ry:{}};U.push(a);i+=4;i+=e0.$x(Q,a.Uz,i);i+=4;i+=e0.$x(Q,a.Ry,i);
i=Z+y;var G=a.Ry.Lefx;if(G){if(G.v.masterFXSwitch==null)G.v.masterFXSwitch={t:"bool",v:!0};hz.wo(G.v)}}i=_+R}else{console.log(Q.slice(i-8,i+64));
console.log(w.mt(Q,i-8,64));throw g}}return{Dq:z,Rk:$,list:c,a8L:j,DL:U}};k6.ki=function(x,Q){x[0]=Q};
k6.gS=function(x){var Q=new ij,c=0;w.RP(Q,c,"8BTP");c+=4;w.Rj(Q,c,3);c+=4;w.Rj(Q,c,1);c+=4;var $=[x.Rk,x.Dq,x.list];
for(var F=0;F<3;F++){if($[F].length==0)continue;w.RP(Q,c,"8BIM");c+=4;var z=["tppa","tpbd","tptp"][F];
w.RP(Q,c,z);c+=4;var j=c;c+=4;if(z=="tppa"){c=dN.ZF(Q,c,x.Rk)}else if(z=="tpbd"){c=eW.aql(Q,c,x.Dq)}else if(z=="tptp"){w.Rj(Q,c,x.list.length);
c+=4;for(var U=0;U<x.list.length;U++){var i=x.list[U];w.KY(Q,c,i[0]+"\0");c+=6+i[0].length*2;w.Rj(Q,c,16);
c+=4;c+=e0.lD(Q,i[1],c)}}w.Rj(Q,j,c-j-4);while((c&3)!=0)c++;Q.qN(c,0)}return Q.data.slice(0,c).buffer};
function hm(){}hm.s5=function(x,Q){var c=new Uint8Array(x),$;if(w.q(c,0)==c.length)$="icc";else if(c[0]=="<".charCodeAt(0))$="look";
else if(w.iK(c,"LUT_3D_SIZE")!=-1)$="cube";else $="3DL";if($!="icc"){var z=hm.aAh(c,$),j=hm.asC(z[0],z[1]);
c=j}var U=[];for(var F=0;F<c.length;F++)U.push(c[F]);return[{classID:"null",Dthr:{t:"bool",v:!0},Nm:{t:"TEXT",v:Q?Q:"file.icc"},lookupType:{t:"enum",v:{colorLookupType:"abstractProfile"}},profile:{t:"tdta",v:U}}]};
hm.gS=function(x){var Q=x[0],c=new Uint8Array(Q.profile.v);return c.buffer};hm.ki=function(x,Q){x.Nm.v=Q};
hm.asC=function(x,Q){var c=new ij,$=128;c.qN(0,128);var z=[0,0,14,204,65,68,66,69,4,0,0,0,108,105,110,107,82,71,66,32,82,71,66,32,7,227,0,7,0,27,0,8,0,6,0,49,97,99,115,112,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,246,214,0,1,0,0,0,0,211,45,65,68,66,69,219,126,245,21,206,223,186,23,165,212,201,219,250,10,33,62];
for(var F=0;F<z.length;F++)c.data[F]=z[F];var j=["desc","A2B0"],U=j.length,i=128+4+U*12;w.Rj(c,$,U);
$+=4;for(var b=0;b<U;b++){var e=j[b];w.RP(c,$,e);$+=4;w.Rj(c,$,i);$+=4;var k=i;if(e=="desc"){w.RP(c,k,"mluc");
k+=4;k+=4;w.Rj(c,k,1);k+=4;w.Rj(c,k,12);k+=4;w.RP(c,k,"enUS");k+=4;var K="ICC by Photopea\0",g=K.length*2+2;
w.Rj(c,k,g);k+=4;w.Rj(c,k,28);k+=4;c.qN(k,g);for(var F=0;F<K.length;F++)c.data[k+F*2+1]=K.charCodeAt(F);
k+=g}if(e=="A2B0"){w.RP(c,k,"mAB ");k+=4;k+=4;c.qN(k,4);c.data[k]=3;c.data[k+1]=3;k+=4;c.qN(k,4*5);k+=4*3;
w.Rj(c,k,k+8-i);k+=4;k+=4;c.qN(k,20);c.data[k]=x;c.data[k+1]=x;c.data[k+2]=x;k+=16;c.data[k]=2;k+=4;
var R=x*x*x*3;c.qN(k,R*2);for(var F=0;F<R;F++)w.Dr(c.data,k+F*2,Math.max(0,Math.min(65535,Math.round(Q[F]*65535))));
k+=R*2}var T=k-i;while((T&3)!=0)T++;w.Rj(c,$,T);$+=4;i+=T}w.Rj(c,0,i);return c.data.slice(0,i)};hm.aAh=function(x,Q){Q="LUTFormat"+Q.toUpperCase();
var c=[],$=0,z=w.IV(x,0,x.length),j="";for(var F=0;F<x.length&&j=="";F++){if(x[F]==10)j="\n";else if(x[F]==13){j="\r";
if(x[F+1]==10)j+="\n"}}if(Q=="LUTFormatCUBE"){var U=z.split(j);for(var F=0;F<U.length;F++){if(U[F]==""||U[F][0]=="#")continue;
var i=U[F].split(" "),b=i[0];if(b=="LUT_3D_SIZE"){$=parseInt(i[1]);continue}if(["TITLE","DOMAIN_MIN","DOMAIN_MAX"].indexOf(b)!=-1)continue;
c.push(parseFloat(i[0]),parseFloat(i[1]),parseFloat(i[2]))}c=hm.aqY($,c)}else if(Q=="LUTFormat3DL"){var U=z.split(j),e=1/4095;
for(var F=0;F<U.length;F++){var k=U[F];if(k==""||k=="3DMESH"||k.startsWith("Mesh")||k[0]=="#")continue;
var i=k.split(" "),b=i[0];if($==0){$=i.length;continue}c.push(parseFloat(i[0])*e,parseFloat(i[1])*e,parseFloat(i[2])*e)}}else if(Q=="LUTFormatLOOK"){var K=new DOMParser,g=K.parseFromString(z,"text/xml"),R=g.getElementsByTagName("LUT")[0],T=R.children[0].textContent;
$=parseInt(JSON.parse(T));var D=R.children[1].textContent;D=D.replace(/"/g,"").replace(/\s/g,"");var a=3*$*$*$,_=a*4,I=new Uint8Array(_);for(var F=0;F<_;F++){var f=D.charCodeAt(F*2),y=D.charCodeAt(F*2+1),Z=f<58?f-48:f-55,v=y<58?y-48:y-55;I[F]=(Z<<4)+v}for(var F=0;F<a;F++)c.push(w.Q0(I,F<<2));c=hm.aqY($,c)}else throw Q;return[$,c]};hm.akE=function(x,Q,c){var $=["#Created by www.Photopea.com","TITLE \""+c+"\"","","#LUT size","LUT_3D_SIZE "+Q,"","#data domain","DOMAIN_MIN 0.0 0.0 0.0","DOMAIN_MAX 1.0 1.0 1.0","","#LUT data points"],z=6;
for(var F=0;F<x.length;F+=3){$.push(x[F].toFixed(z)+" "+x[F+1].toFixed(z)+" "+x[F+2].toFixed(z))}$.push("");
return w.nT($.join("\n")).buffer};hm.aqY=function(x,Q){var c=[],$=x*x*x;for(var F=0;F<$;F++)c.push(0,0,0);
for(var z=0;z<x;z++)for(var j=0;j<x;j++)for(var U=0;U<x;U++){var F=3*(U+j*x+z*x*x),i=3*(z+j*x+U*x*x);
c[i]=Q[F];c[i+1]=Q[F+1];c[i+2]=Q[F+2]}return c};function e0(){}e0.$x=function(x,Q,c,$,z){var j=c,U;if(z==null)z=0;
var i=w.q(x,c);if(i==0){U="";c+=4}else{U=w.Ez(x,c);c+=4+2*U.length+2}if(U!="")Q.__name=U;Q.classID=e0.Fu(x,c);
if($)console.log("\t".repeat(z),"- reading descriptor",Q.classID,c);c+=e0.KI(x,c);var b=w.c4(x,c);c+=4;
for(var F=0;F<b;F++){var e=e0.Fu(x,c);c+=e0.KI(x,c);var k=e0.aiL(x,c,$,z);Q[e]=k;c+=k.size;delete k.size}return c-j};
e0.lD=function(x,Q,c,$){var z=c,j=Q.__name;if(j==null)j="";j+="\0";w.KY(x,c,j);c+=4+2*j.length;e0.T4(x,c,Q.classID);
c+=e0.KI(x.data,c);w.gv(x,c,Object.keys(Q).length-1-(Q.__name==null?0:1));c+=4;for(var U in Q){if(U=="classID")continue;
if(U=="__name")continue;e0.T4(x,c,U);c+=e0.KI(x.data,c);c+=e0.ayo(x,c,Q[U])}return c-z};e0.aiL=function(x,Q,c,$){var z=Q,j=w.mt(x,Q,4);
Q+=4;var U={size:0,t:j,v:null};if(c)console.log("\t".repeat($),"reading key",j,z);switch(j){case"obj ":case"VlLs":U.v=[];
var i=w.q(x,Q);Q+=4;for(var F=0;F<i;F++){var b=e0.aiL(x,Q,c,$+1);Q+=b.size;delete b.size;U.v.push(b)}break;
case"UntF":U.v={type:w.mt(x,Q,4),val:w.rY(x,Q+4)};Q+=12;break;case"doub":U.v=w.rY(x,Q);Q+=8;break;case"bool":U.v=x[Q]==1;
Q+=1;break;case"long":U.v=w.c4(x,Q);Q+=4;break;case"comp":U.v=w.c4(x,Q+4);Q+=8;break;case"Objc":U.v={};
var e=e0.$x(x,U.v,Q,c,$+1);Q+=e;break;case"TEXT":var k=w.q(x,Q);if(k==0){U.v="";Q+=4}else{U.v=w.Ez(x,Q);
Q+=4+U.v.length*2+2}break;case"enum":var K=e0.Fu(x,Q);Q+=e0.KI(x,Q);var g=e0.Fu(x,Q);Q+=e0.KI(x,Q);U.v={};
U.v[K]=g;break;case"tdta":var R=w.c4(x,Q);Q+=4;U.v=[];for(var F=0;F<R;F++)U.v.push(x[Q+F]);Q+=R;break;
case"ObAr":var T=w.q(x,Q);Q+=4;var D=w.Ez(x,Q);Q+=4+2*D.length+2;if(D!="")throw D;var a=e0.Fu(x,Q);Q+=4+Math.max(4,a.length);
U.v={classID:a,arr:[]};var _=w.q(x,Q);Q+=4;for(var F=0;F<_;F++){var a=e0.Fu(x,Q);Q+=4+Math.max(4,a.length);
var K=w.mt(x,Q,4);Q+=4;var I=w.mt(x,Q,4);Q+=4;var f={id:a,type:K,uID:I,arr:[]};U.v.arr.push(f);var y=w.q(x,Q,4);
Q+=4;for(var Z=0;Z<y;Z++){var v=w.rY(x,Q);Q+=8;f.arr.push(v)}}break;case"Pth ":var G=Q,R=w.q(x,Q);Q+=4;
var q=w.mt(x,Q,4);Q+=4;var h=w.K3(x,Q);Q+=4;var r=w.atA(x,Q);Q+=4+r.length*2;U.v={sig:q,pth:r};break;
case"Clss":case"type":case"rele":var r=w.Ez(x,Q);Q+=4+r.length*2+2;var H=e0.Fu(x,Q);Q+=4+Math.max(4,H.length);
U.v={classID:H};if(r!="")U.v.__name=r;if(j=="rele"){U.v.val=w.c4(x,Q);Q+=4}break;case"prop":case"Enmr":case"indx":case"name":case"Idnt":var o=e0.zz[j],r=w.Ez(x,Q);
Q+=4+r.length*2+2;if(r.length!=0){console.log(j,r);throw"e"}U.v={};for(var F=0;F<o.length;F++){var H=e0.Fu(x,Q);
Q+=4+Math.max(4,H.length);U.v[o[F]]=H}if(j=="name"){var r=w.Ez(x,Q);Q+=4+r.length*2+2;U.v.val=r}if(j=="indx"||j=="Idnt"){U.v.val=w.q(x,Q);
Q+=4}break;case"alis":var R=w.q(x,Q);Q+=4;U.v=w.mt(x,Q,R);Q+=R;break;default:{console.log("unknown oskey: "+j+", "+z);
throw"e";return U}}if(c){console.log("\t".repeat($),U.v);console.log("\t".repeat($),"======",Q)}U.size=Q-z;
return U};e0.zz={name:["classID"],prop:["classID","keyID"],Enmr:["classID","typeID","enum"],indx:["classID"],Idnt:["classID"]};
e0.ayo=function(x,Q,c){var $=Q,z=c.t;c=c.v;w.RP(x,Q,z);Q+=4;switch(z){case"obj ":case"VlLs":w.gv(x,Q,c.length);
Q+=4;for(var j=0;j<c.length;j++){var U=e0.ayo(x,Q,c[j]);Q+=U}break;case"UntF":w.RP(x,Q,c.type);w.K1(x,Q+4,c.val);
Q+=12;break;case"doub":w.K1(x,Q,c);Q+=8;break;case"bool":w.Xx(x,Q,c?1:0,1);Q+=1;break;case"long":w.gv(x,Q,c);
Q+=4;break;case"comp":w.gv(x,Q+4,c);Q+=8;break;case"Objc":var U=e0.lD(x,c,Q);Q+=U;break;case"TEXT":w.KY(x,Q,c+"\0");
Q+=4+c.length*2+2;break;case"enum":var i=Object.keys(c)[0],b=c[i];e0.T4(x,Q,i);Q+=e0.KI(x.data,Q);e0.T4(x,Q,b);
Q+=e0.KI(x.data,Q);break;case"tdta":w.Rj(x,Q,c.length);Q+=4;w.dK(x,Q,c);Q+=c.length;break;case"ObAr":w.Rj(x,Q,c.arr[0].arr.length);
Q+=4;w.KY(x,Q,"\0");Q+=6;e0.T4(x,Q,c.classID);Q+=4+Math.max(4,c.classID.length);w.Rj(x,Q,c.arr.length);
Q+=4;for(var F=0;F<c.arr.length;F++){var e=c.arr[F];e0.T4(x,Q,e.id);Q+=4+Math.max(4,e.id.length);w.RP(x,Q,e.type);
Q+=4;w.RP(x,Q,e.uID);Q+=4;w.Rj(x,Q,e.arr.length);Q+=4;for(var j=0;j<e.arr.length;j++){w.K1(x,Q,e.arr[j]);
Q+=8}}break;case"Pth ":var k=c.pth.length*2+4+8;w.Rj(x,Q,k);Q+=4;w.RP(x,Q,c.sig);Q+=4;w.jO(x,Q,k);Q+=4;
w.a1M(x,Q,c.pth);Q+=c.pth.length*2+4;break;case"Clss":case"type":case"rele":var K=c.__name;if(K==null)K="";
w.KY(x,Q,K+"\0");Q+=4+K.length*2+2;var g=c.classID;e0.T4(x,Q,g);Q+=4+Math.max(4,g.length);if(z=="rele"){w.gv(x,Q,c.val);
Q+=4}break;case"prop":case"Enmr":case"indx":case"name":case"Idnt":var R=e0.zz[z];w.Rj(x,Q,1);Q+=6;for(var F=0;
F<R.length;F++){var g=c[R[F]];e0.T4(x,Q,g);Q+=4+Math.max(4,g.length)}if(z=="name"){w.KY(x,Q,c.val+"\0");
Q+=4+c.val.length*2+2}if(z=="indx"||z=="Idnt"){w.Rj(x,Q,c.val);Q+=4}break;case"alis":var k=c.length;
w.Rj(x,Q,k);Q+=4;w.RP(x,Q,c);Q+=k;break;default:console.log("unknown oskey: "+z);Q=$;break}return Q-$};
e0.Fu=function(x,Q){var c=w.c4(x,Q);if(c>1e3)throw"e";if(c==0)c=4;return w.mt(x,Q+4,c).trim()};e0.KI=function(x,Q){var c=w.c4(x,Q);
return c==0?8:4+c};e0.T4=function(x,Q,c){var $="warp list Comp None xx xy yx yy tx ty PinP PnRt PnOv PnDp xor PuX0 PuX1 PuX2 PuX3 PuY0 PuY1 PuY2 PuY3 base kana ruby box flow time hold trim then else".split(" "),z=4<c.length||$.indexOf(c)!=-1;
w.gv(x,Q,z?c.length:0);w.RP(x,Q+4,c);if(c.length<4&&!z){var j="";for(var F=c.length;F<4;F++)j+=" ";w.RP(x,Q+4+c.length,j)}};
e0.ag2=function(x){var Q={};for(var c in x){if(c=="classID")Q[c]=x[c];else if(c=="__name")Q[c]=x[c];
else Q[c]=e0.ai2(x[c])}return Q};e0.ai2=function(x){if(x.z_=="Objc")return e0.ag2(x.v);else if(x.z_=="VlLs"){var Q=[];
for(var F=0;F<x.v.length;F++)Q.push(e0.ai2(x.v[F]));return Q}else if(x.z_=="UntF")return x.v.val;else return x.v};
function hz(){}hz.asT=function(x,Q,c,$,z,j){while(Q<c){var U=w.mt(x,Q,4);Q+=4;if(U!="8BIM"&&U!="8B64"){console.log("layer information signature error! "+U,"PSB = "+z);
alert("Error in PSD file: wrong signature.");return c}var i=w.mt(x,Q,4);Q+=4;var b=w.q(x,Q);Q+=4;var e=z&&"LMsk Lr16 Lr32 Layr Mt16 Mt32 Mtrn Alph FMsk lnk2 lnkE FEid FXid PxSD extn cinf artd pths".split(" ").indexOf(i)!=-1;
if(e){b=b<<32|w.c4(x,Q);Q+=4}var k=["lrFX","PlLd"];if(k.indexOf(i)!=-1){if(b%4!=0)b+=4-b%4;Q+=b;continue}switch(i){case"iOpa":$[i]=x[Q];
break;case"brst":$[i]=[1,1,1];for(var F=0;F<b;F+=4)$[i][w.q(x,Q+F)]=0;break;case"knko":$[i]=x[Q];break;
case"infx":$[i]=x[Q];break;case"clbl":$[i]=x[Q];break;case"lmgm":$[i]=x[Q];break;case"vmgm":$[i]=x[Q];
break;case"fcmy":$[i]=x[Q];break;case"lyid":$[i]=w.q(x,Q);break;case"lsct":$[i]={type:w.q(x,Q)};if(b>=12)$[i].s3=w.mt(x,Q+8,4);
break;case"lsdk":$.lsct={type:w.q(x,Q)};break;case"lyvr":$[i]=w.q(x,Q);break;case"lnsr":var K={artb:1,bgnd:1,cont:1,layr:1,lset:1,rend:1,shap:1,user:1,____:null};
$[i]=w.mt(x,Q,4);break;case"lspf":$[i]=w.q(x,Q);break;case"lclr":$[i]=w._C(x,Q);break;case"luni":$[i]=w.Q7(x,Q);
break;case"fxrp":$[i]=new bC(w.rY(x,Q),w.rY(x,Q+8));break;case"artb":case"artd":$[i]={};e0.$x(x,$[i],Q+4);
break;case"SoCo":$[i]={};e0.$x(x,$[i],Q+4);break;case"GdFl":$[i]={};e0.$x(x,$[i],Q+4);hz.rn($[i],i);
break;case"PtFl":$[i]={};e0.$x(x,$[i],Q+4);hz.rn($[i],i);break;case"CgEd":$[i]={};e0.$x(x,$[i],Q+4);
break;case"brit":var g=$.brit=fK.$H("brit"),R={};g.Brgh.v=w.u7(x,Q);g.Cntr.v=w.u7(x,Q+2);g.useLegacy.v=!0;
break;case"levl":var T=x.buffer.slice(Q,Q+b);$[i]=bV.s5(T);break;case"curv":$[i]=jq.a1(x,Q,b);break;
case"expA":var D=w._C(x,Q),a=$[i]=fK.$H("expA");a.Exps.v=w.lw(x,Q+2);a.Ofst.v=w.lw(x,Q+6);a.gammaCorrection.v=w.lw(x,Q+10);
break;case"vibA":$[i]={};e0.$x(x,$[i],Q+4);break;case"hue2":$[i]=hu.a1(x,Q,b);break;case"blnc":var a=$[i]=fK.$H(i);
a.PrsL.v=x[Q+18]==1;var _=["ShdL","MdtL","HghL"];for(var F=0;F<3;F++)for(var I=0;I<3;I++)a[_[F]].v[I].v=w.u7(x,Q+F*6+I*2);
break;case"blwh":var f={};e0.$x(x,f,Q+4);var a=fK.$H(i),y="Bl Cyn Grn Mgnt Rd Yllw tintColor useTint".split(" ");
for(var F=0;F<y.length;F++){a[y[F]]=f[y[F]];delete f[y[F]]}$[i]=a;break;case"phfl":var a=$[i]=fK.$H(i),Z=a.Clr.v,D=w._C(x,Q);
if(D==3){var v=[w.q(x,Q+2),w.q(x,Q+6),w.q(x,Q+10)],G=32768,q=d.a0k(v[0]/G,v[1]/G,v[2]/G);Z.Lmnc.v=q.xv;
Z.A.v=q.V;Z.B.v=q.J}if(D==2){var h=w._C(x,Q+2);if(h!=7)throw"e";Z.Lmnc.v=w.u7(x,Q+4)/100;Z.A.v=w.u7(x,Q+6)/100;
Z.B.v=w.u7(x,Q+8)/100}var r=Q+2+(D==3?12:10);a.Dnst.v=w.q(x,r);r+=4;a.PrsL.v=x[r]==1;break;case"mixr":var H={Xw:w._C(x,Q+2)==1,b:[]};
for(var F=0;F<20;F++)H.b.push(w.u7(x,Q+4+F*2));$[i]=k5.aBw(H);break;case"clrL":case"rplc":$[i]={};e0.$x(x,$[i],Q+6);
break;case"nvrt":$[i]={};break;case"post":$[i]=fK.$H("post");$[i].Lvls.v=w._C(x,Q);break;case"thrs":$[i]=fK.$H("thrs");
$[i].Lvl.v=w._C(x,Q);break;case"grdm":var o=Q,P=w._C(x,o);o+=2;var O=x[o]==1,p=x[o+1]==1;o+=2;var C=w.mt(x,o,4);
if(C=="Perc"||C=="Gcls"||C=="Lnr "||C=="\0\0\x0B\x1D")o+=4;var W=w.Q7(x,o);o+=4+W.length*2;var J=ib.adq(x,o,W),t=J[0];
o=J[1];var Y=w._C(x,o);o+=2;var l=w.q(x,o);o+=4;var m=w._C(x,o)==1;o+=2;var B=w._C(x,o)==1;o+=2;var L=w.q(x,o);
o+=4;var A=w._C(x,o);o+=2;var S=[],M=[];for(var F=0;F<4;F++){S.push({t:"long",v:~~(w._C(x,o+F*2)*100/32768)});
M.push({t:"long",v:~~(w._C(x,o+F*2+8)*100/32768)})}o+=16;var N=w._C(x,o);o+=2;if(Y==1)t={classID:"Grdn",Nm:{t:"TEXT",v:W},GrdF:{t:"enum",v:{GrdF:"ClNs"}},ShTr:{t:"bool",v:m},VctC:{t:"bool",v:B},ClrS:{t:"enum",v:{ClrS:"RGBC"}},RndS:{t:"long",v:l},Smth:{t:"long",v:L},Mnm:{t:"VlLs",v:S},Mxm:{t:"VlLs",v:M}};
var s=fK.$H("grdm");s.Rvrs.v=O;s.Grad.v=t;$[i]=s;break;case"selc":$[i]=cP.a1(x,Q,b);break;case"vmsk":case"vsms":var V=$.vmsk=new eM.hn,g8=w.c4(x,Q+4),n=(g8>>0&1)==1;
V.uz=(g8>>1&1)==0;V.isEnabled=(g8>>2&1)==0;V.$=dJ.ur(x,Q+8,b-8,j.m,j.e);break;case"shmd":$[i]={};var cQ=w.q(x,Q),r=Q+4;
for(var F=0;F<cQ;F++){var U=w.mt(x,r,4);r+=4;var hk=w.mt(x,r,4);r+=4;var eG=x[r];r++;if(Math.max(x[r],x[r+1])!=0)throw"e";
r+=3;var ie=w.q(x,r);r+=4;if(hk=="cust"||hk=="cmls"||hk=="extn"||hk=="mlst"){var eN=w.q(x,r);if(eN!=16)r+=4;
if(w.q(x,r)==16){var f={};e0.$x(x,f,r+4,!1);$[i][hk]=f;if(hk=="cmls")X.T8.a0H($[i][hk])}}else{console.log("unknown shmd key: "+hk+", size: "+ie)}r+=ie}break;
case"shpa":var D=w.q(x,Q),gr=w.q(x,Q+4);if(gr!=0)console.log("some patterns present!");break;case"TySh":var ek=$[i]={},D=w._C(x,Q);
ek.i=w._z(x,Q+2);var jK=w._C(x,Q+2+48);ek.Gb={};try{var iE=e0.$x(x,ek.Gb,Q+56)}catch(dQ){$[i]=null;break}var e9=dU.avh();
for(var dm in e9)if(ek.Gb[dm]==null)ek.Gb[dm]=e9[dm];ek.f2={};var kD=e0.$x(x,ek.f2,Q+56+iE+6);ek.Iv=w.a1b(x,Q+56+iE+6+kD);
ek.HW=cf.s5(ek.Gb.EngineData.v);dU.axw(ek.HW.EngineDict.StyleRun.RunArray);if(ek.HW.ResourceDict==null)ek.HW.ResourceDict=JSON.parse(JSON.stringify(ek.HW.DocumentResources));
delete ek.Gb.EngineData;break;case"lfx2":case"lmfx":case"lfxs":var gJ=w.q(x,Q),dR=w.q(x,Q+4);$.lmfx={};
var iE=e0.$x(x,$.lmfx,Q+8);hz.wo($.lmfx);break;case"FMsk":$[i]=w.Y5(x,Q,b);break;case"Txt2":$[i]={};
$[i].raw=w.Y5(x,Q,b);$[i].Yl=es.s5($[i].raw);break;case"Patt":$[i]=dN.dq(x,Q,b);break;case"SoLd":var fO=w.mt(x,Q,4),ko=w.q(x,Q+4),d8=w.q(x,Q+8),fj=$[i]={},ja=e0.$x(x,fj,Q+12),eD=fj.warp,d3=fj.quiltWarp;
if(d3==null)d3=fj.quiltWarp=d.fr.anR(eD);delete fj.warp;var fP=d3.v.warpStyle.v.warpStyle,jE=d3.v.warpValues;
if(fP!="warpCylinder"&&jE){d3.v.warpValue={t:"doub",v:jE.v[0].v};delete d3.v.warpValues}if(fj.nonAffineTransform==null)fj.nonAffineTransform=JSON.parse(JSON.stringify(fj.Trnf));
if(fj.Impr==null)fj.Impr={t:"Objc",v:{__name:"None",classID:"none"}};break;case"vstk":case"pths":var ko=w.q(x,Q);
$[i]={};var ja=e0.$x(x,$[i],Q+4);break;case"vscg":var hk=w.mt(x,Q,4),ko=w.q(x,Q+4);$[hk]={};var ja=e0.$x(x,$[hk],Q+8);
hz.rn($[hk],hk);break;case"vogk":var cR=w.q(x,Q),ko=w.q(x,Q+4);$[i]={};var ja=e0.$x(x,$[i],Q+8);$[i]=$[i].keyDescriptorList.v;
for(var F=0;F<$[i].length;F++){var ex=$[i][F].v;if(!d.eV.Sc(ex))continue;if(ex.keyOriginBoxCorners==null){var er=d.eV._A(ex);
ex.keyOriginBoxCorners={t:"Objc",v:{classID:"null"}};var cE=[er[0],er[1],er[2],er[1],er[2],er[3],er[0],er[3]];
if(ex.keyOriginType.v==4)cE=d.eV.au1(d.eV.wB(ex),ex.keyOriginLineWeight.v);d.eV.QS(ex,"keyOriginBoxCorners",cE)}}break;
case"lnk2":case"lnkD__":case"lnk3__":$[i]=[];var o=Q;while(o<Q+b){var a7=new eM.kY;$[i].push(a7);var dl=w.ee(x,o);
o+=8;var hl=o;a7.type=w.mt(x,o,4);o+=4;if(a7.type!="liFD"){alert("Unknown Linked Layer type: "+a7.type);
break;throw a7.type}a7.WJ=w.q(x,o);o+=4;var f4=w.D4(x,o);o+=1+f4.fY.length;a7.P6=f4.fY;a7.uo=w.Ez(x,o);
o+=4+a7.uo.length*2+2;a7.bf=w.mt(x,o,4);o+=4;a7.eD=w.mt(x,o,4);o+=4;var em=w.ee(x,o);o+=8;a7.open=x[o];
o+=1;if(a7.open!=0){var e$={},iE=e0.$x(x,e$,o+4);if(iE%4!=0)iE+=4-iE%4;console.log(e$);o+=iE+4}a7.open=0;
a7.raw=w.Y5(x,o,em);o=hl+dl;if(dl%4!=0)o+=4-dl%4}break;case"FEid":var o=Q;$[i]=[];var iP=o+b,D=w.q(x,o);
o+=4;while(o<iP){o+=4;var dl=w.q(x,o);o+=4;var J={};$[i].push(J);J.id=w.D4(x,o).fY;o+=J.id.length+1;
var D=w.q(x,o);o+=4;o+=4;var b2=w.q(x,o);o+=4;J.rect=w.Ky(x,o);o+=16;var k7=w.q(x,o);o+=4;var at=w.q(x,o);
o+=4;var ju=new d.PT(0);for(var F=0;F<at+2;F++){var jL=w.q(x,o);o+=4;if(jL!=0){o+=4;var fJ=w.q(x,o),h6=null;
o+=4;if(F<3||F==25)h6=bo.G0(!0,k7,x,J.rect.m,J.rect.e,o,fJ);if(F==0)ju.Z=h6;if(F==1)ju.r=h6;if(F==2)ju.J=h6;
if(F==25)ju.V=h6;o+=fJ}}J.buffer=d.R(J.rect.P()*4);d.li(ju,J.buffer);var iq=x[o];o++;if(iq!=0){J.F=new eM.zM;
J.F.rect=w.Ky(x,o);o+=16;o+=4;var iI=w.q(x,o);o+=4;J.F.channel=bo.G0(!0,k7,x,J.F.rect.m,J.F.rect.e,o,iI);
J.F.color=255;J.F.NK();o+=iI}if(dl%4!=0)o+=4-dl%4}break;case"Lr16":cz.a4D(j,x,Q);break;case"Anno":$[i]=[];
var dM=Q,ik=Q+4,gr=w.q(x,ik);ik+=4;for(var F=0;F<gr;F++){var dl=w.q(x,ik);ik+=4;var jp=w.mt(x,ik,4);
ik+=4;if(jp!="txtA")throw jp;var eA=x[ik++],k8=x[ik++],ay=w._C(x,ik);ik+=2;var bK=w.Ky(x,ik);ik+=16;
var a4=w.Ky(x,ik);ik+=16;var Z=gR.zH(x,ik);ik+=10;var h_=w.D4(x,ik);ik+=h_.length;var bj=w.D4(x,ik);
ik+=bj.length;var gs=w.D4(x,ik);ik+=gs.length;var bs=w.q(x,ik);ik+=4;var e3=w.mt(x,ik,4);ik+=4;var jA=w.q(x,ik);
ik+=4;var kn=w.fy(x,ik+2,jA-2>>1);ik+=jA;$[i].push([bK.x,bK.y,Z,h_.fY,kn])}break;default:break}var j6="Lr16 LMsk Txt2 artd extd luni pths extn tySh lfx2 cinf Anno".split(" ");
if(j6.indexOf(i)==-1)if(b%4!=0)console.log("size not multiple of 4!!!",i);if(i!="luni"&&i!="TySh"&&i!="tySh"&&i!="lfx2"&&i!="iOpa")if(b%4!=0)b+=4-b%4;
Q+=b}var R=$.CgEd;if(R){var g=$.brit;if(g){g.Brgh.v=R.Brgh?R.Brgh.v:0;g.Cntr.v=R.Cntr?R.Cntr.v:0;g.useLegacy.v=R.useLegacy?R.useLegacy.v:0}delete $.CgEd}var cL=[];
for(var F=0;F<cL.length;F++)delete $[cL[F]];return Q};hz.adW=function(x,Q,c,$,z){if(c.SoLd){var j={};
for(var U in c){if(U=="SoLd")j.PlLd={};j[U]=c[U]}c=j}for(var i in c)if(c[i]==null){alert("A bug occured (see console).");
console.log("Please, report a bug, that \""+i+"\" tag was present with a null value.");delete c[i]}for(var i in c){var b=$&&"LMsk Lr16 Lr32 Layr Mt16 Mt32 Mtrn Alph FMsk lnk2 lnkE FEid FXid PxSD extn cinf artd pths".split(" ").indexOf(i)!=-1,k=0;
w.RP(x,Q,b?"8B64":"8BIM");Q+=4;var e=Q;w.RP(x,Q,i);Q+=4;w.gv(x,Q,0);Q+=b?8:4;switch(i){case"iOpa":w.Xx(x,Q,c[i],1);
k=4;break;case"brst":k=0;for(var F=0;F<3;F++)if(c[i][F]==0){w.Rj(x,Q+k,F);k+=4}break;case"knko":w.Xx(x,Q,c[i],1);
k=4;break;case"infx":w.Xx(x,Q,c[i],1);k=4;break;case"clbl":w.Xx(x,Q,c[i],1);k=4;break;case"lmgm":w.Xx(x,Q,c[i],1);
k=4;break;case"vmgm":w.Xx(x,Q,c[i],1);k=4;break;case"fcmy":w.Xx(x,Q,c[i],1);k=4;break;case"lyid":w.Rj(x,Q,c[i]);
k=4;break;case"lsct":w.Rj(x,Q,c[i].type);k=4;if(c[i].s3){w.RP(x,Q+4,"8BIM");w.RP(x,Q+8,c[i].s3);k=12}break;
case"lyvr":w.Rj(x,Q,c[i]);k=4;break;case"lnsr":w.RP(x,Q,c[i]);k=4;break;case"lspf":w.Rj(x,Q,c[i]);k=4;
break;case"lclr":w.Lv(x,Q,c[i]);k=8;break;case"luni":w.KY(x,Q,c[i]);k=4+2*c[i].length;break;case"fxrp":w.K1(x,Q,c[i].x);
w.K1(x,Q+8,c[i].y);k=16;break;case"artb":case"artd":w.Rj(x,Q,16);k=e0.lD(x,c[i],Q+4)+4;break;case"SoCo":w.Rj(x,Q,16);
k=e0.lD(x,c[i],Q+4)+4;break;case"GdFl":w.Rj(x,Q,16);k=e0.lD(x,c[i],Q+4)+4;break;case"PtFl":w.Rj(x,Q,16);
k=e0.lD(x,c[i],Q+4)+4;break;case"CgEd":var K={classID:"null",Vrsn:{t:"long",v:1},Brgh:{t:"long",v:24},Cntr:{t:"long",v:54},means:{t:"long",v:127},Lab:{t:"bool",v:!1},useLegacy:{t:"bool",v:!1},Auto:{t:"bool",v:!0}},g=K,R=c[i];
g.Brgh.v=R.Brgh.v;g.Cntr.v=R.Cntr.v;g.useLegacy.v=R.useLegacy.v;w.Rj(x,Q,16);k=e0.lD(x,K,Q+4)+4;break;
case"brit":x.qN(Q,8);k=8;break;case"levl":var T=new ij;k=bV.gS(T,c[i]);w.dK(x,Q,T.data);break;case"curv":k=jq.PF(x,Q,c[i]);
break;case"expA":k=14;x.qN(Q,14);w.Dr(x.data,Q,1);w.VV(x.data,Q+2,c[i].Exps?c[i].Exps.v:0);w.VV(x.data,Q+6,c[i].Ofst?c[i].Ofst.v:0);
w.VV(x.data,Q+10,c[i].gammaCorrection?c[i].gammaCorrection.v:1);break;case"vibA":w.Rj(x,Q,16);k=e0.lD(x,c[i],Q+4)+4;
break;case"hue2":k=hu.PF(x,Q,c[i]);break;case"blnc":k=19;x.qN(Q,k);var D=["ShdL","MdtL","HghL"];for(var F=0;
F<3;F++){var a=c[i][D[F]].v;for(var _=0;_<3;_++)a.push(w.$m(x.data,Q+F*6+_*2,a[_].v))}x.data[Q+18]=c[i].PrsL.v?1:0;
break;case"blwh":var K={classID:"null",bwPresetKind:{t:"long",v:1},blackAndWhitePresetFileName:{t:"TEXT",v:""}},I="Bl Cyn Grn Mgnt Rd Yllw tintColor useTint".split(" ");
for(var F=0;F<I.length;F++){K[I[F]]=c[i][I[F]]}w.Rj(x,Q,16);k=e0.lD(x,K,Q+4)+4;break;case"phfl":w.Lv(x,Q,2);
var f=c[i].Clr.v;w.Lv(x,Q+2,7);w.Lv(x,Q+4,Math.round(f.Lmnc.v*100));w.Lv(x,Q+6,Math.round(f.A.v*100));
w.Lv(x,Q+8,Math.round(f.B.v*100));w.Lv(x,Q+10,0);var y=Q+2+10;x.qN(y,5);w.EO(x.data,y,c[i].Dnst.v);y+=4;
x.data[y]=c[i].PrsL.v?1:0;y++;k=y-Q;break;case"mixr":k=44;x.qN(Q,k);var Z=k5.Le(c[i]);w.Dr(x.data,Q,1);
w.Dr(x.data,Q+2,Z.Xw?1:0);for(var F=0;F<20;F++)w.$m(x.data,Q+4+F*2,Z.b[F]);break;case"clrL":case"rplc":w.Lv(x,Q,1);
w.Rj(x,Q+2,16);k=e0.lD(x,c[i],Q+6)+6;break;case"nvrt":k=0;break;case"post":w.Lv(x,Q,c[i].Lvls.v);k=2;
break;case"thrs":w.Lv(x,Q,c[i].Lvl.v);k=2;break;case"grdm":var v=c[i].Rvrs?c[i].Rvrs.v:!1,G=!1,q=867527939,h=!1,r=!1,H=2048,o=[0,0,0,0],P=[32768,32768,32768,32768],O=c[i].Grad.v,p,C,W=O.Clrs==null?1:0;
if(W==0){p=O;C=JSON.parse(aF.Q5.aCQ).v}else{p=fK.$H("grdm").Grad.v;C=O}x.qN(Q,4);w.Dr(x.data,Q,1);x.data[Q+2]=v?1:0;
x.data[Q+3]=G?1:0;var J=Q+4;w.KY(x,J,O.Nm.v);J+=4+O.Nm.v.length*2;J=ib.aiw(x,J,p);w.Lv(x,J,W);J+=2;w.Rj(x,J,C.RndS.v);
J+=4;w.Lv(x,J,C.ShTr.v?1:0);J+=2;w.Lv(x,J,C.VctC.v?1:0);J+=2;w.Rj(x,J,C.Smth.v);J+=4;w.Lv(x,J,3);J+=2;
for(var F=0;F<4;F++)w.Lv(x,J+F*2,o[F]);J+=8;for(var F=0;F<4;F++)w.Lv(x,J+F*2,P[F]);J+=8;J+=2;k=J-Q;break;
case"selc":k=cP.PF(x,Q,c[i]);break;case"FMsk":w.dK(x,Q,c[i]);k=c[i].length;break;case"Txt2":var t=new ij,Y=es.o5(c[i].Yl,t),l=d.R(Y,!0);
for(var F=0;F<Y;F++)l[F]=t.data[F];w.dK(x,Q,l);k=l.length;break;case"vmsk":var m=c[i],B=0;w.Rj(x,Q,3);
if(!m.uz)B+=1<<1;if(!m.isEnabled)B+=1<<2;w.Rj(x,Q+4,B);k=8;var L=m.$.length;x.qN(Q+8,L*26);dJ.Wg(x.data,Q+8,m.$,z.m,z.e);
k+=L*26;break;case"shmd":w.Rj(x,Q,Object.keys(c[i]).length);var y=Q+4;for(var A in c[i]){w.RP(x,y,"8BIM");
y+=4;w.RP(x,y,A);y+=4;w.Rj(x,y,0);y+=4;w.Rj(x,y,0);y+=4;w.Rj(x,y,16);y+=4;var S=e0.lD(x,c[i][A],y);if(S%4!=0)S+=4-S%4;
w.Rj(x,y-8,S+4);y+=S}k=y-Q;break;case"TySh":var y=Q;w.e8(x,y,1);y+=2;var M=c[i],t=new ij;M.HW.DocumentResources=JSON.parse(JSON.stringify(M.HW.ResourceDict));
var Y=cf.o5(M.HW,t),l=d.R(Y,!0);for(var F=0;F<Y;F++)l[F]=t.data[F];M.Gb.EngineData={t:"tdta",v:l};var N=M.HW.EngineDict.Editor.Text;
M.Gb.Txt.v=N.substring(0,N.length-1);w.aij(x,y,M.i);y+=48;w.e8(x,y,50);y+=2;w.Rj(x,y,16);y+=4;y+=e0.lD(x,M.Gb,y);
w.e8(x,y,1);y+=2;w.Rj(x,y,16);y+=4;y+=e0.lD(x,M.f2,y);w.asd(x,y,M.Iv);y+=16;k=y-Q;break;case"lmfx":w.Rj(x,Q,0);
w.Rj(x,Q+4,16);var K=JSON.parse(JSON.stringify(c[i])),s=!1;hz.p6(K);for(var F=0;F<aF.mh.length;F++)if(K[aF.mh[F]]!=null)s=!0;
w.RP(x,e,s?"lmfx":"lfx2");k=e0.lD(x,K,Q+8)+8;break;case"Patt":var y=dN.ZF(x,Q,c[i]);k=y-Q;break;case"PlLd":var V=Q;
x.qN(Q,60);var a=c.SoLd;w.RP(x,Q,"plcL");w.Rj(x,Q+4,3);var g8=x.data[Q+8]=a.Idnt.v.length;w.RP(x,Q+9,a.Idnt.v);
var y=Q+9+g8,n=[1,1,16,2];for(var F=0;F<4;F++)w.Rj(x,y+F*4,n[F]);y+=16;n=X.Y.e3(a.nonAffineTransform);
for(var F=0;F<8;F++)w.K1(x,y+F*8,n[F]);y+=64;w.Rj(x,y,0);w.Rj(x,y+4,16);var cQ=d.fr.afj(a.quiltWarp).v;
y+=8+e0.lD(x,cQ,y+8);k=y-Q;break;case"SoLd":var a=c[i],hk=a.quiltWarp;a.warp=d.fr.afj(hk);if(d.fr.ZD(hk.v)==16)delete a.quiltWarp;
w.RP(x,Q,"soLD");w.Rj(x,Q+4,4);w.Rj(x,Q+8,16);k=e0.lD(x,a,Q+12)+12;a.quiltWarp=hk;delete a.warp;break;
case"vstk":case"pths":w.Rj(x,Q,16);k=e0.lD(x,c[i],Q+4)+4;break;case"vscg__":w.RP(x,Q,c[i].key);w.Rj(x,Q+4,16);
k=e0.lD(x,c[i].b,Q+8)+8;break;case"vogk":w.Rj(x,Q,1);w.Rj(x,Q+4,16);d.eV.alR(c[i]);for(var F=0;F<c[i].length;
F++){var eG=c[i][F].v.keyOriginResolution;if(eG)eG.v=z.cQ}var ie={classID:"null",keyDescriptorList:{t:"VlLs",v:c[i]}};
k=e0.lD(x,ie,Q+8)+8;break;case"lnkD":case"lnk2":case"lnk3":var J=Q;for(var F=0;F<c[i].length;F++){var eN=c[i][F],gr=J;
w.bi(x,J,0);J+=8;w.RP(x,J,eN.type);J+=4;w.Rj(x,J,eN.WJ);J+=4;x.qN(J,1);x.data[J]=eN.P6.length;J++;w.RP(x,J,eN.P6);
J+=eN.P6.length;w.KY(x,J,eN.uo+"\0");J+=4+eN.uo.length*2+2;w.RP(x,J,eN.bf);J+=4;w.RP(x,J,eN.eD);J+=4;
w.bi(x,J,eN.raw.length);J+=8;x.qN(J,1);x.data[J]=eN.open;J++;w.dK(x,J,eN.raw);J+=eN.raw.length;w.Rj(x,J,1);
J+=4;J+=11;var ek=J-gr-8;w.bi(x,gr,ek);if(ek%4!=0){x.qN(J,4-ek%4);J+=4-ek%4}}k=J-Q;break;case"FEid":var J=Q;
w.Rj(x,J,3);J+=4;for(var jK=0;jK<c[i].length;jK++){var iE=c[i][jK];J+=4;var e9=J;J+=4;w.$v(x,J,iE.id);
J+=iE.id.length+1;w.Rj(x,J,1);J+=4;var dm=d.R(iE.rect.P()),kD=iE.rect,gJ=d.R(kD.P());J+=4;var dR=J;J+=4;
w.xC(x,J,kD);J+=16;w.Rj(x,J,8);J+=4;w.Rj(x,J,24);J+=4;for(var F=0;F<24+2;F++){var fO=-1;if(F==0)fO=0;
if(F==1)fO=1;if(F==2)fO=2;if(F==25)fO=3;w.Rj(x,J,fO!=-1?1:0);J+=4;if(fO!=-1){d.GS(iE.buffer,dm,fO);d.L2(dm,iE.rect,gJ,kD);
J+=4;var ko=J;J+=4;x.qN(J,kD.P()+2);J=bo.Gx(!0,gJ,x.data,kD.m,kD.e,J,3);w.Rj(x,ko,J-(ko+4))}}w.Rj(x,dR,J-(dR+4));
x.qN(J,1);x.data[J]=iE.F?1:0;J++;if(iE.F!=null){var d8=kD,fj=d.R(d8.P());fj.fill(iE.F.color);d.L2(iE.F.channel,iE.F.rect,fj,d8);
w.xC(x,J,d8);J+=16;J+=4;var ja=J;J+=4;x.qN(J,d8.P()+2);J=bo.Gx(!0,fj,x.data,d8.m,d8.e,J,3);w.Rj(x,ja,J-(ja+4))}var ek=J-(e9+4);
w.Rj(x,e9,ek);if(ek%4!=0)J+=4-ek%4}k=J-Q;break;case"Anno":var eD=Q,d3=c[i].length;w.Lv(x,eD,2);w.Lv(x,eD+2,1);
eD+=4;w.Rj(x,eD,d3);eD+=4;for(var F=0;F<d3;F++){var fP=c[i][F],jE=fP[0],cR=fP[1],ex=eD;eD+=4;w.RP(x,eD,"txtA");
eD+=4;x.qN(eD,2);x.data[eD]=1;x.data[eD+1]=28;eD+=2;w.Lv(x,eD,1);eD+=2;w.xC(x,eD,new gh(jE,cR,17,21));
eD+=16;w.xC(x,eD,new gh(jE+8,cR+10,241,141));eD+=16;x.qN(eD,10);gR.Au(x.data,eD,fP[2]);eD+=10;eD+=w.$v(x,eD,fP[3]);
eD+=w.$v(x,eD,"");eD+=w.$v(x,eD,"D:20211012120233+01'00'");var er=fP[4].length*2;w.Rj(x,eD,12+2+er);
eD+=4;w.RP(x,eD,"txtC");eD+=4;w.Rj(x,eD,2+er);eD+=4;x.qN(eD,2);x.data[eD]=254;x.data[eD+1]=255;eD+=2;
w.aBc(x,eD,fP[4]);eD+=er;w.Rj(x,ex,eD-ex)}k=eD-Q;break;default:console.log("unknown layer tag: "+i+", size: "+k);
Q-=12;continue}var cE=["Txt2","artd","extd","pths"];if(cE.indexOf(i)==-1)if(k%4!=0)k+=4-k%4;if(b)w.bi(x,Q-8,k);
else w.Rj(x,Q-4,k);if(i!="luni"&&i!="TySh")if(k%4!=0)k+=4-k%4;Q+=k}return Q};hz.wo=function(x){for(var F=0;
F<aF.order.length;F++){var Q=aF.order[F],c=aF.mh[F];if(x[c]==null)x[c]={t:"VlLs",v:[]};if(x[Q]!=null){x[c].v.push(x[Q]);
delete x[Q]}var $=[];for(var z=0;z<x[c].v.length;z++){var j=x[c].v[z];if(j.v.present==null||j.v.present.v==!0)$.push(j)}x[c].v=$}};
hz.p6=function(x){for(var F=0;F<aF.order.length;F++){var Q=aF.order[F],c=aF.mh[F],$=x[c].v.length;if($==0){delete x[c];
continue}if($==1){x[Q]=x[c].v[0];delete x[c];continue}}};hz.rn=function(x,Q){if(Q=="GdFl"){if(x.Angl==null)x.Angl={v:{type:"#Ang",val:0},t:"UntF"};
if(x.Algn==null)x.Algn={v:!0,t:"bool"};if(x.Scl==null)x.Scl={v:{type:"#Prc",val:100},t:"UntF"};if(x.Ofst==null)x.Ofst={v:{classID:"Pnt",Hrzn:{v:{type:"#Prc",val:0},t:"UntF"},Vrtc:{v:{type:"#Prc",val:0},t:"UntF"}},t:"Objc"};
if(x.Rvrs==null)x.Rvrs={v:!1,t:"bool"};if(x.Dthr==null)x.Dthr={v:!1,t:"bool"}}if(Q=="PtFl"){if(x.Algn==null)x.Algn={v:!0,t:"bool"};
if(x.Angl==null)x.Angl={v:{type:"#Ang",val:0},t:"UntF"};if(x.Scl==null)x.Scl={v:{type:"#Prc",val:100},t:"UntF"};
if(x.phase==null)x.phase={v:{classID:"Pnt",Hrzn:{v:0,t:"doub"},Vrtc:{v:0,t:"doub"}},t:"Objc"}}};hz.clone=function(x,Q){var c={};
if(x=="TySh"){c.i=Q.i.clone();c.Gb=JSON.parse(JSON.stringify(Q.Gb));c.f2=JSON.parse(JSON.stringify(Q.f2));
c.Iv=Q.Iv.clone();c.HW=JSON.parse(JSON.stringify(Q.HW));if(Q.add)c.add={vmsk:Q.add.vmsk.clone(),vogk:JSON.parse(JSON.stringify(Q.add.vogk))};
return c}else if(x=="fxrp")return Q.clone();else if(x=="vmsk")return Q.clone();else return JSON.parse(JSON.stringify(Q))};
function g9(x,Q){}g9.s5=function(x,Q,c,$){$=g9.ag9(x,Q,c,$);return $};g9.o5=function(x,Q,c,$,z){$=g9.ana(x,Q,c,$,z);
return $};g9.ag9=function(x,Q,c,$){var z=$;x.rect=w.Ky(c,$);$+=16;var j=w._C(c,$);$+=2;x.Qf=[];var U=Q.pu;
for(var F=0;F<j;F++){x.Qf[F]={id:w.u7(c,$),length:(U?w.ee:w.q)(c,$+2)};$+=U?10:6}var i=w.mt(c,$,4);$+=4;
if(i!="8BIM"){console.log("Invalid Blend mode signature: "+JSON.stringify(i));alert("Error in Photoshop file: wrong signature.");
throw"e"}x.s3=w.mt(c,$,4);$+=4;x.opacity=c[$];$+=1;x.cG=c[$]==1;$+=1;x.H2=c[$];$+=1;if(c[$]!=0)console.log("error in filler!");
$+=1;var b=w.q(c,$);$+=4;var e=$;$=g9.a3l(x,c,$);$=g9.av7(x,c,$);var k=w.D4(c,$);x.name=k.fY;$+=k.length;
if(k.length%4!=0)$+=4-k.length%4;$=hz.asT(c,$,e+b,x.add,U,Q);if(x.add.lsct){if(x.add.lsct.s3)x.s3=x.add.lsct.s3;
x.add.lsct=x.add.lsct.type}return $};g9.ana=function(x,Q,c,$,z){var j=$;w.xC(c,$,x.rect);$+=16;var U=Q.add.fcmy==1,i=x.a3b(U);
w.Lv(c,$,i.length);$+=2;var b=Q.pu;z.push($);for(var F=0;F<i.length;F++){w.e8(c,$,i[F]);if(b)w.bi(c,$+2,0);
else w.Rj(c,$+2,0);$+=b?10:6}w.RP(c,$,"8BIM");$+=4;w.RP(c,$,x.s3);$+=4;w.Xx(c,$,x.opacity,1);$+=1;w.Xx(c,$,x.cG?1:0,1);
$+=1;w.Xx(c,$,x.H2,1);$+=1;w.Xx(c,$,0,1);$+=1;var e=$;w.Rj(c,$,0);$+=4;var k=$;$=g9.aim(x,c,$);$=g9.afu(x,c,$);
var K=w.$v(c,$,x.name.slice(0,255));$+=K;if(K%4!=0)$+=4-K%4;if(x.add.lsct){x.add.lsct={type:x.add.lsct};
if(x.s3=="pass"){x.add.lsct.s3="pass";x.s3="norm"}}if(x.s3=="pass")x.add.lsct={type:x.add.lsct,s3:"pass"};
if(x.add.brit)x.add.CgEd=x.add.brit;$=hz.adW(c,$,x.add,b,Q);delete x.add.CgEd;if(x.add.lsct){if(x.add.lsct.s3)x.s3=x.add.lsct.s3;
x.add.lsct=x.add.lsct.type}var g=$-k;w.Rj(c,e,g);return $};g9.a3l=function(x,Q,c){var $=w.q(Q,c);c+=4;
if($==0)return c;var z=c;x.F=new eM.zM;x.F.rect=w.Ky(Q,c);c+=16;x.F.color=Q[c];c+=1;var j=g9.a2f(x.F,Q,c);
c+=1;if(j){var U=!1,i=255,b=0,e=255,k=0;for(var F=0;F<x.Qf.length;F++)if(x.Qf[F].id==-3)U=!0;if(U){x.OE=g9.amJ(Q,c);
c+=18}var K=c,g=Q[c];c++;if(g>>0&1){i=Q[c];c++}if(g>>1&1){b=w.rY(Q,c);c+=8}if(g>>2&1){e=Q[c];c++}if(g>>3&1){k=w.rY(Q,c);
c+=8}if((c-K&1)==1)c++;x.EW=[i,b,e,k]}else{if($==20)c+=2;else{x.OE=g9.amJ(Q,c);c+=18}}return z+$};g9.aim=function(x,Q,c){w.Rj(Q,c,0);
c+=4;if(x.F==null)return c;var $=x.Rz(),z=x.add.vmsk,j=c,U=!0;w.Rj(Q,c,0);w.xC(Q,c,x.F.rect);c+=16;w.Xx(Q,c,x.F.color);
c+=1;g9.a3V(x.F,Q,c,U);c+=1;if(U){if(x.OE){g9.abK(Q,c,x.OE);c+=18}var i=c;w.Xx(Q,c,z?15:3);c+=1;w.Xx(Q,c,$?$.f4:255);
c+=1;w.K1(Q,c,$?$.bS:0);c+=8;if(z){w.Xx(Q,c,z?z.f4:255);c+=1;w.K1(Q,c,z?z.bS:0);c+=8}if((c-i&1)==1)c++}w.Rj(Q,j-4,c-j);
return c};g9.amJ=function(x,Q){var c=new eM.zM;g9.a2f(c,x,Q);Q+=1;c.color=x[Q];Q+=1;c.rect=w.Ky(x,Q);
Q+=16;return c};g9.abK=function(x,Q,c){g9.a3V(c,x,Q,!1);Q+=1;w.Xx(x,Q,c.color);Q+=1;w.xC(x,Q,c.rect);
Q+=16};g9.a2f=function(x,Q,c){var $=Q[c];x.uz=($>>0&1)==0;x.isEnabled=($>>1&1)==0;x.aV=($>>3&1)==1;return $>>4&1};
g9.a3V=function(x,Q,c,$){var z=0;if(!x.uz)z+=1<<0;if(!x.isEnabled)z+=1<<1;if(x.aV)z+=1<<3;if($)z+=1<<4;
w.Xx(Q,c,z)};g9.av7=function(x,Q,c){var $=w.q(Q,c);c+=4;for(var F=0;F<$;F++)x.uJ[F]=Q[c+F];return c+$};
g9.afu=function(x,Q,c){w.Rj(Q,c,x.uJ.length);c+=4;Q.qN(c,40);for(var F=0;F<40;F++){Q.data[c+F]=x.uJ[F]}return c+40};
function bo(){}bo.s5=function(x,Q,c,$){$=bo.a4x(Q,Q.pu,Q.kW,Q.ud,x,c,$);return $};bo.gS=function(x,Q,c,$,z,j,U){$=bo.afc(x,Q,c,$,z,j,U);
return $};bo.a4x=function(x,Q,c,$,z,j,U){var i=z.Qf,b={},e=U;for(var F=0;F<i.length;F++){var k=i[F],K=k.id,g=k.length,R;
if(K==-2&&z.F==null)K=-1;if(K==-3)R=z.OE.rect;else if(K==-2)R=z.F.rect;else R=z.rect;var T=bo.G0(Q,c,j,R.m,R.e,U,g);
U+=g;if(K==-3)z.OE.channel=T;else if(K==-2)z.F.channel=T;else b["c"+K]=T}var D=new d.PT(0);D.V=null;
if($==3){D.Z=b.c0;D.r=b.c1;D.J=b.c2;D.V=b["c-1"]}else if($==1){D.Z=b.c0;D.r=b.c0;D.J=b.c0;D.V=b["c-1"]}else if($==4){var a=x.Q_.r1039,_=null,I=b.c0,f=b.c1,y=b.c2,Z=b.c3;
if(a){var _=a.axi,v=17;if(_==null){var G=ICC.R(a.buffer);if(G.header.spaceIn=="RGB "){}else _=a.axi=ICC.U.sampleLUT(G,v)}}if(_){var q={Z:I,r:f,J:y,V:Z},h=d.R(I.length*4);
d.li(q,h);d.HQ(h);ICC.U.applyLUT4(_,v,h,h);d.jy(h,q)}else{for(var F=0;F<I.length;F++){var r=1-I[F]*(1/255),H=1-f[F]*(1/255),o=1-y[F]*(1/255),P=1-Z[F]*(1/255),O=d.i2([r,H,o,P]);
I[F]=Math.floor(.5+O[0]*255);f[F]=Math.floor(.5+O[1]*255);y[F]=Math.floor(.5+O[2]*255)}}D.Z=I;D.r=f;
D.J=y;D.V=b["c-1"]}if(D.Z==null)D.Z=d.R(0);if(D.V==null&&D.Z!=null){D.V=D.Z.slice(0);D.V.fill(255)}if(D.r==null)D.r=D.Z.slice(0);
if(D.J==null)D.J=D.Z.slice(0);z.buffer=d.R(Math.max(0,z.rect.P()*4));d.li(D,z.buffer);return U};bo.afc=function(x,Q,c,$,z,j,U){var i=Q.a3b(U),b=Q.buffer,e=new d.PT(Q.rect.P());
if(U){var k=e.V.slice(0);d.GS(b,k,3);b=b.slice(0);d.auQ(b);d.jy(b,e);e.acC=e.V;e.V=k}else d.jy(b,e);
for(var F=0;F<i.length;F++){var K=i[F],g,R;if(K==-3)g=Q.OE.rect;else if(K==-2)g=Q.F.rect;else g=Q.rect;
if(K==-3)R=Q.OE.channel;if(K==-2)R=Q.F.channel;if(K==-1)R=e.V;if(K==0)R=e.Z;if(K==1)R=e.r;if(K==2)R=e.J;
if(K==3)R=e.acC;c.qN($,g.P()*3+4);var T=$;$=bo.Gx(x,R,c.data,g.m,g.e,$,j[1]?3:1);var D=$-T;if(x)w.at2(c.data,z+F*10+2,D);
else w.EO(c.data,z+F*6+2,D)}return $};bo.G0=function(x,Q,c,$,z,j,U){var i=w._C(c,j);j+=2;return bo.$c(x,Q,c,$,z,j,i,U-2)};
bo.Gx=function(x,Q,c,$,z,j,U){w.$m(c,j,U);j+=2;j=bo.Iw(x,Q,c,$,z,j,U);return j};bo.$c=function(x,Q,c,$,z,j,U,i){var b,e=$*z*(Q>>>3),k=e&3,g=e+(k==0?0:4-k);
if(i<=0){return d.R(g)}if(U>3){console.log("unknown compression: "+U,$,z,$*z,i);U=0}if(U==0){if(j+g<=c.length)b=c.slice(j,j+g);
else{b=d.R(e);for(var F=0;F<e;F++)b[F]=c[j+F]}j+=e}else if(U==1){b=d.R(e);var R=x?4:2,T=bo.arz(c,b,$,z,j,j+R*z,R);
j+=R*z+T}else if(U==2||U==3){var D=new Uint8Array(c.buffer,j+2,i-6),a=d.R(g);UZIP.inflateRaw(D,a);if(U==3){if(Q==8)for(var _=0;
_<z;_++){var I=_*$+1,f=I+$-1,y=a[I-1];for(var Z=I;Z<f;Z++){y+=a[Z];a[Z]=y&255}}else for(var _=0;_<z;
_++){var I=_*$+1,f=I+$-1,y=a[2*I-2]<<8|a[2*I-1];for(var Z=I;Z<f;Z++){var v=Z<<1;y+=a[v]<<8|a[v+1];a[v]=y>>>8;
a[v+1]=y&255}}}if(a.length==g)b=a;else{b=d.R(g);for(var F=0;F<a.length;F++)b[F]=a[F]}}if(Q==16){var G=d.R($*z);
for(var F=0;F<e;F+=2)G[F>>>1]=b[F];b=G}return b};bo.Iw=function(x,Q,c,$,z,j,U){var i=$*z;if(U==0)for(var F=0;
F<i;F++)c[j++]=Q[F];else if(U==1){var b=x?4:2,e=bo.a8C(Q,c,$,z,j,j+b*z,b);j+=b*z+e}else if(U==2||U==3){if(U==3){var k=new Uint8Array(Q.length);
for(var K=0;K<z;K++){var g=K*$+1,R=g+$-1,T=Q[g-1];k[g-1]=T;for(var D=g;D<R;D++){k[D]=Q[D]+(256-T)&255;
T=Q[D]}}Q=k}c[j]=120;c[j+1]=156;j+=2;var a=pako.deflateRaw(Q,{a3t:4});w.ah$(c,j,a);j+=a.length+4}else console.log("Unknown compression: "+U);
return j};bo.arz=function(x,Q,c,$,z,j,U){if(!(x instanceof Uint8Array)||!(Q instanceof Uint8Array))throw"e";
var i=j,b=$|0;if(U==2)for(var F=0;F<b;F++){var e=w._C(x,z+(F<<1));bo.az(x,j,e,Q,F*c,c);j+=e}else for(var F=0;
F<b;F++){var e=w.q(x,z+(F<<2));bo.az(x,j,e,Q,F*c,c);j+=e}return j-i};bo.a8C=function(x,Q,c,$,z,j,U){var i=j;
if(U==2)for(var F=0;F<$;F++){var b=bo.amO(x,F*c,c,Q,j);w.Dr(Q,z+F*2,b);j+=b}else for(var F=0;F<$;F++){var b=bo.amO(x,F*c,c,Q,j);
w.EO(Q,z+F*4,b);j+=b}return j-i};bo.amO=function(x,Q,jF,c,$){var z,j,U,i,b,fu,e;i=Q+jF;for(U=Q,j=$;jF>0;
U=z,jF-=fu){e=jF<128?jF:128;if(U<=i-3&&x[U+1]==x[U+0]&&x[U+2]==x[U+0]){for(z=U+3;z<U+e&&x[z]==x[U+0];
)++z;fu=z-U;c[j++]=1+256-fu;c[j++]=x[U+0]}else{for(z=U;z<U+e;)if(z<=i-3&&x[z+1]==x[z+0]&&x[z+2]==x[z+0])break;
else++z;fu=z-U;c[j++]=fu-1;for(var F=0;F<fu;F++)c[j+F]=x[U+F];j+=fu}}return j-$};bo.az=function(x,Q,c,$,z,j){for(var U=0;
U<c;){var jF=x[Q++];if(jF>=128){var i=x[Q++],b=z+(257-jF);$.fill(i,z,b);z=b;U+=2}else{for(var F=0;F<=jF;
F++)$[z+F]=x[Q+F];Q+=jF+1;z+=jF+1;U+=1+1+jF}}};function cz(){}cz.Mu=function(x,Q,c){return;var $="",z=Q;
while(z!=0){var j=z%1e3+"";while(j.length<3)j="0"+j;$=($==""?j:j+" ")+$;z=Math.floor(z/1e3)}while($.startsWith("0")&&$!="0")$=$.slice(1);
while($.length<11)$=" "+$;console.log("===",$,"\t".repeat(x),": "+c)};cz.am3=function(x){var Q={Q_:{}},$=0,z=0,i;
Q.pu=!1;Q.kW=8;var c=new Uint8Array(x);z=cz.Dx(Q,c,$);$=z;z=cz.a8J(Q,c,$);$=z;var j=w.q(c,$);$+=4+j;
var U=Q.pu?8:4;if(Q.pu)i=w.ee(c,$);else i=w.q(c,$);$+=U+i;z=cz.a44(Q,c,$);return[{K$:new gh(0,0,Q.m,Q.e),data:Q.buffer.buffer}]};
cz.s5=function(x,Q){Q.pu=!1;Q.kW=8;var c=new Uint8Array(x),$=0,z=0,U=0,A,jK=!1,iE=!0,e9=!1,dm=0,j6=0;
z=cz.Dx(Q,c,$);cz.Mu(0,z-$,"PSD Header");$=z;z=cz.a8J(Q,c,$);cz.Mu(0,z-$,"Color Mode Data");$=z;z=cz.adH(Q,c,$);
cz.Mu(0,z-$,"Image Resources");$=z;z=cz.am_(Q,c,$);cz.Mu(0,z-$,"Layer And Mask Info");$=z;z=cz.a44(Q,c,$);
cz.Mu(0,z-$,"Merged Image");$=z;if(Q.B.length==0){var j=Q.Xh();j.gF("Background");Q.B.push(j);j.buffer=Q.buffer.slice(0);
j.rect=new gh(0,0,Q.m,Q.e)}for(var F=0;F<Q.B.length;F++){var z=Q.B[F],i=z.add.lsct;if(i==hA.oA)U++;else if(i==hA.DJ||i==hA.H3)U--}while(U<0){Q.B.unshift(Q.x6());
U++}if(Q.Q_.r1005){Q.cQ=w.QC(Q.Q_.r1005,0)}if(Q.Q_.r1026){var c=Q.Q_.r1026;for(var F=0;F<c.length;F+=2){var z=Q.B[F>>>1];
if(z)z.to=w._C(c,F)}}if(Q.Q_.r1072){var c=Q.Q_.r1072;for(var F=0;F<c.length;F++){var z=Q.B[F];if(z)z.Rm=c[F]==1}}if(Q.Q_.r1032){Q.Bo=cz.azp(Q.Q_.r1032,0)}delete Q.Q_.r1036;
Q.sv(Q.Q_.r1039);if(Q.Q_.r1050){var b=w.q,e=Q.Q_.r1050,k=w.q(e,0);if(k==6){var K=4,g=w.Ky(e,K);K+=16;
var R=w.Q7(e,K);K+=4+R.length*2;var T=b(e,K);K+=4;var D=Q.p9;for(var F=0;F<T;F++){var a=X.x5._0(),I;
D.push(a);a=a.v;a.sliceID.v=b(e,K);K+=4;a.groupID.v=b(e,K);K+=4;var _=b(e,K);K+=4;if(_==1){I=b(e,K);
K+=4}var R=w.Q7(e,K);K+=4+R.length*2;var f=b(e,K);K+=4;var y=[b(e,K),b(e,K+4),b(e,K+8),b(e,K+12)];K+=16;
X.x5.YV(D,D.length-1,y);var Z=a.url.v=w.Q7(e,K);K+=4+Z.length*2;var v=a.null.v=w.Q7(e,K);K+=4+v.length*2;
var G=a.Msge.v=w.Q7(e,K);K+=4+G.length*2;var q=a.altTag.v=w.Q7(e,K);K+=4+q.length*2;a.cellTextIsHTML.v=e[K]==1;
K++;var h=a.cellText.v=w.Q7(e,K);K+=4+h.length*2;var r=b(e,K);K+=4;var H=b(e,K);K+=4;var o=e.slice(K,K+4);
K+=4;if(_!=2)D.pop()}}else if(k==8){var P={};e0.$x(e,P,8,!1);var e=Q.p9=P.slices.v;for(var F=0;F<e.length;
F++){if(e[F].v.origin.v.ESliceOrigin!="userGenerated"){e.splice(F,1);F--}}}}if(Q.Q_.r1058){var O=Q.Q_.r1058,p=UTIF.decode(O.buffer,{parseMN:!1,debug:!1});
be.tC(p[0],Q.hD);delete Q.Q_.r1058}if(Q.Q_.r1060){var C=w.IV(Q.Q_.r1060);be.I9(C,Q.hD);delete Q.Q_.r1060}if(Q.Q_.r1065){var c=Q.Q_.r1065;
Q.A2={};e0.$x(c,Q.A2,4,!1)}if(Q.Q_.r1069){var c=Q.Q_.r1069,W=[];for(var F=2;F<c.length;F+=4){var I=w.q(c,F);
for(var J=0;J<Q.B.length;J++){var z=Q.B[J];if(z.add.lyid==I&&z.add.lsct!=3&&W.indexOf(J)==-1)W.push(J)}}Q.g=W}if(Q.Q_.r1073){var c=Q.Q_.r1073,K=0,t=w.c4(c,K);
K+=4;var Y=w.c4(c,K);K+=4;for(var F=0;F<Y;F++){Q.Vv.push({y:t>=2?w.lw(c,K+2):w.QC(c,K+2),x:t>=2?w.lw(c,K+6):w.QC(c,K+6)});
K+=14}delete Q.Q_.r1073}if(Q.Q_.r1025){var l=Q.Q_.r1025;delete Q.Q_.r1025;var m=dJ.ur(l,0,l.length,Q.m,Q.e),B=new eM.hn;
B.$=m;Q.iL[0]=hf._S("Working Path",{vmsk:B})}var L=Q.add.pths;delete Q.add.pths;var S=Q.Q_.r3000;if(S){A={};
e0.$x(S,A,4,!1);delete Q.Q_.r3000}if(L){var M=L.pathSymmetrySelectedPath;if(M){var N=L.pathList.v[M.v].v,s=N.pathUnicodeName.v;
Q.d6=s.startsWith("Tile Symmetry")}}for(var V=0;V<=997;V++){var g8="r"+(2e3+V),l=Q.Q_[g8];if(l==null)break;
var m=dJ.ur(l,0,l.length,Q.m,Q.e),s="Path "+V;if(L){var n=L.pathList.v[V].v;s=n.pathUnicodeName.v;if(s=="Tile Symmetry 1")continue}var cQ=A?A.keyRootDescriptorList.v[V].v.keyDescriptorList.v:eM.jz(m),B=new eM.hn;
B.$=m;Q.iL.push(hf._S(s,{vmsk:B,vogk:cQ}));delete Q.Q_[g8]}delete Q.pu;if(Q.Q_.r4000){Q.rs=d.rs.s5(Q.Q_.r4000)}var hk=Q.Q_.r7000,eG=Q.Q_.r7001;
if(hk){var ie=w.IV(hk);Q.vB=cz.aa9(ie)}if(eG){var ie=w.IV(eG);Q.x8=cz.an3(ie)}delete Q.Q_.r7000;delete Q.Q_.r7001;
var eN=new gh(0,0,Q.m,Q.e),gr=Q.add.Txt2,ek=gr;if(ek){ek=ek.Yl;if(ek._DocumentResources==null)ek=h1.ai3(ek)}var kD=-1;
for(var F=0;F<Q.B.length;F++){var z=Q.B[F],gJ=z.add.lsct,dR=z.add.vmsk,fO=z.Rz();if(gJ==hA.oA){dm++;
z.add.lspf=0}else if(gJ==hA.DJ||gJ==hA.H3)dm--;if(z.name==""){z.name="Layer "+(F+1);e9=!0}if(e9&&z.Uy()&&z.s3=="norm")z.s3="pass";
if(z.Oz()&&z.U5(Q)==null)delete z.add.SoLd;if(z.Oz()&&z.U5(Q).F){var ko=z.U5(Q);ko.F.isEnabled=z.add.SoLd.filterFX.v.filterMaskEnable.v}if(dR&&z.Z6()){var d8=aF.XM.$H(!0);
if(z.add.vstk==null)z.add.vstk=JSON.parse(JSON.stringify(d8));else{var fj="strokeStyleLineDashSet";if(z.add.vstk[fj]==null)z.add.vstk[fj]=JSON.parse(JSON.stringify(d8[fj]))}z.add.vstk.strokeStyleLineWidth.v.type="#Pxl";
z.add.vstk.strokeStyleResolution.v=Q.cQ}if(dR&&(z.add.vogk==null||d.o.WV(dR.$)!=z.add.vogk.length))z.jz();
if(!1){var ja=z.add.vogk,eD=!0;for(var d3=0;d3<ja.length;d3++){var fP=ja[d3].v.keyShapeInvalidated;if(fP==null||fP.v==!1)eD=!1}if(eD)z.jz()}if(z.add.SoLd&&z.rect._6()){console.log("redrawing smart instance");
z.bx(Q,null,null,!0)}if(fO==null&&z.F!=null){if(z.F.aV==!1){z.F.aV=!0;z.OE=z.F.clone()}}fO=z.Rz();if(z.EW){var d8=z.EW,B=dR;
if(fO){fO.f4=d8[0];fO.bS=d8[1]}if(B){B.f4=d8[2];B.bS=d8[3]}z.EW=null}if(fO!=null&&dR!=null&&(fO.bS+dR.bS!=0||fO.f4+dR.f4!=2*255))z.kT(Q);
else if(dR!=null&&!z.Z6())z.kT();else if(fO&&fO.f4!=255&&z.Z6())z.kT(Q);var jE=z.add.artb;if(jE&&jE.artboardBackgroundType==null)jE.artboardBackgroundType={t:"long",v:1};
if(jE&&dm!=0)delete z.add.artb;var cR=z.add.vstk;if(z.Z6()&&(z.rect._6()||dR&&dR.bS!=0||cR&&!cR.fillEnabled.v&&(!cR.strokeEnabled.v||cR.strokeStyleLineWidth.v.val==0)))z.om(Q);
if(z.add.TySh){jK=!0;if(!z.rect._6())iE=!1}if(z.add.TySh&&ek){kD++;var ex=z.add.TySh.HW,er=dU.Sx(ex),cE=ek._DocumentObjects._TextObjects;
if(cE.length<=kD){console.log("Txt2 incomplete");continue}var a7=cE[kD]._Model,dl=a7._StyleRun?a7._StyleRun._RunArray:[],hl=ex.EngineDict.StyleRun.RunArray;
for(var f4=0;f4<hl.length;f4++){var em=hl[f4].StyleSheet.StyleSheetData;if(dl[f4]==null)continue;var e$=dl[f4]._RunData._StyleSheet._Features;
if(e$&&e$._BaselineDirection)em.BaselineDirection=parseInt(e$._BaselineDirection.slice(1));if(e$&&e$._FillBackgroundFlag)em._FillBackgroundFlag=e$._FillBackgroundFlag;
if(e$&&e$._FillBackgroundColor){var iP=e$._FillBackgroundColor,b2=iP._Color._Values.slice(0);for(var J=0;
J<4;J++)b2[J]=parseFloat(b2[J].slice(1));em._FillBackgroundColor={Type:1,Values:b2}}if(e$&&e$._LineWidth)em._LineWidth=parseFloat(e$._LineWidth.slice(1))}var k7=ex.EngineDict.ParagraphRun.RunArray,at=a7._ParagraphRun._RunArray;
if(at==null)at=[];var ju=Math.min(at.length,k7.length);for(var J=0;J<ju;J++){var jL=k7[J].ParagraphSheet.Properties,fJ=ek._DocumentResources._ParagraphSheetSet._Resources,h6=at[J]._RunData._ParagraphSheet;
if(typeof h6=="string")h6=fJ[parseInt(h6.slice(1))]._Resource;var iq=h6._Parent==null?h6:fJ[parseInt(h6._Parent.slice(1))]._Resource;
h6=h6._Features;iq=iq._Features;var iI=h6._ParagraphDirection;if(iI==null)iI=iq._ParagraphDirection;
if(iI)jL._Direction=parseInt(iI.slice(1));if(h6._ComposerEngine)jL._ComposerEngine=parseInt(h6._ComposerEngine.slice(1))}if(a7._AlternateGlyphRun){var at=a7._AlternateGlyphRun._RunArray,ju=at.length,dM=ex.EngineDict.AlternateGlyphRun=dU.ao7();
for(var J=0;J<ju;J++){var h6=at[J],ik={},jp=h6._RunData._AlternateGlyphSheet;if(jp)ik.Glyph=parseInt(jp._Glyph.slice(1));
dM.RunArray.push(ik);dM.RunLengthArray.push(parseInt(h6._Length.slice(1)))}}var eA=ek._DocumentResources,k8=eA._TextFrameSet._Resources,ay=k8[kD]._Resource,bK=ay._Data,a4=new bI(1,0,0,1,0,0);
if(ay._0){var h_=parseFloat(ay._0[0].slice(1)),bj=parseFloat(ay._0[1].slice(1));a4.translate(h_,bj)}if(er){a4.translate(er[0],er[1]);
dU.ei(ex,[0,0,er[2]-er[0],er[3]-er[1]])}else{if(ay._Bezier&&ay._Bezier._Points){var m=ay._Bezier._Points,h_=parseFloat(m[0].slice(1)),bj=parseFloat(m[1].slice(1));
if(h_!=0||bj!=0){a4.translate(h_,bj)}}}if(ay._Data&&ay._Data._FrameMatrix){var gs=ay._Data._FrameMatrix;
gs=gs.map(function(dY){return parseFloat(dY.slice(1))});a4.concat(new bI(gs[0],gs[1],gs[2],gs[3],gs[4],gs[5]))}a4.concat(z.add.TySh.i);
z.add.TySh.i=a4;var f=bK._Type?parseInt(bK._Type.slice(1)):0;if(f==2||f==1&&bK._PathData&&bK._PathData._Spacing=="i-3")if(ay._Bezier){var bs=function(dY){return parseFloat(dY.slice(1))},m=ay._Bezier._Points.map(bs);
if(er)d.A.i(m,new bI(1,0,0,1,-er[0],-er[1]),m);var e3=bK._PathData?bK._PathData._Reversed:!1,jA=bK._TextOnPathTRange;
if(jA==null)jA=["f-3","f-3"];ex.Curve={Points:m,TextOnPathTRange:jA.map(bs),Reversed:e3==null?!1:e3};
z.add.TySh.add={vmsk:new eM.hn,vogk:null};dU.jC(z.add.TySh)}if(bK._LineOrientation=="i2")ex._LineOrientation=2}}X.T8.ds(Q,!0);
var kn={},cL=[];for(var F=0;F<Q.B.length;F++){var eb=Q.B[F].add.lyid;if(eb==null)continue;var j6=Math.max(j6,eb);
if(kn[eb]!=null)cL.push(F);else kn[eb]=!0}for(var F=0;F<cL.length;F++)Q.B[cL[F]].add.lyid=j6+1+F};cz.azp=function(x,Q){Q+=12;
var c=w.q(x,Q),$=[];Q+=4;c=Math.min(c,Math.floor((x.length-Q)/5));for(var F=0;F<c;F++){var z=Math.min(x[Q+F*5+4],1),j=w.c4(x,Q+F*5)/32;
$.push([z,j])}return $};cz.aa9=function(x){var Q=new DOMParser,c=Q.parseFromString(x,"text/xml").firstChild.children[0],$=c.getElementsByTagName("variables");
if($.length==0)return[];$=$[0].children;var z=[],j="varName trait docRef placementMethod align valign clip".split(" ");
for(var U=0;U<$.length;U++){var i=$[U],b={};z.push(b);for(var e=0;e<j.length;e++){var k=j[e],K=i.getAttribute(k);
if(K==null)continue;b[k]=K}}return z};cz.an3=function(x){var Q=new DOMParser,c=Q.parseFromString(x,"text/xml").firstChild.children,$=[[]];
if(c==null)return $;for(var F=0;F<c.length;F++){var z=c[F],j=[];$.push(j);for(var U=0;U<z.children.length;
U++){var i=z.children[U];if(F==0)$[0].push(i.tagName);j.push(i.textContent)}}return $};cz.o5=function(x,Q,c){X.T8.LY(x);
X.T8.ds(x,!1);x.pu=c[3]==!0;var $=[],z=[],a=0,I=1,T=16,ek=0;for(var F=0;F<x.B.length;F++){var j=x.B[F];
if(j.Oz()&&j.U5(x).F){j.add.SoLd.filterFX.v.filterMaskEnable.v=j.U5(x).F.isEnabled}if(j.add.TySh){var U=j.add.TySh.HW,i=dU.SI(U);
j.add.TySh.Gb.TextIndex={t:"long",v:$.length};$.push(U);if(i==2)dU.c5(j.add.TySh)}var b=j.add.vstk;if(b)b.strokeStyleResolution.v=x.cQ;
if(j.Z6()||c[2]&&j.add.SoLd){z[F]=[j.rect,j.buffer];j.rect=new gh;j.buffer=d.R(0);if(j.add.SoLd){var e=j.U5(x);
if(e!=null){z[F].push(e.buffer);e.buffer=d.R(e.buffer.length)}}}}if($.length>0){var k=x.add.Txt2?x.add.Txt2.Yl:null;
if(x.add.Txt2==null)x.add.Txt2={};x.add.Txt2.Yl=iA.a6T($,null,k)}var K=[x.add.lnk2,x.add.FEid,x.add.Patt],g=x.ahW(x.B);
x.as6(g);x.Q_.r1005=new Uint8Array([0,0,0,0,0,1,0,2,0,0,0,0,0,1,0,2]);w.adh(x.Q_.r1005,0,x.cQ);w.adh(x.Q_.r1005,8,x.cQ);
if(x.Vv.length>0){var R=x.Vv;x.Q_.r1073=new Uint8Array(8+R.length*14);w.nh(x.Q_.r1073,0,3);w.nh(x.Q_.r1073,4,R.length);
for(var F=0;F<R.length;F++){var T=8+14*F;w.$m(x.Q_.r1073,T,14);w.VV(x.Q_.r1073,T+2,R[F].y);w.VV(x.Q_.r1073,T+6,R[F].x);
w.$m(x.Q_.r1073,T+10,-1);w.$m(x.Q_.r1073,T+12,8)}}if(x.HI()){x.Q_.r1022=new Uint8Array([0,3+x.fG.length-1,0])}else delete x.Q_.r1022;
var D=new Uint8Array(x.B.length*2),_=new Uint8Array(x.B.length);for(var F=0;F<x.B.length;F++){var j=x.B[F],f=j.to,y=j.Rm?1:0;
w.Dr(D,F*2,f);_[F]=y;if(f>a)a=f;if(y==0)I=0}if(a>0)x.Q_.r1026=D;if(I<1)x.Q_.r1072=_;var Z=x.Bo,v=Z.length,G=x.Q_.r1032=d.R(16+5*v,!0);
w.EO(G,0,1);w.EO(G,4,576);w.EO(G,8,576);w.EO(G,12,v);for(var F=0;F<v;F++){w.nh(G,T,Math.round(Z[F][1]*32));
G[T+4]=Z[F][0];T+=5}if(c[4]!=!0){var q=[x.buffer,new gh(0,0,x.m,x.e)],h=0;d.gk(q);while(q[h+1].P()>200*200)h+=2;
var r=ar.pz("jpg"),H=q[h+1],o=new Uint8Array(r.YU([[q[h].buffer]],H.m,H.e)),G=x.Q_.r1036=new Uint8Array(28+o.length);
w.EO(G,0,1);w.EO(G,4,H.m);w.EO(G,8,H.e);w.EO(G,12,H.m*3);w.EO(G,16,H.P()*3);w.EO(G,20,o.length);w.Dr(G,24,24);
w.Dr(G,26,1);G.set(o,28)}var P=d.Ty(x.buffer);if(x.add.fcmy)P=!1;var O=[];if(P)O.push({name:"Transparency",aW:{Z:255,r:0,J:0},Fr:100,Iz:1});
O=O.concat(x.fG);delete x.Q_.r1045;delete x.Q_.r1006;delete x.Q_.r1077;var p=new ij;T=0;var C=new Uint8Array(4+O.length*13);
C[3]=1;for(var F=0;F<O.length;F++){var W=O[F],J=W.name+"\0";w.KY(p,T,J);T+=4+J.length*2;var t=4+F*13;
gR.Au(C,t,W.aW);C[t+11]=W.Fr;C[t+12]=W.Iz}if(T!=0)x.Q_.r1045=p.data.slice(0,T);x.Q_.r1077=C;for(var F=0;
F<x.p9.length;F++)x.p9[x.p9.length-F-1].v.sliceID.v=2+F*3;var Y={classID:"null",baseName:{t:"TEXT",v:"User"},bounds:{t:"Objc",v:{classID:"Rct1",Top:{t:"long",v:0},Left:{t:"long",v:0},Btom:{t:"long",v:0},Rght:{t:"long",v:0}}},slices:{t:"VlLs",v:x.p9}},p=new ij;
w.Rj(p,0,8);w.Rj(p,4,16);var l=e0.lD(p,Y,8);x.Q_.r1050=p.data.slice(0,l+8);var p=new ij;w.Rj(p,0,16);
var l=e0.lD(p,x.A2,4);x.Q_.r1065=p.data.slice(0,l+4);var m=x.g;G=x.Q_.r1069=d.R(2+m.length*4,!0);w.Dr(G,0,m.length);
for(var F=0;F<m.length;F++)w.EO(G,2+4*F,x.B[m[F]].add.lyid);delete x.Q_.r1058;delete x.Q_.r1060;if(Object.keys(x.hD).length!=0){var B=[{t274:[1],t282:[[72,1]],t283:[[72,1]],t296:[2]},{t259:[6],t282:[[72,1]],t283:[[72,1]],t296:[2],t513:[302],t514:[0]}];
be.Q3(x.hD,B[0],c[0]&&c[1]);x.Q_.r1058=new Uint8Array(UTIF.encode(B));var L=be.iR(x.hD);x.Q_.r1060=w.nT(L)}var A=[],S=[],M=x.iL.slice(0);
if(x.d6){var N=dJ.ah8([{type:6},{type:8,all:0},{type:3,length:5,frule:1,third:2,prmA:0,prmB:0},{type:5,c:[0,0,0,0,0,0]},{type:5,c:[20,0,20,0,20,0]},{type:5,c:[20,20,20,20,20,20]},{type:5,c:[0,20,0,20,0,20]},{type:5,c:[0,0,0,0,0,0]}]),s=new eM.hn;
s.$=N;M.push(hf._S("Tile Symmetry 1",{vmsk:s,vogk:eM.jz(N)}))}for(var F=0;F<M.length;F++){var V=M[F],N=V.add.vmsk.$;
if(F==0&&N.length==2)continue;var g8=d.R(N.length*26);dJ.Wg(g8,0,N,x.m,x.e);var n=F==0?1025:2e3+F-1;
x.Q_["r"+n]=g8;if(F!=0){var cQ={classID:"pathInfoClass",pathUnicodeName:{t:"TEXT",v:V.name}};if(V.name=="Tile Symmetry 1")cQ.pathSymmetryClass={t:"Objc",v:{classID:"pathSymmetryClass",pathSymmetryMode:{t:"enum",v:{pathSymmetryModeEnum:"pathSymmetryModeRectangularTile"}},pathSymmetryCount:{t:"long",v:1}}};
A.push({t:"Objc",v:cQ});S.push({t:"Objc",v:{classID:"null",keyDescriptorList:{t:"VlLs",v:V.add.vogk}}})}}if(A.length!=0){x.add.pths={classID:"pathsDataClass",pathList:{t:"VlLs",v:A}};
if(x.d6)x.add.pths.pathSymmetrySelectedPath={t:"long",v:A.length-1};S={classID:"null",keyRootDescriptorList:{t:"VlLs",v:S}};
var p=new ij;w.Rj(p,0,16);var l=e0.lD(p,S,4);x.Q_.r3000=p.data.slice(0,l+4)}else{delete x.add.pths;delete x.Q_.r3000}if(x.rs&&x.rs.length!=0){x.Q_.r4000=d.rs.o5(x.rs)}if(x.vB.length!=0){var hk="<variableSets xmlns=\"http://ns.adobe.com/Variables/1.0/\">\n"+"<variableSet locked=\"none\" varSetName=\"binding1\">\n"+"<variables>";
for(var F=0;F<x.vB.length;F++){var eG=x.vB[F],ie=[];for(var n in eG)ie.push(n+"=\""+eG[n]+"\"");hk+="<variable "+ie.join(" ")+">\n</variable>\n"}hk+="</variables>\n</variableSet>\n</variableSets>";
x.Q_.r7000=w.nT(hk)}if(x.x8.length!=0){var hk="<sampleDataSets psdPath=\""+x.name+"\">\n";for(var F=1;
F<x.x8.length;F++){var eN=x.x8[F];hk+="<sampleDataSet dataSetName=\"Data Set "+F+"\">\n";for(var gr=0;
gr<eN.length;gr++)hk+="<"+x.x8[0][gr]+">"+eN[gr].replace(/</g,"&lt;").replace(/>/g,"&gt;")+"</"+x.x8[0][gr]+">\n";
hk+="</sampleDataSet>\n"}hk+="</sampleDataSets>";x.Q_.r7001=w.nT(hk)}ek=cz.ae3(x,Q,ek,3+O.length);ek=cz.aDg(x,Q,ek);
ek=cz.a8a(x,Q,ek);ek=cz.aiG(x,Q,ek,c,P);ek=cz.asr(x,Q,ek,c[0],P);var jK=[1025,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,7e3,7001];
for(var F=0;F<jK.length;F++)delete x.Q_["r"+jK[F]];for(var F=0;F<x.B.length;F++){var j=x.B[F];if(j.Z6()||c[2]&&j.add.SoLd){j.rect=z[F][0];
j.buffer=z[F][1];if(z[F][2]){var e=j.U5(x);z[F].push(e.buffer);e.buffer=z[F][2]}}}x.as6(K);X.T8.ds(x,!0);
delete x.pu;return ek};cz.Dx=function(x,Q,c){var $=w.mt(Q,c,4);c+=4;if($!="8BPS")alert("invalid header signature: "+$);
var z=w._C(Q,c);c+=2;x.pu=z==2;if(z!=1&&z!=2)alert("invalid version: "+z);c+=6;x.FN=w._C(Q,c);c+=2;x.e=w.c4(Q,c);
c+=4;x.m=w.c4(Q,c);c+=4;x.kW=w._C(Q,c);c+=2;x.ud=w._C(Q,c);c+=2;return c};cz.ae3=function(x,Q,c,$){var z=x.add.fcmy==1;
Q.qN(0,64);w.f3(Q.data,c,"8BPS");c+=4;w.Dr(Q.data,c,x.pu?2:1);c+=2;w.EO(Q.data,c,0);c+=4;w.Dr(Q.data,c,0);
c+=2;w.Dr(Q.data,c,$+(z?1:0));c+=2;w.nh(Q.data,c,x.e);c+=4;w.nh(Q.data,c,x.m);c+=4;w.Dr(Q.data,c,8);
c+=2;w.Dr(Q.data,c,z?4:3);c+=2;return c};cz.a8J=function(x,Q,c){var $=w.c4(Q,c);c+=4;if($!=0)x.Fm=Q.slice(c,c+$);
c+=$;return c};cz.aDg=function(x,Q,c){w.gv(Q,c,0);c+=4;return c};cz.adH=function(x,Q,c){var $=w.q(Q,c),z=0;
c+=4;var j=[];while(z<$){var U=w.mt(Q,c+z,4);z+=4;var i=w._C(Q,c+z);z+=2;var b=w.D4(Q,c+z);z+=b.length;
if(U=="MeSa"&&(i==7e3||i==7001)){}else if(U!="8BIM"){j.push(i);console.log("Unknown Image Resources signature: "+U+", ID: "+i)}var e=w.q(Q,c+z);
z+=4;if(x.Q_["r"+i]!=null)console.log("--- two resources with same ID");x.Q_["r"+i]=w.Y5(Q,c+z,e);z+=e+(e&1)}for(var F=0;
F<j.length;F++)delete x.Q_["r"+j[F]];return c+$};cz.a8a=function(x,Q,c){var $=c,U=0;c+=4;var z=[];for(var j in x.Q_){z.push(parseInt(j.slice(1)))}z.sort(function(K,g){return K-g});
for(var F=0;F<z.length;F++){var i=z[F];w.RP(Q,c+U,i==7e3||i==7001?"MeSa":"8BIM");U+=4;w.Lv(Q,c+U,i);
U+=2;var b=w.$v(Q,c+U,"");U+=b;var e=x.Q_["r"+i],k=e.length;w.Rj(Q,c+U,k);U+=4;w.dK(Q,c+U,e);U+=k;if(k%2==1)U++}w.Rj(Q,$,U);
return c+U};cz.am_=function(x,Q,c){var $=c,z,j,U=x.pu?8:4;if(x.pu)z=w.ee(Q,c);else z=w.q(Q,c);c+=U;if(z==0)return $+U;
j=cz.arW(x,Q,c);cz.Mu(1,j-c,"Layer Info");c=j;j=cz.a9d(x,Q,c);cz.Mu(1,j-c,"Global Layer Mask Info");
c=j;j=hz.asT(Q,c,$+U+z,x.add,x.pu,x);cz.Mu(1,j-c,"Project Add Info");c=j;return $+U+z};cz.aiG=function(x,Q,c,$,z){var j=c;
w.Rj(Q,c,0);c+=4;if(x.pu){w.Rj(Q,c,0);c+=4}c=cz.ayi(x,Q,c,$,z);c=cz.an6(x,Q,c);c=hz.adW(Q,c,x.add,x.pu,x);
if(x.pu)w.bi(Q,j,c-j-8);else w.Rj(Q,j,c-j-4);return c};cz.arW=function(x,Q,c){var $,z=x.pu?8:4;if(x.pu)$=w.ee(Q,c);
else $=w.q(Q,c);c+=z;if($!=0)cz.a4D(x,Q,c);return c+$};cz.a4D=function(x,Q,c){var $=w.u7(Q,c);c+=2;var z=Math.abs($);
for(var F=0;F<z;F++){var j=new eM;c=g9.s5(j,x,Q,c);x.B[F]=j}var U=new gh(0,0,x.m,x.e);for(var F=0;F<z;
F++){var i=x.B[F],b=i.Rz(),e=bo.s5(i,x,Q,c);if(e-c>8)cz.Mu(2,e-c,"Lay: "+i.getName());c=e;cz.akM(i,U);
if(b)cz.akM(b,U)}};cz.akM=function(x,Q){};cz.ayi=function(x,Q,c,$,z){var j=c,U=x.pu;c+=U?8:4;c=cz.ajL(x,Q,c,$,z);
var i=c-j-(U?8:4);if(i%2!=0)i++;if(U)w.bi(Q,j,i);else w.Rj(Q,j,i);return j+i+(U?8:4)};cz.ajL=function(x,Q,c,$,z){var j=x.B.length;
w.e8(Q,c,z?-j:j);c+=2;var U=[];for(var F=0;F<j;F++)c=g9.o5(x.B[F],x,Q,c,U);for(var F=0;F<j;F++)c=bo.gS(x.pu,x.B[F],Q,c,U[F],$,x.add.fcmy==1);
return c};cz.a9d=function(x,Q,c){var $=w.q(Q,c);c+=4;c+=$;return c};cz.an6=function(x,Q,c){var $=w.Rj(Q,c,0);
c+=4;return c};cz.a44=function(x,Q,c){var $=x.ud,z="Bitmap Grayscale Indexed RGB CMYK Multichannel Duotone Lab".split(" "),j=[1,1,1,3,4,1,1,3],U,D;
if($!=3){if($==1||$==2||$==4)console.log("Project will be converted from "+z[$]+" to "+z[3]+" mode.");
else{alert("Color mode "+z[$]+" is not supported yet :(")}if($==4)x.add.fcmy=1}if(x.Q_.r1045){U=[];var i=x.Q_.r1045,b=0;
while(b<i.length){var e=w.Ez(i,b);U.push(e);b+=4+2+e.length*2}}var k=j[$]+(U==null||U[0]=="Transparency"?1:0),K=x.m,g=x.e,R=K*g,T=w._C(Q,c);
c+=2;x.buffer=d.R(R*4);d.h4(x.buffer,4278190080);var a=c;for(var _=0;_<x.FN;_++){if(T==0){D=bo.$c(x.pu,x.kW,Q,K,g,c,T);
c+=R*(x.kW>>>3)}else if(T==1){D=d.R(R);var I=x.pu?4:2;if(_==0)c+=x.FN*g*I;c+=bo.arz(Q,D,K,g,a+_*g*I,c,I)}else{console.log("unknown compression of image data: ",T);
return}if(_<k){d.Dm(D,x.buffer,_);if(x.FN==1&&_==0){d.Dm(D,x.buffer,1);d.Dm(D,x.buffer,2)}}else{var f=new eM.zM,y=_-k,Z=_-j[x.ud];
f.name=U?U[Z]:"Alpha";if(f.name=="Quick Mask"){f.fd=!0;x.oW.push(y)}f.rect=new gh(0,0,K,g);f.channel=D;
f.color=0;f.NK();x.fG[y]=f;if(x.Q_.r1077){var i=x.Q_.r1077.slice(4+Z*13);f.aW=gR.zH(i,0);f.Fr=i[11];
f.Iz=i[12];if(f.Iz==2)f.fd=!0}}}x.FN=4;if(x.ud==2)for(var F=0;F<R;F++){var v=F*4,G=x.buffer[v];x.buffer[v]=x.Fm[0+G];
x.buffer[v+1]=x.Fm[256+G];x.buffer[v+2]=x.Fm[512+G]}return c};cz.asr=function(x,Q,c,$,z){var j=1,U=16,i=x.m,b=x.e,k,K;
w.Lv(Q,c,j);c+=2;var e=i*b;if(!$){K=new d.PT(i*b);d.jy(x.buffer,K);var g=K.Z,R=K.r,T=K.J,D=K.V;for(var F=0;
F<e;F++){var a=D[F]*(1/255);g[F]=~~(g[F]*a+255*(1-a));R[F]=~~(R[F]*a+255*(1-a));T[F]=~~(T[F]*a+255*(1-a))}}else k=d.R(e);
var _=[k,k,k];if(!$)_=[K.Z,K.r,K.J];if(x.add.fcmy==1){var I=k;if(!$){I=d.R(e);I.fill(255)}_.push(I)}if(z)_.push($?k:K.V);
for(var F=0;F<x.fG.length;F++){_.push(x.fG[F].EF(new gh(0,0,x.m,x.e)))}var f=c;for(var y=0;y<_.length;
y++){Q.qN(c,i*b+4);k=_[y];if(j==0||j==2||j==3)c=bo.Iw(x.pu,k,Q.data,i,b,c,j);else{var Z=x.pu?4:2;if(y==0)c+=_.length*b*Z;
var v=c;c+=bo.a8C(k,Q.data,i,b,f+y*b*Z,c,Z)}}return c};function cf(){}cf.s5=function(x){var Q={};cf.bP(x,Q,0,0);
return Q};cf.o5=function(x,Q){var c=0;c=cf.Ig(x,Q,c,0);return c};cf.bP=function(x,Q,c,$){while(x[c]!="<".charCodeAt(0))c++;
c+=2;while(!0){if(x[c]=="/".charCodeAt(0)){c++;var z=w.indexOf(x," ".charCodeAt(0),c,c+50),j=w.indexOf(x,"\n".charCodeAt(0),c,c+50);
if(j==-1)j=Infinity;if(z==-1)z=Infinity;var U=Math.min(j,z),i=w.mt(x,c,U-c),b=cf.z1(x,U+1,$+1,i);Q[i]=b.b;
c=U+1;c+=b.size}else if(x[c]==">".charCodeAt(0)){c+=2;break}else{var e=x[c];if(e==10||e==9||e==32)c++;
else{console.log("unknown byte: "+e+", char: "+String.fromCharCode(e),c);c++}}}return c};cf.Ig=function(x,Q,c,$){w.RP(Q,c,"<<\n");
c+=3;var z=cf.a3T;for(var j in x){w.Xx(Q,c,"\t".charCodeAt(0),$+1);c+=$+1;w.RP(Q,c,"/"+j);c+=1+j.length;
if(z(x[j])||x[j]instanceof Array){w.RP(Q,c," ");c++}else{w.RP(Q,c,"\n");c++;w.Xx(Q,c,"\t".charCodeAt(0),$+1);
c+=$+1}c=cf.b9(x[j],Q,c,$+1);w.RP(Q,c,"\n");c++}w.Xx(Q,c,"\t".charCodeAt(0),$);c+=$;w.RP(Q,c,">>");c+=2;
return c};cf.z1=function(x,Q,c,$){var z=Q,j={size:0,b:0};while(!0){while(x[Q]==" ".charCodeAt(0)||x[Q]=="\t".charCodeAt(0)||x[Q]=="\n".charCodeAt(0))Q++;
if(x[Q]=="<".charCodeAt(0)){j.b={};Q=cf.bP(x,j.b,Q,c+1);break}else if(x[Q]=="(".charCodeAt(0)){Q+=3;
var U=Q;while(!0){if(x[U-1]!="\\".charCodeAt(0)&&x[U]==")".charCodeAt(0)&&(x[U+1]=="\n".charCodeAt(0)||x[U+1]==" ".charCodeAt(0)))break;
else U++}j.b=w.apK(x,Q,U);Q=U+2;break}else if(x[Q]=="[".charCodeAt(0)){Q++;j.b=[];while(x[Q]==" ".charCodeAt(0)||x[Q]=="\t".charCodeAt(0)||x[Q]=="\n".charCodeAt(0))Q++;
while(x[Q]!="]".charCodeAt(0)){var i=cf.z1(x,Q,c+1,$);j.b.push(i.b);Q+=i.size;while(x[Q]==" ".charCodeAt(0)||x[Q]=="\t".charCodeAt(0)||x[Q]=="\n".charCodeAt(0))Q++}Q++;
break}else{var b=w.indexOf(x," ".charCodeAt(0),Q,Q+50),e=w.indexOf(x,"\n".charCodeAt(0),Q,Q+50);if(e==-1)e=Infinity;
if(b==-1)b=Infinity;var k=w.mt(x,Q,Math.min(b,e)-Q).trim(),K=parseFloat(k);if(!isNaN(K)){j.b=parseFloat(k);
Q=Math.min(b,e)+1;break}else if(k=="true"||k=="false"){j.b=k=="true";Q=Math.min(b,e)+1;break}else if(k=="null"||k=="NaN"||k=="undefined"){j.b=0;
Q=Math.min(b,e)+1;break}else{console.log("unknown identifier: "+k);throw"e"}Q=Math.min(b,e)+1}}j.size=Q-z;
return j};cf.b9=function(x,Q,c,$){if(x instanceof Array){var z=x.length==0||typeof x[0]=="number";if(z){w.RP(Q,c,"[ ");
c+=2;for(var F=0;F<x.length;F++){var j=x[F]+" ";w.RP(Q,c,j);c+=j.length}w.RP(Q,c,"]");c+=1}else{w.RP(Q,c,"[\n");
c+=2;for(var F=0;F<x.length;F++){w.Xx(Q,c,"\t".charCodeAt(0),$);c+=$;c=cf.b9(x[F],Q,c,$);w.RP(Q,c,"\n");
c++}w.Xx(Q,c,"\t".charCodeAt(0),$);c+=$;w.RP(Q,c,"]");c+=1}}else if(x instanceof Object){c=cf.Ig(x,Q,c,$)}else if(typeof x=="string"){w.RP(Q,c,"(");
c++;w.Xx(Q,c,254);c++;w.Xx(Q,c,255);c++;c=w.a2S(Q,c,x);w.RP(Q,c,")");c+=1}else{var j=x+"";w.RP(Q,c,j);
c+=j.length}return c};cf.a3T=function(x){var Q=typeof x;return Q=="string"||Q=="number"||Q=="boolean"};
function es(){}es.s5=function(x){var Q={};es.agW(x,Q,0,0);return Q};es.o5=function(x,Q){var c=0;w.RP(Q,c," ");
c++;c=es.a2A(x,Q,c,0);c--;Q.qN(c,2);Q.data[c]=Q.data[c+1]=0;c+=2;return c};es.bP=function(x,Q,c,$){while(x[c]!="<".charCodeAt(0)){c++;
console.log("šipka")}c+=2;c=es.agW(x,Q,c,$);return c};es.Ig=function(x,Q,c,$){w.RP(Q,c,"<< ");c+=3;c=es.a2A(x,Q,c,$);
w.RP(Q,c,">>");c+=2;return c};es.MS=function(x){return x==9||x==10||x==32};es.agW=function(x,Q,c,$){while(!0){while(es.MS(x[c])||x[c]==0)c++;
if(c>=x.length)break;if(x[c]=="/".charCodeAt(0)){c++;var z=c;while(!es.MS(x[z]))z++;var j=w.mt(x,c,z-c);
c=z+1;var U=es.z1(x,c,$,j);Q["_"+j]=U.b;c+=U.size}else if(x[c]==">".charCodeAt(0)){c+=2;break}else{var i=x[c];
console.log(w.mt(x,c,c+100));console.log("unknown byte: "+i+", char: "+String.fromCharCode(i)+", offset: "+c);
c++;throw"e";return-1}}return c};es.a2A=function(x,Q,c,$){for(var z in x){var j=z.substring(1,z.length);
w.RP(Q,c,"/"+j);c+=1+j.length;w.RP(Q,c," ");c++;c=es.b9(x[z],Q,c,$+1,j);w.RP(Q,c," ");c++}return c};
es.z1=function(x,Q,c,$){var z=Q,j={type:"",size:0,b:0};while(es.MS(x[Q]))Q++;if(x[Q]=="<".charCodeAt(0)){j.type="Object";
j.b={};Q=es.bP(x,j.b,Q,c+1)}else if(x[Q]=="(".charCodeAt(0)){j.type="String";Q++;if(x[Q]==")".charCodeAt(0)){j.b="e";
Q++}else if(x[Q]==254&&x[Q+1]==255){Q+=2;var U=Q,i=0;while(!0){if(x[U]==")".charCodeAt(0)&&x[U-1]!="\\".charCodeAt(0))break;
else U+=1}j.b="s"+w.apK(x,Q,U);Q=U+2}else{var U=Q;while(x[U]!=")".charCodeAt(0))U++;j.b="s"+w.mt(x,Q,U-Q);
Q=U+1}}else if(x[Q]=="[".charCodeAt(0)){Q++;j.b=[];j.type="Array";while(es.MS(x[Q]))Q++;while(x[Q]!="]".charCodeAt(0)){var b=es.z1(x,Q,c+1,$);
if(b==-1)return-1;j.b.push(b.b);Q+=b.size;delete b.size;while(es.MS(x[Q]))Q++}Q++}else{var e=Q;while(!es.MS(x[e]))e++;
var k=w.mt(x,Q,e-Q),K=parseFloat(k);if(!isNaN(K)&&k.indexOf(".")!=-1){j.type="Float";var g=parseFloat(k);
j.b="f"+g}else if(!isNaN(K)&&k.indexOf(".")==-1){j.type="Integer";j.b="i"+parseInt(k)}else if(k=="true"||k=="false"){j.type="Boolean";
j.b=k=="true"}else if(k.charAt(0)=="/"){j.type="BString";j.b=k}else if(k=="NaN"||k=="undefined"){j.type="Float";
j.b="f0"}else{console.log("unknown value",JSON.stringify(k));throw"e"}Q=e+1}j.size=Q-z;return j};es.awy=function(x){if(x==Math.round(x))return x+".0";
var Q=x.toFixed(5);while(Q.endsWith("0")&&Q[Q.length-2]!=".")Q=Q.slice(0,Q.length-1);if(0<x&&x<1)Q=Q.slice(1);
if(-1<x&&x<0)Q="-"+Q.slice(2);return Q};es.b9=function(x,Q,c,$,z){var j=typeof x=="string"?x.charAt(0):"";
if(x instanceof Array){w.RP(Q,c,"[ ");c+=2;for(var F=0;F<x.length;F++){c=es.b9(x[F],Q,c,$,"");w.RP(Q,c," ");
c++}w.RP(Q,c,"]");c+=1}else if(x instanceof Object){c=es.Ig(x,Q,c,$)}else if(j=="e"){w.RP(Q,c,"()");
c+=2}else if(j=="s"){w.RP(Q,c,"(");c++;if(z=="97"){w.RP(Q,c,x.slice(1));c+=x.length-1}else{w.Xx(Q,c,254);
c++;w.Xx(Q,c,255);c++;c=w.a2S(Q,c,x.slice(1))}w.RP(Q,c,")");c++}else if(j=="/"){w.RP(Q,c,x);c+=x.length}else if(j=="f"){var U=parseFloat(x.substring(1)),i=es.awy(U);
w.RP(Q,c,i);c+=i.length}else if(j=="i"){w.RP(Q,c,x.substring(1));c+=x.length-1}else{var i=x+"";w.RP(Q,c,i);
c+=i.length}return c};function w(){}w.ajt=function(jF){var x="";for(var F=3;F>=0;F--)x+=String.fromCharCode(jF>>F*8&255);
return x};w.azi=function(x){var jF=0;for(var F=x.length-1;F>=0;F--)jF|=x.charCodeAt(F)<<(3-F)*8;return jF};
w.indexOf=function(x,Q,c,$){if(c==null)c=0;if($==null)$=x.length;$=Math.min($,x.length);for(var F=c;
F<$;F++)if(x[F]==Q)return F;return-1};w.iK=function(x,Q,c){if(c==null)c=0;var $=Q.length,z=x.length-$;
if(typeof Q=="string"){var j=[];for(var F=0;F<$;F++)j.push(Q.charCodeAt(F));Q=j}if(Q.length>0){var U=Q[0];
for(var F=c;F<z;F++)if(x[F]==U){var i=!0;for(var b=1;b<$;b++)if(Q[b]!=x[F+b]){i=!1;break}if(i)return F}}return-1};
w.apK=function(x,Q,c){var $=[],j="";while(Q<c){var z=x[Q++];if(z=="\\".charCodeAt(0))$.push(x[Q++]);
else $.push(z)}for(var F=0;F<$.length;F+=2)j+=String.fromCharCode($[F]<<8|$[F+1]);return j};w.aia=function(x,Q,c){var $=new Uint8Array(2);
for(var F=0;F<c.length;F++){w.Dr($,0,c.charCodeAt(F));if($[0]==")".charCodeAt(0)||$[0]=="(".charCodeAt(0)||$[0]=="\\".charCodeAt(0)){x[Q]="\\".charCodeAt(0);
Q++}x[Q]=$[0];Q++;if($[1]==")".charCodeAt(0)||$[1]=="(".charCodeAt(0)||$[1]=="\\".charCodeAt(0)){x[Q]="\\".charCodeAt(0);
Q++}x[Q]=$[1];Q++}return Q};w.a2S=function(x,Q,c){x.qN(Q,4*c.length);return w.aia(x.data,Q,c)};w.Ot=function(x,Q,c){var $="";
for(var F=0;F<c;F++){var z=x[Q++]|x[Q++]<<8;$+=String.fromCharCode(z)}return $};w.fy=function(x,Q,c){var $="";
for(var F=0;F<c;F++){var z=x[Q++]<<8|x[Q++];$+=String.fromCharCode(z)}return $};w.at_=function(x,Q,c){for(var F=0;
F<c.length;F++){var $=c.charCodeAt(F);w.JF(x,Q+2*F,$)}};w.acL=function(x,Q,c){for(var F=0;F<c.length;
F++){var $=c.charCodeAt(F);w.Dr(x,Q+2*F,$)}};w.aBc=function(x,Q,c){x.qN(Q,2*c.length);w.acL(x.data,Q,c)};
w.a0K=function(x,F,Q){var c=[],$=0,z=0;Q+=F;while(F<Q){$=x[F++];if(($&128)==0)z=$;else if(($&224)==192){z=($&31)<<6;
$=x[F++];z|=$&63}else if(($&240)==224){z=($&15)<<12;$=x[F++];z|=($&63)<<6;$=x[F++];z|=$&63}else if(($&248)==240){z=($&7)<<18;
$=x[F++];z|=($&63)<<12;$=x[F++];z|=($&63)<<6;$=x[F++];z|=$&63}else throw"e";c.push(z)}return c};w.a9u=window.TextDecoder?new window.TextDecoder("utf8"):null;
w.IV=function(x,Q,c){if(Q==null)Q=0;if(c==null)c=x.length;if(w.a9u&&Q==0&&c==x.length)return w.a9u.decode(x);
var $=w.a0K(x,Q,c),z=$.length;for(var F=0;F<z;F++)$[F]=String.fromCharCode($[F]);return $.join("")};
w.alF=window.TextEncoder?new window.TextEncoder("utf8"):null;w.nT=function(x){if(w.alF)return w.alF.encode(x);
var Q=new Uint8Array(x.length*4),c=w.A9(x,Q,0);return Q.slice(0,c)};w.A9=function(x,Q,c){var $=x.length,F=0;
for(var z=0;z<$;z++){var j=x.charCodeAt(z);if((j&4294967295-(1<<7)+1)==0){Q[c+F]=j;F++}else if((j&4294967295-(1<<11)+1)==0){Q[c+F]=192|j>>6;
Q[c+F+1]=128|j>>0&63;F+=2}else if((j&4294967295-(1<<16)+1)==0){Q[c+F]=224|j>>12;Q[c+F+1]=128|j>>6&63;
Q[c+F+2]=128|j>>0&63;F+=3}else if((j&4294967295-(1<<21)+1)==0){Q[c+F]=240|j>>18;Q[c+F+1]=128|j>>12&63;
Q[c+F+2]=128|j>>6&63;Q[c+F+3]=128|j>>0&63;F+=4}else throw"e"}return F};w.nt=function(x,Q){var c=w.q(x,Q),$=w.IV(x,Q+4,c-1);
return{ks:$,UZ:4+c}};w.atA=function(x,Q){var c=w.K3(x,Q),$=w.Ot(x,Q+4,c);return $};w.Q7=function(x,Q){var c=w.q(x,Q),$=w.fy(x,Q+4,c);
return $};w.Ez=function(x,Q){var c=w.q(x,Q),$=w.fy(x,Q+4,c-1);return $};w.ayQ=function(x,Q,c){w.aa(x,Q,c.length);
Q+=4;w.at_(x,Q,c)};w.azd=function(x,Q,c){w.EO(x,Q,c.length);Q+=4;w.acL(x,Q,c)};w.KY=function(x,Q,c){x.qN(Q,4+2*c.length);
w.azd(x.data,Q,c)};w.a1M=function(x,Q,c){x.qN(Q,4+2*c.length);w.ayQ(x.data,Q,c)};w.Mm=function(x,Q,c){var $=[];
for(var F=0;F<c;F++)$.push(String.fromCharCode(x[Q+F]));return $};w.a0h=function(x,Q,c){var $=!1,z=x.length-c.length;
for(var F=Q;F<z;F++){for(var j=0;j<c.length;j++){if(x[F+j]!=c.charCodeAt(j))break;if(j==c.length-1)return F}}};
w.mt=function(x,Q,c){var $="";for(var F=0;F<c;F++)$+=String.fromCharCode(x[Q+F]);return $};w.f3=function(x,Q,c){for(var F=0;
F<c.length;F++)x[Q+F]=c.charCodeAt(F)};w.RP=function(x,Q,c){x.qN(Q,c.length);w.f3(x.data,Q,c)};w.anM=function(x,Q,c){var $="";
for(var F=0;F<c;F++){var z=x[Q+F];if(z<10)$+="  ";else if(z<100)$+=" ";$+=z+", "}return $};w._C=function(x,Q){return x[Q]<<8|x[Q+1]};
w.Dr=function(x,Q,jF){x[Q]=jF>>8&255;x[Q+1]=jF&255};w.Lv=function(x,Q,jF){x.qN(Q,4);w.Dr(x.data,Q,jF)};
w.QC=function(x,Q){var c=w._C(x,Q),$=w._C(x,Q+2);return c+$*(1/65536)};w.adh=function(x,Q,jF){var c=Math.floor(jF),$=Math.floor((jF-c)*65536);
w.Dr(x,Q,c);w.Dr(x,Q+2,$)};w.uv=function(x,Q){return x[Q+1]<<8|x[Q]};w.JF=function(x,Q,jF){x[Q+1]=jF>>8&255;
x[Q]=jF&255};w.Yp=function(x,Q,jF){x.qN(Q,4);w.JF(x.data,Q,jF)};w.u7=function(x,Q){w.Zu[0]=x[Q+1];w.Zu[1]=x[Q];
return w.VE[0]};w.ls=function(x,Q){w.Zu[0]=x[Q];w.Zu[1]=x[Q+1];return w.VE[0]};w.$m=w.Dr;w.e8=w.Lv;w.c4=function(x,Q){w.$k[0]=x[Q+3];
w.$k[1]=x[Q+2];w.$k[2]=x[Q+1];w.$k[3]=x[Q];return w.HL[0]};w.nh=function(x,Q,jF){w.HL[0]=jF;x[Q+3]=w.$k[0];
x[Q+2]=w.$k[1];x[Q+1]=w.$k[2];x[Q+0]=w.$k[3]};w.gv=function(x,Q,jF){x.qN(Q,4);w.nh(x.data,Q,jF)};w.gx=function(x,Q,c,$){c[$+0]=x[Q+0];
c[$+1]=x[Q+1];c[$+2]=x[Q+2];c[$+3]=x[Q+3]};w.K3=function(x,Q){w.gx(x,Q,w.$k,0);return w.aE6[0]};w.aa=function(x,Q,jF){w.aE6[0]=jF;
w.gx(w.$k,0,x,Q)};w.jO=function(x,Q,jF){x.qN(Q,4);w.aa(x.data,Q,jF)};w.fu=function(x,Q){w.gx(x,Q,w.$k,0);
return w.HL[0]};w.a1s=function(x,Q,jF){w.HL[0]=jF;w.gx(w.$k,0,x,Q)};w.a3K=function(x,Q,jF){x.qN(Q,4);
w.a1s(x.data,Q,jF)};w.q=function(x,Q){var c=x[Q]*(256*256*256)+(x[Q+1]<<16|x[Q+2]<<8|x[Q+3]);return c};
w.EO=function(x,Q,jF){x[Q]=jF>>24&255;x[Q+1]=jF>>16&255;x[Q+2]=jF>>8&255;x[Q+3]=jF>>0&255};w.Rj=function(x,Q,jF){x.qN(Q,4);
w.EO(x.data,Q,jF)};w.ee=function(x,Q){return w.q(x,Q)<<32|w.q(x,Q+4)};w.at2=function(x,Q,jF){w.EO(x,Q,jF>>16>>16);
w.EO(x,Q+4,jF&4294967295)};w.bi=function(x,Q,jF){x.qN(Q,8);w.at2(x.data,Q,jF)};w.rY=function(x,Q){var c=new Uint8Array(8);
for(var F=0;F<8;F++)c[F]=x[Q+7-F];var $=new Float64Array(c.buffer);return $[0]};w.FL=function(x,Q){var c=new Uint8Array(8);
for(var F=0;F<8;F++)c[F]=x[Q+F];var $=new Float64Array(c.buffer);return $[0]};w.Cw=function(x,Q,jF){var c=new Float64Array(1);
c[0]=jF;var $=new Uint8Array(c.buffer);for(var F=0;F<4;F++){var z=$[F];$[F]=$[7-F];$[7-F]=z}for(var F=0;
F<8;F++)x[Q+F]=$[F]};w.K1=function(x,Q,jF){x.qN(Q,8);w.Cw(x.data,Q,jF)};w.lw=function(x,Q){w.$k[0]=x[Q+3];
w.$k[1]=x[Q+2];w.$k[2]=x[Q+1];w.$k[3]=x[Q+0];return w.uk[0]};w.Q0=function(x,Q){w.$k[0]=x[Q+0];w.$k[1]=x[Q+1];
w.$k[2]=x[Q+2];w.$k[3]=x[Q+3];return w.uk[0]};w.VV=function(x,Q,jF){w.uk[0]=jF;x[Q+0]=w.$k[3];x[Q+1]=w.$k[2];
x[Q+2]=w.$k[1];x[Q+3]=w.$k[0]};w.a3i=function(x,Q,jF){x.qN(Q,4);w.VV(x.data,Q,jF)};w.r1=function(x,Q,jF){w.uk[0]=jF;
x[Q+0]=w.$k[0];x[Q+1]=w.$k[1];x[Q+2]=w.$k[2];x[Q+3]=w.$k[3]};w.azj=function(x,Q,jF){x.qN(Q,4);w.r1(x.data,Q,jF)};
w.atr=function(x,Q){var c=w.c4(x,Q),$=c*(1/(1<<24));return $};w.akH=function(x,Q,c){var $=Math.floor(c*(1<<24));
w.nh(x,Q,$)};w.acb=function(x,Q,c){x.qN(Q,4);w.akH(x.data,Q,c)};w.D4=function(x,Q){var c=x[Q],$=w.mt(x,Q+1,c);
c+=1-c%2;return{fY:$,length:c+1}};w.axB=function(x,Q,c){var $=c.length;x[Q]=$;w.f3(x,Q+1,c);if($%2==0){x[Q+1+$]=0;
++$}return $+1};w.$v=function(x,Q,c){x.qN(Q,c.length+2);return w.axB(x.data,Q,c)};w._z=function(x,Q){var c=new bI;
c.V=w.rY(x,Q+0*8);c.J=w.rY(x,Q+1*8);c.dC=w.rY(x,Q+2*8);c.xq=w.rY(x,Q+3*8);c.DX=w.rY(x,Q+4*8);c.ti=w.rY(x,Q+5*8);
return c};w.Uk=function(x,Q,c){w.Cw(x,Q+0*8,c.V);w.Cw(x,Q+1*8,c.J);w.Cw(x,Q+2*8,c.dC);w.Cw(x,Q+3*8,c.xq);
w.Cw(x,Q+4*8,c.DX);w.Cw(x,Q+5*8,c.ti)};w.aij=function(x,Q,c){x.qN(Q,48);w.Uk(x.data,Q,c)};w.a1b=function(x,Q){var c=w.lw(x,Q),$=w.lw(x,Q+4),z=w.lw(x,Q+8),j=w.lw(x,Q+12);
return new gh(c,$,z-c,j-$)};w.ali=function(x,Q,c){w.VV(x,Q,c.x);w.VV(x,Q+4,c.y);w.VV(x,Q+8,c.x+c.m);
w.VV(x,Q+12,c.y+c.e)};w.asd=function(x,Q,c){x.qN(Q,16);w.ali(x.data,Q,c)};w.Ky=function(x,Q){var c=w.c4(x,Q),$=w.c4(x,Q+4),z=w.c4(x,Q+8),j=w.c4(x,Q+12);
return new gh($,c,j-$,z-c)};w.axQ=function(x,Q,c){w.nh(x,Q,c.y);w.nh(x,Q+4,c.x);w.nh(x,Q+8,c.y+c.e);
w.nh(x,Q+12,c.x+c.m)};w.xC=function(x,Q,c){x.qN(Q,16);w.axQ(x.data,Q,c)};w.Y5=function(x,Q,c){var $=new Uint8Array(c);
for(var F=0;F<c;F++)$[F]=x[Q+F];return $};w.ah$=function(x,Q,c){x.set(c,Q)};w.dK=function(x,Q,c){x.qN(Q,c.length);
w.ah$(x.data,Q,c)};w.aa0=function(x,Q,c,jF){if(!jF)jF=1;for(var F=0;F<jF;F++)x[Q+F]=c};w.Xx=function(x,Q,c,jF){if(!jF)jF=1;
x.qN(Q,jF);w.aa0(x.data,Q,c,jF)};w.VE=new Int16Array(1);w.Zu=new Uint8Array(w.VE.buffer);w.HL=new Int32Array(1);
w.aE6=new Uint32Array(w.HL.buffer);w.$k=new Uint8Array(w.HL.buffer);w.uk=new Float32Array(w.HL.buffer);
function dz(){}dz.s5=function(x,Q){var c=new Uint8Array(x),$=0,z=w.mt(c,$,9),i=4,b=100;$+=9;var j=w.mt(c,$,4);
$+=4;$++;Q.m=w.q(c,$);$+=4;Q.e=w.q(c,$);$+=4;var U=w.q(c,$);$+=4;if(U!=0)alert("Unsupported image format, not RGB!");
if(["file","v001","v002","v003"].indexOf(j)==-1){b=w.q(c,$);$+=4;if(parseInt(j.slice(1))>=7){b=b}else alert("Unknown XCF version: "+j);
i=8}var e={};$=dz.aT(c,$,e);var k=[];$=dz.H4(c,$,k,i);var K=[];$=dz.H4(c,$,K,i);Q.WE=0;for(var F=0;F<k.length;
F++)dz.aei(c,k[F],Q,e,i,b);while(Q.WE>0){Q.B.push(Q.x6());Q.WE--}Q.B.reverse();delete Q.WE;Q.buffer=d.R(Q.m*Q.e*4);
if(Q.B.length==0)console.log("No layers!!!");for(var F=0;F<K.length;F++){var g=dz.aav(c,K[F],e,i,b);
if(g.Wm[c8.anX])Q.u={channel:g.XC,rect:new gh(0,0,Q.m,Q.e)}}};dz.aei=function(x,Q,c,$,z,j){var U=c.Xh(),i=w.q(x,Q),K=0;
Q+=4;var b=w.q(x,Q);Q+=4;U.rect=new gh(0,0,i,b);var e=w.q(x,Q);Q+=4;var k=w.nt(x,Q);Q+=k.UZ;U.gF(k.ks);
var g={};Q=dz.aT(x,Q,g);if(g[c8.a4H]){var R=g[c8.a4H];K=R.length/4-1}if(g[c8.De]){U.rect.x=w.c4(g[c8.De],0);
U.rect.y=w.c4(g[c8.De],4)}if(g[c8.aj2]){U.opacity=w.q(g[c8.aj2],0)}if(g[c8.anL]){U.add.lsct=hA.DJ;U.H2=24}if(g[c8.axn]){var T=w.q(g[c8.axn],0);
U.s3=c8.ani[T];if(U.Uy()&&U.s3=="norm")U.s3="pass"}if(g[c8.aop]){if(w.q(g[c8.aop],0)==0)U.H2+=2}if(g[c8.a8X]){var D=w.q(g[c8.a8X],0);
U.add.lsct=D&1==1?hA.DJ:hA.H3}if(g[c8.gj]){var a=g[c8.gj];for(var _ in a){var I=a[_];if(_=="gimp-text-layer"){var f=dz.a0Q(I),y=f.text,Z=f.font,v=f.color,G=f["font-size"];
if(y==null&&f.markup){var q=new DOMParser,h=q.parseFromString(f.markup,"image/svg+xml");while(h.firstChild!=null&&h.firstChild.tagName!=null){h=h.firstChild;
var r=h.getAttribute("font"),H=h.getAttribute("foreground"),o=h.getAttribute("size");if(r!=null)Z=r;
if(H!=null){H=CSS.zH(H);v=[1,H.Z/255,H.r/255,H.J/255]}if(o!=null){G=""+parseFloat(o)/245}}y=h.textContent}U.add.lnsr="rend";
U.add.TySh=dU.Y7(0,0);U.add.TySh.Iv=new gh(0,0,100,100);U.add.TySh.i=new bI(1,0,0,1,U.rect.x,U.rect.y);
var P=U.add.TySh.HW;dU.U3(P,0,y);var O=dU.zl(P,0,0),p=f.justify,C=f["line-spacing"];if(v)O.VA.FillColor={Type:1,Values:[1,parseFloat(v[1]),parseFloat(v[2]),parseFloat(v[3])]};
if(G){G=Math.round(parseFloat(G));O.VA.FontSize=G;U.add.TySh.i.ti+=Math.min(17,G*.17)}if(C){C=Math.round(parseFloat(C)+O.VA.FontSize*1.2);
O.VA.Leading=C;O.VA.AutoLeading=!1}if(p)O.SW.Justification=["left","right","center","fill"].indexOf(p);
if(Z&&Z!="Sans-serif"){var W=Z.toLowerCase(),J="bold italic semi extra regular condensed light".split(" "),t=W.length;
for(var F=0;F<J.length;F++){var Y=W.indexOf(J[F]);if(Y!=-1&&Y<t&&W[Y-1]==" ")t=Y}if(t!=W.length)Z=Z.slice(0,t-1).split(" ").join("")+"-"+Z.slice(t).split(" ").join("");
dU.gD(O,Z)}dU.G4(P,0,y.length,O);var l=f["box-width"],m=f["box-height"],B=l?parseFloat(l):U.rect.m,L=m?parseFloat(m):U.rect.e;
dU.DY(P,1);dU.ei(P,[0,0,Math.ceil(B),Math.ceil(L)])}else console.log("Unknown property "+_)}}while(c.WE>K){c.B.push(c.x6());
c.WE--}c.WE=K;if(U.add.lsct==hA.DJ||U.add.lsct==hA.H3)c.WE++;var A=z==4?w.q:w.ee,S=A(x,Q);Q+=z;var M=A(x,Q);
Q+=z;if(U.nd()){U.buffer=d.R(U.rect.P()*4);var N=new d.PT(U.rect.P());dz.aln(x,S,N,$,z,j);d.li(N,U.buffer)}if(M!=0){U.F=new eM.zM;
var s=dz.aav(x,M,$,z,j);U.F.channel=s.XC;U.F.rect=U.rect.clone();if(g[c8.a5D])U.F.isEnabled=w.q(g[c8.a5D],0)==1;
U.F.color=U.F.channel[0];U.F.NK()}if(U.Uy())U.rect=new gh;c.B.push(U)};dz.a0Q=function(x){var Q="("+w.IV(x,0,x.length-1)+")",c=[],$={};
dz.arT(Q,1,c);dz.azh(c,$);return $};dz.azh=function(x,Q){for(var F=0;F<x.length;F++){var c=x[F],$=c[0];
if(c.length==2)Q[$]=c[1];else Q[$]=c.slice(1)}};dz.arT=function(x,Q,c){while(!0){if(Q>=x.length)throw"e";
var $=x.charAt(Q);Q++;if($=="("){var z=[];Q=dz.arT(x,Q,z);c.push(z)}else if($==" "||$=="\n"||$=="\r"){}else if($==")")return Q;
else if($=="\""){var j=Q;while(!0){var U=x[Q];Q++;if(U=="\"")break;if(U=="\\")Q++}c.push(JSON.parse(x.slice(j-1,Q)))}else{var j=Q-1;
while(x[Q]!=" "&&x[Q]!=")")Q++;c.push(x.slice(j,Q))}}};dz.aav=function(x,Q,c,$,z){var j=w.q(x,Q);Q+=4;
var U=w.q(x,Q);Q+=4;var i=w.nt(x,Q);Q+=i.UZ;var b={};Q=dz.aT(x,Q,b);var e=new d.PT(j*U),k=$==4?w.q:w.ee,K=k(x,Q);
Q+=$;dz.aln(x,K,e,c,$,z);return{XC:e.Z,Wm:b}};dz.aln=function(x,Q,c,$,z,j){var U=w.q(x,Q);Q+=4;var i=w.q(x,Q);
Q+=4;var b=w.q(x,Q);Q+=4;var e=z==4?w.q:w.ee,k=e(x,Q);Q+=z;dz.alP(x,k,c,$,b,z,j)};dz.alP=function(x,Q,c,$,z,j,U){var i=w.q(x,Q),k=0,F=0;
Q+=4;var b=w.q(x,Q);Q+=4;var e=new gh(0,0,i,b);if(U==100||U==150)k=1;else if(U==200||U==250)k=2;else if(U==300||U==350)k=4;
else if(U==500||U==550)k=2;else if(U==600||U==650)k=4;else if(U==700||U==750)k=8;else{alert("unsupported bit depth "+U);
throw"e"}var K=z/k,k=Math.round(z/K),g=[];Q=dz.H4(x,Q,g,j);var R=new d.PT(64*64*k),T=new gh,D=$[c8.afL][0],a=[R.Z,R.r,R.J,R.V];
if(K==3)R.V.fill(255);var _=Date.now();if(g.length!=0)for(var I=0;I<b;I+=64)for(var f=0;f<i;f+=64){var y=Math.min(i-f,64),Z=Math.min(b-I,64),v=y*Z;
T.r$(f,I,y,Z);dz.asE(x,g[F++],v*k,D,K,a);if(U==100||U==150){}else if(U==250){for(var G=0;G<K;G++){var q=a[G];
for(var h=0;h<v;h++){var r=q[h]<<8|q[v+h];q[h]=Math.min(r>>>8,255)}}}else if(U==600){var H=dz.a28(),o=new Uint32Array(1),P=new Float32Array(o.buffer);
for(var G=0;G<K;G++){var q=a[G];for(var h=0;h<v;h++){o[0]=q[h]<<24|q[v+h]<<16|q[(v<<1)+h]<<8|q[(v<<1)+v+h]<<0;
var O=P[0];if(O<0)O=0;else if(O>1)O=1;q[h]=H[~~(.5+O*1e3)]}}}else console.log("unknown data format",U);
d.zJ(R,T,c,e)}};dz.a28=function(){var x=dz.a98;if(x!=null)return x;x=dz.a98=new Uint8Array(1001);for(var F=0;
F<1001;F++)x[F]=~~(.49+255*d.Yw(F*.001));return x};dz.asE=function(x,Q,c,$,z,j){if($==1){for(var U=0;
U<z;U++){var i=j[U],b=0;while(b<c){var jF=x[Q];Q++;if(jF<127){var e=x[Q];Q++;jF++;for(var F=0;F<jF;F++)i[b+F]=e}else if(jF==127){var k=x[Q];
Q++;var K=x[Q];Q++;var e=x[Q];Q++;jF=k<<8|K;for(var F=0;F<jF;F++)i[b+F]=e}else if(jF==128){var k=x[Q];
Q++;var K=x[Q];Q++;jF=k<<8|K;for(var F=0;F<jF;F++)i[b+F]=x[Q+F];Q+=jF}else{jF=256-jF;for(var F=0;F<jF;
F++)i[b+F]=x[Q+F];Q+=jF}b+=jF}}}else if($==2){var g=pako.inflate(x.slice(Q)),R=Math.round(g.length/c);
for(var F=0;F<c;F++){var T=F*R;j[0][F]=g[T];j[1][F]=g[T+1];j[2][F]=g[T+2];j[3][F]=R==3?255:g[T+3]}}else alert("Unknown compression "+$)};
dz.H4=function(x,Q,c,$){var z=$==4?w.q:w.ee;while(!0){var j=z(x,Q);Q+=$;if(j==0)break;else c.push(j)}return Q};
dz.aT=function(x,Q,c){while(!0){var $=w.q(x,Q);Q+=4;var z=w.q(x,Q);Q+=4;if($==c8.aCP)break;else if($==c8.gj)c[$]=dz.aDu(x,Q,Q+z);
else c[$]=w.Y5(x,Q,z);Q+=z}return Q};dz.aDu=function(x,Q,c){var $={};while(Q<c){var z=w.nt(x,Q);Q+=z.UZ;
var j=w.q(x,Q);Q+=4;if(j!=1)console.log("unknown flags",j);var U=w.q(x,Q);Q+=4;$[z.ks]=w.Y5(x,Q,U);Q+=U}return $};
var c8={aCP:0,av2:1,aAd:2,a5g:3,anX:4,a9G:5,aj2:6,axn:7,aop:8,aeV:9,aqR:10,a5D:11,a6o:12,ayF:13,a2m:14,De:15,alN:16,afL:17,avT:18,alG:19,a8y:20,gj:21,amc:22,a0X:23,ajx:24,aB2:25,awz:26,aCN:27,apw:28,anL:29,a4H:30,a8X:31,a16:32,af0:33,a8z:34,abE:35,a4o:36,aoT:37,azF:38,ag3:0,asn:1,adm:2,a4K:3,afe:1,aq1:2,aye:0,a7I:1,aaF:1};
c8.ani="norm,diss,norm,mul ,scrn,over,diff,lddg,fsub,dark,lite,hue ,sat ,colr,lum ,fdiv,lddg,idiv,hLit,sLit,fdiv,pLit,norm,over,hue ,hue ,colr,lite,norm,norm,mul ,scrn,diff,lddg,fsub,dark,lite,hue ,sat ,colr,lum ,fdiv,lddg,idiv,hLit,sLit,fdiv,pLit,vLit,pLit,lLit,hMix,smud,lbrn,lum ,lum ,lum ,lum ,norm,norm,norm,pass".split(",");
var gO=function(){var x=!1,Q,c,_=0,y;function $(){var G=w.mt(Q,c,4);c+=4;return G[3]+G[2]+G[1]+G[0]}function z(){var G=w.mt(Q,c,4);
c+=4;return G}function j(){var G=Q[c];c+=1;return G}function U(){var G=w.uv(Q,c);c+=2;return G}function i(){var G=w.K3(Q,c);
c+=4;return G}function b(){var G=w.fu(Q,c);c+=4;return G}function e(){var G=w.K3(Q,c);c+=8;return G}function k(){var G=w.Q0(Q,c);
c+=4;return G}function K(){var G=w.FL(Q,c);c+=8;return G}function g(){var G=w.uv(Q,c),q=w.IV(Q,c+2,G);
c+=2+G;return q}function R(){var G=w.K3(Q,c),q=w.IV(Q,c+4,G);c+=4+G;return q}function T(G){c=G;var q=[];
while(c!=0){var h=z();if(h!="#FT4"&&h!="#FT3"&&h!="#FT2")throw h;var r=e(),H=e(),o=e(),P=e(),O=e(),p=i(),C=i(),W=i(),J=U(),t=j(),Y={};
q.push(Y);for(var F=0;F<p;F++){var l=i(),m=j();if(m!=0&&m!=1&&m!=2)throw m;var B=[];if(m==0||m==1){var L=e(),A=e(),S=e(),M=i(),N=j(),s=i(),V=h!="#FT4"?0:i(),g8=null;
if(h=="#FAT"||h=="#FT2"){switch(N){case 1:N=1;break;case 2:N=65;break;case 3:N=129;break;case 4:N=193;
break;default:N=0;break}}if(m==0)g8=g();B=[L,A,S,N,g8]}Y["i"+l]=[m,B]}for(var F=0;F<J;F++){var n=U(),cQ=U(),hk=e(),eG=w.mt(Q,c,n);
c+=n}c=r}q.reverse();for(var ie=1;ie<q.length;ie++){var Y=q[ie],eN=q[ie]=JSON.parse(JSON.stringify(q[ie-1]));
for(var gr in Y){var ek=Y[gr];if(ek[0]==0)eN[gr]=ek;else if(ek[0]==1){ek[1][4]=eN[gr][1][4];eN[gr]=ek}else if(ek[0]==2)delete eN[gr]}}var jK=q.pop(),iE=[];
for(var gr in jK)iE.push(jK[gr][1]);iE.sort(function(e9,dm){return e9[0]-dm[0]});return iE}function D(G,q,h,r){while(c<Q.length){var H=j(),p=null;
if(H==0){if(r){var o=j();if(o!=2){var P=$()}if(o==0)c+=4;r=!1;continue}else{break}}var O=$();if(x)console.log("  ".repeat(q),H,H&127,O,G._type);
if(H>127)p=a(H,q,h);else p=I(H,q,h);if(x)console.log("  ".repeat(q),p);G[O]=p}}function a(G,q,h){var r=[];
G=G&127;if(G==43)c+=4;var H=i();if(G==50){var o=$(),P=U();if(P!=1)throw"e";for(var F=0;F<H;F++){var O={_status:"NotShared",_type:o};
r.push(O);var p=j();if(p!=1)throw p;D(O,q+1,h)}}else if(G==41){if(H>8)throw H;for(var F=0;F<H;F++)r.push((Q[c]>>>F&1)==1);
c++}else for(var F=0;F<H;F++){r.push(I(G,q,h,F!=0));if(G==42)G=2}return r}function I(G,q,h,r){var H=null;
if(G==49){H={};var o=j();if(o!=0){var P=i();if(h==null){H._id=P;H._status=["Shared","Link"][o-1]}if(h&&o==2)H=h[P];
if(o==1){if(h)h[P]=H;var O=j(),p=!1;if(O>1)throw O;H._type=$();if(x)console.log("  ".repeat(q),"new",H._type,O,c);
if(O==0){while(!0){var C=U();if(C!=0&&C!=1&&C!=2&&C!=3&&C!=4)throw C;if(Q[c]!=0){p=!0;break}var W=U();
if(W==512)break;var J=$();if(W==256)break}}D(H,q+1,h,p)}}}else if(G==50){H={_status:"NotShared"};if(j()==1){H._type=$();
c+=2;D(H,q+1,h)}}else if(G==1)H={type:"byte",value:j()};else if(G==2)H={type:"uint16",value:U()};else if(G==3)H={type:"uint32",value:i()};
else if(G==4)H={type:"uint64",value:e()};else if(G==7)H={type:"int32",value:b()};else if(G==8)H={type:"int64",value:e()};
else if(G==9)H={type:"float32",value:k()};else if(G==10)H={type:"float64",value:K()};else if(G==21)H={type:"Vec2i",value:[i(),i()]};
else if(G==23)H={type:"Vec4i",value:[i(),i(),i(),i()]};else if(G==33)H={type:"Vec4f",value:[k(),k(),k(),k()]};
else if(G==36)H={type:"Vec2",value:[K(),K()]};else if(G==38)H={type:"Vec4",value:[K(),K(),K(),K()]};
else if(G==40)H={type:"Vec6",value:[K(),K(),K(),K(),K(),K()]};else if(G==41)H={type:"bool",value:j()!=0};
else if(G==42)H={type:"Enum",value:i()};else if(G==43)H={type:"string",value:R()};else if(G==44){if(r!=!0)_=U();
H={type:"curv16",value:[K(),_==12?[j(),j(),j(),j()]:[i(),i()]]}}else if(G==45){var t=i();H={type:"buff",value:Q.slice(c,c+t)};
c+=t}else if(G==47){H={type:"uint32",value:i()}}else if(G==48){var Y=[],l=U();if(l!=1)throw l;while(!0){if(Q[c]==135){var m=a(j(),q+1,h),B=a(j(),q+1,h),L=a(j(),q+1,h);
Y.push([m,B,L])}else{var A=1;if(Q[c]==3){j();A=i()}for(var F=0;F<A;F++){if(j()!=41)throw"e";var P=j();
if(P!=0&&P!=1)throw P;if(j()!=172)throw"e";var S=i(),M=U(),N=[];Y.push(N);if(M!=18)throw M;if(S>4e3)throw S;
for(var s=0;s<S;s++)N.push([K(),K(),j(),j()])}}if(Q[c]==0){c++;break}}H={type:"curve",value:Y}}else if(G==51){H={type:"EmbeddedData"};
H[$()]=R()}else if(G==52)H={type:"uint32",value:i()};else if(G==56)H={type:"Color32",value:[j(),j(),j(),j()]};
else if(G==60)H={type:"ColorGRAY",value:[k(),k()]};else if(G==68)H={type:"ColorRGBA",value:[k(),k(),k(),k()]};
else if(G==72)H={type:"ColorCMYK",value:[k(),k(),k(),k(),k()]};else{throw G}return G==49||G==50||G==51?H:H.value}function f(G){var q=0,h=G.length;
for(var F=0;F<h;F++)G[F]=q=q+G[F]&255}function Z(G){Q=G;c=4;var q=i(),h=z();if(h!="nsrP")throw h;var h=z();
if(h!="#Inf")throw h;var r=e();y=e();var H=e(),o=e(),P=e(),O=i(),p=i(),h=z();if(h!="Prot")throw h;var O=i(),C=T(r),W={},J=Date.now();
for(var t=0;t<C.length;t++){var Y=C[t],l=Y[3],S=null;c=Y[0];var h=z();if(h!="#Fil")throw h;var m=l>>>5&1,B=l&3,L=l&192;
switch(L){case 64:L=1;m=0;break;case 128:L=2;break;case 192:L=3;break;default:L=0;m=0}var A=new Uint8Array(Q.buffer,c,Y[2]);
if(B==0)S=A;else if(B==1)S=pako.inflate(A);else if(B==2)S=ar.MJ.ID(A,Y[1]);else throw B;if(m==0){if(L==1)f(S);
if(L==2)throw"e"}else if(m==1){if(L==2)f(S);else throw L}else throw m;W[Y[4]]=S}return W}function v(G){var q=Z(new Uint8Array(G));
Q=q["doc.dat"];c=16;var h={};D(h,0,[]);return[q,h,y]}return{a5b:v}}();function jt(){}jt.s5=function(){function x(R,T){var D=Date.now(),a=gO.a5b(R),_=a[0],I=a[1],f=a[2],y=I.DocR,Z=y.DfSz,v=y.Chld;
if(v.length!=1)console.log(v);var G=v[0],q=G.SprB;v=G.Chld;T.m=~~q[2];T.e=~~q[3];T.buffer=d.R(T.m*T.e*4);
var h=[0,{}];for(var F=0;F<v.length;F++)z(v[F],T,_,new bI,h,0);T.cV(h[0]);console.log(Date.now()-D,"Document created");
D=Date.now()}function Q(R){return new bI(R[0],R[3],R[1],R[4],R[2],R[5])}function c(R,T){var D=T.Xfrm;
D=D?Q(D):new bI;D.concat(R);return D}function $(R){var T={0:"norm",1:"dark",2:"mul ",3:"idiv",196613:"lbrn",65538:"dkCl",4:"lite",5:"scrn",6:"div ",7:"lddg",65542:"lgCl",8:"over",9:"sLit",10:"hLit",11:"vLit",65551:"lLit",12:"pLit",13:"hMix",14:"diff",15:"smud",16:"fsub",262165:"fdiv",17:"hue ",18:"sat ",20:"colr",19:"lum "}[R];
return T?T:"norm"}function z(R,T,D,a,_,I){var f=R._type,y=R.Chld,Z=T.Xh();Z.gF(R.Desc==null||R.Desc==""?f=="Grup"?"Folder":"Layer":R.Desc);
Z.KW(R.Visi);Z.opacity=Math.round(255*R.Opac);if(R.FOpc!=1)Z.add.iOpa=Math.round(255*R.FOpc);var v=R.Blnd;
if(v!=null)Z.s3=$(v);var G=c(a,R),q=f=="ShpN"||f=="PCrv";if(y){T.B.push(T.x6());Z.add.lsct=hA.DJ;Z.s3="pass";
Z.H2=24;if(f=="ShpN"){var h=R.ShpB;Z.Zp(new gh(h[0]+G.DX,h[1]+G.ti,h[2]-h[0],h[3]-h[1]));_[0]++;Z.add.artb.Clr={t:"Objc",v:d.I.lV({Z:255,r:255,J:255})}}for(var F=0;
F<y.length;F++)z(y[F],T,D,G,_,I+1)}else if(f=="Rstr"||f=="ImgN"||f=="MRst"){var r=R.Bitm,H=r.Bckg,o=Date.now(),P;
if(H==null){P=e(r,D,_[1]);Z.rect=P[2].clone();Z.buffer=P[1].slice(0);Z.rect.x+=G.DX;Z.rect.y+=G.ti}if(H||G.c0()!=1){var O,p=0,C=0;
if(H){var W=D[H.Data],J=w.iK(W,"ataD")+4,t=w.K3(W,J);J+=4;O=W.slice(J,J+t)}else{p=Z.rect.x-G.DX;C=Z.rect.y-G.ti;
if(P[3]==null)P[3]=new Uint8Array(ar.pz("PNG").YU([[Z.buffer.buffer]],Z.rect.m,Z.rect.e));O=P[3].slice(0)}var Y=T.BQ(O,Z.getName(),0,0);
Y.H2=Z.H2;Y.opacity=Z.opacity;Z=Y;var l=new bI;l.translate(p,C);l.concat(G);var m=Z.rect.clone();m.x=m.y=0;
var B=d.A.Hg(m).j;d.A.i(B,l,B);Z.add.SoLd.Trnf=X.Y.TD(B);Z.add.SoLd.nonAffineTransform=X.Y.TD(B);Z.bx(T,!1)}}else if(f=="TxtA"||f=="TxtF"){Z.add.lnsr="rend";
Z.add.TySh=dU.Y7(0,0);Z.add.TySh.Iv=new gh(0,0,100,100);var L=R.TxtH.FrmB,A=1,S=1,M=Z.add.TySh.i=new bI,n=0;
M.translate(L[0],L[1]);M.concat(G);if(f=="TxtF"){var N=Math.atan2(-M.J,M.V);M.rotate(-N);A=M.V;S=M.xq;
M.xq=M.V=1;M.rotate(N)}var s=Z.add.TySh.HW,V=R.StSt,g8=V.Blok;if(g8.length!=1)throw"e";for(var cQ=0;
cQ<g8.length;cQ++){var hk=g8[cQ],eG=n,ie=0,eN=hk.Glyp.Utf8;if(eN==null)continue;eN=eN.replace(/\u2028/g,"\n");
eN=eN.replace(/\u2029/g,"\n");eN=eN.slice(0,eN.length-1);if(eN=="")continue;Z.gF(eN.slice(0,255));dU.U3(s,n,eN);
n+=eN.length;var gr=hk.GAtt.Runs,ek=hk.PAtt.Runs[0],jK=ek.Item.Ints[0];for(var iE=0;iE<gr.length;iE++){var e9=gr[iE],dm=e9.Indx,kD=e9.Item,gJ=kD.Objs,dR=dU.zl(s,eG,1);
dR.SW.Justification=jK==0?0:jK==1?2:1;dU.gD(dR,kD.DFnt.Post);dR.VA.FontSize=kD.Doub[0];for(var F=0;F<gJ.length;
F++){var fO=gJ[F];if(fO._type=="FDsc"){var ko=fO.FDeF;if(ko._type=="FilS"){var d8=b(ko.Colr);dR.VA.FillColor={Type:1,Values:[1,d8[0],d8[1],d8[2]]}}}}dU.G4(s,eG+ie,eG+Math.min(dm,eN.length),dR);
ie=dm}}dU.DY(s,1);dU.ei(s,[0,0,Math.round((L[2]-L[0])*A),Math.round((L[3]-L[1])*S*1.2)]);T.RS=!0}else if(q){Z.H2|=16;
var fj=Z.add.vstk=aF.XM.$H(!0),ja=Z.add.vmsk=j(R);d.o.Of(ja.$,G);if(R.BFFl){var eD=R.BFFl[0].FDeF,d3=eD._type;
if(d3=="FilS")Z.add.SoCo={classID:"null",Clr:i(eD.Colr)};else if(d3=="FilG"){var fP=Z.add.GdFl=JSON.parse(aF.lF[aF.order.indexOf("GrFl")]);
U(eD,fP)}else if(d3=="FilN"){Z.add.SoCo={classID:"null",Clr:{t:"Objc",v:d.I.lV({Z:0,r:0,J:0})}};fj.fillEnabled.v=!1}else console.log(d3)}if(R.LILn){var cR=R.LILn[0].LDeL,ex=cR.Wght;
if(ex!=0){fj.strokeEnabled.v=!0;fj.strokeStyleLineWidth.v.val=ex;var eD=R.LIFl[0].FDeF,d3=eD._type;if(d3=="FilS")fj.strokeStyleContent.v.Clr=i(eD.Colr);
else if(d3=="FilN")fj.strokeEnabled.v=!1}}Z.jz();Z.kT(T)}else console.log(f);var er=R.AdCh,cE=[];if(er)for(var F=0;
F<er.length;F++){var a7=er[F],dl=a7._type;if(dl=="ShpN"||dl=="PCrv"){var ja=Z.add.vmsk=j(a7),hl=c(G,a7);
d.o.Of(ja.$,hl);Z.jz();Z.kT(T)}else if(a7.AdjP){var f4=a7.AdjP,em=f4._type,e$={LevP:"levl",WhBP:"levl",SHiP:"curv",HSSP:"hue2",RecP:"hue2","B&WP":"blwh","B&CP":"brit",PosP:"post",VibP:"vibA",ExpP:"expA",ThrP:"thrs",CrvP:"curv"}[em];
if(e$==null){console.log(f4);continue}var iP=fK.Z5(e$,{});cE.push(iP);var b2=iP.v.Fltr.v;if(em=="LevP"){var k7=bV.Hb(b2,0);
k7[0]=f4.OutB*255;k7[1]=f4.OutW*255;bV.SU(b2,0,k7)}else if(em=="WhBP"){var k7=bV.Hb(b2,2);k7[4]=100+f4.WBTi*20;
bV.SU(b2,2,k7);var k7=bV.Hb(b2,3);k7[4]=100+f4.WBTi*200;bV.SU(b2,3,k7)}else if(em=="HSSP"){var k7=hu.Hb(b2,0);
k7[0]=Math.round(f4.HueA*256);k7[1]=Math.round(f4.SatA*256);k7[2]=Math.round(f4.LumA*256);hu.SU(b2,0,k7)}else if(em=="RecP"){b2.Clrz.v=!0;
var k7=hu.Hb(b2,0);k7[0]=Math.round(f4.RecH*100);k7[1]=Math.round(f4.RecS*100);k7[2]=Math.round(f4.RecL*100);
hu.SU(b2,0,k7)}else if(em=="B&CP"){b2.Brgh.v=Math.round(f4.Brig*100);b2.Cntr.v=Math.round(f4.Ctrs*100-100)}else if(em=="PosP"){b2.Lvls.v=f4.Post}else if(em=="VibP"){b2.vibrance.v=f4.Vibr-100;
b2.Strt.v=Math.round(f4.Satu*100)}else if(em=="ExpP"){b2.Exps.v=f4.Expo;b2.gammaCorrection.v=f4.Gamm/2.2}else if(em=="ThrP"){b2.Lvl.v=Math.round(f4.Thre*255)}else if(em=="CrvP"){var at=f4.Mast["Cnt "],ju=f4.Mast.Vals,k7=jq.Hb(b2,0),jL=k7[0];
for(var fJ=0;fJ<at;fJ++){var h6=k7[fJ]=JSON.parse(JSON.stringify(jL));h6.v.Hrzn.v=Math.round(ju[fJ]*255);
h6.v.Vrtc.v=Math.round(ju[4+fJ]*255)}jq.SU(b2,0,k7)}}else console.log(a7)}if(cE.length!=0&&Z.add.SoLd){Z.add.SoLd.filterFX=fK.xO();
T.C3({id:Z.add.SoLd.placed.v,rect:new gh,buffer:d.R(1),F:new eM.zM});Z.add.SoLd.filterFX.v.filterFXList.v=cE;
Z.bx(T,!1)}var iq=R.FiEf;if(iq&&iq.length!=0){var iI=Z.add.lmfx=JSON.parse(aF.default);for(var F=0;F<aF.order.length;
F++)iI[aF.mh[F]]={t:"VlLs",v:[]};for(var dM=0;dM<iq.length;dM++){var ik=iq[dM],jp=ik._type,eA={ColO:"SoFi",GrdO:"GrFl",Shad:"DrSh",InnS:"IrSh",OutG:"OrGl",InnG:"IrGl",Strk:"FrFX",PhgB:"ebbl",BevE:"ebbl"}[jp],fP=eA?JSON.parse(aF.lF[aF.order.indexOf(eA)]):null;
if(jp=="ColO"){fP.Clr=i(ik.Colr)}else if(jp=="GrdO"){U(ik.GrFl.FDeF,fP)}else if(jp=="Shad"||jp=="InnS"||jp=="OutG"||jp=="InnG"){fP.Clr=i(ik.Colr);
fP.blur.v.val=Math.round(ik.Radi/2.4);if(ik.Offs!=null){fP.Dstn.v.val=ik.Offs;fP.lagl.v.val=Math.round(180-ik.Angl*180/Math.PI);
fP.uglg.v=!1}}else if(jp=="Strk"){fP.Clr=i(ik.Colr);fP.Sz.v.val=Math.round(ik.Radi)}else if(jp=="PhgB"||jp=="BevE"){fP.blur.v.val=Math.round(ik.Radi);
if(jp=="BevE")fP.bvlS.v.BESl="PlEb"}else if(jp=="Gaus"){if(q&&ik.Enab){Z.add.vmsk.bS=ik.Radi/2.4;Z.add.vmsk.ha=!0;
Z.jz();Z.kT(T)}}if(eA){fP.enab.v=ik.Enab;if(fP.Md&&ik.BlnM!=null)fP.Md.v.BlnM=cq.DU($(ik.BlnM));if(fP.Opct&&ik.Opac!=null)fP.Opct.v.val=Math.round(ik.Opac*100);
var k8=aF.mh[aF.order.indexOf(eA)];iI[k8].v.unshift({t:"Objc",v:fP})}}}T.B.push(Z)}function j(R){var T=new eM.hn,D=R._type;
if(D=="PCrv"){var a=R.Crvs.Data,_=[],I=[];for(var F=0;F<a.length;F++){var f=a[F],y=f.length%3;if(y!=1){f=y==2?f[0][2]!=0?f.slice(0,f.length-1):f.slice(1):f.slice(1,f.length-1)}for(var Z=0;
Z<f.length;Z++){var v=f[Z],G=v[2];if(G!=0)_.push(Z==0?"M":"C");I.push(v[0],v[1])}}T.$=d.A.tf({j:I,G:_},!0)}else{var q=R.ShpB,h=R.Shpe,r=h._type,H=q[2]-q[0];
if(r=="ShpE"){T.$=d.o.JE.Sl(q[0],q[1],q[2]-q[0],q[3]-q[1])}else if(r=="ShNR"){var o=[0,0,0,0];if(h.CTyp){o=h.ShCR.slice(0);
for(var F=0;F<4;F++)o[F]*=q[2]-q[0]}T.$=d.o.JE.Rect(q[0],q[1],q[2]-q[0],q[3]-q[1],o)}else if(r=="ShpT"){T.$=d.A.tf({G:["M","L","L","Z"],j:[q[0],q[3],q[2],q[3],q[0]+H*.5,q[1]]},!0)}else if(r=="ShTz"){T.$=d.A.tf({G:["M","L","L","L","Z"],j:[q[0]+H*h.PosL,q[1],q[0]+H*h.PosR,q[1],q[2],q[3],q[0],q[3]]},!0)}else{console.log("--",r);
T.$=d.o.JE.Rect(q[0],q[1],q[2]-q[0],q[3]-q[1],[0,0,0,0])}}return T}function U(R,T){var D=R.Grad,a=D.Cols;
T.Type.v.GrdT=R.Type==0?"Lnr":"Rdl";var _=[];for(var F=0;F<a.length;F++){var I=b(a[F]);_.push([D.Posn[F][0],I])}T.Grad.v.Intr.v=0;
d.I.q1(_,T.Grad.v);var f=D.Posn,y=new bC(f[0][0],f[0][1]),Z=new bC(f[1][0],f[1][1]);if(R.Type==0)y=new bC((y.x+Z.x)/2,(y.y+Z.y)/2);
d.I.vO(y,Z,new gh(0,0,1,1),T)}function i(R){var T=b(R);return{t:"Objc",v:d.I.lV({Z:T[0]*255,r:T[1]*255,J:T[2]*255})}}function b(R){var T=R._col,D=R._type;
if(D=="HSLA"){var a=d.qs(T[0],T[1],T[2]);return[a.Z,a.r,a.J,T[3]]}else if(D=="RGBA")return T;else if(D=="CMYK")return d.i2(T);
else if(D=="GRAY")return[T[0],T[1],T[2]];else{console.log(T);throw D}}function e(R,T,D){var a=R.Frmt,o="";
if(a!=0&&a!=1&&a!=4&&a!=6)throw a;var _=R.BmpW,I=R.BmpH,f=a==1?128:256,y=a==4?5:a==0||a==1?4:1,Z=Math.ceil(_/f),v=Math.ceil(I/256),G=new gh(0,0,Z,v),q=new gh;
for(var F=0;F<y;F++){var h=new Uint8Array(R["Sta"+(F+1)]),r=d.qQ(h,G);q=q.iO(r)}var H=[];for(var F=0;
F<y;F++){var h=new Uint8Array(R["Sta"+(F+1)]),P=d.R(q.P());d.L2(h,G,P,q);H[F]=[];for(var O=0;O<P.length;
O++)H[F][O]=P[O];o+=JSON.stringify(H[F])+","+JSON.stringify(R["Idx"+(F+1)])+","}if(D[o]==null){var p=q.m*f,C=q.e*256,W=new Array(y);
for(var F=0;F<y;F++){var h=W[F]=new Uint8Array(p*C);k(h,R["Idx"+(F+1)],H[F],T,p,C,f)}var J=d.R(p*C*4);
if(a==0||a==1)d.li({Z:W[0],r:W[1],J:W[2],V:W[3]},J);else if(a==4){for(var F=0;F<W[0].length;F++){var t=F*4,Y=W[0][F]*(1/255),l=W[1][F]*(1/255),m=W[2][F]*(1/255),B=W[3][F]*(1/255),L=UDOC.C.cmykToRgb([Y,l,m,B]);
J[t]=L[0]*255;J[t+1]=L[1]*255;J[t+2]=L[2]*255;J[t+3]=W[4][F]}}else{J.fill(255);d.ZM(W[0],J)}var A=new gh(0,0,p,C),S={buffer:J,rect:A};
d.HT(S);D[o]=[S.rect,S.buffer]}var r=D[o][2]=D[o][0].clone();r.x+=q.x*f;r.y+=q.y*256;return D[o]}function k(R,T,D,a,_,I,f){var y=0,Z=_>>>(f==256?8:7),v=I>>>8;
for(var G=0;G<v;G++)for(var q=0;q<Z;q++){var h=q*f,r=G*256,H=G*Z+q,o=r*_+h,P=D[H];if(P<=1)K(R,o,0,_,f,256);
else if(P==2)K(R,o,4294967295,_,f,256);else if(P==4){var O=T[y];y++;var p=a[O.Data.DatI],C=O.Rect;if(C==null)C=[0,0,f,256];
K(R,o,0,_,f,256);g(R,(r+C[1])*_+h+C[0],p,C[1]*f+C[0],_,f,C[2]-C[0],C[3]-C[1])}else console.log(P)}}function K(R,T,D,a,_,I){var f=T+a*I;
for(;T<f;T+=a){var y=T+_;for(var Z=T;Z<y;Z++){R[Z]=D}}}function g(R,T,D,a,_,I,f,y){var Z=T+_*y,v=a+I*y;
for(;T<Z&&a<v;T+=_,a+=I){for(var F=0;F<f;F++)R[T+F]=D[a+F]}}return x}();function bp(){}bp.s5=function(x,Q){var c=bp,$=cx.parse(x),j=0;
if($.pages.length>1)console.log($.pages.length,"pages");var z=[],U=new gh;for(var i=0;i<$.pages.length;
i++){var b=$.pages[i],e=b.layers,k=c.pA(e,i),g=!1;if(k.P()>8e3*8e3||k.m>3e4||k.e>3e4){c.a26(e,!0);var K=c.pA(e,i);
if(K.P()>=k.P())c.a26(e,!1)}k=c.pA(e,i);for(var R=0;R<e.length;R++){var T=e[R];if(c.zT(T)=="artboard")g=!0}if(!g){console.log("no artboard");
var D={};for(var a in b)D[a]=b[a];D._class="group";b.layers=[D]}z.push(k.clone());if(k._6())continue;
k.x=0;k.y=j;j+=k.e+200;U=U.iO(k)}var _={};if($.foreignSymbols)for(var F=0;F<$.foreignSymbols.length;
F++){var I=$.foreignSymbols[F].symbolMaster;_[I.symbolID]={Xi:I}}c.akF($.pages,_,Q);for(var f in _){var T=_[f].Xi,y=c.ajj(T.layers)}var Z=bp.ub(U,8192*8192);
Q.RS=!0;Q.m=Math.round(U.m/Z);Q.e=Math.round(U.e/Z);Q.buffer=d.R(Q.m*Q.e*4);Q.cV($.pages[0].layers.length);
Q.IC={};Q.lJ=[];j=0;for(var i=0;i<$.pages.length;i++){var v=$.pages[i],k=z[i],G=new bI(Z,0,0,Z,k.x,k.y-j);
c.Po(v.layers,Q,G,$,_,{},[]);j+=k.e+200}delete Q.IC;delete Q.lJ;if(Z!=1)alert("File scaled down "+Z+"x");
Q.a31()};bp.af6=0;bp.zT=function(x){return x._class?x._class:x.$class};bp.ub=function(x,Q){var c=1;while(Math.round(x.m/c)*Math.round(x.e/c)>Q||Math.max(Math.round(x.m/c),Math.round(x.e/c))>3e4)c++;
if(c!=1&&!window.confirm("Your image is quite large ("+x.m+" x "+x.e+" px).\n"+"Press OK to scale it down "+c+"x, or Cancel to keep the size."))c=1;
return c};bp.pA=function(x,Q){var c=[],$=bp;for(var z=0;z<x.length;z++){var j=x[z],U=$.Ky(j.frame);if(Q==0||$.zT(j)=="artboard")c.push(U)}return d.rect.kV(c)};
bp.a26=function(x,Q){var c=[],$=bp;for(var z=0;z<x.length;z++){var j=x[z],U=$.Ky(j.frame);U.m+=150;U.e+=150;
c.push(U)}var i=d.rect.kV(c);d.rect.aj4(c,Q);var b=d.rect.kV(c);if(b.P()*1.5<i.P()||i.m>3e4&&b.m<=3e4||i.e>3e4&&b.e<=3e4){alert("Re-arranging artboards");
for(var z=0;z<x.length;z++){var e=c[z],j=x[z],k=j.frame;k.x=e.x;k.y=e.y}}};bp.akF=function(x,Q,c){if(x==null)return;
var $=bp;for(var z=0;z<x.length;z++){var j=x[z],U=$.zT(j);if(["page","artboard","group"].indexOf(U)!=-1)$.akF(j.layers,Q,c);
else if(U=="symbolMaster")Q[j.symbolID]={Xi:j}}};bp.ajj=function(x){var Q=bp;for(var c=0;c<x.length;
c++){var $=x[c],z=Q.zT($),j=null;if(["page","artboard","group"].indexOf(z)!=-1)j=Q.ajj($.layers);if(z=="symbolMaster"||z=="symbolInstance")j=$;
if(j!=null)return j}return null};bp.Po=function(x,Q,c,$,z,j,U){if(x==null)return;var i=bp,b=[];for(var e=0;
e<x.length;e++){var k=x[e],K=k.frame?i.Ky(k.frame):null,g=k.style,_="",G=null,q=!1;if(g==null){console.log("no styles")}var R=i.aiu(k,c),T=i.zT(k),D=T=="shapeGroup"||T=="shapePath"||T=="rectangle"||T=="oval"||T=="triangle"||T=="polygon",a=["page","artboard","group"].indexOf(T)!=-1;
if(T=="shapeGroup"){for(var F=0;F<k.layers.length;F++)if(i.zT(k.layers[F])=="shapeGroup")a=!0}var I=k.exportOptions;
if(I){var f=I.exportFormats;if(f==null)f=I.sizes;if(T!="artboard"&&(f&&f.length!=0)){var y=f[0].scale}}var Z=Q.Xh();
Z.KW(k.isVisible);var v=k.name;if(!(typeof v=="string"))v=T;Z.gF(_+v.slice(0,250));if(g!=null)G=i.a6B($,Q,g,K,R,Z.getName(),D||T=="artboard"||a);
if(T=="rectangle"&&g&&g.fills&&g.fills[0]){var h=g.fills[0];if(h.fillType==4&&h.patternFillType>1&&h.image!=null)q=!0}if(k.shouldBreakMaskChain){while(b.length!=0)i.awj(b.pop(),Q)}if(a){Z.add.lsct=k.layerListExpandedType==2?hA.DJ:hA.H3;
Z.s3="pass";Z.H2=24;Z.KW(k.isVisible);Q.B.push(Q.x6());if(T=="artboard"){var r=K.clone(),H=R.c0();r.x=-Math.floor(R.DX/H);
r.y=-Math.floor(R.ti/H);r.m=Math.floor(r.m/H);r.e=Math.floor(r.e/H);Z.Zp(r);var o=k.backgroundColor,P=o?{Z:255*o.red,r:255*o.green,J:255*o.blue}:{Z:255,r:255,J:255};
Z.add.artb.Clr={t:"Objc",v:d.I.lV(P)};Z.add.artb.artboardBackgroundType={t:"long",v:4}}i.Po(k.layers,Q,R,$,z,j,U)}else if(D&&!q){var O=G!=null&&G.frameFXMulti.v.length==1;
Z.add.vmsk=new eM.hn;Z.add.vstk=aF.XM.$H(!0,O);var p=g?g.fills:null,C=g?i.apm($,p,K,R,Z.getName(),Q,i.tQ(U,k.do_objectID+"_image")):[];
if(C.length==0){if(O)Z.add.vstk.fillEnabled.v=!1;else Z.add.iOpa=0;Z.add.SoCo={classID:"null",Clr:{t:"Objc",v:d.I.lV({Z:0,r:0,J:0})}}}else{var W=C[0],J=null,t=null;
if(W.type=="SoFi"){J="SoCo";t=aF.ZS}if(W.type=="GrFl"){J="GdFl";t=aF.ul}if(W.type=="patternFill"){J="PtFl";
t=aF.qK}if(J!=null){Z.add[J]={classID:"null"};for(var F=0;F<t.length;F++){var Y=t[F];Z.add[J][Y]=W.b.v[Y]}var l=W.b.v.Opct.v.val;
if(O&&l==0)Z.add.vstk.fillEnabled.v=!1;else Z.add.iOpa=Math.round(255*l/100)}}Z.H2|=16;Z.add.vmsk.$=i.xw(k.layers?k.layers:[k],k.layers?R:c);
var m=g?g.blur:null;if(m&&m.isEnabled&&m.type<=1)Z.add.vmsk.bS=m.radius;if(Z.add.vmsk.$.length==2){console.log("shape with no content:",Z.getName())}if(O){var B=G.frameFXMulti.v[0].v,L=Z.add.vstk,A=g.borders[0];
G.frameFXMulti.v=[];en.aDa(B,L);var S=g.borderOptions,M=g.miterLimit;if(S)aF.XM.write(L,{lcap:S.lineCapStyle,ljoin:S.lineJoinStyle,dash:S.dashPattern,mlimit:M},1)}Z.jz();
Z.kT(Q)}else if(T=="bitmap"||q){if(!q&&k.image==null)continue;var N=q?g.fills[0]:null,s=q?N.image.bdata:k.image.bdata,V=Q.BQ(s,Z.getName(),0,0);
V.H2=Z.H2;Z=V;var m=g?g.blur:null,g8=g?g.colorControls:null;if(m||g8){Z.add.SoLd.filterFX=fK.xO();Q.C3({id:Z.add.SoLd.placed.v,rect:new gh,buffer:d.R(1),F:new eM.zM});
var p=Z.add.SoLd.filterFX.v.filterFXList.v;if(m){var n=fK.Z5("GsnB",{});n.v.enab.v=m.isEnabled;n.v.Fltr.v.Rds.v.val=m.radius;
p.push(n)}if(g8){var cQ=g8.brightness,hk=g8.contrast,eG=g8.hue,ie=g8.saturation;if(eG!=0||ie!=1){var n=fK.Z5("hue2",{});
n.v.enab.v=g8.isEnabled;hu.SU(n.v.Fltr.v,0,[Math.round(eG*180/Math.PI),Math.round((ie-1)*100),0]);p.push(n)}if(cQ!=0||hk!=1){var n=fK.Z5("brit",{});
n.v.enab.v=g8.isEnabled;hk=hk-1;if(hk>0)hk/=2;var eN=n.v.Fltr.v;eN.Brgh.v=Math.round(cQ*255);eN.Cntr.v=Math.round(hk*255);
eN.useLegacy.v=!0;p.push(n)}}}if(q){var gr=N.patternFillType;if(gr==3){var ek=Z.rect.m/Z.rect.e,jK=K.m/K.e;
if(ek<jK){R.translate(-(K.m*(1-ek/jK))/2,0);R.scale(jK/ek,1)}else{R.translate(0,-(K.e*(1-jK/ek))/2);
R.scale(1,ek/jK)}}}K.x=K.y=0;var iE=d.A.Hg(K).j;R.HQ();d.A.i(iE,R,iE);Z.add.SoLd.Trnf=X.Y.TD(iE);Z.add.SoLd.nonAffineTransform=X.Y.TD(iE);
Z.bx(Q,!1)}else if(T=="text"){if(k.attributedString==null)continue;var e9=R.clone(),dm,kD,d8=0;e9.HQ();
e9.V=e9.xq=Math.min(e9.V,e9.xq);Z.add.lnsr="rend";Z.add.TySh=dU.Y7(0,0);Z.add.TySh.Iv=new gh(0,0,K.m,K.e);
Z.add.TySh.i=e9;var gJ=k.attributedString;if(gJ.archivedAttributedString)gJ=gJ.archivedAttributedString;
var dR=gJ.NSString;if(dR==null)dR=gJ.string;if(dR==null)dR="";if(dR["NS.string"])dR=dR["NS.string"];
if(j[k.do_objectID]!=null)dR=j[k.do_objectID];var fO=i.tQ(U,k.do_objectID+"_stringValue");if(fO)dR=fO.value;
if(gJ.attributes!=null){dm=[];kD=[];var ko=gJ.attributes;for(var F=0;F<ko.length;F++){dm.push(ko[F].length,F);
kD.push(ko[F].attributes)}}else if(gJ.NSAttributeInfo==null){dm=[dR.length,0];kD=[gJ.NSAttributes]}else{dm=gJ.NSAttributeInfo["NS.data"];
kD=gJ.NSAttributes;dm=bp.a2Z(dm,kD)}for(var F=0;F<dm.length;F+=2)d8+=dm[F];if(d8!=dR.length){while(d8>dR.length){dm[dm.length-2]--;
d8--;if(dm[dm.length-2]==0){dm.pop();dm.pop()}}dm[dm.length-2]+=dR.length-d8}dR=dR.replace(/\u2028/g,"\n");
dR=dR.replace(/\u2029/g,"\n");dR=dR.replace(/\r/g,"\n");var fj=Z.add.TySh.HW;dU.U3(fj,0,dR);if(dR!=""){var ja=k.textBehaviour,eD=g.textStyle,fP=eD?eD.verticalAlignment:0,jE=i.arF(fj,dm,kD,dR),H=e9.c0(),cR=dU.zl(fj,0,1),dl=0;
if(cR.VA.Font){var er=cR._t[cR.VA.Font].Name;if(er=="FontAwesome"||er=="Ionicons")jE*=.87}var a7=cR.VA.AutoLeading?0:cR.VA.Leading*.6,hl=Math.max(jE,a7)*H,f4=K.m,em=K.e;
if(ja==0){dU.DY(fj,0);var e$=dU.mp(cR.SW);if(e$==1)dl=f4*H;if(e$==2)dl=f4*H*.5;if(fP==0)hl*=1;else hl*=.9}else{dU.DY(fj,1);
dU.ei(fj,[0,0,Math.round(f4),Math.round(em)]);if(ja==2&&fP==0)hl=hl*.2;else if(ja==2&&fP==1){hl=H*.5*(em-cR.VA.FontSize)}else if(ja==1&&fP==0)hl=hl*.2;
else hl=hl*.35}Z.add.TySh.i.translate(dl,hl)}}else if(T=="symbolInstance"||T=="symbolMaster"){var iP=k.symbolID;
if(j[k.do_objectID])iP=j[k.do_objectID].symbolID;var b2=i.tQ(U,k.do_objectID+"_symbolID");if(b2)iP=b2.value;
if(iP=="")continue;var k7={};for(var Y in j)k7[Y]=j[Y];if(k.overrides)for(var Y in k.overrides)k7[Y]=k.overrides[Y];
var at=U.slice(0);if(k.overrideValues)at=at.concat(k.overrideValues);var ju=z[iP];if(ju==null){console.log("Unknown master master",k.symbolID);
continue}var jL=bp.Ky(ju.Xi.frame),fJ=jL.m/K.m,h6=jL.e/K.e,iq=R.clone();iq.scale(fJ,h6);Z.add.lsct=hA.H3;
Z.s3="pass";Z.H2=24;Z.KW(k.isVisible);Q.B.push(Q.x6());var iI=ju.Xi;if(Q.lJ.indexOf(iI)==-1){Q.lJ.push(iI);
i.Po(iI.layers,Q,iq,$,z,k7,at);Q.lJ.pop()}}else if(T=="slice"){console.log("slice layers are ignored by now");
continue}else{console.log("unknown layer type: "+T,k);continue}if(g&&g.contextSettings){var dM=g.contextSettings,ik=dM.blendMode;
if(ik<i.Pi.length){Z.s3=cq.X$[cq.hg.indexOf(i.Pi[ik])];if(a&&Z.s3=="norm")Z.s3="pass"}Z.opacity=Math.round(Z.opacity*dM.opacity)}if(G!=null){Z.add.lmfx=G}Q.B.push(Z);
if(k.hasClippingMask&&x.length>1){b.push(Z);Q.B.push(Q.x6())}}while(b.length!=0)i.awj(b.pop(),Q)};bp.tQ=function(x,Q){for(var F=0;
F<x.length;F++)if(x[F].overrideName.startsWith(Q))return x[F]};bp.a2Z=function(x,Q){var c=0,$=[];while(c+1<x.length){var z=x[c];
c++;if(z>127){z+=128*(x[c]-1);c++;if(x[c-1]>127){z+=128*(x[c]-1);c++}}var j=x[c];c++;$.push(z,j)}return $};
bp.arF=function(x,Q,c,$){var z=bp,j=0,k=0,K=0;for(var F=0;F<$.length;F++){var U=$.charCodeAt(F),i=1473<=U&&U<=1479||1488<=U&&U<=1514||1520<=U&&U<=1524,b=1569<=U&&U<=1594||1600<=U&&U<=1749;
if(i||b)j++}var e=j>$.length/2;for(var F=0;F<Q.length;F+=2){var g=Q[F],Z=14,v="DejaVuSans";if(g==0)continue;
var R=Q[F+1],T=c[R],D=dU.zl(x,k,k+g-1),a=T.NSColor;if(a==null){var a=T.MSAttributedStringColorDictionaryAttribute;
if(a==null)a=T.MSAttributedStringColorAttribute;if(a==null)a="0 0 0";else a=[a.red,a.green,a.blue].join(" ")}else if(z.zT(a)=="MSArchivedColor")a=a.dr+" "+a.dg+" "+a.db;
else if(a.NSRGB){a=a.NSRGB;a=w.mt(a,0,a.length-1)}else if(a.NSCMYK){a=a.NSCMYK;a=w.mt(a,0,a.length-1);
a=a.split(" ").map(parseFloat);var _=1-a[0],I=1-a[1],f=1-a[2],y=1-a[3];a=_*y+" "+I*y+" "+f*y}else if(a.NSWhite){a="1 1 1"}a=a.split(" ");
D.VA.FillColor={Type:1,Values:[1,parseFloat(a[0]),parseFloat(a[1]),parseFloat(a[2])]};var G=T.MSAttributedStringFontAttribute;
if(T.NSFont){Z=T.NSFont.NSSize;v=T.NSFont.NSName}else if(G){if(G.attributes){G=G.attributes;Z=G.size;
v=G.name}else{var q=G.NSFontDescriptorAttributes;if(q==null)q=G.UIFontDescriptorAttributes;G=q;Z=G.NSFontSizeAttribute;
v=G.NSFontNameAttribute}if(v==null)v="DejaVuSans"}var K=Math.max(K,Z);D.VA.FontSize=Math.round(Z);dU.gD(D,v);
var h=T.NSKern;if(h==null)h=T.kerning;if(h!=null)D.VA.Tracking=Math.round(1e3*h/Z);if(T.NSUnderline!=null)D.VA.Underline=T.NSUnderline>0;
var r=T.NSStrikethrough;if(r==null)r=T.strikethroughStyle;if(r!=null)D.VA.Strikethrough=r>0;if(T.MSAttributedStringTextTransformAttribute==1)D.VA.FontCaps=2;
var H=T.NSParagraphStyle;if(H==null)H=T.paragraphStyle;if(H){var o=H.paragraphSpacing;if(o!=null){D.SW.SpaceAfter=o}var P=H.NSAlignment;
if(P==null)P=H.alignment;if(P!=null){var O=0;if(!1){}else if(P==1)O=1;else if(P==2)O=2;else if(P==4)O=0;
else{O=P;console.log("unknown align",P)}if(e&&O<2)O=1-O;D.SW.Justification=O}var p=H.NSMinLineHeight;
if(p==null)p=H.minimumLineHeight;if(p!=null){D.VA.AutoLeading=!1;D.VA.Leading=p}}D.SW._Direction=e?1:0;
dU.G4(x,k,k+g,D);k+=g}return K};bp.a6B=function(x,Q,c,$,z,j,U){var i=bp,b=JSON.parse(aF.default),e=!1;
for(var F=0;F<aF.order.length;F++)b[aF.mh[F]]={t:"VlLs",v:[]};var k=c.fills,K=i.apm(x,k,$,z,j,Q);for(var g=0;
g<2;g++){var R=c[["shadows","innerShadows"][g]];if(R==null)continue;var T=["DrSh","IrSh"][g],D=aF.mh[aF.order.indexOf(T)];
for(var F=0;F<R.length;F++){var a=R[F];if(!a.isEnabled)continue;var _=a.contextSettings;if(_&&_.opacity==0||a.color.alpha==0)continue;
var I=JSON.parse(aF.lF[aF.order.indexOf(T)]);b[D].v.unshift({t:"Objc",v:I});e=!0;I.Clr.v=i.zH(a.color);
I.blur.v.val=Math.round(a.blurRadius/z.c0());var f=z.clone();f.DX=f.ti=0;f.HQ();var y=f.RE(new bC(a.offsetX,a.offsetY)),Z=Math.sqrt(y.x*y.x+y.y*y.y);
I.Dstn.v.val=Math.round(Z);I.lagl.v.val=Math.round(Math.atan2(y.y,-y.x)*(180/Math.PI));if(I.layerConceals)I.layerConceals.v=K.length!=0;
i.wg(a,I)}}var v=c.borders;if(v!=null&&(K.length==0||c.blur==null||!c.blur.isEnabled))for(var F=0;F<v.length;
F++){var G=v[F];if(!G.isEnabled)continue;var I=JSON.parse(aF.lF[aF.order.indexOf("FrFX")]),D=aF.mh[aF.order.indexOf("FrFX")];
b[D].v.unshift({t:"Objc",v:I});e=!0;I.Clr.v=i.zH(G.color);if(G.fillType!=0&&G.gradient){var q=i.a5r(G.gradient,$,z,j),h=["Type","Angl","Ofst","Scl"];
for(var F=0;F<h.length;F++)I[h[F]]=q[h[F]];I.Grad.v=q.Grad.v;I.PntT.v.FrFl="GrFl"}I.Sz.v.val=Math.round(G.thickness/z.c0());
I.Styl.v.FStl=["CtrF","InsF","OutF"][G.position];i.wg(G,I)}for(var F=U?1:0;F<K.length;F++){var r=K[F],D=aF.mh[aF.order.indexOf(r.type)];
b[D].v.unshift(r.b);e=!0}return e?b:null};bp.apm=function(x,Q,c,$,z,j,U){if(Q==null)return[];var i=bp,b=[];
for(var F=0;F<Q.length;F++)if(Q[F].isEnabled)b.push(Q[F]);Q=b;var e=[];for(var F=0;F<Q.length;F++){var k=Q[F],K=null,g=null;
if(k.fillType==0){K="SoFi";var R=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]);g={t:"Objc",v:R};g.v.Clr.v=i.zH(k.color)}else if(k.fillType==1){K="GrFl";
g={t:"Objc",v:i.a5r(k.gradient,c,$,z)}}else if(k.fillType==4&&k.image!=null){var T=k.image;if(U)T=U.value;
var D=ar.HB(T.bdata.buffer);if(D=="fpng")D="png";if(D!=null&&D!="pdf"&&D!="eps"){var a,Z=0,v=0,G=0;if(j.IC[T.key])a=j.IC[T.key];
else{var _={data:new ArrayBuffer(4),K$:new gh(0,0,1,1)};try{_=ar.pz(D).fk(T.bdata)[0]}catch(dQ){}a={};
a.id=hf.KN()+"-d71c-11e5-b1ae-a548a96e5f9f";a.name="someImage";a.GD=[new Uint8Array(_.data),_.K$];j.uh(a);
j.IC[T.key]=a}var I=a.GD[1],R=JSON.parse(aF.lF[aF.order.indexOf("patternFill")]);K="patternFill";g={t:"Objc",v:R};
var f=k.patternFillType,y=k.patternTileScale;R.Algn.v=!0;R.Ptrn.v.Idnt.v=a.id;if(f==0){Z=y*I.m/Math.min(I.m,I.e);
v=-$.DX;G=-$.ti}else{Z=Math.max(c.m/I.m,c.e/I.e);v=-$.DX-(I.m*Z-c.m)/2;G=-$.ti-(I.e*Z-c.e)/2}R.Scl.v.val=100*Z*(1/$.c0());
R.phase.v.Hrzn.v=Math.round(v/$.c0());R.phase.v.Vrtc.v=Math.round(G/$.c0())}}else if(k.fillType==5){console.log("fill type Noise not supported yet")}else console.log("unknown fill type",k.fillType);
if(K!=null){i.wg(k,g.v);e.push({type:K,b:g})}}return e};bp.a4R=function(x){var Q=bp,c=new gh(0,0,1,1);
x=x.slice(0);while(!0){var $=!1;for(var F=0;F<x.length-1;F++){var z=x[F],j=x[F+1],U=null,i=z.contextSettings;
if(z.fillType==0&&(i==null||i.opacity==1&&i.blendMode==0)&&z.color.alpha==1){var b="norm",e=1,i=j.contextSettings;
if(i){e=i.opacity;b=cq.Rg(Q.Pi[i.blendMode])}if(j.fillType==0){U=JSON.parse(JSON.stringify(j));Q.ax_(U.color,z.color,U.color,c,b,e)}if(j.fillType==1){U=JSON.parse(JSON.stringify(j));
var k=U.gradient.stops;for(var K=0;K<k.length;K++)Q.ax_(k[K].color,z.color,k[K].color,c,b,e)}if(U!=null&&U.contextSettings){var i=U.contextSettings;
i.opacity=1;i.blendMode=0}}if(U!=null){x.splice(F,0,U);$=!0;break}}if(!$||x.length<2)break}return x};
bp.ax_=function(x,Q,c,$,z,j){var U=bp,i=d.R(4);U.aaO(x,i);var b=d.R(4);U.aaO(Q,b);d.l.UY(z,i,$,b,$,$,j);
U.al6(b,c)};bp.aaO=function(x,Q){Q[0]=255*x.red;Q[1]=255*x.green;Q[2]=255*x.blue;Q[3]=255*x.alpha};bp.al6=function(x,Q){Q.red=x[0]/255;
Q.green=x[1]/255;Q.blue=x[2]/255;Q.alpha=x[3]/255};bp.awj=function(x,Q){x=x.clone();x.H2=24;x.gF("Mask by "+x.getName());
Q.B.push(x);x.add.lsct=hA.DJ;x.add.lyid=Q.nQ();delete x.add.lmfx;delete x.add.SoCo;delete x.add.GdFl;
delete x.add.PtFl;delete x.add.iOpa;if(x.add.vmsk)x.add.vmsk.ha=!0;x.jz();x.kT(Q);if((x.H2&16)==16)x.H2-=16;
if((x.H2&2)==2)x.H2-=2;x.s3="pass";x.opacity=255};bp.Pi="Nrml Drkn Mltp CBrn Lghn Scrn CDdg Ovrl SftL HrdL Dfrn Xclu H Strt Clr Lmns linearBurn linearDodge".split(" ");
bp.a5r=function(x,Q,c,$){c=c.clone();c.HQ();c.DX=c.ti=0;var z=c.c0(),g=0,R=0;c.scale(1/z,1/z);var j=bp,U=JSON.parse(aF.lF[aF.order.indexOf("GrFl")]),i=U.Grad.v;
i.Intr.v=0;if(x==null)return U;var b=x.gradientType,e=j.S2(x.from),k=j.S2(x.to);e.offset(-.5,-.5);k.offset(-.5,-.5);
e=c.RE(e);k=c.RE(k);var K=Math.atan2(-(k.y-e.y),k.x-e.x);U.Type.v.GrdT=["Lnr","Rdl","Angl"][b];U.Scl.v.val=100*bC.Xc(e,k);
if(b==0){U.Angl.v.val=180/Math.PI*K;U.Scl.v.val=100*bC.Xc(e,k);g=(e.x+k.x)/2;R=(e.y+k.y)/2}if(b==1){U.Scl.v.val=200*bC.Xc(e,k);
g=e.x;R=e.y}if(b==2){U.Angl.v.val=180/Math.PI*(K-Math.PI/2)}var T=U.Ofst.v;T.Hrzn.v.val=g*100;T.Vrtc.v.val=R*100;
var D=[];for(var F=0;F<x.stops.length;F++){var a=x.stops[F],_=a.color;D.push([a.position,_?[_.red,_.green,_.blue]:[0,0,0],_.alpha])}d.I.q1(D,i);
return U};bp.wg=function(x,Q){var c=bp,$=1,z=x.contextSettings;if(z!=null){Q.Md.v.BlnM=c.Pi[z.blendMode];
$*=z.opacity}else Q.Md.v.BlnM=c.Pi[0];Q.enab.v=x.isEnabled;if(Q.uglg!=null)Q.uglg.v=!1;if(x.color!=null)$*=x.color.alpha;
Q.Opct.v.val=Math.round($*100)};bp.zH=function(x){return d.I.lV(x?{Z:x.red*255,r:x.green*255,J:x.blue*255}:{Z:0,r:0,J:0})};
bp.xw=function(x,Q){var c=bp,$=[{type:6},{type:8,all:0}];for(var z=0;z<x.length;z++){var j=x[z],U=j.booleanOperation,i=0,b=j._class,T=!1;
if(b=="group"||b=="text"||b=="symbolInstance"||b=="slice"){console.log(b+" inside ShapeGroup");continue}if(U==-1)i=0;
else if(U==0)i=1;else if(U==1)i=2;else if(U==2)i=3;else if(U==3)i=0;if(z==0)i=1;var e=bp.Ky(j.frame),k=c.aiu(j,Q),K=j.path?j.path:j,g=[{type:0,length:0,Kp:i,YS:2,kO:0,QQ:0}],R=K.points;
for(var F=0;F<R.length;F++){var D=R[F],a=c.S2(D.curveTo),_=c.S2(D.point),I=c.S2(D.curveFrom);T=T||D.hasCurveFrom&&!I.HM(_)||D.hasCurveTo&&!a.HM(_)}var f=[];
if(!T){var y=[],jF=R.length;if(jF==0)continue;for(var F=0;F<jF;F++){f[F]=R[F].cornerRadius;var D=c.S2(R[F].point);
y.push(D.x,D.y)}k.scale(1/e.m,1/e.e);k.HQ();d.A.i(y,k,y);g=d.o.JE.vf(y,f).slice(2);g[0].Kp=i}else{var Z=R.length;
g[0].length=Z;for(var F=0;F<Z;F++){var D=R[F],v=D.curveMode,G=c.S2(D.point);g[1+F]={type:v==2||v==4?1:2,Hw:D.hasCurveTo?c.S2(D.curveTo):G.clone(),L:G,Im:D.hasCurveFrom?c.S2(D.curveFrom):G.clone()}}k.scale(1/e.m,1/e.e);
k.HQ();d.o.Of(g,k);var f=[];for(var F=0;F<Z;F++){var D=R[F],v=D.curveMode,q=D.cornerRadius;if(v==1&&q!=0)f.push(q);
else f.push(0)}}if(!K.isClosed)for(var F=0;F<g.length;F++)g[F].type+=3;$=$.concat(g);var h=c.zT(j);if(k.J==0&&k.dC==0){var r=k.DX,H=k.ti,o=r+k.V,P=H+k.xq,O=[r,H,o,P]}}return $};
bp.aiu=function(x,Q){var c=Q.clone(),$=x.frame?bp.Ky(x.frame):null;if($)c.translate(-$.x-$.m/2,-$.y-$.e/2);
if(x.isFlippedHorizontal)c.scale(-1,1);if(x.isFlippedVertical)c.scale(1,-1);c.rotate(-x.rotation*(Math.PI/180));
if($)c.translate($.m/2,$.e/2);return c};bp.S2=function(x){x=x.slice(1,x.length-1).split(",");return new bC(parseFloat(x[0]),parseFloat(x[1]))};
bp.Ky=function(x){return new gh(x.x,x.y,x.width,x.height)};bp.axQ=function(x){return{_class:"rect",constrainProportions:!1,x:x.x,y:x.y,width:x.m,height:x.e}};
function cX(){}cX.s5=function(x,Q){var c=Date.now(),$=cX,z=UZIP.parse(x),j=JSON.parse(w.IV(z.manifest)),U=JSON.parse(w.IV(z["resources/graphics/graphicContent.agc"])).resources,i=[],b=[],e=j.children;
for(var F=0;F<e.length;F++){var k=e[F];if(k.name=="artwork"){var K=k.children;for(var g=0;g<K.length;
g++){var R=K[g],T=JSON.parse(w.IV(z["artwork/"+R.path+"/graphics/graphicContent.agc"])),D=T.children;
if(D.length==0){}else if(D.length==1){if(R["uxdesign#bounds"]){R._node=D[0];i.push(R)}}else{var a=D[0],_=a.transform,I=a.shape;
if(I==null)I={x:0,y:0,width:1e3,height:1e3};if(I.type=="path"){var f=d.A.cl(Typr.U.SVGToPath(I.path).crds);
I={x:f.x,y:f.y,width:f.m,height:f.e}}I=JSON.parse(JSON.stringify(I));if(_){I.x+=_.tx;I.y+=_.ty}R["uxdesign#bounds"]=I;
R._node={type:"artboard",artboard:{children:D}};b.push(R)}}}}if(i.length==0)i=b;var y=[],Z=new gh;for(var F=0;
F<i.length;F++){var R=i[F],v=bp.Ky(R["uxdesign#bounds"]);y.push(v);Z=Z.iO(v)}var G=bp.ub(Z,8192*8192);
Q.RS=!0;Q.m=Math.round(Z.m/G);Q.e=Math.round(Z.e/G);Q.buffer=d.R(Q.m*Q.e*4);Q.cV(i.length);var q=new bI(G,0,0,G,Z.x,Z.y);
Q.IC={};for(var F=0;F<i.length;F++){var R=i[F],v=bp.Ky(R["uxdesign#bounds"]),h=R._node,r=q.clone(),H=v.clone(),o=r.c0();
r.translate(-v.x,-v.y);H.x=-Math.floor(r.DX/o);H.y=-Math.floor(r.ti/o);H.m=Math.floor(H.m/o);H.e=Math.floor(H.e/o);
r.translate(v.x,v.y);cX.D_(h,Q,r,U,z,H);var P=Q.B[Q.B.length-1];P.gF(R.name);P.Zp(H);if(F!=i.length-1)P.add.lsct=hA.H3}delete Q.IC};
cX._z=function(x){if(x==null)return new bI;return new bI(x.a,x.b,x.c,x.d,x.tx,x.ty)};cX.D_=function(x,Q,c,$,z,j){var U=cX,i=x.type,b=x[i],e=x.style,k=U._z(x.transform),T,D="none",a,_="none",I,f;
k.HQ();var K=c.clone();K.concat(k);var g=Q.Xh(),R=x.name;g.gF(R?R.slice(0,250):"Layer");if(x.visible!=null)g.KW(x.visible);
if(e){T=e.stroke;D=T?T.type:"none";a=e.fill;_=a?a.type:"none";if(a&&Object.keys(a).length==1)_="none";
I=e.filters;f=e.clipPath;if(f&&$.clipPaths[f.ref])f=$.clipPaths[f.ref].children;else f=null;if(e.opacity!=null)g.opacity=Math.round(255*e.opacity);
if(_=="solid"&&a.color.alpha)g.opacity=Math.round(g.opacity*a.color.alpha);if(I){g.add.lmfx=U.aDU(I);
for(var F=0;F<I.length;F++)if(I[F].type=="uxdesign#blur"){var y=I[F],Z=y.params,v=Z.brightnessAmount;
if(v==null)v=0;v=Math.abs(v/100);if((y.visible==null||y.visible==!0)&&Z.backgroundEffect)g.opacity=Math.round(g.opacity*(v+(1-v)*Z.fillOpacity))}}if(_=="pattern"&&a.pattern.meta.ux.uid=="")_="none"}if(f==null&&x.meta&&x.meta.ux&&x.meta.ux.clipPathResources)f=x.meta.ux.clipPathResources.children;
if(i=="artboard"||i=="group"){if(f){var G=f[0],q=G.shape,h=q!=null&&q.type=="rect"&&q.width*q.height>4e6;
if(G.type!="text"&&!h){if(q){var k=U._z(G.transform);k.HQ();var r=K.clone();r.concat(k);g.add.vmsk=new eM.hn;
g.add.vmsk.$=U.xw(q);r=r.clone();r.HQ();d.o.Of(g.add.vmsk.$,r);g.jz();g.kT(Q)}}else if(!h)alert("Clipping by text has been ignored")}g.add.lsct=hA.DJ;
g.s3="pass";g.H2=24;if(x.visible!=null)g.KW(x.visible);Q.B.push(Q.x6());var H=b.children,o=a;if(o)o=o.color;
if(o)o=o.value;if(a){if(i=="artboard"&&_=="solid"){g.Zp(new gh(0,0,10,10));g.add.artb.Clr={t:"Objc",v:d.I.lV({Z:o.r,r:o.g,J:o.b})};
g.add.artb.artboardBackgroundType={t:"long",v:4}}else{var P=Q.Xh();P.gF("BACKGROUND");P.H2|=16;P.add.vstk=aF.XM.$H();
P.add.vmsk=new eM.hn;P.add.vmsk.$=U.xw({type:"rect",x:j.x,y:j.y,width:j.m,height:j.e});U.Yu(a,_,K,j,j,P,Q,$,z);
P.jz();P.kT(Q);Q.B.push(P)}}for(var F=0;F<H.length;F++){cX.D_(H[F],Q,K,$,z,j)}}else if(i=="shape"&&(b.type=="rect"&&(b.r==null||b.r==0)||b.type=="path"&&UDOC.G.isBox(Typr.U.SVGToPath(b.path)))&&_=="pattern"&&(Math.abs(b.width/b.height-a.pattern.width/a.pattern.height)<.01||e.fill.pattern.meta.ux.scaleBehavior=="fill")){var O=a.pattern,p=O.meta.ux,C=p.uid,W=z["resources/"+C];
if(W==null){console.log(O);return}var J=Q.BQ(W,g.getName(),0,0);J.H2=g.H2;J.opacity=g.opacity;g=J;var t=d.o.sP(U.xw(b),null),Y=d.A.Hg(new gh(0,0,O.width,O.height)).j,l=new bI;
l.scale(O.width/t.m,O.height/t.e);if(p.offsetX)l.translate(-p.offsetX*O.width,0);if(p.offsetY)l.translate(0,-p.offsetY*O.height);
K.concat(l);K.HQ();d.A.i(Y,K,Y);g.add.SoLd.Trnf=X.Y.TD(Y);g.add.SoLd.nonAffineTransform=X.Y.TD(Y);g.bx(Q,!1)}else if(i=="shape"){g.H2|=16;
g.add.vstk=aF.XM.$H();g.add.vmsk=new eM.hn;g.add.vmsk.$=U.xw(b);var t=d.o.sP(g.add.vmsk.$,null),r=K.clone();
r.HQ();d.o.Of(g.add.vmsk.$,r);var m=d.o.sP(g.add.vmsk.$,null);if(D=="none"){}else{var B=T.color.value,L,A;
L="SoFi";var S=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]);A={t:"Objc",v:S};A.v.Clr.v=d.I.lV({Z:B.r,r:B.g,J:B.b});
var M=T.align,N=T.cap;if(M==null)M="center";var s=g.add.vstk;s.strokeEnabled.v=!0;s.strokeStyleLineWidth.v.val=T.width;
if(M)s.strokeStyleLineAlignment.v.strokeStyleLineAlignment=aF.XM.xS[["inside","center","outside"].indexOf(M)];
if(N)s.strokeStyleLineCapType.v.strokeStyleLineCapType=aF.XM.Sw[["butt","round","square"].indexOf(N)];
var V=["SoFi","GrFl","patternFill"].indexOf(L),g8=[aF.ZS,aF.ul,aF.qK][V];s.strokeStyleContent.v={classID:aF.XM.R7[0]};
var n=s.strokeStyleContent.v={classID:aF.XM.R7[V]};for(var F=0;F<g8.length;F++)n[g8[F]]=A.v[g8[F]]}if(I)for(var F=0;
F<I.length;F++)if(I[F].type=="uxdesign#blur"&&I[F].visible){var cQ=I[F];g.add.vmsk.bS=cQ.params.blurAmount}U.Yu(a,_,K,t,m,g,Q,$,z);
g.jz();g.kT(Q)}else if(i=="text"&&x.text){var hk=x.text,eG=hk.frame,ie=e.font,eN=e.textAttributes,k=K.clone(),dm=0;
k.HQ();g.add.lnsr="rend";g.add.TySh=dU.Y7(0,0);g.add.TySh.Iv=new gh(0,0,100,100);g.add.TySh.i=k;var gr=g.add.TySh.HW,ek=hk.rawText.replace(/\r/g,"\n").replace(/\u000b/g,"\n");
dU.U3(gr,0,ek);if(ek!=""){var jK=dU.zl(gr,0,1),iE=ie.postscriptName;if(iE==null)iE=ie.family;dU.gD(jK,iE);
jK.VA.FontSize=Math.round(ie.size);if(_=="solid"){var B=a.color.value;jK.VA.FillColor={Type:1,Values:[1,B.r/255,B.g/255,B.b/255]}}if(eN){if(eN.paragraphAlign)jK.SW.Justification=["left","right","center"].indexOf(eN.paragraphAlign);
if(eN.letterSpacing)jK.VA.Tracking=Math.round(eN.letterSpacing);if(eN.lineHeight){jK.VA.AutoLeading=!1;
jK.VA.Leading=Math.round(eN.lineHeight)}}dU.G4(gr,0,ek.length,jK)}var e9=x.meta.ux.rangedStyles;if(e9)for(var F=0;
F<e9.length;F++){var b=e9[F],gJ=Math.min(b.length,ek.length-dm);if(F==e9.length-1)gJ=ek.length-dm;var jK=dU.zl(gr,dm,dm+gJ),iE=b.postscriptName;
if(iE==null)iE=b.family;if(iE!=null)dU.gD(jK,iE);var dR=b.textScript,ko=b.underline,fj=b.fontSize,y=b.fill,ja=b.textTransform;
if(dR&&dR!="none")jK.VA.FontBaseline=dR=="superscript"?1:2;if(ko!=null)jK.VA.Underline=ko;if(fj!=null)jK.VA.FontSize=Math.round(fj);
if(ja!=null)jK.VA.FontCaps=ja=="uppercase"?2:0;if(ja=="lowercase"){dU.DH(gr,dm,dm+gJ);dU.U3(gr,dm,ek.slice(dm,dm+gJ).toLowerCase())}if(y!=null){var eD=y.value;
jK.VA.FillColor={Type:1,Values:[1,(eD>>>16&255)/255,(eD>>>8&255)/255,(eD>>>0&255)/255]}}dU.G4(gr,dm,dm+gJ,jK);
dm+=gJ}if(eG.type=="area"||eG.type=="autoHeight"){var jE=eG.width,cR=eG.height;dU.DY(gr,1);dU.ei(gr,[0,0,jE,cR!=null?cR:jE*2])}}else if(i=="syncRef"){var ex=x.syncSourceGuid,er=$.meta.ux.symbols,cE=U._o(er,ex);
if(cE){var a7=K.clone();a7.concat(U._z(cE.transform));cX.D_(cE,Q,a7,$,z,j)}return}else console.log(i,x);
Q.B.push(g)};cX._o=function(x,Q){for(var F=0;F<x.length;F++){var c=x[F],$=c.group;if(c.id==Q)return c;
if($){var z=cX._o($.children,Q);if(z)return z}}return null};cX.xw=function(x){var Q=x.type,c=[{type:6},{type:8,all:0}];
if(Q=="rect"){var $=x.r,z=x.x,j=x.y,U=x.width,i=x.height;c=d.o.JE.Rect(z,j,U,i,$?$:0)}else if(Q=="circle"){var $=x.r;
c=d.o.JE.Sl(x.cx-$,x.cy-$,2*$,2*$)}else if(Q=="ellipse"){var b=x.rx,e=x.ry;c=d.o.JE.Sl(x.cx-b,x.cy-e,2*b,2*e)}else if(Q=="path"||Q=="compound"){var k=Typr.U.SVGToPath(x.path);
c=d.A.tf({G:k.cmds,j:k.crds},!1)}else if(Q=="line"){var K=x.x1,g=x.x2,R=x.y1,T=x.y2;c=d.o.JE.vf([K,R,g,T],0,!0)}else if(Q=="polygon"){var D=x.points,a=[];
for(var F=0;F<D.length;F++)a.push(D[F].x,D[F].y);c=c.concat(d.o.JE.vf(a,0,!1).slice(2))}else console.log(Q,x);
return c};cX.aDU=function(x){var Q=JSON.parse(aF.default);for(var F=0;F<aF.order.length;F++)Q[aF.mh[F]]={t:"VlLs",v:[]};
for(var F=0;F<x.length;F++){var c=x[F],$=c.type,z=c.params,j=c.visible;if($=="dropShadow"){var U=aF.mh[aF.order.indexOf("DrSh")],i=JSON.parse(aF.lF[aF.order.indexOf("DrSh")]);
Q[U].v.unshift({t:"Objc",v:i});var b=z.dropShadows;if(b.length!=1)throw"e";var e=b[0],k=e.color,K=k.value,g=e.dx,R=e.dy;
i.Clr.v=d.I.lV({Z:K.r,r:K.g,J:K.b});i.Opct.v.val=Math.round((k.alpha!=null?k.alpha:1)*100);i.uglg.v=!1;
i.enab.v=j!=null?j:!0;i.lagl.v.val=Math.round(180/Math.PI*Math.atan2(R,-g));i.Dstn.v.val=Math.round(Math.sqrt(g*g+R*R));
i.blur.v.val=Math.round(e.r*2.3)}}return Q};cX.Yu=function(x,Q,c,$,z,j,U,i,b){var e=cX;j.add.vstk.fillEnabled.v=Q!="none";
if(Q=="none"){j.add.SoCo={classID:"null",Clr:{t:"Objc",v:d.I.lV({Z:0,r:0,J:0})}}}else{var k,K,g;if(Q=="solid"){var R=x.color.value;
k="SoCo";K=aF.ZS;var T=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]);g={t:"Objc",v:T};g.v.Clr.v=d.I.lV({Z:R.r,r:R.g,J:R.b})}else if(Q=="gradient"){k="GdFl";
K=aF.ul;var T=JSON.parse(aF.lF[aF.order.indexOf("GrFl")]),D=T.Grad.v,y,Z,v;D.Intr.v=0;var a=x[Q],_=a.ref?i.gradients[a.ref]:a.meta.ux.gradientResources,I=["linear","radial","angular"].indexOf(_.type),f=_.stops;
T.Type.v.GrdT=["Lnr","Rdl","Angl"][I];if(I==0){var y=new bC(a.x1,a.y1),Z=new bC(a.x2,a.y2);y.x=Z.x+.5*(y.x-Z.x);
y.y=Z.y+.5*(y.y-Z.y)}else{var y=new bC(a.cx,a.cy),Z=new bC(a.cx+a.r,a.cy)}v=z;if(a.units=="objectBoundingBox"){var G=new bI($.m,0,0,$.e,$.x,$.y);
y=G.RE(y);Z=G.RE(Z)}var G=e._z(a.transform);y=G.RE(y);Z=G.RE(Z);G=c.clone();G.HQ();y=G.RE(y);Z=G.RE(Z);
d.I.vO(y,Z,v,T);var q=[];for(var F=0;F<f.length;F++){var h=f[F],r=h.color,R=r.value,H=r.alpha;if(H==null)H=1;
q.push([h.offset,[R.r/255,R.g/255,R.b/255],H])}d.I.q1(q,D);g={t:"Objc",v:T}}else if(Q=="pattern"){k="PtFl";
K=aF.qK;var T=JSON.parse(aF.lF[aF.order.indexOf("patternFill")]),Y;g={t:"Objc",v:T};var o=x[Q],P=o.meta.ux,O=P.uid,p=b["resources/"+O].buffer,C=P.flipX,W=P.flipY,J=O+C+W,t=ar.HB(p);
if(U.IC[J])Y=U.IC[J];else{var l=new gh(0,0,o.width,o.height),m;if(l._6()||t==null){l=new gh(0,0,1,1);
m=new ArrayBuffer(4)}else{var B=ar.pz(t);if(B.f6){var L=new hf;B.fk(p,L);m=L.VY().buffer}else{try{var A=B.fk(p)[0];
m=A.data;l=A.K$}catch(dQ){m=new ArrayBuffer(l.P()*4)}}}Y={};Y.id=hf.KN()+"-d71c-11e5-b1ae-a548a96e5f9f";
Y.name="someImage";Y.GD=[new Uint8Array(m),l];if(C)d.D.qf(Y.GD[0].slice(0),Y.GD[0],l.m,l.e);if(W)d.D.aeL(Y.GD[0].slice(0),Y.GD[0],l.m,l.e);
U.uh(Y);U.IC[J]=Y}var S=c.clone();S.HQ();S.translate($.x,$.y);var M=$.m,N=$.e,s=Y.GD[1].m,V=Y.GD[1].e,g8=Math.max(M/s,N/V);
if(P.scale)g8*=P.scale;var n=new bI;n.translate(-s/2,-V/2);n.scale(1/s,1/V);if(P.offsetX!=null)n.translate(P.offsetX,P.offsetY);
n.scale(s,V);n.scale(g8,g8);n.translate(M/2,N/2);n.concat(S);en.a9H(Y,T,0,0,1e3,n)}else console.log(Q);
if(k!=null){j.add[k]={classID:"null"};for(var F=0;F<K.length;F++){var cQ=K[F];j.add[k][cQ]=g.v[cQ]}}}};
var dZ=function(){function x(a){return a.tagName?a.tagName.split(":").pop():null}function Q(a,_,I){if(I&&I[0]==null)I=null;
a=new Uint8Array(a);var f,t=1;if(a[0]==255&&a[1]==254)f=w.Ot(a,2,(a.length>>>1)-1);else f=w.IV(a,0,a.length);
var y=new DOMParser,Z=y.parseFromString(f,"image/svg+xml"),v=Z.getElementsByTagName("style")[0];if(v)v=Typr.U.SVG.cssMap(v.textContent);
else v={};var G=Z.firstChild;while(x(G)!="svg")G=G.nextSibling;var q=new gh(0,0,100,100),h=G.getAttribute("viewBox"),r=G.getAttribute("width"),H=G.getAttribute("height"),o=r!=null?parseFloat(r):parseFloat(H),P=H!=null?parseFloat(H):parseFloat(r);
if(h){var O=c(h);q.x=O[0];q.y=O[1];q.m=O[2];q.e=O[3];if(r!=null){var p=O[2]/O[3],C=o/P;if(C>p){var W=O[3]*C-q.m;
q.x-=W/2;q.m+=W}if(C<p){var J=O[2]/C-q.e;q.y-=J/2;q.e+=J}}}else if(r!=null||H!=null){q.m=o;q.e=P}q=d.A.Yc(q);
while(I&&Math.max(q.m*t,q.e*t)<Math.max(I[0],I[1]))t++;while(I==null&&Math.max(q.m,q.e)*t>8192)t*=.5;
_.RS=!0;_.m=~~(q.m*t);_.e=~~(q.e*t);var Y=new bI(t,0,0,t,-q.x*t,-q.y*t),l={Ry:K(G),ahl:v,Rh:0};$(Z,G.children,_,Y,l,new bI,0);
if(_.B.length==0){var m=_.Xh();m.gF("Layer");_.B.push(m)}}function c(a){var _=" ";if(a.indexOf(",")!=-1)_=",";
return a.split(_).map(parseFloat)}function $(a,_,I,f,y,Z,v,G){var q=["display","opacity","fill-opacity","filter","clip-path"],h=0;
for(var r=0;r<_.length;r++){var H=_[r],o=x(H),P=H.getAttribute("id"),C=13,l=1,L="clip-path",A=null,hk=0;
if(P==null)P=H.getAttribute("data-name");var O=K(H,y.ahl);for(var p in y.Ry)if(q.indexOf(p)==-1&&O[p]==null)O[p]=y.Ry[p];
if(O["font-size"])C=U(O["font-size"],C);if(H.getAttribute("dx"))f.DX+=U(H.getAttribute("dx"),C);if(H.getAttribute("dy"))f.ti+=U(H.getAttribute("dy"),C);
var W=b(H);W.concat(f);var J=H.getAttribute("visibility"),t=O.display,Y=I.Xh();if(J=="hidden"||t=="none")Y.KW(!1);
Y.gF(P!=null?P.split(":::")[0]:"Layer");if(O.opacity)l*=parseFloat(O.opacity);if(O["fill-opacity"]){var m=parseFloat(O["fill-opacity"]);
if(m!=0)l*=m}Y.opacity=Math.round(255*l);if(O["mix-blend-mode"]){var B=cq.Zx.indexOf(O["mix-blend-mode"]);
if(B!=-1)Y.s3=cq.X$[B]}if(H.getAttribute(L)==null)L="mask";if(H.getAttribute(L)!=null||O["clip-path"]){var S=H.getAttribute(L);
if(S==null)S=O["clip-path"];S=S.slice(4,S.length-1);var M=a.getElementById(S.slice(1));if(M){var N=M.children;
A=I.Xh();A.gF("Clip-Path"+(P?": "+P:""));A.add.lsct=v<2?hA.DJ:hA.H3;A.s3="pass";A.H2=24;var s=A.add.vmsk=new eM.hn;
I.B.push(I.x6());var V=[];if(M.getAttribute(L)){var S=M.getAttribute(L);S=S.slice(4,S.length-1);V=a.getElementById(S.slice(1)).children}for(var F=0;
F<N.length;F++){var g8=b(N[F]);g8.concat(W);var n=j(I,a,N[F],!1).slice(2);d.o.Of(n,g8);s.$=s.$.concat(n)}for(var F=0;
F<V.length;F++){var g8=b(N[F]);g8.concat(W);var n=j(I,a,V[F],!1).slice(2);for(var cQ=0;cQ<n.length;cQ++)if(n[F].Kp!=null)n[F].Kp=3;
d.o.Of(n,g8);s.$=s.$.concat(n)}for(var F=0;F<s.$.length;F++)if(s.$[F].Kp!=null)s.$[F].Kp=0;A.jz();A.kT();
v++}}if(O.filter&&O.filter!="none"){var eG=O.filter,eN,gr,ek,iE=!1,e9=!1,dm=!1;eG=eG.slice(5,eG.length-1);
var ie=a.getElementById(eG),jK=[0,0,0,.5],kD=W.c0();if(ie)for(var F=0;F<ie.children.length;F++){var gJ=ie.children[F],dR=x(gJ);
if(dR=="feGaussianBlur"){iE=!0;eN=parseFloat(gJ.getAttribute("stdDeviation"))*kD}if(dR=="feColorMatrix"){var fO=gJ.getAttribute("values");
if(fO){fO=fO.split(" ").map(parseFloat);jK=[fO[4],fO[9],fO[14],fO[18]]}}if(dR=="feComposite"){dm=!0}if(dR=="feOffset"){e9=!0;
var ko=gJ.getAttribute("dx"),d8=gJ.getAttribute("dy");gr=parseFloat(ko?ko:0)*kD;ek=parseFloat(d8?d8:0)*kD}}if(iE&&(dm||e9)){var fj=dm?"IrSh":"DrSh";
if(fj=="IrSh"){Y.add.iOpa=0}var ja=JSON.parse(aF.lF[aF.order.indexOf(fj)]);ja.blur.v.val=Math.round(eN*2.4);
var eD=Math.sqrt(gr*gr+ek*ek);ja.uglg.v=!1;ja.Dstn.v.val=Math.round(eD);ja.lagl.v.val=Math.round(Math.atan2(ek,-gr)*(180/Math.PI));
ja.Clr.v=d.I.lV({Z:jK[0]*255,r:jK[1]*255,J:jK[2]*255});ja.Opct.v.val=Math.round(jK[3]*100);z(Y,aF.mh[aF.order.indexOf(fj)],ja)}else if(iE)hk=eN}if(o=="g"||o=="a"||o=="svg"||o=="switch"||(o=="text"||o=="textPath")&&H.children.length>0||o=="symbol"&&G){if(o=="text")Z=e(H,Z);
var d3=H.getAttribute("viewBox"),fP=H.getAttribute("width"),jE=H.getAttribute("height");if(o=="svg"&&fP&&jE&&d3==null)d3="0 0 "+fP+" "+jE;
if(d3&&fP&&jE){var cR=c(d3),ex=e(H),er=new bI;er.translate(-cR[0],-cR[1]);er.scale(parseFloat(fP)/cR[2],parseFloat(jE)/cR[3]);
er.translate(ex.DX,ex.ti);er.concat(W);W=er}var cE=H.children.length,a7=y.Ry;y.Ry=O;var dl=y.Rh;y.Rh=Math.max(y.Rh,hk);
var hl=o!="text"&&o!="textPath"||cE>1;if(hl){var f4=Y.M5();Y.add.lsct=v<2&&f4&&(P==null||!P.endsWith(":::"))?hA.DJ:hA.H3;
Y.s3="pass";Y.H2=24;Y.KW(f4);I.B.push(I.x6())}$(a,H.children,I,W,y,Z,v+1);if(hl)I.B.push(Y);else{var em=I.B[I.B.length-1];
em.opacity=Y.opacity;em.s3=Y.s3}y.Rh=dl;y.Ry=a7}else if(o=="use"){var er=e(H);er.concat(W);var e$=R(H),iP=a.getElementById(e$.slice(1));
if(iP){var a7=y.Ry;y.Ry=O;if(O.filter)iP.setAttribute("filter",O.filter);$(a,[iP],I,er,y,Z,v+1,!0);y.Ry=a7}}else if(o=="path"||o=="rect"||o=="circle"||o=="ellipse"||o=="polygon"||o=="polyline"||o=="line"){Y.H2|=16;
var s=Y.add.vmsk=new eM.hn,b2=O.fill,k7=b2=="none"||O["fill-opacity"]&&parseFloat(O["fill-opacity"])==0;
s.$=j(I,a,H,O["fill-rule"]=="evenodd",k7);d.o.Of(s.$,W);var at=O.stroke,ju=O["stroke-width"],jL=O["stroke-dasharray"],fJ=O["stroke-linejoin"];
if(fJ==null)fJ="miter";var h6=O["stroke-linecap"];if(h6==null)h6="butt";var iq=O["paint-order"],iI=!(at==null||at=="none"||at=="null"),dM=Y.add.vstk=aF.XM.$H(null,iI);
if(iI){var ik=i(a,at,W,s.$,I),jp=["SoFi","GrFl","patternFill"].indexOf(ik.type),eA=ik.b.v.Opct.v,bK=1;
if(eA.val!=100){Y.opacity=Math.round(Y.opacity*eA.val/100);eA.val=100}var k8=[aF.ZS,aF.ul,aF.qK][jp],ay=dM.strokeStyleContent.v={classID:aF.XM.R7[jp]};
for(var F=0;F<k8.length;F++)ay[k8[F]]=ik.b.v[k8[F]];ju=ju?parseFloat(ju):1;if(iq&&iq.replace(/\s\s+/g," ").slice(0,11)=="stroke fill"){bK=2;
ju/=2}var a4={ljoin:["miter","round","bevel"].indexOf(fJ),lcap:["butt","round","square"].indexOf(h6),lwidth:ju};
if(jL!=null&&jL!="none")a4.dash=jL.split(",").map(parseFloat);aF.XM.write(dM,a4,W.c0());dM.strokeStyleLineAlignment.v.strokeStyleLineAlignment=aF.XM.xS[bK];
dM.strokeStyleOpacity.v.val=100*(O["stroke-opacity"]?parseFloat(O["stroke-opacity"]):1)}Y.add.vstk.fillEnabled.v=!k7;
if(k7){Y.add.SoCo={classID:"null",Clr:{t:"Objc",v:d.I.lV({Z:0,r:0,J:0})}}}else{var ik=i(a,b2,W,s.$,I),h_=null,bj=null;
if(ik.type=="SoFi"){h_="SoCo";bj=aF.ZS}if(ik.type=="GrFl"){h_="GdFl";bj=aF.ul}if(ik.type=="patternFill"){h_="PtFl";
bj=aF.qK}if(h_!=null){var eA=ik.b.v.Opct.v;if(eA.val!=100){Y.opacity=Math.round(Y.opacity*eA.val/100);
eA.val=100}Y.add[h_]={classID:"null"};for(var F=0;F<bj.length;F++){var p=bj[F];Y.add[h_][p]=ik.b.v[p]}}if(ik.aA)Y.add._fstl=ik.aA}var gs=Math.max(hk,y.Rh);
if(gs!=0)Y.add.vmsk.bS=gs;Y.jz();Y.kT(I);I.B.push(Y)}else if((o=="text"||o=="tspan")&&H.textContent!=""){Z=e(H,Z);
var er=Z.clone(),ek=0;er.concat(W);er.translate(h,0);if(H.children.length>0){var bs=K(H.children[0],y.ahl);
for(var p in bs)if(q.indexOf(p)==-1)O[p]=bs[p]}var e3=O["xml:space"],jA=H.textContent;if(e3=="preserve")jA=jA.replace(/\t/g," ").replace(/\n/g," ");
if(P==null)Y.gF(jA);Y.add.lnsr="rend";Y.add.TySh=dU.Y7(0,0);Y.add.TySh.Iv=new gh(0,0,100,100);Y.add.TySh.i=er.clone();
var kn=Y.add.TySh.HW;dU.U3(kn,0,jA);if(o=="tspan")h+=C*jA.length*.5*er.c0();var b2=O.fill,j6=O["font-weight"],cL=O["font-family"],eb=O["text-decoration"],at=O.stroke,ju=O["stroke-width"],dY=O["dominant-baseline"];
if(dY=="text-before-edge")ek=C;else if(dY=="middle")ek=C/2;else if(dY=="hanging")ek=C;if(ek!=0)Y.add.TySh.i.translate(0,ek);
var aP=dU.zl(kn,0,1);if(b2&&b2!="none"){var jK=CSS.zH(b2);aP.VA.FillColor={Type:1,Values:[1,jK.Z/255,jK.r/255,jK.J/255]}}if(eb=="underline")aP.VA.Underline=!0;
aP.VA.FontSize=Math.round(C);dU.gD(aP,"LiberationSans");if(j6=="bold")dU.gD(aP,"LiberationSans-Bold");
if(cL){cL=cL.split(",")[0].trim();if(cL[0]=="\"")cL=cL.slice(1);if(cL[cL.length-1]=="\"")cL=cL.slice(0,cL.length-1);
var ks=cL+":"+(j6?j6:"normal"),jC={"'DejaVu Sans':normal":"DejaVuSans","'DejaVu Sans':bold":"DejaVuSans-Bold","'Nimbus Sans L':normal":"NimbusSanL-Reg","'Nimbus Sans L':bold":"NimbusSanL-Bol","Libre Franklin:300":"LibreFranklin-Light","Libre Franklin:400":"LibreFranklin-Regular","Libre Franklin:500":"LibreFranklin-Medium","Libre Franklin:600":"LibreFranklin-SemiBold","Libre Franklin:700":"LibreFranklin-Bold"};
if(jC[ks])dU.gD(aP,jC[ks]);else dU.gD(aP,cL)}if(O["text-anchor"])aP.SW.Justification=["start","end","middle"].indexOf(O["text-anchor"]);
dU.G4(kn,0,jA.length,aP);if(at==null||at=="none"){}else{var ja=JSON.parse(aF.lF[aF.order.indexOf("FrFX")]);
ja.Clr.v=d.I.lV(CSS.zH(at));ja.Sz.v.val=Math.round(parseFloat(ju)*er.c0());z(Y,"frameFXMulti",ja)}I.B.push(Y)}else if(o=="image"){var e$=R(H);
if(e$&&e$.slice(0,4)=="data"){var ig=ar.DM(e$),cD=ig,eB=I.BQ(cD,Y.getName(),0,0);eB.H2=Y.H2;Y=eB;var c1=Y.rect.clone();
c1.x=c1.y=0;var dq=H.getAttribute("width"),b$=H.getAttribute("height");if(dq)c1.m=parseFloat(dq);if(b$)c1.e=parseFloat(b$);
var d7=e(H);d7.concat(W);var he=d.A.Hg(c1).j;d.A.i(he,d7,he);Y.add.SoLd.Trnf=X.Y.TD(he);Y.add.SoLd.nonAffineTransform=X.Y.TD(he);
Y.bx(I,!1);I.B.push(Y)}}else console.log("unknown tag: "+o,H.children.length,H.textContent.length);if(A!=null){I.B.push(A);
v--}}}function z(a,_,I){var f=a.add.lmfx;if(f==null){var f=a.add.lmfx=JSON.parse(aF.default);for(var F=0;
F<aF.order.length;F++)f[aF.mh[F]]={t:"VlLs",v:[]}}f[_].v.push({t:"Objc",v:I})}function j(a,_,I,f,y){var Z=[{type:6},{type:8,all:0}],v=x(I);
if(v=="use"){var G=R(I),q=_.getElementById(G.slice(1)),h=new bI;if(x(q)!="rect")h=e(q);h.concat(b(q));
Z=j(a,_,q,f,y);d.o.Of(Z,h)}else if(v=="path"){var r=I.getAttribute("d");if(r==null)return Z;var H=Typr.U.SVGToPath(r);
Z=d.A.tf({j:H.crds,G:H.cmds},f,y)}else if(v=="rect"){var o=I.getAttribute("rx"),P=new bC(0,0);T("x",I,a,P,!0);
T("y",I,a,P,!1);var O=new bC(0,0);T("width",I,a,O,!0);T("height",I,a,O,!1);Z=d.o.JE.Rect(P.x,P.y,O.x,O.y,o?parseFloat(o):0)}else if(v=="circle"||v=="ellipse"){var p=[0,0,0,0],C=["cx","cy","rx","ry","r"];
for(var F=0;F<5;F++){var W=I.getAttribute(C[F]);if(W){W=parseFloat(W);if(F<4)p[F]=W;else p[2]=p[3]=W}}Z=d.o.JE.Sl(p[0]-p[2],p[1]-p[3],2*p[2],2*p[3])}else if(v=="polygon"||v=="polyline"||v=="line"){var J;
if(v=="line")J=[I.getAttribute("x1"),I.getAttribute("y1"),I.getAttribute("x2"),I.getAttribute("y2")].map(parseFloat);
else J=I.getAttribute("points").trim().replace(/\s\s+/g," ").split(",").join(" ").split(" ").map(parseFloat);
Z=d.o.JE.vf(J,0,v!="polygon")}return Z}function U(a,_){if(a.charAt(a.length-1)=="m")return _*parseFloat(a.slice(0,a.length-2));
else return parseFloat(a)}function i(a,_,I,f,y){var Z,v,G,q=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]),h=d.o.sP(f),r=_!=null?_.indexOf("("):-1;
if(r!=-1){var H=_.indexOf(")"),o=_.slice(0,r).trim(),P=_.slice(r+1,H).trim();if(P.charAt(0)=="'")P=P.slice(1,P.length-1);
if(o=="url"){if(P.charAt(0)=="#"){var O=a.getElementById(P.slice(1));if(O&&x(O).toLowerCase().endsWith("gradient")){var G=D(a,O,I,h),p=ad.kD(G,f);
Z="GrFl";v={t:"Objc",v:p}}else if(O&&x(O).toLowerCase()=="pattern"&&O.children[0]&&x(O.children[0])=="use"){Z="SoFi";
v={t:"Objc",v:q};var C=O.children[0],W=b(C),J=R(C),t=a.getElementById(J.slice(1)),Y=ar.DM(R(t)).buffer,l=ar.pz(ar.HB(Y)),m=l.fk(Y)[0],B={};
B.id=hf.KN()+"-d71c-11e5-b1ae-a548a96e5f9f";B.name="someImage";B.GD=[new Uint8Array(m.data),m.K$];y.uh(B);
var q=JSON.parse(aF.lF[aF.order.indexOf("patternFill")]);q.Scl.v.val=Math.round(100*h.m*W.V);var L=q.phase.v;
L.Hrzn.v=Math.round(h.x+W.DX*h.m);L.Vrtc.v=Math.round(h.y+W.ti*h.e);q.Ptrn.v.Idnt.v=B.id;Z="patternFill";
v={t:"Objc",v:q}}else{Z="SoFi";v={t:"Objc",v:q}}}else console.log("unknown url",P)}else if(o=="rgb"||o=="rgba"){Z="SoFi";
v={t:"Objc",v:q};v.v.Clr.v=d.I.lV(CSS.zH(_));if(o=="rgba")v.v.Opct.v.val=Math.round(100*parseFloat(_.split(",").pop()))}else console.log("unknown fill",_)}else{Z="SoFi";
v={t:"Objc",v:q};var A=CSS.zH(_);v.v.Clr.v=d.I.lV(A);if(A.V!=null)v.v.Opct.v.val=Math.round(100*A.V/255)}return{type:Z,b:v,aA:G}}function b(a){var _=new bI,I=a.getAttribute("transform");
if(I)_=k(I);var f=a.getAttribute("style");if(f!=null){var y={};g(y,f,["transform"]);f=y.transform;if(f)_.concat(k(f))}return _}function e(a,_){var I=new bI,f=a.getAttribute("x"),y=a.getAttribute("y");
if(f)I.DX=parseFloat(f);else if(_)I.DX=_.DX;if(y)I.ti=parseFloat(y);else if(_)I.ti=_.ti;return I}function k(a){var _=Typr.U.SVG.readTrnf(a);
return new bI(_[0],_[1],_[2],_[3],_[4],_[5])}function K(a,_){var I={},f="fill-rule fill stroke stroke-width stroke-dasharray stroke-opacity stroke-linejoin stroke-linecap font-size font-weight font-family text-decoration text-anchor dominant-baseline stop-color stop-opacity filter display opacity fill-opacity paint-order clip-path mix-blend-mode xml:space".split(" ");
for(var F=0;F<f.length;F++){var y=a.getAttribute(f[F]);if(y!=null&&y!="inherit")I[f[F]]=y}var Z=a.getAttribute("class");
if(_!=null&&Z!=null&&_["."+Z]!=null)g(I,_["."+Z],f);var v=a.getAttribute("id");if(_!=null&&v!=null&&_["#"+v]!=null)g(I,_["#"+v],f);
var G=a.getAttribute("style");if(G!=null)g(I,G,f);return I}function g(a,_,I){_=_.trim().split(";");for(var F=0;
F<_.length;F++){var f=_[F].split(":"),y=f[0]?f[0].trim():"",Z=f[1]?f[1].trim():"";for(var v=0;v<I.length;
v++)if(y==I[v]&&Z!="inherit")a[I[v]]=Z}}function R(a){var _=a.getAttribute("xlink:href");if(_==null)_=a.getAttribute("href");
if(_==null)_=a.getAttribute("xl:href");return _}function T(a,_,I,f,y){var Z=_.getAttribute(a);if(Z==null)return;
var v=parseFloat(Z);if(Z.endsWith("%"))v*=(y?I.m:I.e)/100;if(y)f.x=v;else f.y=v}function D(a,_,I,f){var y=T,Z=new bI,v=_.getAttribute("gradientTransform"),o=!1;
if(v)Z=k(v);Z.concat(I);var G=x(_)=="linearGradient"?0:1,q=new bC(0,0),h=new bC(f.m,0),r=q.clone();if(G==0){var H=new gh(0,0,1,1);
y("x1",_,H,q,!0);y("y1",_,H,q,!1);y("x2",_,H,h,!0);y("y2",_,H,h,!1);r.r$(q.x,q.y)}if(G==1){if(_.getAttribute("cx"))q.x=parseFloat(_.getAttribute("cx"));
if(_.getAttribute("cy"))q.y=parseFloat(_.getAttribute("cy"));h.r$(q.x,q.y);r.r$(q.x,q.y);if(_.getAttribute("r"))h.x+=parseFloat(_.getAttribute("r"));
if(_.getAttribute("fx"))r.x=parseFloat(_.getAttribute("fx"));if(_.getAttribute("fy"))r.y=parseFloat(_.getAttribute("fy"))}var P=_;
while(!0){if(P.getAttribute("gradientUnits")=="userSpaceOnUse")o=!0;var O=R(P);if(O==null)break;P=a.getElementById(O.slice(1))}if(!o)Z=new bI(f.m,0,0,f.e,f.x,f.y);
var p=ad.j3(G,Z,f,q,h,r),C=_.children,W=p[1]=[];if(C.length==0){var J=R(_);if(J==null)throw"gradient has no stops";
var t=a.getElementById(J.slice(1));if(t==null){console.log(J.slice(1))}else W=p[1]=D(a,t,Z,f)[1]}else for(var F=0;
F<C.length;F++){var Y=C[F],l=K(Y),m=l["stop-color"],B=l["stop-opacity"],L=Y.getAttribute("offset");if(m==null)m="#000000";
B=B==null?1:parseFloat(B);var A=L?parseFloat(L):0;if(L&&L.endsWith("%"))A/=100;m=CSS.zH(m);if(m.V!=null)B*=m.V/255;
W.push([A,[m.Z/255,m.r/255,m.J/255],parseFloat(B)])}return p}return{s5:Q}}();dZ.gS=function(){var x=null,Q=null,c="",$="",z;
function j(q,h,r,H){var o=[],C=" { ",W=" } ",J=!1;Q=h;$=h.tw?"":"\t";c=h.tw?"":" ";var P=h.agS,O=h.aC4;
z=new gh(0,0,q.m,q.e);if(H!=null){z=q.root.children[H].a.Dd();P=z.m;O=z.e}o.push("<svg version=\"1.2\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\""+[z.x,z.y,z.m,z.e].join(" ")+"\" width=\""+P+"\" height=\""+O+"\">");
if(!h.tw)o.push(U(1)+"<title>"+f(q.name.split(".")[0])+"</title>");var p={LH:[],yY:[],ah:0,aU:0,Rf:0,UD:{},u5:{},Wx:0,DL:{},azo:{},Sd:0,Dn:[]};
D(q,p,q.root.children,1,h,r,H);if(p.LH.length!=0){o.push(U(1)+"<defs>");o=o.concat(p.LH);o.push(U(1)+"</defs>")}o.push(U(1)+"<style>");
if(h.tw){C="{";W="}"}for(var F=0;F<q.B.length;F++)if(q.B[F].add.TySh)J=!0;if(J&&!h.aBR&&!h.a9D)o.push(U(2)+"tspan"+C+"white-space:pre"+W);
for(var t in p.DL)o.push(U(2)+"."+t+C+p.DL[t]+W);o.push(U(1)+"</style>");o=o.concat(p.yY);o.push("</svg>");
o=o.join(h.tw?"":"\n");return w.nT(o)}function U(jF){var q="";for(var F=0;F<jF;F++)q+=$;return q}function i(jF,q){if(q==null)q=1;
var h=""+parseFloat(jF.toFixed(q));if(h.startsWith("0."))h=h.slice(1);return h}function b(q,h){var r=q.add.lmfx;
if(r)r=r[h].v[0];if(r)r=r.v;if(r&&!r.enab.v)r=null;return r}function e(q,h){var r=b(q,"frameFXMulti");
if(r){var H=r.Sz.v.val;if(r.Styl.v.FStl=="OutF"){h.push("paint-order:stroke fill markers");H*=2}T(h,CSS.W2(r.Clr.v),1);
if(H!=1)h.push("stroke-width: "+H);h.push("stroke-linejoin: round;")}}var k="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
function K(q){var h=k.length,r="";for(var H=1;H<10;H++){var o=(h-10)*~~Math.pow(h,H-1);if(q<o){for(var F=0;
F<H;F++){var P=F==H-1?10:0,O=h-P,p=q%O;r=k[p+P]+r;q=Math.floor((q-p)/O)}break}q-=o}return r}function g(q,h,r,H){if(q.length!=0){if(H==null)H="s";
var o=q.join(";"),P=h.azo[o];if(P==null){P=Q.tw?K(h.Sd):H+h.Sd;h.Sd++;h.azo[o]=P;h.DL[P]=o}if(r)r.push(P);
return P}}function R(q){if(Q.tw&&q.length==7&&q[0]=="#"){if(q[1]==q[2]&&q[3]==q[4]&&q[5]==q[6])q="#"+q[1]+q[3]+q[5]}return q}function T(q,h,r){h=R(h);
if(h!="#000"||r==1)q.push((r==0?"fill:":"stroke:")+c+h)}function D(q,h,r,H,o,P,O){var p=!1;for(var C=0;
C<r.length;C++){var W=r[C].a,J=W.add.lsct;if(W.add.artb&&O!=null&&C!=O)continue;if(!W.cG&&r[C+1]&&r[C+1].a.cG&&W.Z6()&&W.add.vmsk){var t=[];
Z(W,W.add.vmsk,h,t);h.yY.push(U(H)+"<g "+t[0]+">");H++;p=!0}else if(!W.cG&&r[C-1]&&r[C-1].a.cG&&p){H--;
h.yY.push(U(H)+"</g>");p=!1}var Y=W.add.vmsk,l=W.add.vogk,m=W.add.vstk,B=W.add.TySh;if(Y&&!Y.isEnabled)Y=m=null;
var L=[];if(!o.hidden&&!W.M5())continue;var A=W.opacity/255,S=W.add.iOpa?W.add.iOpa/255:1;if(W.Uy()){A*=S;
S=1}if(A!=1)L.push("opacity:"+c+i(A));if(S!=1)L.push("fill-opacity:"+c+i(S));if(W.s3!="norm"){var M=cq.Zx[cq.X$.indexOf(W.s3)];
if(M!=null)L.push("mix-blend-mode:"+c+M)}if(!W.M5())L.push("display:"+c+"none");var t=[],N=[],s=W.getName(),V=s.indexOf(" .");
if(!o.tw)t.push("id=\""+f(s)+"\"");var g8=en.nA(W.add.lmfx,W.add),n=g8[0],cQ=g8[1],hk=W.add.SoLd;if(hk&&hk.filterFX){var eG=hk.filterFX.v;
if(eG.enab.v&&eG.filterFXList.v.length!=0)hk=null}if(W.Uy()){var ie=r[C].children;if(!(ie.length==1&&ie[0].a.add.SoLd&&!o.rd)){if(x&&W.getName().split("-").length==3){x.push({if:W.getName(),bc:0,Sr:[]})}Z(W,Y,h,t);
if(L.length!=0)t.push("style=\""+L.join(";")+"\"");if(n){var eN=CSS.W2(n.Clr.v),gr="f"+h.aU;h.aU++;h.yY.push(U(H)+"<filter id=\""+gr+"\">");
h.yY.push(U(H+1)+"<feFlood flood-color=\""+eN+"\" flood-opacity=\""+i(n.Opct.v.val/100,2)+"\" />");h.yY.push(U(H+1)+"<feBlend mode=\""+cq.Zx[cq.X$.indexOf(cq.Rg(n.Md.v.BlnM))]+"\" in2=\"SourceGraphic\"/>");
h.yY.push(U(H+1)+"<feComposite in2=\"SourceAlpha\" operator=\"in\" />");h.yY.push(U(H)+"</filter>");
t.push("filter=\"url(#"+gr+")\"")}var ek=I(t,N),jK=o.tw&&ek=="";if(!jK)h.yY.push(U(H)+"<g"+(ek==""?"":" "+ek)+">");
D(q,h,ie,H+1,o,P);if(!jK)h.yY.push(U(H)+"</g>")}}else if(W.Z6()&&Y==null){v(q,L,W.add,h,z,o);if(L.length!=0)t.push("style=\""+L.join(";")+"\"");
h.yY.push(U(H)+"<rect width=\""+z.m+"\" height=\""+z.e+"\" "+I(t,N)+"/>")}else if(Y&&hk==null){var iE=d.o.sP(Y.$,null,!0),e9,dm=null,kD=0,gJ;
v(q,L,W.add,h,iE,o);g(L,h,N);if(l.length!=0){e9=l[0].v;dm=e9.keyOriginType;if(dm)dm=dm.v;if(dm==2){var dR=d.eV.Ll(e9);
kD=dR[0];for(var F=0;F<3;F++)if(kD!=dR[F+1])dm=null}}if(l.length==1&&dm==5&&Math.abs(d.eV.a7q(e9))<1e-4){var iE=d.eV._A(e9),ko=(iE[0]+iE[2])/2,d8=(iE[1]+iE[3])/2,fj=ko-iE[0],ja=d8-iE[1],eD=Math.abs(fj-ja)<.01,d3=eD?"r=\""+i(fj)+"\"":"rx=\""+i(fj)+"\" ry=\""+i(ja)+"\"";
gJ="<"+(eD?"circle":"ellipse")+" "+I(t,N)+" cx=\""+i(ko)+"\" cy=\""+i(d8)+"\" "+d3+"/>"}else if(l.length==1&&dm==2&&kD!=0&&Math.abs(d.eV.a7q(e9))<1e-4){var iE=d.eV._A(e9),fP=iE[0],jE=iE[1],cR=iE[2]-iE[0],ex=iE[3]-iE[1],er="";
if(fP!=0)er+=" x=\""+i(fP)+"\"";if(jE!=0)er+=" y=\""+i(jE)+"\"";er+=" width=\""+i(cR)+"\"";er+=" height=\""+i(ex)+"\"";
er+=" rx=\""+i(kD)+"\"";gJ="<rect "+I(t,N)+er+"></rect>"}else{var cE=d.o.vb(Y.$,1);if(cE.hX!=0){t.push("fill-rule=\"evenodd\"")}gJ="<path "+I(t,N)+" d=\""+cE.Fg+"\"/>"}h.yY.push(U(H)+gJ);
if(x&&x[x.length-1]){var a7=d.A.CJ(Y.$);a7.j=a7.j.map(Math.round);var dl=x[x.length-1];dl.bc+=JSON.stringify(a7).length;
dl.Sr.push([L[0].split("#").pop(),a7])}}else if(B&&o.aBR){c=o.tw?"":" ";var hl=B.HW,f4=new fQ(hl,P,B.Gb),em=null;
if(n)em=CSS.W2(n.Clr.v);if(cQ){var iE=W.rect.clone();G(cQ,h,iE,o);em="url(#g"+h.ah+")"}if(em)L.push("fill:"+c+em);
e(W,L);var e$=aE.Fc(f4,B,!0),iP=d.A.j9(e$);for(var b2 in iP){var k7=L.slice(0),at=N.slice(0),ju=t.slice(0);
if(em==null){T(k7,b2.slice(0,7),0);if(b2.length>7){var jL=b2.slice(7).split("-");console.log(jL);T(k7,jL[1],1);
if(jL[2]!="1")k7.push("stroke-width:"+c+jL[2])}}g(k7,h,at);var fJ=iP[b2],jL=Typr.U.pathToSVG({crds:fJ.j,cmds:fJ.G},1);
h.yY.push(U(H)+"<path "+I(ju,at)+(o.tw?"":" "+_(B))+" d=\""+jL+"\"/>")}}else if(B&&!o.a9D){var hl=B.HW,h6=B.i.clone(),em=null;
L.push("transform:"+c+y(h6));var iq=dU.bs(hl),f4=new fQ(hl,P,B.Gb);e(W,L);if(L.length!=0)t.push("style=\""+L.join(";")+"\"");
h.yY.push(U(H)+"<text "+I(t,N)+" >");if(n)em=CSS.W2(n.Clr.v);if(cQ){var iE=W.rect.clone();iE.x-=h6.DX;
iE.y-=h6.ti;G(cQ,h,iE,o);em=" url(#g"+h.ah+")"}for(var F=0;F<f4.SW.length;F++){var iI=f4.SW[F];if(iI.bz.length==1&&iI.bz[0].J_)continue;
for(var dM=0;dM<iI.v0.length;dM++){var ik=iI.v0[dM],d8=iI.xj.y+ik.xj.y,jp=iI.bz[ik.start].start,eA=iI.bz[ik.end-1].end,k8=dU.aAs(hl,jp,eA),ay="";
for(var bK=0;bK<k8.length;bK++){var a4=f4.L4(jp),h_=k8[bK],bj=dU.zl(hl,jp,jp),gs=bj._t[bj.VA.Font].Name,b2=dU.Du(bj.VA.FillColor),bs=Math.round(bj.VA.FontSize),e3=iq.slice(jp,jp+h_);
if(bj.VA.FontCaps==2)e3=e3.toUpperCase();var jA=new bI;jA.translate(a4.W4.x,-d8);var kn=[];CSS.ac1(kn,bj,null,!0,!0,em);
var j6=g(kn,h,null,"t");j6=j6?" class=\""+j6+"\"":"";var ko=a4.W4.x,cL=a(bj,e3);ay+="<tspan "+(bK==0?"x=\""+i(a4.W4.x)+"\"":"")+" y=\""+i(d8)+"\""+j6+cL+">"+f(e3)+"</tspan>";
jp+=h_}h.yY.push(U(H+1)+ay)}}h.yY.push(U(H)+"</text>")}else if(hk&&o.rd&&n==null){var gr=hk.Idnt.v,eb=0,dY=hk.Crop?hk.Crop.v:null;
if(h.u5[gr]!=null)eb=h.u5[gr];else{h.Wx++;eb=h.Wx;h.u5[gr]=h.Wx;var aP=q.Td(gr,dY),ig="";if(aP==null)return;
var ks=aP.iw,jC=ar.HB(aP.raw.buffer);if(jC=="pdf"){var cD=new hf("h");ar.pz("PDF").fk(aP.raw.buffer,cD);
cD.jf();cD.Kn();cD.c();cD.eB();if(hk.Crop&&hk.Crop.v==1){X.r7.v$(cD,cD.root.Pe(cD,!0))}var eB=ar.pz("SVG").YU(cD,cD.m,cD.e,null,{Dn:P});
ig="data:image/svg+xml;base64,"+ar.al(eB)}else if(jC=="jpg"||jC=="png"||jC=="gif"||jC=="svg"){var c1={jpg:"image/jpg",png:"image/png",jpg:"image/jpg",svg:"image/svg+xml"};
ig="data:"+c1[jC]+";base64,"+ar.al(aP.raw.buffer)}else{ig=ar.mL(ks[0].buffer,ks[1].m,ks[1].e)}h.LH.push(U(2)+"<image width=\""+ks[1].m+"\" height=\""+ks[1].e+"\" id=\"img"+eb+"\" href=\""+ig+"\"/>")}var dq=d.D.Tn(hk),b$=[];
Z(W,Y,h,b$);if(b$.length!=0)h.yY.push(U(H)+"<g "+I(b$,N)+">");if(L.length!=0)t.push("style=\""+L.join(";")+"\"");
var d7=I(t,N);h.yY.push(U(H)+"<use "+d7+" href=\"#img"+eb+"\" transform=\""+y(dq)+"\"/>");if(b$.length!=0)h.yY.push(U(H)+"</g>")}else if(!W.rect._6()&&(o.rd||B)){if(L.length!=0)t.push("style=\""+L.join(";")+"\"");
var d7=I(t,N),he=W.buffer;if(n)he=en.awa(he,n,W.rect);var k4=W.rect;h.Wx++;var ig=ar.mL(he.buffer,k4.m,k4.e,"png",null,!0);
h.LH.push(U(2)+"<image "+_(B)+" width=\""+W.rect.m+"\" height=\""+W.rect.e+"\" id=\"img"+h.Wx+"\" href=\""+ig+"\"/>");
h.yY.push(U(H)+"<use "+d7+" href=\"#img"+h.Wx+"\" x=\""+k4.x+"\" y=\""+k4.y+"\"/>")}}if(p){H--;h.yY.push(U(H)+"</g>");
p=!1}}function a(q,h){var r=q.VA.Tracking,H="";if(r!=null&&r!=0){r=Math.round(r*q.VA.FontSize/1e3);H=" dx=\"0";
for(var o=1;o<h.length;o++)H+=" "+r;H+="\" "}return H}function _(q){if(q==null)return"";var h=q.HW,r=dU.bs(h);
r=f(r.slice(0,r.length-1));return"aria-label=\""+r+"\" "}function I(q,h){if(h.length!=0)q.push("class=\""+h.join(" ")+"\"");
return q.join(" ")}function f(q){return String(q).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\u0022/g,"&quot;")}function y(q){var h=[q.V,q.J,q.dC,q.xq,q.DX,q.ti];
for(var F=0;F<6;F++)h[F]=i(h[F],3);return"matrix("+h.join(",")+")"}function Z(q,h,r,H){if(h||q.add.artb){var o;
if(h)o=d.o.vb(h.$).Fg;else{var P=q.Dd(),O=d.A.Hg(P);o=Typr.U.pathToSVG({crds:O.j,cmds:O.G},1)}r.Rf++;
H.push("clip-path=\"url(#cp"+r.Rf+")\"");r.LH.push(U(2)+"<clipPath clipPathUnits=\"userSpaceOnUse\" id=\"cp"+r.Rf+"\">");
r.LH.push(U(3)+"<path d=\""+o+"\"/>");r.LH.push(U(2)+"</clipPath>")}}function v(q,h,r,H,o,P){var O=r.vstk,p=r.vmsk,C=r.lmfx,W=[];
if(p&&p.bS!=0){var J=i(p.bS);if(H.UD[J]==null){H.aU++;H.UD[J]=H.aU;H.LH.push(U(2)+"<filter x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" id=\"f"+H.aU+"\"> <feGaussianBlur stdDeviation=\""+J+"\"/> </filter>")}W.push("url(#f"+H.UD[J]+")")}if(C)for(var F=0;
F<aF.order.length;F++){var t=aF.order[F],Y=aF.mh[F],l=C[Y].v;for(var m=0;m<l.length;m++){var B=l[m].v,L=B.classID;
if(!B.enab.v)continue;if(L=="OrGl"||L=="DrSh"){H.aU++;W.push("url(#f"+H.aU+")");var A=0,S=0,M=B.blur.v.val/2.4,N=B.Opct.v.val/100;
if(L=="DrSh"){var s=B.uglg&&B.uglg.v?q.FO():B.lagl.v.val;s=s*(Math.PI/180);var V=B.Dstn.v.val;A=-Math.cos(s)*V;
S=Math.sin(s)*V}if(L=="OrGl")N/=B.Inpr.v.val/100;var g8="<filter x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" id=\"f"+H.aU+"\" >";
g8+="<feDropShadow dx=\""+A+"\" dy=\""+S+"\" stdDeviation=\""+M+"\" flood-color=\""+CSS.W2(B.Clr.v)+"\" flood-opacity=\""+i(N)+"\"/>";
g8+="</filter>";H.LH.push(U(2)+g8)}}}if(W.length!=0)h.push("filter:"+c+W.join(" "));var n=en.nA(C,r),cQ=n[0],hk=n[1];
if(O&&!O.fillEnabled.v)h.push("fill:"+c+"none");else if(cQ){var eG=CSS.W2(cQ.Clr.v);T(h,eG,0)}else if(hk){G(hk,H,o,P);
T(h,"url(#g"+H.ah+")",0)}if(O==null||!O.strokeEnabled.v)O=en.FH(C);if(O&&O.strokeEnabled.v){var ie=O.strokeStyleContent.v,eN=ie.classID;
if(eN=="solidColorLayer")T(h,CSS.W2(ie.Clr.v),1);else{G(ie,H,o,P);T(h,"url(#g"+H.ah+")",1)}var gr=O.strokeStyleOpacity.v.val/100,ek=aF.XM.bh(O),jK=ek.lcap,iE=ek.ljoin,e9=ek.lwidth,dm=ek.sal,gJ=ek.dash;
if(dm==2){e9*=2;h.push("paint-order:stroke fill markers")}if(jK!=0)h.push("stroke-linecap:"+c+["butt","round","square"][jK]);
if(iE!=0)h.push("stroke-linejoin:"+c+["miter","round","bevel"][iE]);if(gr!=1)h.push("stroke-opacity:"+c+i(gr));
if(e9!=1)h.push("stroke-width:"+c+i(e9));if(gJ.length!=0)h.push("stroke-dasharray:"+c+gJ.join(","))}}function G(q,h,r,H){h.ah++;
var o=q.Grad.v,P=JSON.parse(JSON.stringify(o.Clrs.v)),O=JSON.parse(JSON.stringify(o.Trns.v)),p=q.Ofst.v,C=q.Type.v.GrdT,W=C=="Rdl"||C=="Dmnd"?1:0,J=(W==1?"radial":"linear")+"Gradient",t=d.I.R9(q,r),l="";
if(W==0){t[0].x=t[1].x+2*(t[0].x-t[1].x);t[0].y=t[1].y+2*(t[0].y-t[1].y)}var Y=U(2)+"<"+J+" id=\"g"+h.ah+"\"";
if(H.tw){if(h.ah==1)h.LH.push("<linearGradient id=\"P\" gradientUnits=\"userSpaceOnUse\"/>");l=" href=\"#P\""}else l=" gradientUnits=\"userSpaceOnUse\"";
if(W==0)h.LH.push(Y+" x1=\""+i(t[0].x)+"\" y1=\""+i(t[0].y)+"\" x2=\""+i(t[1].x)+"\" y2=\""+i(t[1].y)+"\""+l+">");
if(W==1)h.LH.push(Y+" cx=\""+i(t[0].x)+"\" cy=\""+i(t[0].y)+"\" r=\""+i(bC.Xc(t[0],t[1]))+"\""+l+">");
var m=q.Rvrs.v,B=d.I.d9(o,m),L=H.tw?2:3;for(var F=0;F<B.length;F++){var A=B[F],S=A[0],M=A[1],N=A[2];
N=N==1?"":" stop-opacity=\""+i(N,L)+"\"";var s=S==0&&H.tw?"":" offset=\""+i(S,L)+"\"",V=CSS.Au({Z:M[0]*255,r:M[1]*255,J:M[2]*255});
V=H.tw&&V=="#000000"?"":" stop-color=\""+R(V)+"\"";h.LH.push(U(3)+"<stop"+s+V+N+"/>")}h.LH.push(U(2)+"</"+J+">")}dZ.Uk=y;
return j}();dZ.JE=function(x,Q,c,$,z){var j=[],U=dZ.JE,i=!1,b={ww:x,R0:Q,Ko:[!0,!0,!0],gC:!1,lv:c,a1Z:0};
b.dm=Math.round(Math.max(x,Q)*(.02+U.Tr(b)*.03));b.dk=U.am0(b);b.oL=U.akj(b.dk,(U.Tr(b)<.5?-1:1)*(.2+U.Tr(b)*.3));
if(U.Tr(b)<.5){var e=b.dk;b.dk=b.oL;b.oL=e}b.a48=U.Tr(b)<.4&&U.a7w(b.oL,{Z:1,r:1,J:1})>.3;b.aAf=U.Tr(b)<.5?0:1;
j.push("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 "+x+" "+Q+"\" width=\""+x+"\" height=\""+Q+"\">");
b.wR=$[Math.floor(U.Gi(b)*$.length)];b.Fz=$[Math.floor(U.Gi(b)*$.length)];j.push("<style>");j.push("@font-face {  font-family: "+b.wR[2]+";  src: url(rsrc/fonts/"+b.wR[5]+");  }");
j.push("@font-face {  font-family: "+b.Fz[2]+";  src: url(rsrc/fonts/"+b.Fz[5]+");  }");j.push("</style>");
var k=[0,0,x,Q],K=k;if(z==null)j.push("<path style=\"fill: "+U.j5(b.dk)+"\" d=\""+U.Rect(k[0],k[1],k[2]-k[0],k[3]-k[1])+"\" id=\"Background\" />");
else{b.gC=!0;U.afN(b,k,j,z)}if(U.Tr(b)<.25&&!b.gC){b.Ko[0]=b.Ko[2]=!1;U.anK(k,b,j);K=k}else if(U.Tr(b)<.25||b.gC)K=k;
else{var g=.52+U.Tr(b)*.2;if(U.Tr(b)<.5)g=1-g;var R=k.slice(0),T=k.slice(0);if(U.Tr(b)<.5)R[2]=T[0]=Math.round(g*x);
else R[3]=T[1]=Math.round(g*Q);if(U.Tr(b)<.5){var e=R;R=T;T=e}K=R;U.ab7(b,T,j,z)}U.aj8(b,K,j);j.push("</svg>");
j=j.join("\n");var D=d.R(Math.round(j.length*1.5)),a=w.A9(j,D,0);return[D.buffer.slice(0,a),b.QK]};dZ.JE.anK=function(x,Q,c){var $=dZ.JE,z=x[2]-x[0],j=x[3]-x[1];
if($.Tr(Q)<.5){c.push("<path id=\"Border\" style=\"fill: "+$.j5(Q.oL)+"\" d=\""+$.awN(x[0],x[1],x[2]-x[0],x[3]-x[1],Q.dm)+"\" />")}else if($.Tr(Q)<-.4){$.abc(Q,x,c)}else{var U=$.Tr(Q)<.5?0:1,i=(U==0?j:z)/4,b=$.UT(Q,U,x,c,i,!0),b=$.UT(Q,U+2,x,c,i,!0,b)}};
dZ.JE.aj8=function(x,Q,c){var $=dZ.JE,z="Hello World!-What a beautiful day.-What Is Love?-Baby, don't hurt me.-Is This a Real Life?-Is this a fantasy?-Wake Me Up!-Before you go go.-I Saw The Sign.-And it opened up my mind!".split("-"),j=2*Math.floor($.Tr(x)*z.length/2),U=Q[2]-Q[0],i=Q[3]-Q[1],e=0,K=0;
x.ff=(x.ww+U)*.5*(.04+$.Tr(x)*.05);x.ff=Math.min(x.ff,i*.4,U*.12);x.ff=Math.round(x.ff);var b=Math.min(x.ff*z[j].length*(.35+.3*$.Tr(x)),U*.9),k=(Q[1]+Q[3])/2,g=d.jY(x.dk)<.85?{Z:1,r:1,J:1}:{Z:.1,r:.1,J:.1};
if($.Tr(x)<.25&&x.Ko[0]){K=0;e=Q[0]+x.dm}else if($.Tr(x)<.33&&x.Ko[2]){K=2;e=Q[2]-x.dm}else{K=1;e=(Q[0]+Q[2])/2}var R=g.Z==1?"0,0,0":"255,255,255",T=x.gC&&$.Tr(x)<1;
if(T){var D=Q[0],a=U,_=k-x.ff*1.1,I=x.ff*2.2,f=.7;if(K==1&&$.Tr(x)<.5){D=_=.2*Math.min(U,i);a=U-2*_;
I=i-_-_}else if($.Tr(x)<.7){D=_=0;a=U;I=i;f=.25}c.push("<path id=\"Strip\" style=\"fill: rgb("+R+"); opacity: "+f+"\" d=\""+$.Rect(D,_,a,I)+"\" />")}if($.Tr(x)<.4){var y=x.ff*.07;
y*=1.5+$.Tr(x)*1;if(K==-1&&U/i<3&&!T){c.push("<path id=\"Bar-bottom\" style=\"fill: "+$.j5(g)+"\" d=\""+$.Rect(e-b/2,k+x.ff*1.1-y/2,b,y)+"\" />");
c.push("<path id=\"Bar-top\"    style=\"fill: "+$.j5(g)+"\" d=\""+$.Rect(e-b/2,k-x.ff*1.1-y/2,b,y)+"\" />")}if(K!=1){c.push("<path id=\"Bar\" style=\"fill: "+$.j5(g)+"\" d=\""+$.Rect(e-y/2,k-x.ff*.8,y,x.ff*.8*2)+"\" />");
e+=(K==0?1:-1)*x.ff/3}}var Z=x.ff*.4;c.push($.asB(z[j+1],e,k+Z*1.6,Z,g,K,x.Fz));c.push($.asB(z[j],e,k+x.ff*.04,x.ff,g,K,x.wR))};
dZ.JE.ab7=function(x,Q,c,$){var z=Q[2]-Q[0],j=Q[3]-Q[1],U=Math.max(z,j),i=Math.min(z,j),b=dZ.JE;if(U/i<5&&!x.gC&&!1){b.afN(x,Q,c,$)}else if(b.Tr(x)<0)c.push("<path style=\"fill: "+b.j5(x.oL)+"\" d=\""+b.Rect(Q[0],Q[1],z,j)+"\" />");
else{var e=0;if(Q[3]!=x.R0)e=0;if(Q[2]!=x.ww)e=3;if(Q[0]!=0)e=1;if(Q[1]!=0)e=2;var k=e+2&3;if(U/i<3){var K=b.a87(k),g=K[Math.round(b.Tr(x)*(K.length-1))],R=g.if.slice(0,4),T=R.indexOf(1);
g=JSON.parse(JSON.stringify(g));var D=-1;if(R!="0000"){var a=new bI;if(g.if[5]=="0"){if(T==3&&e==1){D=1;
a.scale(-1,1)}else D=T}else{var _=k;while(_==k)_=Math.floor(b.Tr(x)*4)&3;a.rotate((-T+_)*Math.PI/2)}b.i(g,a)}var I=b.pA(g),f=z-2*x.dm,y=j-2*x.dm;
if(D!=-1){if((D&1)==0)y-=x.dm;else f-=x.dm}var Z=Math.min(f/I.m,y/I.e),v=new bI;v.translate(-I.x,-I.y);
v.scale(Z,Z);var G=(z-I.m*Z)/2,q=(j-I.e*Z)/2;if(D!=-1){if(D==3)G=0;if(D==0)q=0;if(D==1)G=z-I.m*Z;if(D==2)q=j-I.e*Z}v.translate(Q[0]+G,Q[1]+q);
b.Rp(x,g,v,x.oL,c)}else{b.UT(x,e,Q,c,1e9)}}};dZ.JE.afN=function(x,Q,c,$){var z=Q[2]-Q[0],j=Q[3]-Q[1],U=Math.max(z,j),i=Math.min(z,j),b=dZ.JE,e=b.Gi(x),k,K,g,R=$[0]instanceof ArrayBuffer;
if(R){k="data:image/jpg;base64,"+hF.sy($[0]);K=$[1];g=$[2]}else{var T=Math.floor(e*$.length),D=$[T];
x.QK=D;k=D.webformatURL;K=D.webformatWidth;g=D.webformatHeight}var a=Q[0],_=Q[1],I=z,f=j;if(z/j>K/g){f=I*g/K;
_=_-(f-j)/2}else{I=f*K/g;a=a-(I-z)/2}if(R){c.push("<defs>");c.push("<image width=\""+K+"\" height=\""+g+"\" id=\"Background\" href=\""+k+"\" />");
c.push("</defs>");var y=I/K;c.push("<use href=\"#Background\" transform=\""+dZ.Uk(new bI(y,0,0,y,a,_))+"\" />")}else{var Z="cp"+Math.random();
c.push("<clipPath id=\""+Z+"\">");c.push("<path style=\"fill: "+b.j5(x.oL)+"\" d=\""+b.Rect(Q[0],Q[1],z,j)+"\" />");
c.push("</clipPath>");c.push("<image  clip-path=\"url(#"+Z+")\" xlink:href=\""+k+"\" x=\""+a+"\" y=\""+_+"\" width=\""+I+"\" height=\""+f+"\" />")}};
dZ.JE.asB=function(x,Q,c,$,z,j,U){var i=dZ.JE;return"<text x=\""+Q+"\" y=\""+c+"\" style=\"fill:"+i.j5(z)+"; font-size:"+$+"px; text-anchor:"+["start","middle","end"][j]+"; font-family:"+U[2]+";\"><tspan>"+x+"</tspan></text>"};
dZ.JE.Rp=function(x,Q,c,$,z){var j=dZ.JE,U=[];for(var F=0;F<Q.Sr.length;F++){U.push($);if(x.a48){$=(F&1)==x.aAf?{Z:1,r:1,J:1}:U[0]}}z.push("<g id=\""+Q.if.split("-")[2]+":::\" style=\"transform: "+dZ.Uk(c)+";\" >");
for(var F=0;F<Q.Sr.length;F++){var i=Q.Sr[F];$=U.pop();z.push("<path style=\"fill: "+($?j.j5($):"#"+i[0])+"\" d=\""+Typr.U.pathToSVG({crds:i[1].j,cmds:i[1].G})+"\" />")}z.push("</g>")};
dZ.JE.abc=function(x,Q,c){var $=dZ.JE,z=dZ.JE.g4,j=[];for(var F=0;F<z.length;F++){var U=z[F],i=U.if.slice(0,4);
if(i!="1001")continue;j.push(U)}var U=j[Math.floor($.Tr(x)*j.length)];if($.Tr(x)<.5)$.i(U,new bI(0,1,1,0,0,0));
var b=Q[3]-Q[1],e=Q[2]-Q[0],k=$.pA(U),K=.7*Math.min(e,b,.5*Math.max(e,b))/Math.max(k.m,k.e),g=new bI;
g.scale(K,K);if($.Tr(x)<.5){g.scale(1,-1);g.translate(0,b)}$.Rp(x,U,g,x.oL,c);g.rotate(Math.PI);g.translate(e,b);
$.Rp(x,U,g,x.oL,c)};dZ.JE.a87=function(x){var Q=dZ.JE.g4,c=[];for(var F=0;F<Q.length;F++){var $=Q[F],z=$.if.slice(0,4);
if(z=="0000"){c.push($);continue}if(["1000","0100","0010","0001"].indexOf(z)==-1)continue;var j=z.indexOf("1");
if($.if[5]=="0"&&x==j&&j!=3)continue;c.push($)}return c};dZ.JE.UT=function(x,Q,c,$,z,j,U){var i=dZ.JE.g4,b=dZ.JE,e=[],I,f;
for(var F=0;F<i.length;F++){var k=i[F],K=k.if.slice(0,4);if(["1110","1101","1011","0111"].indexOf(K)==-1)continue;
var g=K.indexOf("0")+2&3;if(k.if[5]=="0")if(j==!0||Q!=g&&!(Q==1&&g==3))continue;e.push(k)}var R=U!=null?U:Math.floor(b.Tr(x)*e.length),k=e[R],k=JSON.parse(JSON.stringify(k)),K=k.if.slice(0,4),g=K.indexOf("0")+2&3;
if(g==3&&Q==1)d.i(k,new bI(1,0,0,-1,0,1e3));var T=new bI;T.translate(-500,-500);T.rotate(-g*Math.PI/2);
T.translate(500,500);b.i(k,T);var D=c[3]-c[1],a=c[2]-c[0],_=b.pA(k);if(_.y<0){_.e+=_.y;_.y=0}if(_.y>0){_.e+=_.y;
_.y=0}if((Q&1)==0){f=D;I=a}else{I=D;f=a}var y=Math.min(Math.min(.5+.5*b.Tr(x))*Math.min(a,D),z)/_.e,Z=Math.ceil(I/(1e3*y)),v=new bI,G=new bI;
G.scale(y,y);if(Q==0||Q==2){G.translate(-(a/2),-(D/2));G.rotate(-Q*Math.PI/2);G.translate(a/2+c[0],D/2+c[1])}else{G.rotate(Math.PI/2);
G.scale(1,-1);G.translate(c[0],c[1]);if(Q==1){G.scale(-1,1);G.translate(a,0)}}$.push("<g id=\"Border-"+["top","right","bottom","left"][Q]+":::\">");
for(var F=0;F<Z;F++){var q=v.clone();q.concat(G);b.Rp(x,k,q,x.oL,$);v.translate(1e3-2,0)}$.push("</g>");
return R};dZ.JE.Rect=function(x,Q,c,$){return Typr.U.pathToSVG({crds:[x,Q,x+c,Q,x+c,Q+$,x,Q+$],cmds:["M","L","L","L","Z"]})};
dZ.JE.awN=function(x,Q,c,$,z){var j=[x,Q,x+c,Q,x+c,Q+$,x,Q+$];x+=z;Q+=z;c-=2*z;$-=2*z;j.push(x,Q,x,Q+$,x+c,Q+$,x+c,Q);
return Typr.U.pathToSVG({crds:j,cmds:"M L L L Z M L L L Z".split(" ")})};dZ.JE.akj=function(x,Q){var c=d.Zb(x.Z,x.r,x.J);
c.UZ=Math.max(.1,Math.min(.9,c.UZ+Q));return d.qs(c.R0,c.ks,c.UZ)};dZ.JE.ajK=function(x,Q){var c=d.Zb(x.Z,x.r,x.J);
c.R0+=Q;return d.qs(c.R0,c.ks,c.UZ)};dZ.JE.a9U=function(x){var Q=d.Zb(x.Z,x.r,x.J);Q.UZ=1-Q.UZ;return d.qs(Q.R0,Q.ks,Q.UZ)};
dZ.JE.a7w=function(x,Q){var c=x.Z-Q.Z,$=x.r-Q.r,z=x.J-Q.J;return Math.sqrt(c*c+$*$+z*z)};dZ.JE.am0=function(x){var Q=dZ.JE;
return{Z:Q.Tr(x),r:Q.Tr(x),J:Q.Tr(x)}};dZ.JE.j5=function(x){return CSS.Au({Z:x.Z*255,r:x.r*255,J:x.J*255})};
dZ.JE.pA=function(x){var Q=x.Sr,c=new gh;for(var F=0;F<Q.length;F++)c=c.iO(d.A.pA(Q[F][1].j));return c};
dZ.JE.i=function(x,Q){var c=x.Sr;for(var F=0;F<c.length;F++)d.A.i(c[F][1].j,Q,c[F][1].j)};dZ.JE.Tr=function(x){x.a1Z++;
var Q=x.a1Z&3;if(Q==0)x.lv=dZ.JE.fo(x.lv);var c=x.lv>>>8*Q&255;return c*(.99999999/255)};dZ.JE.Gi=function(x){var Q=dZ.JE.fo(x.lv);
x.lv=dZ.JE.fo(Q);return Q*(1/4294967295)};dZ.JE.fo=function(x){x=(x^61^x>>>16)>>>0;x=x+(x<<3)>>>0;x=(x^x>>>4)>>>0;
x=x*668265261>>>0;x=(x^x>>>15)>>>0;return x};dZ.JE.g4=[{if:"0001-0-bird",Sr:[["4b3c34",{G:"M C L C C L Z M C C L C C L Z M C L C L Z M C L C C L Z".split(" "),j:[208,16,253,5,247,86,228,104,218,108,253,60,235,12,211,18,210,18,209,17,208,16,208,16,187,140,238,125,326,133,319,189,318,198,307,210,299,207,297,205,307,208,316,195,317,188,320,126,208,137,174,149,187,140,137,75,156,79,177,94,164,157,173,147,177,101,165,79,142,75,137,75,368,59,165,59,182,233,0,210,0,225,161,250,194,61,364,63,367,61,368,59,368,59,368,59]}],["3c7040",{G:"M C C C C C L Z M C C C C L Z M C C C C L Z M C C C C L Z M C C C C C L Z M C C C C L Z M C C C C Z".split(" "),j:[345,123,324,113,331,70,284,80,287,79,310,89,314,103,314,104,306,90,284,82,281,81,270,85,268,86,274,117,335,119,345,123,345,123,270,0,283,29,282,58,244,66,258,62,265,40,269,27,265,37,256,56,249,58,242,31,263,18,270,0,270,0,89,100,81,136,47,182,101,196,90,189,92,157,91,145,94,160,93,191,109,195,148,158,96,129,89,100,89,100,230,187,201,240,160,226,133,198,150,191,172,197,187,198,166,193,153,190,134,193,159,162,207,194,230,187,230,187,126,177,131,159,129,150,119,139,122,122,145,112,147,97,166,128,164,155,134,168,139,154,146,142,145,131,143,145,133,159,126,177,126,177,209,86,195,86,166,91,173,109,177,102,181,97,191,96,180,99,174,113,175,113,194,114,200,96,209,86,209,86,278,175,254,167,235,168,231,143,245,143,248,151,256,158,252,147,243,144,240,142,276,147,265,171,278,175]}],["b588c1",{G:"M C C C C C C C C C C C C L Z".split(" "),j:[189,40,188,42,186,44,184,47,184,52,183,55,181,59,175,70,160,78,147,79,142,79,131,78,127,75,118,74,95,71,93,70,89,70,88,70,69,72,74,66,82,68,93,65,78,64,83,62,95,59,128,50,128,33,155,29,162,16,180,13,189,31,193,31,196,34,198,37,197,37,193,39,189,40,189,40]}]]},{if:"0001-0-bird2",Sr:[["ff7f2a",{G:"M L L L Z M L L L Z".split(" "),j:[296,0,296,62,335,62,296,0,357,0,357,62,318,62,357,0]}],["b588c1",{G:"M C C C C C C C C C C C L Z".split(" "),j:[321,48,344,48,379,67,396,121,408,176,396,230,337,255,303,265,265,268,217,235,191,217,170,188,186,180,195,177,199,187,205,192,203,185,199,178,207,172,217,165,224,178,225,182,227,196,231,203,250,206,273,205,290,196,292,165,289,133,269,118,268,101,267,77,288,49,321,48,321,48]}],["74439e",{G:"M C C C C C C L Z M C C Z".split(" "),j:[337,187,329,202,317,204,304,204,293,204,284,205,293,224,286,216,278,209,268,214,257,220,262,237,269,243,284,258,310,256,323,243,337,227,339,208,337,187,337,187,340,77,310,78,287,81,315,96,269,83,309,75,340,77]}],["000000",{G:"M L L L Z M L L L Z".split(" "),j:[326,258,334,315,323,316,326,258,298,262,296,318,286,317,298,262]}],["4b3c34",{G:"M L C C C C C C C C L Z".split(" "),j:[0,272,0,336,63,296,119,296,175,320,205,330,229,339,278,338,322,337,354,322,405,325,443,329,482,332,501,377,501,366,502,348,474,328,464,320,440,312,384,309,296,309,300,333,186,293,118,264,54,250,0,272,0,272]}],["3c7040",{G:"M C C C Z M C C C Z M C C C L Z M C C C L Z M C C C L Z M C C C Z".split(" "),j:[58,260,44,247,27,239,20,208,15,188,32,182,43,198,59,227,56,242,58,260,181,323,167,336,150,345,143,375,138,396,155,401,166,385,182,356,179,342,181,323,60,260,79,249,100,243,113,214,122,194,102,186,86,200,62,227,65,242,60,260,60,260,499,378,479,377,462,372,435,388,417,399,425,415,444,411,476,403,484,390,499,378,499,378,501,379,494,397,482,411,488,442,491,463,511,461,514,442,520,410,508,397,501,379,501,379,503,378,513,390,516,402,531,413,546,421,557,412,548,401,534,382,519,379,503,378]}]]},{if:"0000-1-flower",Sr:[["7a59a2",{G:"M C C C C C C C Z M C C C C C C L Z M C C C C C C C L Z M C C C C C C L Z M C C C C C C C L Z M C C C C C C L Z M C C C C C C C L Z M C C C C C C L Z".split(" "),j:[468,470,411,473,371,480,351,495,332,509,322,536,325,581,325,601,328,621,325,637,346,634,371,638,397,637,427,636,456,626,465,611,478,596,485,553,489,490,477,489,470,483,468,470,445,563,435,583,425,591,415,590,401,588,401,572,410,549,388,558,375,557,369,546,366,533,374,524,390,517,416,506,441,498,465,495,463,519,455,542,445,563,445,563,489,450,486,392,480,352,465,332,451,313,425,302,380,305,360,305,340,307,324,304,327,324,322,350,323,376,323,406,332,435,347,444,362,457,405,465,468,470,469,458,476,451,489,450,489,450,395,424,376,415,368,405,369,394,371,380,387,380,410,390,402,368,403,355,414,349,427,346,436,355,443,370,454,397,460,422,463,446,439,443,417,435,395,424,395,424,508,470,566,468,606,462,626,447,645,433,656,407,654,362,654,342,652,322,655,306,634,309,609,304,583,305,553,305,524,314,514,329,501,344,493,387,488,449,500,451,507,457,508,470,508,470,534,377,544,357,554,350,564,351,578,353,578,369,568,392,590,384,604,385,609,396,612,409,603,418,588,425,561,435,536,442,512,445,515,421,523,399,534,377,534,377,488,490,492,547,499,587,514,607,528,626,554,636,600,633,619,632,640,630,656,633,652,612,656,587,655,560,655,531,645,502,629,493,614,480,571,473,508,469,507,481,501,488,488,490,488,490,582,513,602,523,610,533,609,543,607,557,591,557,568,548,577,570,576,583,565,589,552,592,542,584,535,568,524,542,517,517,514,493,538,495,560,503,582,513,582,513]}]]},{if:"0000-1-flower",Sr:[["d13777",{G:"M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z".split(" "),j:[474,503,457,528,452,530,450,528,450,523,469,498,464,493,388,522,332,552,314,585,297,628,322,660,372,639,361,698,421,709,450,665,467,649,477,596,482,505,474,503,474,503,439,563,431,563,424,556,424,548,424,539,431,532,439,532,447,532,454,539,454,548,454,556,447,563,439,563,462,475,432,467,429,463,430,460,435,458,465,469,468,463,417,399,371,356,335,348,288,345,265,379,300,420,241,428,249,488,301,503,321,513,374,507,462,483,462,475,462,475,394,460,391,452,396,444,404,441,412,438,420,443,423,451,426,459,421,467,413,470,405,473,396,468,394,460,484,455,483,424,486,419,489,420,492,424,492,456,498,457,543,389,570,332,566,294,554,249,515,238,487,284,461,231,406,256,408,310,405,333,427,381,477,458,484,455,484,455,477,385,484,380,494,382,499,389,504,396,502,405,496,410,489,415,479,414,474,407,469,400,471,390,477,385,511,470,539,459,545,461,545,463,542,467,512,477,513,483,592,505,654,513,688,497,728,472,726,432,674,419,717,378,675,334,625,353,602,356,563,393,506,464,511,470,511,470,575,442,581,447,583,456,578,463,573,470,563,472,557,467,550,462,548,452,553,445,558,438,568,437,575,442,505,499,524,523,524,529,521,531,517,529,498,503,492,506,496,588,508,650,533,677,570,707,607,693,603,639,656,667,685,614,651,572,641,551,594,525,509,493,505,499,505,499,551,552,548,560,540,564,532,561,524,559,519,550,522,542,524,534,533,530,541,532,549,535,554,543,551,552]}]]},{if:"0000-1-flower",Sr:[["ffac42",{G:"M C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z M C C C C Z".split(" "),j:[646,471,646,446,626,426,601,426,599,426,597,426,595,427,596,426,598,424,599,423,616,406,616,378,599,360,581,343,553,343,536,360,534,361,533,363,532,364,532,363,532,361,532,359,532,335,512,315,488,315,463,315,443,335,443,359,443,361,443,363,443,365,442,364,441,363,440,362,422,344,394,344,377,362,359,379,359,407,377,425,378,426,380,427,381,429,379,428,378,428,376,428,351,428,331,448,331,473,331,498,351,518,376,518,378,518,380,517,382,517,381,518,379,519,378,521,361,538,361,566,378,584,396,601,424,601,441,584,443,582,444,581,445,579,445,581,445,583,445,584,445,609,465,629,490,629,514,629,534,609,534,584,534,582,534,580,534,579,535,580,536,581,537,582,555,600,583,600,600,582,618,565,618,537,600,519,599,518,597,516,596,515,598,515,599,516,601,516,626,516,646,496,646,471,489,552,444,552,409,516,409,472,409,428,444,392,489,392,533,392,569,428,569,472,569,516,533,552,489,552]}]]},{if:"0000-1-flower",Sr:[["d04040",{G:"M C C L L C C C C L L C C L L C C C C L C C C C L Z M C C C Z M C C C L Z M C C C L Z".split(" "),j:[691,424,690,369,680,330,660,303,634,320,601,361,568,406,568,406,568,327,578,326,585,317,585,306,585,294,576,284,564,284,552,284,542,294,542,306,542,317,550,326,560,327,560,406,559,406,540,359,522,311,501,291,475,319,453,360,433,407,431,406,431,327,441,326,448,317,448,306,448,294,439,284,427,284,415,284,405,294,405,306,405,317,412,326,423,327,423,404,390,363,360,326,341,308,296,401,299,489,360,567,396,613,443,639,500,638,624,636,694,524,692,424,691,424,389,543,370,514,379,498,399,504,439,518,470,564,488,613,455,600,414,580,389,543,481,480,488,445,505,441,515,459,533,497,524,552,501,599,487,567,472,523,481,480,481,480,624,523,610,563,565,595,515,613,528,580,548,538,585,514,614,494,629,503,624,523,624,523]}]]},{if:"0000-1-flower",Sr:[["ec7272",{G:"M C C C C Z M C C C C Z M C C C C L Z M C C C C L Z M C C C C Z M C C C C L Z".split(" "),j:[447,475,452,450,452,438,437,423,422,407,407,412,390,383,398,418,421,415,433,434,445,453,446,474,447,475,495,446,520,439,529,433,535,412,542,390,529,380,546,351,520,376,533,394,523,414,513,434,495,445,495,446,545,473,564,490,574,495,595,490,617,485,620,469,653,468,619,459,610,479,587,480,565,482,546,472,545,473,545,473,549,533,543,558,543,569,559,585,574,601,589,596,606,624,597,590,575,592,563,573,551,555,550,534,549,533,549,533,504,562,480,570,470,575,464,596,458,618,470,628,454,657,479,632,466,614,476,594,486,575,504,563,504,562,459,536,440,519,430,513,409,518,387,524,384,539,351,540,385,549,394,529,417,528,439,527,457,536,459,536,459,536]}],["333333",{G:"M C C C C C C C C C C C C L Z M C C C C C C C C C C C C L Z M C C C C C C C C C C C C L Z M C C C C C C C C C C C C L Z M C C C C C C C C C C C C L Z M C C C C C C C C C C C C L Z".split(" "),j:[534,455,584,415,579,358,577,335,574,315,585,304,585,304,585,304,568,308,561,312,554,316,520,333,500,363,479,392,493,437,486,456,479,476,452,485,452,485,452,485,471,474,475,454,479,434,460,402,482,365,505,328,565,292,597,294,612,295,591,298,587,316,583,333,593,373,584,404,574,440,533,456,534,455,534,455,559,506,619,530,666,497,685,483,701,471,716,475,716,475,716,475,704,463,697,459,690,454,657,434,622,431,587,428,554,462,534,465,513,469,492,451,492,451,492,451,511,461,530,455,549,448,568,416,611,417,654,418,716,452,730,481,737,495,724,478,706,483,689,489,660,516,628,524,592,534,558,506,559,506,559,506,524,552,534,615,586,640,607,649,625,657,629,672,629,672,629,672,634,655,634,647,634,639,636,601,621,569,606,537,560,525,547,509,534,494,539,466,539,466,539,466,539,488,554,501,569,514,607,514,627,552,648,590,650,660,632,687,623,700,631,680,617,667,605,656,566,644,543,621,517,594,524,551,524,552,524,552,467,546,417,585,421,643,424,665,426,686,415,697,415,697,415,697,432,693,439,689,446,684,481,667,501,638,521,609,508,563,515,544,522,524,548,515,548,515,548,515,530,527,526,546,522,566,540,598,518,635,496,672,436,709,404,706,388,705,409,702,413,684,417,667,408,628,417,596,426,561,467,544,467,546,467,546,442,495,383,472,336,504,317,518,301,530,286,526,286,526,286,526,298,539,305,543,312,547,344,568,380,571,415,574,448,539,468,536,488,532,510,551,510,551,510,551,490,540,471,547,452,553,434,585,391,584,348,583,286,550,272,521,265,507,278,524,296,518,313,513,342,485,373,477,409,468,444,495,442,495,442,495,476,449,467,386,415,361,394,352,375,344,371,329,371,329,371,329,366,346,366,354,366,362,364,400,379,433,394,465,440,476,453,492,467,508,462,535,462,535,462,535,461,513,446,500,431,487,394,487,373,449,352,411,350,341,368,314,377,301,369,321,383,334,396,345,434,357,457,380,483,407,477,450,476,449,476,449]}]]},{if:"0000-0-hearts",Sr:[["d17070",{G:"M C C C C C C C C C L Z".split(" "),j:[415,584,413,585,411,586,409,587,392,596,389,620,395,633,401,647,414,663,450,668,485,674,487,681,494,690,491,679,487,673,507,643,527,613,524,593,518,579,512,566,493,552,475,558,467,561,451,566,448,586,435,578,423,581,415,584,415,584]}],["6bcc6b",{G:"M C C C C C C C C C L Z".split(" "),j:[595,451,593,449,590,448,588,448,563,439,537,457,529,475,521,493,516,520,542,560,568,601,563,609,559,623,568,611,571,602,618,595,666,589,684,567,692,550,700,532,697,501,674,488,665,482,645,472,622,486,619,465,606,456,595,451,595,451]}],["5c5cc2",{G:"M C C C C C C C C C L Z".split(" "),j:[341,362,338,364,335,366,332,368,304,385,301,424,312,446,323,468,345,494,405,501,465,508,468,520,480,534,475,516,468,506,499,455,531,404,524,370,514,348,503,325,470,304,440,315,427,320,401,331,397,364,374,351,355,356,341,362,341,362]}]]},{if:"0000-0-anchor",Sr:[["2a3b66",{G:"M C C C C L Z M C C C C C C C C C C C C C C L C C C C C C C C C C C C C L C C C C C C C C C C C C C L Z".split(" "),j:[495,315,490,315,488,318,489,323,491,328,502,326,502,320,502,317,501,316,497,315,496,315,496,315,495,315,495,315,496,303,509,303,521,320,514,327,511,330,513,345,517,348,519,350,531,352,546,354,570,357,572,357,578,354,588,347,592,351,592,369,592,385,588,390,580,385,576,383,570,383,552,384,524,387,519,389,517,397,515,404,517,515,520,554,522,583,525,599,530,606,534,610,555,617,565,617,584,616,607,602,635,572,639,568,641,566,644,563,633,559,616,557,616,557,675,533,675,533,671,605,669,609,667,611,664,591,658,577,657,579,657,580,656,582,628,638,603,660,565,664,545,666,521,672,514,675,512,677,507,682,504,688,501,693,497,698,496,698,494,698,490,693,487,688,484,682,480,677,477,675,471,672,447,666,427,664,391,660,367,640,340,591,335,604,332,621,331,619,329,615,325,544,325,544,384,568,384,568,368,569,357,573,385,602,408,616,426,617,437,617,458,610,461,606,466,599,470,583,472,554,474,515,476,404,475,397,473,389,468,387,440,384,422,383,416,383,412,385,403,390,400,385,400,369,400,351,403,347,414,354,419,357,421,357,446,354,460,352,473,350,475,348,478,345,481,330,478,327,470,320,483,303,496,303,496,303]}]]},{if:"0000-1-leaf",Sr:[["fbb600",{G:"M L L L L L L C L L C L C L C C C C C L C C C C C C C C C L C C C C C C C C C C C C C L L L L Z".split(" "),j:[642,726,633,723,632,707,591,631,570,582,526,521,537,547,535,579,517,598,501,619,486,602,414,634,412,606,379,609,346,611,394,557,406,547,401,539,386,532,319,519,337,508,332,493,320,478,326,464,302,450,287,436,303,436,324,441,330,432,346,434,359,434,359,415,377,428,397,431,417,432,442,440,437,418,417,416,406,372,401,370,395,367,389,355,417,363,408,339,406,323,416,312,427,303,417,276,433,295,444,297,452,294,479,321,490,313,496,294,503,322,510,329,517,338,522,353,530,371,530,379,546,402,551,389,555,378,578,333,606,333,628,304,652,280,646,306,644,327,657,329,649,356,658,374,679,384,666,392,656,415,645,432,627,457,653,451,661,457,692,460,698,473,715,481,697,485,678,488,669,509,656,523,655,533,666,539,659,537,659,542,643,531,630,535,613,543,608,539,598,535,594,542,590,553,590,566,594,564,596,569,568,575,551,543,531,519,575,577,597,628,639,708,642,726]}]]},{if:"0000-1-acorn",Sr:[["a05a2c",{G:"M C C C C C C C L Z".split(" "),j:[506,453,450,426,413,422,398,444,374,480,374,533,384,573,391,602,407,625,430,645,451,658,487,654,509,647,554,633,587,605,612,565,635,527,591,500,565,482,557,476,515,457,506,453,506,453]}],["502d16",{G:"M C C C C C C C C C C C Z".split(" "),j:[640,524,639,539,623,540,623,540,627,522,607,504,583,488,547,465,507,445,470,434,439,426,412,417,400,437,400,437,391,424,400,414,434,370,498,356,551,376,555,349,583,317,597,321,612,326,621,346,620,350,619,354,594,352,584,368,580,375,577,382,575,387,619,412,649,460,640,524]}]]},{if:"0000-0-skull",Sr:[["808080",{G:"M C L C C L C L C C C C C C C L C L C C C C C C C C L C C L C L C C C C C C C L C L C L C C C C C C Z M C C C C Z M C C C C Z M L L L Z".split(" "),j:[396,410,398,415,398,420,398,424,420,437,433,404,465,382,501,382,538,382,569,404,582,435,602,424,602,419,603,415,604,410,604,410,609,392,622,379,633,382,643,384,648,402,643,420,643,421,642,421,642,422,643,422,643,422,644,422,662,427,675,440,672,450,669,461,652,465,633,460,628,459,624,457,620,455,589,473,588,491,582,507,572,520,607,540,611,538,615,536,620,535,639,530,656,535,659,545,662,556,649,568,630,573,630,574,629,574,629,574,629,574,629,575,629,575,634,594,630,611,619,614,609,617,596,604,591,585,590,580,589,576,589,571,565,557,564,592,536,619,501,619,466,619,438,591,437,557,412,572,411,576,411,580,410,585,410,585,405,604,392,617,381,614,371,611,366,593,371,575,371,574,371,574,372,574,371,573,371,573,370,573,352,568,339,556,342,545,345,534,362,530,381,535,385,536,390,538,394,540,430,519,421,507,415,491,414,475,380,455,376,457,372,459,367,460,367,460,349,465,331,461,328,450,326,440,338,427,357,422,357,422,358,422,358,422,358,421,358,421,358,420,353,402,357,384,368,381,379,379,391,391,396,410,463,439,445,439,431,453,431,470,431,488,445,502,463,502,480,502,494,488,494,470,494,453,480,439,463,439,540,439,522,439,508,453,508,470,508,488,522,502,540,502,557,502,571,488,571,470,571,453,557,439,540,439,483,528,518,528,500,503,483,528]}]]},{if:"0000-0-ghost",Sr:[["e6e6e6",{G:"M C C C C C C C C C C L Z M C C C C C C C C Z M C C Z".split(" "),j:[653,486,653,574,689,597,689,638,689,661,640,644,620,656,601,666,609,682,583,692,563,700,538,666,512,666,490,666,451,695,433,686,415,677,416,646,388,644,367,641,313,671,313,648,313,619,346,588,346,486,346,388,415,308,500,308,584,308,653,388,653,486,653,486,449,396,428,396,412,415,412,439,412,462,428,482,449,482,465,482,478,470,484,454,489,470,503,482,519,482,539,482,556,462,556,439,556,415,539,396,519,396,503,396,489,407,484,423,478,407,465,396,449,396,482,505,441,505,465,560,482,560,503,560,524,505,482,505]}],["000000",{G:"M C C C C Z M C C C C Z".split(" "),j:[526,446,526,455,519,462,510,462,501,462,494,455,494,446,494,437,501,430,510,430,519,430,526,437,526,446,475,446,475,455,468,462,459,462,450,462,442,455,442,446,442,437,450,430,459,430,468,430,475,437,475,446]}]]},{if:"1001-1-rose",Sr:[["9e1460",{G:"M C C C C C C C C C Z M C C C C C C C C C Z".split(" "),j:[568,83,558,83,548,88,539,96,538,98,536,99,535,101,522,115,513,134,517,149,522,172,561,200,592,207,604,210,611,215,615,221,622,234,611,258,611,258,613,260,615,264,618,264,627,266,638,241,640,236,660,188,614,83,568,83,526,125,527,97,567,68,593,75,616,81,642,121,649,152,651,165,656,172,662,176,675,183,698,173,698,173,698,173,698,173,698,173,704,176,705,179,705,180,706,189,681,199,678,200,678,200,677,201,677,201,627,220,524,170,526,125]}],["020304",{G:"M C C C C C Z M C C C C C Z M C C C C C Z M C C C C Z".split(" "),j:[60,151,60,151,37,125,60,98,83,72,95,91,115,66,134,42,117,26,120,30,123,34,146,83,132,114,114,154,60,151,60,151,280,70,280,70,258,97,283,122,308,147,318,127,339,150,361,173,344,190,347,186,350,182,370,132,354,101,333,62,280,70,280,70,61,150,61,150,27,143,30,108,33,73,54,81,55,50,57,19,33,16,38,17,43,19,91,44,98,78,107,121,61,150,61,150,-27,185,184,158,222,43,352,32,444,24,538,97,538,97,538,97,453,45,354,48,241,51,185,170,-27,185]}]]},{if:"1001-1-curls",Sr:[["53a7ab",{G:"M C C C C C C C C C C C C C C C C L Z M C C C C C C C C C C C C C C C C L Z M C C C C C C C C C C C C C C C C C C C C C L Z".split(" "),j:[68,114,121,103,159,110,183,135,212,169,211,204,189,237,162,277,124,291,86,276,52,263,38,236,47,202,55,168,79,151,121,156,147,162,165,177,160,205,155,228,135,241,113,237,97,234,92,221,96,205,98,195,105,194,115,200,124,205,133,204,135,197,139,183,122,167,95,171,68,176,54,193,68,220,84,252,131,261,165,238,201,202,199,164,158,136,118,113,52,122,-23,151,2,134,33,122,68,114,68,114,71,83,119,75,163,79,198,107,226,129,247,174,271,207,291,229,316,241,342,232,370,222,394,206,418,209,443,212,461,238,485,258,500,272,522,276,543,271,543,271,524,279,518,281,500,287,483,277,466,256,453,243,441,230,427,223,413,217,392,220,372,229,372,230,371,230,370,230,354,241,337,251,315,250,283,248,253,222,229,172,209,133,178,106,137,94,103,84,52,94,-30,133,-3,108,30,91,71,83,71,83,83,54,122,46,166,49,195,67,219,82,250,122,290,168,308,186,330,194,355,192,393,183,400,145,383,118,372,101,355,91,328,91,313,92,303,98,300,109,298,116,299,125,304,131,315,147,327,152,340,149,349,149,354,132,343,131,330,131,326,129,328,120,332,97,355,100,365,114,381,137,367,165,343,168,321,170,289,150,288,117,290,77,319,58,352,64,388,74,405,104,404,141,403,177,382,202,345,207,312,211,284,191,260,161,245,141,229,122,213,106,196,84,166,73,129,67,80,62,28,79,-26,108,10,79,46,63,83,54,83,54]}],["bbdc54",{G:"M C C C C C L Z M C C C C C L Z M C C C C L Z M C C C C L Z M C C C C C C C C C L Z M C C C C C C C C C C C C C C C C C C C C C C C C C C C C C L Z".split(" "),j:[321,315,287,324,252,312,211,219,217,284,239,326,279,341,324,352,362,329,398,291,316,305,258,269,217,196,238,284,274,319,321,315,321,315,211,261,223,300,234,345,252,374,220,378,194,367,193,324,194,306,198,288,206,270,197,315,204,340,221,351,206,327,202,297,211,261,211,261,206,246,193,301,170,317,138,297,162,281,184,254,205,222,201,246,191,267,174,283,186,279,197,267,206,246,206,246,378,233,370,286,337,299,294,270,312,277,330,276,347,267,294,278,259,252,234,203,280,259,327,278,378,233,378,233,626,217,604,273,555,313,511,315,484,316,438,289,432,232,450,253,488,296,511,291,532,286,551,277,566,261,527,269,498,263,480,243,478,241,478,237,480,235,486,230,504,220,519,226,537,233,551,242,567,241,591,236,611,228,626,217,626,217,411,192,432,183,439,166,420,136,443,144,460,158,466,182,470,165,456,149,430,133,459,136,485,145,505,165,503,143,463,133,434,128,486,127,526,124,539,118,505,123,470,124,435,122,461,111,483,96,500,76,475,95,450,110,424,118,450,96,465,72,466,48,458,75,440,98,419,112,424,106,428,99,428,91,429,68,413,57,393,51,419,70,426,92,411,110,408,77,385,58,343,52,383,26,422,25,445,62,458,47,465,29,467,8,477,27,479,51,475,76,497,64,515,49,528,29,524,57,515,82,496,103,521,113,549,111,579,99,560,122,535,136,502,137,518,149,521,173,514,205,505,181,492,166,476,158,483,188,470,205,447,216,456,183,451,166,438,157,444,193,426,211,379,207,403,193,416,172,416,140,434,156,428,173,411,192,411,192]}]]},{if:"0111-0-pines",Sr:[["e9e9e9",{G:"M C C C C C C C C L L L Z".split(" "),j:[0,946,0,946,54,960,99,944,149,927,182,954,205,956,245,960,298,940,382,974,435,995,478,957,538,956,571,955,597,969,631,968,663,967,701,938,749,944,805,950,851,960,893,946,950,928,1e3,946,1e3,946,1e3,1e3,0,1e3,0,946]}],["437a26",{G:"M C L C C C L L C C L L L L L C Z M C L C C C L L C C L L L L L C Z M C L C C C L L C C L L L L L C Z M C L C C C L L C C L L L L L C Z M C L C C C L L C C L L L L L C Z".split(" "),j:[119,801,120,801,148,859,148,859,137,853,137,853,155,890,155,891,156,892,138,887,140,888,141,888,171,925,171,925,126,924,125,943,125,943,105,944,106,944,107,944,106,924,106,924,61,925,93,886,77,891,100,854,89,860,89,860,119,801,119,801,286,871,286,871,303,905,303,905,296,902,296,902,307,924,307,924,307,925,297,922,297,922,298,922,316,944,316,944,289,944,289,955,289,955,277,956,278,956,278,956,278,944,278,944,251,944,270,921,260,924,274,902,268,906,268,906,285,871,286,871,526,863,526,863,546,903,546,903,538,899,538,899,550,924,550,925,550,926,539,922,540,922,540,922,561,948,561,948,530,947,529,960,529,960,516,961,517,961,518,961,517,947,517,947,486,948,508,921,497,925,513,899,505,903,505,903,526,863,526,863,731,841,731,841,752,883,752,883,744,879,744,879,757,907,757,908,758,908,745,905,746,905,747,905,769,932,769,932,736,932,735,946,735,946,721,946,721,946,722,947,721,932,721,932,688,932,712,903,700,908,717,880,709,884,709,884,731,841,731,841,889,826,889,826,914,876,914,876,904,871,904,871,920,904,920,905,920,906,906,901,907,902,908,902,934,934,934,934,894,933,894,950,894,950,877,951,878,951,879,951,878,933,878,933,838,934,866,900,852,905,872,872,862,877,862,877,889,826,889,826]}]]},{if:"0111-0-flowers",Sr:[["8cae40",{G:"M C L C C C L C C L C C C L C C C L C C L C C L Z M C L C C C L C C L C C C L C C C L C C L C C L Z M C L C C C L C C L C C C L C C C L C C L C C L Z M C L C C C L C C L C C C L C C C L C C L C C L Z".split(" "),j:[182,866,160,879,146,903,135,929,135,844,177,842,228,831,230,796,231,770,207,765,182,779,160,792,146,816,135,843,135,713,135,711,134,710,132,710,130,710,128,711,128,713,128,841,117,815,103,791,82,779,57,764,33,769,34,795,36,830,86,841,128,844,128,930,117,903,103,880,82,867,57,853,33,858,34,884,36,919,86,930,128,932,128,1009,128,1010,130,1012,132,1012,134,1012,135,1010,135,1009,135,931,177,928,228,918,230,882,231,856,207,851,182,866,182,866,447,904,430,898,412,904,394,916,394,861,413,873,431,879,447,873,458,868,458,852,447,848,430,841,412,848,394,859,394,788,394,787,393,786,391,786,389,786,388,787,388,788,388,859,370,847,352,841,336,848,325,852,325,868,336,873,352,879,370,873,388,862,388,915,370,904,352,898,336,904,325,909,325,925,336,929,352,936,370,930,388,918,388,1009,388,1010,389,1011,391,1011,393,1011,394,1010,394,1009,394,918,413,930,431,936,447,929,458,925,458,909,447,904,447,904,662,943,650,954,641,972,634,993,634,914,659,907,680,895,692,873,707,846,686,836,662,859,650,870,641,888,634,909,634,818,634,816,632,815,631,815,629,815,628,816,628,818,628,908,621,887,612,870,600,859,576,836,555,846,570,873,582,895,603,907,628,914,628,992,621,971,612,954,600,943,576,920,555,930,570,957,582,978,603,990,628,998,628,1009,628,1010,629,1011,631,1011,632,1011,634,1010,634,1009,634,998,659,991,680,978,692,957,707,930,686,920,662,943,662,943,892,842,875,857,862,882,850,912,850,822,874,817,896,805,908,778,919,755,896,751,877,769,866,779,857,796,850,815,850,737,850,736,848,735,847,735,845,735,844,736,844,737,844,815,836,795,828,779,817,769,798,751,775,755,785,777,797,804,820,817,844,822,844,912,832,882,818,857,801,842,772,816,737,822,753,854,772,894,806,911,844,918,844,1009,844,1010,845,1011,847,1011,848,1011,850,1010,850,1009,850,918,887,911,922,894,941,854,957,822,922,816,892,842,892,842]}],["d13777",{G:"M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M C C C C C C C Z M C C C C C C L Z M C C C C C C C L Z M C C C C C C L Z M C C C C C C C L Z M C C C C C C L Z M C C C C C C C L Z M C C C C C C L Z M C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z M C C C C Z M C C L L C C C C L L C C L L C C C C L C C C C L Z M C C C Z M C C C L Z M C C C L Z".split(" "),j:[125,603,115,617,112,619,110,618,111,615,122,600,119,597,75,614,43,631,32,650,22,675,36,694,65,682,59,716,94,722,111,696,120,687,126,657,129,604,125,603,125,603,104,638,99,638,95,634,95,629,95,624,99,620,104,620,109,620,113,624,113,629,113,634,109,638,104,638,117,587,100,582,98,579,99,578,102,577,119,583,121,580,92,543,65,517,44,513,17,512,4,531,24,555,-10,560,-6,594,24,603,36,609,67,605,118,591,118,587,117,587,78,578,77,573,79,568,84,567,88,565,93,568,95,573,96,577,94,582,89,584,85,585,80,583,78,578,130,575,130,557,131,554,133,555,135,557,135,575,138,576,164,537,180,504,177,482,171,456,148,449,132,476,117,445,85,460,86,491,84,504,97,532,126,577,130,575,130,575,126,535,130,532,136,533,139,537,142,541,141,546,137,549,133,552,127,551,125,547,122,543,122,538,126,535,146,584,162,577,165,578,166,580,164,582,146,588,147,591,193,604,229,609,249,600,271,585,271,562,240,554,265,530,241,505,212,516,199,518,176,539,143,580,146,584,146,584,183,567,187,570,187,576,185,580,182,584,176,585,172,582,168,579,167,573,170,569,173,565,179,565,183,567,142,601,153,615,153,618,152,619,149,618,138,603,135,605,137,652,144,688,159,704,180,721,202,713,199,681,230,698,246,667,227,643,221,631,194,616,145,597,142,601,142,601,169,631,167,636,162,638,158,637,153,635,151,630,152,625,154,621,159,618,163,620,168,621,170,626,169,631,376,691,343,693,320,697,309,706,297,714,291,729,294,756,294,767,295,779,294,788,305,786,320,788,335,788,353,787,369,782,375,773,382,764,386,739,388,703,381,702,377,699,376,691,363,745,357,757,351,761,345,761,337,760,337,751,343,737,330,742,322,742,319,735,317,728,322,723,331,718,346,712,360,708,374,706,373,720,369,733,363,745,363,745,388,680,387,646,383,623,375,612,366,600,351,594,325,596,314,596,302,597,293,595,295,607,292,622,292,637,292,654,298,671,306,676,315,684,340,689,376,692,377,684,381,680,388,680,388,680,334,665,323,659,318,654,319,648,320,639,329,640,343,645,338,632,339,625,345,621,352,620,358,625,362,634,368,649,372,664,373,677,360,676,347,671,334,665,334,665,399,691,433,690,456,686,467,678,479,670,485,655,484,629,484,617,482,606,484,597,472,598,458,595,442,596,425,596,409,601,403,610,395,618,391,643,388,679,395,680,399,684,399,691,399,691,414,638,420,626,426,622,432,622,440,624,440,633,434,646,447,641,455,642,458,648,459,656,454,661,445,665,430,671,416,675,402,677,403,663,408,650,414,638,414,638,388,703,390,736,394,759,403,770,411,782,426,788,452,785,464,785,475,784,485,785,483,774,485,759,485,744,484,726,479,710,470,704,461,697,436,693,400,691,399,698,395,702,388,703,388,703,442,716,453,722,458,728,458,734,456,742,447,742,434,736,439,749,438,757,432,760,425,762,419,757,415,748,409,733,404,719,403,705,416,706,429,710,442,716,442,716,722,716,722,701,710,690,696,690,695,690,694,690,693,690,693,689,694,689,695,688,705,678,705,662,695,651,685,641,668,641,658,651,658,652,657,653,656,654,656,653,656,652,656,651,656,637,645,625,630,625,616,625,605,637,605,651,605,652,605,653,605,654,604,654,604,653,603,652,593,642,576,642,566,652,556,662,556,679,566,689,567,690,568,690,569,691,568,691,567,691,566,691,552,691,540,702,540,717,540,731,552,743,566,743,567,743,568,743,569,742,569,743,568,744,567,744,557,754,557,771,567,781,577,791,594,791,604,781,605,780,605,779,606,778,606,779,606,780,606,781,606,795,617,807,632,807,646,807,657,795,657,781,657,780,657,779,657,778,658,779,658,779,659,780,669,790,686,790,696,780,706,770,706,754,696,743,695,743,694,742,693,741,694,741,695,741,696,741,710,741,722,730,722,716,631,762,605,762,585,742,585,716,585,691,605,670,631,670,657,670,677,691,677,716,677,742,657,762,631,762,958,602,957,570,951,547,940,532,925,541,905,565,887,591,886,591,886,546,892,545,897,540,897,533,897,527,891,521,884,521,877,521,872,527,872,533,872,540,876,545,882,546,882,591,882,591,870,564,860,536,848,525,833,541,820,565,808,592,807,592,807,546,813,545,817,540,817,533,817,527,812,521,805,521,798,521,792,527,792,533,792,540,797,545,802,546,802,590,784,567,766,545,755,534,729,588,731,639,766,684,787,711,814,726,847,725,919,724,960,659,958,602,958,602,783,671,772,653,777,645,789,648,812,656,830,682,840,711,821,704,797,692,783,671,836,634,840,614,850,612,856,622,867,644,861,676,848,703,840,684,831,659,836,634,836,634,919,659,911,682,885,701,856,711,863,692,875,668,896,654,913,642,922,647,919,659,919,659]}]]},{if:"1101-1-confetti",Sr:[["e789ff",{G:"M C C C C C Z M C C C C C C C Z M C C C C C C C Z M C C C C C Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z".split(" "),j:[170,439,169,438,59,370,108,300,152,238,298,276,318,337,338,398,265,380,285,358,312,328,185,247,121,307,72,353,171,440,170,439,318,338,336,399,262,408,184,346,138,309,73,237,112,174,167,88,345,115,377,222,393,276,296,260,335,236,375,212,236,111,155,183,73,254,265,380,285,358,312,328,318,338,318,338,377,222,394,276,318,288,243,236,187,197,146,120,201,56,254,-5,365,26,407,68,407,68,414,94,378,71,344,50,258,31,221,89,178,154,297,260,336,235,374,211,377,222,377,222,406,70,452,115,432,189,324,115,214,39,323,-85,322,-85,320,-85,229,38,331,100,439,166,413,95,377,72,343,51,364,28,406,70,346,405,369,418,356,441,333,428,346,405,513,298,536,311,523,334,500,321,513,298,891,91,914,104,901,127,878,114,891,91,24,123,47,136,34,159,11,146,24,123,664,33,687,46,674,69,651,56,664,33,910,482,933,495,920,518,897,505,910,482]}],["666666",{G:"M C C C C C Z M C C C C C C C Z M C C C C C C C Z M C C C C C Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z".split(" "),j:[919,442,917,443,802,510,764,432,730,364,837,250,901,261,965,272,913,329,903,301,889,262,755,338,777,424,794,490,920,442,919,442,901,261,964,274,936,345,842,386,787,410,690,435,654,370,604,279,716,132,827,153,883,164,821,244,819,197,817,150,659,228,682,335,706,443,913,329,903,301,889,262,901,261,901,261,827,153,884,163,857,238,774,281,711,313,622,313,593,233,564,157,647,71,705,54,705,54,732,60,694,82,658,102,599,170,632,231,669,301,822,244,819,197,816,150,827,153,827,153,706,54,769,34,825,87,706,149,583,213,527,56,526,57,526,59,590,200,696,137,807,70,732,60,694,82,658,102,648,73,706,54,362,328,383,340,371,361,350,349,362,328,52,189,73,201,61,222,40,210,52,189,509,119,530,131,517,152,496,140,509,119,912,16,933,28,921,49,900,37,912,16,629,380,650,392,638,413,617,401,629,380,77,414,98,426,86,447,65,435,77,414,240,76,261,88,249,109,228,97,240,76]}]]},{if:"1101-1-branch",Sr:[["7f500b",{G:"M C C C L C C Z M C C C L C C Z M C C C L C C Z M C C C L C C Z M C C C L C C Z M C C C L C C Z".split(" "),j:[144,-14,144,-14,149,-12,150,-12,150,-12,106,22,86,75,63,137,93,193,69,238,64,236,89,174,53,146,80,72,99,19,144,-14,144,-14,280,-18,281,-18,276,-20,276,-20,276,-20,282,23,264,64,244,113,196,129,185,168,189,170,209,120,244,123,269,66,288,25,280,-18,280,-18,429,-5,429,-5,434,-4,434,-4,435,-4,405,28,396,72,386,124,415,164,402,203,398,202,410,150,379,132,391,70,399,26,429,-5,429,-5,514,-7,514,-7,519,-12,519,-12,520,-12,532,50,577,96,630,151,703,150,738,197,733,201,681,144,635,166,571,101,526,54,514,-7,514,-7,666,-67,666,-68,663,-65,662,-64,662,-64,704,-52,734,-18,768,22,763,72,793,99,796,96,760,57,778,26,737,-22,708,-56,666,-67,666,-67,936,-8,936,-8,932,-9,931,-9,931,-9,947,32,938,76,927,127,884,154,881,194,886,195,895,142,930,138,943,76,952,32,936,-8,936,-8]}],["5c7f0b",{G:"M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z".split(" "),j:[119,6,121,16,113,31,81,33,58,34,27,27,27,27,27,27,53,5,70,-1,93,-9,117,-4,119,6,124,8,132,1,151,12,165,33,179,54,180,87,180,87,180,87,153,75,139,60,122,41,115,14,124,8,78,74,82,83,76,97,48,103,27,108,-2,105,-2,105,-2,105,19,81,33,74,53,64,75,65,78,74,83,75,90,68,108,76,124,93,139,110,144,140,144,140,144,140,117,132,104,121,85,105,76,83,83,75,72,152,75,159,72,172,48,179,30,185,6,185,6,185,6,185,22,163,33,156,49,145,68,145,72,152,76,153,81,146,98,151,112,165,126,178,133,203,133,203,133,203,110,199,97,190,80,178,70,160,76,153,73,206,75,213,71,224,49,228,34,232,12,230,12,230,12,230,28,212,39,206,53,199,70,200,73,206,76,207,81,202,95,207,107,220,118,233,122,255,122,255,122,255,102,250,92,241,78,230,71,213,76,207,70,232,78,236,76,252,66,269,56,286,33,297,33,297,33,297,33,274,39,260,46,241,62,228,70,232,285,3,278,8,274,21,291,39,304,52,325,63,325,63,325,63,323,36,316,24,308,7,291,-2,285,3,281,1,280,-7,263,-10,244,-5,224,1,205,20,205,20,205,20,228,27,244,25,264,22,283,10,281,1,270,65,264,69,259,80,272,99,281,112,299,125,299,125,299,125,300,100,296,88,290,72,277,61,270,65,267,64,267,56,252,51,234,53,216,56,197,71,197,71,197,71,216,80,230,80,249,80,267,72,267,64,231,116,225,119,220,128,230,145,237,157,251,170,251,170,251,170,254,148,251,138,248,123,237,113,231,116,228,114,229,108,217,102,201,103,186,103,168,115,168,115,168,115,184,124,196,126,212,127,228,121,228,114,201,148,196,151,192,160,202,174,209,184,222,194,222,194,222,194,223,175,220,166,216,154,206,145,201,148,198,147,198,141,187,137,174,139,160,141,145,152,145,152,145,152,160,159,171,159,185,160,198,153,198,147,188,165,182,163,173,174,170,190,167,205,173,224,173,224,173,224,186,210,191,198,197,183,195,166,188,165,415,10,417,18,413,31,389,36,371,39,347,37,347,37,347,37,364,16,377,9,393,0,412,2,415,10,418,11,424,4,440,11,453,27,466,43,470,69,470,69,470,69,448,62,436,52,420,38,412,17,418,11,391,69,394,76,392,89,371,96,355,102,333,103,333,103,333,103,346,81,357,74,371,64,388,63,391,69,395,70,399,63,414,68,428,80,441,92,448,116,448,116,448,116,427,113,415,105,400,94,390,77,395,70,395,133,398,139,397,150,379,158,367,164,348,167,348,167,348,167,358,148,366,140,377,130,391,128,395,133,398,134,401,128,414,130,427,140,439,149,447,169,447,169,447,169,429,167,418,162,404,154,394,140,398,134,401,177,404,182,402,192,386,198,374,202,358,203,358,203,358,203,368,187,375,181,386,173,399,172,401,177,404,178,408,173,419,176,429,185,439,194,445,212,445,212,445,212,429,210,420,204,408,196,401,183,404,178,402,198,408,201,409,214,403,229,397,244,381,255,381,255,381,255,378,236,381,224,385,208,396,196,402,198,519,23,531,26,543,42,528,75,518,99,495,125,495,125,495,125,485,87,487,67,490,40,508,19,519,23,523,19,521,7,542,-6,571,-8,600,-10,636,6,636,6,636,6,609,27,586,32,557,39,526,32,523,19,570,100,581,102,594,115,585,147,579,170,562,197,562,197,562,197,548,163,547,145,547,120,560,98,570,100,574,97,570,86,587,72,613,66,639,60,673,71,673,71,673,71,652,93,632,101,607,110,578,107,574,97,649,149,659,150,670,160,666,188,662,208,650,232,650,232,650,232,635,205,633,189,631,168,640,149,649,149,652,146,648,137,662,123,683,116,705,109,734,116,734,116,734,116,718,137,702,145,681,155,657,155,652,146,707,178,715,179,724,189,718,213,714,230,701,250,701,250,701,250,690,225,690,211,689,193,699,177,707,178,710,175,707,167,720,156,739,151,759,147,784,155,784,155,784,155,768,172,753,177,734,185,713,183,710,175,732,194,740,189,757,199,770,218,782,237,783,266,783,266,783,266,758,254,746,240,730,223,724,199,732,194,687,-62,688,-54,699,-45,722,-53,739,-59,759,-73,759,-73,759,-73,733,-82,719,-82,701,-81,685,-71,687,-62,684,-60,676,-62,666,-48,662,-28,659,-9,669,17,669,17,669,17,684,-1,689,-16,696,-35,692,-57,684,-60,737,-23,738,-15,746,-5,768,-9,784,-12,804,-23,804,-23,804,-23,782,-34,769,-36,752,-38,736,-30,737,-23,734,-20,727,-24,716,-13,711,5,705,22,711,46,711,46,711,46,727,33,734,20,742,3,742,-17,734,-20,766,35,766,41,772,50,792,48,806,47,823,40,823,40,823,40,805,28,795,26,780,23,766,28,766,35,763,37,758,33,747,42,741,56,735,70,738,91,738,91,738,91,753,81,760,71,768,57,769,40,763,37,782,76,783,82,789,89,806,86,818,84,832,76,832,76,832,76,816,67,806,66,794,65,782,70,782,76,780,78,775,75,766,84,762,97,758,110,762,128,762,128,762,128,775,118,779,108,786,95,785,80,780,78,792,94,788,100,794,112,807,122,819,131,839,133,839,133,839,133,832,116,823,107,812,95,796,89,792,94,945,11,939,18,938,31,959,45,974,55,997,62,997,62,997,62,989,36,980,25,968,11,950,5,945,11,941,11,938,3,921,3,903,13,885,22,871,45,871,45,871,45,894,47,909,42,929,35,944,19,941,11,944,75,938,80,935,93,952,108,964,119,984,128,984,128,984,128,980,104,974,93,965,78,949,70,944,75,940,75,938,67,923,65,906,71,889,77,873,96,873,96,873,96,894,101,908,99,926,95,942,82,940,75,916,133,911,137,907,147,920,162,930,172,946,182,946,182,946,182,944,160,940,151,933,137,921,129,916,133,913,132,912,125,899,123,884,127,869,130,854,145,854,145,854,145,871,151,883,150,899,148,913,139,913,132,893,171,888,175,887,184,899,196,908,204,923,211,923,211,923,211,920,193,915,184,909,173,897,167,893,171,890,170,889,165,877,163,864,168,851,172,839,187,839,187,839,187,855,190,865,188,879,186,891,176,890,170,884,190,877,190,871,202,871,218,871,234,881,251,881,251,881,251,891,234,893,222,896,206,890,190,884,190]}]]},{if:"1101-1-sticks",Sr:[["ec7272",{G:"M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z".split(" "),j:[260,148,297,180,286,192,249,160,260,148,114,31,161,47,155,63,109,47,114,31,931,91,902,52,915,42,945,81,931,91,711,19,746,-15,758,-3,723,31,711,19,812,161,782,122,795,112,825,151,812,161,389,34,424,0,436,12,401,46,389,34,431,209,465,175,477,186,442,221,431,209,282,90,282,41,299,41,299,90,282,90,58,233,29,194,42,184,72,223,58,233,574,58,621,74,615,90,569,74,574,58]}],["0000ff",{G:"M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z".split(" "),j:[722,208,733,161,717,157,706,205,722,208,843,12,797,28,802,44,849,28,843,12,31,74,60,35,47,25,18,64,31,74,220,21,185,-13,173,-1,208,33,220,21,140,166,170,127,157,117,127,156,140,166,558,148,523,114,511,126,546,160,558,148,562,9,516,25,521,41,568,25,562,9,697,105,726,66,713,56,684,95,697,105,961,180,990,141,977,131,948,170,961,180,399,97,353,113,358,129,405,113,399,97]}]]},{if:"1101-1-dots",Sr:[["ec7272",{G:"M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z".split(" "),j:[154,47,144,47,136,39,136,29,136,19,144,11,154,11,164,11,172,19,172,29,172,39,164,47,154,47,272,164,262,164,254,156,254,146,254,136,262,128,272,128,282,128,290,136,290,146,290,156,282,164,272,164,529,48,519,48,511,40,511,30,511,20,519,12,529,12,539,12,547,20,547,30,547,40,539,48,529,48,696,101,686,101,678,93,678,83,678,73,686,65,696,65,706,65,714,73,714,83,714,93,706,101,696,101,929,91,919,91,911,83,911,73,911,63,919,55,929,55,939,55,947,63,947,73,947,83,939,91,929,91]}],["0000ff",{G:"M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z".split(" "),j:[66,122,56,122,48,114,48,104,48,94,56,86,66,86,76,86,84,94,84,104,84,114,76,122,66,122,309,55,299,55,291,47,291,37,291,27,299,19,309,19,319,19,327,27,327,37,327,47,319,55,309,55,785,180,775,180,767,172,767,162,767,152,775,144,785,144,795,144,803,152,803,162,803,172,795,180,785,180,459,147,449,147,441,139,441,129,441,119,449,111,459,111,469,111,477,119,477,129,477,139,469,147,459,147,811,48,801,48,793,40,793,30,793,20,801,12,811,12,821,12,829,20,829,30,829,40,821,48,811,48]}],["88a500",{G:["M","C","C","Z"],j:[389,224,389,224,410,230,410,230,410,230,389,224,389,224]}]]},{if:"1101-1-strips",Sr:[["ffc88c",{G:"M L L L L Z M L L L L Z M L L L L Z".split(" "),j:[-40,0,44,0,137,99,53,99,-40,0,296,0,380,0,473,99,389,99,296,0,632,0,716,0,809,99,725,99,632,0]}],["88a500",{G:"M L L L L Z M L L L L Z M L L L L Z".split(" "),j:[128,0,212,0,305,99,221,99,128,0,464,0,548,0,641,99,557,99,464,0,800,0,884,0,977,99,893,99,800,0]}],["88a500",{G:["M","C","C","Z"],j:[407,217,407,217,428,223,428,223,428,223,407,217,407,217]}]]},{if:"1101-1-circs",Sr:[["ec7272",{G:"M C C C C Z M C C C C Z".split(" "),j:[61,209,27,209,0,181,0,147,0,113,27,86,61,86,96,86,123,113,123,147,123,181,96,209,61,209,551,209,517,209,489,181,489,147,489,113,517,86,551,86,585,86,612,113,612,147,612,181,585,209,551,209]}],["217995",{G:"M C C C C Z M C C C C Z".split(" "),j:[303,209,269,209,241,181,241,147,241,113,269,86,303,86,337,86,364,113,364,147,364,181,337,209,303,209,799,209,765,209,738,181,738,147,738,113,765,86,799,86,834,86,861,113,861,147,861,181,834,209,799,209]}],["88a500",{G:["M","C","C","Z"],j:[530,273,530,273,551,279,551,279,551,279,530,273,530,273]}]]},{if:"1101-1-squares",Sr:[["014ea7",{G:"M L L L L Z M L L L L Z".split(" "),j:[0,120,124,120,124,244,0,244,0,120,497,120,621,120,621,244,497,244,497,120]}],["fc54ff",{G:"M L L L L Z M L L L L Z".split(" "),j:[249,120,373,120,373,244,249,244,249,120,746,120,870,120,870,244,746,244,746,120]}],["88a500",{G:["M","C","C","Z"],j:[389,354,389,354,410,360,410,360,410,360,389,354,389,354]}]]},{if:"1101-0-christmas",Sr:[["014ea7",{G:"M C C C C Z M C C C C Z M L L L L Z".split(" "),j:[255,480,178,480,116,418,116,341,116,264,178,202,255,202,332,202,394,264,394,341,394,418,332,480,255,480,255,232,236,232,221,217,221,198,221,179,236,164,255,164,274,164,289,179,289,198,289,217,274,232,255,232,251,-152,260,-152,260,248,251,248,251,-152]}],["ff9518",{G:"M C C C C Z M C C C C Z M L L L L Z".split(" "),j:[746,623,669,623,607,561,607,484,607,407,669,345,746,345,823,345,885,407,885,484,885,561,823,623,746,623,747,376,728,376,713,361,713,342,713,323,728,308,747,308,766,308,781,323,781,342,781,361,766,376,747,376,742,-8,751,-8,751,392,742,392,742,-8]}]]}];
var cx={};cx.parse=function(x){var Q=new Uint8Array(x),c=null;if(Q[0]==80&&Q[1]==75){var $=Date.now(),z=UZIP.parse(Q.buffer),c=z["document.json"];
c=JSON.parse(w.IV(c,0,c.length));cx.lr(c,z)}else{var j=jX.parse(x);c=cx.agD(j[2][0][1])}return c};cx.lr=function(x,Q){var c=typeof x;
if(c=="string"||c=="number"||c=="boolean"||x==null)return x;if(x instanceof Array){for(var F=0;F<x.length;
F++)x[F]=cx.lr(x[F],Q);return x}var $=x._class;if($==null)return x;if($=="MSJSONFileReference"){var z=x._ref;
if(!1){}else if(Q[z+".json"]!=null){var j=Q[z+".json"],U=j.length;for(var F=0;F<U;F++)if(j[F]==11||j[F]==3)j[F]=32;
var i=w.IV(j,0,U);x=JSON.parse(i)}else if(Q[z+".png"]!=null)return{key:z.split("/").pop(),bdata:Q[z+".png"]};
else if(Q[z+".jpg"]!=null)return{key:z.split("/").pop(),bdata:Q[z+".jpg"]};else if(Q[z+".pdf"]!=null)return{key:z.split("/").pop(),bdata:Q[z+".pdf"]};
else if(Q[z]!=null)return{key:z.split("/").pop(),bdata:Q[z]};else{console.log(x,Q);return}}else if($=="MSAttributedString"){var i=atob(x.archivedAttributedString._archive),b=i.length,e=new Uint8Array(b);
for(var F=0;F<b;F++)e[F]=i.charCodeAt(F);x.archivedAttributedString=cx.agD(e)}for(var k in x)x[k]=cx.lr(x[k],Q);
return x};cx.aj5=function(x,Q,c,$){if(x instanceof Uint8Array)return null;if($.indexOf(x)!=-1)return null;
$.push(x);if(x==Q)return c;for(var z in x){c.push(z);var j=cx.aj5(x[z],Q,c,$);if(j){console.log(x,j);
throw"e"}c.pop()}};cx.agD=function(x){var Q=i3.parse(x,0),c=Q.$objects,$=new Uint8Array(c.length),z=cx.Ru(c,$,Q.$top.root);
for(var F=0;F<c.length;F++)if($[F]==0&&F!=0){console.log(F,c[F]);cx.aj5(z,F,[],[])}for(var F=0;F<c.length;
F++){var j=c[F];if(j._class&&(j._class=="bitmap"||j._class=="fill"&&j.fillType==4&&(j.image||j.imageSHA))){var U=j.image,i=j.imageSHA,b=null,e=null;
if(U=="$null")U=null;if(i=="$null")i=null;if(U&&U.data){e=U.sha1["NS.bytes"];e=btoa(w.mt(e,0,e.length));
b=U.data instanceof Uint8Array?U.data:U.data["NS.bytes"]}else if(U==null&&i==null){var k=ar.pz("PNG").YU([[d.R(4).buffer]],1,1);
b=new Uint8Array(k)}else{var K=(z.assets?z.assets.imageCollection:z.images).images;if(i)e=i instanceof Uint8Array?i:i["NS.bytes"];
else e=U.sha1["NS.bytes"];e=btoa(w.mt(e,0,e.length));var b=K[e].data;if(b["NS.bytes"])b=b["NS.bytes"]}b=new Uint8Array(b.buffer.slice(b.byteOffset,b.byteOffset+b.length));
delete j.imageSHA;j.image={key:e,bdata:b}}}return z};cx.awq=function(x){return x.slice(0,11)=="MSImmutable"?"MS"+x.slice(11):x};
cx.Ru=function(x,Q,c){var $=x[c];if(Q[c]==1){return $}Q[c]=1;if(typeof $=="string")return $;if(typeof $=="number")return $;
if(typeof $=="boolean")return $;if($ instanceof Array)return $;if($ instanceof Uint8Array){return $}if(x[$.$class]==null){if($.$class==null&&$["NS.data"]!=null)return $;
console.log(c,$);throw"e"}var z=x[$.$class],j=cx.awq(z.$classname);Q[$.$class]=1;$.$class=j;if(cx.adA[j]){delete $.$class;
$._class=cx.adA[j]}var U=cx.Ru;if(j=="NSMutableArray"||j=="NSArray"){var i=[];if($["NS.objects"]!=null)for(var F=0;
F<$["NS.objects"].length;F++)i.push(U(x,Q,$["NS.objects"][F]));else for(var F=0;$["NS.object."+F]!=null;
F++)i.push(U(x,Q,$["NS.object."+F]));x[c]=i;return i}if(j=="NSDictionary"||j=="NSMutableDictionary"){var b={$class:j};
if($["NS.keys"]!=null)for(var F=0;F<$["NS.keys"].length;F++){var e=U(x,Q,$["NS.keys"][F]);if(e instanceof Uint8Array)e=btoa(cx.EY.mt(e,0,e.length));
else if(typeof e!="string"&&typeof e!="number")e=btoa(cx.EY.mt(e["NS.bytes"],0,e["NS.bytes"].length));
b[e]=U(x,Q,$["NS.objects"][F])}else for(var F=0;$["NS.key."+F]!=null;F++){var e=U(x,Q,$["NS.key."+F]);
if(e instanceof Uint8Array)e=btoa(cx.EY.mt(e,0,e.length));else if(typeof e!="string"&&typeof e!="number")e=btoa(cx.EY.mt(e["NS.bytes"],0,e["NS.bytes"].length));
b[e]=U(x,Q,$["NS.object."+F])}for(var k in $)delete $[k];for(var k in b)$[k]=b[k];return $}if(j=="NSURL")return{$class:j,base:U(x,Q,$["NS.base"]),relative:U(x,Q,$["NS.relative"])};
if(cx.a8e.indexOf(j)!=-1){x[c]=U(x,Q,$.array_do);return x[c]}if($.do_objectID!=null)$.do_objectID=U(x,Q,$.do_objectID);
if(cx.ago.indexOf(j)!=-1)return $;var K=cx.atM[j];if(K==null){console.log(x,$);throw"unknown class "+j}for(var F=0;
F<K.length;F++)if($[K[F]]!=null)$[K[F]]=U(x,Q,$[K[F]]);if(j=="MSTextLayer"){var g=$,R,T,D,a;if(g.attributedString)R=g.attributedString.archivedAttributedString;
else R=g.storage;a=R.NSString;if(typeof a!="string")a=w.IV(a["NS.bytes"],0,a["NS.bytes"].length);if(R.NSAttributeInfo)T=R.NSAttributeInfo["NS.bytes"];
else{var _=a.length,I=[];while(_>0){var f=Math.min(100,_);I.push(f,0);_-=f}T=new Uint8Array(I)}D=R.NSAttributes instanceof Array?R.NSAttributes:[R.NSAttributes];
var y={$class:"NSAttributedString",NSString:a,NSAttributes:D};g.attributedString={_class:"MSAttributedString",archivedAttributedString:y};
y.NSAttributeInfo={$class:"NSMutableData","NS.data":T};delete g.storage}return $};cx.EY={_C:function(x,Q){return x[Q+1]<<8|x[Q]},q:function(x,Q){return x[Q+3]<<24|x[Q+2]<<16|x[Q+1]<<8|x[Q]},mt:function(x,Q,c){var $="";
for(var F=0;F<c;F++)$+=String.fromCharCode(x[Q+F]);return $}};cx.adA={MSPage:"page",MSArtboardGroup:"artboard",MSShapeGroup:"shapeGroup",MSLayerGroup:"group",MSBitmapLayer:"bitmap",MSTextLayer:"text",MSSliceLayer:"slice",MSSymbolMaster:"symbolMaster",MSSymbolInstance:"symbolInstance",MSStyleFill:"fill",MSShapePathLayer:"shapePath",MSRectangleShape:"rectangle",MSOvalShape:"oval",MSTriangleShape:"triangle"};
cx.a8e=["MSArray","MSFillStyleCollection","MSBorderStyleCollection","MSShadowStyleCollection","MSInnerShadowStyleCollection"];
cx.ago="MSArchivedColor MSLayoutGrid MSSimpleGrid MSColor MSRect MSStyleColorControls MSGraphicsContextSettings NSMutableString NSMutableData NSDecimalNumberPlaceholder MSStyleReflection".split(" ");
cx.atM={MSAssetCollection:["gradients","colors","imageCollection","images"],MSImageCollection:["images"],MSSharedStyleContainer:["objects"],MSSharedTextStyleContainer:["objects"],MSSharedLayerStyleContainer:["objects"],MSSharedLayerTextStyleContainer:["objects"],MSSharedLayerContainer:["objects"],MSSymbolContainer:["objects"],MSGradient:["stops","from","to","points"],MSGradientStop:["color"],MSStyleFill:["color","gradient","contextSettings","image","imageSHA"],MSExportFormat:["fileFormat","name"],MSExportOptions:["exportFormats","includedLayerIds","sizes"],MSRulerData:["guides"],MSStyle:"textStyle fills contextSettings sharedObjectID borders blur shadows innerShadows borderOptions colorControls reflection".split(" "),MSSharedStyle:["name","value"],MSSymbol:["name","value"],MSAttributedString:["archivedAttributedString"],MSSharedLayerStyle:["name","value","instances"],MSSharedLayer:["name","value","instances"],MSDocumentData:"assets layerStyles pages layerTextStyles layerSymbols images userInfo".split(" "),MSShapePathLayer:"exportOptions frame name userInfo path originalObjectID".split(" "),MSOvalShape:"exportOptions frame name userInfo path originalObjectID".split(" "),MSRectangleShape:"exportOptions frame name userInfo path originalObjectID".split(" "),MSPolygonShape:"exportOptions frame name userInfo path originalObjectID".split(" "),MSTriangleShape:"exportOptions frame name userInfo path originalObjectID".split(" "),MSStarShape:"exportOptions frame name userInfo path originalObjectID".split(" "),MSBitmapLayer:"exportOptions frame name userInfo style imageSHA nineSliceCenterRect nineSliceScale image clippingMask originalObjectID".split(" "),MSTextLayer:"exportOptions frame name userInfo style originalObjectID attributedString glyphBounds storage".split(" "),MSShapeGroup:"exportOptions frame name userInfo style originalObjectID layers".split(" "),MSLayerGroup:"exportOptions frame name userInfo style originalObjectID layers sharedObjectID".split(" "),MSArtboardGroup:"exportOptions frame name userInfo style layers horizontalRulerData verticalRulerData layout grid backgroundColor".split(" "),MSPage:"exportOptions frame name userInfo style layers horizontalRulerData verticalRulerData layout grid scrollOrigin".split(" "),MSSymbolMaster:"exportOptions frame name userInfo style layers horizontalRulerData verticalRulerData layout grid originalObjectID symbolID backgroundColor".split(" "),MSSymbolInstance:"exportOptions frame name userInfo style symbolID overrides masterInfluenceBounds originalObjectID".split(" "),MSSliceLayer:["exportOptions","frame","name","userInfo","backgroundColor"],MSTextStyle:["attributes","encodedAttributes"],MSShapePath:["points"],MSPointArray:["points"],MSImageData:["data","sha1","name"],MSCurvePoint:["curveFrom","curveTo","point"],MSImageProxy:["sha1"],MSStyleBorder:["color","gradient","contextSettings"],MSStyleBlur:["center"],MSStyleShadow:["color","contextSettings"],MSStyleInnerShadow:["color","contextSettings"],MSExportSize:["format","name"],MSStyleBorderOptions:["dashPattern"],NSFont:["NSName","NSDescriptor"],NSColor:["NSCustomColorSpace"],NSFontDescriptor:["NSFontDescriptorAttributes"],NSMutableParagraphStyle:["NSTextBlocks","NSTabStops","NSTextLists"],NSAttributedString:["NSAttributes","NSString","NSAttributeInfo"],NSTextStorage:["NSAttributeInfo","NSAttributes","NSString"],NSColorSpace:["NSICC"],NSParagraphStyle:["NSTabStops","NSTextBlocks","NSTextLists"],NSTextList:["NSMarkerFormat"],NSTextTab:["NSTabOptions"],UIFontDescriptor:["UIFontDescriptorAttributes"]};
var i3={};i3.parse=function(x,Q){var c=w.mt(x,Q,8);Q+=8;var $=x.length-32,z=i3.parse.aif(x,$),j=[];if(z.Nx==1){var Q=$-z.Nx*z.Nd;
for(var F=0;F<z.Nd;F++)j.push(x[Q+F])}else if(z.Nx==2){var Q=$-z.Nx*z.Nd;for(var F=0;F<z.Nd;F++)j.push(w._C(x,Q+F*2))}else if(z.Nx==4){var Q=$-z.Nx*z.Nd;
for(var F=0;F<z.Nd;F++)j.push(w.q(x,Q+F*4))}else{throw"e"}var U=i3.parse.Ru(x,j,z.root,z);return U};
i3.parse.Ru=function(x,Q,c,$){var z=i3.EY,j=$.ar2,U=j==4?z.q:j==2?z._C:z.arZ,i=i3.parse,b=Q[c],e=x[b],k=e>>4,K=e&15,R=null;
b+=1;if([4,5,6,10,12,13].indexOf(k)!=-1&&K==15){var g=i.c4(x,b);b+=g.bc;K=g.b}if(!1){}else if(k==0)R=K==8?!1:K==9?!0:null;
else if(k==1)R=i.c4(x,b-1).b;else if(k==2)R=1<<K==4?w.lw(x,b):w.rY(x,b);else if(k==3)R=w.rY(x,b);else if(k==4)R=new Uint8Array(x.buffer,b,K);
else if(k==5)R=w.mt(x,b,K);else if(k==6)R=w.fy(x,b,K);else if(k==8){R=0;for(var F=0;F<K+1;F++)R=R<<8|x[b+F]}else if(k==10){R=[];
for(var F=0;F<K;F++)R.push(i.Ru(x,Q,U(x,b+j*F),$))}else if(k==12){R=[];for(var F=0;F<K;F++)R.push(i.Ru(x,Q,U(x,b+j*F),$))}else if(k==13){R={};
for(var F=0;F<K;F++){var T=i.Ru(x,Q,U(x,b+j*F),$),D=i.Ru(x,Q,U(x,b+j*(K+F)),$);R[T]=D}}else throw"unknown mask "+k;
return R};i3.parse.c4=function(x,Q){var c=1<<(x[Q]&15),$=0;for(var F=0;F<c;F++)$=$<<8|x[Q+1+F];return{b:$,bc:c+1}};
i3.parse.aif=function(x,Q){var c={};Q+=6;c.Nx=x[Q];Q++;c.ar2=x[Q];Q++;Q+=4;c.Nd=w.q(x,Q);Q+=4;Q+=4;c.root=w.q(x,Q);
Q+=4;Q+=4;c.acv=w.q(x,Q);Q+=4;return c};i3.EY={arZ:function(x,Q){return x[Q]},_C:function(x,Q){return x[Q]<<8|x[Q+1]},q:function(x,Q){return x[Q]<<24|x[Q+1]<<16|x[Q+2]<<8|x[Q+3]},mt:function(x,Q,c){var $="";
for(var F=0;F<c;F++)$+=String.fromCharCode(x[Q+F]);return $}};var jX={parse:function(x){var Q=new Uint8Array(x),c=jX.Dx(Q),$=[],z=new Uint8Array(Q.length),j=[];
$.push(j);jX.oE(Q,c,1,z,j);for(var F=0;F<j.length;F++){var U=[];$.push(U);jX.oE(Q,c,j[F][3],z,U,F==11);
j[F][3]=F+1}return $},oE:function(x,Q,c,$,z,j){c--;var U=c*Q.C8+(c==0?100:0),i=x[U],b=jX._C(x,U+1),e=jX._C(x,U+3),k=jX._C(x,U+5),g=0;
if(k==0)k=65536;var K=x[U+7];U+=8;if(i==2||i==5){g=jX.q(x,U);U+=4}for(var R=0;R<e;R++){var T=c*Q.C8+jX._C(x,U+2*R),D=-1,a=0,_=0,I=0;
if(i==2||i==5){D=jX.q(x,T);T+=4}if(i==2||i==10||i==13){a=jX.mA(x,T);T+=a.bc}if(i==5||i==13){_=jX.mA(x,T);
T+=_.bc}if(i==2||i==5){jX.oE(x,Q,D,$,z,j);continue}var f=Q.C8-(c==0?100:0),y=a._B,Z=i==13?f-35:Math.floor((f-12)*64/255)-23,v=Math.floor((f-12)*32/255)-23,G=v+(y-v)%(f-4);
if(y<=Z){jX.SO(x,T,$,0,y)}else{var q=G<=Z?G:v,h=0;jX.SO(x,T,$,0,q);h+=q;I=jX.q(x,T+q);while(I!=0){var r=(I-1)*Q.C8;
I=jX.q(x,r);var H=Math.min(Q.C8-4,y-h);jX.SO(x,r+4,$,h,H);h+=H}}z.push(jX.ac_($,y))}if(g!=0)jX.oE(x,Q,g,$,z,j)},ac_:function(x,Q){var c=0,$=jX.mA(x,c);
c+=$.bc;var z=[],j=[];while(c<$._B){var U=jX.mA(x,c);c+=U.bc;z.push(U._B)}if(c!=$._B)throw"e";for(var F=0;
F<z.length;F++){var U=z[F];if(!1){}else if(U==0)j.push(null);else if(U==1){j.push(jX.af3(x,c));c+=1}else if(U==2){j.push(jX.u7(x,c));
c+=2}else if(U==3){j.push(jX.aAz(x,c));c+=3}else if(U==4){j.push(jX.c4(x,c));c+=4}else if(U==5){j.push(jX.q(x,c+2));
c+=6}else if(U==6){j.push(jX.q(x,c)+":"+jX.q(x,c+4));c+=8}else if(U==7){j.push(jX.ats(x,c));c+=8}else if(U==8)j.push(0);
else if(U==9)j.push(1);else if(U>=12&&(U&1)==0){var i=U-12>>1,b=new Uint8Array(i);jX.SO(x,c,b,0,i);j.push(b);
c+=i}else if(U>=13&&(U&1)==1){var i=U-13>>1;j.push(jX.IV(x,c,i));c+=i}else throw"unknonw type "+U}return j},Dx:function(x){if(!(x[18]==1&&x[19]==1&&x[20]==0&&x[21]==64&&x[22]==32&&x[23]==32))throw"unexpected SQL3 header";
var Q={pO:jX.mt(x,0,15),C8:jX._C(x,16),a7R:jX.q(x,24),size:jX.q(x,28),a3y:jX.q(x,32),a2h:jX.q(x,36),a0o:jX.q(x,40),awH:jX.q(x,44),asu:jX.q(x,48),adP:jX.q(x,52),akv:jX.q(x,56),aq9:jX.q(x,60),aaY:jX.q(x,64)!=0,am2:jX.q(x,68),akS:jX.q(x,92),a88:jX.q(x,96)};
if(Q.C8==1)Q.C8=65536;if(Q.akv!=1)throw"unsupported text encoding "+Q.akv;return Q},acQ:function(x,Q){return x[Q]<<16|x[Q+1]<<8|x[Q+2]},aAz:function(x,Q){var c=jX.acQ(x,Q),$=c&8388608;
return $?-(16777215-c+1):c},af3:function(x,Q){jX.RQ[0]=x[Q];return jX.amF[0]},c4:function(x,Q){var c=jX.RQ;
for(var F=0;F<4;F++)c[F]=x[Q+3-F];return jX.ajn[0]},u7:function(x,Q){var c=jX.RQ;c[0]=x[Q+1];c[1]=x[Q];
return jX.aj6[0]},_C:function(x,Q){return x[Q]<<8|x[Q+1]},q:function(x,Q){var c=jX.RQ;for(var F=0;F<4;
F++)c[F]=x[Q+3-F];return jX.aen[0]},ats:function(x,Q){var c=jX.RQ;for(var F=0;F<8;F++)c[F]=x[Q+7-F];
return jX.a9q[0]},mA:function(x,Q){var c=Q,jF=0;while(!0){var $=x[Q];Q++;jF=jF*128+($&127);if($<128)break}return{_B:jF,bc:Q-c}},mt:function(x,Q,c){var $="";
for(var F=0;F<c;F++)$+=String.fromCharCode(x[Q+F]);return $},IV:function(x,Q,c){var $="";for(var F=0;
F<c;F++)$+="%"+jX.aqJ(x[Q+F].toString(16));try{$=decodeURIComponent($);return $}catch(dQ){return $}},SO:function(x,Q,c,$,z){if(x[Q+z-1]==null||c[$+z-1]==null){console.log(Q,$,z);
throw"e"}for(var F=0;F<z;F++)c[$+F]=x[Q+F]},aqJ:function(jF){return jF.length<2?"0"+jF:jF}};jX.RQ=new Uint8Array(8);
jX.amF=new Int8Array(jX.RQ.buffer);jX.aj6=new Int16Array(jX.RQ.buffer);jX.ajn=new Int32Array(jX.RQ.buffer);
jX.aen=new Uint32Array(jX.RQ.buffer);jX.a9q=new Float64Array(jX.RQ.buffer);jX.auv=function(x,Q){var c=x[0],$={};
for(var F=0;F<c.length;F++){var z=c[F],j=z[1];if(z[0]!="table")continue;var U=z[4];U=U.slice(U.indexOf("(")+1,U.indexOf(")"));
U=U.split(",");for(var i=0;i<U.length;i++){var b=U[i].trim().split(" ")[0];if(Q&&b.startsWith(j))b=b.slice(j.length);
U[i]=b}var e=$[j]=[],k=x[z[3]];for(var i=0;i<k.length;i++){var K=k[i],g={};e.push(g);for(var R=0;R<U.length;
R++){if(g[U[R]]!=null)throw"e";g[U[R]]=K[R]}}}return $};function gP(x,Q,c){this.rx=x;this.vx=Q;this.a7X=c;
this.lp=new bC(0,0);this.SP=-1;this.lI=0;this.k6=0;this.j1=new gh;this.Xb=[];this.T$=null;this.a8b=null;
this.Lf=null;this.mM=null;this.lL=null;this.aqE=null}gP.prototype.StartPage=function(x,Q,c,$,z){var j=this.vx,U=j.c0(),i=1,b=(c-x)*($-Q);
if(z!=null)b=z;while(b*U*U/(i*i)>2*8192*8192)i++;j.scale(1/i,1/i);this.a8b=[x,Q,c,$];var i=j.c0();x=Math.round(x*i);
Q=Math.round(Q*i);c=Math.round(c*i);$=Math.round($*i);var e=this.rx,k=this.Lf;if(k==null){j.DX=-x}else{var K=k[2]-k[0]+30,g=Math.round(c-x)+30;
if(this.lp.x+K+g>8192){j.DX=-x;this.lp.x=0;this.lp.y+=this.k6+120;this.k6=0}else{j.DX+=K;this.lp.x+=K}}j.ti=this.lp.y+(this.a7X?$:-Q);
this.k6=Math.max(this.k6,Math.round($-Q));this.Lf=[x,Q,c,$];this.apJ=[];e.B.push(e.x6())};gP.prototype.StartTGroup=function(x){this.XO();
var Q=this.rx;Q.B.push(Q.x6());var c=gP.Jt[x.bmode];if(c==null)c="norm";var $=Q.Xh();$.gF("<Group>");
$.add.lsct=hA.DJ;$.s3=c=="norm"?"pass":c;$.H2=24;$.opacity=Math.round(255*x.ca);this.apJ.push($)};gP.prototype.EndTGroup=function(){this.rx.B.push(this.apJ.pop())};
gP.prototype.akY=function(){var x=this.rx,Q=x.B[x.B.length-1];return Q};gP.prototype.akg=function(){var x=this.rx,Q=x.Xh();
Q.gF("Path "+x.B.length);this.rx.B.push(Q);Q.H2|=16;Q.add.SoCo={classID:"null",Clr:{t:"Objc",v:d.I.lV({Z:0,r:0,J:0})}};
Q.add.vmsk=new eM.hn;Q.add.vstk=aF.XM.$H();return Q};gP.prototype.IX=function(x){var Q={j:x.crds,G:x.cmds},c=d.A.tf(Q,!1);
d.o.Of(c,this.vx);return c};gP.ama=function(x,Q){for(var F=0;F<x.length;F++)if(x[F].Kp!=null)x[F].Kp=Q};
gP.x2=function(x){return d.I.lV({Z:x[0]*255,r:x[1]*255,J:x[2]*255})};gP.Kc=function(x){return new bI(x[0],x[1],x[2],x[3],x[4],x[5])};
gP.prototype.Stroke=function(x){if(this.SP!=-1&&this.SP!=this.lI)return;if(x.pth.cmds.length<=1)return;
var Q=this.IX(x.pth),j=null;if(Q.length<=2)return;this.u0(x);gP.ama(Q,-1);Q[2].Kp=1;var c=this.akY(),$=aF.XM.$H(null,!0),z=x.ctm;
aF.XM.write($,x,Math.sqrt(Math.abs(z[0]*z[3]-z[1]*z[2]))*this.vx.c0());if(!(x.COLR instanceof Array)){j=d.A.pA(x.pth.crds);
var U=d.A.Hg(j);d.A.i(U.j,this.vx,U.j);j=d.A.pA(U.j)}var i=gP.lu(x.COLR,this.vx,j,Q),b=["SoFi","GrFl","patternFill"].indexOf(i.type),e=[aF.ZS,aF.ul,aF.qK][b],k=$.strokeStyleContent.v={classID:aF.XM.R7[b]};
for(var F=0;F<e.length;F++)k[e[F]]=i.b.v[e[F]];var K=c!=null&&c.add.vmsk!=null&&!c.Uy(),g=K&&!c.add.vstk.fillEnabled.v&&JSON.stringify($)==c.add.vsjs;
if(g){var R=c.add.vmsk.$;for(var F=2;F<Q.length;F++)R.push(Q[F])}else{var T=K&&!c.add.vstk.strokeEnabled.v&&eM.hn.auW(c.add.vmsk.$,Q,!0);
if(T){c.add.vstk=$;$.fillEnabled.v=!0}else{c=this.akg();c.add.vmsk.$=Q;c.add.vstk=$;c.add.vsjs=JSON.stringify($)}}};
gP.prototype.Fill=function(x,Q){if(this.SP!=-1&&this.SP!=this.lI)return;if(x.ca==0)return;var c=x.pth.cmds;
if(c.length==0)return;if(c.length==2&&JSON.stringify(c)=="[\"M\",\"L\"]")return;var $=d.A.pA(x.pth.crds),z=d.A.pA(x.cpth.crds);
if($.y_(z)._6())return;var j=x.pth,U=UDOC.G.isBox(j,[$.x,$.y,$.x+$.m,$.y+$.e]),i=x.cpth,b=UDOC.G.isBox(i,[z.x,z.y,z.x+z.m,z.y+z.e]);
if(U&&b&&$.P()>z.P()*2){var e=$.y_(z),k=e.x,K=e.y,g=k+e.m,R=K+e.e;j={cmds:["M","L","L","L","Z"],crds:[k,K,g,K,g,R,k,R]};
$=e}else if(this.mM==null&&UDOC.G.isBox(j,[$.x,$.y,$.x+$.m,$.y+$.e])&&$.PC(z)){j=i;$=z}else this.u0(x);
var T=this.IX(j),D=d.A.Hg($);d.A.i(D.j,this.vx,D.j);$=d.A.pA(D.j);var a=gP.lu(x.colr,this.vx,$,T),_=this.akY(),I=_!=null&&_.opacity==Math.round(255*x.ca)&&_.add.vstk!=null&&!_.add.vstk.strokeEnabled.v&&_.add.SoCo&&a.type=="SoFi"&&JSON.stringify(_.add.SoCo.Clr.v)==JSON.stringify(a.b.v.Clr.v);
if(I){var f=!1;for(var F=0;F<T.length;F++){if(T[F].Kp==0||T[F].Kp==2)f=!0}if(f){var y=d.A.pA(d.o.Mn(_.add.vmsk.$)),Z=d.A.pA(d.o.Mn(T));
I=y.y_(Z)._6()}}if(I){var v=_.add.vmsk.$;for(var F=2;F<T.length;F++)v.push(T[F])}else{_=this.akg();delete _.add.SoCo;
_.add.vmsk.$=eM.hn.gG(T);gP.Yu(x.colr,_,this.vx,$,T);gP.ajl(x,_)}};gP.Yu=function(x,Q,c,$,z){var j=gP.lu(x,c,$,z),U=null,i=null;
Q.add.vstk.fillEnabled.v=!0;if(j.type=="SoFi"){U="SoCo";i=aF.ZS}if(j.type=="GrFl"){U="GdFl";i=aF.ul}if(j.type=="patternFill"){U="PtFl";
i=aF.qK}if(U!=null){Q.add[U]={classID:"null"};for(var F=0;F<i.length;F++){var b=i[F];Q.add[U][b]=j.b.v[b]}if(U=="GdFl")Q.add._fstl=j.aA}};
gP.prototype.u0=function(x){var Q=this.rx,c=x.cpth,$=c.cmds.join(""),z=c.crds,j=$+" "+z.join(","),U=UDOC.G.isBox(c,this.a8b);
if(U&&this.mM==null)return;if(j==this.mM)return;this.XO();if(!U){this.mM=j;Q.B.push(Q.x6());var i=Q.Xh();
i.gF("Mask");i.add.lsct=hA.H3;i.s3="pass";i.H2=24;var b=i.add.vmsk=new eM.hn;b.$=this.IX(x.cpth);if(UDOC.G.isBox(c)){this.lL=d.o.sP(b.$);
this.lL.ss(3,3)}else this.lL=null;this.aqE=i}};gP.prototype.XO=function(){var x=this.rx;if(this.mM!=null){var Q=x.B.length-1,F=Q,c=!1;
while(F>=0&&x.B[F].add.lsct!=hA.oA)F--;var $=this.lL;if($){var z=new gh,j=Q;while(j>F){z=x.B[j].Q8(this.rx,!1,!0);
j--}c=$.PC(z)}if(c){this.Xb.splice(F,1);x.B.splice(F,1)}else{x.B.push(this.aqE)}this.mM=null}};gP.lu=function(x,Q,c,$){var z,j,U;
if(x.length!=null){z="SoFi";var i=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]);j={t:"Objc",v:i};j.v.Clr.v=gP.x2(x)}else{var b=gP.a96(x,Q,c);
z="GrFl";j={t:"Objc",v:ad.kD(b,$)};U=b}return{type:z,b:j,aA:U}};gP.a96=function(x,Q,c){var $=gP.Kc(x.mat);
$.concat(Q);var z=new bC(0,0),j=new bC(0,0),U=new bC,i=x.crds,b=x.typ=="rad"?1:0;if(b==1){var e=.7;U.x=i[0];
U.y=i[1];z.x=i[3];z.y=i[4];j.x=z.x;j.y=z.y;j.x+=i[5]}else{z.x=i[0];z.y=i[1];j.x=i[2];j.y=i[3];U.r$(z.x,z.y)}var k=ad.j3(b,$,c,z,j,U);
k[1]=JSON.parse(JSON.stringify(x.grad));return k};gP.prototype.PutText=function(x,Q,c,$){var z=Q.charCodeAt(0),R=null;
if(this.SP!=-1&&this.SP!=this.lI)return;if(Q.length==0||Q.length==1&&(z==0||z==8203))return;this.u0(x);
var j=this.rx,U=x.font,i=Math.round(255*x.ca);if(x.font.Tmode==3)i=0;var b=gP.Kc(x.ctm);b.concat(this.vx);
var e=gP.Kc(U.Tm);e.concat(b);var k=e.c0(),K=new bI(1/k,0,0,-1/k,0,0);K.concat(e);var g=U.Tfs*k,T=j.B.length-1;
while(T>=0&&j.B[T].add.TySh==null)T--;if(K.J*K.J+K.dC*K.dC<.001&&$==null&&T>=0&&j.B[T].add.TySh&&j.B[T].opacity==i){var D=j.B[T],a=this.Xb[T],_=D.add.TySh.i,I=(K.DX-a.az6)/g,f=Math.abs(I),y=_.V==K.V&&_.J==K.J&&_.dC==K.dC&&_.xq==K.xq,Z=K.ti-a.L8,v=y&&Math.abs(Z)<1e-5&&f<1;
if(v){R=D;if(I>.2&&[".",",","?",":","!"].indexOf(Q)==-1){Q=" "+Q;c+=.5}}else if(y&&0<Z&&Z<g*1.7&&a.akA==g){R=D;
this.amr(a);a.L8=K.ti;a.at$=K.DX;Q="\n"+Q}}if(R==null){T=j.B.length;this.Xb[T]={Eb:[],IT:0,az6:K.DX,L8:K.ti,at$:K.DX,rg:"",akA:g};
R=j.Xh();j.B.push(R);R.add.lnsr="rend";R.add.TySh=dU.Y7(0,0);R.add.TySh.i=K}var a=this.Xb[T];a.IT+=c*g;
a.rg+=Q;a.az6=K.DX+c*g;var G=R.add.TySh.HW,q=dU.bs(G);if($){dU.DY(G,1);var h=[0,0,Math.ceil($[0]*k),Math.ceil($[1]*k)];
dU.ei(G,h)}var r=q.length-1,H=r+Q.length;dU.U3(G,r,Q);if(this.T$==null)this.T$=dU.zl(G,r,r);var o=this.T$;
o.VA.FontSize=Math.round(g);o.VA.Tracking=Math.round(U.Tc*100);o.VA.Underline=U.Tun==1;o.VA.FillColor={Type:1,Values:[1,x.colr[0],x.colr[1],x.colr[2]]};
if(U.Tal!=null)o.SW.Justification=U.Tal;if(a.Eb.length!=0){o.VA.AutoLeading=!1;o.VA.Leading=a.L8-a.Eb[a.Eb.length-1].y}var P=U.Tf;
P=P.replace(/#2B/g,"+");P=P.replace(/#2C/g,"-");P=P.split("+").pop();var O={"NimbusRomNo9L-Medi":"NimbusRomNo9L-Med","NimbusRomNo9L-Regu":"NimbusRomNo9L-Reg","NimbusRomNo9L-MediItal":"NimbusRomNo9L-MedIta","NimbusRomNo9L-ReguItal":"NimbusRomNo9L-RegIta",CMTT9:"NimbusMono-Regular",Arial:"ArialMT","BebasNeue-Regular":"BebasNeueRegular"};
if(O[P])P=O[P];dU.gD(o,P);dU.G4(G,r,H-1,o);R.cS();R.opacity=i};gP.prototype.amr=function(x){x.Eb.push({ww:x.IT,z_:x.rg.slice(x.Eb.length==0?0:1)+"\n",x:x.at$,y:x.L8,ks:x.akA});
x.IT=0;x.rg=""};gP.prototype.mr=function(x,Q,c){return new Uint8Array(ar.pz("PNG").YU([[x.buffer,0]],Q,c))};
gP.prototype.PutImage=function(x,Q,c,$,z,j,U){if(this.SP!=-1&&this.SP!=this.lI)return;var i=this.rx,b=x.font.Tmode;
if(b==7&&i.B[i.B.length-1].add.TySh){return}this.u0(x);var e=gP.Kc(x.ctm);e.concat(this.vx);var k=new bI(1/c,0,0,-1/$,0,1);
k.concat(e);e=k;Q=gP.a2F(Q,c,$,j,!1);if(z)z=gP.a2F(z,c,$,U,!0);if(z==null){if(Q.length==c*$*4)Q=this.mr(Q,c,$)}else{Q=this.ayw(Q,c,$,j,!1);
z=this.ayw(z,c,$,U,!0);var K=d.R(c*$);d.GS(z,K,0);d.Dm(K,Q,3);Q=this.mr(Q,c,$)}var g=i.BQ(Q,"Bitmap",0,0),R=g.rect.clone();
R.x=R.y=0;var T=d.A.Hg(R).j;d.A.i(T,e,T);g.add.SoLd.Trnf=X.Y.TD(T);g.add.SoLd.nonAffineTransform=X.Y.TD(T);
g.bx(i,!1);gP.ajl(x,g);i.B.push(g)};gP.ajl=function(x,Q){Q.opacity=Math.round(255*x.ca);var c=gP.Jt[x.bmode];
if(c==null)console.log("Unknown blend mode",c);else Q.s3=c};gP.Jt={"/Normal":"norm","/Multiply":"mul ","/Screen":"scrn","/Overlay":"over","/Darken":"dark","/Lighten":"lite","/ColorDodge":"div ","/ColorBurn":"idiv","/HardLight":"hLit","/SoftLight":"sLit","/Difference":"diff","/Exclusion":"smud","/Hue":"hue ","/Saturation":"sat ","/Color":"colr","/Luminosity":"lum "};
gP.azN=function(x){if(x=="pass")x="norm";for(var Q in gP.Jt)if(gP.Jt[Q]==x)return Q;return"/Normal"};
gP.a2F=function(x,Q,c,$,z){var j=ar.HB(x.buffer);if(j=="jpg"){try{x=new Uint8Array(ar.pz("JPG").amR(x.buffer))}catch(dQ){x=new Uint8Array(Q*c*4)}}else if(j=="jb2"){x=new Uint8Array(ar.pz("JPG").fk(x.buffer,$,z)[0].data)}else if(x.length!=Q*c*4){var U=new Uint8Array(Q*c*4),i=Math.ceil(Q/8),b=new Uint8Array(c*i);
UTIF.decode._decodeG4(x,0,x.length,b,0,Q,1);var e=b[0]==(z?255:0);for(var k=0;k<c;k++){var K=i*k;for(var g=0;
g<Q;g++){var F=k*Q+g,R=F*4,T=(b[K+(g>>3)]>>7-(g&7)&1)*255;if(e)T=255-T;U[R]=T;U[R+1]=T;U[R+2]=T;U[R+3]=255}}x=U}return x};
gP.prototype.ayw=function(x,Q,c,$,z){if(x.length!=Q*c*4){var j=ar.HB(x.buffer);if(j=="jb2")throw"e";
var U=ar.pz(j);if(U==null||j=="tga")U=ar.pz("jpg");x=new Uint8Array(U.fk(x,$,z)[0].data)}return x};gP.prototype.ShowPage=function(){var x=this.rx;
this.lI++;var Q=this.Lf;this.XO();var c=x.Xh();x.B.push(c);var $=new gh(Math.round(this.lp.x),Math.round(this.lp.y),Math.round(Q[2]-Q[0]),Math.round(Q[3]-Q[1]));
if($._6())$.m=$.e=2e3;this.j1=this.j1.iO($);c.Zp($);c.add.artb.artboardBackgroundType.v=1;c.gF("Page "+this.lI);
c.add.lsct=hA.H3;c.s3="pass";c.H2=24};gP.prototype.Print=function(x){console.log("Print:",x)};gP.prototype.Done=function(){var x=this.rx;
if(this.lI==1)x.B[x.B.length-1].add.lsct=hA.DJ;x.cV(this.lI);for(var F=0;F<x.B.length;F++){var Q=x.B[F],c=Q.add.vmsk,$=Q.add.TySh,z=this.Xb[F];
Q.jz();delete Q.add.vsjs;if(c){var j=!1;for(var U=0;U<c.$.length;U++){var i=c.$[U];if((i.type==0||i.type==3)&&i.length>32767)j=!0}if(j){x.B.splice(F,1);
F--;continue}}Q.kT(x);if($&&z&&z.Eb.length!=0){this.amr(z);var b=$.HW,e=z.Eb.length,k=z.Eb[0],K=1e9,g=-1e9,v="";
for(var U=0;U<e;U++){var R=z.Eb[U];K=Math.min(K,R.x);g=Math.max(g,R.x+R.ww)}var T=[];for(var U=0;U<e;
U++){var R=z.Eb[U],D=-1,a=k.ks*.1,_=Math.abs(R.x-K),I=Math.abs(R.x+R.ww-g),f=Math.abs(_-I);if(f<a)D=2;
if(I<a){D=1;if(R.x!=K)if(U!=0&&z.Eb[U-1].x==R.x||U!=e-1&&z.Eb[U+1].x==R.x)D=-1}if(_<a)D=0;if(R.ww==g-K)D=3;
T.push(D)}var y=[!1,!1,!1];for(var U=0;U<e;U++){var D=T[U];if(D==3)D=U==0?T[U+1]:T[U-1];if(D==3)D=0;
T[U]=D;y[D]=!0}var Z=(g-K)*.05;if(y[0]&&!y[1])g+=Z;if(!y[0]&&y[1])K-=Z;if(!y[0]&&!y[1]){K-=Z;g+=2*Z}dU.DY(b,1);
$.i.ti-=k.ks*.7;$.i.DX=Math.round(K);dU.ei(b,[0,0,Math.ceil(g-K),Math.ceil(z.Eb[e-1].y-k.y+k.ks*2)]);
for(var U=0;U<e;U++){var R=z.Eb[U],D=T[U],G=0;if(D==-1){D=0;G=Math.round(R.x-K)}var q=v.length,h=q+R.z_.length;
v+=R.z_;var r={_t:[],VA:{},SW:{Justification:D,StartIndent:G}};dU.G4($.HW,q,h-1,r)}}if($){var b=$.HW;
dU.amf(b);var H=dU.bs(b).split("\n");for(var U=0;U<H.length-1;U++){var R=H[U],o=0;for(var P=0;P<R.length;
P++){var O=R.charCodeAt(P);if(1473<=O&&O<=1524)o++}if(o>R.length/2){H[U]=R.split("").reverse().join("");
var p=b.EngineDict.ParagraphRun.RunArray[U].ParagraphSheet.Properties;p._Direction=1;p.Justification=dU.mp(p)}}dU.rX(b,H.join("\n"))}}x.RS=!0;
x.m=this.j1.m;x.e=this.j1.e;x.buffer=d.R(this.j1.P()*4)};var cd={};cd.D9=null;cd.gS=function(x,Q,c,$,z,j){if(z==null)z=x.m;
if(j==null)j=x.e;cd.D9=x;var U=!1,i=[x.root],b=x.root.children;if(x.add.artd){U=!0;for(var F=0;F<b.length;
F++)if(b[F].a.add.artb==null)U=!1;if(U)i=b}var e=new gh(0,0,x.m,x.e),k=Q[0];k=k.replace(/,/g," ").replace(/\-/g," - ").replace(/  +/g," ").trim();
k=k.split(" ");var K=[];for(var F=0;F<k.length;F++){var g=k[F];if(g=="-"){var R=K.pop(),T=parseInt(k[F+1]);
while(R<T){K.push(R);R++}}else K.push(parseInt(g))}k=K;for(var F=0;F<k.length;F++)if(isNaN(k[F])||k[F]<1||k[F]>i.length){k.splice(F,1);
F--}var D=z/x.m,a=j/x.e,_=D*72/x.cQ,I=a*72/x.cQ,f=Q[5];if(f==null)f=0;var y=72*f,Z=72*f;for(var v=0;
v<i.length;v++){var F=v;if(Q[2])F=i.length-1-v;if(k.length!=0&&k.indexOf(F+1)==-1)continue;var G=i[F],q=U?G.a.Dd():e;
if(!G.a.M5())continue;var h=Math.round(q.m*_+2*y),r=Math.round(q.e*I+2*Z);c.StartPage(0,0,h,r);var H=UDOC.getState(),o=new bI;
o.translate(-q.x,-q.y-q.e);o.scale(_,-I);o.translate(y,Z);if(U){var P=G.a.add.artb,O=P.artboardBackgroundType.v;
if(O!=1&&O!=3){var p=G.a.LM(),C=y*_,W=Z*I,J=C+q.m*_,t=W+q.e*I;H.colr=[(p>>>0&255)/255,(p>>>8&255)/255,(p>>>16&255)/255];
H.pth={cmds:["M","L","L","L","Z"],crds:[C,W,J,W,J,t,C,t]};c.Fill(H)}}if(Q[3]){var Y=x.VY();if(!e.HM(q)){Y=d.R(q.P()*4);
d.WK(x.VY(),e,Y,q)}var l=x.XP();if(l)ICC.U.applyLUT(l[x.add.fcmy==1?5:3],l[2],Y,Y);var m=ar.pz("JPG").YU([[Y.buffer]],q.m,q.e,[Q[1]]);
Y=new Uint8Array(m);var B=new bI;B.translate(q.x,q.y);cd.ye(H,c,Y,q,B,o)}else{cd.aDM(x,G,H,c,o,Q,$);
if(y!=0){var C=y,W=Z,J=C+q.m,t=W+q.e,L=J+y,A=t+y;H.ca=1;H.colr=[1,1,1];H.pth={cmds:"M L L L Z M L L L Z".split(" "),crds:[0,0,0,A,L,A,L,0,C,W,J,W,J,t,C,t]};
c.Fill(H)}}if(Q[6]){var S=[[0,0],[1,0],[1,1],[0,1]],M=50,N=5,s=M*.5,V=N*.5;H.colr=[.1,.1,.1];for(var v in S){var g8=S[v],n=[v==0||v==3?-1:1,v==0||v==1?-1:1],cQ=[y-s+V*n[0]+g8[0]*x.m,Z-(n[1]!=1?N:0)+g8[1]*x.e],hk=[y-(n[0]!=1?N:0)+g8[0]*x.m,Z-s+V*n[1]+g8[1]*x.e];
H.pth={cmds:"M L L L Z M L L L Z".split(" "),crds:[cQ[0],cQ[1],cQ[0]+M,cQ[1],cQ[0]+M,cQ[1]+N,cQ[0],cQ[1]+N,hk[0],hk[1],hk[0]+N,hk[1],hk[0]+N,hk[1]+M,hk[0],hk[1]+M]};
c.Fill(H)}}var eG=x.p9;for(var ie=0;ie<eG.length;ie++){var eN=eG[ie].v,q=d.fr.Pe(eN),gr=d.A.Hg(q).j;
d.A.i(gr,o,gr);var ek=d.A.pA(gr);if(!new gh(0,0,h,r).PC(ek))continue;if(c.AddAnnot)c.AddAnnot([ek.x,ek.y,ek.x+ek.m,ek.y+ek.e],eN.url.v)}c.ShowPage()}c.Done();
cd.D9=null};cd.z$=function(x){x=d.I.Du(x);return[x.Z/255,x.r/255,x.J/255]};cd.aDM=function(x,Q,c,$,z,j,U){var i=Q.a,b=i.add.lsct,e=i.add.lmfx,k=i.add.vmsk,K=i.add.vstk,g=i.add.TySh,_,I,H;
if(!i.M5())return;var R=i.opacity/255,T=i.add.iOpa!=null?i.add.iOpa/255:1;c.bmode=gP.azN(i.s3);var D=c.ca;
c.ca=c.CA=R*T;var a=e;if(a)a=a.solidFillMulti.v[0];if(a)a=a.v;if(a&&!a.enab.v)a=null;var f=i.rect;if(i.aD()&&(!i.Uy()||i.ft&&i.ft.My)){if(i.Uy()){_=i.ft.My;
f=i.ft.a9i}else{_=d.R(i.rect.P());d.GS(i.buffer,_,3)}I=en.wH(e,i.add.fxrp,_,f,x,f).type;var y=["DrSh","OrGl"];
if(T!=1||K&&!K.fillEnabled.v){var Z=_.slice(0);d.HQ(Z);for(var F=0;F<y.length;F++){var v=I[y[F]];for(var G=0;
G<v.length;G++){var q=v[G],h=q.oj.clone();h.x+=f.x;h.y+=f.y;d.Pp(Z,f,q.AX,h)}}}}if(I)cd.aoR(i,_,f,I,c,$,z,j,!0);
var r=en.apk(i,!1);if(r){$.StartTGroup(c);H=c;c=UDOC.getState()}var o=k&&!i.Z6();if(o){var P=d.A.bO(k.$,!1),O=P.Fg;
d.A.i(O.j,z,O.j);c.cpth={cmds:O.G,crds:O.j}}if(i.Uy()){for(var F=0;F<Q.children.length;F++)cd.aDM(x,Q.children[F],c,$,z,j,U)}else if(i.Z6()&&i.add.PtFl==null){var p=k?k.$:d.o.JE.Rect(0,0,x.m,x.e),C=d.o.sP(p),W=!1;
if(k==null)W=!0;else{if(K.fillEnabled.v)W=!0;var J=en.FH(e);if(!K.strokeEnabled.v&&J)K=J}if(W){var t=en.nA(e,i.add),Y=t[0],l=t[1];
c.colr=cd.aCp(Y?Y:l,z,C)}var P=d.A.bO(p,K?K.strokeEnabled.v:!1),O=P.Fg;d.A.i(O.j,z,O.j);c.pth={cmds:O.G,crds:O.j};
cd.a04($,c,W,K,z,C,P.hX!=0)}else if(g&&j[4]){var m=g.HW,B=new fQ(m,U,g.Gb),O=aE.Fc(B,g,!0),L=d.A.j9(O),A=en.FH(e);
for(var S in L){var M=parseInt(S.slice(1,7),16),N=0;c.colr=a?cd.z$(a.Clr.v):cd.a0N(M);var s=L[S];d.A.i(s.j,z,s.j);
s=d.A.ayE(s);c.pth={cmds:s.G,crds:s.j};var K=A;if(S.length>7){K=aF.XM.$H();var V=S.slice(7).split("-"),M=parseInt(V[1].slice(1),16),g8=cd.a0N(M);
K.fillEnabled.v=!0;K.strokeEnabled.v=!0;K.strokeStyleLineWidth.v.val=parseFloat(V[2]);K.strokeStyleContent.v.Clr.v=a?a.Clr.v:d.I.lV({Z:g8[0]*255,r:g8[1]*255,J:g8[2]*255});
K.strokeStyleMiterLimit.v=parseFloat(V[2])}cd.a04($,c,!0,K,z,null,!1)}}else if(g){var m=JSON.parse(JSON.stringify(g.HW));
dU.amf(m);var n=g.i.clone(),cQ=new bI(1,0,0,-1,0,0);cQ.concat(n);cQ.concat(z);var hk=dU.bs(m),B=new fQ(m,U,g.Gb);
for(var F=0;F<B.SW.length;F++){var eG=B.SW[F];if(eG.bz.length==1&&eG.bz[0].J_)continue;for(var G=0;G<eG.v0.length;
G++){var ie=eG.v0[G],eN=eG.xj.y+ie.xj.y,gr=eG.bz[ie.start].start,ek=eG.bz[ie.end-1].end,jK=dU.aAs(m,gr,ek);
for(var iE=0;iE<jK.length;iE++){var e9=B.L4(gr),dm=jK[iE],kD=dU.zl(m,gr,gr),gJ=kD._t[kD.VA.Font].Name;
c.font.Tf=gJ;var S=dU.Du(kD.VA.FillColor);c.colr=a?cd.z$(a.Clr.v):[S.Z/255,S.r/255,S.J/255];var dR=c.font.Tfs=Math.round(kD.VA.FontSize),ko=hk.slice(gr,gr+dm);
if(kD.VA.FontCaps==2)ko=ko.toUpperCase();var fj=new bI;fj.translate(e9.W4.x,-eN);fj.concat(cQ);c.ctm=[fj.V,fj.J,fj.dC,fj.xq,fj.DX,fj.ti];
$.PutText(c,ko,0);for(var ja=0;ja<2;ja++){var eD=kD.VA[ja==0?"Strikethrough":"Underline"];if(!eD)continue;
var d3=B.L4(gr+dm-1),fP=ja==0?.27:-.2,jE=dR*fP,cR=dR*(fP+.07),N=d3.W4.x+d3.W4.m-e9.W4.x,ex=[0,jE,N,jE,N,cR,0,cR];
d.A.i(ex,fj,ex);c.pth={cmds:["M","L","L","L","Z"],crds:ex};$.Fill(c)}c.ctm=[1,0,0,1,0,0];gr+=dm}}}}else if(!i.rect._6()){var er,a7,dl=!1,hl=new bI,f4=i.add.SoLd,em=!0;
if(f4)em=d.D.up(d.D.u_(X.Y.e3(f4.Trnf)));var e$=x.XP();if(f4&&em&&e$==null){var iP=f4.Idnt.v,b2=x.Td(iP,f4.Crop?f4.Crop.v:null),ju="";
if(b2==null)return;var k7=b2.iw,at=ar.HB(b2.raw.buffer);if(j[7].indexOf(at)!=-1){er=b2.raw;dl=!0}else er=k7[0];
a7=k7[1];hl=d.D.Tn(f4)}else{er=i.buffer;a7=i.rect;hl.translate(a7.x,a7.y);if(e$){er=er.slice(0);ICC.U.applyLUT(e$[x.add.fcmy==1?5:3],e$[2],er,er)}if(d.dJ(er,a7.m,a7.e)&&j[7]&&j[7].indexOf("jpg")!=-1){var jL=ar.pz("JPG").YU([[er.buffer]],a7.m,a7.e,[j[1]]);
er=new Uint8Array(jL);dl=!0}}if(a&&!dl)er=en.awa(er,a,a7);cd.ye(c,$,er,a7,hl,z);if(a&&dl){var ex=[0,0,a7.m,0,a7.m,a7.e,0,a7.e];
d.A.i(ex,hl,ex);d.A.i(ex,z,ex);var fJ=JSON.parse(JSON.stringify(c));fJ.ca=a.Opct.v.val/100;fJ.pth={cmds:["M","L","L","L","Z"],crds:ex};
fJ.colr=cd.z$(a.Clr.v);$.Fill(fJ)}}if(o)c.cpth=null;if(r){$.EndTGroup();c=H}c.ca=c.CA=D;if(I)cd.aoR(i,_,f,I,c,$,z,j,!1)};
cd.a04=function(x,Q,c,$,z,j,U){var i=!1,b=0,e=0;if($&&$.strokeEnabled.v){var k=$.strokeStyleContent.v;
Q.COLR=cd.aCp(k,z,j);aF.XM.bh($,Q,z.c0());b=Q.sal;delete Q.sal;e=Q.lwidth;i=!0}var K=b==2;if(c&&!K)x.Fill(Q,U);
if(i){Q.lwidth=e*(b==2?2:1);x.Stroke(Q)}if(c&&K)x.Fill(Q,U)};cd.ap$=function(x){var Q=cd.D9;if(Q==null)return x;
var c=Q.XP();if(c&&Q.add.fcmy){return d.i2(d.ru(x)).slice(0,3)}return x};cd.z$=function(x){x=d.I.Du(x);
return cd.ap$([x.Z/255,x.r/255,x.J/255])};cd.a0N=function(x){return cd.ap$([(x>>>16&255)/255,(x>>>8&255)/255,(x&255)/255])};
cd.aCp=function(x,Q,c){if(x.Clr)return cd.z$(x.Clr.v);var $=x,z=$.Rvrs?$.Rvrs.v:!1,j=$.Type.v.GrdT,U,i=j=="Rdl"||j=="Dmnd"?"rad":"lin",b=d.I.R9($,c),e=Q.RE(b[0]),k=Q.RE(b[1]);
if(i=="rad")U=[e.x,e.y,0,e.x,e.y,bC.Xc(e,k)];else{e.r$(k.x+(e.x-k.x)*2,k.y+(e.y-k.y)*2);U=[e.x,e.y,k.x,k.y]}var K=d.I.d9($.Grad.v,z);
return{typ:i,mat:[1,0,0,1,0,0],grad:K,crds:U}};cd.aoR=function(x,Q,c,$,z,j,U,i,b){var e=c.clone(),k=Q;
if(x.add.TySh&&!i[3]&&!i[4])return;var K=z.ca,g=z.bmode;for(var F=aF.order.length-1;F>=0;F--){var R=aF.order[F];
if(R=="GrFl"||R=="SoFi")continue;if((x.add.vmsk||x.add.TySh)&&R=="FrFX")continue;var T=$[R],D=F>7||R=="FrFX";
if(D!=b)continue;for(var a=0;a<T.length;a++){var _=T[a];if(_.oj==null)_=_.$p?_.$p:_.yx;if(_==null)continue;
var I=_.oj.clone();I.offset(e.x,e.y);if(!D){if(!e.PC(I)){var f=e.iO(I),y=d.R(f.P());d.L2(k,e,y,f);k=y;
e=f}d.Pp(k,e,_.AX,I)}if(D&&R=="FrFX"&&_.Cc)d.Pp(_.Cc,I,_.AX,I);var Z=new bI;Z.translate(I.x,I.y);z.ca=_.Ym;
z.bmode=gP.azN(_.iu);cd.ye(z,j,_.AX,I,Z,U)}}z.ca=K;z.bmode=g};cd.ye=function(x,Q,c,$,z,j){var U=new bI;
U.scale($.m,-$.e);U.translate(0,$.e);U.concat(z);U.concat(j);x.ctm=[U.V,U.J,U.dC,U.xq,U.DX,U.ti];Q.PutImage(x,c,$.m,$.e);
x.ctm=[1,0,0,1,0,0]};var b5={};b5.s5=function(x){var Q=new Uint8Array(x);return b5.WS(Q,0)};b5.WS=function(x,Q){var c=w.q,$=w.mt,z={P6:$(x,Q,4),z:Q+8,size:c(x,Q+4)},j=z.P6=="FORM"||z.P6=="FOR4"||z.P6=="LIST"||z.P6=="CAT ";
if(j)z.R7=$(x,Q+8,4);if(z.size<0||z.z+z.size>x.length)throw"e";if(j){z.sub=[];Q+=12;var U=z.z+z.size;
while(Q<U){var i=b5.WS(x,Q);z.sub.push(i);var b=i.size&1,e=i.size&3;if(z.P6=="FOR4")b=e==0?0:4-e;Q+=8+i.size+b}}return z};
var jQ={};jQ.s5=function(x,Q){var c=new Uint8Array(x);return jQ.WS(c,0,Q)};jQ.WS=function(x,Q,c){var $=w.K3,z=w.mt,j={P6:z(x,Q,4),z:Q+8,size:$(x,Q+4)};
if(c&&c[j.size]!=null)j.size=c[j.size];if(j.P6=="RIFF"||j.P6=="LIST"){j.R7=z(x,Q+8,4)}if(j.size<0||j.z+j.size>x.length)throw"e";
if(j.P6=="RIFF"||j.P6=="LIST"&&(j.R7!="cmpr"&&j.R7!="stlt")){j.sub=[];Q+=12;var U=j.z+j.size;while(Q<U){var i=jQ.WS(x,Q,c);
j.sub.push(i);Q+=8+i.size+(i.size&1)}}return j};var kj=function(){function x(M,N){var s=null;if(M.sub==null)return s;
for(var F=0;F<M.sub.length;F++){var V=M.sub[F];if(V.P6==N||V.R7==N)s=V}return s}function Q(M){if(M==32)return 300;
else if(M<49)return 0;else if(M<58)return 100*(M-48);else if(M<65)return 0;return 100*(M-55)}var c;function $(M,N){var s=new Uint8Array(M);
N.RS=!0;c={};var V=w.mt(s,0,2);if(V=="WL"){alert("Unsupported CDR version")}else{var g8,n,cQ,ie,gJ=300,ko=0;
if(V=="PK"){n=UZIP.parse(s);if(n["content/root.dat"]){s=n["content/root.dat"];cQ=w.IV(n["content/dataFileList.dat"]).split("\n")}else{s=n["content/riffData.cdr"];
n=null}}g8=jQ.s5(s.buffer);console.log(g8);var hk=Q(s[11]),eG={data:s,z:0,VC:hk};eG.Mg=eG.VC<600?16:32;
q(s,eG,cQ,n,g8.sub,0);var eN=[];if(n){ie=x(g8,"doc ");z(ie);var gr=g8.sub;for(var F=0;F<gr.length;F++)if(gr[F].R7=="page")eN.push(gr[F]);
eN=eN.slice(1)}else if(g8.sub[3]&&g8.sub[3].P6=="pack"){alert("We dont support this version of CDR files");
return}else if(x(g8,"cmpr")==null){ie=x(g8,"page");eN.push(ie);if(x(ie,"mcfg")==null){ie=x(g8,"doc ");
z(ie);eN=[];var gr=g8.sub;for(var F=0;F<gr.length;F++)if(gr[F].R7=="page")eN.push(gr[F]);eN=eN.slice(1)}}else{var ek=x(g8,"cmpr").sub;
ie=ek[0];eN=[ek.slice(1)[1]];if(x(ie,"filt"))z(ie)}var jK=x(ie,"mcfg").b,iE=jK.adU,e9=iE.x*.1,dm=iE.x*eN.length+e9*(eN.length-1),kD=iE.y;
gJ/=bp.ub(new gh(0,0,Math.round(dm*gJ),Math.round(kD*gJ)),8192*8192);var dR=Math.round(dm*gJ),fO=Math.round(kD*gJ);
N.m=dR;N.e=fO;N.buffer=d.R(N.m*N.e*4);for(var F=0;F<eN.length;F++){var d8=new bI(gJ,0,0,-gJ,iE.x*gJ/2+ko,iE.y*gJ/2);
j(eN[F],ie,N,d8);var fj=N.B[N.B.length-1];fj.Zp(new gh(Math.round(ko),0,Math.round(iE.x*gJ),Math.round(iE.y*gJ)));
fj.gF("Page "+(F+1));ko+=iE.x*gJ+e9*gJ}N.cV(eN.length)}}function z(M){var N=x(M,"filt").sub,s=x(M,"otlt").sub,V=x(M,"fntt");
if(V)V=V.sub;M.wd={};for(var F=0;F<N.length;F++)M.wd[N[F].sub[0].b.id]=N[F].sub[0].b;M.OR={};for(var F=0;
F<s.length;F++)M.OR[s[F].b.id]=s[F].b;if(V){M.fonts={};for(var F=0;F<V.length;F++)M.fonts[V[F].b.id]=V[F].b}}function j(M,N,s,V){var g8=M.R7?M.R7:M.P6,n=x(M,"lgob"),cQ=x(M,"txsm"),hk=null,eG=null;
if(n){hk=x(n,"trfl");eG=x(n,"loda")}else if(x(M,"lobj"))eG=x(M,"lobj");var ie=hk&&hk.sub[0].BS?hk.sub[0].BS.clone():new bI;
ie.concat(V);var eN=s.Xh();if(g8=="page"||g8=="layr"||g8=="grp "){eN.gF((g8=="page"?"Page":"Group")+" "+s.B.length);
eN.add.lsct=hA.DJ;eN.s3="pass";eN.H2=24;var gr=[];if(g8=="page")gr=x(M,"gobj").sub;if(g8=="layr")gr=M.sub.slice(2);
if(g8=="grp ")gr=M.sub.slice(4);if(gr.length==0)return;s.B.push(s.x6());for(var F=gr.length-1;F>=0;F--)j(gr[F],N,s,V)}else if(g8=="obj "&&eG.b&&eG.b.path){var ek,jK;
if(N.wd){ek=N.wd[eG.b.a4W];jK=N.OR[eG.b.a6L]}if(ek==null)ek=eG.b.a2c;if(jK==null)jK=eG.b.abg;eN=U(s,eG.b.path,V,ie,ek,jK)}else if(g8=="obj "&&cQ){var iE=eG.b.a6Y,e9=eG.b.a99,gJ="";
eN.add.TySh=dU.Y7(0,0);var dm=ie.c0();eN.add.TySh.i.translate(ie.DX,ie.ti);var kD=eN.add.TySh.HW,dR=cQ.b.rv;
if(dR==null)return;for(var F=0;F<dR.length;F++){var fO=dR[F],ko=gJ.length;gJ+=fO.text+"\n";dU.U3(kD,ko,fO.text+"\n");
if(fO.text=="")continue;var d8=i(fO.aa2,N),fj=d8.aiK,ja=N.fonts[fj.aqq],eD=dU.zl(kD,ko,gJ.length);if(d8.align==3)eD.SW.Justification=1;
else if(d8.align==2)eD.SW.Justification=2;else eD.SW.Justification=0;var fP=d8.fill.b;if(fP==null)fP=[0,0,0];
if(ja.pi)dU.gD(eD,ja.pi);eD.VA.FillColor={Type:1,Values:[1,fP[0],fP[1],fP[2]]};eD.VA.FontSize=Math.round(fj.fontSize*V.c0());
dU.G4(kD,ko,gJ.length-1,eD)}if(e9){dU.DY(kD,0)}else{dU.DY(kD,1);dU.ei(kD,[0,0,Math.round(iE.x*ie.V),Math.round(-iE.y*ie.xq)])}eN.gF(gJ.slice(0,10))}else{eN=null}if(eN)s.B.push(eN)}function U(M,N,s,V,g8,n){var cQ=M.Xh();
cQ.gF("Object "+M.B.length);cQ.H2|=16;var hk=cQ.add.vstk=aF.XM.$H();cQ.add.vmsk=new eM.hn;cQ.add.vmsk.$=d.A.tf(N,!1);
d.o.Of(cQ.add.vmsk.$,V);var eG=g8&&g8.type!=0,ie=eG&&g8.b!=null?g8.b:[0,0,0];gP.Yu(ie,cQ,V,d.o.sP(cQ.add.vmsk.$));
hk.fillEnabled.v=eG;if(n&&n.ag7!=1){hk.strokeEnabled.v=!0;hk.strokeStyleLineAlignment.v.strokeStyleLineAlignment="strokeStyleAlignCenter";
var eN=hk.strokeStyleLineWidth.v.val=n.lineWidth*s.c0(),gr=n.color;hk.strokeStyleContent.v.Clr.v=d.I.lV({Z:gr[0]*255,r:gr[1]*255,J:gr[2]*255});
if(n.Pb.length!=0)hk.strokeStyleLineDashSet.v=en.xo(n.Pb,4/eN);var ek=n.arL,jK=n.a7Z;if(jK!=0){var iE=N.j,F=iE.length-4,e9=iE[F],dm=iE[F+1],kD=iE[F+2],gJ=iE[F+3],dR=new bI;
dR.scale(.15,.15);dR.rotate(-Math.PI/2+Math.atan2(gJ-dm,-(kD-e9)));dR.translate(kD,gJ);dR.concat(V);
if(c[jK]){var fO=U(M,c[jK],s,dR,gr,null);M.B.push(fO)}}}cQ.jz();cQ.kT(M);return cQ}function i(M,N){var s=x(N,"stlt").b,V=JSON.parse(JSON.stringify(s.Xe[M]));
if(V.$J!=0){var g8=s.Xe[V.$J];for(var n in g8)if(V[n]==null||V[n]==0)V[n]=g8[n];delete V.$J}V.align=s.aBu[V.aqx];
V.fill=N.wd[s.a2K[V.axb]];V.avw=N.OR[s.aDT[V.ab_]];V.aiK=s.a3q[V.aaT];return V}function b(F){var jF=F.data[F.z];
F.z+=1;return jF}function e(F){var jF=w.uv(F.data,F.z);F.z+=2;return jF}function k(F){var jF=w.K3(F.data,F.z);
F.z+=4;return jF}function K(F){var jF=w.K3(F.data,F.z);F.z+=8;return jF}function g(F){var jF=w.ls(F.data,F.z);
F.z+=2;return jF}function R(F){var jF=w.fu(F.data,F.z);F.z+=4;return jF}function T(F){var jF=w.FL(F.data,F.z);
F.z+=8;return jF}function D(F){if(F.z>=F.data.length)throw"e";var M=0;while(F.data[F.z+M]!=0)M++;var N=w.mt(F.data,F.z,M);
F.z+=M+1;return N}function a(F){var M="";while(!0){var N=e(F);if(N==0)break;M+=String.fromCharCode(N)}return M}function _(M){var N=k(M),s=(N&4294901760)>>>16,V=(N&65535)/65535;
return s+V}function I(M){if(M.VC<600)return Math.PI*g(M)/1800;return Math.PI*R(M)/18e7}function f(M){if(M.VC<1500)return y(M);
else return T(M)/254e3}function y(M){if(M.VC<600)return g(M)/1e3;else return R(M)/254e3}function Z(M){if(M.VC<600)return e(M);
else return k(M)}function v(M){if(M.VC<600)return g(M);else return R(M)}function G(M,N,s){var V="";for(var F=0;
F<s;F++){for(var g8=0;g8<N;g8+=4){var jF=w.K3(M.data,M.z+F*N+g8);V+=(jF<500?jF:jF)+","}V+="\n"}return V}function q(M,N,s,V,g8,n){var cQ,hk,eG;
for(var ie=0;ie<g8.length;ie++){var eN=N.VC,gr=g8[ie];N.data=M;N.z=gr.z+(gr.P6=="LIST"?4:0);if(V&&gr.sub==null){cQ=k(N);
hk=k(N);eG=k(N);var ek=e(N);if(ek!=0&&ek!=768)throw"e";var jK=e(N);if(jK>32)throw"e";N.z-=16;if(cQ!=4294967295){N.data=V["content/data/"+s[cQ]];
N.z=eG}}if(gr.P6=="vrsn"){if(gr.size==16)N.z+=8;var iE=e(N);N.VC=iE;console.log("Version",iE);N.Mg=iE<600?16:32}else if(gr.P6=="DISP"){}else if(gr.P6=="pack"){var e9=k(N),dm=w.mt(N.data,N.z,4),dR=0;
if(dm!="CPng")throw dm;var kD=new Uint8Array(N.data.buffer,N.z+8+2,gr.size-10-4),gJ=pako.inflateRaw(kD);
gr.sub=[];while(dR<gJ.length){var fO=jQ.WS(gJ,dR);dR=fO.z+fO.size;gr.sub.push(fO)}var ko={data:gJ,z:0,VC:eN,Mg:N.Mg};
q(gJ,ko,s,V,gr.sub,n+1)}else if(gr.P6=="LIST"&&gr.R7=="cmpr"){var d8=k(N),fj=k(N),ja=k(N),e9=k(N),dm=w.mt(N.data,N.z,4),dR=0;
if(dm!="CPng")throw dm;var kD=new Uint8Array(N.data.buffer,N.z+8+2,d8-6-8),gJ=pako.inflateRaw(kD);N.z+=d8;
kD=new Uint8Array(N.data.buffer,N.z+8+2);var eD=pako.inflateRaw(kD),d3=[];for(var fP=0;fP<eD.length;
fP+=4)d3.push(w.K3(eD,fP));gr.sub=[];while(dR<gJ.length){var fO=jQ.WS(gJ,dR,d3);dR=fO.z+fO.size;gr.sub.push(fO)}var ko={data:gJ,z:0,VC:eN,Mg:N.Mg};
q(gJ,ko,s,V,gr.sub,n+1)}else if(gr.P6=="LIST"&&gr.R7=="stlt"||gr.P6=="stlt"){if(cQ==4294967295)return;
var jE=N.z,hl="",dM=32;gr.b={};var cR=k(N);if(cR==0)return;gr.b.a2K=W(N,eN>=1300);gr.b.aDT=W(N);gr.b.a3q={};
var ex=k(N);for(var F=0;F<ex;F++){var er=k(N);N.z+=eN<1e3?12:20;var cE=e(N),a7=e(N);N.z+=8;var dl=y(N);
N.z+=eN<1e3?12:20;gr.b.a3q[er]={aqq:cE,avK:a7,fontSize:dl}}gr.b.aBu=W(N);var f4=k(N);hl+="Intervals\n"+G(N,52,f4)+"\n";
N.z+=52*f4;var em=k(N);hl+="Set5s\n"+G(N,152,em)+"\n";N.z+=152*em;var e$=k(N);hl+="Tabs\n"+G(N,784,e$)+"\n";
N.z+=784*e$;var iP=k(N);hl+="Bullets\n";for(var F=0;F<iP;F++){var b2=N.z,k7=k(N);N.z+=4*3;if(eN>1300)N.z+=4;
var at=k(N);N.z+=4*5;if(eN>=1300){var ju=k(N);if(ju){if(k(N))N.z+=64;else N.z+=60}else N.z+=12}else{N.z+=20;
if(eN>=1e3)N.z+=8;if(k(N))N.z+=8;N.z+=8}var jL=N.z;N.z=b2;hl+=G(N,jL-b2,1);N.z=jL}hl+="\n";var fJ=k(N);
hl+="Indents\n";gr.b.awM={};for(var F=0;F<fJ;F++){var b2=N.z,h6=k(N),iq={};N.z+=12;iq.right=y(N);iq.ao8=y(N);
iq.left=y(N);gr.b.awM[h6]=iq;var jL=N.z;N.z=b2;hl+=G(N,jL-b2,1);N.z=jL}hl+="\n";var iI=k(N);if(eN>=1300)dM+=4;
hl+="Hypens\n"+G(N,dM,iI)+"\n";N.z+=dM*iI;var ik=k(N);hl+="Dropcaps\n"+G(N,28,ik)+"\n";N.z+=28*ik;if(eN>800){var jp=k(N);
hl+="Set11s\n"+G(N,28,jp)+"\n";N.z+=12*jp}gr.b.Xe={};for(var F=0;F<cR;F++){var eA=k(N);if(eA>3)throw eA;
var k8=k(N),ay={};ay.$J=k(N);N.z+=8;var bK=k(N);if(eN>=1200)bK*=2;N.z+=bK;ay.axb=k(N);ay.ab_=k(N);if(eA>1){ay.aaT=k(N);
ay.aqx=k(N);ay.aeE=k(N);ay.ay5=k(N);if(eN>800)ay.a6A=k(N)}if(eA>2){ay.aA9=k(N);ay.a8u=k(N);ay.arl=k(N);
ay.ayp=k(N);ay.a35=k(N)}gr.b.Xe[k8]=ay}}else if(gr.P6=="LIST")q(M,N,s,V,gr.sub,n+1);else if(gr.P6=="txsm"){gr.b={};
if(eN<600)throw"e";if(eN<700)throw"e";if(eN>=1600){gr.b=C(N);return}if(eN>=1500)N.z+=37;else N.z+=36;
if(k(N)){if(eN<800)N.z+=32}if(eN<800)N.z+=4;gr.b.alr=k(N);gr.b.rv=[];N.z+=48;if(eN>=800){if(k(N)){N.z+=32;
if(eN>=1300)N.z+=8}}if(eN>=1500)N.z+=12;var eA=k(N),a4=1,h_=!1;if(!eA){if(eN>=800)N.z+=4;if(eN>800)N.z+=2;
if(eN>=1400)N.z+=2;N.z+=24;if(eN<800)N.z+=8;a4=k(N)}for(var fP=0;fP<a4;fP++){var bj=k(N),F=0;if(eN>=1300&&eA)N.z++;
N.z++;var cR=k(N),gs=[];for(F=0;F<cR;F++){var bs=b(N),jA=0;b(N);var e3=b(N);if(eN>=800)jA=b(N);var ay={};
if(e3&1){ay.aqq=e(N);var kn=e(N);if(kn)ay.awC=kn}if(e3&2)N.z+=4;if(e3&4)ay.ajC=y(N);if(e3&8)N.z+=4;if(e3&16)N.z+=4;
if(e3&32)N.z+=4;if(e3&64){ay.axb=k(N);if(eN>=1500)N.z+=48}if(e3&128){ay.ab_=k(N)}if(jA&8){if(eN>=1300){var j6=k(N);
if(N.z+j6*2>=N.data.length){h_=!0;break}N.z+=j6*2}else N.z+=4}if(jA&32){var cL=b(N);if(cL)N.z+=52}if(bs==2)if(eN>=1300)N.z+=48;
gs.push(ay)}if(h_){break}var eb=k(N);if(N.z+eb*4>N.data.length)break;var dY=[];for(F=0;F<eb;F++){var aP=0;
if(eN>=1200)aP=K(N)&4294967295;else aP=k(N);dY[F]=aP>>16|aP&1}var ks=eb;if(eN>=1200)ks=k(N);var jC=D(N);
gr.b.rv.push({aa2:bj,text:jC,Xe:gs})}}else if(gr.P6=="arrw")gr.b=h(N);else if(gr.P6=="font"){var b2=N.z,ig=e(N),cD=e(N),eB="";
N.z+=14;if(N.VC>=1200)eB=a(N);else eB=D(N);gr.b={id:ig,ayc:cD,name:eB};if(V){var c1=b2+hk;while(N.data[N.z]==0)N.z++;
N.z+=2;var dq=a(N);while(N.data[N.z]==0)N.z++;while(N.data[N.z]<=2)N.z+=4;gr.b.pi=a(N)}}else if(["IKEY","ICMT","pfrd","bcfg"].indexOf(gr.P6)!=-1){}else if(gr.P6=="flgs")gr.b=k(N);
else if(gr.P6=="bbox"){var b$=y(N),d7=y(N),he=y(N),k4=y(N);gr.b=new gh(b$,d7,he-b$,k4-d7)}else if(gr.P6=="fild"){var a6=k(N),ds;
if(eN>=1300)N.z+=8;var cK=e(N);if(cK==0){}else if(cK==1){N.z+=eN>=1300?13:2;ds=A(N)}else if(cK==2){N.z+=eN>=1300?8:2;
var iy=b(N),gu=0;if(eN>=1300){N.z+=17;gu=g(N)}else if(eN>=600){N.z+=19;gu=R(N)}else{N.z+=11;gu=g(N)}var gL=I(N),dc=.5+v(N),aQ=.5+v(N)-.5;
if(eN>=600)N.z+=2;var ec=Z(N)&255,gH=b(N)/100;N.z++;var ap=Z(N)&65535;if(eN>=1300)N.z+=3;var gj=[];for(var F=0;
F<ap;F++){var fx=A(N);if(eN>=1400)N.z+=26;else if(eN>=1300)N.z+=5;var aT=(Z(N)&65535)/100;if(eN>=1300)N.z+=3;
gj.push([aT,fx])}ds={typ:iy==1?"lin":"rad",crds:[dc-Math.cos(gL)/2,aQ-Math.sin(gL)/2,dc,aQ],grad:gj,mat:[1,0,0,1,0,0]}}else console.log("Unknown fill type",cK);
gr.b={id:a6,type:cK,b:ds}}else if(gr.P6=="outl"){var bL=k(N);if(eN>=1300){var kr=0,jS=0;while(kr!=1){N.z+=jS;
kr=k(N);jS=k(N)}}var bE=e(N),gl=e(N),dC=e(N);if(eN<1300&&eN>=600)N.z+=2;var ci=y(N),kC=e(N)/100;if(eN>=600)N.z+=2;
var aI=I(N);if(eN>=1300)N.z+=46;else if(eN>=600)N.z+=52;var ds=A(N);if(eN<600)N.z+=10;else N.z+=16;var fB=e(N),cO=N.z,bY=[];
for(var F=0;F<fB;++F)bY.push(e(N));if(eN<600)N.z=cO+20;else N.z=cO+22;var fS=k(N),i_=k(N);gr.b={id:bL,ag7:bE,a66:gl,a1I:dC,lineWidth:ci,color:ds,Pb:bY,arL:fS,a7Z:i_}}else if(gr.P6=="mcfg"){if(1300<=eN)N.z+=12;
else if(900<=eN)N.z+=4;else if(600<=eN&&eN<700)N.z+=28;var dv=0,g1=0;if(eN<400){N.z+=2;var b$=y(N),d7=y(N),he=y(N),k4=y(N);
dv=Math.abs(he-b$);g1=Math.abs(k4-d7)}else{dv=y(N);g1=y(N)}gr.b={adU:new bC(dv,g1)}}else if(gr.P6=="loda"||gr.P6=="lobj"){var jE=N.z,jo=Z(N),eS=Z(N),gX=Z(N),fT=Z(N),gm=Z(N),hq=[],bD=[],F=0,dj=null;
N.z=jE+gX;while(F<eS)hq[F++]=Z(N);N.z=jE+fT;while(F>0)bD[--F]=Z(N);gr.b={};for(F=0;F<eS;F++){N.z=jE+hq[F];
var g3=bD[F];if(g3==30){if(eN>=400&&gm==1||eN<400&&gm==0){gr.b.path=O(N)}else if(eN>=400&&gm==2||eN<400&&gm==1){gr.b.path=P(N)}else if(eN>=400&&gm==3||eN<400&&gm==2){gr.b.path=l(N)}else if(gm==37){gr.b.path=Y(N)}else if(eN>=400&&gm==4||eN<400&&gm==3){gr.b.a99=J(N)}else if(eN>=400&&gm==6||eN<400&&gm==5){gr.b.a6Y=t(N)}else console.log(gm)}else if(g3==20){if(eN<400)gr.b.a2c=H(N);
else gr.b.a4W=k(N)}else if(g3==10){if(eN<400)gr.b.abg=o(N);else gr.b.a6L=k(N)}else if(g3==200)gr.b.akQ=Z(N);
else if(g3==100){if(eN<400)dj=r(N)}}if(dj&&gr.b.path)d.A.i(gr.b.path.j,dj,gr.b.path.j)}else if(gr.P6=="trfd"){var jE=N.z,jo=Z(N),eS=Z(N),gX=Z(N);
N.z=jE+gX;var hq=[];for(var F=0;F<eS;F++)hq[F]=Z(N);for(var F=0;F<eS;F++){N.z=jE+hq[F];if(eN>=1300)N.z+=8;
var dF=e(N);if(dF==8){var e1,fE,b$,cl,i1,d7;if(eN>=600)N.z+=6;if(eN>=500){e1=T(N);fE=T(N);b$=T(N)/(eN<600?1e3:254e3);
cl=T(N);i1=T(N);d7=T(N)/(eN<600?1e3:254e3)}else throw"e";gr.BS=new bI(e1,cl,fE,i1,b$,d7)}else console.log(dF)}}else if(!1){console.log(gr);
var cU=Math.min(gr.size,32);console.log(w.Mm(M,gr.z,cU));console.log(w.anM(M,gr.z,cU))}}}function h(M){var N=k(M);
M.z+=4;var s=e(M);M.z+=4;var V=[];for(var g8=0;g8<s;g8++)V.push(b(M));M.z+=1;var n=[];for(var cQ=0;cQ<s;
cQ++){var hk=[];hk[1]=y(M);hk[0]=y(M);n.push(hk)}var eG=B(n,V);c[N]=eG}function r(M){var N=0,s=0,V=0,g8=0,n=0,cQ=0;
if(M.VC>=300){var hk=M.z;M.z+=10;var eG=Z(M);M.z=hk+eG;N=_(M);s=_(M);V=R(M)/1e3;g8=_(M);n=_(M);cQ=R(M)/1e3}else{V=y(M);
cQ=y(M);N=_(M);s=_(M);V+=_(M)/1e3;g8=_(M);n=_(M);cQ+=_(M)/1e3}return new bI(N,s,g8,n,V,cQ)}function H(M){var N=b(M);
if(N==0)return null;else if(N==1)return A(M);else console.log(N)}function o(M){var N=b(M);N<<=1;var s=y(M),V=e(M)/100,g8=I(M),n=A(M);
return{ag7:N,lineWidth:s,color:n,Pb:[],arL:0,a7Z:0}}function P(M){var N=y(M),s=y(M),V=I(M),g8=I(M),n=d.A.CJ(d.o.JE.Sl(0,0,N,s));
return n}function O(M){var N=M.VC,s=f(M),V=f(M),g8=0,n=0,cQ=0,hk=0,eG=0,ie=1,eN=1;if(N<1500){hk=f(M);
cQ=N<900?hk:f(M);n=N<900?hk:f(M);g8=N<900?hk:f(M)}else{var gr=T(M);if(gr!=0)ie=gr;gr=T(M);if(gr!=0)eN=gr;
var ek=b(M);M.z+=7;if(ek==0){hk=T(M);eG=b(M);M.z+=15;cQ=T(M);M.z+=16;n=T(M);M.z+=16;g8=T(M);var jK=Math.abs(s*ie/2),iE=Math.abs(V*eN/2);
hk*=jK<iE?jK:iE;cQ*=jK<iE?jK:iE;n*=jK<iE?jK:iE;g8*=jK<iE?jK:iE}else{hk=f(M);eG=b(M);M.z+=15;cQ=f(M);
M.z+=16;n=f(M);M.z+=16;g8=f(M)}}return d.A.CJ(d.o.JE.Rect(0,0,s,V,[g8,n,cQ,hk]))}function p(M){var N=k(M);
if(M.VC<1700)N*=2;M.z+=N;return""}function C(M){var N=k(M),V=0;M.z+=37;var s=k(M);for(var F=0;F<s;F++){var g8=k(M);
V=g8;M.z+=48;var n=k(M);if(n==1)M.z+=12*4;else M.z+=8;if(!N){M.z+=16;p(M)}}var cQ={alr:V,rv:[]},hk=k(M);
for(var eG=0;eG<hk;eG++){var ie=k(M),fO="";M.z+=1;if(N)M.z+=1;var eN=p(M),gr=k(M);for(var F=0;F<gr;F++){M.z+=2;
var ek=e(M),jK=e(M);if(jK&4){var iE=k(M);iE*=2;M.z+=iE}if(ek||jK&4){var e9=p(M)}}var dm=k(M),kD=[];for(var F=0;
F<dm;F++){var gJ=K(M)&4294967295;kD[F]=gJ>>16|gJ&1}var dR=k(M);for(var F=0;F<dm;F++){var ko=kD[F]&7,d8=0;
if(ko==0||ko==2||ko==4||ko==6)d8=M.data[M.z++];else if(ko==1||ko==3||ko==5)d8=M.data[M.z++]+M.data[M.z++]*256;
else throw ko;fO+=String.fromCharCode(d8)}var fj=fO.split("\r");for(var F=0;F<fj.length;F++)cQ.rv.push({text:fj[F],aa2:ie,Xe:[]})}return cQ}function W(M,N){var s={},V=k(M);
for(var F=0;F<V;F++){var g8=k(M);M.z+=4;var n=k(M);s[g8]=n;if(N)M.z+=48}return s}function J(M){var N=y(M),s=y(M);
return new bC(N,s)}function t(M){M.z+=4;var N=y(M),s=y(M);return new bC(N,s)}function Y(M){M.z+=4;var N=e(M)+e(M);
M.z+=16;var s=m(M,N);return s}function l(M){var N=e(M);M.z+=2;return m(M,N)}function m(M,N){var s=[],V=[];
for(var F=0;F<N;F++)s.push([y(M),y(M)]);for(var F=0;F<N;F++)V.push(b(M));return B(s,V)}function B(M,N){var s={j:[],G:[]},V=0,g8=0,n=0;
for(var F=0;F<M.length;F++){var V=M[F][0],g8=M[F][1],cQ=N[F];if(!(cQ&64)&&!(cQ&128)||F==0){s.j.push(V,g8);
s.G.push("M");n+=2}else if(cQ&64&&!(cQ&128)){s.j.push(V,g8);s.G.push("L");n+=2}else if(!(cQ&64)&&cQ&128){s.j.push(V,g8);
s.G.push("C");n+=6}else if(cQ&64&&cQ&128){s.j.push(V,g8)}}if(n!=s.j.length)throw"e";return s}function L(M,N){var s=w.K3;
N+=8;var V=s(M,N);N+=4;var g8=s(M,N);N+=4;N+=4*7;var n=N,cQ=d.R(V*g8*4);N+=1024;for(var hk=0;hk<g8;hk++)for(var eG=0;
eG<V;eG++){var F=hk*V+eG,ie=(g8-hk-1)*V+eG,eN=M[N+F]<<2,gr=ie<<2;cQ[gr+0]=M[n+eN+2];cQ[gr+1]=M[n+eN+1];
cQ[gr+2]=M[n+eN+0];cQ[gr+3]=255}return{AX:cQ,rect:new gh(0,0,V,g8)}}function A(M){var N=M.VC,s=0,V=0,g8=0;
if(N>=500){s=e(M);if(s==1&&N>=1300)s=25;if(s==30){s=25;V=30}else{V=e(M);M.z+=4}g8=k(M)}else if(N>=400)throw"e";
else{s=b(M);g8=k(M)}return S(s,V,g8)}function S(M,N,s){var V=[0,0,0];if(M==2||M==3||M==9||M==17){var g8=[s>>>0&255,s>>>8&255,s>>>16&255,s>>>24&255];
if(M==2)for(var F=0;F<4;F++)g8[F]=Math.round(255*g8[F]/100);for(var F=0;F<4;F++)g8[F]/=255;V=UDOC.C.cmykToRgb(g8)}else if(M==1||M==5){V=[s>>>0&255,s>>>8&255,s>>>16&255];
for(var F=0;F<3;F++)V[F]=V[F]/255;if(M==5)V.reverse()}else console.log("Unknown color model "+M,s,s.toString(16));
return V}return{s5:$}}(),ht=function(){var x,Q,c=new ArrayBuffer(4),$=new Uint8Array(c),z=new Uint32Array(c),j=new Float32Array(c);
function U(g,R){for(var T=0;T<g.length;T++)if(g[T][0]==R)return g[T]}function i(){var g=0,R=0,T=0;do{T=x[Q++];
g|=(T&127)<<R;R+=7}while(T&128&&R<35);return g>>>0}function b(g,R,T,D,a){x=g;Q=R;var _=D[0]=="mesg",I=D[2],f={},y=1,Z=_?1e9:I.length;
while(y<=Z){var v=y;if(_){v=i();if(v==0)break}var G=U(I,v),q=G[2],h=G[1]==1,r=h?i():1,H=new Array(r);
if(q==3){if(!h)throw"e";H=x.slice(Q,Q+r);Q+=r}else for(var F=0;F<r;F++){var o;if((q&1)==1){if(q==1)o=x[Q++]==1;
else if(q==3)o=x[Q++];else if(q==5){var P=i();o=P&1?~(P>>>1):P>>>1}else if(q==7)o=i();else if(q==9){if(x[Q]==0){o=0;
Q++}else{$[0]=x[Q];$[1]=x[Q+1];$[2]=x[Q+2];$[3]=x[Q+3];var O=z[0];z[0]=O<<23|O>>>9;o=j[0];Q+=4}}else if(q==11){var p=e(x,Q);
o=p[0];Q+=p[1]+1}else throw q}else{var C=T[q>>>1];if(C[0]=="enum"){var W=i();o=C[2][W]}else{var J=b(x,Q,T,C,a+1);
o=J[0];Q=J[1]}}H[F]=o}f[G[3]]=h?H:H[0];y++}return[f,Q]}function e(g,R){var T=R;while(g[T]!=0)T++;return[w.IV(new Uint8Array(g.buffer,R,T-R)),T-R]}function k(g,R){var T=R;
while(g[T]!=0)T++;for(var F=R;F<T;F++)if(g[F]>127)throw"e";return w.mt(g,R,T-R)}function K(g){x=g;Q=1;
var R=[];while(Q<g.length){var T=Q,D=R.length,a=k(g,Q);Q+=a.length+1;var _=i();if(_>2)throw"e";var I=i(),f=[];
for(var F=0;F<I;F++){var y=k(g,Q);Q+=y.length+1;var Z=i(),v=i(),G=i();f.push(_==0?y:[G,v,Z,y])}R.push([["enum","strc","mesg"][_],a,f])}return R}return{a7d:K,acY:b}}();
function hR(){}hR.s5=function(x,Q){var c=Date.now(),$=new Uint8Array(x),z=8,j,K=0,J=0;if($[0]==80&&$[1]==75){j=UZIP.parse(x);
$=j["canvas.fig"]}var U=w.K3($,z);z+=4;var i=[];while(z<$.length){var b=w.K3($,z);z+=4;var e=$.slice(z,z+b);
if($[z]==137&&$[z+1]==80){}else e=UZIP.inflateRaw(e);i.push(e);z+=b}var k=ht.a7d(i[0]);for(var F=0;F<k.length;
F++)if(k[F][1]=="Message")K=F;var g=ht.acY(i[1],0,k,k[K],0)[0],R={xu:{},Pv:{},a5F:{},IA:j},T=g.nodeChanges;
for(var D=0;D<T.length;D++){var a=T[D],_=a.guid;R.Pv[_.sessionID+","+_.localID]=a}for(var D=0;D<T.length;
D++){var a=T[D],_=a.parentIndex;if(_){var I=hR._o(R.Pv,_.guid);if(I.children==null)I.children=[];I.children.push(a)}}var f=T[0],y=f.children,Z=new gh,v=[],G=[];
for(var _=0;_<y.length;_++){var q=y[_],h=q.children;if(q.name=="Internal Only Canvas"||h==null)continue;
var r=new gh;for(var F=0;F<h.length;F++){var H=h[F],o=H.transform,P=H.size;if(o.m00==1&&o.m10==0&&o.m01==0&&o.m11==1){var O=new gh(o.m02,o.m12,P.x,P.y);
r=r.iO(O)}}var p=Z.e==0?0:Z.e+100,C=r.clone();C.x=0;C.y=p;Z=Z.iO(C);v[_]=r;G[_]=p}var W=bp.ub(new gh(0,0,Z.m,Z.e),8192*8192);
Q.m=Math.round(Z.m/W);Q.e=Math.round(Z.e/W);Q.buffer=d.R(Q.m*Q.e*4);for(var _=0;_<y.length;_++){var q=y[_],h=q.children;
if(q.name=="Internal Only Canvas"||h==null)continue;h.sort(hR.aq2);var t=new bI(1,0,0,1,-v[_].x,G[_]-v[_].y);
t.scale(1/W,1/W);for(var F=0;F<h.length;F++){var H=h[F];hR.D_(H,[],t,g.blobs,Q,0,R);J++}}Q.cV(J);Q.RS=!0;
if(W!=1)alert("File scaled down "+W+"x")};hR.D_=function(x,Q,c,$,z,j,U){var i=hR,r=!1,H,O=!1,p,C;Q=JSON.parse(JSON.stringify(Q));
var b=x.overrideKey?x.overrideKey:x.guid;for(var F=0;F<Q.length;F++){var e=Q[F],k=e.guidPath.guids;if(i.a4C(k[0],b)){if(k.length==1){var K={};
for(var g in x)K[g]=e[g]!=null?e[g]:x[g];x=K}else e.guidPath.guids=k.slice(1)}}var R=x.type,T=x.children,D=x.size,a=x.effects,_=z.Xh();
_.gF(x.name);_.KW(x.visible);_.opacity=Math.round(x.opacity*255);var I=i._z(x.transform),f=I.clone();
f.concat(c);if(D==null)D={x:0,y:0};var y=new gh(Math.round(f.DX),Math.round(f.ti),Math.round(D.x*f.c0()),Math.round(D.y*f.c0()));
if(y.m==0||isNaN(y.m))y.m=100;if(y.e==0||isNaN(y.e))y.e=100;var Z=x.fillPaints,v=x.inheritFillStyleID;
if(v){var K=i._o(U.Pv,v);if(K)Z=K.fillPaints}if(Z==null)Z=[];var Z=i.agM(Z),G=Z[0];if(G&&G.type=="IMAGE"&&i.VY($,hR.D8(G),U,!0)==null)G=null;
var q=x.strokePaints,v=x.inheritFillStyleIDForStroke;if(v){var K=i._o(U.Pv,v);if(K)q=K.fillPaints}if(q==null)q=[];
var q=i.agM(q),h="BOOLEAN_OPERATION LINE RECTANGLE ROUNDED_RECTANGLE ELLIPSE VECTOR REGULAR_POLYGON STAR".split(" ").indexOf(R)!=-1;
if(h||R=="FRAME"){H=new eM.hn;i.aeP(x,$,H);r=d.o.Uu(H.$);d.o.Of(H.$,f);var o=d.A.Yc(d.o.sP(H.$));if(!o._6())y=o;
if(U.xu.hk&&G){var P=eM.hn.gG(U.xu.hk.$);for(var F=2;F<P.length;F++)if(P[F].Kp!=null)P[F].Kp=3;H.$=H.$.concat(P.slice(2))}}if(G&&G.type=="IMAGE"){C=G.imageScaleMode;
O=!0;var W=G.originalImageWidth,J=G.originalImageHeight;if(W*J==0){var t=i.VY($,hR.D8(G),U);W=t.K$.m;
J=t.K$.e}var Y=W/J,l=D.x/D.y;p=Math.abs(Y-l)}if(R=="FRAME"){}else if(h&&r&&O&&(C=="FIT"||C=="FILL"&&p<=.05||C=="STRETCH"&&p<=.05)){var m=i.VY($,hR.D8(G),U,!0),B=z.BQ(m,_.getName(),0,0);
B.H2=_.H2;B.opacity=_.opacity;_=B;var L=new gh(0,0,D.x,D.y);if(C=="FIT"){var A=G.originalImageWidth,S=G.originalImageHeight,M=Math.min(D.x/A,D.y/S),N=A*M,s=S*M;
L=new gh(L.x+(L.m-N)/2,L.y+(L.e-s)/2,N,s)}var V=d.A.Hg(L).j;d.A.i(V,f,V);_.add.SoLd.Trnf=X.Y.TD(V);_.add.SoLd.nonAffineTransform=X.Y.TD(V);
var g8=[],a=x.effects,n=G.paintFilter;if(a)for(var F=0;F<a.length;F++)if(a[F].type=="FOREGROUND_BLUR"){var cQ=a[F],hk=fK.Z5("GsnB",{});
g8.push(hk);hk.v.enab.v=cQ.visible;hk.v.Fltr.v.Rds.v.val=cQ.radius/2.4}if(n&&n.exposure!=0){var hk=fK.Z5("brit",{});
g8.push(hk);hk.v.Fltr.v.Brgh.v=Math.round(n.exposure*160);hk.v.Fltr.v.useLegacy.v=!0}if(n&&n.vibrance!=0){var hk=fK.Z5("vibA",{});
g8.push(hk);hk.v.Fltr.v.Strt.v=Math.round(Math.round(n.vibrance*100))}if(g8.length!=0){_.add.SoLd.filterFX=fK.xO();
z.C3({id:_.add.SoLd.placed.v,rect:new gh,buffer:d.R(1),F:new eM.zM});_.add.SoLd.filterFX.v.filterFXList.v=g8}_.bx(z,!1);
i.a3g(U,_,z)}else if(h){i.a4B(_,H,x,G,q,f,y,$,z,U);if(a)for(var F=0;F<a.length;F++){var cQ=a[F];if(cQ.type!="FOREGROUND_BLUR")continue;
H.bS=cQ.radius/2.4}_.jz();_.kT(z)}else if(R=="TEXT"){var eG=x.textData,ie=eG.layoutSize,eN=["LEFT","RIGHT","CENTER"].indexOf(x.textAlignHorizontal);
_.add.lnsr="rend";_.add.TySh=dU.Y7(0,0);_.add.TySh.Iv=new gh(0,0,100,100);var gr=f.clone();_.add.TySh.i=gr;
var ek=_.add.TySh.HW,jK=eG.characters;if(x.textCase=="TITLE"){for(var F=0;F<jK.length;F++)if(F==0||jK[F-1]==" "){var iE=jK.slice(0,F),e9=jK.slice(F+1);
jK=iE+jK[F].toUpperCase()+e9}}jK=jK.replace(/\u2028/g,"\n");jK=jK.replace(/\u2029/g,"\n");jK=jK.replace(/\r\n/g," \n");
dU.U3(ek,0,jK);var dm=x.textAutoResize,kD=eG.baselines;if(dm=="WIDTH_AND_HEIGHT"){var gJ=eN==0?0:eN==1?ie.x:ie.x/2,dR=kD?kD[0].position.y:0;
gr.translate(gJ*f.c0(),dR*f.c0());dU.DY(ek,0)}else if(dm=="HEIGHT"||dm=="NONE"||dm==null){var dR=kD?kD[0].position.y-x.fontSize*.7:0;
gr.translate(0,dR*f.c0());dU.DY(ek,1);dU.ei(ek,[0,0,Math.round(ie.x),Math.round((dm=="NONE"?1.8:1)*ie.y)])}else throw dm;
if(jK!=""){var fO=dU.zl(ek,0,1);i.aBE(x,f,D,fO,_,$,z,U);dU.G4(ek,0,jK.length,fO);var ko=eG.characterStyleIDs,d8=eG.styleOverrideTable;
if(ko){ko=ko.slice(0);for(var F=0;F<ko.length;F++)if(jK[F]=="\n")ko[F]=-F-1;var fj=[0],ja=0,eD=0;for(var F=0;
F<ko.length;F++){eD++;var d3=ko[F];if(F==0||d3==ko[F-1]){}else{fj.push(eD-1,F);eD=1}}fj.push(eD);for(var F=0;
F<fj.length;F+=2){var fP=fj[F],jE=fj[F+1];if(jK[fP]=="\n")continue;var d3=ko[fP];if(d3!=0){var cR;for(var ex=0;
ex<d8.length;ex++)if(d8[ex].styleID==d3)cR=d8[ex];var fO=dU.zl(ek,fP,fP+1);i.aBE(cR,f,D,fO,_,$,z,U);
dU.G4(ek,fP,fP+jE-1,fO)}}}}}else if(R=="SYMBOL"){}else if(R=="INSTANCE"){var er=x.symbolData,cE=er.symbolOverrides,K=i._o(U.Pv,er.symbolID);
if(K)T=K.children;else console.log(x.name,"symbol not found",er.symbolID);Q=Q.slice(0);for(var F=0;F<cE.length;
F++)Q.push(cE[F])}else console.log(R);if(!1){}else if(T&&!h){z.B.push(z.x6());var a7=!1,dl=j==0&&R!="SYMBOL"&&R!="INSTANCE";
if(dl){if(y._6())console.log(y);_.Zp(y)}G=Z[Z.length-1];if(G&&G.type=="IMAGE"&&i.VY($,hR.D8(G),U,!0)==null)G=null;
if(dl&&G&&G.type=="SOLID"){var hl=G.color;_.add.artb.artboardBackgroundType.v=4;_.add.artb.Clr=i.zH(hl)}else if((G||q[0])&&H){var f4=z.Xh();
f4.gF("Background");i.a4B(f4,H,x,G,q,f,y,$,z,U);f4.jz();f4.kT(z);z.B.push(f4);a7=!0}T.sort(i.aq2);var em=U.xu;
U.xu={};for(var e$=0;e$<T.length;e$++)i.D_(T[e$],Q,f,$,z,j+1,U);U.xu=em;_.add.lsct=!1?hA.DJ:hA.H3;_.s3="pass";
var iP=_.M5();_.H2=24;_.KW(iP);var b2=j!=0&&Z.length!=0&&!x.frameMaskDisabled&&x.containerSupportsFillStrokeAndCorners;
if(!a7&&b2&&H){_.add.vmsk=H;_.jz();_.kT(z)}else i.a3g(U,_,z);z.B.push(_)}else if(x.mask){if(H){U.xu.hk=H}}else{var k7=[],iI=1;
if(a)for(var at=0;at<a.length;at++){var cQ=a[at],ju=cQ.color,jL=cQ.type,fJ=["DROP_SHADOW","INNER_SHADOW"].indexOf(jL);
if(fJ!=-1){var h6=["DrSh","IrSh"][fJ],iq=JSON.parse(aF.lF[aF.order.indexOf(h6)]);k7.push([h6,iq]);iq.enab.v=cQ.visible;
iq.Md.v.BlnM=cq.DU(i.aDd(cQ.blendMode));iq.Opct.v.val=Math.round(100*ju.a);iq.blur.v.val=Math.round(cQ.radius*f.c0());
iq.Clr=i.zH(ju);var gJ=cQ.offset.x,dR=cQ.offset.y;iq.uglg.v=!1;iq.lagl.v.val=Math.round(180/Math.PI*Math.atan2(dR,-gJ));
iq.Dstn.v.val=Math.round(Math.sqrt(gJ*gJ+dR*dR)*f.c0())}}if(R=="TEXT"&&Z[0]&&Z[0].type!="SOLID")iI=0;
for(var F=iI;F<Z.length;F++){var dM=Z[F],ik=i.Fe(x,dM,f,y,$,z,U);if(ik[0]=="GdFl")k7.push(["GrFl",ik[1]]);
else if(ik[0]=="SoCo")k7.push(["SoFi",ik[1]]);else if(ik[0]=="PtFl")k7.push(["patternFill",ik[1]]);else if(ik[0]=="None"){}else throw ik}if(!h)for(var F=0;
F<q.length;F++){var dM=q[F],ik=i.Fe(x,dM,f,y,$,z,U);if(ik[0]=="SoCo"){var iq=JSON.parse(aF.lF[aF.order.indexOf("FrFX")]);
k7.push(["FrFX",iq]);iq.enab=ik[1].enab;iq.Opct=ik[1].Opct;iq.Md=ik[1].Md;iq.Clr=ik[1].Clr;iq.Sz.v.val=Math.round(x.strokeWeight);
var jp=x.strokeAlign;if(jp)iq.Styl.v.FStl=aF.stroke.types[["INSIDE","CENTER","OUTSIDE"].indexOf(jp)]}}if(k7.length!=0){var eA=JSON.parse(aF.default);
for(var F=0;F<aF.order.length;F++)eA[aF.mh[F]]={t:"VlLs",v:[]};for(var F=0;F<k7.length;F++){var k8=k7[F],h6=aF.mh[aF.order.indexOf(k8[0])];
eA[h6].v.unshift({t:"Objc",v:k8[1]})}if(T==null)_.add.lmfx=eA}z.B.push(_)}};hR.a4B=function(x,Q,c,$,z,j,U,i,b,e){var k=hR;
x.H2|=16;x.add.vmsk=Q;var K=x.add.vstk=aF.XM.$H(),g=k.Fe(c,$,j,U,i,b,e);K.fillEnabled.v=g[0]!="None";
if(g[0]=="None"){x.add.SoCo=g[1]}else{k.ea(g,x);x.add[g[0]]=g[1]}var g=k.Fe(c,z[0],j,U,i,b,e);if(g[0]!="None"){var K=x.add.vstk;
K.strokeEnabled.v=!0;K.strokeStyleLineWidth.v.val=c.strokeWeight*j.c0();K.strokeStyleLineAlignment.v.strokeStyleLineAlignment=aF.XM.xS[["INSIDE","CENTER","OUTSIDE"].indexOf(c.strokeAlign)];
var R={SoCo:"SoFi",GdFl:"GrFl",PtFl:"patternFill"}[g[0]],T=["SoFi","GrFl","patternFill"].indexOf(R),D=[aF.ZS,aF.ul,aF.qK][T];
K.strokeStyleContent.v={classID:aF.XM.R7[0]};var a=c.dashPattern;if(a)K.strokeStyleLineDashSet.v=en.xo(a,1/c.strokeWeight);
var _=K.strokeStyleContent.v={classID:aF.XM.R7[T]};for(var F=0;F<D.length;F++)_[D[F]]=g[1][D[F]];if(!K.fillEnabled.v)k.ea(g,x)}};
hR.ea=function(x,Q){var c=x[1].Opct.v.val;if(c!=100)Q.opacity=Math.round(Q.opacity/255*(c/100)*255)};
hR.aq2=function(x,Q){var c=x.parentIndex.position,$=Q.parentIndex.position;return c>$?1:-1};hR.agM=function(x){for(var F=1;
F<x.length;F++){var Q=x[F];if(Q.type=="IMAGE"&&Q.opacity==1){x=x.slice(F);break}}for(var F=0;F<x.length;
F++){var Q=x[F],c=Q.imageThumbnail,$=Q.type=="IMAGE";if($&&(Q.image==null||Q.image.dataBlob==null)&&c&&c.dataBlob)Q.image=c;
if(!Q.visible||$&&Q.image==null){x.splice(F,1);F--}}return x};hR.a3g=function(x,Q,c){if(x.xu.hk){Q.add.vmsk=x.xu.hk.clone();
Q.jz();Q.kT(c)}};hR.aBE=function(x,Q,c,$,z,j,U,i){var b=x.fontSize,e=x.lineHeight,k=x.fontName,K=x.textAlignHorizontal,g=x.textTracking,R=x.textCase,T=x.textDecoration;
if(b==null)b=$.VA.FontSize;if(k){var D=k.postscript;if(D==""){var a=k.family,_=k.style;D=a.split(" ").join("")+"-"+_}dU.gD($,D)}if(b!=null)$.VA.FontSize=Math.round(b);
if(T=="UNDERLINE")$.VA.Underline=!0;if(g)$.VA.Tracking=Math.round(g*1e3);if(R)$.VA.FontCaps=R=="UPPER"?2:0;
if(e&&(e.units!="PERCENT"||e.value!=100)){if(b==null)b=15;var I=e.value;if(e.units=="PERCENT")I=1*b*I/100;
if(e.units=="RAW")I=1*b*I;$.VA.AutoLeading=!1;$.VA.Leading=Math.round(I)}if(K)$.SW.Justification=["LEFT","RIGHT","CENTER"].indexOf(K);
var f=x.fillPaints,y=x.inheritFillStyleID;if(y){var Z=hR._o(i.Pv,y);if(Z)f=Z.fillPaints}if(f&&f[0]){var v=hR.Fe(x,f[0],Q,c,j,U,i);
if(v[0]=="SoCo"){var G=d.I.Du(v[1].Clr.v);$.VA.FillColor={Type:1,Values:[1,G.Z/255,G.r/255,G.J/255]};
hR.ea(v,z)}}};hR.Fe=function(x,Q,c,$,z,j,U){var i=hR,b,e,k=x.size;if(k==null)k={x:0,y:0};if(Q){var K=Q.type,g=["GRADIENT_LINEAR","GRADIENT_RADIAL","GRADIENT_DIAMOND","GRADIENT_ANGULAR"].indexOf(K);
if(K=="SOLID"){b="SoCo";var R=Q.color;e=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]);e.Clr=i.zH(R)}else if(g!=-1){var T=JSON.parse(aF.lF[aF.order.indexOf("GrFl")]),D=T.Grad.v;
D.Intr.v=0;T.Type.v.GrdT=["Lnr","Rdl","Dmnd","Angl"][g];var a=[],_=Q.stops;for(var F=0;F<_.length;F++){var I=_[F],f=I.color;
a.push([I.position,[f.r,f.g,f.b],f.a])}d.I.q1(a,D);var y=i._z(Q.transform);y.HQ();var Z=y.clone();if(k)Z.scale(k.x,k.y);
Z.concat(c);var v=new bC(0,.5),G=new bC(1,.5);v=Z.RE(v);G=Z.RE(G);if(!0){v.x=G.x+.5*(v.x-G.x);v.y=G.y+.5*(v.y-G.y)}d.I.vO(v,G,$,T);
if(g==3){if(Z.V*Z.xq-Z.J*Z.dC<0)T.Rvrs.v=!T.Rvrs.v}b="GdFl";e=T}else if(K=="IMAGE"){var T=JSON.parse(aF.lF[aF.order.indexOf("patternFill")]),y=i._z(Q.transform);
y.HQ();var q=hR.D8(Q),h=U.a5F[q];if(h==null){var r=i.VY(z,q,U);h=U.a5F[q]={};h.id=hf.KN()+"-d71c-11e5-b1ae-a548a96e5f9f";
h.GD=[new Uint8Array(r.data),r.K$];if(y.V<0){var H=h.GD[0].slice(0);d.D.qf(H,h.GD[0],r.K$.m,r.K$.e)}h.name="someImage";
j.uh(h)}if(y.V<0)y.V=-y.V;var o=["FILL","FIT","STRETCH","TILE"].indexOf(Q.imageScaleMode),P=o==3?Q.scale:1;
en.a9H(h,T,k.x,k.y,o,c,y,P);b="PtFl";e=T}else if(K=="VIDEO"){b="SoCo";e=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]);
e.Clr=i.zH({r:255,g:0,b:255})}else throw K;if(e)e.Opct={t:"UntF",v:{type:"#Prc",val:Math.round(Q.opacity*100)}}}if(b==null||Q.opacity<.001){b="None";
e={classID:"null",Clr:{t:"Objc",v:d.I.lV({Z:0,r:0,J:0})}}}return[b,e]};hR.D8=function(x){var Q=x.image,c=Q.dataBlob;
if(c==null){c="";for(var F=0;F<20;F++)c+=Q.hash[F].toString(16).padStart(2,"0")}return c};hR.VY=function(x,Q,c,$){if(x[Q]){var z=x[Q];
if($)return z.bytes;if(z.rslt)return z.rslt;var j=z.bytes.buffer;z.rslt=hR.afd(j);return z.rslt}else{if(c.IA==null)return null;
if($)return c.IA["images/"+Q];var j=c.IA["images/"+Q].buffer;if(c.IA["images/-"+Q])return c.IA["images/-"+Q];
c.IA["images/-"+Q]=hR.afd(j);return c.IA["images/-"+Q]}};hR.afd=function(x){var Q=ar.HB(x);if(Q=="fpng")Q="png";
var c=ar.pz(Q);try{return c.fk(x)[0]}catch(dQ){return{data:d.R(4),K$:new gh(0,0,1,1)}}};hR.aeP=function(x,Q,c){var $=x.type,z=x.size,j=x.cornerRadius,e;
if(j==null)j=0;var U=z.x,i=z.y,b=[j,j,j,j],k=["rectangleTopLeftCornerRadius","rectangleTopRightCornerRadius","rectangleBottomRightCornerRadius","rectangleBottomLeftCornerRadius"];
for(var F=0;F<4;F++)if(x[k[F]]!=null)b[F]=x[k[F]];if($=="RECTANGLE"||$=="ROUNDED_RECTANGLE"||$=="FRAME"){e=d.o.JE.Rect(0,0,U,i,b)}else if($=="ELLIPSE"){var K=x.arcData,g=K?K.startingAngle:0,R=K?K.endingAngle:2*Math.PI,T=K?K.innerRadius:0;
if(g==0&&R>1.999*Math.PI)e=d.o.JE.Sl(0,0,U,i,0);else e=d.o.JE.a8l(U/2,i/2,i/2,g,R);if(T!=0&&T!=1){var D=eM.hn.gG(e).slice(3);
D.reverse();for(var F=0;F<D.length;F++){var a=D[F],_=a.Hw;a.Hw=a.Im;a.Im=_}var I=new bI;I.translate(-U/2,-i/2);
I.scale(T,T);I.translate(U/2,i/2);d.o.Of(D,I);e=e.concat(D);e[2].length*=2}}else if($=="LINE"){e=d.o.JE.Rect(0,0,U,i,0);
e.pop();e.pop();e[2].length=2}else if($=="STAR"){e=d.o.JE.aAI(U/2,i/2,U/2,2*Math.PI*(1/4),5,0,x.starInnerScale)}else if($=="REGULAR_POLYGON"){e=d.o.JE.sY(.5,.5,.5,Math.PI/2,x.count,0);
var f=new bI;f.scale(U,i);d.o.Of(e,f)}else if($=="BOOLEAN_OPERATION"){e=[{type:6},{type:8,all:0}];var y=x.children,Z=["XOR","UNION","SUBTRACT","INTERSECT"].indexOf(x.booleanOperation);
if(Z==-1)throw x;if(y==null)y=[];for(var F=0;F<y.length;F++){var v=y[F],G=new eM.hn,q=hR.aeP(v,Q,G);
if(G.$==null)continue;d.o.Of(G.$,hR._z(v.transform));e=e.concat(G.$.slice(2))}for(var F=3;F<e.length;
F++)if(e[F].Kp!=null)e[F].Kp=Z}else if($=="VECTOR"){var h,r,l=3;if(!0){var H=x.vectorData;if(H==null)return;
h=H.normalizedSize;r=H.vectorNetworkBlob}var o=Q[r].bytes,P=new Uint32Array(o.buffer),O=new Float32Array(o.buffer),p=P[0],C=P[1],W=P[2],J=[],t=[],Y=[],m=l+p*3,B=m+C*7;
for(var F=0;F<p;F++){var L=l+F*3,A=new bC(O[L+1],O[L+2]);J.push(A)}for(var F=0;F<C;F++){var S=m+F*7;
t.push([P[S+0],P[S+1],O[S+2],O[S+3],P[S+4],O[S+5],O[S+6]])}for(var F=0;F<W;F++){var M=P[B+1],N=Y[F]=[];
B+=2;for(var s=0;s<M;s++){var V=P[B++],g8=N[s]=[];for(var n=0;n<V;n++)g8[n]=P[B+n];B+=V}}if(B!=P.length)throw"e";
if(W==0){var cQ=-1;for(var F=0;F<C;F++){if(cQ==-1){}else{var hk=-1;for(var s=F;s<C;s++)if(t[s][4]==cQ)hk=s;
for(var s=F;s<C;s++)if(t[s][1]==cQ)hk=s;if(hk!=-1){var eG=0,_=t[hk];t[hk]=t[F];t[F]=_;if(_[1]!=cQ){eG=_[1];
_[1]=_[4];_[4]=eG;eG=_[2];_[2]=_[5];_[5]=eG;eG=_[3];_[3]=_[6];_[6]=eG}}}cQ=t[F][4]}Y.push([[]]);for(var F=0;
F<C;F++)Y[0][0].push(F)}var eN=[],gr=[];for(var ek=0;ek<Y.length;ek++){for(var jK=0;jK<Y[ek].length;
jK++){var iE=Y[ek][jK],e9=0;if(iE.length>1){var dm=t[iE[0]],kD=t[iE[1]];e9=dm[4]==kD[1]?1:0}for(var F=0;
F<iE.length;F++){var gJ=t[iE[F]],dR=1,fO=4;if(e9==0){dR=4;fO=1}var ko=J[gJ[dR]],d8=J[gJ[fO]];if(F==0){gr.push("M");
eN.push(ko.x,ko.y)}gr.push("C");eN.push(ko.x+gJ[dR+1],ko.y+gJ[dR+2],d8.x+gJ[fO+1],d8.y+gJ[fO+2],d8.x,d8.y)}}}e=d.A.tf({j:eN,G:gr},!1);
if(j!=0){var b=[],fj=e[2].length;for(var F=0;F<fj;F++)b.push(j);if(d.o.DS(e))d.o.Hs(e,2,b)}var ja=new bI;
ja.scale(h.x==0?1:z.x/h.x,h.y==0?1:z.y/h.y);d.o.Of(e,ja)}c.$=e};hR._o=function(x,Q){return x[Q.sessionID+","+Q.localID]};
hR.a4C=function(x,Q){return x.sessionID==Q.sessionID&&x.localID==Q.localID};hR.aDd=function(x){var Q={NORMAL:"norm",MULTIPLY:"mul ",SCREEN:"scrn",COLOR_DODGE:"div ",COLOR_BURN:"idiv",HARD_LIGHT:"hLit",DARKEN:"dark",LUMINOSITY:"lum ",OVERLAY:"over",COLOR:"colr"}[x];
if(Q==null)throw x;return Q};hR.zH=function(x){return{t:"Objc",v:d.I.lV({Z:x.r*255,r:x.g*255,J:x.b*255})}};
hR._z=function(x){if(x==null)return new bI;var Q=[x.m00,x.m10,x.m01,x.m11,x.m02,x.m12];for(var F=0;F<6;
F++)if(Math.abs(Q[F])<1e-20)Q[F]=0;return new bI(Q[0],Q[1],Q[2],Q[3],Q[4],Q[5])};function h7(){}h7.s5=function(){var x=w.mt;
function Q(R,T,D,a){var _=a?[]:{};while(T<R.length-1&&R[T]!=125){var I=x(R,T,3),f=x(R,T+3,1),y;T+=4;
T++;if(f=="v"){var Z=Q(R,T,D+1,I=="ELM"||I=="TIL");y=Z.b;T=Z.z}else if(f=="i"||f=="f"){var v=T;while(R[v]!=125)v++;
var G=x(R,T,v-T);y=f=="i"?parseInt(G,16):parseFloat(G);T=v+1}else if(f=="s"){var q=w._C(R,T),G="";T+=2;
for(var F=0;F<q;F++)G+=String.fromCharCode(R[T+2*F+1]);y=G;T=T+2*q+1}else if(f=="b"){y=R[T]==49;T=T+2}else throw"e";
if(a)_.push([I,y]);else if(_[I]==null)_[I]=y;else{if(!(_[I]instanceof Array))_[I]=[_[I]];_[I].push(y)}}T++;
return{b:_,z:T}}function c(R,T){var D=$(R).slice(1),R=T.Clr.v;R.Rd.v=D[0]*255;R.Grn.v=D[1]*255;R.Bl.v=D[2]*255}function $(R){return[(R>>>24&255)/255,(R>>>16&255)/255,(R>>>8&255)/255,(R>>>0&255)/255]}function z(R,T){var D=T&4278190080|(T&255)<<16|(T>>>8&255)<<8|T>>>16&255;
new Uint32Array(R.buffer).fill(D)}function j(R,T){var D=R.TSZ,a=R.WPX,_=R.HPX,I=R.TIL,f=new gh(0,0,a,_),y=d.R(a*_*4),Z=0;
for(var v=0;v<_;v+=D)for(var G=0;G<a;G+=D){var q=new gh(G,v,D,D),h,r=I[Z];if(r[0]=="TMC"){h=d.R(q.P()*4);
z(h,r[1])}else if(r[0]=="TID"){h=T[r[1]]}d.WK(h,q,y,f);Z++}return[y,f]}function U(R,T){R=new Uint8Array(R);
var D=8,a,_={},C=0;while(D<R.length){var I=w.q(R,D);D+=4;var f=x(R,D,4);D+=4;if(f=="mkTS"){var y=pako.inflate(R.slice(D,D+I)),Z=Q(y,0,0);
a=Z.b}else if(f=="mkBT"){var v=w.q(R,D+4),G=w.q(R,D+8),y=pako.inflate(R.slice(D+76,D+I));if(G==0)for(var F=0;
F<y.length;F+=4){var q=y[F],h=y[F+1],r=y[F+2],H=y[F+3];y[F+3]=q;y[F+2]=H;y[F+1]=r;y[F]=h}else{var o=d.R(y.length*4);
o.fill(255);d.ZM(y,o);y=o}_[v]=y}D+=I+4}var P=a.PDC,O=P?P instanceof Array?P:[P]:[a.MKB],p=new gh;for(var F=0;
F<O.length;F++){var W=O[F];p=p.iO(new gh(0,C,W.WID,W.HIT));C+=W.HIT+100}T.m=p.m;T.e=p.e;T.buffer=d.R(p.P()*4);
T.cV(O.length);C=0;for(var J=0;J<O.length;J++){T.B.push(T.x6());var W=O[J],t=W.WID,Y=W.HIT,l=W.BGC,m=(W.LYL?W:a).LYL.LAY,A=3;
for(var F=0;F<m.length;F++)b(m[F],T,null,_,new bI(1,0,0,1,-W.XLC,-W.YLC+C));var B=T.Xh();T.B.push(B);
var L=new gh(0,C,t,Y);C+=Y+100;B.Zp(L);if(l>>>24!=0){var S=d.I.lV({Z:l>>>16&255,r:l>>>8&255,J:l>>>0&255});
B.add.artb.Clr={t:"Objc",v:S};A=4}B.add.artb.artboardBackgroundType.v=A;B.gF(W.PGN?W.PGN:"Page "+(J+1));
B.add.lsct=hA.H3;B.s3="pass";B.H2=24}}function i(R,T,D){var a=R[T];return a instanceof Array?a[D]:a}function b(R,T,D,a,_){var I=T.Xh();
if(R.VIS!=null)I.KW(R.VIS);if(R.VIF!=null)I.KW(R.VIF.VIS);if(R.OPA!=null)I.opacity=Math.round(255*R.OPA/1e3);
I.s3=R.CLL||D=="GRP"?"pass":"norm";if(R.BLD!=null){var f=R.BLD,y={"0":"norm","2":"mul ","4":"over","5":"scrn","7":"diss","9":"dark","10":"lite","37":"idiv","30":"norm","39":"lbrn","41":"vLit"}[f+""];
if(y==null)console.log(R.OBN,f);else I.s3=y;if(f==30)I.opacity>>>=1}if(R.CLL){I.gF(R.LNM);T.B.push(T.x6());
var Z=R.CLL.CEL;if(Z.length==null)Z=[Z];for(var v=Z.length-1;v>=0;v--){var G=Z[v].ELM;for(var F=G.length-1;
F>=0;F--)b(G[F][1],T,G[F][0],a,_)}I.add.lsct=R.DIS?hA.DJ:hA.H3;I.H2|=24}else if(D=="GRP"){var q=I.add.lmfx=k(R.EFL),h;
T.B.push(T.x6());var G=R.ELM;if(R.MNA){h=G[0][1];G=G.slice(1)}I.gF("Group: "+G.length+" objects");for(var F=G.length-1;
F>=0;F--)b(G[F][1],T,G[F][0],a,_);if(h){if(R.MRX){var r=j(h,a),H=I.F=new eM.zM;H.rect=r[1].clone();H.rect.x=h.XLC;
H.rect.y=h.YLC+_.ti;H.channel=d.R(H.rect.P());d.GS(r[0],H.channel,0);d.HQ(H.channel)}else{e(I,h,_);I.jz();
I.kT(T)}}I.add.lsct=hA.H3;I.H2|=24}else if(D=="IMG"){I.gF(R.OBN?R.OBN:"Bitmap");var r=j(R,a);I.rect=r[1].clone();
I.rect.x=R.XLC;I.rect.y=R.YLC+_.ti;I.buffer=r[0]}else if(D=="TXT"){var o=R.TFS,P=o.TRN instanceof Array?o.TRN.length:1,W="",J="Arial",t=20,Y=0;
I.add.lnsr="rend";I.add.TySh=dU.Y7(0,0);I.add.TySh.Iv=new gh(0,0,100,100);var O=new bI(1,0,0,1,R.LFT,R.TOP);
if(R.MTX){var p=R.MTX,H=new bI(p.M00,p.M01,p.M10,p.M11,p.M20,p.M21);O.concat(H)}O.concat(_);I.add.TySh.i=O;
var C=I.add.TySh.HW;for(var F=0;F<P;F++){var l=i(o,"TRN",F);if(l==null)continue;l=l.replaceAll("\x18","'").replaceAll("\x19","'").replaceAll("\x1C","'").replaceAll("\x1D","'");
l=l.replaceAll("\x03","\n").replaceAll("\r","\n");dU.U3(C,W.length,l);var m=dU.zl(C,0,1),B=i(o,"FON",F);
if(B)J=B;dU.gD(m,J);var L=i(o,"PTS",F);if(L!=null)t=L;m.VA.FontSize=Math.round(t);var A=i(o,"LED",F);
if(A!=null){m.VA.Leading=A*t;m.VA.AutoLeading=!1}var S=i(o,"UND",F);if(S!=null){m.VA.Underline=S}var M=i(o,"ITL",F);
if(M!=null){m.VA.FauxItalic=M}var N=i(o,"FCL",F);if(N!=null)Y=N;m.VA.FillColor={Type:1,Values:$(Y)};
var s=i(o,"JST",F);if(s!=null)m.SW.Justification=[0,2,1,3,5,4,6,7,8][s];dU.G4(C,W.length,W.length+l.length,m);
W+=l}I.gF(W.slice(0,255));var V=R.RIT-R.LFT,g8=R.BOT-R.TOP;if(R.IMG){b(R.IMG,T,"IMG",a,_);var n=T.B.pop();
I.buffer=n.buffer;I.rect=n.rect.clone()}dU.DY(C,1);dU.ei(C,[0,0,V,g8])}else if(D=="PTH"){I.gF(R.OBN?R.OBN:"Path");
I.H2|=16;var cQ=!1;e(I,R,_);var hk=I.add.vmsk,eG=I.add.vstk,ie=d.o.sP(hk.$),eN=R.PAT,gr=eN.BPL,ek=eN.FPL,jK=eN.TXF;
if(ek&&ek.FEF)hk.bS+=ek.FEF/2.4;if(gr){var iE=gr.CAT;eG.strokeEnabled.v=!0;eG.strokeStyleLineWidth.v.val=gr.BDI;
eG.strokeStyleLineAlignment.v.strokeStyleLineAlignment=aF.XM.xS[R.BRP];c(eN.BCL,eG.strokeStyleContent.v);
if(iE!="bc_Basic"&&iE!="bc_Pencil")cQ=!0}eG.fillEnabled.v=ek!=null;if(ek==null){I.add.SoCo=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]);
c(0,I.add.SoCo)}else if(ek.CAT=="fc_Solid"){I.add.SoCo=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]);c(R.PAT.FCL,I.add.SoCo)}else if(ek.CAT=="fc_Linear"||ek.CAT=="fc_Circular"||ek.CAT=="fc_Elliptical"){var e9=ek.CAT=="fc_Linear",dm=I.add.GdFl=JSON.parse(aF.lF[aF.order.indexOf("GrFl")]),kD=dm.Grad.v,gJ=[],dR=ek.FGL,fO,ko=[];
if(dR.FGY){var d8=dR.FGY,fO=d8.FG0.FGI,ko=d8.FG1.FGI}else fO=dR.FGV.FGI;for(var F=0;F<fO.length;F++){var fj=fO[F],ja=$(fj.FGC),eD=1;
if(ko.length==fO.length)eD=$(ko[F].FGC)[0];gJ.push([fj.FGP,ja.slice(1),eD])}dm.Type.v.GrdT=e9?"Lnr":"Rdl";
d.I.q1(gJ,kD);kD.Intr.v=0;var d3=R.PRI?R.PRI:R,fP=new bC(d3.PSX,d3.PSY),jE=new bC(d3.PEX,d3.PEY);if(ek.CAT=="fc_Elliptical"&&d3.PFX!=null){var cR=new bC(d3.PFX,d3.PFY),ex=bC.Xc(fP,jE),er=bC.Xc(fP,cR);
if(er<ex){var a7=ex;ex=er;er=a7}jE=new bC(fP.x+(ex+er)/2,fP.y);if(ex/er<.5)cQ=!0}if(e9){fP.x=(fP.x+jE.x)/2;
fP.y=(fP.y+jE.y)/2}d.I.vO(fP,jE,ie,dm)}else console.log(ek.CAT);var q=I.add.lmfx=k(R.EFL,hk);if(ek&&ek.FTB!=0&&jK){var r=j(jK.MSK,a),dl={};
dl.id=hf.KN()+"-d71c-11e5-b1ae-a548a96e5f9f";dl.name="someImage";dl.GD=r;T.uh(dl);var hl=r[0];for(var F=0;
F<hl.length;F+=4){hl[F+3]=255-hl[F];hl[F]=hl[F+1]=hl[F+2]=255}var dm=JSON.parse(aF.lF[aF.order.indexOf("patternFill")]);
dm.Opct.v.val=Math.round(ek.FTB/10);dm.Algn.v=!0;dm.Ptrn.v.Idnt.v=dl.id;q.patternFillMulti.v.unshift({t:"Objc",v:dm})}if(cQ&&R.IMG){b(R.IMG,T,"IMG",a,_);
var f4=T.B[T.B.length-1];f4.opacity=I.opacity;return}I.jz();I.kT(T)}else if(D=="URL")return;else{console.log("unknown layer type",D,R);
I.gF("Layer")}T.B.push(I)}function e(R,T,D){if(T.PBL==null)return;var a=R.add.vmsk=new eM.hn,_=R.add.vstk=aF.XM.$H(!0),I=T.PBL.PBP;
if(!(I instanceof Array))I=[I];for(var f=0;f<I.length;f++){var y=I[f].PBT;if(y==null)continue;if(!(y instanceof Array))y=[y];
var Z=I[f].ISC?0:3;a.$.push({type:Z,length:y.length,Kp:0,YS:2,kO:0,QQ:0});for(var F=0;F<y.length;F++){var v=y[F],G=v.XLC,q=v.YLC,h=[G,q,G,q,G,q],r="XPC YPC XLC YLC XSC YSC".split(" ");
for(var H=0;H<6;H++){var o=r[H],P=v[o];if(P!=null)h[H]=P}a.$.push({type:Z+2,L:new bC(G,q),Hw:new bC(h[0],h[1]),Im:new bC(h[4],h[5])})}}d.o.Of(a.$,D)}function k(R,T){var D=JSON.parse(aF.default);
for(var F=0;F<aF.order.length;F++)D[aF.mh[F]]={t:"VlLs",v:[]};if(R==null||R.EPS==null)return D;var a=R.EPS;
if(!(a instanceof Array))a=[a];for(var F=0;F<a.length;F++){var _=a[F].DCE,I={};for(var f=0;f<_.length;
f++)I[_[f].DCK]=_[f].DCV;if(I.EffectIsVisible=="false")continue;var y=I.mkbFile_WriteOnly_TemporaryEffectUiName;
if(y=="Gaussian Blur..."&&T){T.bS+=parseFloat(I.gaussian_blur_radius);continue}var Z=["Drop Shadow","Inner Bevel","Inner Glow","Glow"].indexOf(y);
if(Z==-1){continue}var v=["DrSh","ebbl","IrGl","OrGl"][Z],G=aF.mh[aF.order.indexOf(v)],q=JSON.parse(aF.lF[aF.order.indexOf(v)]);
D[G].v.unshift({t:"Objc",v:q});if(v=="DrSh"){q.uglg.v=!1;K(I,"ShadowDistance",q,"Dstn");K(I,"ShadowBlur",q,"blur");
K(I,"ShadowAngle",q,"lagl",180);q.Opct.v.val=100;g(I,"ShadowColor",q,"Clr")}if(v=="IrGl"){q.Md.v.BlnM="Nrml";
var h=I.MaskSoftness,r=I.GlowWidth;if(h&&r){h=parseInt(h);r=parseInt(r);q.blur.v.val=r+h;q.Ckmt.v.val=Math.round(100*r/(r+h))}K(I,"BevelContrast",q,"Opct");
g(I,"OuterBevelColor",q,"Clr")}if(v=="OrGl"){q.Md.v.BlnM="Nrml";var h=I.MaskSoftness,r=I.GlowWidth;if(h&&r){h=parseInt(h);
r=parseInt(r);q.blur.v.val=r+h}K(I,"BevelContrast",q,"Opct");g(I,"OuterBevelColor",q,"Clr")}if(v=="ebbl"){q.uglg.v=!1;
K(I,"BevelWidth",q,"blur");K(I,"AngleSoftness",q,"Sftn");K(I,"BevelContrast",q,"srgR");K(I,"LightAngle",q,"lagl")}}return D}function K(R,T,D,a,_){var I=R[T];
if(_==null)_=0;if(I)D[a].v.val=parseInt(I)+_}function g(R,T,D,a){var _=R[T];if(_){_=_.slice(1);if(_.length==6)_=_+"ff";
if(_.length!=8)throw"e";var I=$(parseInt(_,16)),f=D[a].v;f.Rd.v=I[0]*255;f.Grn.v=I[1]*255;f.Bl.v=I[2]*255;
D.Opct.v.val=Math.round(D.Opct.v.val/100*I[3]*100)}}return U}();var ch=function(){function x(z){var j=new Uint8Array(z.length);
w.f3(j,0,z);return j}function Q(z){var j=["<< /Type /Catalog  /Pages 2 0 R  >>","<< /Type /Pages  /Kids [ 3 0 R ] /Count 1 >>","<< /Type /Page   /Parent 2 0 R    /MediaBox [ 0 0 283 283 ] /Contents 4 0 R  /PieceInfo << /Illustrator << /Private 5 0 R>> >>   >>",x("")],U=j.length,b=0;
j.push("<< /AIMetaData  "+(U+2)+" 0 R /AIPrivateData1 "+(U+3)+" 0 R  /AIPrivateData2 "+(U+4)+" 0 R  /CreatorVersion 15  /ContainerVersion  9  /RoundtripVersion  15  /NumBlock 2  >>");
j.push(x(""));j.push(x(""));j.push(z);var i=new ij,e=[];function k(T){w.RP(i,b,T);b+=T.length}k("%PDF-1.5\n");
for(var F=0;F<j.length;F++){e.push(b);k(F+1+" 0 obj\n");var K=j[F];if(typeof K=="string")k(j[F]+"\n");
else{var g=pako.a1U(K);k("<< /Length "+g.length+" /Filter [ /FlateDecode ] >>\nstream\n");i.qN(b,g.length);
i.data.set(g,b);b+=g.length;k("\nendstream\n")}k("endobj\n")}var R=b;k("xref\n0 "+(e.length+1)+"\n0000000000 65535 f\r\n");
for(var F=0;F<e.length;F++)k((e[F]+"").padStart(10,"0")+" 00000 n\r\n");k("trailer\n<< /Root 1 0 R /Size "+(e.length+1)+" >>\nstartxref\n"+R+"\n%%EOF\n");
return i.data.slice(0,b)}function c(z,j){var U=Date.now(),i=new Uint8Array(z),b,e=i[2]==68;if(j)console.log(!e?"EPS":"PDF");
if(e){var k=w.iK(i,"/AIMetaData "),y,Z,v;while(i[k]!=60)k--;k--;var K=w.iK(i,">>",k),g=w.mt(i,k+2,K-k-2).split("/"),R=[];
for(var F=0;F<g.length;F++){var T=g[F],D=T.startsWith("AIPrivateData"),a=T.startsWith("AIPDFPrivateData");
if(!D&&!a)continue;var _=T.trim().split(/\s+/),I=parseInt(_[1]),f=parseInt(_[0].slice(D?13:16));R.push([f,I])}if(j)console.log("--- map made",Date.now()-U);
U=Date.now();while(!0){var G=FromPDF.indexOfXref(i),q=[],h=FromPDF.readXrefTrail(i,G,q),r={buff:i,off:0},H=!1;
y=new Array(R.length);Z=!1;v=!1;for(var F=0;F<R.length;F++){var f=R[F][0],I=R[F][1],p=0;if(q[I]==null){H=!0;
break}var o=FromPDF.getIndirect(I,0,r,q),P=o.buff,O=o["/Filter"];if(O!=null&&typeof O=="string")O=[O];
var C=w.mt(P,p,p+20);if(C=="%AI12_CompressedData"){p+=20;Z=!0}else if(C=="%AI24_ZStandard_Data"){p+=20;
v=!0}P=new Uint8Array(P.buffer,P.byteOffset+p,P.length-p);if(O)for(var W=0;W<O.length;W++){var J=O[W];
if(J=="/FlateDecode")P=pako.inflate(P);else if(J=="/ASCIIHexDecode")P=FromPS.F.HexDecode({buff:P,off:0});
else if(J=="/ASCII85Decode")P=FromPS.F.ASCII85Decode({buff:P,off:0});else throw J}y[f-1]=P}if(H){console.log("extra xref after AI");
i=i.slice(0,G);continue}break}if(j)console.log("--- arrays found",Date.now()-U);U=Date.now();var t=w.mt(y[0],0,13);
if(t=="%%BoundingBox"||t=="%AI7_Thumbnai")y=y.slice(1);if(t=="%AI24_ZStanda"){y[0]=y[0].slice(20);v=!0}if(w.mt(y[0],0,13)=="%AI12_Compres"){y[0]=y[0].slice(20);
Z=!0}b=$(y);if(j)console.log("--- concatenated",Date.now()-U);U=Date.now();if(Z)b=UZIP.inflate(b);if(v)b=ar.MJ.ID(b);
if(j)console.log("--- inflated",Date.now()-U);U=Date.now()}else{var Y=w.IV(i);if(Y.indexOf("%AI5_BeginLayer")!=-1){b=i}else{var l=Y.split(/[\n\r]+/),m=[],B=!1;
for(var L=0;L<l.length;L++){var A=l[L].trim();if(A=="%AI9_PrivateDataEnd"){B=!1;break}else if(A=="%AI9_DataStream"||A=="%AI24_DataStream"){B=!0}else if(B)m.push(A.slice(1))}var S=w.nT(m.join("")),M=FromPS.F.ASCII85Decode({buff:S,off:0});
if(M[0]==120&&M[1]==156)b=UZIP.inflate(M);else b=ar.MJ.ID(M)}}return b}function $(z){var j=0,i=0;for(var F=0;
F<z.length;F++)j+=z[F].length;var U=new Uint8Array(j);for(var F=0;F<z.length;F++){var b=z[F];U.set(b,i);
i+=b.length}return U}return{a3j:c,a7j:Q}}();function ad(){}ad.s5=function(){function x(C,W,J){var t=!1,Y=Date.now(),l=ch.a3j(C,t);
if(t)console.log("part found",Date.now()-Y);Y=Date.now();var m=h(l),B=m.Layer,L=m.Header;if(t)console.log(m);
var A=m.Setup.TextDocument,S=B[0];S=m.Layer[0];if(t)console.log("document parsed",Date.now()-Y);Y=Date.now();
m.Setup.Gradient=q(m.Setup.Gradient,l);if(t)console.log("grads loaded",Date.now()-Y);Y=Date.now();m.Setup.Pattern=v(m.Setup.Pattern,l);
if(t)console.log("patts loaded",Date.now()-Y);Y=Date.now();m.Setup.Palette=G(m.Setup.Palette,l);if(t)console.log("palet loaded",Date.now()-Y);
Y=Date.now();var M=y(m.Setup.DocumentData,l),N=Z(M);m.Setup.DocumentData=M.pop();if(t)console.log("docdata loaded",Date.now()-Y);
Y=Date.now();m.Setup.SVGFilter=y(m.Setup.SVGFilter,l);if(t)console.log("svgfilter loaded",Date.now()-Y);
Y=Date.now();var s=L.Cropmarks,V=L.BoundingBox.split(" ").map(parseFloat),g8=L.ArtSize?L.ArtSize.split(" ").map(parseFloat):[V[2]-V[0],V[3]-V[1]];
W.m=Math.round(g8[0]);W.e=Math.round(g8[1]);var n=[1,0,0,1,-V[0]+(W.m-(V[2]-V[0]))/2,-V[1]+(W.e-(V[3]-V[1]))/2];
n[3]=-1;n[5]=W.e-n[5];if(s){s=s.split(" ").map(parseFloat);W.m=Math.round(s[2]-s[0]);W.e=Math.round(s[3]-s[1]);
n=[1,0,0,-1,-s[0],W.e+s[1]]}var M=m.Setup.DocumentData,cQ=[],hk=[];if(M&&M[0]&&M[0].ArtboardArray){var cQ=M[0].ArtboardArray;
if(cQ.length!=1)console.log(cQ.length,"artboards");var eG=new gh;for(var F=0;F<cQ.length;F++){var ie=cQ[F],eN=ie.PositionPoint1,gr=ie.PositionPoint2,ek=eN[0],jK=Math.min(eN[1],gr[1]),iE=gr[0],e9=Math.max(eN[1],gr[1]),dm=new gh(ek,jK,iE-ek,e9-jK);
hk.push(dm);eG=eG.iO(dm)}W.m=Math.round(eG.m);W.e=Math.round(eG.e);n[4]=-eG.x;n[5]=eG.y+W.e}if(M&&M[0]&&M[0]["#document"]){var kD=M[0]["#document"],gJ=kD["xmlnode-children"][0];
if(gJ&&gJ["xmlnode-children"])gJ=gJ["xmlnode-children"][0];if(gJ["xmlnode-nodename"]=="variableSets"){var dR=gJ["xmlnode-children"][0]["xmlnode-children"],fO=dR[0],ko=dR[1],d8=p(fO);
W.vB=cz.aa9("<variableSets><variableSet>"+d8+"</variableSet></variableSets>");if(ko){var fj=p(ko),ja=W.x8=cz.an3(fj);
for(var F=0;F<ja.length;F++)for(var eD=0;eD<ja[F].length;eD++)ja[F][eD]=ja[F][eD].trim()}}}var d3=1/bp.ub(new gh(0,0,W.m,W.e),8192*8192);
while(Math.max(W.m*d3,W.e*d3)<800)d3*=2;while(J&&Math.max(W.m*d3,W.e*d3)<Math.max(J[0],J[1]))d3++;W.m=Math.round(W.m*d3);
W.e=Math.round(W.e*d3);W.cQ=Math.round(72*d3);for(var F=0;F<6;F++)n[F]*=d3;var fP=[];if(cQ.length!=[1,0][i9]){var jE=i9==0?W.B:[];
jE.push(W.x6());for(var F=0;F<hk.length;F++){var ie=cQ[F],dm=hk[F],cR=W.Xh();cR.gF(ie.Name);jE.push(cR);
cR.add.SoCo=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]);var ex=cR.add.SoCo.Clr.v;K(ex,[1,1,1]);var ek=dm.x,jK=dm.y,iE=ek+dm.m,e9=jK+dm.e,er=[ek,jK,iE,jK,iE,e9,ek,e9];
d.A.i(er,R(n),er);a(cR,{cmds:["M","L","L","L","Z"],crds:er},W,0);cR.add.vstk=aF.XM.$H(!0);var J=d.A.pA(er);
fP.push({if:ie.Name,LB:[J.x,J.y,J.x+J.m,J.y+J.e],g:ie.IsArtboardSelected})}var cR=W.Xh();cR.gF("_Artboards_");
cR.add.lsct=hA.H3;cR.s3="pass";cR.H2=24;jE.push(cR)}else fP=[{if:"Artboard",LB:new gh(0,0,W.m,W.e)}];
if(i9==1)W.add.arts=fP;c=[0,0,0];$=[0,0,0];z="SoCo";j="SoCo";for(var cE=0;cE<B.length;cE++){var a7=B[cE];
a7.Raster=Q(a7,"Raster");a7.Place=Q(a7,"Place");var dl=I(l,a7);U(W,dl,n,m,a7,l)}if(i9==0)for(var F=0;
F<W.B.length;F++){var cR=W.B[F];if(cR.Qc){W.B.splice(F,1);var hl=W.B[F];hl.add.vmsk=cR.add.vmsk;hl.add.vogk=cR.add.vogk;
hl.kT(W)}}else{}if(t)console.log("layers created",Date.now()-Y);Y=Date.now()}function Q(C,W){var J=C.Layer,t=C[W];
if(t==null)t=[];if(J){for(var F=0;F<J.length;F++){var Y=J[F],l=Y[W]=Q(Y,W);t=t.concat(l)}t.sort(function(m,B){return m._begin-B._begin})}return t}var c,$,z,j;
function U(C,W,J,t,Y,l){var m=[],B=0,L="",A=!1,S={},M=UDOC.G,N=UDOC.getState(),s="norm",V=1,g8=0,n=!1,cQ=0,hk=!1,eG=!0,ie=null,eN=!1,gr=0,ek=null,jK,iE,e9=0,dm=0,kD=0,ko=0,d8=!1;
N.ctm=J;var gJ=[0,0],dR=[],fO=[];for(var fj=0;fj<W.length;fj++){var ja=W[fj],ex=1e9;if(ja[0]=="%"){if(ja=="%_/ArtDictionary :"&&gr==0)ie=[ja.slice(2)];
else if(ie!=null){if(ja=="%_"&&gr==0){var eD=o(ie)[0],d3=C.B[C.B.length-1],fP=eD.AI10_ArtUID,jE=eD.BBAccumRotation;
if(fP&&!fP.startsWith("XMLID"))d3.gF(O(fP));if(jE&&d3.add.vmsk)d3.add.vmsk.ir=parseFloat(jE);ie=null}else{ie.push(ja.slice(eN?1:2));
if(ja=="%_X=")gr++;if(ja=="%_X+")gr--;if(ja=="%_/Binary : /ASCII85Decode ,")eN=!0;if(eN&&ja.endsWith("~>"))eN=!1}}else if(ek){jK+=(jK==""?"":" ")+ja.slice(2);
if(jK.endsWith("X#")){ek.push(jK.slice(0,jK.length-3));jK=""}}continue}else if(ja=="/Mesh X!"){ek=[];
jK="";continue}else if(ja=="/End X!"){e(ek,N,C);ek=null;continue}var cR="Xa XR m l c f U u *U w J j M d".split(" "),er=-1,cE=ja.indexOf("(")!=-1;
for(var F=0;F<cR.length;F++){var a7=ja.indexOf(" "+cR[F]+" ");if(a7!=-1&&a7<ex&&!cE){ex=a7;er=F}}if(er!=-1){A=!0;
var dl=ex+1+cR[er].length;W[fj]=ja.slice(0,dl);var hl=W[fj+1];if(hl==null||hl[0]=="%"||er>9)W.splice(fj+1,0,ja.slice(dl));
else W[fj+1]=(ja.slice(dl)+" "+hl).replace(/\s\s+/g," ");fj--;continue}ja=ja.trim();var f4=ja.split(" "),em=f4[f4.length-1],e$=em.toLowerCase(),iP=f4.map(parseFloat);
if(em=="m")M.moveTo(N,iP[0],iP[1]);else if(em=="L"||em=="l")M.lineTo(N,iP[0],iP[1]);else if(em=="V"||em=="v"){var b2=N.pth.crds,k7=N.cpos[0],at=N.cpos[1];
M.curveTo(N,k7,at,iP[0],iP[1],iP[2],iP[3]);var ju=b2.length;b2[ju-6]=k7;b2[ju-5]=at}else if(em=="Y"||em=="y")M.curveTo(N,iP[0],iP[1],iP[2],iP[3],iP[2],iP[3]);
else if(em=="C"||em=="c")M.curveTo(N,iP[0],iP[1],iP[2],iP[3],iP[4],iP[5]);else if(em=="H"||em=="h"){if(em==e$)M.closePath(N);
if(!n){var jL=C.Xh();C.B.push(jL);jL.gF("<Clipping Path>");jL.Qc=!0;jL.add.vstk=aF.XM.$H();jL.add.SoCo=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]);
a(jL,N.pth,C,g8)}else hk=!0}else if(em=="XR"){g8=iP[0]}else if(em=="Xy"){s=ad.awZ[iP[0]];V=iP[1];if(s==null){s="norm";
console.log("unknown blend mode",iP[0])}}else if(em=="Xd"){var d3=C.B[C.B.length-1];d3.opacity=Math.round(255*V);
d3.s3=d3.Uy()&&s=="norm"?"pass":s}else if(em=="AE")e9=iP[0];else if(em=="Ae")dm=iP[0];else if(em=="Xw")kD=iP[0];
else if(em=="*"){var fJ=N.pth.crds,h6=N.ctm,a7=fJ[0]==fJ[2]?0:1;C.Bo.push([a7,fJ[a7]]);M.newPath(N)}else if(em=="XN")iE=ja.split(" ")[0];
else if(em=="XI"){var iq=Y.Raster,iI,dM;if(iq==null||iq.length==0){console.log("no Raster");continue}if(ja!="XI"){continue}else{var ik=iq[B++];
if(ik.Data)ik=ik.Data;var jp=ik._begin,eA=ik._end;while(l[jp]!=88)jp++;jp+=3;iI=l.slice(jp,eA);dM=W[fj-2].split(" ").map(parseFloat)}var k8=dM.slice(8),ay=k8[2],bK=k8[3],a4=ay*bK,h_=d.R(a4*4);
h_.fill(255);var bj=k8[7],gs=k8[8],bs=k8[6],e3=Math.ceil(ay*bj*bs/8);if(bj==1){if(bs==8)for(var F=0;
F<a4;F++)for(var jA=0;jA<3;jA++)h_[4*F+jA]=iI[F];else if(bs==1)for(var kn=0;kn<bK;kn++)for(var j6=0;
j6<ay;j6++)for(var jA=0;jA<3;jA++)h_[4*(kn*ay+j6)+jA]=255*(iI[kn*e3+(j6>>>3)]>>>7-(j6&7)&1);else throw bs}else if(bj==3)for(var F=0;
F<a4;F++)for(var jA=0;jA<3;jA++)h_[4*F+jA]=iI[3*F+jA];else if(bj==4||bj==5)for(var F=0;F<a4;F++){var cL=T([iI[bj*F+0]/255,iI[bj*F+1]/255,iI[bj*F+2]/255,iI[bj*F+3]/255]);
h_[4*F+0]=cL[0]*255;h_[4*F+1]=cL[1]*255;h_[4*F+2]=cL[2]*255}else if(bj==7)for(var F=0;F<a4;F++){h_[4*F+0]=iI[bj*F+0];
h_[4*F+1]=iI[bj*F+1];h_[4*F+2]=iI[bj*F+2]}else console.log("unknown number of channels",bj);if(gs==1){var eb=bK*e3;
for(var F=0;F<a4;F++)h_[4*F+3]=iI[eb+F]}var dY=d.dJ(h_,ay,bK)?"JPG":"PNG";if(ay*bK<700*700)dY="PNG";
var aP=ar.pz(dY).YU([[h_.buffer]],ay,bK),ks=C.BQ(new Uint8Array(aP),"<Image>",0,0);C.B.push(ks);ks.s3=s;
ks.opacity=Math.round(255*V);ks.KW(kD==0);var jC=new bI;jC.scale(1,-1);jC.concat(R(dM.slice(1)));jC.concat(R(N.ctm));
var ig=ks.add.SoLd,cD=ig.Sz.v,eB=new gh(0,0,cD.Wdth.v,cD.Hght.v),f4=d.A.Hg(eB).j;d.A.i(f4,jC,f4);ks.add.SoLd.Trnf=X.Y.TD(f4);
ks.add.SoLd.nonAffineTransform=X.Y.TD(f4);ks.bx(C,!1)}else if(em=="Ln"){m.push(k(ja))}else if(em=="u"||em=="q"||em=="Lb"){dR.push(dm==1);
fO.push((em=="Lb"?1-iP[0]:kD)==0);if(n)continue;C.B.push(C.x6())}else if(em=="U"||em=="Q"||em=="LB"){if(dR.length==0||fO.length==0)throw fj;
var c1=dR.pop(),dq=fO.pop();if(em=="LB")c1=e9==1;if(n)continue;var ks=C.Xh();ks.gF((em=="U"?"<Group>":"<Clip Group>")+L);
if(em=="LB")ks.gF(m.pop());ks.add.lsct=c1?hA.DJ:hA.H3;ks.s3="pass";ks.H2=24;ks.KW(dq);C.B.push(ks);if(d8){if(C.B[C.B.length-3].getName()=="</Layer group>"){C.B.pop();
C.B.splice(C.B.length-2,1)}d8=!1}}else if(em=="Bb")eG=iP[0]!=1;else if(em=="BB"){}else if(em=="Bm"||em=="Bc"||em=="Xm"){}else if(em=="Bh")gJ=iP.slice(2,4);
else if(em=="Bg"){var b$=t.Setup.Gradient,d7=b$[k(ja)],f4=ja.slice(ja.indexOf(")")+2).split(" ").map(parseFloat);
if(d7==null){console.log("gradient not found");for(var he in b$){d7=b$[he];break}}var k4=f4[10];if(isNaN(k4))k4=1;
var a6=f4.slice(0,4);a6.push(k4,gJ[0],gJ[1]);var cK=[d7.Iz,d7.ax0,a6,f4.slice(4,10)];b(cK,"GdFl",eG)}else if(e$=="p"){var ds=k(ja);
if(C.IC[ds]==null){var iy=t.Setup.Pattern[ds],gu=iy.LB,ay=Math.round(gu[2]-gu[0]),bK=Math.round(gu[3]-gu[1]),eD=new hf;
eD.m=ay;eD.e=bK;eD.buffer=d.R(ay*bK*4);var gL=J[0],jC=new bI(1,0,0,-1,-iy.LB[0],bK+iy.LB[1]);jC.concat(new bI(gL,0,0,gL,0,0));
U(eD,iy.Eb,[jC.V,jC.J,jC.dC,jC.xq,jC.DX,jC.ti],t,Y,l);eD.m*=gL;eD.e*=gL;eD.jf();eD.c();if(i9==0)eD.eB();
window.a8q=iy.Eb;C.IC[ds]=eD}var dc=ja.slice(ja.indexOf(")")+2),aQ=dc.slice(0,dc.indexOf("[")-1).split(" ").map(parseFloat),ec=dc.slice(dc.indexOf("[")+1,dc.indexOf("]")).split(" ").map(parseFloat);
b([ds,[aQ,ec]],"patt",em=="p")}else if(em=="J"||em=="j"||em=="w"||em=="M"||em=="d"){for(var F=1;F<f4.length;
F++){var gH=f4[F],ap=iP[F-1];if(gH=="w")N.lwidth=ap;if(gH=="j")N.ljoin=ap;if(gH=="J")N.lcap=ap;if(gH=="M")N.mlimit=ap;
if(gH=="d"){var fx=ja.slice(ja.indexOf("[")+1,ja.indexOf("]")).trim();if(fx.length!=0){var aT=fx.split(" ").map(parseFloat);
N.dash=aT}else if(fx=="")N.dash=[]}}}else if(e$=="xa"||e$=="xx"){var bL=D(ja);b(bL,"SoCo",em=="Xa"||em=="Xx")}else if(e$=="xk"){bL=D(ja);
b(bL,"SoCo",em=="Xk")}else if(e$=="k"||e$=="x"){bL=D(ja);b(bL,"SoCo",em==e$)}else if(e$=="g"){var bL=[iP[0],iP[0],iP[0]];
b(bL,"SoCo",em==e$)}else if(e$=="n"){if(!n)M.newPath(N)}else if(em=="*u"){n=!0;cQ=0;fO.push(kD==0)}else if(em=="*U"||e$=="s"||e$=="f"||e$=="b"){if(em!="*U"&&n){if(e$=="f"||e$=="b")cQ|=1;
if(e$=="s"||e$=="b")cQ|=2;continue}if(em==e$)M.closePath(N);if(em=="*U"){n=!1}var ks;{ks=C.Xh();ks.H2|=16;
a(ks,N.pth,C,g8);var kr=e$=="f"||e$=="b"||em=="*U"&&cQ&1,jS=e$=="s"||e$=="b"||em=="*U"&&cQ&2,bE=ks.add.vstk=aF.XM.$H(kr,jS),gl=aF.xV.$H();
gl.aA=gl.sf=null;var jC=N.ctm,gL=Math.sqrt(Math.abs(jC[0]*jC[3]-jC[1]*jC[2]));aF.xV.write(gl,N,gL);if(kr)gl.aA=c;
if(jS)gl.sf=$;if(i9==0){aF.XM.write(bE,N,gL);if(z=="SoCo"){ks.add.SoCo=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]);
var dC=ks.add.SoCo.Clr.v;K(dC,c)}if(z=="GdFl"){ks.add.GdFl=ad.kD(c,ks.add.vmsk.$)}if(z=="patt"){ks.add.PtFl=i(c,C)}if(jS){var ci=["SoCo","GdFl","patt"].indexOf(j);
console.log(j,ci);var kC=ci==0?{Clr:{t:"Objc",v:gP.x2($)}}:ci==1?ad.kD($,ks.add.vmsk.$):i($,C),aI=[aF.ZS,aF.ul,aF.qK][ci],fB=bE.strokeStyleContent.v={classID:aF.XM.R7[ci]};
for(var F=0;F<aI.length;F++)fB[aI[F]]=kC[aI[F]]}}else ks.add.vstl=gl}if(em=="*U"&&hk){ks.Qc=!0;hk=!1}ks.gF("<"+(em=="*U"?"Compound ":"")+"Path>"+L);
ks.s3=s;ks.opacity=Math.round(255*V);ks.KW(em=="*U"?fO.pop():kD==0);ks.kT(C);C.B.push(ks);M.newPath(N)}else if(em==","&&f4[0]=="/XMLUID"){var d3=C.B[C.B.length-1];
for(var F=0;F<C.vB.length;F++)if("("+C.vB[F].docRef+")"==f4[2])C.vB[F].docRef="id('"+d3.add.lyid+"')"}else if(em==","&&f4[1]=="/FreeUndo"){ko=iP[0]}else if(em==","&&f4[1]=="/StoryIndex"){var cO=t.Setup.TextDocument,fT=null;
if(!(cO instanceof Array))window.a3x=cO=t.Setup.TextDocument=f(cO,l);var bY=cO[0],fS=cO[2];if(bY._DocumentResources)bY=cO[0]=h1.a4a(bY);
else h1.ai3(bY);var ks=C.Xh();ks.add.lnsr="rend";ks.add.TySh=dU.Y7(0,0);var i_=iP[0];if(ko==1){for(var F=1;
F<60;F++){var hl=W[fj+F];if(hl&&hl.endsWith("/StoryIndex ,")){i_=parseFloat(hl.slice(2,hl.indexOf(" ")));
d8=!0;break}}ko=0}var dv=iA.aru(bY),g1=ks.add.TySh.HW=dv[i_];if(g1==null){console.log("text not found");
d8=!1;continue}ks.gF(dU.bs(g1).slice(0,50));ks.s3=s;ks.opacity=Math.round(255*V);ks.KW(kD==0);var jo=bY._1._1[i_]._1._0[0]._0;
jo=parseInt(jo.slice(1));var eS=bY._0._8._0,gX=eS[jo]._0;if(gX._0)fT=g(gX._0);else if(gX._1)fT=g(gX._1._0);
else fT=g(gX._2._2).slice(3);if(fT.length!=2){var gu=d.A.pA(fT);fT=[gu.x,gu.y];if(gu.P()!=0){dU.DY(g1,1);
dU.ei(g1,[0,0,Math.round(gu.m),Math.round(gu.e)])}}var gm=new bI,hq=new bI(1,0,0,1,fT[0],fT[1]),bD=new bI(1,0,0,1,-fS[0],-fS[1]),dj=R(N.ctm),g3=new bI;
if(gX._2&&gX._2._2){var J=g(gX._2._2);g3=new bI(J[0],J[1],J[2],J[3],J[4],J[5])}gm.concat(hq);gm.concat(g3);
gm.concat(bD);gm.scale(1,-1);gm.concat(dj);ks.add.TySh.i=gm;C.B.push(ks);C.RS=!0}else if(em=="Tp"){S.BS=R(iP)}else if(em=="Tf"){S.font=f4[0].slice(2)}else if(em=="Tk"){var ks=C.Xh();
ks.add.lnsr="rend";var dF=ks.add.TySh=dU.Y7(0,0),g1=dF.HW,jC=S.BS.clone(),cD=jC.c0();jC.concat(R(N.ctm));
var e1=new bI(1/cD,0,0,-1/cD,0,0);e1.concat(jC);dF.i=e1;var fE=k(ja);ks.gF(fE);dU.U3(g1,0,fE);var cl=dU.zl(g1,0,fE.length);
cl.VA.FontSize=cD;cl.VA.FillColor={Type:1,Values:[1,c[0],c[1],c[2]]};dU.gD(cl,S.font);dU.G4(g1,0,fE.length,cl);
C.B.push(ks);C.RS=!0}else if(A&&iP.length>3){var i1=!1;for(var F=0;F<iP.length;F++)if(isNaN(iP[F]))i1=!0;
if(!i1)W[fj+1]=(ja+" "+W[fj+1]).replace(/\s\s+/g," ")}}}function i(c,C){if(C.Qh==null)C.Qh={};var W=C.Qh[c[0]];
if(W==null){var J=C.IC[c[0]],W=C.Qh[c[0]]={};W.id=hf.KN()+"-d71c-11e5-b1ae-a548a96e5f9f";W.name="someImage";
W.GD=[J.VY(),new gh(0,0,J.m,J.e)];C.uh(W)}var t=JSON.parse(aF.lF[aF.order.indexOf("patternFill")]);t.Ptrn.v.Idnt.v=W.id;
var Y=R(c[1][1]),l=-Math.atan2(-Y.J,Y.V);t.Angl.v.val=Math.round(l*180/Math.PI);t.Scl.v.val=Math.round(100*Y.c0());
return t}ad.kD=function(C,W){var J=ad.ahp(C,W),t=[0,0,1,0];if(C[0]==0)t[0]=.5;d.A.i(t,J,t);var Y=JSON.parse(aF.lF[aF.order.indexOf("GrFl")]),l=Y.Grad.v;
l.Intr.v=0;Y.Type.v.GrdT=["Lnr","Rdl"][C[0]];d.I.q1(C[1],l);d.I.vO(new bC(t[0],t[1]),new bC(t[2],t[3]),d.o.sP(W),Y);
return Y};ad.yN=function(C,W){var J=["Lnr","Rdl"].indexOf(C.Type.v.GrdT),t=d.o.sP(W),Y=d.I.R9(C,t),l=Y[0],m=Y[1];
if(J==0){l.x-=m.x-l.x;l.y-=m.y-l.y}var B=m.x-l.x,L=m.y-l.y,A=Math.sqrt(B*B+L*L),S=new bI;S.rotate(Math.atan2(-L,B));
S.scale(A,A);S.translate(l.x,l.y);var M=ad.j3(J,S,t),N=C.Grad.v;M[1]=d.I.d9(N,null,null);return M};ad.j3=function(C,W,J,t,Y,l){W.translate(-J.x,-J.y);
var m=J.m,B=J.e,S,M,s,V=1;if(t){var L=bC.Xc(t,Y),A=new bI;A.scale(L,L);A.rotate(-Math.atan2(Y.y-t.y,Y.x-t.x));
A.translate(t.x,t.y);A.concat(W);W=A}var N=Math.atan2(-W.J,W.V);if(C==0){W.translate(-m/2,-B/2);var g8=ad.a4E(m,B,N);
W.scale(1/g8,1/g8);W.rotate(-N);W.scale(1/m,1/B);S=W.DX+.5;M=W.ti+.5;s=W.V}else{S=W.DX/m-.5;M=W.ti/B-.5;
var n=(S-.5)*m/2,cQ=(M-.5)*B/2;W=W.clone();W.rotate(-N);s=W.V/Math.sqrt(2*(n*n+cQ*cQ));V=W.xq/W.V}var hk=[C,null,[S,M,N*180/Math.PI,s,V,0,0],[1,0,0,1,0,0]];
if(t&&!l.HM(t)){var N=Math.atan2(-(l.y-t.y),l.x-t.x);hk[2][5]=N*180/Math.PI;hk[2][6]=bC.Xc(l,t)/bC.Xc(Y,t)}return hk};
ad.ahp=function(C,W){var J=C[0],t=C[2],Y=C[3],l=new bI(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);l.HQ();var m=eM.hn.gG(W);
d.o.Of(m,l);var B=d.o.sP(m),L=B.m,A=B.e,S=t[0],M=t[1],N=t[2]*Math.PI/180,s=t[3],V=new bI;if(J==0){V.scale(s,s);
V.translate(S-.5,M-.5);V.scale(L,A);V.rotate(N);var g8=ad.a4E(L,A,N);V.scale(g8,g8);V.translate(L/2,A/2)}else{var n=(S-.5)*L/2,cQ=(M-.5)*A/2,g8=s*Math.sqrt(2*(n*n+cQ*cQ));
V.scale(g8,g8*t[4]);V.rotate(N);V.translate((S+.5)*L,(M+.5)*A)}V.translate(B.x,B.y);V.concat(new bI(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]));
return V};function b(C,W,J){if(J){z=W;c=C}else{j=W;$=C}}function e(C,W,J){var t=UDOC.G,Y=[],l=[],m="/DeviceGray",B=1,L=[],A=1;
for(var S=0;S<C.length;S++){var M=C[S];if(M.endsWith(" /CS")){var N=M.indexOf("/NChannel"),s=M.indexOf("/Process");
if(M.startsWith("/DeviceRGB")){m="/DeviceRGB";B=3}else if(M.startsWith("/DeviceGray")){m="/DeviceGray";
B=1}else if(M.startsWith("/DeviceCMYK")){m="/DeviceCMYK";B=4;L=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]}else if(N!=-1){m="/DeviceCMYK";
B=parseInt(M.slice(N-2,N-1));var V=1;for(var F=0;F<B;F++){V=M.indexOf("[",V);L[B-1-F]=M.slice(V+1,V+8).split(" ").map(parseFloat);
V++}}else if(s){m="/DeviceGray";B=1}else throw M}else if(M[0]=="["){var g8=M.indexOf("]"),n=M.slice(1,g8).split(" ").map(parseFloat),cQ=M.slice(g8+2),hk,eG,ie,eN,gr,ek;
if(cQ=="/Size"||cQ=="/P"||cQ=="/R")continue;if(cQ=="/S"||cQ=="/A"){hk=n[0];eG=n[1];ie=n[2];eN=n[3];gr=n[4];
ek=n[5]}else if(cQ=="/N"){var jK=B+(A==1?0:1),iE;hk=n[jK+0];eG=n[jK+1];ie=n[jK+2];eN=n[jK+3];gr=n[jK+5];
ek=n[jK+6];if(m=="/DeviceRGB")iE=n.slice(0,3);else if(m=="/DeviceGray")iE=[n[0],n[0],n[0]];else if(m=="/DeviceCMYK"){var e9=[0,0,0,0];
for(var F=0;F<B;F++){var dm=n[F],kD=L[F];e9[0]+=dm*kD[0];e9[1]+=dm*kD[1];e9[2]+=dm*kD[2];e9[3]+=dm*kD[3]}iE=T(e9)}else throw iE;
iE.push(n[B]);l.push([iE,hk,eG])}else throw cQ;Y.push([cQ,gr,ek,hk,eG,ie,eN])}else if(M=="/E"){var gJ=Y.slice(0),dR=0;
for(var F=0;F<Y.length;F++){var fO=Y[F][0];if(fO=="/N"){dR++;continue}var ko=F,d8=F+1;while(Y[d8][0]!="/N"&&d8<Y.length)d8++;
if(dR==0||dR==3){for(var fj=0;fj<d8-ko;fj++)gJ[ko+fj]=Y[d8-1-fj]}else for(var fj=ko;fj<d8;fj++){var ja=gJ[fj],eD=ja[1];
ja[1]=ja[5];ja[5]=eD;eD=ja[2];ja[2]=ja[6];ja[6]=eD}F=d8-1}Y=[];for(var F=0;F<gJ.length;F++){var ja=gJ[F];
Y.push(ja[1],ja[2],ja[3],ja[4],ja[5],ja[6])}var d3=Y.length;t.moveTo(W,Y[2],Y[3]);for(var F=0;F<d3;F+=6){var ie=Y[(F+4)%d3],eN=Y[(F+5)%d3],gr=Y[(F+6)%d3],ek=Y[(F+7)%d3],hk=Y[(F+8)%d3],eG=Y[(F+9)%d3];
t.curveTo(W,ie,eN,gr,ek,hk,eG)}t.closePath(W);Y=[]}else if(M.endsWith("/Version"))A=parseFloat(M[0])}var fP=J.Xh();
fP.H2|=16;fP.gF("<Mesh>");var jE=fP.add.vstk=aF.XM.$H(!0);if(l.length>=2){var cR=0,ex=0,er=0;for(var F=0;
F<l.length;F++)for(var fj=F+1;fj<l.length;fj++){var cE=l[F][0],a7=l[fj][0],dl=cE[0]-a7[0],hl=cE[1]-a7[1],f4=cE[2]-a7[2],em=Math.sqrt(dl*dl+hl*hl+f4*f4);
if(em>er){er=em;cR=F;ex=fj}}var e$=l[cR],iP=l[ex],b2=fP.add.GdFl=JSON.parse(aF.lF[aF.order.indexOf("GrFl")]),k7=b2.Grad.v;
k7.Intr.v=0;b2.Type.v.GrdT="Lnr";d.I.q1([[0,e$[0]],[1,iP[0]]],k7);var at=R(W.ctm),ju=at.RE(new bC(e$[1],e$[2])),jL=at.RE(new bC(iP[1],iP[2])),fJ=d.A.pA(W.pth.crds);
ju.x=(ju.x+jL.x)/2;ju.y=(ju.y+jL.y)/2;d.I.vO(ju,jL,fJ,b2)}a(fP,W.pth,J,0);J.B.push(fP);t.newPath(W)}function k(C){var W=C.indexOf(")");
while(C[W-1]=="\\")W=C.indexOf(")",W+1);return C.slice(C.indexOf("(")+1,W).replaceAll("\\","")}function K(C,c){C.Rd.v=c[0]*255;
C.Grn.v=c[1]*255;C.Bl.v=c[2]*255}function g(C){var W=[];for(var F=0;F<C.length;F++)W[F]=parseFloat(C[F].slice(1));
return W}function R(C){return new bI(C[0],C[1],C[2],C[3],C[4],C[5])}function T(C){return d.i2(C.slice(0,4)).slice(0,3)}function D(C){var W=C.split(" "),J=W[W.length-1],t=J.toLowerCase(),Y=W.map(parseFloat),l=null;
if(t=="xa"||t=="xx"||t=="xz"){var l=Y[4]==null?Y.slice(0,3):[Y[4],Y[5],Y[6]];if(t=="xx"&&Y[Y.length-2]==2)l=T(Y)}else if(t=="g")l=T([0,0,0,1-Y[0]]);
else if(t=="x"||t=="k"){if(t=="x"){Y.pop();var m=1-Y.pop();for(var F=0;F<4;F++)Y[F]*=m}l=T(Y)}else if(t=="xk"){var B=Y[Y.length-2],L=Y[Y.length-3];
if(B==0)l=T(Y);else if(B==1){l=[Y[4],Y[5],Y[6]];for(var F=0;F<3;F++)l[F]=L*1+(1-L)*l[F]}else throw C}else throw t;
return l}function a(C,W,J,t){C.add.vmsk=new eM.hn;if(W.crds.length!=0)C.add.vmsk.$=_(W);C.add.vmsk.Kp=t;
C.jz();C.kT(J)}function _(C){var W={j:C.crds,G:C.cmds},J=d.A.tf(W,!1);return J}function I(C,W){var J=[],S=0,V=0;
for(var t=0;t<2;t++){var Y=W[["Raster","Place"][t]];if(Y==null)continue;for(var F=0;F<Y.length;F++){for(var l=0;
l<3;l++){var m=Y[F][["Data","Document","PlacedObjectPreview"][l]];if(m==null)continue;var B=m._begin,L=m._end;
if(B>L)B=L;J.push([B,L])}}}J.sort(function(n,cQ){return n[0]-cQ[0]});var A=[W._begin];for(var F=0;F<J.length;
F++){var M=J[F],B=M[0]+32;A.push(B,M[1]);S+=M[1]-B}A.push(W._end);var N=W._end-W._begin,s=new Uint8Array(N-S);
for(var F=0;F<A.length;F+=2){var B=A[F],g8=A[F+1]-B;s.set(new Uint8Array(C.buffer,B,g8),V);V+=g8}return w.IV(s).split(/\r\n|\r|\n/)}function f(C,W){if(C==null)return[];
var J=I(W,C),t="",Y="",l=0,m;for(var F=2;F<J.length;F++){var B=J[F];if(B[0]=="%"){if(l==0)t+=B.slice(1);
else Y+=B.slice(1)}else if(B==";")l++;else if(B.endsWith("/RulerOrigin ,"))m=B.split(" ").slice(0,2).map(parseFloat)}var L=[t,Y],A=[];
for(var F=0;F<2;F++){var S=L[F],M=new Uint8Array(S.length);w.f3(M,0,S);var N=FromPS.F.ASCII85Decode({buff:M,off:0}),s=es.s5(N);
A.push(s)}A.push(m);return A}function y(C,W){if(C==null)return[];var J=I(W,C);J=J.slice(1);for(var F=0;
F<J.length;F++){var t=J[F];if(t[0]=="%")J[F]=t.slice(t[1]=="_"?2:1)}var Y=o(J);return Y}function Z(C){var W=[];
r(C,W);for(var F=0;F<W.length;F++)W[F]="%_"+W[F];return W}function v(C,W){var J={};if(C==null)return J;
for(var F=0;F<C.length;F++){var t=I(W,C[F]),Y=t[1],l=k(Y),m=Y.slice(Y.lastIndexOf(")")+2).split(" ").map(parseFloat),B=[];
for(var L=2;L<t.length;L++)B.push(t[L].slice(2));J[l]={LB:m,Eb:B}}return J}function G(C,W){var J=[],Y,l;
if(C==null)return J;var t=I(W,C);for(var F=1;F<t.length;F++){var m=t[F];if(m=="0 0 Pb"||m=="PB"||m==""){}else if(m.endsWith("Xa")||m.endsWith("Xz")||m.endsWith("Xx")||m.endsWith("Xk")||m.endsWith(" k")||m.endsWith(" g")||m.endsWith(" x"))Y=[0,D(m)];
else if(m.endsWith("Xs"))Y=[0,[0,0,0]];else if(m.endsWith("Bg"))Y=[1,k(m)];else if(m.endsWith("Pg"))Y=[2,k(m)];
else if(m[0]=="(")l=k(m);else if(m=="Pc")J.push([l,Y]);else if(m=="0 BB"||m=="Bb"||m.endsWith("Bh")){}else throw m}return J}function q(C,W){var J={},t,Y;
if(C==null)return J;var l=[];for(var F=0;F<C.length;F++){var m=I(W,C[F]);for(var B=0;B<m.length;B++){var L=m[B];
if(L.endsWith("%_Bs")){var A=L.slice(0,L.length-4);if(!A.endsWith(" "))A+=" ";L=A+"%_BS"}if(L[0]=="("){t=k(L);
var S=L.split(")"),M=S[1].split(" ");Y=parseInt(M[1])}else if(L.endsWith("%_BS")){var S=L.split(" "),g8,n=1;
S.pop();S=S.map(parseFloat);var N=S.pop(),s=S.pop(),V=S.pop();if(V==0)g8=[S[0],S[0],S[0]];else if(V==2||V==4)g8=[S[4],S[5],S[6]];
else if(V==1||V==3)g8=T(S);else if(V==6){if(S.length==3)g8=[S[0],S[0],S[0]];else if(S.length>=8)g8=S.slice(4,7);
else g8=T(S);n=S.pop()}else{throw V}l.push([N/100,g8,n,s/100])}else if(L=="BD"){for(var cQ=0;cQ<l.length-1;
cQ++)l[cQ][3]=l[cQ+1][3];l.sort(function(hk,eG){return hk[0]-eG[0]});J[t]={Iz:Y,ax0:l};l=[]}}}return J}function h(C){var W="Gradient PluginObject Symbol Pattern PatternLayer BrushPattern Encoding Raster Layer Resource Place Rider".split(" "),J=Date.now(),t=0,Y=[],l={Header:{}},m=[l],B=C.length;
while(t<B){var L=t;while(L!=B&&C[L]!=13&&C[L]!=10){L++}if(C[t]==37&&C[t+1]==95&&C[t+2]==37)t+=2;if(C[t]==37&&(C[t+1]==37||C[t+1]==65)){var A=w.mt(C,t,L-t);
if(A=="%%EOF")break;if(A=="%%EndComments"||A=="%EndComments"||A=="%AI5_Begin_NonPrinting"||A=="%AI5_End_NonPrinting--"||A.startsWith("%AI17_Begin_Content_if_version_gt")||A=="%AI17_End_Versioned_Content"){}else{var S=A.indexOf("Begin"),M=Math.max(A.indexOf("_End"),A.indexOf("%End"));
if(S!=-1&&A[S-1]!="%"&&A[S-1]!="_")S=-1;if(S!=-1){var N=A.slice(S+5).split(":")[0],s={_begin:t,_end:t},V=m[m.length-1];
if(W.indexOf(N)!=-1){if(V[N]==null)V[N]=[];V[N].push(s)}else{if(V[N]!=null){console.log(m);throw A}V[N]=s}m.push(s);
if(A.startsWith("%%BeginData")){L=w.iK(C,"%%EndData",t)}else if(A.slice(0,15)=="%%BeginDocument")L=w.iK(C,"%%EndDocument",L);
else if(A=="%AI9_BeginDocumentData")L=w.iK(C,"%AI9_EndDocumentData",L);else if(A=="%AI11_BeginTextDocument")L=w.iK(C,"%AI11_EndTextDocument",L)}else if(M!=-1){if(m.length>1)m.pop()._end=t}else if(m.length==1&&(A.startsWith("%AI")||A.startsWith("%%")&&A.indexOf(" ")!=-1)){var g8=1;
if(A.startsWith("%AI"))while(A[g8]!="_"&&g8<A.length)g8++;var n=A.indexOf(":");if(n==-1)n=A.indexOf(" ");
var cQ=A.slice(g8+1,n),hk=A.slice(n+1).trim();l.Header[cQ]=hk}}}t=L;if(C[t]==13)t++;if(C[t]==10)t++}return l}function r(C,W){if(C instanceof Array)for(var F=0;
F<C.length;F++)r(C[F],W);else if(typeof C=="object"){for(var J in C){var t=C[J];if(typeof t=="number")W.push(t+" /Int ("+J+") ,");
else if(typeof t=="string")W.push("("+t+") /String ("+J+") ,");else if(t instanceof Array){W.push("/Array :");
r(t,W);W.push("; ("+J+") ,")}else if(typeof t=="object"){W.push("/Dictionary :");r(t,W);W.push("; ("+J+") ,")}}}}function H(C,W){for(var F=0;
F<W.length;F++)if(C.startsWith(W[F]))return!0;return!1}function o(C){var W=[],J=[],top=-1,t,Y=null,l=null,m=null,B=0;
for(var L=0;L<C.length;L++){var A=C[L];if(t){A=t+A;t=null}var S="\t".repeat(W.length);if(Y!=null){Y.push(A);
if(A.endsWith("~>")){var M=w.nT(Y.join("")),N=FromPS.F.ASCII85Decode({off:0,buff:M});W.push(N);J.push(!1);
top++;Y=null}}else if(m!=null){if(A=="X+"){if(B==1){W.push(m);J.push(!1);top++;m=null}else B--}else if(A=="X=")B++;
else m.push(A)}else if(l!=null){if(A=="/Def ; "){W.push(l);J.push(!1);top++;l=null}else l.push(A)}else if(A=="/Binary : /ASCII85Decode ,"){Y=[]}else if(A=="X="){m=[];
B++}else if(A=="/FillStyle : 0 O"){l=["0 O"]}else if(A=="/SVGFilter :"||A=="; /Def ;")continue;else if(A.startsWith("/XMLUIDREF :")){var s=P(A);
W[top][s[4]]=s[2]}else if(A.startsWith("/")&&A[1].toUpperCase()!=A[1].toLowerCase()){if(A.startsWith("/XMLUID")){var s=P(A);
if(J[top])throw"e";W[top][s[4]]=s[2]}if(A.startsWith("/GObjRef")){var s=P(A);if(s.length==7){if(J[top])throw"e";
W[top][s[5]]=s[2]}else{if(!J[top])throw"e";W[top].push(s[2])}}else{var V=A.startsWith("/Array")||A.startsWith("/Document");
W.push(V?[]:{});J.push(V);top++}}else if(A.endsWith(",")){var g8,n,s=P(A);s.pop();if(s[0]==";"||s.length==1||A==" ,"){n=W.pop();
J.pop();top--;g8=J[top]?null:s.pop()}else{g8=J[top]?null:s.pop();var cQ=s.pop(),hk=s[0];if(cQ=="/Int")n=parseInt(hk);
else if(cQ=="/Real")n=parseFloat(hk);else if(cQ=="/Bool")n=hk=="1";else if(cQ=="/String"||cQ=="/UnicodeString")n=s.join("");
else if(cQ=="/RealMatrix"||cQ=="/RealPoint"||cQ=="/RealPointRelToROrigin")n=s.map(parseFloat);else throw cQ}if(J[top])W[top].push(n);
else W[top][g8]=n}else if(A==";"){}else if(A==""){}else{if(A.indexOf("/RealPoint")!=-1){}else if(A.startsWith("(")&&A.endsWith(")")){}else if(A.endsWith("/RealMatrix")){}else throw A;
t=t?t+A:A}}return W}function P(C){var W=0,J=[];while(W<C.length){var t=C[W],Y=t.charCodeAt(0);if(t==" ")W++;
else if(t==","||t==";"||t==":"){J.push(t);W++}else if(t=="("){var l=W+1;while(!(C[l]==")"&&(C[l-1]!="\\"||C[l-2]=="\\")))l++;
var m=C.slice(W+1,l);J.push(m);W=l+1}else if(t=="/"||t=="-"||48<=Y&&Y<=57){var l=W;while(C[l]!=" ")l++;
J.push(C.slice(W,l));W=l}else throw t}return J}function O(C){var W="";for(var F=0;F<C.length;F++){if(C[F]=="_"&&C[F+1]=="x"){var jF=parseInt(C.slice(F+2,F+4),16);
W+=String.fromCharCode(jF);F+=4}else if(C[F]=="_")W+=" ";else W+=C[F]}return W}function p(C){var W="xmlnode-nodename",J="xmlnode-nodevalue",t="xmlnode-attributes",Y="xmlnode-children",l=C[W].split(":").pop().replace("#",""),m=C[t],B=C[Y],L="<"+l;
for(var A in m)if(A!="xmlns"&&A!="xmlns:v")L+=" "+A.split(":").pop()+"=\""+m[A][J]+"\"";L+=">"+(B.length==0?"":"\n");
for(var F=0;F<B.length;F++)L+=p(B[F]);if(C[J])L+=C[J];return L+"</"+l+">\n"}return x}();ad.a4E=function(x,Q,c){var $=d.A.Hg(new gh(0,0,x,Q)).j,z=new bI;
z.rotate(c);d.A.i($,z,$);var j=d.A.pA($);return j.m/x};ad.awZ=["norm","mul ","scrn","over","sLit",null,"div ",null,null,null,null,null,null,null,"colr",null];
ad.gS=function(){function x(g){var R=72/g.cQ,T=new bI(R,0,0,-R,0,0),D=g.root.children,a=[],_={nP:[],acj:0},I=16383,M=0,s=0;
for(var F=0;F<D.length;F++)U(D[F],g,T,_,a,0);var f=["%!PS-Adobe-3.0\r","%%Creator:Adobe Illustrator (TM) 15.000000 Exported from Photopea","%%Title:Sitecreator.io.ai\r","%%CreationDate:\r","%%Canvassize:"+I+"\r","%%BoundingBox:0 0 0 0\r","%%DocumentProcessColors: Cyan Magenta Yellow Black\r","%AI3_ColorUsage: Color\r","%AI3_Cropmarks:0 0 1 1\r","%AI3_TileBox:0 0 1 1\r","%AI3_TemplateBox:0 0 1 1\r","%AI3_DocumentPreview: None\r","%AI5_ArtSize: 0 0 \r","%AI5_NumLayers: 1\r","%AI5_FileFormat 2.0\r","%AI9_ColorModel: 1\r","%AI12_CMSettings: 00.MS\r","%%BeginProlog\r","%%EndProlog\r"];
f.push("%%BeginSetup\r");f=f.concat(_.nP);for(pn in g.IC){var y=g.IC[pn],Z=g.cQ/72;f.push("%AI3_BeginPattern: ("+pn+")");
f.push("("+pn+") 0 0 "+Math.round(y.m/Z)+" "+Math.round(y.e/Z));var D=y.root.children,v=[];for(var F=0;
F<D.length;F++)U(D[F],y,T,_,v,1);v=window.a8q;for(var F=0;F<v.length;F++){var G=v[F];f.push(G.startsWith("%_")?G:"%_"+G)}f.push("E","%AI3_EndPattern");
console.log(R);console.log(y)}f=f.concat(["%AI9_BeginDocumentData\r","/Document :","/Dictionary :","0 /Int (CropAreaActive) ,","/Array :"]);
var q=g.add.arts;for(var F=0;F<q.length;F++){var h=q[F];console.log(h);var r=h.LB[0]*R,H=-h.LB[1]*R,o=h.LB[2]*R,P=-h.LB[3]*R;
f.push("/Dictionary :","("+h.if+") /UnicodeString (Name) ,","1 /Real (PAR) ,","1 /Bool (IsArtboardDefaultName) ,",I/2+" "+I/2+" /RealPoint"," (RulerOrigin) ,","0 /Int (DisplayMark) ,",c(r)+" "+c(H)+" /RealPointRelToROrigin"," (PositionPoint1) ,",c(o)+" "+c(P)+" /RealPointRelToROrigin"," (PositionPoint2) ,","; ,")}f=f.concat("; (ArtboardArray) ,-/Dictionary :-/Array :-; (SelHatDocInterIDsArray) ,-; (SelHatDocTableDict) ,-; /Recorded ,-/Dictionary : /NotRecorded ,-/Dictionary : /NotRecorded ,-; (PDFPresetCollection) ,-; /NotRecorded ,-;-%AI9_EndDocumentData\r".split("-"));
var O=[],p=[];for(var F=0;F<g.B.length;F++){var C=g.B[F],W=C.add.TySh;if(W){O.push(W.HW);p.push(W)}}if(O.length!=0){var J=iA.a6T(O,null,null);
function t(h){return h.map(function(V){return"f"+V})}for(var Y=0;Y<O.length;Y++){var W=p[Y],l=J._1._1[Y],m=l._1._0[0]._0;
m=parseInt(m.slice(1));var B=J._0._8._0[m]._0,L=W.i.clone();L.concat(T);L.scale(1,-1);B._2._2=t([L.V,L.J,L.dC,L.xq,L.DX,L.ti])}var A=Q(J),S=Q(J);
f.push("%AI11_BeginTextDocument");f.push("/AI11TextDocument : /ASCII85Decode ,");f=f.concat(A);f.push("0.0001 0.0001 /RulerOrigin ,");
f.push(";");f.push("/AI11UndoFreeTextDocument : /ASCII85Decode ,");f=f.concat(S);f.push(";");f.push("%AI11_EndTextDocument")}f.push("%%EndSetup\r");
f=f.concat(a);console.log(f.join("\n"));f.push("%%PageTrailer\r","gsave annotatepage grestore showpage\r","%%Trailer\r","%%EOF\r","\r","");
for(var F=0;F<f.length;F++){var h=f[F];if(typeof h=="string")h=f[F]=w.nT(h);M+=h.length+1}var N=new Uint8Array(M);
for(var F=0;F<f.length;F++){var h=f[F];N.set(h,s);s+=h.length;N[s]=13;s++}return ch.a7j(N).buffer}function Q(g){var R=new ij,T=es.o5(g,R)-2,D=K(R.data.slice(0,T)),a=[];
for(var _=0;_<D.length;_+=100){if(D.length-_<103){a.push("%"+D.slice(_));break}a.push("%"+D.slice(_,_+100))}return a}function c(jF){return jF.toFixed(3)}function $(g,R){var T=g.getName(),D=null;
R.push("%_/ArtDictionary :");if(g.add.vmsk)D=g.add.vmsk.ir;if(g.add.SoLd){var a=d.D.Tn(g.add.SoLd);D=Math.atan2(-a.J,a.V)}if(g.add.TySh){var a=g.add.TySh.i;
D=Math.atan2(-a.J,a.V)}if(D!=null&&D!=0)R.push("%_("+D+") /String (BBAccumRotation) ,");if(g.add.TySh)R.push("%_(21b560b4-4fda-4f2d-b9c0-837007f17e72) /UnicodeString (AI24 TextStoryRawDataUUID) ,");
else if(!T.startsWith("<")&&!T.endsWith(">")){R.push("%_/XMLUID : "+z(T)+" ; (AI10_ArtUID) ,")}R.push("%_;","%_")}function z(g){var R="";
for(var F=0;F<g.length;F++){var T=g[F],D=g.charCodeAt(F);if(T==" ")R+="_";else if(T=="."||T==":"||T=="-"||48<=D&&D<=57||65<=D&&D<=90||97<=D&&D<=122||127<D)R+=T;
else R+="_x"+D.toString(16).toUpperCase()+"_"}return"("+R+")"}function j(g,R,T){T.push(c(g[0])+" "+c(g[1])+" "+c(g[2])+" "+R)}function U(g,R,T,D,a,_){var I=g.a;
if(_!=0)a.push((I.M5()?0:1)+" Xw");if(I.Uy()){var f=!1;for(var F=0;F<g.children.length;F++)if(g.children[F].a.Qc)f=!0;
var y=I.add.lsct==hA.DJ?1:0;if(_==0){a.push("%AI5_BeginLayer");a.push((I.M5()?1:0)+" 1 1 1 0 0 -1 51 44 43 Lb");
a.push("("+I.getName()+") Ln");a.push(y+" AE");$(I,a)}else{a.push(y+" Ae");a.push(f?"q":"u")}for(var F=0;
F<g.children.length;F++)U(g.children[F],R,T,D,a,_+1);if(_==0)a.push("LB","%AI5_EndLayer--");else{a.push(f?"Q":"U");
$(I,a);i(I,a);a.push("0 0 Xd","6 () XW")}}else{i(I,a);var Z=I.add.TySh,v=I.add.vmsk;if(Z){a.push("/AI11Text :","0 /FreeUndo ,","0 /FrameIndex ,",D.acj+" /StoryIndex ,");
if(dU.SI(Z.HW)==1){var G=dU.Sx(Z.HW),q=d.A.Hg(new gh(G[0],G[1],G[2],G[3])).j;d.A.i(q,Z.i,q);d.A.i(q,T,q);
a.push("/Art :","X=","1 Ap",q[0]+" "+q[1]+" m",q[2]+" "+q[3]+" L",q[4]+" "+q[5]+" L",q[6]+" "+q[7]+" L",q[0]+" "+q[1]+" L","n","X+","; /ConfiningPath ,")}a.push("2 /TextAntialiasing ,",";");
D.acj++}else if(I.add.SoLd){var h,r,H,o=I.add.SoLd,P=o.Idnt.v,O=R.Td(P,o.Crop?o.Crop.v:null),p=O.iw,h=p[0],r=p[1];
H=d.D.Tn(o);var C=new bI(1,0,0,-1,0,0);C.concat(H);C.concat(T);var W=r.P(),J=r.m,t=r.e,Y=d.R(W*4+8);
for(var F=0;F<W;F++){var l=F*4,m=F*3;Y[m]=h[l];Y[m+1]=h[l+1];Y[m+2]=h[l+2];Y[3*W+F]=h[l+3]}w.f3(Y,W*4,"%EndData");
a.push("%AI5_File:","%AI5_BeginRaster","[ "+[C.V,C.J,C.dC,C.xq,C.DX,C.ti].map(c).join(" ")+" ] 0 0 "+[J,t,J,t].join(" ")+" 8 3 1 17 1 0 4 4 0 0","%BeginData: "+(W*4+4),"XI",Y,"XH","%AI5_EndRaster","N")}else if(v){var B=I.add.vstk,L=I.add.vstl,A,S;
if(L){A=L.aA;S=L.sf}var M=d.o.WV(v.$)>1;if(M)a.push("*u","0 Xw");if(A){if(A.length==3)j(A,"Xa",a);else if(A.length==4){var N=e(A,D);
a.push("Bb",N,"2 BB")}else{a.push("("+A[0]+") "+A[1][0].join(" ")+" ["+A[1][1].join(" ")+"] p")}}if(S){var s=aF.xV.bh(L,s,T.c0());
a.push(s.lcap+" J "+s.ljoin+" j "+s.lwidth+" w "+c(s.mlimit)+" M ["+s.dash.join(" ")+"]0 d");if(S.length==3)j(S,"XA",a);
else if(S.length==4){var N=e(S,D);a.push("1 Bb",N,"2 BB")}else{a.push("("+S[0]+") "+S[1][0].join(" ")+" ["+S[1][1].join(" ")+"] P")}}var V=d.A.CJ(v.$,1);
d.A.i(V.j,T,V.j);var g8=I.Qc?"h\nW\nn":A&&S?"b":A?"f":"s";b(V,g8,v.Kp,a);if(M)a.push("*U")}$(I,a)}}function i(g,R){var T=ad.awZ.indexOf(g.s3);
if(T==-1)T=0;R.push(T+" "+c(g.opacity/255)+" 0 0 0 Xy")}function b(g,R,T,D){D.push(T+" XR");var a=0;
for(var _=0;_<g.G.length;_++){var I=g.G[_],f,y=0,Z="";if(I=="M"){y=2;f="m"}if(I=="L"){y=2;f="l"}if(I=="C"){y=6;
f="c"}for(var F=0;F<y;F++)Z+=c(g.j[a+F])+" ";a+=y;if(y!=0)D.push(Z+f);if(_==g.G.length-1||g.G[_+1]=="M"){D.push(I=="Z"?R:R.toUpperCase())}}}function e(g,R){var T=k(g,R),D="";
if(g[0]==1)D="0 0 "+g[2].slice(5).map(c).join(" ")+" Bh\n";return D+"1 ("+T+") "+g[2].slice(0,4).map(c).join(" ")+" "+g[3].map(c).join(" ")+" "+c(g[2][4])+" Bg"}function k(g,R){var T=g[0],D=g[1].slice(0),a="grd"+R.nP.length;
R.nP.push("%AI5_BeginGradient: ("+a+")","("+a+") "+T+" "+D.length+" Bd","[","4 %_Br","0","0","1","4 %_Br","[");
if(T==0)D=D.reverse();for(var F=0;F<D.length;F++){var _=D[F],I=d.ru(_[1]),f=I.concat(_[1]).map(c).join(" ")+" 2 "+c(_[2])+" 6 50 "+c(_[0]*100);
R.nP.push(f+" %_BS");R.nP.push("%_"+f+" Bs")}R.nP.push("BD","%AI5_EndGradient");return a}function K(g){var R=[85*85*85*85,85*85*85,85*85,85,1],T="",D=g.length,a=new Uint8Array(4),_=new Uint32Array(a.buffer);
for(var F=0;F<D;F+=4){var I=D-F;a[3]=g[F];a[2]=I>1?g[F+1]:0;a[1]=I>2?g[F+2]:0;a[0]=I>3?g[F+3]:0;var f=_[0],y=1+Math.min(4,I);
for(var Z=0;Z<y;Z++){var v=Math.floor(f/R[Z]);T+=String.fromCharCode(33+v);f-=v*R[Z]}}return T+"~>"}return x}();
function cH(){}cH.s5=function(){var x,Q,c,$,z,_,I,f;function j(C){return w.FL(x,C)}function U(C){return w.uv(x,C)}function i(C){return w.K3(x,C)}function b(C){return w.fu(x,C)}function e(C,W){var J=[];
for(var F=0;F<W;F++)J.push(i(C+F*4));return J}function k(C,W){var J=[];for(var F=0;F<W;F++)J.push(j(C+F*8));
return J}function K(C){return i((C+1)*4096-12)}function g(C){return i((C+1)*4096-8)}function R(C,Q,W,J){if($[C]==null)$[C]=[];
$[C].push([J,new Uint8Array(x.buffer,Q,W)])}function T(C,W,J,t){var Y=c[C],Q=Y*4096;Q=Q+i(Q+4096-24-12-W*4);
var l=U(Q),m=x[Q+2],B=x[Q+3];if(W!=m)throw m;if(B==0)R(t,Q+4,J,9);else{var L=U(Q+6),A=i(Q+8);R(t,Q+12,l-12,9);
T(A,L,J-(l-12),t)}}function D(){var C=i(352),W=i(C*4096+128),J=i(936);c=[];$={};z={};for(var F=0;F<1e9;
F++){var t=i(J*4096+128+F*4);if(t==0)break;var Y=e(t*4096+128,4096-128-12>>>2);c=c.concat(Y)}for(var l=0;
l<c.length;l++){var m=c[l],B=K(m);if(B!=6)continue;var Q=m*4096,L=i(Q);Q+=4;for(var F=0;F<L;F++){var A=i(Q);
Q+=4;var S=i(Q);Q+=4;var M=i(Q);Q+=4;var N=i(Q);Q+=4;if(A==0)z[S]=M;else{var s=M&65535,V=M>>>16;if(V==0)R(S,N*4096,s,8);
else T(N,V,s,S)}}}var _={};for(var g8 in $){var n=$[g8],cQ=n.length;if(cQ==1)_[g8]=n[0][1];else{var hk=0,Q=0;
for(var F=0;F<cQ;F++)hk+=n[F][1].length;var eG=_[g8]=new Uint8Array(hk);for(var F=0;F<cQ;F++){eG.set(n[F][1],Q);
Q+=n[F][1].length}}}return _}function a(Q,C){var W=C?i(Q):U(Q),J="";Q+=C?4:2;while(J.length<W){var t=x[Q++],Y=x[Q++],l=0,m="";
t+=(Y&15)*256;Y=Y&240;for(var F=0;F<t;F++){if(Y==64)l=x[Q++];else if(Y==128)l=x[Q++]|x[Q++]<<8;else throw Y;
m+=String.fromCharCode(l)}J+=m}return[J,Q]}function y(Q,C,W){var J=e(Q,C);for(var F=0;F<C;F++){W.push(F);
if(J[F]>I)throw"e";J[F]=v(J[F],W);W.pop()}return J}var Z={};function v(C,W){if(f.indexOf(C)!=-1)return _[C];
if(C==0)return null;if(_[C]==null)return null;if(!(_[C]instanceof Uint8Array))return _[C];var J=x,Q=0;
x=_[C];f.push(C);var t=z[C].toString(16),Y=_[C]={_type:p[t]?p[t]+":"+t:"typ-"+t,_eid:C};while(Q+8<x.length){var l=i(Q);
Q+=4;var m=l.toString(16),B=i(Q);Q+=4;var L=Q+B;if(Q+B>x.length){Y._bin=x;break}G(m,H,Y,Q,B,W);Q=L}x=J;
f.pop();return Y}function G(C,W,J,Q,t,Y){var l=W[C+":"+J._type];if(l==null)l=W[C];Y.push(l?l[0]==""?C:l[0]:C);
if(l){var m=l[0],B=null,L=l[1];if(m=="")m=L+"-"+C;if(P[L]&&t!=P[L]){console.log(L);console.log(C,l);
console.log(x.slice(Q,Q+t));throw"e"}if(L=="mat")B=k(Q,6);else if(L=="mmat")B=[v(i(Q),Y),k(Q+6,6)];else if(L=="rect")B=k(Q,4);
else if(L=="mrct"){B=k(Q,4);B.push(U(Q+32))}else if(L=="doub")B=j(Q);else if(L=="pointArr"){var A=U(Q);
B=e(Q+2,A*2)}else if(L=="usrt")B=U(Q);else if(L=="uint")B=i(Q);else if(L=="pntr"||L=="ptr6"){B=v(i(Q),Y)}else if(L=="bool2"){if(U(Q)!=0&&U(Q)!=1)throw U(Q);
B=U(Q)==1}else if(L=="bool4"){if(i(Q)!=0&&i(Q)!=1)throw C+","+i(Q);B=i(Q)==1}else if(L=="color"){if(t!=38&&t!=30)throw t;
var S=i(Q),M=U(Q+4);B=[S];for(var F=0;F<M;F++)B.push(j(Q+6+F*8))}else if(L=="path"){var N=Q+t;B=[];var s=i(Q);
Q+=4;for(var F=0;F<s;F++){var V=[[]];B.push(V);var g8=i(Q);Q+=4;for(var n=0;n<g8;n++){var S=i(Q);Q+=4;
if(S<2){V[0].push([S,j(Q),j(Q+8),j(Q+16),j(Q+24),j(Q+32),j(Q+40)]);Q+=48}else if(S==2){V[0].push([S,j(Q),j(Q+8)]);
Q+=16}else throw S}V.push(U(Q));Q+=2}}else if(L=="ptrAndList"){var cQ=i(Q),hk=i(Q+4);B=y(Q+8,hk,Y);B.unshift(v(cQ,Y))}else if(L=="ptrArray"||L=="ptrArrayX"){var eG=t>>2;
if(L=="ptrArray"){eG=i(Q);Q+=4;if(t!=4+eG*4)throw t}B=y(Q,eG,Y)}else if(L=="ptrArray2"){var eG=i(Q);
Q+=4;B=y(Q,eG,Y);Q+=eG*4;eG=i(Q);Q+=4;B.push(y(Q,eG,Y))}else if(L=="cldrn"){var ie=i(Q),eN=i(Q+4),eG=i(Q+8);
B={H:v(ie,Y),HK:v(eN,Y),Ci:y(Q+12,eG,Y)};if(t!=12+eG*4){console.log(C,sa);throw"e"}if(ie==0)throw ie}else if(L=="aprnc"){var eG=i(Q);
Q+=4;B={};for(var F=0;F<eG;F++){var gr=i(Q),ek=U(Q+4),jK=U(Q+6);Q+=8;var iE=O[gr.toString(16)];if(iE==null)iE="prm-"+gr.toString(16);
else iE=r(iE);B[iE]=[];for(var n=0;n<jK;n++){var e9=i(Q),dm=U(Q+4),kD=null;Q+=6;if(e9==28264)kD=j(Q);
else if(e9==28263)kD=i(Q);else if(e9==279||e9==6917)kD=v(i(Q),Y);else if(e9==28261)kD=U(Q)==1;else if(e9==28265)kD=[j(Q),j(Q+4)];
else if(e9==6914||e9==83231)kD=a(Q+3)[0];else if(e9==28259||e9==28260||e9==23094||e9==67679){kD=x.slice(Q,Q+dm)}else throw e9.toString(16);
B[iE].push(kD);Q+=dm}}}else if(L=="lopts"){B={aoP:U(Q+0)==1,show:U(Q+2)==1,acE:U(Q+4)==1,nH:i(Q+10),name:a(Q+21)[0]}}else if(L=="origin"){var N=Q+t;
if(x[Q++]!=1)throw"e";var A=i(Q);Q+=4;var gJ=w.mt(x,Q,A);Q+=A;if(x[Q++]!=1)throw"e";var dR=x[Q++];if(dR!=1&&dR!=53)throw dR;
var fO=U(Q);Q+=2;if(fO!=0&&fO!=1)throw fO;var ko=i(Q);Q+=4;if(ko!=0&&ko!=1)throw ko;var d8=i(Q);Q+=4;
if(d8!=0&&d8!=2&&d8!=3)throw d8;var fj=i(Q);Q+=4;var ja=a(Q,!0);Q=ja[1];ja=ja[0];var eD=i(Q),d3=i(Q+4);
Q+=8;var fP=i(Q);Q+=4;if(fP!=0)throw fP;var jE=i(Q);Q+=4;Q+=3;var cR=a(Q)[0];Q+=2+2+cR.length;B={file:gJ,id:ja,mN:cR}}else if(L=="string")B=a(Q+3)[0];
else if(L=="relEnt"){var ex=U(Q);Q+=2;B=[];for(var F=0;F<ex;F++)B.push([i(Q+F*8),v(i(Q+F*8+4),Y)])}else if(L=="textData"){var N=Q+t,er=i(Q);
Q+=4;var gr=i(Q);Q+=4;var M=U(Q);Q+=2;var cE=[];for(var F=0;F<M;F++){var a7=i(Q);Q+=4;if(er==514)cE.push(a(Q,!0)[0]);
else if(er==515){var dl=i(Q),C=i(Q+4),hl=q(Q+8,Y);cE.push([dl,v(C,Y),hl])}else if(er==516){var dl=i(Q),C=i(Q+4),f4=U(Q+8),hl=q(Q+8,Y);
cE.push([dl,v(C,Y),hl])}else cE.push(x.slice(Q,Q+a7));Q+=a7}if(N-Q!=12)throw N-Q;B=cE}else if(L=="storyProps"){var em=i(Q);
if(U(Q+4)>1)throw"e";var e$=v(i(Q+6),Y),M=i(Q+10),iP=v(i(Q+14+M*4),Y);B={a91:em,am7:e$,Ci:y(Q+14,M,Y),ao5:iP,av0:e(Q+14+M*4+4,4)}}else if(L=="styleProps")B=q(Q,Y);
else if(L=="bounds"){var b2=Q,ex=i(Q);Q+=4;B=[];for(var F=0;F<ex;F++){var k7=[];B.push(k7);for(var n=0;
n<4;n++)k7.push(j(Q+n*8));Q+=32;k7.push(x[Q]);Q++}if(Q!=b2+t)throw"e"}else if(L=="columnPos"){var ex=i(Q);
Q+=4;B=[k(Q,ex),j(Q+ex*8)];Q+=ex*8+8}else if(L=="StyleName"){B=[i(Q+4)]}else if(L=="fontName"){var N=Q+t;
B=[U(Q)];Q+=2;for(var F=0;F<2;F++){var gJ=a(Q+3);Q=gJ[1];B.push(gJ[0])}B.push(i(Q));Q+=4;var at=U(Q);
Q+=2;B.push(at);var ju=U(Q);Q+=2;var jL=[];B.push(jL);for(var fJ=0;fJ<ju;fJ++){var h6=[];jL.push(h6);
var gJ=a(Q+3);Q=gJ[1];h6.push(gJ[0]);var iq=U(Q);Q+=2;var gJ=w.mt(x,Q,iq);Q+=iq;h6.push(gJ);for(var F=0;
F<3;F++){var gJ=a(Q+3);Q=gJ[1];h6.push(gJ[0])}h6.push(i(Q));Q+=4;var gJ=a(Q,!0);Q=gJ[1];h6.push(gJ[0])}if(Q+4!=N)throw"e";
B.push(i(Q))}else throw L;if(J[m]!=null){console.log(m,J[m],B);console.log(Y.slice(0));console.log(eid,C,Q,J[m],l,B);
throw"e"}J[m]=B}else{var iI=x.slice(Q,Q+t);J["prop-"+C]=iI}Y.pop()}function q(Q,C){var W=U(Q);Q+=2;var J={};
for(var F=0;F<W;F++){var t=i(Q);Q+=4;var Y=t.toString(16),l=U(Q);Q+=2;var m=U(Q);Q+=2;for(var B=0;B<m;
B++){var L=i(Q);Q+=4;var A=U(Q);Q+=2;G(Y,o,J,Q,A,C);Q+=A}}return J}function h(C){x=new Uint8Array(C);
_=D();var W=_[2147483649];W=w.IV(W,4,W.length-4);delete _[2147483649];I=0;for(var J in _)I=Math.max(I,parseInt(J));
f=[];var t={};for(var J in _)t[J]=_[J];for(var J in _)v(parseInt(J),[]);return _}function r(C){C=C.split(" ").join("");
return C[0].toLowerCase()+C.slice(1)}var H={"2d2":["","bool2"],"1623":["","bool2"],"2c32":["visible","bool2"],cd1f:["","bool2"],"1b8":["","bool4"],"2c2d":["locked","bool4"],"118":["","uint"],"119":["bitmap","uint"],"117":["","uint"],"117:Page:50f":["color","pntr"],"117:Fill:1f05":["parentFill","pntr"],"56c":["","uint"],bf31:["","uint"],ca58:["","uint"],cade:["","uint"],"313":["","pntr"],a6b:["trapPreset","pntr"],e02:["","pntr"],"170d":["bitmapFill","pntr"],"1b916":["","pntr"],"205":["columns","ptrAndList"],"220":["obj228","ptrAndList"],"2ab":["story","ptrArrayX"],"302":["layer","ptr6"],"21f":["rect","rect"],"27e":["","rect"],"2d6":["rect","rect"],"565":["rect","rect"],"5dd":["rect","rect"],"1633":["rect","rect"],"51a":["margins","mrct"],"151":["transform","mat"],"2de":["transform","mat"],"40d":["transform","mat"],"56e":["transform","mat"],"5cc":["transform","mat"],"140f":["mTransform","mmat"],"14527":["transform","mat"],"528":["columnPos","columnPos"],"261":["relEnt","relEnt"],"262":["textData","textData"],"15b":["children","cldrn"],"2c8":["children","cldrn"],"303":["children","cldrn"],"503":["children","cldrn"],"28dc":["children","cldrn"],"104e5":["children","cldrn"],"1b95a":["children","cldrn"],"1f01":["color","color"],"162b":["path","path"],"6e03":["appearance","aprnc"],"304":["lopts","lopts"],"2c10":["name","string"],"8c92":["origin","origin"],"3e05":["name","fontName"],"20f":["","ptrArrayX"],"210":["","ptrArrayX"],"211":["","ptrArrayX"],"222":["stories","ptrArray2"],"223":["stoProps","storyProps"],"23f":["styProps","styleProps"],"2c6b":["bounds","bounds"],"230":["name","StyleName"],"301":["layers","ptrArray"],"501":["spreads","ptrArray"],"4c01":["sections","ptrArray"],"1401":["masterSpreads","ptrArray"],a67:["","ptrArray"],"1f05":["colors","ptrArray"],"1f0c":["","ptrArray"],"1f60":["","ptrArray"],"1f61":["","ptrArray"],"288a":["","ptrArray"],"377c":["textFrames","ptrArray"],"3e06":["","ptrArray"],"1081d":["","ptrArray"]},o={"1b01":["fillColor","pntr"],"1b02":["fontStyle","string"],"1b03":["FontSize","doub"],"1b11":["FontCaps","usrt"],"1b16":["StartIndent","doub"],"1b17":["EndIndent","doub"],"1b18":["FirstLineIndent","doub"],"1b1b":["leading","doub"],"1b26":["SpaceBefore","doub"],"1b27":["SpaceAfter","doub"],"1b2a":["Underline","bool2"],"1b2b":["font","pntr"],"1b3c":["FontBaseline","usrt"],"1b3d":["Strikethrough","bool2"],"1b7e":["align","usrt"]},P={mmat:54,mat:48,mrct:34,rect:32,doub:8,ptr6:6,uint:4,pntr:4,bool4:4,bool2:2,usrt:2},O={"10816":"Object Opacity","10891":"Stroke Opacity","10892":"Stroke Blending Mode","10893":"Stroke Knockout Group","10894":"Stroke Isolate Blending","108d8":"Fill Opacity","108d9":"Fill Blending Mode","108da":"Fill Knockout Group","108db":"Fill Isolate Blending","10817":"Object Blending Mode","10818":"Object Knockout Group","10819":"Object Isolate Blending","6e64":"Stroke Swatch","6e65":"Stroke Weight","6e66":"Stroke Tint","6e6e":"Stroke Type","6e68":"Fill Swatch","6e69":"Fill Tint","6e6b":"Stroke Cap","6e6c":"Stroke Join","6e6d":"Stroke Mitre Limit","6e8c":"Stroke Align Stroke","6e71":"Stroke Start Arrrowhead","6e72":"Stroke End Arrrowhead","6e89":"Stroke Gap Color Swatch","6e8a":"Stroke Gap Tint","6e84":"Stroke Arrowhead Align","6e95":"Stroke Start Arrowhead Scale","6e96":"Stroke End Arrowhead Scale","6e8f":"Corner 1 Shape","6e6f":"Corner 2 Shape","6e90":"Corner 3 Shape","6e91":"Corner 4 Shape","6e70":"Corner 1 Size","6e92":"Corner 2 Size","6e93":"Corner 3 Size","6e94":"Corner 4 Size","1081a":"Drop Shadow","1081b":"Drop Shadow DX","1081c":"Drop Shadow DY","1081e":"Drop Shadow Opacity","1081f":"Drop Shadow BMode","10820":"Drop Shadow Size","10837":"Drop Shadow Color","1084d":"Inner Shadow","1084e":"Inner Shadow Color","1084f":"Inner Shadow BMode","10850":"Inner Shadow Opacity","10851":"Inner Shadow Angle","10852":"Inner Shadow Dist","10855":"Inner Shadow Size","10857":"Oglow","10858":"Oglow BMode","10859":"Oglow Opacity","1085b":"Oglow Color","1086d":"Oglow Choke","1085e":"Oglow Size","1085f":"Iglow","10860":"Iglow BMode","10861":"Iglow Opacity","10863":"Iglow Color","10865":"Iglow Choke","10866":"Iglow Size","10868":"Bevel","1086b":"Bevel Depth","1086d":"Bevel Size","1086f":"Bevel Angle","10870":"Bevel Alt","10872":"Bevel ColorH","10873":"Bevel BModeH","10874":"Bevel OpacityH","10875":"Bevel ColorS","10875":"Bevel BModeS","10877":"Bevel OpacityS","10878":"Satin","10879":"Satin Color","1087a":"Satin BMode","1087b":"Satin Opacity","1087c":"Satin Angle","1087d":"Satin Dist","1087e":"Satin Size","1087f":"Satin Invert","10821":"Basic Feather","10822":"Basic Feather Width","10895":"Stroke Drop Shadow","10899":"Stroke Drop Shadow Blending Mode","1eb8f":"GradientFeatherSetting GradientStart","1eb8e":"GradientFeatherSetting Length","14534":"name"},p={e01:"Document","301":"RESpread","236":"REParStyle","302":"Layer","401":"Group","501":"Spread","50f":"Page","227":"Column","201":"Story","205":"Style","263":"TextFrame",a32:"Trapping","1f05":"Fill","3e03":"Font","6201":"Path",ca18:"StoryText"};
return h}();function dK(){}dK.s5=function(){var x=0;function Q(K,g){var R=cH.s5(K),o=1;x=0;var T=R[1],D=T.spreads,a=[],_=new gh;
for(var I=0;I<D.length;I++){var f=D[I],y=f.children.Ci,Z=$(f),v=y[0].children.Ci,G=new gh;for(var q=0;
q<v.length;q++){var h=v[q],r=$(h);r.concat(Z);var H=c(h);H.offset(r.DX,r.ti);H=d.A.Yc(H);G=G.iO(H)}a.push(G);
_=_.iO(G)}while(Math.sqrt(_.P())*o<1e3)o++;g.m=_.m*o;g.e=_.e*o;g.buffer=new Uint8Array(4*g.m*g.e);g.RS=!0;
g.cQ=Math.round(72*o);g.cV(D.length);for(var I=0;I<D.length;I++){var f=D[I],y=f.children.Ci,P=g.Xh();
P.H2=24;P.add.lsct=hA.DJ;P.gF("Artboard "+(I+1));var O=a[I].clone();O.offset(-_.x,-_.y);O.x*=o;O.y*=o;
O.m*=o;O.e*=o;O=d.A.Yc(O);P.Zp(O);P.s3="pass";g.B.push(g.x6());var Z=$(f);Z.translate(-_.x,-_.y);Z.scale(o,o);
var p={};for(var C=0;C<y.length-1;C++){var W=y[C],J=W.children.Ci,t=g.Xh(),Y=W.layer.lopts;if(Y.name=="Internal_pages_layer_name"||p[Y.name])continue;
p[Y.name]=!0;t.H2=24;t.add.lsct=hA.DJ;t.gF(Y.name);t.KW(Y.show);if(Y.aoP)t.add.lspf=1<<31;t.s3="pass";
g.B.push(g.x6());for(var F=0;F<J.length;F++)b(J[F],g,Z,R);g.B.push(t)}g.B.push(P)}}function c(K){var g=K.rect;
return new gh(g[0],g[1],g[2]-g[0],g[3]-g[1])}function $(K){var g=K.transform;return new bI(g[0],g[1],g[2],g[3],g[4],g[5])}function z(K){var g=K.color,R=K.parentFill,D;
if(g==null&&R)g=R.color;if(g==null){console.log("strange color",K);return[0,0,0]}var T=g[0];if(T==5)D=g.slice(1);
else if(T==6)D=UDOC.C.cmykToRgb(g.slice(1));else if(T==7){var a=d.Ay(g[1],g[2],g[3]);D=[a.Z/255,a.r/255,a.J/255]}else if(T==14){D=g.slice(1);
console.log("unsure about the color")}else{console.log(g);throw T}return D}function j(K){var g=z(K);
return d.I.lV({Z:g[0]*255,r:g[1]*255,J:g[2]*255})}function U(K){return"norm,mul ,scrn,over,sLit,hLit,div ,idiv,dark,lite,diff,smud,hue ,sat ,colr,lum ".split(",")[K]}function i(K,g){var F=0,R=0;
while(K[F+1]&&R+K[F][0]<=g){R+=K[F][0];F++}K=K[F][1].textData;F=0;while(K[F+1]&&R+K[F][0]<=g){R+=K[F][0];
F++}return K[F]}function b(K,g,R,T){var D=K.transform?$(K):new bI;D.concat(R);var a=K.path,_=K.appearance,I=K.visible,f=K.children?K.children.Ci:null,y=g.Xh();
if(I!=null)y.KW(I);var Z=f&&f.length==1&&f[0].bitmapFill,v=K["bool2-1623"]&&f&&f.length==1&&f[0].rect&&f[0]._type.startsWith("TextFrame");
if(Z){y.gF("bitmap");var G=f[0],q=c(G),h=$(G),O=null;h.concat(D);var r=G.bitmapFill.bitmap;r=T[r]._bin;
if(r.length!=r.buffer.byteLength)r=r.slice(0);if(r[0]==123){console.log("unknown bitmap format");return}var H=g.BQ(r,"img.jpg",0,0);
H.H2=y.H2;y=H;var o=[0,0,q.m,0,q.m,q.e,0,q.e];d.A.i(o,h,o);y.add.SoLd.Trnf=X.Y.TD(o);y.add.SoLd.nonAffineTransform=X.Y.TD(o);
y.bx(g,!1);var P=G.path;if(P&&P.length!=0)O=k(P,h,_);else if(a&&a.length!=0)O=k(a,D,_);if(O){var p=d.o.sP(O.$),C=d.A.pA(o);
if(p.P()/C.y_(p).P()>1.1){if(p.contains(C))O=null;var W=K.children;K.children=null;b(K,g,R,T);K.children=W}}if(O)y.add.vmsk=O;
y.jz();y.kT(g)}else if(v){if(_&&_.strokeSwatch){var J=g.Xh();e(J,g,_,a,D);g.B.push(J)}var t=f[0],q=c(t),h=$(t),ie=0;
h.concat(D);var Y=t.children.Ci[0],l=Y.obj228,m=l[0].story[1],B=m.stoProps.am7.relEnt,L=m.stoProps.Ci[0].relEnt,A=m.stoProps.Ci[1]["ptrArrayX-210"][0].textData,S=T[B[0][1].textData[0][1].name[0]],M=S?S.styProps:{};
A=A.join("").replace(/\r/g,"\n");var N=-1;while((N=A.indexOf("\uFFFC"))!=-1){A=A.slice(0,N)+(A[N-1]=="\n"?" ":" ")+A.slice(N+1)}y.gF(A.slice(0,255));
y.add.lnsr="rend";y.add.TySh=dU.Y7(0,0);y.add.TySh.Iv=q;y.add.TySh.i=h;var s=y.add.TySh.HW;dU.U3(s,0,A);
var V=dU.zl(s,0,A.length);V.VA.FontSize=10;dU.G4(s,0,A.length,V);var g8=[];if(A.length!=0){var n=i(B,0),cQ=i(L,0),hk=1;
for(var F=1;F<A.length;F++){var a=i(B,F),eG=i(L,F);if(a!=n||eG!=cQ){g8.push(hk);hk=0}n=a;cQ=eG;hk++}if(hk!=0)g8.push(hk)}for(var F=0;
F<g8.length;F++){var eN=i(L,ie),gr=g8[F],ek=Math.min(ie+gr,A.length-1),jK=eN[2],iE=eN[1].styProps;if(iE==null)iE={};
var e9=i(B,ie),dm=e9[1].styProps,kD=e9[2],gJ={};for(var dR in M)gJ[dR]=M[dR];for(var dR in dm)gJ[dR]=dm[dR];
for(var dR in kD)gJ[dR]=kD[dR];for(var dR in iE)gJ[dR]=iE[dR];for(var dR in jK)gJ[dR]=jK[dR];var V=dU.zl(s,ie,ek),fO=["FontSize","FontCaps","Underline","Strikethrough","FontBaseline"],ko=fO.concat(["StartIndent","EndIndent","FirstLineIndent","SpaceBefore","SpaceAfter"]);
for(var d8=0;d8<ko.length;d8++){var dR=ko[d8],fj=d8<fO.length?V.VA:V.SW;if(gJ[dR]!=null)fj[dR]=gJ[dR]}if(gJ.fillColor){var ja=z(gJ.fillColor);
V.VA.FillColor={Type:1,Values:[1].concat(ja)}}if(gJ.font){var eD=gJ.font.name[5],d3=gJ.fontStyle;if(d3==null)d3="Regular";
for(var jE=0;jE<eD.length;jE++)if(eD[jE][0]==d3)dU.gD(V,eD[jE][1])}if(gJ.leading!=null&&gJ.leading>1){V.VA.Leading=gJ.leading;
V.VA.AutoLeading=!1}if(gJ.align!=null)V.SW.Justification=[0,2,1,6,3,5,4,0,0,0][gJ.align];dU.G4(s,ie,ek,V);
ie+=gr}dU.DY(s,1);dU.ei(s,[0,0,Math.round(q.m),Math.round(q.e)])}else if(K._type.startsWith("Path")&&(f==null||f.length==0)&&a){e(y,g,_,a,D)}else{var cR=K["prop-14526"];
if(f==null&&cR){var ex=T[w.K3(cR,20)];f=[ex]}if(f){if(a&&a.length!=0){y.add.vmsk=k(a,D,_);y.jz();y.kT(g)}y.gF("group");
y.H2=24;y.add.lsct=hA.DJ;g.B.push(g.x6());for(var F=0;F<f.length;F++)b(f[F],g,D,T)}}if(_){var er=_.objectBlendingMode,cE=_.objectOpacity,a7=_.fillTint,hl=!1;
if(er)y.s3=U(er[0]);if(cE)y.opacity=Math.round(y.opacity*cE[0]/100);if(!Z&&a7)y.opacity=Math.round(y.opacity*a7[0]/100);
var dl=JSON.parse(aF.default);for(var F=0;F<aF.order.length;F++)dl[aF.mh[F]]={t:"VlLs",v:[]};var f4="dropShadow innerShadow satin bevel iglow oglow".split(" "),em="DrSh IrSh ChFX ebbl IrGl OrGl".split(" ");
for(var F=0;F<f4.length;F++){var e$=f4[F];if(_[e$]&&_[e$][0]){var iP=_[e$],k7=135,at=10;hl=!0;var b2=JSON.parse(aF.lF[aF.order.indexOf(em[F])]);
dl[aF.mh[aF.order.indexOf(em[F])]].v.push({t:"Objc",v:b2});if(_[e$+"Color"])b2.Clr.v=j(_[e$+"Color"][0]);
else if(f4[F]=="iglow"||f4[F]=="oglow")b2.Clr.v=d.I.lV({Z:255,r:255,J:255});if(_[e$+"ColorH"])b2.hglC.v=j(_[e$+"ColorH"][0]);
if(_[e$+"ColorS"])b2.sdwC.v=j(_[e$+"ColorS"][0]);if(_[e$+"BMode"])b2.Md.v.BlnM=cq.DU(U(_[e$+"BMode"][0]));
if(_[e$+"BModeH"])b2.hglM.v.BlnM=cq.DU(U(_[e$+"BModeH"][0]));if(_[e$+"BModeS"])b2.sdwM.v.BlnM=cq.DU(U(_[e$+"BModeS"][0]));
if(_[e$+"Opacity"])b2.Opct.v.val=_[e$+"Opacity"][0];if(_[e$+"OpacityH"])b2.hglO.v.val=_[e$+"OpacityH"][0];
if(_[e$+"OpacityS"])b2.sdwO.v.val=_[e$+"OpacityS"][0];if(_[e$+"Size"])b2.blur.v.val=_[e$+"Size"][0];
if(_[e$+"Angle"])k7=_[e$+"Angle"][0];if(_[e$+"Dist"])at=_[e$+"Dist"][0];if(_[e$+"DX"]){var ju=_[e$+"DX"][0],jL=_[e$+"DY"][0];
at=Math.round(Math.sqrt(ju*ju+jL*jL));k7=Math.round(Math.atan2(jL,-ju)*180/Math.PI)}if(b2.lagl)b2.lagl.v.val=k7;
if(b2.Dstn)b2.Dstn.v.val=at;if(b2.uglg)b2.uglg.v=!1;if(_[e$+"Invert"])b2.Invr.v=_[e$+"Invert"][0];else if(f4[F]=="satin")b2.Invr.v=!1;
if(_[e$+"Alt"])b2.Lald.v.val=_[e$+"Alt"][0];if(_[e$+"Depth"])b2.srgR.v.val=_[e$+"Depth"][0];if(_[e$+"Choke"])b2.Ckmt.v.val=_[e$+"Choke"][0]}}if(hl)y.add.lmfx=dl}if(K.name)y.gF(K.name);
else if(_&&_.name)y.gF(_.name[0]);g.B.push(y)}function e(K,g,R,T,D){K.gF("path");K.H2|=16;K.add.vmsk=k(T,D,R);
var a=K.add.vstk=aF.XM.$H(!0),_=null;if(R){var I=R.strokeSwatch,f=R.fillSwatch,y=R.basicFeather,Z=R.basicFeatherWidth,v=R.strokeWeight;
a.strokeEnabled.v=I!=null;a.fillEnabled.v=f!=null;if(y)K.add.vmsk.bS=Z?Z[0]:9;if(I){a.strokeStyleLineWidth.v.val=v?v[0]:1;
_=j(I[0]);a.strokeStyleContent.v.Clr.v=_}if(f){_=j(f[0])}}if(_)K.add.SoCo={classID:"null",Clr:{t:"Objc",v:_}};
K.jz();K.kT(g)}function k(K,g,R){var T=new eM.hn,D=T.$;for(var a=0;a<K.length;a++){var _=K[a],I=_[0].length,f=_[1]==0,y=f?0:3;
D.push({type:y,length:I,Kp:0,YS:2,kO:0,QQ:0});for(var F=0;F<I;F++){var Z=_[0][F],v=Z[0],G=new bC(Z[1],Z[2]),q=new bC(Z[3],Z[4]),h=new bC(Z[5],Z[6]);
if(v==0||v==1)D.push({type:y+2,Hw:G,L:q,Im:h});else if(v==2)D.push({type:y+2,Hw:G,L:G,Im:G});else throw v}}d.o.Of(D,g);
return T}return Q}();var cF=function(x){function Q(U,i){var b=[];for(var F=0;F<9;F++){var e=w.q(U,i+F*4);
if(F%3==2)b.push((e>>>30)+(e&1073741823)/1073741823);else b.push((e>>>16)+(e&65535)/65535)}return b}function c(U,i,b,e){var k={},K=w.q,g=w._C;
while(i<b){var R=i,T=w.q(U,i);i+=4;if(T==0){T=w.q(U,i);i+=4}var D=w.mt(U,i,4);i+=4;if(T==0)throw"e";
if(T==1){T=w.ee(U,i);i+=8}var a=R+T,_="".padStart(e,"\t"),I={};if(D=="mvhd"){var f=U[i];if(f!=0)throw"e";
i+=4;I.aoG=K(U,i);i+=4;I.ajW=K(U,i);i+=4;I.cp=K(U,i);i+=4;I.duration=K(U,i);i+=4;I.a6k=K(U,i);i+=4;I.volume=g(U,i);
i+=2;i+=10;I.axK=Q(U,i);i+=4*9;I.aAe=[];for(var F=0;F<6;F++)I.aAe.push(K(U,i+F*4));i+=4*6;I.a80=K(U,i);
i+=4}else if(D=="tkhd"){var f=U[i];if(f!=0)throw"e";i+=4;I.aoG=K(U,i);i+=4;I.ajW=K(U,i);i+=4;I.ajH=K(U,i);
i+=4;i+=4;I.duration=K(U,i);i+=4;i+=8;I.a=g(U,i);i+=2;I.agz=g(U,i);i+=2;I.volume=g(U,i);i+=2;i+=2;I.axK=Q(U,i);
i+=4*9;I.ww=K(U,i)>>>16;i+=4;I.R0=K(U,i)>>>16;i+=4}else if(D=="mdhd"){I.H2=K(U,i);i+=4;I.aoG=K(U,i);
i+=4;I.ajW=K(U,i);i+=4;I.cp=K(U,i);i+=4;I.duration=K(U,i);i+=4;I.lang=g(U,i);i+=2;I.ja=g(U,i);i+=2}else if(D=="hdlr"){var y=K(U,i);
i+=4;if(y!=0)throw y;I.Iz=w.mt(U,i,4);i+=4;I.atG=w.mt(U,i,4);i+=4;I.atg=K(U,i);i+=4;I.H2=K(U,i);i+=4;
I.afq=K(U,i);i+=4;var Z=i;while(U[Z]!=0)Z++;I.name=w.mt(U,i,Z-i);i+=Z-i+1}else if(D=="stsd"){var y=K(U,i);
i+=4;if(y!=0)throw y;var v=K(U,i);i+=4;if(v!=1)throw v;var G=K(U,i);i+=4;I.R$=w.mt(U,i,4);i+=4;if(I.R$=="mett"){I.a7g=w.mt(U,i,a-i)}else{for(var F=0;
F<6;F++)if(U[i+F]!=0)throw"e";i+=6;I.aoM=g(U,i);i+=2;I.aDP=g(U,i);i+=2;I.aiY=g(U,i);i+=2;I.ajF=K(U,i);
i+=4;if("mp4v,avc1,encv,s263,vp09,hvc1,hev1,apcn,raw ".split(",").indexOf(I.R$)!=-1){I.afi=K(U,i);i+=4;
I.aCE=K(U,i);i+=4;I.aq_=[g(U,i),g(U,i+2)];i+=4;I.a1R=[K(U,i)/(1<<16),K(U,i+4)/(1<<16)];i+=8;var q=K(U,i);
i+=4;if(q!=0)throw"e";var h=g(U,i);i+=2;if(h!=1)throw"e";var r=U[i];i++;I.atf=w.mt(U,i,r);i+=31;I.ah9=g(U,i);
i+=2;var H=g(U,i);i+=2;if(H!=65535)throw"e";if(i!=a)I.adk=c(U,i,a,e+1)}else if("mp4a enca samr sawb ec-3 ac-3 lpcm".split(" ").indexOf(I.R$)!=-1){I.fG=g(U,i);
i+=2;I.af1=g(U,i);i+=2;var o=g(U,i);i+=2;if(o!=0&&o!=65534)throw o;var P=g(U,i);i+=2;if(P!=0)throw P;
I.ac5=K(U,i)/(1<<16);i+=4}else if(I.R$=="CTMD"){I.b=U.slice(i,a)}else if(I.R$=="tx3g"||I.R$=="text"||I.R$=="mebx"){}else if(I.R$=="tmcd"){}else if(I.R$=="CRAW"){}else throw I.R$}}else if(D=="stts"||D=="stsz"||D=="stco"||D=="stsc"||D=="ctts"){var y=K(U,i),O=0,C=0;
i+=4;if(y!=0)throw y;if(D=="stsz"){O=K(U,i);i+=4}var p=K(U,i)*(D=="stsc"?3:D=="stts"||D=="ctts"?2:1);
i+=4;I=[];for(var F=0;F<p;F++){if(O!=0)I.push(O);else{I.push(K(U,i));i+=4}}for(var F=0;F<p;F++)C+=I[F]}else if(D=="co64"){var y=K(U,i);
i+=4;if(y!=0)throw y;var p=K(U,i);i+=4;I=[];for(var F=0;F<p;F++){I.push(w.ee(U,i));i+=8}}else if(D=="moov"||D=="trak"||D=="mdia"||D=="minf"||D=="dinf"||D=="stbl"||D=="uuid"){if(D=="uuid")i+=16;
I=c(U,i,a,e+1)}else if(D=="CMT1"||D=="CMT2"||D=="CMT3"||D=="CMT4"){I=UTIF.decode(U.slice(i,a))}else{I.z=i;
I.L_=T}i=a;if(D=="trak"||D=="free"||D=="uuid"){if(k[D]==null)k[D]=[];k[D].push(I)}else{if(k[D]!=null)throw D;
k[D]=I}}return k}function $(U){var i=new Uint8Array(U);return c(i,0,i.length,0)}function z(U,i,b){var e=j(U,i),k=e.mdia.minf.stbl,K=k.stsc,g=0,R=0;
for(var F=0;F<K.length;F+=3){var T=(F+3<K.length?K[F+3]:1e4)-K[F],D=R+T*K[F+1];if(R<=b&&b<D){while(R+K[F+1]<=b){g++;
R+=K[F+1]}break}g+=T;R=D}var a=k.stco;if(a==null)a=k.co64;var _=a[g];while(R<b){_+=k.stsz[R];R++}return[_,k.stsz[b]]}function j(U,i){var b=U.moov.trak;
for(var F=0;F<b.length;F++)if(b[F].mdia.hdlr.atG==i)return b[F]}return{s5:$,asL:z,aeo:j}}(),X={};X.q_=function(x){return window.devicePixelRatio||1};
X.Ee=function(x,Q){return(Q.a5h=="touch"?12:8)*X.q_()/x.Q.W};X.Ur=function(x,Q,c){this.name=x;this.id=Q;
this.iZ=null;if(c!=null)this.Ga=c};X.Ur.prototype.To=function(x,Q,c,$,z){};X.Ur.prototype.enable=function(x,Q,c,$,z,j){var U=new jO(u.E.M,!0);
U.data={d:u.H.aK,Wu:"default"};Q.T(U)};X.Ur.prototype.disable=function(x,Q,c,$,z){};X.Ur.prototype.a79=function(x,Q,c,$,z){return!1};
X.Ur.prototype.Eu=function(x,Q,c,$,z){};X.Ur.prototype.Ys=function(x,Q,c,$,z){};X.Ur.prototype.CK=function(x,Q,c,$,z){};
X.Ur.prototype.km=function(x,Q,c,$,z,j){};X.Ur.prototype.x1=function(x,Q,c,$,z){};X.Ur.prototype.sM=function(x,Q,c,$){};
X.Ur.prototype.gb=function(x,Q,c,$){};X.Ur.prototype.Tz=function(x,Q){};X.Ur.prototype.pC=function(x,Q){};
X.Ur.prototype.Ce=function(x){return 0};X.Ur.prototype.np=function(x,Q,c,$,z){};X.Ur.prototype.Fy=function(x,Q){};
X.Ur.prototype.Da=function(x,Q){return!1};X.Ur.prototype.R4=function(x,Q){return!1};X.Ur.prototype.sD=function(){return!1};
X.Ur.prototype.l1=function(x,Q){return!0};X.Ur.prototype.Jh=function(){return null};X.Ur.prototype.sr=function(x,Q,c){};
X.Ur.prototype.ais=function(){return!1};X.Ur.prototype.Lg=function(x,Q,c,$){};X.Ur.prototype.track=function(x){var Q=new jO(u.E.G2,!0);
Q.data=x;x.jT=!0;this.iZ.T(Q)};X.Ur.fZ=function(x,Q,c,$){var z=10*X.q_()*(x.a5h=="touch"?2:1),j=x.x+z,U=x.y-z,i=d.fR.Z0(Q.m,c.cQ,$,c.m,!0),b=d.fR.Z0(Q.e,c.cQ,$,c.e,!0);
while(i.length<b.length)i=" "+i;while(i.length>b.length)b=" "+b;X.Ur.hz(j,U,[ah.get([12,41]).charAt(0)+": "+i,ah.get([12,42]).charAt(0)+": "+b],c)};
X.Ur.hz=function(x,Q,c,$){function z(e,D,a,_,I,f){e.beginPath();e.moveTo(D,a+f);e.arcTo(D,a+I,D+f,a+I,f);
e.arcTo(D+_,a+I,D+_,a+I-f,f);e.arcTo(D+_,a,D+_-f,a,f);e.arcTo(D,a,D,a+f,f)}var j=X.q_(),U=Math.round,i=U(11*j),b=X.Ur.aqH,k=0;
if(b==null)b=X.Ur.aqH=document.createElement("canvas");var e=b.getContext("2d");e.font=i+"px monospace";
for(var F=0;F<c.length;F++)k=Math.max(k,e.measureText(c[F]).width);var K=U(k+12*j),g=U((c.length*14+5)*j),R=new gh(x,Q-g,K,g);
if(b.width!=K||b.height!=g){b.width=K;b.height=g;e.font=i+"px monospace"}e.clearRect(0,0,K,g);e.fillStyle="rgba(0,0,3,0.8)";
z(e,0,0,K,g,U(4*j));e.fill();e.fillStyle="rgba(255,255,255,1)";for(var F=0;F<c.length;F++)e.fillText(c[F],U(6*j),U((F+1)*13*j));
var T=[e.getImageData(0,0,K,g).data,R.clone()];if($)$.N.It=[T];return T};X.Ur.aqH=null;X.kU="0";X.kJ="1";
X.ams="2";X.aDZ="3";X.k9="5";X.a0a="6";X.af2="7";X.Lr="8";X.K2="9";X.LZ="10";X.IY="11";X.bb="12";X.ic="13";
X.it="14";X.a2J="15";X.YD="16";X.nJ="18";X.$r="19";X.a69="90";X.uX="20";X.jD="21";X.KC="22";X.gN="23";
X.fx="24";X.fa="25";X.bp="27";X.tH="31";X.NB="32";X.aC5="33";X.o8="34";X.axh="35";X.W7="36";X.EJ="37";
X.Y6="38";X.BP="39";X.He="40";X.vk="41";X.tD="42";X.cZ="43";X.akJ="44";X.a4F="45";X.ah1="46";X.ao$="72";
X.gr="47";X.oX="48";X.T3="51";X.YW="52";X.J7="54";X.db="55";X.Lw="56";X.y4="57";X.NI="58";X.Oi="59";
X.aw="60";X.QT="61";X.TC="70";X.aiR="71";X.va="100";X.Um="101";X.Ks="102";X.WL="103";X.V1="120";X.FQ="230";
X.ar0="231";X.RZ="232";X.Mf="233";X.vR="234";X.iT="235";X.yd="236";X.hH={};X.hH[X.gN]="tools/brush";
X.hH[X.fx]="tools/pencil";X.hH[X.tH]="tools/eraser";X.GR={PcTl:X.fx,PbTl:X.gN,moveTool:X.kU,cloneStampTool:X.bp,typeCreateOrEditTool:X.gr,artboardTool:X.TC,marqueeRectTool:X.kJ,typeVerticalCreateOrEditTool:X.oX,perspectiveCropTool:X.IY,marqueeEllipTool:X.ams,eyedropperTool:X.it,eraserTool:X.tH,pathComponentSelectTool:X.T3,lassoTool:X.k9,backgroundEraserTool:X.NB,directSelectTool:X.YW,polySelTool:X.a0a,rectangleTool:X.J7,magneticLassoTool:X.af2,gradientTool:X.o8,quickSelectTool:X.Lr,bucketTool:X.axh,ellipseTool:X.db,magicWandTool:X.K2,blurTool:X.W7,polygonTool:X.Lw,cropTool:X.LZ,sharpenTool:X.EJ,lineTool:X.y4,sliceTool:X.bb,smudgeTool:X.Y6,customShapeTool:X.NI,sliceSelectTool:X.ic,dodgeTool:X.BP,spotHealingBrushTool:X.nJ,burnInTool:X.He,saturationTool:X.vk,penTool:X.tD,redEyeTool:X.KC,freeformPenTool:X.cZ,rulerTool:X.YD,paintbrushTool:X.gN,handTool:X.Oi,pencilTool:X.fx,zoomTool:X.QT,objectSelectTool:X.aDZ,healingBrushTool:X.$r,patchTool:X.uX,contentAwareMoveTool:X.jD,colorReplacementBrushTool:X.fa,curvaturePenTool:X.akJ,rotareViewTool:X.aw};
X.x7=function(x,Q,c){X.Ur.call(this,x,Q,c);this.h8={brush:x?d1.Bk():null,bmode:"norm",opacity:1,flow:1,smth:0,samp:0,emode:0,wconf:[40,!0,!0],sall:!1,algnd:!1,sfrom:0,alt:[!1],expo:.5,rng:1,strn:.5,pdetail:!0,smode:1,qsmode:0,setop:0,patch:0};
this.n$=null;this.Vr=null;this.pJ=null;this.W_=null;this.Xy=null;this.sO=null;this.EK=null;this.ku=null;
this.h1=null;this.er=null;this.di=null;this.br=null;this.Cj=null;this.d8=1;this.Vu=!1;this.VJ=null;this.caller=null};
X.x7.prototype=new X.Ur;X.x7.prototype.R4=function(x,Q){return x.TZ&&Q.S(fM.FT)};X.x7.prototype.Ys=function(x,Q,c,$,z){if($.S(fM.Al)){this.sO=new bC(z.x,z.y);
var j=this.h8.brush.Brsh.v,U=j.Dmtr.v.val,i=j.Hrdn!=null?j.Hrdn.v.val:-1;this.EK=[U,i,!0,JSON.parse(JSON.stringify(this.h8.brush)),z];
this.Rv(c)}};X.x7.prototype.jB=function(x,Q,c){var $=this.EK,z=x.Q.W,j=c.x-$[4].x,U=c.y-$[4].y,i=$[0],b=$[1],e=Math.abs(j)>Math.abs(U);
if(e&&$[2]){var k=Math.round(2*j/z);i+=k;c.x-=j-.5*k*z}if(!e&&!$[2]&&b!=-1){var k=Math.round(.25*U);
b+=k;c.y-=U-4*k}i=Math.max(1,i);b=$[1]==-1?-1:Math.max(0,Math.min(100,b));var K=$[3];K.Brsh.v.Dmtr.v.val=i;
if(b!=-1)K.Brsh.v.Hrdn.v.val=b;this.EK=[i,b,e,K,c];var g=cG.bn(K,Q.bX.Dq,z),R=g[1];R.x=Math.round(this.sO.x-R.m/2);
R.y=Math.round(this.sO.y-R.e/2);x.N.BX=[g];var T=x.Q.$X(this.sO.x,this.sO.y);x.N.j0={BZ:[],T0:[T.x-i/2,T.y,T.x+i/2,T.y]};
if(b!=-1)x.N.j0.T0.push(T.x+50/z,T.y-b/2,T.x+50/z,T.y+b/2);x.vu=!0};X.x7.prototype.x1=function(x,Q,c,$,z){if(this.id==X.uX||this.id==X.jD)return;
if(this.sO){this.sO=null;this.mY(JSON.parse(JSON.stringify(this.EK[3])));x.N.BX=[];x.N.j0=null;x.vu=!0;
return}var j=new jO(u.E.M,!0);j.data={d:u.H.gR,f:this.id,ahX:"showBrushOpts",JC:new bC(z.TN+4,z.yv)};
Q.T(j)};X.x7.prototype.mY=function(x){var Q=new jO(u.E.M,!0);Q.data={d:u.H.hW,hF:ke.TV,I6:x};this.caller.T(Q)};
X.x7.YJ=function(x,Q,c,$,z,j){if(x==null)x="FrgC";if(Q==null)Q="norm";if(c==null)c=1;if(z==null)z=!1;
var U={classID:"Fl",Usng:{t:"enum",v:{FlCn:x}},Opct:{t:"UntF",v:{type:"#Prc",val:Math.round(c*100)}},PrsT:{t:"bool",v:z},Md:{t:"enum",v:{BlnM:cq.DU(Q)}}};
if(x=="Clr")U.Clr={t:"Objc",v:$};if(x=="contentAware")U.contentAwareColorAdaptationFill={t:"bool",v:!0};
if(x=="Ptrn")U.Ptrn={t:"Objc",v:j};return{q4:"fill",dx:U}};X.x7.prototype.To=function(x,Q,c,$,z){this.iZ=Q;
var j=c.oW.length;if(j==0&&!c.hS())return;var U=j!=0?-1-c.oW[0]:c.g[0],i=c.B[U];if(x.d=="fromAction"){var b=x.fe,e=b.dx;
if(e&&e.null&&e.null.v[0]&&e.null.v[0].v.classID=="Path"){var k=c.zo(),K=k[0],g=k[1],R=K[g.length==0?0:g[0]].add.vmsk;
if(b.q4=="fill"){var T=R.Rz(),D=z.Gj,a=this.h8,_=D>>16&255,I=D>>8&255,f=D>>0&255;this.As(c,i,T,_,I,f,Math.round(a.opacity*255),a.bmode,"Fill Path")}else{var y=e&&e.Prs&&e.Prs.v,Z=JSON.stringify(this.h8.brush);
if(y)d1.ahN(this.h8.brush,[!1,!0]);for(var v=0;v<1e3;v++){var G=d.o.dQ(R.$,v,!0);if(G==-1){this.km(c,Q,z,$,null);
break}var q=R.$[G],h=R.$.slice(G,G+1+q.length),r=d.A.CJ(h,2).j,H=r.slice(0,8);for(var o=8;o<r.length;
o+=6)H.push(r[o-2],r[o-1],r[o],r[o+1],r[o+2],r[o+3],r[o+4],r[o+5]);var P={};P.Points=H;P.TextOnPathTRange=R.Sr.slice(0);
var P=fQ.kh(P,2,q.type==3),O=P[0],p=c.Q.wu(O[0],O[1]);if(y)p.Hc=0;if(v==0)this.Eu(c,Q,z,$,p);else this.Vr.moveTo(O[0],O[1]);
var C=O.length,W=q.type==0?C+2:C;for(var F=2;F<W;F+=2){p=c.Q.wu(O[F%C],O[(F+1)%C]);p.TZ=!0;if(y){var J=F/W;
p.Hc=2*Math.min(J,1-J)}this.CK(c,Q,z,$,p,this.h8.flow)}this.Vr.finish();this.X4(c)}if(y)this.h8.brush=JSON.parse(Z)}}else if(b.q4=="fill"){var t=e.PrsT?e.PrsT.v:!1,Y=i?i.add.lspf:0;
if(t&&i){i.add.lspf=Y==null?1:Y|1}var l=(e.Opct?e.Opct.v.val:100)/100,m=e.Md?cq.Rg(e.Md.v.BlnM):"norm";
l=Math.round(255*l);var B=e.Usng.v.FlCn;if(B=="contentAware"||B=="aiHeal"){if(c.u==null){alert("Select an area to heal first.");
return}if(!c.hS())return;var L=c.u;if(B=="aiHeal"&&!bc.g3(c))return;this.Gd(c);this.MP(c,0);if(B=="contentAware"){var A=d.R(L.rect.P()*4);
d.Dm(L.channel,A,3);this.S1(c,"sheal",A,L.rect,L.rect);this.c(c,L.rect);this.finish(c,L.rect)}else{this.D9=c;
bc.alE(!0,null,e.prmt?e.prmt.v:"empty background",c,this.a6l.bind(this),e.hF);var S=new jO(u.E.M,!0);
S.data={d:u.H.Tb,xx:"Processing ..."};Q.T(S);this.caller=Q}}else if(B=="Ptrn"){var M=z.Yf,N=c.u?c.u.rect.clone():new gh(0,0,c.m,c.e),s=d.R(N.P()*4);
en.nz(e,s,N,M,new bC(0,0));for(var F=0;F<s.length;F+=4)s[F+3]=l;this.bm(c,i,c.u,s,m,[6,48,0,2])}else{var D;
if(B=="FrgC")D=z.Gj;else if(B=="BckC")D=z.QI;else if(B=="Blck")D=0;else if(B=="Wht")D=16777215;else if(B=="Gry")D=8421504;
else if(B=="Clr"){var V=d.I.Du(e.Clr.v);D=V.Z<<16|V.r<<8|V.J}var _=D>>16&255,I=D>>8&255,f=D>>0&255;this.As(c,i,c.u,_,I,f,l,m,[2,3])}if(t&&i){i.add.lspf=Y==null?0:Y}}else if(b.q4=="delete"){var g8=U<0?1:i.kk,L=c.u,eG;
if(L==null)return;var n=U<0?c.fG[-U-1]:g8<=0?null:g8==1?i.Rz():i.U5(c).F,N=g8<=0?i.rect:n.rect,cQ=g8<=0?L.rect.y_(N):L.rect.clone();
if(cQ._6())return;var hk=cQ.P();if(g8<=0){eG=d.R(hk*4);d.WK(i.buffer,i.rect,eG,cQ)}else{eG=d.R(hk);n.extend(cQ);
d.L2(n.channel,n.rect,eG,cQ)}if(0<=U&&i.jc(c,L)){if(g8<=0){d.h4(eG,0);d.WK(i.$Q.LB,i.$Q._U,eG,cQ)}else{eG.fill(255);
d.L2(i.$Q.LB,i.$Q._U,eG,cQ)}}else{if(g8<=0){var ie=d.R(eG.length>>2);d.GS(eG,ie,3);d.l.oM(d.rB(L.rect.P()),L.rect,ie,cQ,L.channel,cQ,1);
d.Dm(ie,eG,3)}else{var eN=d.R(L.rect.P()),_=z.QI>>>16&255,I=z.QI>>8&255,f=z.QI>>0&255;eN.fill(Math.round(d.I5(_,I,f)));
d.l.oM(eN,L.rect,eG,cQ,L.channel,cQ,1)}}this.Or(c,!0,[2,2],U,g8,cQ,eG)}}if(x.d=="stroke"){var gr=x.apF,L=c.u;
if(L==null){L={rect:i.rect.clone(),channel:d.R(i.rect.P())};d.GS(i.buffer,L.channel,3)}var ek=en.dn(gr),jK=X.U_.arU(L,Math.ceil(ek[0]),Math.ceil(ek[1])),D=d.I.Du(gr.Clr.v),_=Math.round(D.Z),I=Math.round(D.r),f=Math.round(D.J);
this.As(c,i,jK,_,I,f,Math.round(255*gr.Opct.v.val/100),cq.Rg(gr.Md.v.BlnM),[14,9])}if(x.d=="fillBMP"){this.bm(c,i,c.u,x.Gq,x.iu,x.LX)}if(x.d=="draw"){var iE=x.sn,e9=iE.rect;
this.Gd(c);var dm=c.B[c.g[0]];if(x.awV&&dm&&dm.kk<=0&&c.oW.length==0){e9=X.de.aow(iE,c);dm.buffer=iE.buffer.slice(0);
dm.rect=e9.clone()}else{var kD=this.h8.bmode,gJ=this.h8.opacity;this.h8.bmode="norm";this.h8.opacity=1;
this.S1(c,"draw",iE.buffer,e9,e9.y_(new gh(0,0,c.m,c.e)));this.h8.bmode=kD;this.h8.opacity=gJ}this.c(c,e9);
c.tP=!0;this.finish(c,e9,x.LX,x.awV)}};X.x7.prototype.a6l=function(x){var Q=x.target.response,c=new Uint8Array(Q);
if(this.aku){this.aku=!1;Q=ar.KG(w.IV(c))}else if(c[0]==123){var $=JSON.parse(w.IV(c));console.log($);
var z=new XMLHttpRequest;z.responseType="arraybuffer";z.open("GET",$.output[0],!0);z.onload=this.a6l.bind(this);
this.aku=!0;z.send();return}var j=UPNG.decode(Q),U=new Uint8Array(UPNG.toRGBA8(j)[0]),i=bc.IG(this.D9),b=this.D9;
this.D9=null;var e=new jO(u.E.M,!0);e.data={d:u.H.MM,xx:"Processing ..."};this.caller.T(e);this.S1(b,"draw",U,i,i);
this.c(b,i);this.finish(b,i);bc.Xj("remove")};X.x7.prototype.As=function(x,Q,c,$,z,j,U,i,b){var e=c==null?new gh(0,0,x.m,x.e):c.rect,k=U<<24|j<<16|z<<8|$<<0,K=d.R(e.P()*4);
d.h4(K,k);this.bm(x,Q,c,K,i,b)};X.x7.prototype.bm=function(x,Q,c,$,z,j){var U=x.oW.length!=0?-1-x.oW[0]:x.g[0],i=U<0?1:Q.kk,b=U<0?x.fG[-1-U]:i<=0?null:i==1?Q.Rz():Q.U5(x).F,e=i<=0?Q.rect:b.rect,k=c==null?new gh(0,0,x.m,x.e):c.rect,K=c==null?d.JB(x.m*x.e):c.channel;
if(c!=null)d.nb(K,$);var g=k.P(),R=d.R(g*4);if(i<=0)d.WK(Q.buffer,Q.rect,R,k);else{b.extend(k);R.fill(255);
d.ZM(b._P(k),R)}if(0<=U&&c&&Q.jc(x,c)&&i<=0){var T=Q.$Q.YT,D=Q.$Q.YT.slice(0);if(i<=0)d.SO($,D);else d.SO(fullc,D);
var a=new dg([2,3],this);a.data={d:"drawtemp",a:x.g[0],y2:i,ajz:T,asF:D};x.kp(a);this.Tz(a.data,x)}else{if(i<=0){var _;
if(Q.e6(0)){_=d.R(k.P());d.GS(R,_,3)}d.l.UY(z,$,k,R,k,k,1);if(Q.e6(0))d.Dm(_,R,3)}else{d.l.UY(z,$,k,R,k,k,1);
var I=d.R(g);d._8(R,I);R=I}this.Or(x,!0,j,U,i,k,R)}};X.x7.prototype.Da=function(x){if(fM.bF.indexOf(x)!=-1)return!0;
return!1};X.x7.prototype.sM=function(x,Q,c,$){var z=this.h8.brush,j=$.S(fM.Al),U=j!=this.Vu,i=X.x7.cI(z,$);
if(i!=null)this.mY(i);if(!$.S(fM.qP)&&$.Ch()!=-1){var b=fM.Q9(Math.round(this.h8.opacity*100),$.Ch())/100;
this.iq({opacity:b},Q)}if(this.id==X.Lr&&U&&x!=null){var e=this.h8.qsmode;if(e==2)e=x.u==null?0:1;else e=2;
this.iq({qsmode:e},Q)}this.Vu=j;if(U){if(x)this.d8=x.Q.W;this.Rv(c,$)}};X.x7.cI=function(x,Q){var c=x.Brsh.v.Dmtr.v.val,$=x.Brsh.v.Hrdn!=null?x.Brsh.v.Hrdn.v.val:-1,z=c,j=$,U=Q.S(fM.FT);
if(Q.S(fM.$D)){if(U)$=25*Math.floor(($-1)/25);else{if(c<=10)c--;else if(c<=50)c=5*Math.floor((c-1)/5);
else if(c<=100)c=10*Math.floor((c-1)/10);else if(c<=200)c=25*Math.floor((c-1)/25);else if(c<=400)c=50*Math.floor((c-1)/50);
else c=100*Math.floor((c-1)/100)}}if(Q.S(fM.Ax)){if(U)$=25*Math.ceil(($+1)/25);else{if(c<10)c++;else if(c<50)c=5*Math.ceil((c+1)/5);
else if(c<100)c=10*Math.ceil((c+1)/10);else if(c<200)c=25*Math.ceil((c+1)/25);else if(c<400)c=50*Math.ceil((c+1)/50);
else c=100*Math.ceil((c+1)/100)}}c=Math.max(1,c);$=Math.max(0,Math.min(100,$));if(j==-1)$=-1;if(c!=z||$!=j){var i=JSON.parse(JSON.stringify(x));
i.Brsh.v.Dmtr.v.val=c;if(j!=-1)i.Brsh.v.Hrdn.v.val=$;return i}return null};X.x7.prototype.Rv=function(x,Q,c,$){if(x.bX.list.length==0)return;
var z=this.id,j;if((z==X.bp||z==X.$r||z==X.gN||z==X.fx)&&(Q!=null&&Q.S(fM.Al)||this.h8.alt[0]))j="crosshair";
else{var U=this.d8,i=this.h8.brush;if((z==X.bp||z==X.$r)&&c&&this.br&&this.br.length==this.di.P()*4){var b=c.Q.$X($.x,$.y),e=this.awi(b),k=this.br,K=this.di,g=new gh(K.x+e.x,K.y+e.y,K.m,K.e),R=cG.bn(i,x.bX.Dq,U),T=R[0],D=R[1],a=Math.ceil(D.m/U),_=new gh(Math.round(b.x-a/2),Math.round(b.y-a/2),a,a),I=d.R(_.P()*4),f,y;
d.WK(k,g,I,_);if(U==1){f=I;y=_}else{var Z=new bI(U,0,0,U,0,0),v=X.Y.rN([I,_],Z,!0);y=D.clone();y.x=v.rect.x;
y.y=v.rect.y;if(y.HM(v.rect))f=v.buffer;else{f=d.R(y.P()*4);d.WK(v.buffer,v.rect,f,y)}}var G=this.h8.opacity/255;
for(var F=0;F<f.length;F+=4)f[F+3]=G*(T[F+3]*f[F+3]);cG.a3M(new Uint32Array(f.buffer),y,4278190080,4294967295);
j={QK:f,W4:y,pt:new bC(y.m/2,y.e/2)}}else j=cG.$a(i,x.bX.Dq,U,z==X.fa||z==X.NB)}var q=new jO(u.E.M,!0);
q.data={d:u.H.aK,Wu:j};if(this.caller)this.caller.T(q)};X.x7.prototype.enable=function(x,Q,c,$){this.n$=c;
this.caller=Q;this.mY(JSON.parse(JSON.stringify(this.h8.brush)));if(x&&x.Q.W!=0)this.d8=x.Q.W;this.Rv(c,$)};
X.x7.prototype.Fy=function(x,Q){if(Q==ke.TV){this.h8.brush=x.bX.eT;this.Rv(x)}};X.x7.prototype.np=function(x,Q,c,$,z){for(var j in x)this.h8[j]=x[j];
if(this.h8.alt[0])this.Rv(z,$,c)};X.x7.prototype.a7f=function(x){var Q=x.oW.length!=0?-1-x.oW[0]:x.g[0],c=x.B[Q],$=Q<0?1:c.kk,z=Q<0?x.fG[-Q-1]:$<=0?null:$==1?c.Rz():c.U5(x).F,j=z?z.channel:c.buffer,U=(z?z.rect:c.rect).clone();
return[c,$,z,j,U]};X.x7.prototype.Gd=function(x,Q){this.Cj=x.u==null?null:{rect:x.u.rect.clone(),channel:x.u.channel.slice(0)};
var c=this.er,$=this.a7f(x),z=$[0],j=$[1],U=$[2];this.er=$[3];this.h1=$[4];var i=new gh(0,0,x.m,x.e),b=i.iO(this.h1);
if((this.fT()&&j<=0||b.HM(this.h1))&&Q!=!0){if(c&&c.length==this.er.length){c.set(this.er);this.er=c}else this.er=this.er.slice(0)}else{if(U)U.extend(b);
else z.extend(b)}};X.x7.prototype.MP=function(x,Q){var c=this.a7f(x),$=c[1],z=c[3],j=c[4],U=[z,j],i=Q!=null?Q:this.h8.sfrom;
if($<=0&&i!=0){U[1]=new gh(0,0,x.m,x.e);U[0]=x.VY(i==1&&x.g[0]!=x.B.length-1?x.g[0]:null).slice(0)}this.di=U[1].clone();
this.br=U[0].slice(0)};X.x7.prototype.NU=function(x,Q,c,$,z,j){if(z.TZ&&$.S(fM.Al)&&this.sO==null){if(j)this.fM=c.Gj;
var U=new jO(u.E.v,!0);U.f=X.it;U.data={d:"pickhere",abA:z};Q.T(U);var i=X.vt.ajh(x,!1,!0,z,null,c.Gj,this.fM,1),U=new jO(u.E.M,!0);
U.data={d:u.H.aK,Wu:i};Q.T(U);return!0}return!1};X.x7.prototype.nB=function(x,Q,c,$,z,j){if(this.id!=X.Lr&&!x.hS(this.caller)){this.Vr=null;
return}if(this.id!=X.Lr&&this.Vr)return;this.Gd(x);var U=new gh(0,0,x.m,x.e),i=null;if(j!=null){var b=x.oW.length!=0?-1-x.oW[0]:x.g[0],e=x.B[b],k=b<0?x.fG[-b-1]:e.kk<=0?null:e.kk==1?e.Rz():e.U5(x).F;
i=d.R(U.P()*4);if(k)X.x7.oO(this.er,this.h1,k.color,i,U);else d.WK(this.er,this.h1,i,U)}var K=this.h8;
if(this.Vr&&this.id==X.Lr&&K.qsmode!=0&&x.u!=null){}else{var g=Q.Gj,R=Q.QI;if(this.VJ=="erase"){var T=g;
g=R;R=T}var D=this.id==X.Lr?this.h1:U;this.Vr=new cG(K.brush,Q.bX.Dq,Q.bX.Rk,{j_:z,PN:j,amb:K.smth*50/x.Q.W,CM:this.id==X.fx||K.emode==1,d6:x.d6},g,R,D,i)}if(this.id==X.Lr){this.Vr.afX(K.brush,K.qsmode==2?0:16777215)}var a=x.Q.$X($.x,$.y);
if(c.S(fM.FT)&&this.pJ){var _=this.pJ;this.Vr.moveTo(_.x,_.y,$.Hc);this.Vr.lineTo(.001*_.x+.999*a.x,.001*_.y+.999*a.y,$.Hc);
this.Vr.lineTo(a.x,a.y,$.Hc)}else this.Vr.moveTo(a.x,a.y,$.Hc);this.pJ=a;this.W_=a.clone();this.Xy=new jP(a,x.Q.A6)};
X.x7.prototype.iB=function(x,Q,c){if(x&&x.Q.W!=0&&x.Q.W!=this.d8){this.d8=x.Q.W;this.Rv(c)}};X.x7.prototype.QG=function(x,Q,c,$){if(this.Vr==null)return;
var z=x.B[x.g[0]],j=x.Q.$X($.x,$.y),U=this.Xy.PW(j,c);if(U.HM(this.pJ))return 1;this.Vr.lineTo(U.x,U.y,$.Hc);
this.pJ=U;if(this.id==X.bp||this.id==X.$r){var i=this.hc(),b=11;i=x.Q.wu(j.x-i.x,j.y-i.y);var e=b>>>1,k=new gh(Math.round(i.x)-e,Math.round(i.y)-e,b,b),K=d.R(k.P()*4);
d.h4(16777215);for(var F=0;F<b;F++)K[(F*b+e)*4+3]=K[(b*e+F)*4+3]=255;x.N.It=[[K,k]];x.vu=!0}};X.x7.prototype.gb=function(x,Q,c,$){if(c.Oj!=this.id)return;
if(this.id!=X.Lr||x==null)return;if(x.u==null||x.g[0]!=this.aqc){this.aqc=x.g[0];this.iq({qsmode:0},Q)}};
X.x7.prototype.c=function(x,Q){if(x.oW.length!=0){x.vu=!0;return}var c=x.B[x.g[0]];if(Q==null){Q=this.Vr.BB();
if(this.fT()&&c.kk<=0)Q=Q.y_(this.h1)}var $=c.kk;if($==1||$==3){var z=Math.round(($==1?c.Rz():c.U5(x).F).bS*2.4);
Q=Q.clone();Q.ss(z,z)}if(Q._6())return;if($<=0){c.c(Q)}if($==1){c.Rz().ha=!0;c.kT(x,Q)}if($==3){c.c(Q)}x.c(x.root.XW(Q,x,x.g[0],!0))};
X.x7.prototype.km=function(x,Q,c,$,z){if(this.Vr==null)return;this.Vr.finish();if(this.id!=X.nJ&&this.id!=X.$r&&this.id!=X.Lr)this.X4(x);
if(this.id==X.bp||this.id==X.$r){x.N.It=[];x.vu=!0}if(this.id==X.Lr){var j=x.u;x.u=this.Cj;var U=new jO(u.E.v,!0);
U.data={d:"setsel",LX:this.name,u:j};U.f=X.kJ;Q.T(U);if(this.h8.qsmode==0)this.iq({qsmode:1},Q)}else{this.finish(x,this.Vr.vJ());
this.Vr=null;this.ku=null}this.dir=0};X.x7.prototype.iq=function(x,Q){for(var c in x)this.h8[c]=x[c];
var $=new jO(u.E.M,!0);$.data={d:u.H.gR,f:this.id,WC:x};Q.T($)};X.x7.prototype.fT=function(){var x=this.id;
return x==X.Lr||x==X.tH||x==X.BP||x==X.He||x==X.vk||x==X.KC};X.x7.prototype.finish=function(x,Q,c,$,z){var j=x.oW.length!=0?-1-x.oW[0]:x.g[0],U=x.B[j],i=j<0?1:U.kk,b=j<0?x.fG[-j-1]:i<=0?null:i==1?U.Rz():U.U5(x).F,e=b?b.rect:U.rect,g;
if(this.fT()||!e.HM(this.h1)){if(b==null){if(this.fT())U.NK();else{var k=Q.iO(this.h1),K=d.R(k.P()*4);
d.WK(U.buffer,U.rect,K,k);U.buffer=K;U.rect=k}}else b.NK();this.c(x,e)}if(i<=0){g=d.R(Q.P()*4);d.WK(this.er,this.h1,g,Q)}else{g=d.R(Q.P());
g.fill(b.color);d.L2(this.er,this.h1,g,Q)}this.Or(x,!1,c?c:this.name,j,i,Q,g,$,z)};X.x7.prototype.Or=function(x,Q,c,$,z,j,U,i,b){var e=U;
if(z>0){e=d.R(j.P()*4);X.x7.oO(U,j,0,e,j)}var k=new dg(c,this);k.data=[{a:$,y2:z,W4:j,aJ:e}];if(i)k.data.cu=[x.u,null];
if(b)k.data.cu=[this.Cj,x.u];x.kp(k);if(Q)this.Tz(k.data,x);else if(i)x.u=null;X.vD.axN(x,k.data)};X.x7.prototype.pC=function(x,Q){this.abQ(x,Q,!1)};
X.x7.prototype.Tz=function(x,Q){this.abQ(x,Q,!0)};X.x7.prototype.Ce=function(x){return X.vD.Ce(x)};X.x7.prototype.abQ=function(x,Q,c){if(x.d=="drawtemp"){var $=c?x.asF:x.ajz,z=Q.B[x.a];
z.$Q.YT=$;z.rI(Q,0,0,Q.u);z.c();Q.tP=!0}else{X.vD.uR(Q,x);if(x.cu){Q.u=x.cu[c?1:0];Q.ox=!0}}Q.c()};X.x7.prototype.X4=function(x){this.S1(x,this.VJ,this.Vr.GM(),this.Vr.Pe(),this.Vr.BB());
this.c(x)};X.x7.prototype.S1=function(x,Q,c,$,z){var j=this.h8,U=x.B[x.g[0]],i=x.oW.length!=0?x.fG[x.oW[0]]:U.kk<=0?null:U.kk==1?U.Rz():U.U5(x).F,b=d.R(z.P()*4),e,k=U.e6(0);
if(i==null){if(this.id==X.jD&&Q=="heal")d.WK(U.buffer,U.rect,b,z);else d.WK(this.er,this.h1,b,z);if(k){e=d.R(z.P());
d.GS(b,e,3)}}else{X.x7.oO(this.er,this.h1,i.color,b,z)}if(x.u&&Q!="qselect"){var K=z.y_(x.u.rect),g=d.R(K.P()*4);
if(Q=="copy"){var R=d.R(K.P());d.L2(x.u.channel,x.u.rect,R,K);d.WK(b,z,g,K);d.l.$A(c,$,g,K,R,K,0,K,1,!1)}else{d.WK(c,$,g,K);
d.Pp(x.u.channel,x.u.rect,g,K)}c=g;$=K}function T(_,iE){var dm=Math.max(iE.x,Math.min(iE.x+iE.m-1,_.x)),kD=Math.max(iE.y,Math.min(iE.y+iE.e-1,_.y));
return new bC(dm,kD)}if(Q=="idraw"||Q=="ierase"){if(this.ku==null)this.ku=d.R(this.h1.P());var D=this.h8.samp,a=this.n$.QI,_=T(this.pJ,z),I=D==0?_:this.W_,f=I.x,y=I.y,Z=X.TH.aG(this.er,this.h1,[I,new bC(f-2,y),new bC(f+2,y),new bC(f,y-2),new bC(f,y+2)]);
if(D==2)Z=[[a>>>16&255,a>>>8&255,a>>>0&255,255]];var v=X.TH.OA(b,z,_,Z,this.h8.wconf),G=d.R(z.P());d.L2(this.ku,this.h1,G,z);
d.NE.iO(v,G,G);d.L2(G,z,this.ku,this.h1);d.Pp(G,z,c,$);Q=Q.slice(1)}if(Q=="erase"&&(X.vD.ahG(x)!=16777215||i))Q="draw";
if(Q=="draw")d.l.UY(j.bmode,c,$,b,z,z,j.opacity);else if(Q=="erase"){var q=j.opacity;if(this.id==X.NB)q=1;
var h=d.R(z.P()*4);d.WK(c,$,h,z);if(i==null){var r=d.R(z.P());d.GS(h,r,3);d.AL(r,q);d.HQ(r);d.Pp(r,z,b,z)}else{d.h4(h,0,4278190080);
d.l.UY("norm",h,z,b,z,z,q)}}else if(Q=="clone"||Q=="heal"){var H=this.hc(),o=this.di.clone();o.offset(H.x,H.y);
var P=z.clone();P.ss(1,1);var O=d.R(P.P()*4),p=d.R(P.P());d.WK(c,$,O,P);d.GS(O,p,3);d.h4(O,0);if(i==null){d.WK(this.br,o,O,P);
var C=d.R(P.P());d.GS(O,C,3);d.Tt(C,p)}else X.x7.oO(this.br,o,i.color,O,P);if(Q=="clone"){d.Dm(p,O,3);
d.l.UY(j.bmode,O,P,b,z,z,j.opacity)}if(Q=="heal"){var W=p.slice(0);d.round(W,20);var J=d.R(P.P()*4);
if(i==null)d.WK(this.er,this.h1,J,P);else X.x7.oO(this.er,this.h1,i.color,J,P);d.l.$A(O,P,J,P,W,P,0,P,1,!1);
d.vj.rT(J,W,P);d.l.$A(J,P,b,z,p,P,0,z,1,!1)}}else if(Q=="dodge"||Q=="burn"){var O=d.R(z.P()*4),l=1,m=0,B=0,L=0;
d.WK(c,$,O,z);var t=z.P()*4,Y=X.x7.Xn;if(this.Vu){if(Q=="dodge")Q="burn";else Q="dodge"}var A=j.rng;
if(Q=="dodge"){m=[1-l/2,1,1+l][A];B=[1,1/(1+l),1][A];L=[l/2,0,0][A]}if(Q=="burn"){m=[1/(1-l/2),1,1-l/2][A];
B=[1,1+l,1][A];L=[-(l/2)/(1-l/2),0,0][A]}for(var F=0;F<t;F+=4){var S=O[F+3];b[F+0]=Y(b[F+0],m,B,L,S);
b[F+1]=Y(b[F+1],m,B,L,S);b[F+2]=Y(b[F+2],m,B,L,S)}}else if(Q=="sponge"||Q=="redeye"){var O=d.R(z.P()*4),p=d.R(z.P());
d.WK(c,$,O,z);d.GS(O,p,3);d.SO(b,O);var M=j.smode;if(this.Vu)M=1-M;var N=fK.$H("hue2");if(Q=="sponge")hu.SU(N,0,[0,[-50,46][M],[6,5][M]]);
else hu.SU(N,1,{XS:[265,305,25,55],qR:[0,-90,-70]});var s=k5.hd("hue2",N);k5.NH(s,O,O,z);d.l.$A(O,z,b,z,p,z,0,z,1,!1)}else if(Q=="copy")d.WK(c,$,b,z);
else if(Q=="sheal"){var O=d.R(z.P()*4),p=d.R(z.P());d.WK(c,$,O,z);d.GS(O,p,3);O.fill(0);var V=this.br,g8=this.di;
if(i){V=d.R(g8.P()*4);X.x7.oO(this.br,g8,0,V,g8)}else if(U.Rz()&&U.Rz().isEnabled){var n=U.Rz(),cQ=d.R(n.rect.P()*4);
d.WK(V,g8,cQ,n.rect);d.Dm(n.channel,cQ,3);V=cQ;g8=n.rect}var hk=d.yW.rT(V,g8,p,O,z);if(hk!=0)d.WK(V,g8,O,z);
if(this.h8.sfrom==0)d.WK(O,z,b,z);else{d.WK(this.er,this.h1,b,z);d.Dm(p,O,3);d.l.UY("norm",O,z,b,z,z,1)}}else if(Q=="qselect"){var eG=this.h1,ie=eG.m,eN=eG.e,gr=ie*eN,ek=this.Vr.GM(),Z=this.er,jK=X.U_.nO,p=jK.qa;
p.fill(128);for(var F=0;F<gr;F++){var iE=ek[F<<2],e9=ek[(F<<2)+3];if(e9==255&&(iE==0||iE==255))p[F]=iE}p[0]=p[ie-1]=0;
p[(eN>>>1)*ie]=p[(eN>>>1)*ie+ie-1]=0;X.v_.Fd(jK,!0,x);x.u={rect:eG,channel:jK.u.slice(0)};x.ox=!0}if(i==null){if(k)d.Dm(e,b,3);
d.WK(b,z,U.buffer,U.rect)}else X.x7.PY(b,z,i)};X.x7.hc=function(){return null};X.x7.Xn=function(x,Q,c,$,z){var j=x*(1/255),U=$+Q*Math.pow(j,c),i=Math.round(U*z+j*(255-z));
return Math.max(0,Math.min(255,i))};X.x7.oO=function(x,Q,c,$,z){var j=d.R(z.P());j.fill(c);d.L2(x,Q,j,z);
$.fill(255);d.ZM(j,$)};X.x7.PY=function(x,Q,c){var $=d.R(Q.P());d._8(x,$);d.L2($,Q,c.channel,c.rect)};
X.U_=function(x,Q,c){X.Ur.call(this,x,Q,c);this.h8={binop:0,feat:0,cstr:{z_:0,x:3,y:2},wconf:[16,!0,!0],anta:!0,sall:!1};
this.Tl=new bC(-1,-1);this.Oq=new bC(-1,-1);this.bY="default";this.iZ=null;this.sR=!1;this.P3=new ak;
this.RK=!1;this.ab=null;this.AG=null;this.Ld=!1;this.A5=!1};X.U_.prototype=new X.Ur;X.U_.prototype.Jh=function(){var x=this.h8,Q=[x.binop,x.feat],c=x.wconf,$=c.join(",")=="16,true,true";
if(Q[0]==0&&Q[1]==0&&$)return null;if(!$)Q.push(c);return Q};X.U_.prototype.sr=function(x,Q,c){var $=this.h8;
if(x[0])$.binop=x[0];if(x[1])$.feat=x[1];if(x[2])$.wconf=x[2];this.wh(c)};X.U_.prototype.wh=function(x){var Q=new jO(u.E.M,!0);
Q.data={d:u.H.gR,f:this.id,h8:this.h8};x.T(Q)};X.U_.nO={key:""};X.U_.dI=function(x,Q,c){var $={q4:x,dx:{classID:"setd",null:{t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]}}};
if(Q)$.dx.T=Q;if(c!=null)$.dx.AntA={t:"bool",v:c};return $};X.U_.w7=function(x,Q,c){return X.U_.dI("set",{t:"Objc",v:{classID:x,Top:{t:"UntF",v:{type:"#Pxl",val:Q.y}},Left:{t:"UntF",v:{type:"#Pxl",val:Q.x}},Btom:{t:"UntF",v:{type:"#Pxl",val:Q.y+Q.e}},Rght:{t:"UntF",v:{type:"#Pxl",val:Q.x+Q.m}}}},c)};
X.U_.Pg=function(x,Q,c){var $=[],z=[],U="set";for(var F=0;F<x.length;F+=2){$.push(x[F]);z.push(x[F+1])}var j={t:"Objc",v:{classID:"Plgn",Pts:{t:"ObAr",v:{classID:"Pnt",arr:[{id:"Hrzn",type:"UnFl",uID:"#Pxl",arr:$},{id:"Vrtc",type:"UnFl",uID:"#Pxl",arr:z}]}}}};
if(Q)U=["set","addTo","subtractFrom","interfaceWhite"][Q];return X.U_.dI(U,j,c)};X.U_.aeS=function(x,Q,c){var $={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Pxl",val:x.x}},Vrtc:{t:"UntF",v:{type:"#Pxl",val:x.y}}}},z=X.U_.dI("set",$);
z.dx.Tlrn={t:"long",v:Q[0]};z.dx.AntA={t:"bool",v:Q[1]};z.dx.Cntg={t:"bool",v:Q[2]};if(c==!0)z.dx.Mrgd={t:"bool",v:c};
return z};X.U_.sd=function(x){return X.U_.dI("set",{t:"enum",v:{Ordn:x?"Al":"None"}})};X.U_.mg=function(x,Q,c){var $={classID:"null"};
if(x!="border")$.selectionModifyEffectAtCanvasBounds={t:"bool",v:c};var z={e:"By",c:"By",b:"Wdth",f:"Rds",s:"Rds"}[x[0]];
$[z]={t:"UntF",v:{type:"#Pxl",val:Q}};return{q4:x,dx:$}};X.U_.FF=function(x,Q,c){var $={t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]},z={t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:Q}}]};
if(c)z.v.push({t:"name",v:{classID:"Lyr",val:c}});var j=[{classID:"null",null:$,T:z},{classID:"null",null:z,T:$},{classID:"null",null:z,From:$},{classID:"null",null:z,With:$}],U=["set","add","subtract","interfaceIconFrameDimmed"];
return{q4:U[x],dx:j[x]}};X.U_.aaH=function(x,Q){var c=new jO(u.E.M,!0);c.data={d:u.H.hW,hF:ke.eH};if(!Q.Ub)x.T(c);
c.data={d:u.H.hW,hF:ke.S0};if(!Q.Zo.mR)x.T(c)};X.U_.prototype.To=function(x,Q,c,$,z){X.U_.aaH(Q,z);this.iZ=Q;
var j=x.d,U,i,b=new gh(0,0,c.m,c.e),dl=!1,hl,f4,em,e$;if(j=="fromAction"){var e=x.fe,k=e.q4,K=e.dx,g=K?K.selectionModifyEffectAtCanvasBounds:null,R=g&&g.v;
if(k=="colorRange"){if(K.Clrs){var T=K.Clrs.v.Clrs,D=0,a=255,_=["Shdw","Mdtn","Hghl"].indexOf(T),Z=.4;
if(_==0)a=60;else if(_==1){D=100;a=150}else D=190;var I=["shadows","midtones","highlights"][_],f=K[I+"LowerLimit"],y=K[I+"UpperLimit"];
if(f)D=f.v;if(y)a=y.v;var v=K[I+"Fuzziness"];if(v)Z=v.v/100;U=X.U_.Ti(c,D,a,Z,!0)}else{var D=K.Mnm.v,a=K.Mxm.v,Z;
D={xv:D.Lmnc.v,V:D.A.v,J:D.B.v};a={xv:a.Lmnc.v,V:a.A.v,J:a.B.v};Z=K.Fzns.v/200;U=X.U_.Ti(c,D,a,Z)}i=[7,8]}else if(k=="inverse"){if(c.u==null){alert("No selection!");
return}U={channel:d.R(b.P()),rect:b};d.L2(c.u.channel,c.u.rect,U.channel,U.rect);d.HQ(U.channel);i=[7,2]}else if(k=="expand"){var G=K.By.v.val,q=c.u.rect.clone();
q.ss(G,G);var h=d.R(q.P()),r=d.R(q.P());d.L2(c.u.channel,c.u.rect,r,q);d.style.stroke(r,h,q,G);U={channel:h,rect:q};
i=[7,4]}else if(k=="contract"){var G=K.By.v.val,H=c.u.rect.clone();H.ss(1,1);if(!R)H=H.y_(b);var r=d.R(H.P()),o=d.R(r.length);
d.L2(c.u.channel,c.u.rect,r,H);d.HQ(r);d.style.stroke(r,o,H,G);d.HQ(o);U={channel:o,rect:H};d.NK(U);
i=[7,5]}else if(k=="border"){var G=K.Wdth.v.val;U=X.U_.arU(c.u,G/2,G/2);i=[7,9]}else if(k=="feather"||k=="smoothness"){var G=K.Rds.v.val;
U=X.U_.anY(c.u,G,k=="smoothness",b,R);i=k=="feather"?[7,6]:[19,3,0]}else if(k=="move"){var P=K.T.v,q=c.u.rect.clone();
q.x+=P.Hrzn.v.val;q.y+=P.Vrtc.v.val;U={channel:c.u.channel,rect:q};i=[7,7]}else if(k=="grow"||k=="similar"){var O=this.h8.wconf.slice(0);
if(K.Tlrn)O[0]=K.Tlrn.v;O[2]=k=="grow";var p=c.VY(),C=new gh(0,0,c.m,c.e),W=c.u.rect,J=Math.round(Math.sqrt(W.P())/10),t=d.R(C.P());
d.L2(c.u.channel,W,t,C);var Y=[];for(var l=0;l<W.e;l+=J)for(var m=(W.P()+l)%J;m<W.m;m+=J)if(c.u.channel[l*W.m+m]==255){var B=new bC(W.x+m,W.y+l);
Y.push(B);if(O[2])d.NE.iO(X.TH.OA(p,C,B,null,O),t,t)}if(!O[2])d.NE.iO(X.TH.OA(p,C,B,X.TH.aG(p,C,Y),O),t,t);
U={channel:t,rect:C};i=k=="grow"?"Grow Selection":"Similar Selection";console.log(K)}else{var L=K.null.v,A=K.AntA!=null&&K.AntA.v;
function S(h_){var bj=h_.Top.v.val,k7=h_.Left.v.val;return new gh(k7,bj,h_.Rght.v.val-k7,h_.Btom.v.val-bj)}function M(h_){var bj=h_[0].arr,gs=h_[1].arr,bs={j:[],G:[]};
for(var F=0;F<bj.length;F++){bs.G.push(F==0?"M":"L");bs.j.push(bj[F],gs[F])}bs.G.push("Z");return bs}var N=["set","addTo","subtractFrom","interfaceWhite"].indexOf(k),s=K.T?K.T.v:null;
if(s&&s.classID=="Elps"){U=this.ahn(X.GI.akw(S(s)));i=[10,4]}else if(s&&s.classID=="Rctn"){var V=S(s);
U={channel:d.R(V.P()),rect:V.clone()};U.channel.fill(255);i=[10,15]}else if(s&&s.classID=="ObSl"){var V=S(s),g8=X.U_.nO,n=g8.rect,cQ=g8.qa,hk=n.m,eG=n.e,ie=V.x-n.x,eN=ie+V.m-1,gr=Math.max(ie,Math.min(eN,ie+eN>>>1)),ek=V.y-n.y,jK=ek+V.e-1,iE=Math.max(ek,Math.min(jK,ek+jK>>>1)),e9=Math.max(ie,0),dm=Math.min(eN,hk),kD=Math.max(ek,0),gJ=Math.min(jK,eG);
cQ.fill(128);if(0<=ek)for(var m=e9;m<dm;m++)cQ[ek*hk+m]=0;if(jK<eG)for(var m=e9;m<dm;m++)cQ[jK*hk+m]=0;
if(0<=ie)for(var l=kD;l<gJ;l++)cQ[l*hk+ie]=0;if(eN<hk)for(var l=kD;l<gJ;l++)cQ[l*hk+eN]=0;var dR=X.Rl.a5G,fO=Math.round(V.m*dR),ko=Math.round(V.e*dR);
for(var m=Math.max(0,gr-fO);m<Math.min(hk,gr+fO);m++)cQ[iE*hk+m]=255;for(var l=Math.max(0,iE-ko);l<Math.min(eG,iE+ko);
l++)cQ[l*hk+gr]=255;X.v_.Fd(g8,!0);U={channel:g8.u.slice(0),rect:n.clone()};i=[10,44]}else if(s&&s.classID=="Plgn"){U=this.ahn(M(s.Pts.v.arr));
i=[10,9]}else if(s&&s.classID=="Pnt"){U=X.TH.aw_(c,new bC(s.Hrzn.v.val,s.Vrtc.v.val),[K.Tlrn.v,A,K.Cntg==null||K.Cntg.v],K.Mrgd?K.Mrgd.v:!1);
i=[10,12]}else if(s&&s.Ordn=="None"){U=null;i=[7,1]}else if(s&&s.Ordn=="Al"){var d8=b;if(c.g.length!=0){var fj=c.root.FV(c.g[0]);
while(fj.parent&&fj.parent.parent)fj=fj.parent;if(fj.a.add.artb)d8=fj.a.Dd()}U={channel:d.R(d8.P()),rect:d8};
U.channel.fill(255);i=[7,0]}else if(s&&s[0]&&s[0].v.keyID=="WrPt"){var ja={d:"frompath",b3:[-1,0,0]};
this.To(ja,Q,c,$,z);return}else{var eD=["set","add","subtract","interfaceIconFrameDimmed"].indexOf(k),fP=k=="set"?s:L,jE=fP[0].v.enum,ja;
if(jE=="Trsp"||jE=="Msk"||jE=="vectorMask"||jE=="Trgt"){var cR=c.g[0];if(fP.length==2)cR=ep.ns(c,fP[1]);
var ex=["Trsp","Msk","vectorMask"].indexOf(jE);if(jE=="Trgt"&&c.B[cR].kk==1)ex=1;ja={d:"fromlayer",b3:[cR,ex,eD]}}else{if(fP[0].t=="name"){var cR=0;
for(var F=0;F<c.fG.length;F++)if(c.fG[F].name==fP[0].v.val)cR=F;ja={d:"fromchannel",b3:[-5-cR,0,eD]}}else{var er=["RGB","Rd","Grn","Bl"].indexOf(jE);
ja={d:"fromchannel",b3:[-1-er,0,eD]}}}this.To(ja,Q,c,$,z);return}if(U){if(!A)d.round(U.channel);if(K.Fthr)U=X.U_.anY(U,K.Fthr.v.val,!1);
if(k!="set"&&c.u!=null)U=d.NE.B2(U,c.u,N)}}if(k=="expand"||k=="contract")if(!R&&!b.contains(U.rect)){var cE=U.rect.y_(b),a7=d.R(cE.P());
d.L2(U.channel,U.rect,a7,cE);U.channel=a7;U.rect=cE}}if(j=="qmask"){dl=!0;var iP=c.HI(),C=new gh(0,0,c.m,c.e);
if(iP){U=iP.rect.HM(C)&&d.Go(iP.channel,255)?null:{rect:iP.rect.clone(),channel:iP.channel.slice(0)};
hl=iP}else{U=null;f4=new eM.zM;f4.color=0;f4.name="Quick Mask";f4.fd=!0;if(c.u){f4.rect=c.u.rect.clone();
f4.channel=c.u.channel.slice(0)}else{f4.rect=C;f4.channel=d.R(f4.rect.P());f4.channel.fill(255)}}i=[6,6,1];
c.tP=!0}if(j=="setsel"){U=x.u;i=x.LX}if(j=="crange"){var D=x.qH,a=x.L6;U=X.U_.Ti(c,D,a,x.Ql);i=[7,8]}if(j=="fromlayer"||j=="fromchannel"||j=="frompath"){var b2=x.b3[0],ex=x.b3[1],N=x.b3[2];
if(j=="fromlayer"){if(b2==null)b2=c.g[0];var k7=c.B[b2];if(ex==0){var at=k7.rect,ju=k7.buffer;if(at._6())return;
var jL=d.R(ju.length>>>2);d.GS(ju,jL,3);U={channel:jL,rect:at.clone()}}else{if(k7.F==null)k7.kT(c);var fJ=ex==1?k7.Rz():k7.F;
U=X.U_.av6(fJ,b)}this.track(X.U_.FF(N,["Trsp","Msk"][ex],k7.getName()))}else if(j=="frompath"){var h6=c.zo(),iq=h6[1],h6=h6[0],ik=!0;
if(b2==null)if(h6.length==0||iq.length==0)return;var iI=h6[iq[0]];if(b2!=null)for(var F=0;F<h6.length;
F++)if(h6[F].xR==b2)iI=h6[F];var fJ=iI.add.vmsk.Rz(),dM=fJ.Pe();if(dM.P()==0)return;var jL=fJ.hO();if(x.b3[3]!=null)ik=x.b3[3];
if(!ik){jL=jL.slice(0);d.round(jL)}em=[JSON.stringify(c.IH),JSON.stringify(c.ZQ)];e$=["[]","[]"];c.IH=[];
c.ZQ=[];U={channel:jL,rect:dM}}else{if(b2==null)b2=X.U_.aya(c);U=X.U_.a8f(c,b2)}if(N!=0&&c.u)U=d.NE.B2(U,c.u,N);
i=[14,11]}if(j=="bgrm"){var jp=window.locStor.getItem("bgrmt"),eA=120;if(jp==null)jp=0;var k8=X.U_.a9$.bind([c,Q,x]),ay=Math.floor((Date.now()-jp)/1e3);
if(!dQ.OT()&&ay<eA){var bK="Non-Premium users can use it once in "+eA+" seconds ("+(eA-ay)+" sec remain). Watch a short ad and skip waiting?";
e_.SX(k8,bK,"rmbg")}else k8();return}if(U!=null&&d.Go(U.channel,0)){U=null;i=[7,1]}if(U)d.NK(U);var a4=new dg(i,this);
a4.data={d:"changesel",u:U,HI:dl,agN:hl,ask:f4,uQ:em,ahq:e$};c.kp(a4);this.Tz(a4.data,c)};X.U_.a9$=function(){var x=this[0],Q=this[1],c=this[2],$=x.B[x.g[0]],z=$.rect,j=$.buffer,U=1,K="JmQZWPPseb3/.3,4.1'y?\"qvuyai.%d~`LXNF@LBc6?:X=TO0 +*}#~Grqca6\\Z|ZKZObi\\0a$0<2*coeFax*/6)666`+'$T}MSVH?o:ja2.`Z%$PyHt =o<g8bdjbSTL}Jqtk;hj3NUH{Mo{(}uO[Q2Jnomw~qOKJOHPJMC6[>.326}&JA!;|htjb\\h^ R[Vgna/?DCG3Ji&%*#+%(}p+c";
while(Math.max(z.m,z.e)>4096){var i=d.t1(j,z);z=i.rect;j=i.AX;U*=2}var b=ar.pz("png"),e=ar.pz("jpg"),k=e.YU([[j.buffer]],z.m,z.e);
K=JSON.parse(jk.jW(K));var z=new XMLHttpRequest;z.open("POST",K[0]);z.setRequestHeader(K[1],K[2]);z.setRequestHeader(K[3],K[4]);
var g=new FormData;g.append("image",new Blob([k],{type:"ima"+"ge/j"+"pg"}));z.send(g);alert(ah.get([23,5])+" ...",2800);
z.onload=function(R){var T=JSON.parse(R.target.response),D=T.results[0].entities[0].image,a=ar.KG(D),D=b.fk(a)[0],_=D.K$,I=d.R(_.P());
d._8(new Uint8Array(D.data),I);for(var F=0;F<I.length;F++){if(I[F]>250)I[F]=255}if(U!=1){var i=X.Y.BG([I,_],new bI(U,0,0,U,0,0));
_=i.rect;I=i.channel}_.x=$.rect.x;_.y=$.rect.y;var f=new jO(u.E.v,!0);if(c.b==1){f.f=X.Mf;f.data={d:eM.zP,BW:K[5],apf:!0};
Q.T(f);var y=$.Rz();y.color=0;y.rect=_;y.channel=I;y.NK();$.kT()}else if(c.b==2){f.f=X.kJ;f.data={d:"setsel",u:{channel:I,rect:_},LX:"Select Subject"};
Q.T(f)}else throw"e";dQ.event("rembg_Rem"+"ove B"+"G:  "+(dQ.OT()?"Pre"+"mium":"Free"));window.locStor.setItem("bgrmt",Date.now())}};
X.U_.aya=function(x){var Q=0;if(x.oW.length!=0)Q=-5-x.oW[0];else if(JSON.stringify(x.Q.O)=="[1,1,1]")Q=-1;
else Q=-2-x.Q.O.indexOf(1);return Q};X.U_.a8f=function(x,Q){var c,$=new gh(0,0,x.m,x.e);if(-5<Q&Q<0){var z=-Q-1,j=x.VY(),U=d.R($.P());
if(z==0)d._8(j,U);else d.GS(j,U,z-1);c={channel:U,rect:$.clone()}}if(Q<-4){c=X.U_.av6(x.fG[-Q-5],$)}return c};
X.U_.av6=function(x,Q){var c,$;if(x.Du()==0){$=x.Pe().clone();if($.P()==0)return;c=x.hO()}else{$=Q;c=d.R($.P());
x.EF($,c)}return{channel:c,rect:$}};X.U_.prototype.R4=function(x){return this.RK||x.TZ&&this.id!=X.k9};
X.U_.prototype.VG=function(x,Q,c){var $=new jO(Q,!0);$.data=c;x.T($)};X.U_.prototype.ahL=function(x,Q){var c=new jO(u.E.M,!0);
c.data={d:u.H.aK,Wu:Q};x.T(c)};X.U_.prototype.Pe=function(x,Q,c){Q=x.u==null||this.P3.zx(1)||this.P3.gW(1)?Q:null;
var $=this.Tl,z=this.Oq;if(c){$.x=Math.max(0,Math.min(x.m,$.x));$.y=Math.max(0,Math.min(x.e,$.y));z.x=Math.max(0,Math.min(x.m,z.x));
z.y=Math.max(0,Math.min(x.e,z.y))}var j=X.Rp.SN($,z,Q,!0,this.h8.cstr),U=j[0].x,i=j[0].y,b=new gh(U,i,j[1].x-U,j[1].y-i);
if(c){b.x=Math.max(b.x,0);b.y=Math.max(b.y,0)}return b};X.U_.prototype.Eu=function(x,Q,c,$,z){this.A5=!0;
if(this.XH())return;this.iZ=Q;this.sR=!1;this.P3.Eu($);this.Tl=x.Q.$X(z.x,z.y);this.Tl=X.qV.Bw(x,this.Tl,c);
if(this.atz(x,this.Tl,$)){this.RK=!0;this.ab=x.u.rect.clone();return}this.Nn(x,c,$,z);x.Q._u=new gh};
X.U_.prototype.atz=function(x,Q,c){var $=c.S(fM.FT),z=c.S(fM.Al);if(x.u&&!$&&!z&&this.h8.binop==0)return d.e$(Q,x.u.channel,x.u.rect);
return!1};X.U_.prototype.CK=function(x,Q,c,$,z){this.iZ=Q;if(this.Ld)return;var j=x.Q.$X(z.x,z.y);if(bC.Xc(this.Tl,j)*x.Q.W>5){this.sR=!0;
this.P3.CK()}if($.S(fM.r_)){if(this.AG==null)this.AG=new bC(j.x-this.Tl.x,j.y-this.Tl.y);this.Tl.x=j.x-this.AG.x;
this.Tl.y=j.y-this.AG.y}else this.AG=null;this.Oq=j;if(!this.RK&&this.id!=X.k9)this.Oq=X.qV.Bw(x,this.Oq,c);
if(this.atz(x,this.Oq,$))this.ahL(Q,"move");else this.ahL(Q,this.bY);if(this.RK){var U=this.ab.clone();
U.x+=this.Oq.x-this.Tl.x;U.y+=this.Oq.y-this.Tl.y;var i=X.qV.H1(x,U,c);x.u.rect.x=Math.round(this.Oq.x-this.Tl.x+this.ab.x+i[0]);
x.u.rect.y=Math.round(this.Oq.y-this.Tl.y+this.ab.y+i[1]);x.ox=!0;X.qV.ao(x,U,i);return}this.G3(x,c,$,z,Q);
if(x.Q._u)x.Q._u=this.Pe(x,$)};X.U_.prototype.XH=function(){return!1};X.U_.prototype.km=function(x,Q,c,$,z,j){var U=this.A5;
this.A5=!1;if(j||!U)return;x.Q._u=null;this.Oq=x.Q.$X(z.x,z.y);this.Oq=X.qV.Bw(x,this.Oq,c);if(this.RK){this.RK=!1;
if(x!=null&&x.N.zZ){x.N.zZ=null;x.vu=!0}if(this.Oq.HM(this.Tl)&&this.QW()==0){this.VG(Q,u.E.G2,X.U_.sd());
return}this.axC(x,this.ab,x.u.rect.clone());return}this.zc(x,c,$,z,Q);X.U_.aaH(Q,c);this.P3.km();this.CB(Q)};
X.U_.prototype.axC=function(x,Q,c){var $=x.O2();if($!=null&&$.f==this&&$.data.d=="movesel"){}else{$=new dg([7,7],this);
$.data={d:"movesel",oT:Q};x.kp($)}$.data.gq=c;this.Tz($.data,x)};X.U_.prototype.Ys=function(x,Q,c,$,z){this.Ld=!0};
X.U_.prototype.x1=function(x,Q,c,$,z){var j=new jO(u.E.M,!0);j.data={d:u.H.gR,f:this.id,xK:z,rx:x,B4:c};
Q.T(j);this.Ld=!1};X.U_.prototype.sM=function(x,Q,c,$){this.P3.sM($);if(x!=null&&x.u!=null){var z=$.um();
if(z.x!=0||z.y!=0){var j=x.u.rect.clone();j.x+=z.x;j.y+=z.y;this.axC(x,x.u.rect.clone(),j)}}this.CB(Q)};
X.U_.prototype.CB=function(x){var Q=new jO(u.E.M,!0);Q.data={d:u.H.gR,f:this.id,Ym:this.QW()};x.T(Q)};
X.U_.prototype.QW=function(){var x=this.P3.zx(0),Q=this.P3.gW(0);return X.U_.IJ(this.h8.binop,x,Q)};
X.U_.IJ=function(x,Q,c){if(Q)x=1;if(c)x=2;if(Q&&c)x=3;return x};X.U_.prototype.finish=function(x,Q,c,$){var z=x.u,j=this.getSelection(x,Q,c,$);
if(j==null)j=X.U_.sd();else{var U=this.h8.feat,i=this.QW();if(U!=0)j.dx.Fthr={t:"UntF",v:{type:"#Pxl",val:U}};
if(i!=0&&i!=4)j.q4=["","addTo","subtractFrom","interfaceWhite",""][i]}this.VG(this.iZ,u.E.G2,j);this.Tl.r$(-1,-1);
this.Oq.r$(-1,-1)};X.U_.prototype.getSelection=function(x,Q,c,$){return null};X.U_.prototype.Nn=function(x,Q,c,$){};
X.U_.prototype.G3=function(x,Q,c,$){};X.U_.prototype.zc=function(x,Q,c,$){};X.U_.prototype.pC=function(x,Q){var c=x.d;
if(c=="changesel"){var $=Q.u;Q.u=x.u;x.u=$}if(c=="movesel")Q.u.rect=x.oT;if(x.HI){if(x.agN){Q.oW=[Q.fG.length];
Q.fG.push(x.agN)}else{Q.fG.pop();Q.oW=[]}}if(x.uQ){Q.IH=JSON.parse(x.uQ[0]);Q.ZQ=JSON.parse(x.uQ[1])}Q.ox=!0};
X.U_.prototype.Tz=function(x,Q){var c=x.d;if(c=="changesel"){var $=Q.u;Q.u=x.u;x.u=$}if(c=="movesel")Q.u.rect=x.gq;
if(x.HI){if(x.ask){Q.oW=[Q.fG.length];Q.fG.push(x.ask)}else{Q.fG.pop();Q.oW=[]}}if(x.uQ){Q.IH=JSON.parse(x.ahq[0]);
Q.ZQ=JSON.parse(x.ahq[1])}Q.ox=!0};X.U_.prototype.Ce=function(x){return x.d=="changesel"&&x.u?x.u.channel.length:0};
X.U_.prototype.np=function(x){for(var Q in x.h8)this.h8[Q]=x.h8[Q]};X.U_.prototype.ahn=function(x){var Q=d.A.cl(x.j);
if(Q._6())return null;var c=d.nc(Q.m,Q.e);c.save();c.beginPath();c.translate(-Q.x,-Q.y);Typr.U.pathToContext({cmds:x.G,crds:x.j},c);
c.closePath();c.fill();c.restore();var $=d.R(Q.P()),z=c.getImageData(0,0,Q.m,Q.e);d.GS(z.data,$,3);return{rect:Q,channel:$}};
X.U_.anY=function(x,Q,c,$,z){if(c)Q=Math.round(Q*.7);var j=Math.ceil(2.6*Q),U=x.rect.clone();U.ss(j,j);
if($&&!z)U=U.y_($);var i=d.R(U.P()),b=d.R(i.length);d.L2(x.channel,x.rect,b,U);d.yg.ZA(b,i,U,Q);if(c){var e=i.length;
for(var F=0;F<e;F++){var k=(i[F]-128)*Q*2.5;i[F]=Math.max(0,Math.min(255,Math.round(128+k)))}}return{channel:i,rect:U}};
X.U_.arU=function(x,Q,c){var $=Math.max(1,Math.ceil(c)),z=x.rect.clone();z.ss($,$);var j=z.P(),U={channel:d.R(j),rect:z},i=d.R(j);
d.L2(x.channel,x.rect,i,U.rect);if(c!=0)d.style.stroke(i,U.channel,U.rect,c);else d.SO(i,U.channel);
var b=d.R(j);d.HQ(i);if(Q!=0)d.style.stroke(i,b,U.rect,Q);else d.SO(i,b);d.NE.y_(U.channel,b,U.channel);
return U};X.U_.Ti=function(x,Q,c,$,z){var j=new gh(0,0,x.m,x.e),U=x.VY();if(x.u){var i=x.u.rect.y_(j),b=d.R(i.P()*4);
d.WK(U,j,b,i);j=i;U=b}var e=j.P(),k=d.R(e),K=1/$;if(z){if(Q>=c)Q=c-1;var g=Q*(1-$),R=Q,T=c,D=c+(255-c)*$,a=g==R?0:1/(R-g),_=T==D?0:1/(D-T);
for(var F=0;F<e;F++){var I=F<<2,f=d.I5(U[I],U[I+1],U[I+2]),y=0;if(f<g)y=0;else if(f<R)y=(f-g)*a;else if(f<=T)y=1;
else if(f<=D)y=1-(f-T)*_;else y=0;k[F]=U[I+3]*y*y}}else for(var F=0;F<e;F++){var I=F<<2,Z=d.eC(U[I],U[I+1],U[I+2]),y=d.awB(Z,Q,c,$,K);
k[F]=U[I+3]*y}return{rect:j,channel:k}};X.UJ=function(){X.x7.call(this,[10,18],X.W7,"tools/blur");this.VJ="copy"};
X.UJ.prototype=new X.x7;X.UJ.prototype.Eu=function(x,Q,c,$,z){var j=$.S(fM.Al)?cG.lQ:cG.W7;this.nB(x,c,$,z,this.h8.strn,j);
if(this.Vr==null)return;this.X4(x)};X.UJ.prototype.CK=function(x,Q,c,$,z){this.iB(x,Q,c);if(this.sO)this.jB(x,c,z);
if(this.Vr==null)return;if(!z.TZ)return;this.QG(x,c,$,z);this.X4(x)};X.PH=function(){X.x7.call(this,[10,0],X.gN,"tools/brush");
this.VJ="draw"};X.PH.prototype=new X.x7;X.PH.prototype.Eu=function(x,Q,c,$,z){if(this.NU(x,Q,c,$,z,!0))return;
this.nB(x,c,$,z,this.h8.flow);if(this.Vr==null)return;this.X4(x)};X.PH.prototype.CK=function(x,Q,c,$,z){if(this.NU(x,Q,c,$,z))return;
this.iB(x,Q,c);if(this.sO)this.jB(x,c,z);if(this.Vr==null)return;if(!z.TZ)return;this.QG(x,c,$,z);this.X4(x)};
X.rt=function(){X.x7.call(this,[10,42],X.fa,"tools/crepl");this.VJ="idraw";this.h8.bmode="hue "};X.rt.prototype=new X.x7;
X.rt.prototype.Eu=function(x,Q,c,$,z){if(this.NU(x,Q,c,$,z,!0))return;this.nB(x,c,$,z,this.h8.flow);
if(this.Vr==null)return;this.X4(x)};X.rt.prototype.CK=function(x,Q,c,$,z){if(this.NU(x,Q,c,$,z))return;
this.iB(x,Q,c);if(this.sO)this.jB(x,c,z);if(this.Vr==null)return;if(!z.TZ)return;this.QG(x,c,$,z);this.X4(x)};
X.M4=function(){X.x7.call(this,[10,43],X.KC,"tools/redeye");this.h8.smode=0;this.VJ="redeye"};X.M4.prototype=new X.x7;
X.M4.prototype.Eu=function(x,Q,c,$,z){this.nB(x,c,$,z,this.h8.flow);if(this.Vr==null)return;this.X4(x)};
X.M4.prototype.CK=function(x,Q,c,$,z){this.iB(x,Q,c);if(this.sO)this.jB(x,c,z);if(this.Vr==null)return;
if(!z.TZ)return;this.QG(x,c,$,z);this.X4(x)};X.Ar=function(){X.x7.call(this,[10,38],X.fx,"tools/pencil");
this.VJ="draw"};X.Ar.prototype=new X.x7;X.Ar.prototype.Eu=function(x,Q,c,$,z){if(this.NU(x,Q,c,$,z,!0))return;
this.nB(x,c,$,z,this.h8.flow);if(this.Vr==null)return;this.X4(x)};X.Ar.prototype.CK=function(x,Q,c,$,z){if(this.NU(x,Q,c,$,z))return;
this.iB(x,Q,c);if(this.sO)this.jB(x,c,z);if(this.Vr==null)return;if(!z.TZ)return;this.QG(x,c,$,z);this.X4(x)};
X.N3=function(){X.x7.call(this,[10,22],X.He,"tools/burn");this.VJ="burn"};X.N3.prototype=new X.x7;X.N3.prototype.Eu=function(x,Q,c,$,z){this.nB(x,c,$,z,this.h8.expo/Math.E);
if(this.Vr==null)return;this.X4(x)};X.N3.prototype.CK=function(x,Q,c,$,z){this.iB(x,Q,c);if(this.sO)this.jB(x,c,z);
if(this.Vr==null)return;if(!z.TZ)return;this.QG(x,c,$,z);this.X4(x)};X.Z4=function(x,Q,c){X.x7.call(this,x==""?null:x?x:[10,1],Q?Q:X.bp,c?c:"tools/clone");
this.VJ="clone";this.CZ=null;this.z=null};X.Z4.prototype=new X.x7;X.Z4.prototype.Eu=function(x,Q,c,$,z){var j=this.h8,U=j.alt[0];
if($.S(fM.Al)||$.S(fM.ui)||U){this.CZ=x.Q.$X(z.x,z.y);this.z=null;if(U)this.iq({alt:[!1]},Q);this.MP(x);
this.Rv(c,$,x,z);return}if(this.CZ==null){alert(ah.get([15,7,0]));return}this.Rv(c,$);this.nB(x,c,$,z,this.h8.flow);
if(this.Vr==null)return;this.z=this.awi(x.Q.$X(z.x,z.y));this.X4(x)};X.Z4.prototype.awi=function(x){var Q=this.z;
if(Q==null||!this.h8.algnd)Q=new bC(Math.round(x.x-this.CZ.x),Math.round(x.y-this.CZ.y));return Q};X.Z4.prototype.CK=function(x,Q,c,$,z){this.iB(x,Q,c);
if(this.sO)this.jB(x,c,z);if(this.Vr==null){if(this.CZ!=null)this.Rv(c,$,x,z);return}if(!z.TZ||this.CZ==null)return;
this.QG(x,c,$,z);this.X4(x)};X.Z4.prototype.hc=function(){return this.z};X.Qz=function(){X.Ur.call(this,[10,53],X.a2J,"tools/csamp");
this.$G=-1;this.ae_=null};X.Qz.prototype=new X.Ur;X.Qz.prototype.Eu=function(x,Q,c,$,z){this.ae_=JSON.stringify(x.Vv);
var j=x.Q.$X(z.x,z.y),U=x.Vv,i=1e9,b=-1;for(var F=0;F<U.length;F++){var e=U[F],k=j.x-e.x,K=j.y-e.y,g=k*k+K*K;
if(g<i){i=g;b=F}}var R=15/x.Q.W;b=i<R*R?b:-1;if(b==-1){b=U.length;U.push({x:j.x,y:j.y})}else if($.S(fM.Al)){U.splice(b,1);
b=-1}this.$G=b;x.vu=!0};X.Qz.prototype.CK=function(x,Q,c,$,z){var j=this.$G;if(j!=-1){var U=x.Q.$X(z.x,z.y);
x.Vv[j].x=U.x;x.Vv[j].y=U.y;x.vu=!0}};X.Qz.prototype.km=function(x,Q,c,$,z,j){var U=new dg(this.name,this);
U.data={ZR:this.ae_,j7:JSON.stringify(x.Vv)};x.kp(U);this.$G=-1};X.Qz.prototype.pC=function(x,Q){Q.Vv=JSON.parse(x.ZR)};
X.Qz.prototype.Tz=function(x,Q){Q.Vv=JSON.parse(x.j7)};X.r7=function(x,Q,c){X.Ur.call(this,x,Q,c);this.Xq={jb:{z_:0,x:0,y:0},v$:!1,iv:!1};
this.R8=!1;this.B5=null;this.cursor=null;this.ax5=0;this.Ah=null;this.Tl=null;this.dT=null;this.Lc=!1};
X.r7.prototype=new X.Ur;X.r7.prototype.sD=function(){return this.B5!=null};X.r7.prototype.R4=function(x){return this.Tl!=null||this.B5&&this.B5.awo()};
X.r7.prototype.Eu=function(x,Q,c,$,z){this.Ah=z;var j=x.Q.$X(z.x,z.y),U=this.Xq.jb,i=U.z_!=0?U.x/U.y:null,b=this.Lc;
this.Lc=!1;if(this.B5){var e=this.B5.o7(j,x.Q.W);if(b&&e==null){this.B5.clear(x);this.B5=null}else{this.B5.Eu(x,c,$,j,i,!1,z);
return}}this.Tl=X.qV.Bw(x,j,c)};X.r7.prototype.Si=function(x,Q,c){if(c==null)c=[x.x,x.y,x.x+x.m,x.y,x.x+x.m,x.y+x.e,x.x,x.y+x.e];
return new aH(c,!0,!1,this.id==X.IY,!0,Q,this.id==X.IY?2:0,this.id==X.IY?4:3)};X.r7.prototype.Rv=function(x){var Q=new jO(u.E.M,!0);
Q.data={d:u.H.aK,Wu:this.cursor};x.T(Q)};X.r7.prototype.enable=function(x,Q,c,$){this.iZ=Q;this.cursor="crosshair";
this.Rv(Q);if(x!=null&&this.B5==null){var z=x.u?{Iu:"cropby",a3A:3}:{Iu:"config",Xq:this.Xq,a3e:!0};
this.np(z,Q,x,$,c);if(x.u==null&&this.Xq.jb.z_==0)this.Lc=!0}};X.r7.prototype.CK=function(x,Q,c,$,z){this.Ah=z;
var j=x.Q.$X(z.x,z.y);if(!z.TZ){var U="crosshair";if(this.B5){var i=this.B5.o7(j,x.Q.W,null,z);if(i)U=i;
else U="default"}if(U!=this.cursor){this.cursor=U;this.Rv(Q)}}if(this.B5)this.B5.CK(x,c,$,j);else if(this.Tl){if(this.R8){x.N.LV={G:["M","L"],j:[this.Tl.x,this.Tl.y,j.x,j.y]}}else{var b=X.Rp.SN(this.Tl,X.qV.Bw(x,j,c),$,!0,this.Xq.jb),e=b[0].x,k=b[0].y,K=this.dT=new gh(e,k,b[1].x-e,b[1].y-k);
x.N.LV=d.A.Hg(K);X.Ur.fZ(z,K,x,c)}x.vu=!0}};X.r7.aDF=function(x,Q,c){var $,z,i,b;if(Q<=c){$=Q;z=c}else{$=c;
z=Q}var j=x-Math.floor((x+Math.PI)/(2*Math.PI))*2*Math.PI;j=Math.abs(j);if(j>Math.PI/2)j=Math.PI-j;var U=$/(z*Math.sin(j)+$*Math.cos(j));
if(Q<=c){i=$*U;b=z*U}else{i=z*U;b=$*U}return{ww:i,R0:b}};X.r7.prototype.km=function(x,Q,c,$,z){this.Ah=z;
var j=x.Q.$X(z.x,z.y);if(this.B5==null){var U=this.dT;if(this.Tl&&(U||this.R8)){if(this.R8){var i=this.Tl,b=j,e=b.x-i.x,k=b.y-i.y;
if(Math.abs(e)<Math.abs(k))b=new bC(i.x-k,i.y+e);if(i.x>b.x){var K=i;i=b;b=K}var i=Math.atan2(-(b.y-i.y),b.x-i.x),g=X.r7.aDF(i,x.m,x.e);
if(this.Xq.iv){var R=d.A.Hg(new gh(0,0,x.m,x.e)),T=new bI;T.rotate(i);d.A.i(R.j,T,R.j);g=d.A.cl(R.j);
g={ww:g.m,R0:g.e}}var D=[0,0,g.ww,0,g.ww,g.R0,0,g.R0],a=new bI;a.translate(-g.ww/2,-g.R0/2);a.rotate(i);
a.translate(x.m/2,x.e/2);d.A.i(D,a,D);this.B5=this.Si(U,!1,D);this.R8=!1}else{var _=this.Xq.jb;this.B5=this.Si(U,_.z_!=0)}this.B5.Ex(x,c);
this.dT=null;this.VG(Q,u.E.M,{d:u.H.gR,f:this.id,_R:!0});this.Tl=null;x.N.It=[];x.N.LV=null;x.vu=!0}return}this.B5.km(x,c,$,j);
this.VG(Q,u.E.M,{d:u.H.gR,f:this.id,_R:!0});var D=this.B5.hZ();if(Math.abs(D[0]-D[4])<2&&Math.abs(D[1]-D[5])<2){this.mK(x,Q,null,$);
return}if(Date.now()-this.ax5<200&&this.B5.uc(j)){this.L5(x,c);this.mK(x,Q,c,$);return}this.ax5=Date.now()};
X.r7.prototype.sM=function(x,Q,c,$){var z=this.B5;if(z==null||this.Ah&&this.Ah.TZ)return;if($.S(fM.ln)){this.L5(x,c);
this.mK(x,Q,c,$)}else if($.S(fM.En)){this.mK(x,Q,c,$)}else z.sM(x,c,$)};X.r7.as8=function(x,Q,c){var $={classID:"null",T:{t:"Objc",v:{classID:"Rctn",Top:{t:"UntF",v:{type:"#Pxl",val:x[1]}},Left:{t:"UntF",v:{type:"#Pxl",val:x[0]}},Btom:{t:"UntF",v:{type:"#Pxl",val:x[1]+x[3]}},Rght:{t:"UntF",v:{type:"#Pxl",val:x[0]+x[2]}}}},Angl:{t:"UntF",v:{type:"#Ang",val:Q!=null?Q:0}},Dlt:{t:"bool",v:c!=null?c:!0},cropAspectRatioModeKey:{t:"enum",v:{cropAspectRatioModeClass:"pureAspectRatio"}},CnsP:{t:"bool",v:!1}};
return{q4:"crop",dx:$}};X.r7.ro=function(x,Q){if(Q==null)Q=[!0,!0,!0,!0];var c={classID:"trim",trimBasedOn:{t:"enum",v:{trimBasedOn:["topLeftPixelColor","bottomRightPixelColor","Trns"][x]}}},$=["Top","Left","Btom","Rght"];
for(var F=0;F<4;F++)c[$[F]]={t:"bool",v:Q[F]};return{q4:"trim",dx:c}};X.r7.axP=function(x,Q,c,$){var z={classID:"null"};
if($!=null){z.Wdth={t:"UntF",v:{type:"#Pxl",val:x}};z.Hght={t:"UntF",v:{type:"#Pxl",val:Q}};z.Intr={t:"enum",v:{Intp:["Nrst","Blnr","bicubicSharper"][$]}}}if(c!=null)z.Rslt={t:"UntF",v:{type:"#Rsl",val:c}};
return{q4:"imageSize",dx:z}};X.r7.an2=function(x,Q,c,$){if(c==null)c=4;if($==null)$=!1;var z=Math.floor(c/3),j=c%3;
return{q4:"canvasSize",dx:{classID:"null",Wdth:{t:"UntF",v:{type:"#Pxl",val:x}},Hght:{t:"UntF",v:{type:"#Pxl",val:Q}},Hrzn:{t:"enum",v:{HrzL:["Left","Cntr","Rght"][j]}},Vrtc:{t:"enum",v:{VrtL:["Top","Cntr","Btom"][z]}},Rltv:{t:"bool",v:$}}}};
X.r7.prototype.To=function(x,Q,c,$,z){var j=new gh(0,0,c.m,c.e),U=[11,3],i=c.cQ,b=c.m/2,e=c.e/2,k=1,L,A,S;
if(x.d=="fromAction"){var K=x.fe,g=K.q4,R=K.dx,T=c.m/c.e,D=R.Wdth?R.Wdth.v.val:-1,a=R.Hght?R.Hght.v.val:-1,i=R.Rslt?R.Rslt.v.val:null,_=R.Wdth?R.Wdth.v.type:R.Hght?R.Hght.v.type:-1,I=1,f;
if(_=="#Prc"){if(D!=-1)D=Math.round(c.m*D/100);if(a!=-1)a=Math.round(c.e*a/100)}if(g=="imageSize"){if(R.Intr){if(R.Intr.v.Intp=="Nrst")I=0;
if(R.Intr.v.Intp=="bicubicSharper")I=2;if(D==-1&&a==-1){var y=i/c.cQ;D=Math.round(c.m*y);a=Math.round(c.e*y)}if(R.CnsP&&R.CnsP.v){if(D==-1)D=Math.round(a*T);
if(a==-1)a=Math.round(D/T)}}else{if(_=="#Prc")i=Math.round(c.cQ*(c.m/D));else if(_==-1)i=Math.round(i);
else throw"e";D=c.m;a=c.e}f={d:"imgsize",_h:D,q$:a,YE:i,G_:I}}else if(g=="canvasSize"){if(D==-1)D=c.m;
if(a==-1)a=c.e;if(R.Rltv&&R.Rltv.v==!0){if(R.Wdth)D+=c.m;if(R.Hght)a+=c.e}var Z=R.Vrtc?R.Vrtc.v.VrtL:"Cntr",v=R.Hrzn?R.Hrzn.v.HrzL:"Cntr";
f={d:"canvsize",_h:D,q$:a,gy:3*["Top","Cntr","Btom"].indexOf(Z)+["Left","Cntr","Rght"].indexOf(v)}}else if(g=="revealAll"){f={d:"revealAll"}}else if(g=="trim"){var G={topLeftPixelColor:0,bottomRightPixelColor:1,Trns:2}[R.trimBasedOn.v.trimBasedOn];
if(G==null)throw"e";var q=["Top","Left","Btom","Rght"],h=[!0,!0,!0,!0];for(var F=0;F<4;F++)if(R[q[F]])h[F]=R[q[F]].v;
f={d:"trim",aAo:G,Bz:h}}else if(g=="crop"){var r,H,o,P;if(R.T){var O=R.T.v,r=Math.round(O.Left.v.val),H=Math.round(O.Top.v.val),o=Math.round(O.Rght.v.val)-r,P=Math.round(O.Btom.v.val)-H}else{var p=c.u.rect;
r=p.x;H=p.y;o=p.m;P=p.e}f={d:"canvsize",_h:o,q$:P,z:new bC(r,H),arg:R.Dlt!=null&&R.Dlt.v}}else console.log(K);
if(f)this.To(f,Q,c,$,z);return}else if(x.d=="imgsize"){j=new gh(0,0,x._h,x.q$);if(x.YE)i=x.YE;k=x.G_}else if(x.d=="canvsize"){var C=x.gy!=null?x.gy:0;
j=new gh(0,0,x._h,x.q$);var W=c.m-x._h,J=c.e-x.q$,t=Math.round(W/2),Y=Math.round(J/2);if(C==1||C==4||C==7)j.x=t;
if(C==2||C==5||C==8)j.x=W;if(C==3||C==4||C==5)j.y=Y;if(C==6||C==7||C==8)j.y=J;if(x.z){j.x=x.z.x;j.y=x.z.y}}else if(x.d=="rot"&&(x.b+2*Math.PI)%(Math.PI/2)!=0){var l=d.A.Hg(j).j,m=new bI;
m.translate(-b,-e);m.rotate(x.b);m.translate(b,e);d.A.i(l,m,l);j=d.A.cl(l)}else if(x.d=="rot"&&x.b!=Math.PI&&x.b!=-Math.PI){j=new gh(b-c.e/2,e-c.m/2,c.e,c.m);
if((c.m+c.e&1)==1){b=Math.floor(b);e=Math.floor(e);j=new gh(b-Math.floor(c.e/2),e-Math.floor(c.m/2),c.e,c.m);
if((c.m&1)==1&&x.b!=-Math.PI/2)j.y--;if((c.e&1)==1&&x.b==-Math.PI/2)j.x--}}else if(x.d=="trim"){U=[11,12,0];
var B=c.VY(),p=new gh(0,0,c.m,c.e);j=d.kH(B,p,x.aAo,x.Bz);if(j._6())j=p}else if(x.d=="revealAll"){U=[11,12,2];
j=c.root.Pe(c,!0)}var M=x.d=="canvsize"&&x.arg;if(x.d=="imgsize"||x.d=="rot"||x.d=="scl"||M){var N=new bI;
if(x.d=="imgsize"){U=[11,10];N.scale(x._h/c.m,x.q$/c.e);S=c.wZ();for(var F=0;F<S[0].length;F++)S[0][F][1]*=S[0][F][0]==0?N.V:N.xq}else if(M){}else{N.translate(-b,-e);
if(x.d=="rot")N.rotate(x.b);if(x.d=="scl")N.scale(x.b.x,x.b.y);N.translate(b,e);U=x.LX}A=d.D.Gr(N);L=this.Jb(c,z,!0,A,k,M?j:null)}else if(x.d=="auto-align"){if(c.g.length<2){alert("Select two or more layers.");
return}var s=[];for(var F=0;F<c.g.length;F++){var V=c.B[c.g[F]];if(!V.nd()&&V.add.SoLd==null){alert("Unsupported layer selected.");
return}if(V.rect._6()){alert("Empty layer selected.");return}s.push([V.buffer,V.rect])}var g8=d.zQ.ez(s);
if(g8==null){alert("No similarity found.");return}A=g8[1];L=this.Jb(c,z,!1,g8,k);j=c.root.Pe(c,!0);U=[2,10,1]}var n=new gh(0,0,c.m,c.e);
if(!j._6()&&(!j.HM(n)||L!=null)){var cQ=new dg(U,this);cQ.data={aCv:c.cQ,YE:i,su:L,YQ:A,Hi:X.r7.a1w(c,j,n,L!=null)};
if(S){cQ.data.aho=c.wZ();cQ.data.a9x=S}X.r7.akO(c,cQ.data,j);c.kp(cQ);this.Tz(cQ.data,c)}};X.r7.a1w=function(x,Q,c,$){if(x.p9.length==0)return null;
var z=JSON.stringify(x.p9),j=JSON.parse(z);X.x5.aad(j,Q,c,$);j=JSON.stringify(j);return[z,j]};X.r7.prototype.Jb=function(x,Q,c,$,z,j,U){var i={B:[],N$:null,MV:null};
if(c){for(var F=0;F<x.B.length;F++)i.B.push(F);for(var F=0;F<x.iL.length;F++)i.B.push(-1-F);for(var F=0;
F<x.fG.length;F++)i.B.push(-1e3-F)}else i.B=x.g.slice(0);i.N$=X.Y.my(x,i.B,!0);var b=Math.abs($[3]*$[1])>1e-9;
X.Y.wS(x,Q,i.B,i.N$,z,$,null,!0,b?null:j);if(c&&U&&x.hS()){var e=x.B[x.g[0]],k=e.buffer,K=e.rect,g=b?K.clone():j.clone(),R=d.R(g.P()*4),T=d.R(K.P());
d.GS(k,T,3);var D=d.R(g.P());d.L2(T,K,D,g);d.round(D,255);d.HQ(D);var a=d.yW.rT(k,K,D,R,g);if(a==0){e.rect=g;
e.buffer=R}}i.MV=X.Y.my(x,i.B,!0);return i};X.r7.prototype.Tz=function(x,Q){if(x.YE)Q.cQ=x.YE;if(x.Hi)Q.p9=JSON.parse(x.Hi[1]);
if(x.su){X.r7._Z(Q,d.D.uL(x.YQ));X.Y.Lp(Q,x.su.B,x.su.MV);if(x.a9x)Q.tF(x.a9x)}X.r7.sq(Q,x)};X.r7.prototype.pC=function(x,Q){if(x.aCv)Q.cQ=x.aCv;
if(x.Hi)Q.p9=JSON.parse(x.Hi[0]);X.r7.zh(Q,x);if(x.oH)Q.Q.z.be(x.oH);Q.a4M();if(x.su){var c=d.D.uL(x.YQ).clone();
c.HQ();X.r7._Z(Q,c);X.Y.Lp(Q,x.su.B,x.su.N$);if(x.aho)Q.tF(x.aho)}};X.r7._Z=function(x,Q){for(var F=0;
F<x.B.length;F++){var c=x.B[F];if(c.add.artb==null)continue;var $=d.A.Hg(c.Dd()).j;d.A.i($,Q,$);var z=d.A.cl($);
c.Zp(z)}};X.r7.OZ=function(x){var Q=new gh,c=0,$=x.root.children.length;for(var F=0;F<$;F++){var z=x.root.children[F].a;
if(z.add.artb==null)continue;Q=Q.iO(z.Dd());c++}var j=new gh(0,0,x.m,x.e);if(!Q._6()&&!j.HM(Q))return Q;
return null};X.r7.sA=function(x){var Q=X.r7.OZ(x);if(Q)X.r7.v$(x,Q,!0);return Q};X.r7.v$=function(x,Q,c){var $=x.m,z=x.e,j=Q.m,U=Q.e,i=Q.x==0&&Q.y==0;
if(i&&$==j&&z==U)return;x.m=j;x.e=U;var b=[];for(var F=0;F<x.B.length;F++)b.push(F);if(!i)X.qV.vS(x,b,null,-Q.x,-Q.y);
for(var F=0;F<x.B.length;F++){x.B[F].kT(x)}x.a4M();if(c){var e=x.Q.z,k=x.Q.W;e.x+=Math.round((Q.x+(j-$)/2)*k);
e.y+=Math.round((Q.y+(U-z)/2)*k)}else x.Q.z.r$(0,0);if(x.u)x.u.rect.offset(-Q.x,-Q.y);var K=x.wZ();for(var g=0;
g<K[0].length;g++)if(K[1][g]==-1){var R=x.Bo[g];R[1]-=R[0]==0?Q.x:Q.y}for(var F=0;F<x.fG.length;F++)x.fG[F].rect.offset(-Q.x,-Q.y)};
X.r7.prototype.np=function(x,Q,c,$,z){if(x.Iu=="commit"){this.L5(c,z);this.mK(c,Q,null,$)}else if(x.Iu=="cancel"){this.mK(c,Q,null,$)}var j=null,U=new gh(0,0,c.m,c.e),i=this.Xq.jb;
if(x.Iu=="config"){this.Xq=x.Xq;i=this.Xq.jb;if(c==null||!x.a3e)return;j=U;if(i.z_==1){var b=i.x/i.y;
if(j.m/b<j.e)j.e=Math.round(j.m/b);else j.m=Math.round(j.e*b)}if(i.z_==2){j.m=i.x;j.e=i.y}j.x=Math.round((c.m-j.m)/2);
j.y=Math.round((c.e-j.e)/2)}if(x.Iu=="straighten"){alert("Draw a line in the image.");this.R8=!0}if(x.Iu=="cropby"){if(c==null)return;
var e=x.a3A,j;if(e==0)j=c.root.Pe(c,!0);if(e==1){if(c.g.length==0)alert("No layer is selected.");else{var k=c.root.FV(c.g[0]);
j=k.Pe(c,!0)}}if(e==2){if(c.g.length==0)alert("No layer is selected.");else{j=d.kH(c.VY(),U,0);if(j._6())j=U.clone()}}if(e==3){if(c.u!=null)j=c.u.rect;
else alert("There is no selection.")}if(e==4){j=new gh(0,0,c.m,c.e)}}if(j&&j._6())j=null;if(j!=null){this.B5=this.Si(j,i.z_!=0);
this.B5.Ex(c,z);this.VG(Q,u.E.M,{d:u.H.gR,f:this.id,_R:!0})}};X.r7.prototype.gb=function(x,Q,c,$){this.VG(Q,u.E.M,{d:u.H.gR,f:this.id,RH:[x.m,x.e]})};
X.r7.prototype.L5=function(x,Q){var c=this.B5.hZ(),$=d.A.cl(c),z=this.a0j(x,c),j=!1,U=this.Xq,i=U.jb,b=U.v$,e=i.x,k=i.y,R;
if(this.id==X.LZ&&i.z_==2&&z.P()!=e*k){z=new gh(z.x,z.y,e,k);j=!0}var K=d.D.u_(c,z);K=d.D.HQ(K);var g=d.D.up(K),T=Math.atan2(K[3],K[0]),D=new gh(0,0,x.m,x.e);
if(Math.abs(T)>1e-9||!g||j||b||U.iv)R=this.Jb(x,Q,!0,K,1,$,U.iv);else if(z.HM(D))return;var a=new dg(this.name,this);
a.data={su:R,YQ:K,oH:x.Q.z.clone(),Hi:X.r7.a1w(x,z,D,!1)};X.r7.akO(x,a.data,z);x.kp(a);this.Tz(a.data,x);
this.track(X.r7.as8([$.x,$.y,$.m,$.e],null,b))};X.r7.akO=function(x,Q,c){if(c==null)return;Q.oT=new gh(0,0,x.m,x.e);
Q.gq=c};X.r7.sq=function(x,Q){if(Q.gq==null)return;X.r7.v$(x,Q.gq)};X.r7.zh=function(x,Q){if(Q.gq==null)return;
var c=Q.oT.clone();c.offset(-Q.gq.x,-Q.gq.y);X.r7.v$(x,c)};X.r7.prototype.a0j=function(x,Q){var c=d.D.u_(Q),$=d.D.up(c),z=d.D.uL(c),j=z.DX,U=z.ti,i=Math.atan2(z.J,z.V);
z.rotate(i);var b=new gh(j,U,z.V,z.xq);if(!$){function e(f,F,y){var Z=f[F]-f[y],v=f[F+1]-f[y+1];return Math.sqrt(Z*Z+v*v)}var k=e(Q,0,2),K=e(Q,4,6),g=Math.max(k,K),R=e(Q,2,4),T=e(Q,6,0),D=Math.max(R,T),a=X.r7.DE(Q,x.m/2,x.e/2),_,I;
if(isNaN(a)||a==Infinity||a==-Infinity||Math.min(a,1/a)<.1)a=(k+K)/(R+T);if(g/D>a){_=g*1;I=_/a}else{I=D*1;
_=I*a}b.m=_;b.e=I}b.x=Math.round(b.x);b.y=Math.round(b.y);b.m=Math.round(b.m);b.e=Math.round(b.e);return b};
X.r7.DE=function(x,Q,c){var $=x[0]-Q,z=x[1]-c,j=x[2]-Q,U=x[3]-c,i=x[6]-Q,b=x[7]-c,e=x[4]-Q,k=x[5]-c,K=((z-k)*i-($-e)*b+$*k-z*e)/((U-k)*i-(j-e)*b+j*k-U*e),g=((z-k)*j-($-e)*U+$*k-z*e)/((b-k)*j-(i-e)*U+i*k-b*e),R=-((g*b-z)*(K*U-z)+(g*i-$)*(K*j-$))/((g-1)*(K-1));
function T(a){return a*a}var D=Math.sqrt((T(K-1)+T(K*U-z)/R+T(K*j-$)/R)/(T(g-1)+T(g*b-z)/R+T(g*i-$)/R));
if(K==1&&g==1)D=Math.sqrt((T(U-z)+T(j-$))/(T(b-z)+T(i-$)));return D};X.r7.prototype.mK=function(x,Q,c,$){if(x==null)return;
if(this.B5)this.B5.clear(x);this.B5=null;this.VG(Q,u.E.M,{d:u.H.gR,f:this.id,_R:!1})};X.r7.prototype.disable=function(x,Q,c,$){if(this.B5)this.L5(x,c);
this.mK(x,Q,c,$)};X.r7.prototype.VG=function(x,Q,c,$){var z=new jO(Q,!0);z.data=c;if($)z.f=$;x.T(z)};
X.a8x=function(){X.r7.call(this,[10,2],X.LZ,"tools/rcrop")};X.a8x.prototype=new X.r7;X.a9e=function(){X.r7.call(this,[10,39],X.IY,"tools/pcrop")};
X.a9e.prototype=new X.r7;X.r8=function(){X.x7.call(this,[10,21],X.BP,"tools/dodge");this.VJ="dodge"};
X.r8.prototype=new X.x7;X.r8.prototype.Eu=function(x,Q,c,$,z){this.nB(x,c,$,z,this.h8.expo/Math.PI);
if(this.Vr==null)return;this.X4(x)};X.r8.prototype.CK=function(x,Q,c,$,z){this.iB(x,Q,c);if(this.sO)this.jB(x,c,z);
if(this.Vr==null)return;if(!z.TZ)return;this.QG(x,c,$,z);this.X4(x)};X._F=function(){X.x7.call(this,[10,3],X.tH,"tools/eraser");
this.VJ="erase"};X._F.prototype=new X.x7;X._F.prototype.Eu=function(x,Q,c,$,z){this.nB(x,c,$,z,this.h8.flow);
if(this.Vr==null)return;this.X4(x)};X._F.prototype.CK=function(x,Q,c,$,z){this.iB(x,Q,c);if(this.sO)this.jB(x,c,z);
if(this.Vr==null)return;if(!z.TZ)return;var j=this.QG(x,c,$,z);this.X4(x)};X.Mq=function(){X.x7.call(this,[10,45],X.NB,"tools/beraser");
this.VJ="ierase"};X.Mq.prototype=new X.x7;X.Mq.prototype.Eu=function(x,Q,c,$,z){if(this.NU(x,Q,c,$,z,!0))return;
this.nB(x,c,$,z,this.h8.flow);if(this.Vr==null)return;this.X4(x)};X.Mq.prototype.CK=function(x,Q,c,$,z){if(this.NU(x,Q,c,$,z))return;
this.iB(x,Q,c);if(this.sO)this.jB(x,c,z);if(this.Vr==null)return;if(!z.TZ)return;this.QG(x,c,$,z);this.X4(x)};
X.Y1=function(){X.U_.call(this,[10,15],X.kJ,"tools/rselect");this.bY="crosshair"};X.Y1.prototype=new X.U_;
X.Y1.prototype.G3=function(x,Q,c,$){if(!$.TZ||!this.sR)return;var z=this.Pe(x,c,!0);x.N.LV=d.A.Hg(z);
x.vu=!0;X.Ur.fZ($,z,x,Q)};X.Y1.prototype.zc=function(x,Q,c,$){x.N.LV=null;x.N.It=[];x.vu=!0;this.finish(x,Q,c,$)};
X.Y1.prototype.getSelection=function(x,Q,c,$){if(this.Tl.HM(this.Oq)||!this.sR)return null;var z=this.Pe(x,c,!0);
if(z._6())return null;return X.U_.w7("Rctn",z,this.h8.anta)};X.GI=function(){X.U_.call(this,[10,4],X.ams,"tools/eselect");
this.bY="crosshair"};X.GI.prototype=new X.U_;X.GI.prototype.G3=function(x,Q,c,$){if(!$.TZ||!this.sR)return;
var z=this.Pe(x,c);x.N.LV=X.GI.akw(z);x.vu=!0;X.Ur.fZ($,z,x,Q)};X.GI.prototype.zc=function(x,Q,c,$){x.N.LV=null;
x.N.It=[];x.vu=!0;this.finish(x,Q,c,$)};X.GI.prototype.getSelection=function(x,Q,c,$){if(this.Tl.HM(this.Oq)||!this.sR)return null;
var z=this.Pe(x,c);if(!z.dM(new gh(0,0,x.m,x.e)))return null;return X.U_.w7("Elps",z,this.h8.anta)};
X.GI.akw=function(x){var Q=x.x,c=x.y,$=x.x+x.m,z=x.y+x.e,j=(Q+$)/2,U=(c+z)/2,i=(Q-$)/2,b=(c-z)/2,e=.5522848,k={j:[j,U-b],G:["M","C","C","C","C"]};
k.j.push(j+e*i,U-b,j+i,U-e*b,j+i,U);k.j.push(j+i,U+e*b,j+e*i,U+b,j,U+b);k.j.push(j-e*i,U+b,j-i,U+e*b,j-i,U);
k.j.push(j-i,U-e*b,j-e*i,U-b,j,U-b);return k};X.vt=function(x){X.Ur.call(this,[10,5],x?X.WL:X.it,"tools/eyedropper");
this.E_=null;this.akp=!1;this.fM=0;this.tO=null;this.nY=1;this.jZ=2;this.aAv=!0;this.Ox=!1};X.vt.prototype=new X.Ur;
X.vt.prototype.R4=function(x){return x.TZ};X.vt.prototype.enable=function(x,Q,c,$,z){X.Ur.prototype.enable.call(this,x,Q,c,$,z);
this.akp=z};X.vt.prototype.To=function(x,Q,c,$,z){if(x.d=="pickhere")this.WF(c,Q,z,null,x.abA);if(x.d=="supertool")this.E_=x.f};
X.vt.prototype.Eu=function(x,Q,c,$,z){var j=this.E_;if(j){j.Eu(x,Q,c,$,z);return}this.fM=c.Gj;this.tO=z;
var U=this.WF(x,null,c,$,z);this.Rv(x,Q,U,z)};X.vt.prototype.CK=function(x,Q,c,$,z){var j=this.E_;if(j){j.CK(x,Q,c,$,z);
return}var U=this.tO;if(U){var i=z.x-U.x,b=z.y-U.y,e=1,k=new bC(U.x+i*e,U.y+b*e),K=this.WF(x,null,c,$,k);
this.Rv(x,Q,K,k,new bC(i*(1-e),b*(1-e)))}};X.vt.prototype.Rv=function(x,Q,c,$,z){var j=this.aAv,U=this.Ox;
if(x.Q.W>4)U=!1;if(!U&&!j)return;var i=X.vt.ajh(x,U,j,$,z,c,this.fM,this.nY),b=new jO(u.E.M,!0);b.data={d:u.H.aK,Wu:i};
Q.T(b)};X.vt.prototype.km=function(x,Q,c,$,z,j){var U=this.E_;if(U){U.km(x,Q,c,$,z);return}this.WF(x,Q,c,$,z);
if(this.tO){this.tO=null;if(j)this.WF(x,Q,c,$,z,this.fM);var i=new jO(u.E.M,!0);i.data={d:u.H.aK,Wu:"default"};
Q.T(i)}};X.vt.prototype.WF=function(x,Q,c,$,z,j){if(j==null)j=X.vt.VM(x,z,this.nY,this.jZ);var U=new jO(u.E.M);
U.data={d:u.H.hW,hF:ke.$s,Zq:!this.akp&&$&&$.S(fM.Al)?1:0,b:j};if(Q)Q.T(U);return j};X.vt.ajh=function(x,Q,c,$,z,j,U,i){if(z==null)z=new bC(0,0);
var b=new gh(0,0,x.m,x.e),e=x.VY(),k=12,K=11,g=(k*2+1)*K,R=new bC(g/2,g/2),T=new gh(0,0,g,g),D=d.R(T.P()*4),a=x.Q.$X($.x,$.y),_=Math.floor(a.x),I=Math.floor(a.y),f=new bI;
f.scale(1/K,1/K);f.translate(_-k,I-k);if(Q)d.scale.azx(e,b,f,D,T);var y=(k-3.4)*K,Z=(k-1.7)*K,v=k*K;
for(var G=0;G<g;G++)for(var q=0;q<g;q++){var h=bC.Xc(new bC(q,G),R);if(h>y){if(c){var r=Math.max(0,y-h+1),H=(G*g+q)*4,o=D[H+3]<<24|D[H]<<16|D[H+1]<<8|D[H+2],P=255<<24|(G<v+K*.5?j:U);
if(h>Z){r=Math.max(0,Z-h+1);o=P;P=4286611584}else if(!Q){o=P&16777215}D[H+0]=(1-r)*(P>>>16&255)+r*(o>>>16&255);
D[H+1]=(1-r)*(P>>>8&255)+r*(o>>>8&255);D[H+2]=(1-r)*(P>>>0&255)+r*(o>>>0&255);D[H+3]=(1-r)*(P>>>24&255)+r*(o>>>24&255)}if(h>v){D[(G*g+q)*4+3]=Math.max(0,255*(v-h+1))}}}function O(F){var V=F<<2;
D[V]=0;D[V+1]=0;D[V+2]=0;D[V+3]=255}function p(F){var V=F<<2;D[V]=255;D[V+1]=255;D[V+2]=255;D[V+3]=255}var C=i*K+2,W=g-C>>>1,J=W+C-1;
if(Q&&C<g)for(var F=0;F<C;F++){var t=W*g+W+F,Y=J*g+W+F,l=(W+F)*g+W,m=(W+F)*g+J;O(t);O(Y);O(l);O(m);if(F!=0&&F!=C-1){p(t+g);
p(Y-g);p(l+1);p(m-1)}}if(!Q)for(var F=-9;F<=9;F++){if(-3<F&&F<3)continue;var B=g>>>1,q=B*g+B+F,G=(B+F)*g+B;
p(q-g);O(q);p(q+g);p(G-1);O(G);p(G+1)}var L=j>>>16&255,A=j>>>8&255,S=j>>>0&255,M="RGB "+L+","+A+","+S,N=d.ru([L/255,A/255,S/255]);
if(x.add.fcmy)M="CMYK "+N.map(function(V){return Math.round(V*100)}).join(",");var s=X.Ur.hz(0,0,["#"+d.vg(j),M]),b=s[1];
b.y=0;b.x=g-b.m>>>1;d.WK(s[0],b,D,T);return{QK:D,W4:T,pt:new bC(R.x+z.x,R.y+z.y)}};X.vt.VM=function(x,Q,c,$,z){if($==null)$=2;
var j=x.Q.$X(Q.x,Q.y),U,i,b=x.g.length==1&&x.B[x.g[0]].kk>0&&z!=!0,e=x.oW.length!=0,Z=0,v=0,G=0;if(b||e){var k;
if(e)k=x.fG[x.oW[0]];else{var K=x.B[x.g[0]];k=K.kk==1?K.Rz():K.a9m()}i=k.Pe();if(!i.Wl(j))return k.color==0?0:16777215;
U=d.R(i.P()*4);U.fill(255);var g=k.hO();d.ZM(g,U)}else if($==0&&x.g.length!=0){var K=x.B[x.g[0]];U=K.buffer;
i=K.rect}else{U=$==2?x.VY():x.VY(x.g[0]);i=new gh(0,0,x.m,x.e)}var R=Math.floor(j.x)-i.x,T=Math.floor(j.y)-i.y,D=(c-1)/2,a=Math.max(0,R-D),_=Math.max(0,T-D),I=Math.min(i.m,R+D+1),f=Math.min(i.e,T+D+1),y=(I-a)*(f-_);
for(var R=a;R<I;R++)for(var T=_;T<f;T++){var F=4*(T*i.m+R);Z+=U[F];v+=U[F+1];G+=U[F+2]}Z=Math.round(Z/y);
v=Math.round(v/y);G=Math.round(G/y);return Z<<16|v<<8|G};X.vt.prototype.np=function(x){var Q=x.h8;this.nY=[1,3,5,11,31][Q[0]];
this.jZ=Q[1];this.aAv=Q[2];this.Ox=Q[3]};X._q=function(){X.Ur.call(this,[10,6],X.o8,"tools/gradient");
this.h8={I:JSON.parse(aF.Q5.aAE).v,Ry:"Lnr",$S:!1,Nb:!1,acS:"norm",j_:1};this.OJ=!1;this.Yh=null};X._q.prototype=new X.Ur;
X._q.prototype.enable=function(x,Q,c,$){var z=new jO(u.E.M,!0);z.data={d:u.H.aK,Wu:"default"};Q.T(z)};
X._q.prototype.np=function(x){this.h8=x.hF};X._q.prototype.Eu=function(x,Q,c,$,z){if(!x.hS())return;
this.Yh=x.Q.$X(z.x,z.y);this.Yh=X.qV.Bw(x,this.Yh,c);this.OJ=!0};X._q.prototype.CK=function(x,Q,c,$,z){if(!this.OJ)return;
var j=x.Q.$X(z.x,z.y);j=X.qV.Bw(x,j,c);if($.S(fM.FT))j=X._q.Lz(this.Yh,j);x.N.LV={j:[this.Yh.x,this.Yh.y,j.x,j.y],G:["M","L"]};
x.N.SE=[this.Yh.x,this.Yh.y,j.x,j.y];x.vu=!0};X._q.prototype.km=function(x,Q,c,$,z){if(!this.OJ)return;
var j=x.B[x.g[0]],U=x.Q.$X(z.x,z.y);U=X.qV.Bw(x,U,c);if($.S(fM.FT))U=X._q.Lz(this.Yh,U);var i=U.HY(this.Yh),b=bC.dW(this.Yh,U,.5),e=Math.atan2(i.y,i.x),k=bC.Xc(this.Yh,U),K=Math.sin(e),g=Math.cos(e);
if(k>2){var R;if(x.u)R=x.u.rect;else R=new gh(0,0,x.m,x.e);var T=d.R(R.P()*4),D=this.h8,a=D.Ry;if(a!="Lnr"){k*=2;
b=this.Yh}d.I.yV(D.I,T,R,[g*1/k,K*1/k,-K*1/k,g*1/k],b.x,b.y,D.$S,aF.I.types.indexOf(a),c.Gj,c.QI,null,D.Nb);
var _=Math.round(D.j_*256),I=T.length;if(_!=256)for(var F=0;F<I;F+=4)T[F+3]=T[F+3]*_>>>8;var f=new jO(u.E.v);
f.f=X.tH;f.data={d:"fillBMP",Gq:T,iu:D.acS,LX:this.name};Q.T(f)}x.N.LV=null;x.N.SE=[];x.vu=!0;this.OJ=!1};
X._q.prototype.To=function(x,Q,c,$,z){function j(g){g=g.v;var R=g.Hrzn.v.val,T=g.Vrtc.v.val;return c.Q.wu(R,T)}if(x.d=="fromAction"){var U=this.h8,i=this.h8={};
for(var b in U)i[b]=U[b];var e=x.fe.dx;if(e.Opct)i.j_=e.Opct.v.val/100;if(e.Dthr)i.Nb=e.Dthr.v;if(e.Grad)i.I=e.Grad.v;
if(e.Type)i.Ry=e.Type.v.GrdT;var k=j(e.From),K=j(e.T);this.Eu(c,Q,z,$,k);this.km(c,Q,z,$,K);this.h8=U}};
X._q.Lz=function(x,Q){if(x.HM(Q))return x;var c=Q.x-x.x,$=Q.y-x.y,z=Math.abs(c),j=Math.abs($);if(z>j)j=z/2>j?0:z;
if(j>z)z=j/2>z?0:j;z=c>0?z:-z;j=$>0?j:-j;var U=Math.sqrt(c*c+$*$)/Math.sqrt(z*z+j*j);return new bC(x.x+z*U,x.y+j*U)};
X._q.Zh=function(x,Q,c,$,z,j,U){var i=new gh(0,0,Q,c),b=d.R(Q*c*4);d.ma(b,Q,c,4);var e=Math.sin($),k=Math.cos($),K=d.R(Q*c*4);
d.I.yV(x,K,i,[k*1/Q,e*1/Q,-e*1/c,k*1/c],Q/2,c/2,!1,0,z,j);d.l.UY("norm",K,i,b,i,i,1);if(U)return new ImageData(new Uint8ClampedArray(b.buffer),Q,c);
else return ar.mL(b.buffer,Q,c,null,null,!0)};X._q.aju=function(x,Q,c){var $=JSON.parse(JSON.stringify(x));
if($.Clrs)for(var F=0;F<$.Clrs.v.length;F++){var z=$.Clrs.v[F].v,j=z.Type.v.Clry;if(j=="UsrS")continue;
var U=j=="FrgC"?Q:c;z.Type.v.Clry="UsrS";z.Clr={t:"Objc",v:d.I.lV({Z:U>>16&255,r:U>>8&255,J:U&255})}}return $};
X.Wo=function(){X.Ur.call(this,[10,7],X.Oi,"tools/hand");this.Tm=!1;this.tO=new bC(0,0);this.ll=null;
this.V9=0};X.Wo.prototype=new X.Ur;X.Wo.prototype.np=function(x,Q,c,$){this.Tm=x.Tm};X.Wo.prototype.To=function(x,Q,c,$,z){var j=x.d;
if(j=="setcls"){c.Q.O=x.O;c.vu=!0;c.Fq=!0}if(j=="scroll"&&!$.S(fM.Al)){if($.S(fM.qP))X.Wo.$u(c,c.Q.z.x-x.Kj.y,c.Q.z.y-x.Kj.x);
else X.Wo.$u(c,c.Q.z.x-x.Kj.x,c.Q.z.y-x.Kj.y)}};X.Wo.prototype.enable=function(x,Q,c,$){this.ll=null;
var z=new jO(u.E.M,!0);z.data={d:u.H.aK,Wu:"grab"};Q.T(z);if(x&&Date.now()-this.V9<300){z.type=u.E.v;
z.f=X.QT;z.data={d:"adapt",b:"fitscr"};Q.T(z)}this.V9=Date.now()};X.Wo.prototype.Eu=function(x,Q,c,$,z){this.ll=x.Q.z.clone();
this.tO.r$(z.x,z.y)};X.Wo.prototype.CK=function(x,Q,c,$,z){if(!z.TZ)return;if(this.ll==null)this.Eu(x,Q,c,$,z);
var j=this.Tm?Q.H0:[x];for(var F=0;F<j.length;F++)X.Wo.$u(j[F],this.ll.x+(z.x-this.tO.x),this.ll.y+(z.y-this.tO.y))};
X.Wo.prototype.km=function(x,Q,c,$,z){this.ll=null};X.Wo.$u=function(x,Q,c){var $=x.Q.W,z=x.Q.yY,j=z.m,U=z.e,i=x.m*$,b=x.e*$,e=i<j&&b<U,k=j/2+i/2-64,K=U/2+b/2-64;
x.Q.z.r$(Math.max(-k,Math.min(k,Q)),Math.max(-K,Math.min(K,c)));x.Fq=!0};X.VH=function(){X.Ur.call(this,[10,47],X.aw,"tools/rview");
this.tO=new bC(0,0);this.pJ=null;this.dg=null;this.V9=0};X.VH.prototype=new X.Ur;X.VH.prototype.enable=function(x,Q,c,$){this.ll=null;
var z=new jO(u.E.M,!0);z.data={d:u.H.aK,Wu:"grab"};Q.T(z);if(x&&Date.now()-this.V9<300&&x.Q.A6!=0){x.Q.A6=0;
x.vu=!0}this.V9=Date.now();if(x)this.KP(x,Q)};X.VH.prototype.disable=function(x,Q,c,$,z){if(x)this.KP(x,Q)};
X.VH.prototype.Lg=function(x,Q,c,$){if(x)this.KP(x,Q)};X.VH.prototype.Eu=function(x,Q,c,$,z){this.tO.r$(z.x,z.y);
var j=x.Q;this.pJ=j.$X(j.yY.m/2,j.yY.e/2);this.dg=j.FG();var U=j.$X(j.yY.m/2,j.yY.e/2),i=Math.min(j.yY.m,j.yY.e)*.35/j.W,b=i*.2,e=U.x,k=U.y;
x.N.LV={G:"M L L L L L".split(" "),j:[e,k,e,k-i,e+b,k,e,k+i,e-b,k,e,k-i]};x.vu=!0};X.VH.prototype.awQ=function(x){var Q=x.Q,c=Q.$X(Q.yY.m/2,Q.yY.e/2);
x.N.LV={G:["M","L"],j:[c.x,c.y,c.x,c.y-200]}};X.VH.prototype.CK=function(x,Q,c,$,z){if(!z.TZ)return;
var j=x.Q,U=this.pJ,i=this.tO,b=new bC(j.yY.m/2,j.yY.e/2),e=Math.atan2(z.y-b.y,z.x-b.x),k=Math.atan2(i.y-b.y,i.x-b.x),K=Math.atan2(this.dg.J,this.dg.V),g=e-k,R=Math.PI/4;
if($.S(fM.FT)){g=K+R*Math.round((g-K)/R)}this.anU(x,Q,this.dg.clone(),U,g)};X.VH.prototype.km=function(x,Q,c,$,z){x.N.LV=null;
x.vu=!0};X.VH.prototype.np=function(x,Q,c,$){this.anU(c,Q,null,null,x.fN-c.Q.A6);c.Q.A6=x.fN};X.VH.prototype.anU=function(x,Q,c,$,z){var j=x.Q;
if(c==null)c=j.FG();if($==null)$=j.$X(j.yY.m/2,j.yY.e/2);c.translate(-$.x,-$.y);c.rotate(z);c.translate($.x,$.y);
j.atn(c);if(x.m*j.W<j.yY.m&&x.e*j.W<j.yY.e)j.z.r$(0,0);x.vu=!0;this.KP(x,Q)};X.VH.prototype.KP=function(x,Q){var c=new jO(u.E.M,!0);
c.data={d:u.H.gR,f:this.id,fN:x.Q.A6};Q.T(c)};X.BR=function(){X.Z4.call(this,[10,25],X.$r,"tools/hbrush")};
X.BR.prototype=new X.Z4("");X.BR.prototype.km=function(x,Q,c,$,z){if(this.Vr==null)return;this.S1(x,"heal",this.Vr.GM(),this.Vr.Pe(),this.Vr.vJ());
this.c(x,this.Vr.vJ());X.x7.prototype.km.call(this,x,Q,c,$,z);if(!this.h8.algnd)this.z=null};X.ca=function(x){X.Ur.call(this,x?["VAR0 VAR1",[22,4,1],[10,8]]:[10,8],x?X.oX:X.gr,x?"tools/vtype":"tools/htype");
this.Jn=[];this.B4=null;this.caller=null;this.wK=1;this.ib=0;this.cr=null;this.apV=0;this.B0=0;this.aoz=null;
this.S_=null;this.gp=null;this.AT=null;this.A7=null;this.eG=null;this.aon=null;this.N7=null;this.B5=null;
this.kA=null;this.aoi=null;this.S6=!1;this.uB=!1;this.iU=!1;this.RW=null;this.If=null;this.aiO=null;
this.Uj=!1;this.hL=!1;this.C7=-1;this.kj=-1;this.GL=document.createElement("textarea");this.GL.setAttribute("style","font-family:Arial; font-size:14px; z-index:-1; "+" position:absolute; top:0px; left:0px;  pointer-events: none; opacity:0; width:"+(window.innerWidth-10)+"px; height:150px;");
this.GL.addEventListener("input",this.Ep.bind(this),!1);this.GL.addEventListener("keydown",this.at3.bind(this),!1);
this.GL.addEventListener("keyup",this.a4_.bind(this),!1)};X.ca.prototype=new X.Ur;X.ca.prototype.R4=function(x){return x.TZ};
X.ca.prototype.gb=function(x,Q,c,$){if(this.gp!=null||this.id==X.oX)return;this.caller=Q;var z=this.a0y(x);
if(z.length!=0){var j=null,U=[],i=[];for(var F=0;F<z.length;F++){var b=x.B[z[F]],e=b.add.TySh,k=0,K=dU.bs(e.HW).length-2,g=dU.zl(e.HW,k,K);
dU.g5(g,e.i.c0());if(g.VA.Font!=null)g.VA.Font=g._t[g.VA.Font].Name;j=g._t;U.push(g.VA);i.push(g.SW)}var g={_t:j,VA:dU.Vi(U),SW:dU.Vi(i)};
if(g.VA.Font!=null)dU.gD(g,g.VA.Font);this.a6N(Q,g,e)}};X.ca.prototype.a0y=function(x){var Q=[];for(var F=0;
F<x.g.length;F++)if(x.B[x.g[F]]&&x.B[x.g[F]].add.TySh)Q.push(x.g[F]);return Q};X.ca.prototype.To=function(x,Q,c,$,z){var j=x.d=="insertGlyph",U=x.d=="copyText",i=x.d=="selectAll";
if((j||U||x.d=="insertText"||i)&&this.gp){var b=j?String.fromCharCode(65533):x.b,e=this.GL,k=e.value,K=e.selectionStart,g=e.selectionEnd;
if(U){hF.At(new Blob([k.slice(K,g)],{type:"text/plain"}))}else if(i){this.C7=e.selectionStart=0;this.kj=e.selectionEnd=k.length;
this.Ba(c);e.focus()}else{e.value=k.slice(0,K)+b+k.slice(g);e.selectionStart=e.selectionEnd=K+b.length;
this.Ep(null,j?x.b:null);e.focus()}}if(x.d=="updateStyles"){if(this.gp==null){var R=this.a0y(c),T=!1;
if(R.length!=0){this.$t(c,Q,z,R);for(var F=0;F<R.length;F++){var D=c.B[R[F]],a=D.add.TySh;dU.AM(a,this.wK);
a.Gb.VAlign.v=this.ib;this.gp=D;var _=dU.bs(a.HW);this.C7=0;this.kj=_.length-1;dU.G4(a.HW,this.C7,this.kj,this.Nw(z,a));
var I=this.Wz(c,z);if(I==!1)T=!0}if(T){this.Uj=!0;return}this.UM(c,Q,!0)}return}this.hM(z)}if(x.d.startsWith("warp")){var f=this.hL;
if(x.d=="warp"||x.d=="warpCancel"){if(this.gp==null)return;if(x.d=="warp")this.gp.add.TySh.f2=x.fr;else this.gp.add.TySh.f2=this.aon;
this.Wz(c,z);if(!f)this.Ba(c)}if(x.d!="warp")this.GL.focus();if((x.d=="warpConfirm"||x.d=="warpCancel")&&f){this.hL=!1;
if(x.d=="warpConfirm")this.UM(c,Q);else this.ce(c,Q)}}if(x.d=="editCurr"){if(z.Oj!=X.gr){this.cr=z.Oj;
var y=new jO(u.E.M,!0);y.data={d:u.H.ax,f:X.gr};Q.T(y)}if(this.gp!=null)this.disable(c,Q,z,$);this.B4=z;
this.caller=Q;this.$t(c,Q,z,[x.fU]);var _=dU.bs(this.gp.add.TySh.HW);this.C7=0;this.kj=_.length-1;this.Ba(c);
this.x4();this.GL.focus()}if(x.d=="switchPntPrgr"){if(this.gp)return;var D=c.B[c.g[0]],a=D.add.TySh,Z=a.i.c0(),v=D.Q8(),G=JSON.parse(JSON.stringify(a.HW)),q=dU.SI(G),h=q==1?dU.Sx(G):[0,0,Math.round(v.m*1.05/Z),Math.round(v.e*1.25/Z)],r=dU.zl(G,0,0),H=r._t[r.VA.Font].Name,o=z.Dn.WY(H),P=[0,h[2],h[2]/2][r.SW.Justification%3],O=(o?fQ.c_(o):.8)*r.VA.FontSize;
dU.DY(G,1-q);if(q==0){console.log(fQ.c_(o,H,r.VA));P=-P;O=-O;dU.ei(G,[0,0,h[2],h[3]])}var p=new bI(1,0,0,1,P,O);
p.concat(a.i);this.To({Tc:c.g[0],d:"newED",vY:G,i:p,a6b:[16,3,q==1?0:1]},Q,c,$,z)}if(x.d=="newED"){var D=c.B[x.Tc],a=D.add.TySh,C=this.ra(c,[x.Tc]);
a.HW=x.vY;if(x.i)a.i=x.i;if(aE.$B(a,z.Dn,Q)){aE.Wz(D,z.Dn,c);c.c()}else c.RS=!0;var W=new dg(x.a6b?x.a6b:this.name,this);
W.data={PD:C,Ae:this.ra(c,[x.Tc])};c.kp(W)}if(x.d=="fromAction"){var J=x.fe.dx.Usng.v,t=J.TxtC.v,Y=[];
for(var F=0;F<2;F++){var l=t[F==0?"Hrzn":"Vrtc"].v,b=l.val;if(l.type=="#Prc")b=(F==0?c.m:c.e)*(b/100);
Y[F]=b}this.Cl(c,Q,z,$,c.Q.wu(Y[0],Y[1]),!0);var D=c.B[c.g[0]],a=D.add.TySh,m=a.HW,k=dU.bs(m);dU.DH(m,0,k.length-1);
dU.U3(m,0,J.Txt.v.replace(/\r/g,"\n"));k=dU.bs(m);for(var q=0;q<2;q++){var B=J[q==0?"Txtt":"paragraphStyleRange"].v;
for(var F=0;F<B.length;F++){var L=B[F].v,K=L.From.v,g=Math.min(L.T.v-1,k.length-1);L=L[q==0?"TxtS":"paragraphStyle"].v;
var A=dU.zl(m,K,g),S=q==0?A.VA:A.SW;for(var M in L){var N=L[M].v;if(M=="Sz")S.FontSize=Math.round(N.val*(N.type=="#Pnt"?c.cQ/72:1));
else if(M=="fontPostScriptName")dU.gD(A,N);else if(M=="Algn")S.Justification={Left:1,Cntr:2}[N.Alg];
else if(M=="leading")S.Leading=L[M].v.val;else if(M=="baselineShift")S.BaselineShift=L[M].v.val;else if(M=="autoLeading")S.AutoLeading=L[M].v;
else if(M=="syntheticBold")S.FauxBold=L[M].v;else if(M=="syntheticItalic")S.FauxItalic=L[M].v;else if(M=="Trck")S.Tracking=L[M].v;
else if(M=="verticalScale")S.VerticalScale=L[M].v/100;else if(M=="horizontalScale")S.HorizontalScale=L[M].v/100;
else if(M=="Clr")S.FillColor={Type:1,Values:[1,N.Rd.v/255,N.Grn.v/255,N.Bl.v/255]}}dU.G4(m,K,g,A)}}if(aE.R6(c,z.Dn,Q))aE.Wz(D,z.Dn,c);
else c.RS=!0;c.c();this.UM(c,Q)}};X.ca.prototype.hM=function(x){var Q=Math.min(this.C7,this.kj),c=Math.max(this.C7,this.kj),$=this.gp.add.TySh;
dU.AM($,this.wK);$.Gb.VAlign.v=this.ib;var z=this.Nw(x,$);dU.G4($.HW,Q,c-1,z);var j=this.caller.TW(),U=this.Wz(j,x);
if(U)this.Ba(j);if(document.activeElement.tagName.toLowerCase()!="input")this.GL.focus()};X.ca.prototype.Da=function(x){return this.Jn.indexOf(x)!=-1};
X.ca.prototype.enable=function(x,Q,c,$){var z=this.GL;Q.n.appendChild(z);this.N7="default";this.Rv(Q)};
X.ca.prototype.sD=function(){return this.gp!=null};X.ca.xU=function(x,Q){var c=new bC(Q.x,Q.y);for(var F=x.B.length-1;
F>=0;F--){var $=x.B[F],z=$.add.TySh;if(z&&x.alZ(F)){var j=c,U=$.rect;if(i9==1){var i=z.i.clone();i.HQ();
j=i.RE(c);U=$.ft.os}if(!U.Wl(j))continue;var b=$.e6(31);return b?-2:F}}return-1};X.ca.prototype.Eu=function(x,Q,c,$,z){this.B4=c;
this.caller=Q;var j=x.Q.$X(z.x,z.y),U=this.gp==null;if(U){var i=X.ca.xU(x,j);if(i==-2){alert(ah.get([6,57,0]));
return}if(i>=0&&!$.S(fM.FT)){if(!aE.$B(x.B[i].add.TySh,c.Dn,Q)){alert("Fonts not loaded yet");return}this.$t(x,Q,c,[i])}else{this.iU=!0;
this.RW=z;return}}var b=U?-1:dU.SI(this.gp.add.TySh.HW),e=this.kA?this.kA:this.B5,k=e&&e.Eu(x,c,$,j,null,null,z)&&d.fr.Cu(this.gp.add.TySh.f2),K=!U&&d.A.aep(j,this.gp.Q8())>20/x.Q.W&&(b==0||b==1);
if(k||K){this.S6=!0;this.If=j;this.aiO=this.gp.add.TySh.i.clone();if(this.C7==-1&&this.kj==-1)this.C7=this.kj=this.pP(j)}else{if(this.A7==null){alert("Fonts not loaded yet");
return}this.uB=!0;this.C7=this.kj=this.pP(j);var g=Date.now();if(g-this.apV>300)this.B0=0;this.B0++;
this.apV=g;if(this.B0==2)this.ake();if(this.B0==3)this.aBm();if(this.B0>1){this.uB=!1}}this.x4();this.Ba(x)};
X.ca.prototype.$t=function(x,Q,c,$){var z=x.B[$[0]];this.gp=z;this.VG(Q,u.E.M,{d:u.H.gR,f:this.id,Iu:"showactive"});
this.AT=$;x.g=$.slice(0);x.la();x.Rr=!0;this.eG=this.ra(x,$);this.g2(z.add.TySh);this.Wz(x,c)};X.ca.prototype.g2=function(x){if(dU.SI(x.HW)!=1)return;
var Q=dU.Sx(x.HW);Q=new gh(0,0,Q[2]-Q[0],Q[3]-Q[1]);var c=[Q.x,Q.y,Q.x+Q.m,Q.y,Q.x+Q.m,Q.y+Q.e,Q.x,Q.y+Q.e];
d.A.i(c,x.i,c);this.B5=new aH(c,!1,!1,!1,!0);this.B5.wC(0)};X.ca.prototype.ake=function(){var x=dU.bs(this.gp.add.TySh.HW);
this.C7=this.ak6(x,this.C7);this.kj=this.a3u(x,this.C7)};X.ca.prototype.ak6=function(x,Q){var c=" \t\n,.?!_-+=@#$%^&*'\"(){}[]\\/<>:;|",$=[];
for(var F=0;F<c.length;F++)$.push(c.charAt(F));var z=$.indexOf(x[Q])==-1?!0:!1;for(var F=Q-1;F>=0;F--)if($.indexOf(x.charAt(F))!=-1==z)return F+1;
return 0};X.ca.prototype.a3u=function(x,Q){var c=" \t\n,.?!_-+=@#$%^&*'\"(){}[]\\/<>:;|",$=[];for(var F=0;
F<c.length;F++)$.push(c.charAt(F));var z=$.indexOf(x[Q])==-1?!0:!1;for(var F=Q+1;F<x.length;F++)if($.indexOf(x.charAt(F))!=-1==z)return F;
return x.length-1};X.ca.prototype.aBm=function(){var x=this.A7.a03(this.C7);this.C7=x[0];this.kj=x[1]};
X.ca.prototype.Rv=function(x){var Q=new jO(u.E.M,!0);Q.data={d:u.H.aK,Wu:this.N7};x.T(Q)};X.ca.prototype.CK=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y),U=this.gp;
if(!z.TZ){var i="default",b=this.B5,e=this.kA?this.kA:b;if(e&&d.fr.Cu(U.add.TySh.f2)){var k=e.o7(j,x.Q.W,null,z);
if(k)i=k;else if(e==b&&b.uc(j))i="text"}else if(U&&d.A.aep(j,U.Q8())>20/x.Q.W)i="move";else if(X.ca.xU(x,j)>=0)i="text";
if(i!=this.N7){this.N7=i;this.Rv(Q)}}var K=this.RW;if(this.iU&&Math.min(z.x-K.x,z.y-K.y)>4/x.Q.W){this.iU=!1;
this.Cl(x,Q,c,$,z);U=this.gp;this.S6=!0;this.B5=new aH(null,!1,!1,!1,!0);this.B5.wC(0);var g=x.Q.$X(this.RW.x,this.RW.y);
g.x=Math.round(g.x);g.y=Math.round(g.y);this.B5.Eu(x,c,$,g,null,null,z,x.Q.A6)}if(this.S6){var R=U.add.TySh;
if(this.kA){this.kA.CK(x,c,$,j);var T=d.D.uL(d.D.u_(this.kA.hZ(),this.aoi));R.i=T;this.Wz(x,c);dU.jC(R)}else if(this.B5){this.B5.CK(x,c,$,j);
var D=R.i.clone(),a=Math.atan2(D.J,D.V);D.rotate(a);var T=d.D.uL(d.D.u_(this.B5.hZ())),_=Math.atan2(T.J,T.V);
T.rotate(_);if(!isNaN(T.V)&&T.V*T.xq-T.J*T.dC!=0){var I=new gh(0,0,T.V/D.V,T.xq/D.xq),f=Math.round(I.m),y=Math.round(I.e),Z=R.HW.Curve;
if(Z){var v=dU.Sx(R.HW),G=new bI(f/v[2],0,0,y/v[3],0,0);d.A.i(Z.Points,G,Z.Points);dU.jC(R)}dU.ei(R.HW,[0,0,f,y]);
R.i=d.D.uL(d.D.u_(this.B5.hZ(),I));this.Wz(x,c);dU.jC(R)}}else{var q=j.x-this.If.x,h=j.y-this.If.y;R.i=this.aiO.clone();
var r=new bC(R.i.DX+q,R.i.ti+h);r=X.qV.Bw(x,r,c);R.i.DX=r.x;R.i.ti=r.y;this.Wz(x,c)}}if(this.uB)this.kj=this.pP(j);
if(this.S6||this.uB)this.Ba(x)};X.ca.prototype.Cl=function(x,Q,c,$,z,j){var U=x.zo(),i=U[0],b=U[1],e=x.Xh();
e.add.lnsr="rend";var k=x.B.slice(0);e.gF("Text layer "+k.length);this.gp=e;var K=x.g.length==0?x.B.length-1:x.g[x.g.length-1],g=K+1;
if(k[K].add.lsct==hA.DJ)g--;this.eG={GF:k.slice(0),Cj:x.g.slice(0)};k.splice(g,0,e);x.g=[g];this.C7=this.kj=0;
x.Bd(k);this.eG.Yo=k.slice(0);this.eG.UI=x.g.slice(0);this.VG(Q,u.E.M,{d:u.H.gR,f:this.id,Iu:"showactive"});
var R=x.Q.$X(z.x,z.y),T=c._M;console.log(T);if(this.id==X.oX){T=JSON.parse(JSON.stringify(T));T.VA.BaselineDirection=1}e.add.TySh=dU.Y7(R.x,R.y,T,x.Q.A6);
var D=e.add.TySh,a=D.HW;if(this.id==X.oX)a._LineOrientation=2;dU.AM(D,this.wK);D.Gb.VAlign.v=this.ib;
if(z.TZ)dU.DY(a,1);else{dU.DY(a,0);var _=i[b.pop()],I=_?_.add.vmsk:null;if(j)I=null;if(I&&!$.S(fM.FT)){I=I.clone();
var f=I.$,Z,v;for(var F=0;F<f.length;F++)if(f[F].Kp!=null)f[F].Kp=0;var y=5/x.Q.W;Z=d.o.e$(I.$,R,!0,y);
if(Z.xR==-1)Z=d.o.e$(I.$,R);if(Z.xR!=-1){dU.DY(a,1);var G=d.o.dQ(f,Z.xR),q=d.o.T_(f,Z.xR)-1;f=I.$=f.slice(0,2).concat(f.slice(G,G+q+1));
I.g=[];D.add={vmsk:I,vogk:eM.jz(f)};a.Curve={};dU.c5(D);if(Z.xu!=null){var h=fQ.kh(a.Curve);d.A.i(h[0],D.i,h[0]);
var r=d.A.b2(h[0],R.x,R.y),H=c._M.SW.Justification;if(H==2||H==5){var o=(h[2][r]+h[3]*.5)%h[3];r=fQ.oZ(o,h[2])}var P=h[1][r];
P=P%q;I.Sr=[P,P];dU.c5(D)}else this.g2(D)}}}return e};X.ca.prototype.km=function(x,Q,c,$,z,j){if(j){this.iU=!1;
return}if(this.gp==null&&!this.iU)return;var U=x.Q.$X(z.x,z.y),i=this.iU;if(this.iU){this.iU=!1;this.Cl(x,Q,c,$,z);
this.uB=!0}if(this.S6||this.uB){this.Ba(x);this.x4();if(i)this.hM(c)}if(this.S6&&this.B5)this.B5.km(x,c,$,U);
this.S6=this.uB=!1;this.GL.focus()};X.ca.prototype.x4=function(){var x=this.gp.add.TySh,Q=Math.min(this.C7,this.kj),c=Math.max(this.C7,this.kj),$,z;
if(Q==c){var j=dU.bs(x.HW);if(Q==0||j.charAt(Q-1)=="\n")$=z=Q;else $=z=Q-1}else{$=Q;z=c-1}var U=dU.zl(x.HW,$,z);
dU.g5(U,x.i.c0());this.a6N(this.caller,U,x)};X.ca.prototype.a6N=function(x,Q,c){this.VG(x,u.E.M,{d:u.H.hW,hF:ke.kg,_M:Q});
var $=this.wK=dU.Bm(c),z=this.ib=c.Gb.VAlign.v;this.VG(this.caller,u.E.M,{d:u.H.gR,f:this.id,Iu:"changeOther",bL:$,pK:z})};
X.ca.prototype.x1=function(x,Q,c,$,z){if(x==null)return;var j=x.Q.$X(z.x,z.y),U=X.ca.xU(x,j);if(U==-1)return;
var i=new jO(u.E.M,!0);i.data={d:u.H.gR,f:this.id,Iu:"showpan",aiz:this.gp!=null,fU:U,xK:z,rx:x,B4:c};
Q.T(i)};X.ca.prototype.axa=function(){var x=this.gp;if(x&&!this.S6&&this.kA!=null){var Q=this.caller.TW();
this.kA.km(Q,this.B4,null,null);this.kA=null;this.g2(x.add.TySh);this.Ba(Q)}};X.ca.prototype.disable=function(x,Q,c,$){var z=this.gp;
this.UM(x,Q)};X.ca.prototype.np=function(x,Q,c,$,z){if(this.hL)return;if(x.Iu=="commit")this.UM(c,Q);
if(x.Iu=="cancel")this.ce(c,Q);if(x.Iu=="changeOther"){this.wK=x.bL;this.ib=x.pK;if(c!=null)this.To({d:"updateStyles"},Q,c,$,z)}if(x.Iu=="showwarp"){if(c==null)return;
if(this.gp==null){var j=c.B[c.g[0]],U=j.add.TySh;if(U==null)return;this.$t(c,Q,z,[c.g[0]]);this.GL.focus();
this.hL=!0}this.aon=this.gp.add.TySh.f2;var i=new jO(u.E.M,!0);i.data={d:u.H.LL,AD:"textwarp"};Q.T(i)}};
X.ca.prototype.Fy=function(x,Q){if(Q!=ke.Be)return;if(this.Uj){this.Uj=!1;var c=this.caller.TW(),$=this.AT;
for(var F=0;F<$.length;F++){this.gp=c.B[$[F]];this.Wz(c,x)}this.UM(c,this.caller);return}if(this.gp)this.hM(x)};
X.ca.prototype.Nw=function(x,Q){var c=JSON.parse(JSON.stringify(x._M));dU.g5(c,1/Q.i.c0());return c};
X.ca.prototype.Tz=function(x,Q){if(x.PD!=null)this.Cm(Q,x.Ae);else this.amN(Q,x.Yo,x.UI)};X.ca.prototype.pC=function(x,Q){if(x.PD!=null)this.Cm(Q,x.PD);
else this.amN(Q,x.GF,x.Cj)};X.ca.prototype.Cm=function(x,Q){for(var F=0;F<Q.length;F++){var c=Q[F],$=c.Tc,z=x.B[$];
z.buffer=c.aJ;z.rect=c.W4.clone();z.c();z.ft.GD=null;z.ft.path=null;var j=z.add.TySh;j.f2=c.fr;j.Iv=c.Iv.clone();
j.i=c.i.clone();j.HW=JSON.parse(JSON.stringify(c.HW));z.cS()}x.c()};X.ca.prototype.ra=function(x,Q){var c=[];
for(var F=0;F<Q.length;F++){var $=Q[F],z=x.B[$],j=z.add.TySh;c.push({Tc:$,i:j.i.clone(),fr:JSON.parse(JSON.stringify(j.f2)),Iv:j.Iv.clone(),HW:JSON.parse(JSON.stringify(j.HW)),aJ:z.buffer.slice(0),W4:z.rect.clone()})}return c};
X.ca.prototype.amN=function(x,Q,c){x.g=c;x.Bd(Q);x.c();x.tP=!0};X.ca.prototype.Wz=function(x,Q,c){if(c==null)c=!1;
var $=this.gp.add.TySh;if(!aE.$B($,Q.Dn,this.caller))return!1;if(!c){var z=dU.bs($.HW);this.GL.value=z.slice(0,z.length-1)}var j=this.gp.rect,U=aE.Wz(this.gp,Q.Dn,x);
this.A7=U[1];var i=this.A7.Ze();if(d.fr.Cu($.f2))$.Iv=new gh;else{if(dU.SI($.HW)==1){var b=dU.Sx($.HW),jF=i.y;
$.Iv=new gh(0,jF,b[2]-b[0],b[3]-b[1]-jF)}else $.Iv=i}x.jf();if(U[2])x.c(x.root.XW(U[2].W4.iO(j),x,x.B.indexOf(this.gp)));
return!0};X.ca.prototype.Ep=function(x,Q){if(this.gp==null||this.hL)return;var c=this.GL.selectionStart,$=this.gp.add.TySh,z=dU.bs($.HW),j=this.GL.value+"\n",U=Math.min(this.C7,this.kj),i=Math.max(this.C7,this.kj),g=!1;
this.C7=Math.min(c,U);if(j.length-c<z.length-this.kj)this.kj=z.length-j.length+c;if(z!=j){while(this.C7>0&&z.charAt(this.C7-1)!=j.charAt(this.C7-1))this.C7--}var b=z.substring(0,this.C7),e=z.substring(this.kj,z.length),k=j.substring(this.C7,j.length-e.length);
dU.DH($.HW,this.C7,this.kj);dU.U3($.HW,this.C7,k);if(Q!=null)dU.a1J($.HW,this.C7,Q);var K=this.Nw(this.B4,$),R=-1,T=Array.from(k);
for(var F=0;F<T.length;F++)R=Math.max(R,T[F].codePointAt(0));if(R!=-1&&R>128&&R!=65533&&K.VA.Font!=null){var D=K._t[K.VA.Font].Name,a=this.B4.Dn.Kq(R,D,K._t);
if(D!=a){dU.gD(K,a);g=!0}}if(this.S_!=null&&k==this.S_){var _=JSON.parse(this.aoz);dU.g5(_,1/$.i.c0());
K.VA=_.VA;K._t=_._t;g=!0}dU.G4($.HW,this.C7,this.C7+k.length-1,K);this.C7=this.kj=b.length+k.length;
var I=this.caller.TW(),f=this.Wz(I,this.B4,!0);if(f)this.Ba(I,!0);if(g)this.x4()};X.ca.prototype.a4_=function(x){var Q=fM;
if(!x.ctrlKey)this.axa();x.stopPropagation()};X.ca.prototype.at3=function(x){x.stopPropagation();var Q=x.ctrlKey||x.metaKey,c=fM,b=0,e=0,f=0,O=!1;
if(this.gp==null||this.hL)return;if(this.gp==null)return;if(this.caller.ap.sl())return;var $=this.caller.TW();
if(this.kA==null&&Q){var z=this.gp.add.TySh,j=dU.SI(z.HW),U;if(j==1){U=dU.Sx(z.HW);U=new gh(0,0,U[2]-U[0],U[3]-U[1])}else U=this.A7.Ze();
var i=[U.x,U.y,U.x+U.m,U.y,U.x+U.m,U.y+U.e,U.x,U.y+U.e];d.A.i(i,z.i,i);this.kA=new aH(i,!0,!0,!1,!1);
this.kA.wC(0);this.aoi=U;this.Ba($)}if(c.Ma(x.code,c.Eq))b=1;if(c.Ma(x.code,c.h3))b=-1;if(c.Ma(x.code,c.xc))e=-1;
if(c.Ma(x.code,c.Cn))e=1;var k=c.Ma(x.code,fM.J8),K=c.Ma(x.code,fM.ay1);if(c.Ma(x.code,fM.ln)&&Q){this.UM($,this.caller);
return}if(c.Ma(x.code,fM.En)){this.ce($,this.caller);return}if(c.Ma(x.code,fM.TX)){x.preventDefault();
var g=this.GL,R=g.value,T=g.selectionStart,D=g.selectionEnd;g.value=R.substring(0,T)+"\t"+R.substring(D);
g.selectionStart=g.selectionEnd=T+1;this.Ep(null);return}var a=c.Ma(x.code,c.LJ),_=c.Ma(x.code,c.m8);
if(Q&&(a||_)){x.preventDefault();var I=new jO(u.E.v,!0);I.f=X.QT;I.data={d:"zoom",bH:a};this.caller.T(I)}if(c.Ma(x.code,c.N6))f=1;
if(c.Ma(x.code,c.DK))f=-1;var y=this.C7==this.kj,Z=Q&&x.shiftKey&&f!=0&&!y;if(Z||x.altKey&&b!=0){var v=JSON.parse(JSON.stringify(this.B4._M));
if(Z){var G=v.VA.FontSize;if(G==null)G=16;v.VA.FontSize=Math.max(1,G+f*(x.altKey?5:1))}else{if(y){v.VA.Kerning+=20*b;
v.VA.AutoKerning=!1}else v.VA.Tracking+=20*b}x.preventDefault();var q=new jO(u.E.M,!0);q.data={d:u.H.hW,hF:ke.kg,_M:v};
this.caller.T(q);var I=new jO(u.E.v,!0);I.f=X.gr;I.data={d:"updateStyles"};this.caller.T(I);return}if((c.Ma(x.code,c.tt)||c.Ma(x.code,c.S3))&&Q){var h=this.C7,r=this.kj;
if(h>r){var H=h;h=r;r=H}var z=this.gp.add.TySh,o=dU.bs(z.HW);if(h!=r){this.S_=o.slice(h,r);this.aoz=JSON.stringify(this.B4._M)}}var P=dU.bs(this.gp.add.TySh.HW);
if(b!=0||e!=0||k||K){x.preventDefault();var p=this.C7;if(b!=0){if(Q&&b==-1)p=this.ak6(P,this.C7-1);else if(Q&&b==1)p=this.a3u(P,this.C7);
else{var g=this.GL,R=g.value;p=this.C7+b;if(p!=0&&R.codePointAt(p-1)>65535)p+=b}}else if(e!=0){var C=this.A7.L4(this.C7);
if(e==-1&&C.jQ==0)p=0;else if(e==1&&C.jQ==this.A7.aoQ()-1)p=99999999999;else p=this.A7.avE(new bC(C.W4.x+C.W4.m/2,0),C.jQ+e)}else if(k){var W=this.C7-1;
while(W>0&&P.charCodeAt(W)!=10)W--;p=W==0?0:W+1}else if(K){var W=this.C7;while(W<P.length-1&&P.charCodeAt(W)!=10)W++;
p=W}p=Math.max(0,Math.min(P.length-1,p));if(x.shiftKey)this.C7=p;else this.C7=this.kj=p;O=!0}if(c.Ma(x.code,fM.H)&&Q){this.C7=0;
this.kj=P.length-1;O=!0}if(O){this.x4();this.Ba($)}};X.ca.ahH=function(x,Q){var c=x.length;if(c!=Q.length)return!1;
for(var F=0;F<c;F++)if(x[F].Tc!=Q[F].Tc)return!1;return!0};X.ca.prototype.UM=function(x,Q,c){if(this.gp==null)return;
this.gp.cS();var $=this.eG;if($ instanceof Array){var z=this.ra(x,this.AT),j=x.O2();if(j!=null&&j.f==this&&j.data.PD&&X.ca.ahH(j.data.PD,$)&&c)j.data.Ae=z;
else{var U=new dg(this.name,this);U.data={PD:$,Ae:z};x.kp(U)}}else{var U=new dg(this.name,this);U.data={GF:$.GF,Yo:$.Yo,Cj:$.Cj,UI:$.UI};
x.kp(U)}this.escape(x,Q)};X.ca.prototype.ce=function(x,Q){if(this.gp==null)return;if(this.eG instanceof Array){this.Cm(x,this.eG);
if(this.gp)dU.jC(this.gp.add.TySh)}else{x.g=this.eG.Cj;x.Bd(this.eG.GF);x.tP=!0}x.c();this.escape(x,Q)};
X.ca.prototype.escape=function(x,Q){this.axa();this.gp=null;this.AT=null;this.A7=null;this.B5=null;this.GL.blur();
x.N.LV=null;x.N.Nh=null;x.N.SE=[];x.vu=!0;this.S6=!1;this.uB=!1;this.C7=this.kj=-1;this.VG(Q,u.E.M,{d:u.H.gR,f:this.id,Iu:"hideactive"});
if(this.cr){var c=new jO(u.E.M,!0);c.data={d:u.H.ax,f:this.cr};Q.T(c);this.cr=null}};X.ca.prototype.VG=function(x,Q,c,$){var z=new jO(Q,!0);
z.data=c;if($)z.f=$;x.T(z)};X.ca.prototype.pP=function(x){var Q=this.gp.add.TySh,c=this.A7,$=Q.i.clone();
$.HQ();var z=$.RE(x),j=dU.Pe(Q,c),U=d.fr.ES(Q.f2,j),i=d.uE.da(U,z);if(i==null)i=new Float64Array(2);
z=new bC(j.x+i[0]*j.m,j.y+i[1]*j.e);if(c.mX){var b=c.mX.clone();b.HQ();z=b.RE(z)}var e=c.avE(z);return e};
X.ca.prototype.Ba=function(x,Q){if(Q==null)Q=!1;var c=this.gp.add.TySh,$=dU.SI(c.HW),z=this.A7,j=z?dU.Pe(c,z):null;
x.N.SE=[];x.N.LV=null;x.N.Nh=null;var U=this.kA?this.kA:this.B5;if(U){U.Ex(x,this.B4,!d.fr.Cu(c.f2));
var i=c.i.clone();i.HQ();if(z&&z.mX&&z.Iz==1){var b=z.mX.clone();b.HQ();i.concat(b)}d.A.i(x.N.SE,i,x.N.SE);
d.A.i(x.N.LV.j,i,x.N.LV.j);if(z&&z.mX==null&&z.a1E()){var e=j.m-20,k=j.e+8;x.N.LV.j.push(e,k,e+10,k,e+5,k-5,e+5,k+5);
x.N.LV.G.push("M","L","M","L")}}else if($==0)this.au2(x,c,z);else x.N.LV={j:[],G:[]};var K=Math.min(this.C7,this.kj),g=Math.max(this.C7,this.kj);
if(!Q){this.GL.selectionStart=K;this.GL.selectionEnd=g}if(z!=null){var R=function(U,y){var Z=U.x,v=U.y+U.e,G=new bI;
G.translate(-Z,-v);G.rotate(-y);G.translate(Z,v);U.y+=U.e*.27;var f=d.A.Hg(U);d.A.i(f.j,G,f.j);return f};
if(K==g){K=Math.max(K,0);var T=z.L4(K);if(T){var D=T.W4,a=this.B4._M.VA.FontSize;if(a!=null&&a!=0){a/=c.i.c0();
D.y+=D.e-a;D.e=a}var _=z.a07(K);if(_!=null&&_.gi==1)D.x+=D.m;var I=R(D,T.A6).j;x.N.LV.G.push("M","L");
x.N.LV.j.push(I[0],I[1]-1,I[6],I[7]-1)}}else{x.N.Nh={j:[],G:[]};for(var F=K;F<g;F++){var T=z.L4(F),f=R(T.W4,T.A6);
d.A.concat(x.N.Nh,f)}}}x.N.LV=aE.tv(x.N.LV,c,z,!0);x.N.Nh=aE.tv(x.N.Nh,c,z,!0);x.N.SE=aE.tv({j:x.N.SE},c,z,!0).j;
x.vu=!0};X.ca.prototype.au2=function(x,Q,c){if(c==null)return;x.N.SE.push(0,0);if(x.N.LV==null)x.N.LV={G:[],j:[]};
for(var F=0;F<c.SW.length;F++){var $=c.SW[F];for(var z=0;z<$.v0.length;z++){var j=$.v0[z],U=$.xj.x+j.xj.x+j.W4.x,i=$.xj.y+j.xj.y+j.W4.y+j.W4.e;
x.N.LV.G.push("M","L");x.N.LV.j.push(U,i,U+j.W4.m,i)}}x.vu=!0};X.CG=function(){X.ca.call(this,!0)};X.CG.prototype=new X.ca;
X.HP=function(x){X.U_.call(this,x?"Magic Replace":[10,9],x?X.a69:X.k9,x?"tools/mremove":"tools/lasso");
this.bY="crosshair";this.CR=null;this.gM=null;this.If=null};X.HP.prototype=new X.U_;X.HP.prototype.Nn=function(x,Q,c,$){this.CR=this.Tl;
this.gM={j:[this.CR.x,this.CR.y],G:["M"]}};X.HP.prototype.G3=function(x,Q,c,$){this.If=$;var z=this.gM;
if(z==null)return;if(!$.TZ){if(this.gM!=null&&this.P3.gW(1)&&c.S(fM.Al)){z.j.pop();z.j.pop();z.j.push(this.Oq.x,this.Oq.y);
x.N.LV=z;x.vu=!0}return}z.G.push("L");z.j.push(this.Oq.x,this.Oq.y);this.CR=this.Oq;if(this.sR){x.N.LV=z;
x.vu=!0}};X.HP.prototype.sD=function(){return this.gM!=null};X.HP.prototype.XH=function(){return this.gM!=null};
X.HP.prototype.sM=function(x,Q,c,$){X.U_.prototype.sM.call(this,x,Q,c,$);if(this.gM&&this.P3.gW(1)&&this.If&&!this.If.TZ&&!$.S(fM.Al))this.a1V(x,c,$)};
X.HP.prototype.zc=function(x,Q,c,$){this.If=$;var z=this.gM;if(z==null)return;if(this.P3.gW(1)&&c.S(fM.Al)){z.G.push("L");
z.j.push(this.Oq.x,this.Oq.y);return}this.a1V(x,Q,c)};X.HP.prototype.a1V=function(x,Q,c){this.finish(x,Q,c,this.If);
this.gM=null;x.N.LV=null;x.vu=!0};X.HP.prototype.getSelection=function(x,Q,c,$){if(this.Tl.HM(this.Oq)||!this.sR)return null;
return X.U_.Pg(this.gM.j,null,this.h8.anta)};X.qV=function(){X.Ur.call(this,[10,11],X.kU,"tools/move");
this.ER=new bC(0,0);this.j8=new bC(0,0);this.Em=null;this.Xy=null;this.Hq=new bC(0,0);this.Sf=null;this.n$=null;
this.iZ=null;this.V9=0;this.TR=null;this.cN=[];this.zK=null;this.bC=null;this.OJ=!1;this.d=0;this.KO=null;
this.HN=null;this.NM=null;this.y0=!1;this.h8={tS:!0,H8:!1,j0:!1,abn:1};this.a0w=!1;this.axl=!1;this.B5=null;
this.ue=null;this.Ve=null;var x=[];for(var F=0;F<d.fR.$P.length;F++)x.push({name:d.fR.$P[F],w:function(Q,c,$){return{H5:c.Zo.IM==$}}});
this._1=new ev(x);this._1.k("select",this.Df,this)};X.qV.prototype=new X.Ur;X.Ur.prototype.R4=function(x){return this.OJ&&this.d!=2};
X.qV.prototype.ais=function(){return this.OJ&&(this.d==0||this.d==1)};X.qV.prototype.Lg=function(x,Q,c,$){this.rL(x,-this.Hq.x,-this.Hq.y);
this.Hq.r$(0,0);this.TT(x,null,c);this.QE(x)};X.qV.prototype.Jh=function(){var x=this.h8;return[x.tS?1:0,x.H8?1:0,x.j0?1:0]};
X.qV.prototype.sr=function(x,Q,c){var $=this.h8;if(x&&x[0]!=null)$.tS=x[0]==1;if(x&&x[1]!=null)$.H8=x[1]==1;
if(x&&x[2]!=null)$.j0=x[2]==1;var z=new jO(u.E.M,!0);z.data={d:u.H.gR,f:this.id,Zz:$,avp:Q};c.T(z)};
X.qV.ad_=function(x,Q,c,$,z,j,U){if(U==null)U=[!1,!0];var i=x.zi(null,z,!0),b,e=z==null?x.g[0]:z;if(x.add.artd&&(z!=null||x.g.length==1)&&x.B[e].add.artb){var k=x.B[e].Dd();
b=x.Ao(i,k,k)[0]}else{var K=new gh(0,0,x.m,x.e),b=x.Ao(i,U[0]?K:null,U[1]?null:K)[0];delete b.add.artd;
if(U[1]){var g=d.kH(b.VY(),new gh(0,0,b.m,b.e),2);X.r7.v$(b,g)}}if(c!=1){var R=new gh(0,0,Math.round(b.m*c),Math.round(b.e*c));
X.r7.v$(b,R);var T=[];for(var F=0;F<b.B.length;F++)T.push(F);var D=X.Y.my(b,T,!0);X.r7._Z(b,new bI(c,0,0,c,0,0));
X.Y.wS(b,$,T,D,1,d.D.Gr(new bI(c,0,0,c,0,0)),null,!0);b.eB()}var a=[];for(var F=0;F<Q.length;F++)if(b.m*b.e!=0)a.push(ar.jd(b,Q[F].toUpperCase(),null,null,j?j[F]:null,$));
return a};X.qV.prototype.adF=function(x,Q,c,$,z){if(x==null||x.g.length==0)return;var j=X.qV.ad_(x,[Q],c,$,null)[0],U=new jO(u.E.M,!0);
U.data={d:u.H.lm,data:j,name:x.B[x.g[0]].getName()+(c==1?"":"@"+c+"x")+"."+Q};z.T(U)};X.qV.prototype.np=function(x,Q,c,$,z){if(x.Zq=="getPNG"){this.adF(c,"png",x.i8,z,Q)}else if(x.Zq=="getSVG"){this.adF(c,"svg",x.i8,z,Q)}if(x.Zq=="prms"){this.h8=x;
this.QE(c)}};X.qV.aD8=function(x){var jF=x.length,c=0;x.sort(function(j,U){return j[0]+j[1]/2-(U[0]+U[1]/2)});
var Q=x[jF-1][0]+x[jF-1][1]-x[0][0];for(var F=0;F<jF;F++)c+=x[F][1];var $=Math.round((Q-c)/(jF-1)),z=x[0][0];
for(var F=0;F<jF;F++){x[F][0]=z;z+=x[F][1]+$}};X.qV.prototype.To=function(x,Q,c,$,z){var j=x.d;if(j=="trsl"){var U=Math.round(x.RM),i=Math.round(x.Bi);
this.Hq.r$(U,i);this.x0(c,Q,$,z,!1,x.a);this.rL(c,U,i);this.TT(c,null,z)}else if(j=="fcmy"||j=="fvec"){var b=["RGB","CMYK"][x.b]+" Color";
if(j=="fvec")b=["Raster","Vector"][x.b]+" Mode";var e=new dg(b,this);e.data={d:x.d,ZR:c.add[j]==null?0:c.add[j],j7:x.b};
c.kp(e);this.Tz(e.data,c)}else if(j=="pview"){var j=new dg([8,14],this);j.data={d:x.d};c.kp(j);this.Tz(j.data,c)}else if(j=="lockguides"){if(c)c.l2=!c.l2}else if(j=="gids"||j=="gidsFromLayer"){var k=x.HN,K,g;
if(k==null)k=c.wZ();if(j=="gids"){K=x.Gv;var R=k[0].length,T=K[0].length;g=R==T?[23,2]:R>T?[23,3]:[23,4];
if(T==0)g=[11,15,0]}else if(j=="gidsFromLayer"){var D=[],a=[],_=c.lG();for(var F=0;F<c.g.length;F++){var I=c.B[c.g[F]].rect;
if(I._6())continue;D.push([0,I.x],[1,I.y],[0,I.x+I.m],[1,I.y+I.e]);a.push(_,_,_,_)}g=[11,15,1];K=c.wZ();
X.qV.ia(K,[D,a])}if(JSON.stringify(k)==JSON.stringify(K))return;var j=new dg(g,this);j.data={d:2,HN:k,Gv:K};
c.kp(j);this.Tz(j.data,c)}else if(j=="algn"){var f=x.b;if(c==null)return;if(c.g.length<2&&!(c.u!=null&&f!=3&&f!=7)){alert(ah.get([15,7,5]));
return}var y=c.u;c.u=null;var I=y?y.rect:X.Y.Pe(c);this.x0(c,Q,$,z,!1);if(!this.OJ)return;var Z=this.TR,v={},G=[],q=[],h=[];
for(var F=0;F<Z.length;F++){var r=Z[F];while(c.B[r].getName()=="</Layer group>")r++;var H=c.root.FV(r),o=H;
while(H.parent!=null){H=H.parent;if(Z.indexOf(H.index)!=-1)o=H}var P=q.indexOf(o.index);if(P==-1){P=q.length;
q.push(o.index)}G[F]=P}var O=[],p=[],C=[];for(var F=0;F<q.length;F++){var W=X.Y.Pe(c,c.zi(!0,q[F]));
C.push(W);var J=f==3?[W.y,W.e]:[W.x,W.m];O[F]=J;p.push(J)}X.qV.aD8(p);for(var F=0;F<q.length;F++){var W=C[F],t=W.x,Y=W.y;
if(f==0)t=I.x;if(f==1)t=I.x+(I.m-W.m)/2;if(f==2)t=I.x+(I.m-W.m);if(f==3)Y=O[F][0];if(f==4)Y=I.y;if(f==5)Y=I.y+(I.e-W.e)/2;
if(f==6)Y=I.y+(I.e-W.e);if(f==7)t=O[F][0];h.push(Math.round(t-W.x),Math.round(Y-W.y))}var l=[];for(var F=0;
F<Z.length;F++){var m=G[F];l[2*F]=h[2*m];l[2*F+1]=h[2*m+1]}this.rL(c,0,0,null,l);var B=f==3||f==7?[20,4,6]:[20,4,f<3?f:f-1];
this.TT(c,null,z,l,B);c.u=y}else if(j=="disabAuto"){this.sr([!1],null,Q)}};X.qV.ia=function(x,Q){for(var F=0;
F<Q[0].length;F++){var c=Q[0][F],$=Q[1][F],z=!1;for(var j=0;j<x[0].length;j++){var U=x[0][j],i=x[1][j];
if(c[0]==U[0]&&c[1]==U[1]&&$==i)z=!0}if(!z){x[0].push(c.slice(0));x[1].push($)}}};X.qV.prototype.enable=function(x,Q,c,$,z){this.n$=c;
this.iZ=Q;this.y0=z?!0:!1;this.QE(x);this.Rv("default",Q);this.sM(x,Q,c,$)};X.qV.prototype.disable=function(x,Q,c,$){this.auU(x)};
X.qV.prototype.auU=function(x){if(x==null)return;if(this.B5){this.B5.clear(x);this.B5=null}if(x.N.j0){x.N.j0=null;
x.vu=!0}if(x.N.zZ){x.N.zZ=null;x.vu=!0}if(x.N.oa[this.id]){delete x.N.oa[this.id];x.vu=!0}if(x.N.It.length!=0){x.N.It=[];
x.vu=!0}};X.qV.prototype.gb=function(x,Q,c,$){if(c.Oj!=this.id)return;this.QE(x)};X.qV.prototype.QE=function(x,Q){if(x==null)return;
var c=this.h8;this.auU(x);if(!this.y0){var $;if(c.H8||c.j0)$=d.A.Yc(X.Y.Pe(x));if(c.H8&&!$._6()){var z=x.B[x.g[0]],j=d.A.Hg($).j;
if(i9==1&&x.g.length==1){if(z.add.vmsk)j=z.add.vmsk.auh();if(z.add.SoLd)j=X.Y.e3(z.add.SoLd.nonAffineTransform);
if(z.add.TySh){j=d.A.Hg(z.ft.os).j;d.A.i(j,z.add.TySh.i,j)}}this.B5=new aH(j,!0);this.B5.Ex(x,this.n$)}if(c.j0){var U=null,g=null,R=!1;
if(x.lG()!=-1)U=x.B[x.lG()].Dd();else U=new gh(0,0,x.m,x.e);x.N.j0={BZ:[$],T0:[]};var i=x.N.j0.T0,b=$.x+$.m,e=$.y+$.e,k=$.x+Math.floor($.m/2),K=$.y+Math.floor($.e/2);
if(Q){var T=x.root.e$(new bC(Math.floor(Q.x),Math.floor(Q.y)));if(T){g=d.A.Yc(T.a.Q8(x));if(g.dM($)){R=(g.PC($)||$.PC(g))&&!$.HM(g);
if(!R)g=null}}}this.aa8($,i);if(g!=null){x.N.j0.BZ.push(g);var D=g.x+g.m,a=g.y+g.e,_=g.x+Math.floor(g.m/2),I=g.y+Math.floor(g.e/2);
if(R){var f=k,y=K;if($.PC(g)){f=_;y=I}i.push($.x,y,g.x,y);i.push(b,y,D,y);i.push(f,$.y,f,g.y);i.push(f,e,f,a)}else{this.aa8(g,i);
var Z=e<g.y||a<$.y,v=b<g.x||D<$.x;if(b<g.x)i.push(b,K,g.x,K);if(D<$.x)i.push(D,K,$.x,K);if(e<g.y)i.push(k,e,k,g.y);
if(a<$.y)i.push(k,a,k,$.y);if(Z&&!v){if($.x<g.x)i.push($.x,I,g.x,I);if(g.x<$.x)i.push(g.x,K,$.x,K)}}}else{if($.y>U.y)i.push(k,U.y,k,$.y);
if(e<U.y+U.e)i.push(k,e,k,U.y+U.e);if($.x>U.x)i.push(U.x,K,$.x,K);if(b<U.x+U.m)i.push(b,K,U.x+U.m,K)}x.vu=!0}}if(this.d==2&&this.OJ){var G=new gh(0,0,x.m,x.e),q=x.lG();
if(q!=-1){var h=x.wZ(),r=h[1][this.TR];if(r==-1)r=q;G=x.B[r].Dd()}var H=x.Bo[this.TR],o=H[0],P=(o==0?"X":"Y")+": "+d.fR.Z0(H[1]-(o==0?G.x:G.y),x.cQ,this.n$,o==0?G.m:G.e,!0);
X.Ur.hz(Math.round(this.Em.x)+10,Math.round(this.Em.y)-10,[P],x);x.vu=!0}if(this.d==3&&this.OJ){var O=d.A.Hg(this.KO);
x.N.oa[this.id]={LV:O};x.vu=!0}};X.qV.prototype.aa8=function(x,Q){var c=x.m,$=x.e,z=x.x+Math.floor(c*.2),j=x.y+Math.floor($*.2);
Q.push(z,x.y,z,x.y+$);Q.push(x.x,j,x.x+c,j)};X.qV.prototype.Rv=function(x,Q){var c={d:u.H.aK,Wu:x},$=new jO(u.E.M,!0);
$.data=c;Q.T($)};X.qV.prototype.v9=function(x){var Q=this.ue.Vk()[0];if(Q==this.Ve.length){var c=new jO(u.E.M,!0);
c.data={d:u.H.gl,mN:"psd"};this.iZ.T(c);return}var $=this.Sf,z=this.Ve[Q];this.aB8($,z)};X.qV.prototype.Df=function(x){var Q=JSON.parse(JSON.stringify(this.n$.Zo));
Q.IM=this._1.Vk()[0];var c=new jO(u.E.M,!0);c.data={d:u.H.hW,hF:ke.sT,j7:Q};this.iZ.T(c)};X.qV.prototype.x1=function(x,Q,c,$,z){if(this.OJ)this.km(x,Q,c,$,z);
this.Sf=x;this.n$=c;this.iZ=Q;var j=x.Q.$X(z.x,z.y),U;if(X.qV.El(c,z,x.Q)){U=this._1}else{if(this.ue)this.ue.removeEventListener("select",this.v9);
var i=[];x.root.e$(j,i);if(i.length==0)return;var b=[];this.Ve=i;for(var F=0;F<i.length;F++)b.push({name:x.B[i[F]].getName(),P$:F==i.length-1});
b.push({name:[1,18],Q2:!0});U=this.ue=new ev(b);U.k("select",this.v9,this)}U.parent=Q;U._();U.update(x,c);
var e=new jO(u.E.M,!0);e.data={d:u.H.A_,G7:U,x:z.TN+2,y:z.yv+1};Q.T(e)};X.qV.prototype.a79=function(x,Q,c,$,z){var j=X.qV.vP(x,z);
return j!=-1||X.qV.El(c,z,x.Q)};X.qV.vP=function(x,Q){if(x==null||x.add.artd==null)return-1;var c=x.Q.$X(Q.x,Q.y),$=12*X.q_()/x.Q.W;
for(var F=0;F<x.B.length;F++){var z=x.B[F];if(!z.M5()||z.add.artb==null)continue;var j=z.Dd(),U=new gh(j.x,j.y-1.7*$,$*z.getName().length*.5,$);
if(U.Wl(c))return F}return-1};X.qV.prototype.Eu=function(x,Q,c,$,z){var j=X.qV.vP(x,z),U=X.qV.aD7(x,x.Q.$X(z.x,z.y));
if(j!=-1){x.g=[j];if(c.Oj==X.kU){var i=new jO(u.E.M);i.data={d:u.H.ax,f:X.TC};Q.T(i)}return}if(U!=-1){x.Q.sI=U;
x.Fq=!0;var i=new jO(u.E.M,!0);i.data={d:u.H.cR,AD:cC.Pn.aoZ};Q.T(i);return}this.Em=z;this.ER.r$(z.x,z.y);
this.j8=x.Q.$X(z.x,z.y);this.Xy=new jP(this.j8);this.x0(x,Q,$,c,!0)};X.qV.El=function(x,Q,c,$){var z=d.fR.P0,j=c.yY.e;
return x.w6&&(0<Q.x&&Q.x<z||0<Q.y&&Q.y<z||$&&0<Q.x&&Q.x<4*z&&j-z<Q.y&&Q.y<j)};X.qV.prototype.x0=function(x,Q,c,$,z,j){var U,i=this.j8,b=!1;
if(z){var e=$.Ub&&$.Zo.Bo;if(X.qV.El($,this.ER,x.Q)){U=x.wZ();var k=x.wZ(),K=null;if(this.ER.x<d.fR.P0){K=[0,i.x]}if(this.ER.y<d.fR.P0){K=[1,i.y]}k[0].push(K);
k[1].push(x.lG(!0));x.tF(k);if(!e){var g=new jO(u.E.M);if(!$.Zo.Bo){g.data={d:u.H.hW,hF:ke.V4};Q.T(g)}if(!$.Ub){g.data={d:u.H.hW,hF:ke.eH};
Q.T(g)}e=!0}}var R=this.aCb(x,i);if(e&&R!=null&&!x.l2){this.d=2;this.HN=U?U:x.wZ();this.TR=R;this.OJ=!0;
this.bC=X.Y.Pe(x);return}if(x.oW.length!=0){this.d=4;this.bC=x.fG[x.oW[0]].rect.clone();this.OJ=!0;return}if(this.B5&&this.B5.o7(i,x.Q.W,!0,this.Em)!=null){var g=new jO(u.E.M);
g.data={d:u.H.ax,f:X.va,aqC:!0};Q.T(g);return}if(x.u&&x.u.rect.Wl(i)){var T=Math.round(i.x),D=Math.round(i.y),a=x.u.rect;
b=x.u.channel[(D-a.y)*a.m+T-a.x]>128}if(!b&&(!this.y0&&this.h8.tS||this.y0&&this.h8.tS&&(c.S(fM.FT)||x.g.length<2))){var _=this.acd(x,i,c);
if(!_){x.g=[];x.ZQ=null;x.tP=x.uH=!0;this.d=3;this.KO=new gh;this.OJ=!0;return}}if(c.S(fM.Al)&&!b){var I=new jO(u.E.v);
I.f=X.Mf;I.data={d:eM.DN,a2M:!0};Q.T(I)}}if(x.oW.length!=0){this.d=4;this.bC=x.fG[x.oW[0]].rect.clone();
this.OJ=!0;return}this.TR=x.zi(j==null,j,null,!0);for(var F=0;F<this.TR.length;F++){var f=this.TR[F],y=x.B[f];
if(y.e6(2)||y.e6(31)||x.w5(f)){alert(ah.get([6,57,0]));return}}if(x.add.artd&&z){var Z=this.TR,v=!1;
for(var F=0;F<Z.length;F++)if(x.B[Z[F]].add.artb)v=!0;if(!v){this.zK=[x,x.B.slice(0),x.g.slice(0),-1];
this.TR.sort(function(O,p){return O-p})}}this.cN=X.qV.aeZ(x,this.TR);this.d=0;if(x.u&&(!z||b)&&x.g.length==1&&x.hS(!1)){if(!x.aDr()){this.OJ=!1;
return}var G=x.B[x.g[0]],q=c.S(fM.Al);this.d=1;var h=x.history[x.FS];if(h.f==this&&h.data.d==1&&h.data.a==x.g[0]&&G.kk==G.$Q.kk&&!q){this.NM=h}else{var r=G.$Q,H=!1,o;
if(!G.jc(x,x.u)||q){H=!0;G.xn(x,x.u,q)}if(G.$Q.kk<=0){o=d.R(G.$Q.YT.length>>2);d.GS(G.$Q.YT,o,3)}else o=x.u.channel.slice(0);
var P={rect:G.$Q.hX.clone(),channel:o};this.NM=new dg(q?[12,53]:[12,54],this);this.NM.data={d:1,a:x.g[0],$Q:G.$Q,Nc:r,TL:H,Cj:x.u,UI:P,xq:new bC(0,0)};
x.kp(this.NM);x.u=P;x.ox=!0}}this.OJ=!0;this.bC=X.Y.Pe(x)};X.qV.prototype.acd=function(x,Q,c){var $=x.root.e$(new bC(Math.floor(Q.x),Math.floor(Q.y)));
if($){if($.a.add.vmsk)x.vu=!0;var z=x.B.indexOf($.a);if(this.h8.abn==0){var j=x.root.FV(z);while(j.parent&&j.parent.depth!=0&&j.parent.a.add.artb==null)j=j.parent;
z=j.index}if(c.S(fM.FT)){var U=x.g.indexOf(z);if(U==-1)x.g.push(z);else if(x.g.length>1)x.g.splice(U,1)}else if(x.g.indexOf(z)==-1){this.aB8(x,z)}}return $!=null};
X.qV.prototype.aB8=function(x,Q){x.B[Q].kk=0;x.g=[Q];x.ZQ=null;x.la();x.Rr=!0;x.tP=!0};X.qV.aD7=function(x,Q){var c=x.add.Anno;
if(c==null||c.length==0)return-1;var $=30/x.Q.W;for(var F=0;F<c.length;F++)if(new gh(c[F][0],c[F][1],$,$).Wl(Q))return F;
return-1};X.qV.prototype.CK=function(x,Q,c,$,z){this.Em=z;var j=x.Q.$X(z.x,z.y),R,T;if(this.Xy&&this.d<2)j=this.Xy.PW(j,$);
if(!this.OJ){if(c.Ub&&c.Zo.Bo&&x&&!x.l2){var U=this.aCb(x,j),i="default",b=X.qV.vP(x,z);if(U!=null)i=["col-resize","row-resize"][x.Bo[U][0]];
else if(this.B5){var e=this.B5.o7(j,x.Q.W,null,z);if(e)i=e}else if(b!=-1||X.qV.aD7(x,j)!=-1){i="pointer"}this.Rv(i,Q)}this.QE(x,j);
return}var k=this.j8,K=Math.round(j.x-k.x)-this.Hq.x,g=Math.round(j.y-k.y)-this.Hq.y;if(this.bC){if(this.d==2){var D=[];
if(x.u)D.push(x.u.rect);if(this.bC)D.push(this.bC);if(x.Q._u)D.push(x.Q._u);j=X.qV.Bw(x,j,c,[!1,D,!0,!0])}else{T=this.bC.clone();
T.offset(this.Hq.x+K,this.Hq.y+g);R=X.qV.H1(x,T,c);var a=this.Xy.aBq($);if(a==1){R[0]=0;R[2]=1e9}if(a==2){R[1]=0;
R[3]=1e9}K+=Math.round(R[0]);g+=Math.round(R[1])}}this.Hq.x+=K;this.Hq.y+=g;var _=this.zK;if(_&&x==_[0]){x.Bd(_[1]);
x.g=_[2].slice(0);_[3]=-1}this.rL(x,K,g,j,null,$.S(fM.FT));if(_&&x==_[0]){var I=this.bC.clone();I.offset(this.Hq.x,this.Hq.y);
var f=j,b=x.lG(),y=-1;for(var F=0;F<x.B.length;F++){var Z=x.B[F];if(!Z.M5()||Z.add.artb==null)continue;
var v=Z.Dd();if(v.Wl(f))y=F}if(y!=-1&&y!=b){var G=X.de.Ag(x,this.TR,y,!0,null,!1);x.Bd(G[0]);x.g=G[1];
_[3]=y}}this.QE(x,j);if(R)X.qV.ao(x,T,R)};X.qV.prototype.aCb=function(x,Q){var c=X.Ee(x,this.Em);Q=[Q.x,Q.y];
var $=x.wZ(),z=x.lG();for(var F=0;F<$[0].length;F++){var j=$[0][F],U=$[1][F];if(U!=-1&&U!=z)continue;
if(Math.abs(j[1]-Q[j[0]])<c)return F}return null};X.qV.prototype.rL=function(x,Q,c,$,z,j){if(this.d==0){if(z)X.qV.lc(x,this.TR,this.cN,z);
else X.qV.vS(x,this.TR,this.cN,Q,c)}else if(this.d==1){var U=this.NM.data;U.xq.offset(Q,c);X.qV.zG(x,U.a,Q,c)}else if(this.d==2){var i=1e-5;
if(j)i=x.Q.W<=1?10:1;var b=i*Math.round($.x/i),e=i*Math.round($.y/i),k=[b,e],K=x.Bo[this.TR];K[1]=k[K[0]]}else if(this.d==3){var g=this.j8,R=d.A.cl([g.x,g.y,$.x,$.y]);
this.KO=R;var T=[];x.root.a7A(R,T);if(JSON.stringify(x.g)!=JSON.stringify(T)){x.g=T;x.tP=x.uH=!0}}else if(this.d==4){for(var F=0;
F<x.oW.length;F++)x.fG[x.oW[F]].rect.offset(Q,c);x.vu=!0}};X.qV.zG=function(x,Q,c,$){var z=x.B[Q];x.u.rect.offset(c,$);
z.rI(x,c,$,x.u);x.ox=!0;x.c()};X.qV.prototype.km=function(x,Q,c,$,z,j){this.TT(x,z,c);this.QE(x);if(Date.now()-this.V9<300&&!j){var U=X.ca.xU(x,x.Q.$X(z.x,z.y));
if(X.qV.El(c,z,x.Q,!0)){var i=new jO(u.E.M);if(z.y>x.Q.yY.e-20){i.data={d:u.H.LL,AD:"doczoom",ZR:x.Q.W*100,r5:{K:u.E.v,f:X.QT,C:{d:"pzoom"}}}}else{i.data={d:u.H.LL,AD:"preferences"}}Q.T(i)}else if(U>=0){var b=new jO(u.E.v,!0);
b.f=X.gr;b.data={d:"editCurr",fU:U};Q.T(b)}}this.V9=Date.now();X.r7.sA(x)};X.qV.prototype.TT=function(x,Q,c,$,z){if(!this.OJ)return;
this.OJ=!1;if(this.d==0){if($){this.amk(x,null,$,z)}else{if(this.Hq.x==0&&this.Hq.y==0)return;this.amk(x,this.Hq.clone())}x.Fq=!0}else if(this.d==2){var j=0;
Q=[Q.x,Q.y];var U=this.TR,i=x.Bo[U],au=this.HN[0].length,b=x.Bo.length;if(c.w6&&Q[i[0]]<d.fR.P0){var e=x.wZ();
e[0].splice(U,1);e[1].splice(U,1);x.tF(e);j=1;if(au==b-1)return}if(au<b)j=2;var k=new dg([[23,2],[23,3],[23,4]][j],this);
k.data={d:2,HN:this.HN,Gv:x.wZ()};x.kp(k)}else if(this.d==4){var k=new dg([12,54],this);k.data={d:4,g:x.oW.slice(0),z:this.Hq.clone()};
x.kp(k)}this.Hq.r$(0,0)};X.qV.prototype.sM=function(x,Q,c,$){var z=$.um(x?x.Q.A6:0);if(x!=null&&(z.x!=0||z.y!=0)){if($.S(fM.Al)&&x.u==null){var j=new jO(u.E.v);
j.f=X.Mf;j.data={d:eM.DN,a2M:!0};Q.T(j)}this.Hq.r$(z.x,z.y);this.x0(x,Q,$,c,!1);if(!this.OJ)return;this.rL(x,z.x,z.y);
this.TT(x,null,c);this.QE(x)}var U=$.S(fM.qP);if(!this.y0&&this.axl!=U){if(U){this.a0w=this.h8.tS;this.h8.tS=!0}else{this.h8.tS=this.a0w}this.axl=U;
var i=new jO(u.E.M,!0);i.data={d:u.H.gR,f:this.id,Zz:this.h8};Q.T(i)}};X.qV.prototype.pC=function(x,Q){if(x.d==0){var c=x.SC;
if(c){Q.Bd(c.GF);Q.g=c.xa.slice(0);Q.c();Q.tP=!0}X.qV.lc(Q,x.g,x.$q,x.QH,!0);X.r7.sA(Q)}else if(x.d=="fcmy"||x.d=="fvec"){if(x.ZR==0)delete Q.add[x.d];
else Q.add[x.d]=x.ZR;Q.vu=!0}else if(x.d=="pview"){Q.d6=!Q.d6;Q.c()}else if(x.d==2){Q.tF(x.HN);Q.vu=!0}else if(x.d==4){for(var F=0;
F<x.g.length;F++)Q.fG[x.g[F]].rect.offset(-x.z.x,-x.z.y);Q.vu=!0}else{var $=Q.B[x.a];if(x.TL){$.Gw(Q,x.Nc);
Q.u=x.Cj;Q.ox=!0;Q.c();$.c()}else{X.qV.zG(Q,x.a,-x.xq.x,-x.xq.y)}}};X.qV.prototype.Tz=function(x,Q){if(x.d==0){X.qV.lc(Q,x.g,x.$q,x.QH);
var c=x.SC;if(c){Q.Bd(c.Yo);Q.g=c.z2.slice(0);Q.c();Q.tP=!0}X.r7.sA(Q)}else if(x.d=="fcmy"||x.d=="fvec"){if(x.j7==0)delete Q.add[x.d];
else Q.add[x.d]=x.j7;Q.vu=!0}else if(x.d=="pview"){Q.d6=!Q.d6;Q.c()}else if(x.d==2){Q.tF(x.Gv);Q.vu=!0}else if(x.d==4){for(var F=0;
F<x.g.length;F++)Q.fG[x.g[F]].rect.offset(x.z.x,x.z.y);Q.vu=!0}else{var $=Q.B[x.a];if(x.TL){$.$Q=x.$Q;
Q.u=x.UI;X.qV.zG(Q,x.a,0,0);$.c()}else{X.qV.zG(Q,x.a,x.xq.x,x.xq.y)}}};X.qV.prototype.amk=function(x,Q,c,$){if(c){var z=!0;
for(var F=0;F<c.length;F++)if(c[F]!=0)z=!1;if(z)return}var j=x.history[x.FS],U=this.zK,i=U!=null&&U[3]!=-1&&U[0]==x;
if(!i&&c==null&&j.data&&j.f==this&&j.data.d==0&&JSON.stringify(j.data.g)==JSON.stringify(this.TR)&&JSON.stringify(j.data.$q)==JSON.stringify(this.cN)){var b=j.data.QH,e=j.data.aaM.dx.T.v;
e.Hrzn.v.val+=Q.x;e.Vrtc.v.val+=Q.y;for(var F=0;F<b.length;F+=2){b[F]+=Q.x;b[F+1]+=Q.y}}else{if(Q==null)Q=new bC(c[0],c[1]);
var k={q4:"move",dx:{classID:"null",null:ep.QP("Lyr",!0),T:{t:"Objc",v:{classID:"Ofst",Hrzn:{t:"UntF",v:{type:"#Rlt",val:Q.x}},Vrtc:{t:"UntF",v:{type:"#Rlt",val:Q.y}}}}}},K=null;
if(i)K={GF:U[1],xa:U[2],Yo:x.B.slice(0),z2:x.g.slice(0)};this.zK=null;var g=new dg($?$:[12,54],this);
if(c)g.data={d:0,g:this.TR,$q:this.cN,SC:K,QH:c};else g.data={d:0,g:this.TR,$q:this.cN,SC:K,QH:X.qV.a6p(this.TR,Q.x,Q.y)};
g.data.aaM=k;x.kp(g);this.track(k)}};X.qV.a6p=function(x,Q,c){var $=[];for(var F=0;F<x.length;F++)$.push(Q,c);
return $};X.qV.vS=function(x,Q,c,$,z){X.qV.lc(x,Q,c,X.qV.a6p(Q,$,z))};X.qV.lc=function(x,Q,c,$,z){if(Q.length==0)return;
if(c==null){c=[];for(var F=0;F<Q.length;F++){c.push(x.B[Q[F]].AA(x,!0))}}var j=new gh,U=new gh(0,0,x.m,x.e);
for(var F=0;F<Q.length;F++){var i=$[2*F],b=$[2*F+1];if(z){i=-i;b=-b}var e=x.B[Q[F]],k=c[F];if(e.add.fxrp&&(k.indexOf(0)!=-1||e.Z6()))e.add.fxrp.offset(i,b);
for(var K=0;K<k.length;K++){var g=k[K];if(g==0){e.rect.offset(i,b);if(e.Oz()&&e.U5(x))e.U5(x).rect.offset(i,b);
if(e.add.artb){var R=e.Dd();R.offset(i,b);e.Zp(R);var T=e.add.artb.guideIndeces;T=T?T.v:[];for(var D=0;
D<T.length;D++){var a=x.Bo[T[D].v];a[1]+=a[0]==0?i:b}}if(e.add.TySh){e.add.TySh.i.translate(i,b);if(e.add.TySh.add){e.add.TySh.add.vmsk.offset(i,b)}}if(e.add.SoLd){var _=new bI(1,0,0,1,i,b),I=e.add.SoLd,f=X.Y.e3(I.Trnf),y=X.Y.e3(I.nonAffineTransform);
d.A.i(f,_,f);d.A.i(y,_,y);I.Trnf=X.Y.TD(f);I.nonAffineTransform=X.Y.TD(y);X.Y.aqT(I,_)}}if(g==1)e.Rz().rect.offset(i,b);
if(g==2){e.add.vmsk.offset(i,b);if(e.add.vogk)d.eV.i(e.add.vogk,[1,0,i,0,1,b,0,0],[]);if(e.ft.gM){var Z=e.ft.gM.Fg.j;
d.A.i(Z,new bI(1,0,0,1,i,b),Z)}}if(g==3){e.U5(x).F.rect.offset(i,b);if(k.length==1)e.c()}}if(k.length>0){var v=e.add.GdFl;
if(v==null)v=e.add.PtFl;if(e.Z6()&&!e.ZC()&&e.add.vmsk!=null&&d.o.Qx(e.add.vmsk.$)&&e.add.vmsk.f4==255&&(v==null||v.Algn&&v.Algn.v)){e.rect.offset(i,b)}else e.kT(x);
var G=x.root.XW(e.Q8(x),x,Q[F]);if(e.add.artb)G=G.iO(e.Dd());j=j.iO(G);G.offset(-i,-b);j=j.iO(G);if(e.aD()&&e.F&&e.F.color==255)j=j.iO(U);
e.aBA()}}x.c(d.A.Yc(j))};X.qV.aeZ=function(x,Q){var c=[];for(var F=0;F<Q.length;F++){var $=x.B[Q[F]];
c.push($.AA(x))}return c};X.qV.ao=function(x,Q,c){var $={j:[],G:[]},z=Q.x+c[0],j=Q.y+c[1];if(c[2]!=1e9){$.G.push("M","L");
var U=j+Q.e;if(c[4])$.j.push(c[2],Math.min(j,U,c[4][1]),c[2],Math.max(j,U,c[4][1]));else $.j.push(c[2],j,c[2],j+Q.e)}if(c[3]!=1e9){$.G.push("M","L");
var i=z+Q.m;if(c[5])$.j.push(Math.min(z,i,c[5][0]),c[3],Math.max(z,i,c[5][0]),c[3]);else $.j.push(z,c[3],i,c[3])}if($.j.length!=0){x.N.zZ=$;
x.vu=!0}};X.qV.Bw=function(x,Q,c,$){var z=X.qV.aee(x,[[Q.x],[Q.y]],c,$);return new bC(Q.x+z[0],Q.y+z[1])};
X.qV.H1=function(x,Q,c,$,z){var j=z==!0?1:.5,U=X.qV.aee(x,[[Q.x,Q.x+Math.round(Q.m*j),Q.x+Q.m],[Q.y,Q.y+Math.round(Q.e*j),Q.y+Q.e]],c,$);
return U};X.qV.aee=function(x,Q,c,$){if($==null)$=[!0,null,!0];var z=[0,0,1e9,1e9,null,null];if(!c.yC)return z;
var j=JSON.parse(JSON.stringify(Q));for(var U=0;U<2;U++){var i=1e9,b=Q[U],e=0,k=null;for(var K=0;K<b.length;
K++){var g=X.qV.aBy(x,b[K],j[1-U][K],U,c,$),R=g[0];if(R!=1e9)j[U][K]=R;if(R!=1e9&&Math.abs(R-b[K])<Math.abs(i)){i=R-b[K];
e=R;k=g[1]}}if(i!=1e9){z[U]=i;z[U+2]=e;z[U+4]=k}}return z};X.qV.aBy=function(x,Q,c,$,z,j){var U=1e9,i=null,b=z.Cs,e=z.Zo,k=[x.root];
while(k.length!=0&&b[2]){var K=k.pop(),g=K.a,R=g.rect;if(!g.M5())continue;if(K.children)for(var F=0;
F<K.children.length;F++)k.push(K.children[F]);if(x.g.indexOf(K.index)!=-1||R._6())continue;var T=R.m,D=T>>>1,a=R.e,_=a>>>1,I=U;
if($==0){if(Math.abs(R.x-Q)<Math.abs(U-Q))U=R.x;if(Math.abs(R.x+D-Q)<Math.abs(U-Q))U=R.x+D;if(Math.abs(R.x+T-Q)<Math.abs(U-Q))U=R.x+T}else{if(Math.abs(R.y-Q)<Math.abs(U-Q))U=R.y;
if(Math.abs(R.y+_-Q)<Math.abs(U-Q))U=R.y+_;if(Math.abs(R.y+a-Q)<Math.abs(U-Q))U=R.y+a}if(I!=U){i=[R.x+D,R.y+_]}}var f=U;
U=1e9;if(j[0]&&b[0]&&e.Bo&&z.Ub){var y=x.wZ(),Z=y[0],v=y[1],G=x.lG();for(var F=0;F<Z.length;F++)if((v[F]==-1||v[F]==G)&&Z[F][0]==$&&Math.abs(Z[F][1]-Q)<Math.abs(U-Q))U=Z[F][1]}if(b[1]&&e.bI&&z.Ub){var q=Math.round(d.fR.X_(e.ZD,x.cQ,x.m,e.PK));
if($==1&&e.ut==1){var h=c*.5*Math.sqrt(4/3),r;q*=Math.sqrt(4/3);r=Math.round((Q-h)/q)*q+h;if(Math.abs(r-Q)<Math.abs(U-Q))U=r;
r=Math.round((Q+h)/q)*q-h;if(Math.abs(r-Q)<Math.abs(U-Q))U=r}else{var r=Math.round(Q/q)*q;if(Math.abs(r-Q)<Math.abs(U-Q))U=r}}var H=x.p9;
if(b[3]&&e.p9&&z.Ub&&H.length!=0){for(var F=0;F<H.length;F++){if(!j[2]&&x.wE.indexOf(F)!=-1)continue;
var o=X.x5.YA(H,F);for(var P=0;P<3;P+=2)if(o[P+$]!=Q&&Math.abs(o[P+$]-Q)<Math.abs(U-Q))U=o[P+$]}}if(j[1])for(var O=0;
O<j[1].length;O++){var R=j[1][O],T=R.m,a=R.e,D=T>>>1,_=a>>>1;if(j[3]){D=T/2;_=a/2}var p=[R.x,R.y,R.x+D,R.y+_,R.x+T,R.y+a];
for(var F=0;F<6;F+=2)if(Math.abs(p[F+$]-Q)<Math.abs(U-Q))U=p[F+$]}if(b[4]){var R=new gh(0,0,x.m,x.e),G=x.lG();
if(G!=-1)R=x.B[G].Dd();var T=R.m,a=R.e,D=T>>>1,_=a>>>1;if(j[3]){D=T/2;_=a/2}var p=[R.x,R.y,R.x+D,R.y+_,R.x+T,R.y+a];
for(var F=0;F<6;F+=2)if(Math.abs(p[F+$]-Q)<Math.abs(U-Q))U=p[F+$]}if(Math.abs(U-Q)<=Math.abs(f-Q))i=null;
else U=f;var C=Math.abs(U-Q)<=4*X.q_()/x.Q.W?U:1e9;return[C,i]};X.TH=function(){X.U_.call(this,[10,12],X.K2,"tools/mwand");
this.Y8=null};X.TH.prototype=new X.U_;X.TH.prototype.Nn=function(x,Q,c,$){this.Y8=$;this.a9c=this.h8.wconf[0];
this.finish(x,Q,c,$)};X.TH.prototype.G3=function(x,Q,c,$,z){if(!$.TZ)return;var j=new jO(u.E.v);j.f=X.RZ;
j.data={d:"h_stepbck"};z.T(j);var U=$.x-this.Y8.x,i=Math.max(0,Math.min(255,Math.round(this.a9c+U/4)));
this.h8.wconf[0]=i;this.wh(z);this.finish(x,Q,c,this.Y8)};X.TH.prototype.zc=function(x,Q,c,$,z){this.h8.wconf[0]=this.a9c;
this.wh(z)};X.TH.prototype.getSelection=function(x,Q,c,$){var z=this.Oq;z=x.Q.$X($.x,$.y);var j=X.U_.aeS(new bC(Math.floor(z.x),Math.floor(z.y)),this.h8.wconf,this.h8.sall);
return j};X.TH.aw_=function(x,Q,c,$,z){if(Q.x<0||Q.x>x.m||Q.y<0||Q.y>x.e)return null;var j,U=new gh(0,0,x.m,x.e);
if($)j=x.VY();else{var i=x.g.length,e=null;if(i!=1){alert(i==0?"No layer selected.":"More than one layer selected.");
return null}var b=x.B[x.g[0]],k=b.kk<=0?null:b.kk==1?b.Rz():b.U5(x).F;if(z||k&&k.fd)e=k;if(e==null&&b.add.lsct!=null&&b.add.lsct!=hA.g$){alert("No layer selected.");
return null}if(e==null&&U.HM(b.rect))j=b.buffer;else{j=d.R(U.P()*4);if(e==null)d.WK(b.buffer,b.rect,j,U);
else X.x7.oO(e.channel,e.rect,e.color,j,U)}}var K=X.TH.OA(j,U,Q,null,c),g=d.qQ(K,U),R=d.R(g.P());d.L2(K,U,R,g);
return{rect:g,channel:R}};X.TH.aG=function(x,Q,c){var $=Q.m,z=Q.e,U=0,i=0,b=0,e=0;x=new Uint32Array(x.buffer);
var j=[],k=c.length;for(var F=0;F<k;F++){var K=c[F],g=Math.round(K.x-.5-Q.x),R=Math.round(K.y-.5-Q.y);
g=Math.max(0,Math.min($-1,g));R=Math.max(0,Math.min(z-1,R));var T=R*$+g,D=x[T];j.push([D&255,D>>8&255,D>>16&255,D>>>24])}return j};
X.TH.OA=function(x,Q,c,$,z){x=new Uint32Array(x.buffer);var j=Q.m,U=Q.e,i=j*U;if($==null)$=X.TH.aG(x,Q,[c]);
var b=Math.round(c.x-.5-Q.x),e=Math.round(c.y-.5-Q.y),k=e*j+b,K=Date.now(),g=d.R(j*U),R=z[0],T=1/R,D=z[1]&&R>0?255:0;
if(z[2]){var a=d.R(g.length),_=new Uint32Array(i),I=1;_[0]=b<<16|e;a[k]=1;while(I>0){var f=_[I-1];I--;
var y=f>>>16,Z=f&65535,F=Z*j+y,v=X.TH.Y9(x[F],$);if(v>R){var G=D*(1-Math.max(0,Math.min(1,(v-R)*T)));
g[F]=~~G}else{g[F]=255;if(Z!=U-1&&a[F+j]==0){_[I++]=y<<16|Z+1;a[F+j]=1}if(Z!=0&&a[F-j]==0){_[I++]=y<<16|Z-1;
a[F-j]=1}if(y!=j-1&&a[F+1]==0){_[I++]=y+1<<16|Z;a[F+1]=1}if(y!=0&&a[F-1]==0){_[I++]=y-1<<16|Z;a[F-1]=1}}}}else{for(var F=0;
F<i;F++){var v=X.TH.Y9(x[F],$);if(v<=R)g[F]=255}for(var Z=0;Z<U;Z++)for(var y=0;y<j;y++){var F=Z*j+y;
if(g[F]==0&&(y>0&&(g[F-1]==255||Z>0&&g[F-j-1]==255||Z<U-1&&g[F+j-1]==255)||y<j-1&&(g[F+1]==255||Z>0&&g[F-j+1]==255||Z<U-1&&g[F+j+1]==255)||Z>0&&g[F-j]==255||Z<U-1&&g[F+j]==255)){var v=X.TH.Y9(x[F],$),G=D*(1-Math.max(0,Math.min(1,(v-R)*T)));
g[F]=~~G}}}return g};X.TH.Y9=function(x,Q){var c=Q.length,$=X.TH.a9a(x,Q[0]),F=1;while(F!=c){$=Math.min($,X.TH.a9a(x,Q[F]));
F++}return $};X.TH.a9a=function(x,Q){var c=x&255,$=x>>>8&255,z=x>>>16&255,j=x>>>24&255;if(Q[3]==0)return j<5?0:255;
var U=Math.max(Math.abs(c-Q[0]),Math.max(Math.abs($-Q[1]),Math.abs(z-Q[2])));return j==0?255:U};X.b8=function(x,Q){if(Q)X.x7.call(this);
else if(x)X.x7.call(this,[10,49],X.jD,"tools/camove");else X.x7.call(this,[10,26],X.uX,"tools/patch");
this.CR=null;this.gM=null;this.z=null;this.xj=null;this.HU=new bC;this.d0=null;this.en=null};X.b8.prototype=new X.x7;
X.b8.prototype.Eu=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y);if(x.u&&d.e$(j,x.u.channel,x.u.rect)){var U=new gh(0,0,x.m,x.e),i=U.y_(x.u.rect);
if(!x.hS()||i._6())return;if(!0){var b=d.R(i.P());d.L2(x.u.channel,x.u.rect,b,i);x.u={channel:b,rect:i}}this.Gd(x);
this.MP(x);this.xj=j;this.HU=new bC(j.x-x.u.rect.x,j.y-x.u.rect.y);this.en=d.R(x.u.rect.P()*4);this.en.fill(255);
if(this.h8.patch==1){var e=x.B[x.g[0]];e.xn(x,x.u,!0);if(e.$Q==null)this.xj=null}this.d0=x.u.rect.clone()}else{this.gM={j:[j.x,j.y],G:["M"]};
this.CR=j}};X.b8.prototype.CK=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y);if(this.xj){if(this.h8.patch==1){if(x.oW.length==0){var U=x.B[x.g[0]].$Q,i=j.x-this.HU.x,b=j.y-this.HU.y;
X.qV.zG(x,x.g[0],Math.round(i-U.hX.x),Math.round(b-U.hX.y))}}else this.aaN(x,j,"clone")}if(this.CR){this.gM.G.push("L");
this.gM.j.push(j.x,j.y);this.CR=j;x.N.LV=this.gM;x.vu=!0}};X.b8.prototype.km=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y);
if(this.xj){var U=x.u.rect.clone();if(this.id==X.jD){var i=x.B[x.g[0]];i.Gw(x,i.$Q);x.u.rect=this.d0.clone();
var b=d.R(x.u.rect.P()*4);d.Dm(x.u.channel,b,3);this.S1(x,"sheal",b,x.u.rect,x.u.rect);x.u.rect=U;U=U.iO(this.d0)}this.aaN(x,j,"heal");
this.finish(x,U,null,null,!0);x.c(U);this.xj=null}if(this.CR){var e=X.U_.IJ(this.h8.setop,$.S(fM.FT),$.S(fM.Al)),k=new jO(u.E.G2,!0);
if(this.gM.j.length<=4)k.data=X.U_.sd();else k.data=X.U_.Pg(this.gM.j,e);Q.T(k);this.CR=null;x.N.LV=null;
x.vu=!0}};X.b8.prototype.hc=function(){return this.z};X.b8.prototype.np=function(x,Q,c,$,z){X.x7.prototype.np.call(this,x,Q,c,$,z);
this.Rv(z,$)};X.b8.prototype.Rv=function(x,Q){var c="auto;";if(Q!=null&&Q.S(fM.FT)&&!Q.S(fM.Al)||this.h8.setop=="union")c="copy";
var $=new jO(u.E.M,!0);$.data={d:u.H.aK,Wu:c};if(this.caller)this.caller.T($)};X.b8.prototype.aaN=function(x,Q,c){var $=new bC(Math.round(this.xj.x-Q.x),Math.round(this.xj.y-Q.y));
if(this.h8.patch==1)$.r$(-$.x,-$.y);this.z=$;this.S1(x,c,this.en,x.u.rect,x.u.rect);this.c(x,x.u.rect)};
X.azA=function(){X.b8.call(this,!0);this.h8.patch=1};X.azA.prototype=new X.b8(!0,!0);X.uY=function(x){if(x)X.x7.call(this,[10,52],X.aC5,"tools/meraser");
else X.x7.call(this,[10,13],X.axh,"tools/pbucket");this.oo=!1;this.aex=x};X.uY.prototype=new X.x7;X.uY.prototype.enable=function(x,Q,c,$){var z=new jO(u.E.M,!0);
z.data={d:u.H.aK,Wu:"default"};Q.T(z)};X.uY.prototype.Fy=function(x,Q){};X.uY.prototype.Eu=function(x,Q,c,$,z){if(this.NU(x,Q,c,$,z,!0))return;
this.oo=!0};X.uY.prototype.CK=function(x,Q,c,$,z){if(this.NU(x,Q,c,$,z))return};X.uY.prototype.km=function(x,Q,c,$,z,j){this.enable(x,Q,c,$);
var U=this.oo;this.oo=!1;if(!U||j)return;if(!x.hS())return;var i=x.Q.$X(z.x,z.y),b=X.TH.aw_(x,i,this.h8.wconf,this.h8.sall,!0);
if(b==null)return;var e=d.R(b.rect.P()*4);d.h4(e,(c.Gj&255)<<16|(c.Gj>>8&255)<<8|(c.Gj>>16&255)<<0);
d.Dm(b.channel,e,3);this.Gd(x);this.S1(x,this.aex?"erase":"draw",e,b.rect,b.rect);this.c(x,b.rect);this.finish(x,b.rect)};
X.Pk=function(){X.U_.call(this,[10,14],X.a0a,"tools/plasso");this.bY="crosshair";this.Jn=[];this.LD=null;
this.gM=null;this.ahM=0};X.Pk.prototype=new X.U_;X.Pk.prototype.disable=function(x,Q,c,$){this.SJ(x)};
X.Pk.prototype.Nn=function(x,Q,c,$){this.Jn=[fM.Hm,fM.Z1]};X.Pk.prototype.Da=function(x){return this.Jn.indexOf(x)!=-1};
X.Pk.prototype.R4=function(x){return this.gM!=null};X.Pk.prototype.XH=function(){return this.gM!=null};
X.Pk.prototype.sD=function(){return this.gM!=null};X.Pk.prototype.G3=function(x,Q,c,$){if(this.gM==null)return;
var z=this.gM,j=z.j,U=j.length-2,i=this.Oq;if(this.P3.gW(1)&&c.S(fM.Al)&&$.TZ){j.push(0,0);z.G.push("L");
U+=2}else if(c.S(fM.FT))i=X._q.Lz(new bC(j[U-2],j[U-1]),i);j[U]=i.x;j[U+1]=i.y;x.N.LV=z;x.vu=!0};X.Pk.prototype.zc=function(x,Q,c,$){var z=Date.now();
if(this.gM==null)this.gM={j:[this.Oq.x,this.Oq.y,this.Oq.x,this.Oq.y],G:["M","L"]};else{this.G3(x,Q,c,$);
if(z-this.ahM<250||bC.Xc(this.Oq,new bC(this.gM.j[0],this.gM.j[1]))<X.Ee(x,$)){this.LD=this.gM;this.finish(x,Q,c,$);
this.SJ(x);return}this.gM.G.push("L");this.gM.j.push(this.Oq.x,this.Oq.y)}this.ahM=z;x.N.LV=this.gM};
X.Pk.prototype.SJ=function(x){this.gM=null;this.Jn=[];if(x!=null){x.N.LV=null;x.vu=!0}};X.Pk.prototype.sM=function(x,Q,c,$){X.U_.prototype.sM.call(this,x,Q,c,$);
if($.S(fM.En)&&this.gM==null&&this.LD&&x.u!=null){var z=new jO(u.E.v);z.f=X.RZ;z.data={d:"h_stepbck"};
Q.T(z);this.Nn(x,c,$,null);this.gM=this.LD;return}if(this.gM==null)return;if($.S(fM.Hm)||$.S(fM.Z1)){this.gM.j.pop();
this.gM.j.pop();this.gM.G.pop();this.G3(x,c,$)}if($.S(fM.ln)){if(this.gM.j.length>4){this.LD=this.gM;
this.finish(x,c,$)}this.gM=null}if($.S(fM.En)){this.gM=null}x.N.LV=this.gM;x.vu=!0};X.Pk.prototype.getSelection=function(x,Q,c,$){return X.U_.Pg(this.gM.j,null,this.h8.anta)};
X.b0=function(){X.U_.call(this,[10,10],X.af2,"tools/mlasso");this.bY="crosshair";this.Jn=[];this.$=[];
this.LN=[];this.v0=[];this.qm=null;this._7=null;this.l7=null;this.V9=0;this.iV=0};X.b0.prototype=new X.U_;
X.b0.prototype.disable=function(x,Q,c,$){this.clear(x)};X.b0.prototype.R4=function(x){return this.$.length!=0};
X.b0.prototype.sD=function(){return this.$.length!=0};X.b0.prototype.Da=function(x){return this.Jn.indexOf(x)!=-1};
X.b0.prototype.Nn=function(x,Q,c,$){this.Jn=[fM.Hm,fM.Z1];var z=this.lM(this.Tl,x);if(this.$.length!=0&&(bC.Xc(z,this.$[0])<X.Ee(x,$)||Date.now()-this.V9<300)){this.jR(x,this.$[0]);
this.finish(x,Q,c);this.clear(x);return}this.V9=Date.now();if(this.$.length!=0)z=this.DW(z,x);else{var j=x.m,U=x.e,i=d.R(j*U),b=x.VY(),e=j*U*4;
for(var F=0;F<e;F+=4)i[F>>>2]=~~(.5+d.I5(b[F],b[F+1],b[F+2])*(b[F+3]*(1/255)));this.qm=d.yS.arE(i,j,U);
this.l7=new Uint16Array(i.length)}this.jR(x,z);this.iV=c.S(fM.Al)?1:0;this.Zi(x)};X.b0.prototype.jR=function(x,Q){var c=this.$;
this.LN[c.length]=this.v0.length;if(c.length!=0){d.yS.S9(this._7,Q.y*x.m+Q.x);var $=this.Qm(x,Q);$.reverse();
var z=X.b0.ace(x,$);this.v0=this.v0.concat(z)}c.push(Q);this.a1W(x)};X.b0.prototype.a1W=function(x){var Q=this.$[this.$.length-1],c=Q.y*x.m+Q.x;
this._7=d.yS.asz(this.qm.sE,this.qm.UZ,c);this.l7.fill(0)};X.b0.prototype.lM=function(x,Q){return new bC(Math.floor(Math.max(0,Math.min(Q.m-1,x.x))),Math.floor(Math.max(0,Math.min(Q.e-1,x.y))))};
X.b0.prototype.clear=function(x){this.v0=[];this.$=[];this.LN=[];this.qm=null;this._7=null;this.l7=null;
if(x!=null){x.N.LV=null;x.N.SE=[];x.vu=!0}this.Jn=[]};X.b0.prototype.G3=function(x,Q,c,$){var z=this.$,j=z.length;
if(j==0)return;var U=this.DW(this.lM(this.Oq,x),x),i=this.Qm(x,U);for(var F=0;F<i.length;F++){var b=i[F],e=new bC(b%x.m,Math.floor(b/x.m));
if(this.l7[b]>30&&bC.Xc(e,z[j-1])>20){this.jR(x,e);return}this.l7[b]++}if(this.iV==1&&$.TZ)this.jR(x,U);
this.Zi(x)};X.b0.prototype.Zi=function(x){var Q=this.$;if(Q.length!=0){var c=this.DW(this.lM(this.Oq,x),x),$=this.Qm(x,c);
$.reverse();var z=X.b0.ace(x,$),j=this.v0.concat(z),U=x.N.LV={j:j,G:["M"]};for(var F=2;F<j.length;F+=2)U.G.push("L")}x.N.SE=[];
for(var F=0;F<Q.length;F++)x.N.SE.push(Q[F].x+.5,Q[F].y+.5);x.vu=!0};X.b0.prototype.zc=function(x,Q,c,$){};
X.b0.prototype.sM=function(x,Q,c,$){if(this.$.length==0)return;if($.S(fM.Hm)||$.S(fM.Z1)){this.$.pop();
this.v0=this.v0.slice(0,this.LN[this.$.length]);this.LN.pop();if(this.$.length==0)this.clear(x);else this.a1W(x);
this.Zi(x)}if($.S(fM.ln)){var z=this.lM(this.Oq,x);this.jR(x,z);this.finish(x,c,$);this.clear(x)}if($.S(fM.En)){this.clear(x)}};
X.b0.prototype.getSelection=function(x,Q,c,$){return X.U_.Pg(this.v0,null,this.h8.anta)};X.b0.prototype.Qm=function(x,Q){var c=this.$[this.$.length-1],$=c.y*x.m+c.x,z=Q.y*x.m+Q.x;
if(this.iV==1)return[z,$];var j=[z];while(z!=$){z=this._7.AV[z];j.push(z);if(j.length>5e3){console.log(j);
throw"e"}}return j};X.b0.ace=function(x,Q){var c=[],$=x.m;for(var F=0;F<Q.length;F++){var z=Q[F];c.push(z%$+.5,Math.floor(z/$)+.5)}return c};
X.b0.prototype.DW=function(x,Q){var c=Q.m,$=Q.e,z=x.clone(),U=3;d.yS.S9(this._7,x.y*c+x.x);var j=this._7.eW[x.y*c+x.x];
for(var i=-U+1;i<U;i++)for(var b=-U+1;b<U;b++){var e=x.x+b,k=x.y+i;if(e<0||e>=c||k<0||k>=$)continue;
d.yS.S9(this._7,k*c+e);if(this._7.eW[k*c+e]<j)z.r$(e,k)}return z};X.gm=function(){X.Ur.call(this,[10,36],X.YD,"tools/ruler");
this.Sr=null;this.oV=null;this.p3=null;this.JJ=null;this.X9=null};X.gm.prototype=new X.Ur;X.gm.prototype.R4=function(x){return x.TZ};
X.gm.prototype.enable=function(x,Q,c,$){X.Ur.prototype.enable.call(this,x,Q,$,c);if(x)this.QE(x)};X.gm.prototype.disable=function(x,Q,c,$){if(x)this.SJ(x)};
X.gm.prototype.To=function(x,Q,c,$,z){this.Sr=this.p3=null;this.QE(c)};X.gm.prototype.Eu=function(x,Q,c,$,z){var j=X.Ee(x,z),U=x.Q.$X(z.x,z.y);
U.x=Math.round(U.x);U.y=Math.round(U.y);var i=this.Sr;this.oV=i?i.slice(0):null;var b=i&&bC.Xc(U,i[0])<j,e=i&&bC.Xc(U,i[1])<j,k=i&&i[2]&&bC.Xc(U,i[2])<j;
if(b||e||k){if($.S(fM.Al)&&i.length==2){if(e){var K=i[0];i[0]=i[1];i[1]=K}i[2]=i[0].clone();this.p3=[2]}else this.p3=[b?0:e?1:2]}else if(i&&X.gm.a6J(i[0],i[1],U)<j&&Math.min(i[0].x,i[1].x)-5<=U.x&&U.x<=Math.max(i[0].x,i[1].x)+5&&Math.min(i[0].y,i[1].y)-5<=U.y&&U.y<=Math.max(i[0].y,i[1].y)+5){this.p3=[];
this.X9=[];for(var F=0;F<i.length;F++){this.p3.push(F);this.X9.push(i[F].clone())}this.JJ=U}else{this.Sr=[U.clone(),U.clone()];
this.p3=[1]}};X.gm.prototype.CK=function(x,Q,c,$,z){if(this.p3==null)return;var j=this.Sr,U=this.p3,i=x.Q.$X(z.x,z.y);
i.x=Math.round(i.x);i.y=Math.round(i.y);if(U.length>1){var b=i.x-this.JJ.x,e=i.y-this.JJ.y;for(var F=0;
F<j.length;F++){j[F]=this.X9[F].clone();j[F].offset(b,e)}}else{j[U[0]].r$(i.x,i.y);if($.S(fM.FT)){j[U[0]]=X._q.Lz(j[1-U[0]],j[U[0]])}}this.QE(x);
this.VG(Q,u.E.M,{d:u.H.gR,f:this.id,aaZ:j[0],Hv:j[1],zk:j[2],cQ:x.cQ,aii:x.m});x.Q._u=d.A.cl([j[0].x,j[0].y,j[1].x,j[1].y]);
console.log(x.Q._u)};X.gm.prototype.km=function(x,Q,c,$,z,j){this.p3=null;if(j){this.Sr=this.oV.slice(0);
this.QE(x)}};X.gm.prototype.VG=function(x,Q,c){var $=new jO(Q,!0);$.data=c;x.T($)};X.gm.prototype.QE=function(x){var Q=this.Sr;
if(Q==null)this.SJ(x);else{var c=[Q[1].x,Q[1].y,Q[0].x,Q[0].y],$=["M","L"];if(Q.length>2){c.push(Q[2].x,Q[2].y);
$.push("L")}x.N.LV={G:$,j:c};x.N.SE=c}x.vu=!0};X.gm.prototype.SJ=function(x){x.N.LV=null;x.N.SE=[]};
X.gm.a6J=function(x,Q,c){var $=Q.x-x.x,z=Q.y-x.y,j=Math.abs(z*c.x-$*c.y+Q.x*x.y-Q.y*x.x),U=Math.sqrt($*$+z*z);
return U==0?0:j/U};X.aN=function(){X.x7.call(this,[10,19],X.EJ,"tools/sharpen");this.VJ="copy"};X.aN.prototype=new X.x7;
X.aN.prototype.Eu=function(x,Q,c,$,z){var j=this.h8.pdetail?cG.lQ:cG.EJ;if($.S(fM.Al))j=cG.W7;this.nB(x,c,$,z,this.h8.strn,j);
if(this.Vr==null)return;this.X4(x)};X.aN.prototype.CK=function(x,Q,c,$,z){this.iB(x,Q,c);if(this.sO)this.jB(x,c,z);
if(this.Vr==null)return;if(!z.TZ)return;this.QG(x,c,$,z);this.X4(x)};X.VI=function(){X.x7.call(this,[10,24],X.nJ,"tools/shbrush");
this.VJ="draw";this.h8.opacity=.5};X.VI.prototype=new X.x7;X.VI.prototype.Eu=function(x,Q,c,$,z){this.nB(x,c,$,z,1);
if(this.Vr==null)return;this.MP(x);this.X4(x)};X.VI.prototype.CK=function(x,Q,c,$,z){this.iB(x,Q,c);
if(this.sO)this.jB(x,c,z);if(this.Vr==null)return;if(!z.TZ)return;this.QG(x,c,$,z);this.X4(x)};X.VI.prototype.km=function(x,Q,c,$,z){if(this.Vr==null)return;
this.S1(x,"sheal",this.Vr.GM(),this.Vr.Pe(),this.Vr.vJ(),null);this.c(x,this.Vr.vJ());X.x7.prototype.km.call(this,x,Q,c,$,z)};
X.jL=function(){X.x7.call(this,[10,20],X.Y6,"tools/smudge");this.VJ="copy"};X.jL.prototype=new X.x7;
X.jL.prototype.Eu=function(x,Q,c,$,z){var j=this.h8.brush.toolOptions;this.nB(x,c,$,z,this.h8.strn,cG.Y6);
if(this.Vr==null)return;this.X4(x)};X.jL.prototype.CK=function(x,Q,c,$,z){this.iB(x,Q,c);if(this.sO)this.jB(x,c,z);
if(this.Vr==null)return;if(!z.TZ)return;this.QG(x,c,$,z);this.X4(x)};X.XQ=function(){X.x7.call(this,[10,23],X.vk,"tools/sponge");
this.VJ="sponge"};X.XQ.prototype=new X.x7;X.XQ.prototype.Eu=function(x,Q,c,$,z){this.nB(x,c,$,z,this.h8.flow);
if(this.Vr==null)return;this.X4(x)};X.XQ.prototype.CK=function(x,Q,c,$,z){this.iB(x,Q,c);if(this.sO)this.jB(x,c,z);
if(this.Vr==null)return;if(!z.TZ)return;this.QG(x,c,$,z);this.X4(x)};X.nF=function(){X.Ur.call(this,[10,17],X.QT,"tools/zoom");
this.HQ=!1;this.bH=!0;this.Tm=!1;this.mU=0;this.oJ=null;this.Yh=null;this.BD=0;this.oH=null;this.amt=0;
this._1=new ev([{name:[8,0],KR:"Ctrl + +"},{name:[8,1],KR:"Ctrl + -",P$:!0},{name:[20,3],KR:"Ctrl + 0"},{name:["VAR0: 100%",[20,2]],KR:"Ctrl + 1"}],[{K:u.E.v,f:X.QT,C:{d:"zoom",bH:!0}},{K:u.E.v,f:X.QT,C:{d:"zoom",bH:!1}},{K:u.E.v,f:X.QT,C:{d:"adapt",b:"fitscr"}},{K:u.E.v,f:X.QT,C:{d:"adapt",b:"pixel"}}])};
X.nF.prototype=new X.Ur;X.nF.prototype.x1=function(x,Q,c,$,z){var j=this._1;j._();j.parent=Q;j.update(x,c);
var U=new jO(u.E.M,!0);U.data={d:u.H.A_,G7:j,x:z.TN+2,y:z.yv+1};Q.T(U)};X.nF.prototype.enable=function(x,Q,c,$){this.Ea(Q,$);
if(x&&Date.now()-this.mU<300)this.To({d:"adapt",b:"pixel"},Q,x,$,c);this.mU=Date.now()};X.nF.prototype.Eu=function(x,Q,c,$,z){this.Yh=new bC(z.x,z.y);
this.BD=x.Q.W;this.oH=x.Q.z.clone()};X.nF.prototype.CK=function(x,Q,c,$,z){if(this.Yh==null)return;var j=Math.exp(Math.log(this.BD)+(z.x-this.Yh.x)/64);
j=Math.max(.02,Math.min(X.nF.xA[0],j));x.Q.W=this.BD;x.Q.z=this.oH.clone();this.To({d:"zoom",W:j,Em:this.Yh,Tm:this.Tm},Q,x,$,c)};
X.nF.prototype.km=function(x,Q,c,$,z){if(bC.Xc(this.Yh,z)<4){var j=this.ads($);this.To({d:"zoom",bH:j,Em:z,Tm:this.Tm},Q,x,$,c)}this.Yh=null};
X.nF.xA=[128,64,32,16,12,8,6,5,4,3,2,1,2/3,1/2,1/2*(2/3),1/4,1/4*(2/3),1/8,1/8*(2/3),1/16,1/16*(2/3),1/32,1/32*(2/3),1/64];
X.nF.rK=function(x,Q,c,$){var z=1;while(x*z*1/2>c||Q*z*1/2>$)z*=1/2;if(x*z*2/3>c||Q*z*2/3>$)z*=1/2;else if(x*z>c||Q*z>$)z*=2/3;
return z};X.nF.aro=function(x,Q){var c=X.nF.aD0(x);if(Q&&c==0)return x;if(!Q&&c==X.nF.xA.length-1)return x;
return X.nF.xA[Q?c-1:c+1]};X.nF.aD0=function(x){var Q=0;while(X.nF.xA[Q]>x)Q++;return Q};X.nF.Ec=function(x,Q,c,$){var z=x.Ta;
if($==0||$==null){$=X.nF.aro(x.W,c);if($==x.W)return}var j=x.$X(Q.x,Q.y);j.x=Math.max(0,Math.min(z.m,j.x));
j.y=Math.max(0,Math.min(z.e,j.y));if(!1){}else{var U=x.FG(),i=x.W/$;U.translate(-j.x,-j.y);U.scale(i,i);
U.translate(j.x,j.y);x.atn(U)}};X.nF.prototype.To=function(x,Q,c,$,z){if(x.d=="pzoom"){if(typeof x.b=="string")return;
x={d:"zoom",W:x.b/100}}var j=0,U=!1,i=null;if(x.d=="adapt"){var b=0;if(x.b=="pixel")b=1;if(x.b=="fitscr"){var b=0,e=c.Q.yY.m,k=c.Q.yY.e,K=new gh(0,0,c.m,c.e),g=d.A.Hg(K).j,R=new bI;
R.rotate(c.Q.A6);d.A.i(g,R,g);var T=d.A.pA(g),D=z.w6?d.fR.P0+4:8;b=Math.min((e-D*2)/T.m,(k-D*2)/T.e);
c.Q.z.r$(0,0)}i=new bC(Math.round(c.Q.yY.m/2),Math.round(c.Q.yY.e/2));j=b;X.nF.Ec(c.Q,i,U,j);c.Fq=!0}if(x.d.startsWith("multi")){function a(P){var J=P[0].x-P[1].x,t=P[0].y-P[1].y;
return Math.sqrt(J*J+t*t)}function _(P){return new bC((P[0].x+P[1].x)/2,(P[0].y+P[1].y)/2)}function I(P){var J=P[0].x-P[1].x,t=P[0].y-P[1].y;
return Math.atan2(t,J)}var f=x.fm,y=_(f);if(x.d=="multidown"){this.oJ=[f,c.Q.W,c.Q.$X(y.x,y.y),c.Q.A6]}else{var Z=X.nF.xA,r=.15;
j=this.oJ[1]*a(f)/a(this.oJ[0]);j=Math.max(Z[Z.length-1],Math.min(Z[0],j));if(j!=c.Q.W)X.nF.Ec(c.Q,y,U,j);
var v=this.oJ[2],G=c.Q.wu(v.x,v.y),q=c.Q.z;q.x=Math.round(q.x+y.x-G.x);q.y=Math.round(q.y+y.y-G.y);var h=this.oJ[3]+(I(f)-I(this.oJ[0]));
h=h%(2*Math.PI);while(h<0)h+=2*Math.PI;if(h<r||h>2*Math.PI-r)h=0;c.Q.A6=h;c.Fq=!0}}if(x.d=="scroll"){i=x.Em;
var Z=X.nF.xA,H=x.Kj.y,o=1+Math.abs(H)*8e-4*(x.arb?10:1);if(H>0)o=1/o;j=c.Q.W*o;X.nF.Ec(c.Q,i,U,Math.min(Z[0],Math.max(Z[Z.length-1],j)));
c.Fq=!0}if(x.d=="zoom"){var P=x.Tm?Q.H0:[c];for(var F=0;F<P.length;F++){var O=P[F],p=O.Q;i=x.Em?x.Em:new bC(Math.round(p.yY.m/2),Math.round(p.yY.e/2));
if(x.W!=null)j=x.W;else U=x.bH;X.nF.Ec(p,i,U,j);O.Fq=!0}}if(x.d=="mskView"){var C=c.B[c.g[0]];if(C.kk<=0){C.kk=1;
c.tP=!0}var W=C.kk==3?C.U5(c).F:C.Rz();if(x.b==0){c.Q.O=[1,1,1];W.fd=!1}if(x.b==1){c.Q.O=[1,1,1];W.fd=!0}if(x.b==2){c.Q.O=[0,0,0];
W.fd=!0}for(var F=0;F<c.fG.length;F++)c.fG[F].fd=!1;c.oW=[];c.vu=!0}};X.nF.prototype.sM=function(x,Q,c,$){if(this.HQ!=$.S(fM.Al)){this.HQ=$.S(fM.Al);
var z={d:u.H.gR,f:this.id,HQ:this.HQ},j=new jO(u.E.M,!0);j.data=z;Q.T(j);this.Ea(Q,$)}};X.nF.prototype.Ea=function(x,Q){var c=new jO(u.E.M,!0),$=this.ads(Q);
c.data={d:u.H.aK,Wu:$?"zoom-in":"zoom-out"};x.T(c)};X.nF.prototype.np=function(x,Q,c,$){this.bH=x.bH;
this.Tm=x.Tm;this.Ea(Q,$)};X.nF.prototype.ads=function(x){var Q=this.bH;if(x.S(fM.r_)&&x.S(fM.qP))Q=!0;
if(this.HQ)Q=!Q;return Q};X.nF.a06=function(x,Q){if(x.S(fM.LJ)||x.S(fM.akB)){Q.f=X.QT;Q.data={d:"zoom",bH:!0}}if(x.S(fM.m8)){Q.f=X.QT;
Q.data={d:"zoom",bH:!1}}if(x.S(fM.O6)){Q.f=X.QT;Q.data={d:"adapt",b:"fitscr"}}if(x.S(fM.kl)){Q.f=X.QT;
Q.data={d:"adapt",b:"pixel"}}};X.qW=function(x,Q,c){X.Ur.call(this,x,Q,c);this.w4=null;this.n$=null;
this.iZ=null;this.a3N=0};X.qW.prototype=new X.Ur;X.qW.Un=function(x,Q){var c={t:"obj ",v:[{t:"prop",v:{classID:"Path",keyID:"WrPt"}}]},$=x==null?{classID:"null",null:c,WhPt:{t:"bool",v:!0}}:{classID:"Strk",null:c,Usng:{t:"type",v:{classID:x}},__name:"Stroke"};
if(Q)$.Prs={t:"bool",v:!0};return{q4:x==null?"fill":"stroke",dx:$}};X.qW.prototype.enable=function(x,Q,c,$,z){this.n$=c;
var j=new jO(u.E.M,!0);j.data={d:u.H.aK,Wu:"default"};Q.T(j)};X.qW.prototype.x1=function(x,Q,c,$,z){var j=x.zo(),U=j[0],i=j[1];
if(i.length==0)return;var b=U[i[0]],e=b.add.vmsk,k=x.Q.$X(z.x,z.y),K=4*X.q_()/x.Q.W,g=new gh(k.x-K,k.y-K,K*2,K*2),R=d.o.qy(e.$,g)[0];
if(R.length!=0){e.xf=R;x.vu=!0}var T=d.o.e$(e.$,k).xR;if(T!=-1){e.g=[T];x.vu=!0}var D=new jO(u.E.M,!0);
D.data={d:u.H.gR,f:this.id,xK:z,rx:x,B4:c};Q.T(D)};X.qW.prototype.aCK=function(x,Q){var c=new jO(u.E.M,!0);
c.data={d:u.H.hW,hF:ke.eH};if(!Q.Ub)x.T(c);c.data={d:u.H.hW,hF:ke.TM};if(!Q.Zo.iL)x.T(c)};X.qW.prototype.gb=function(x,Q,c,$,z){if(c.Oj!=this.id&&z==null)return;
if(x.g.length==0)return;var j=x.B[x.g[0]],U=j.add.vmsk,i=j.add.vstk,b=j.add.vstl;if(i9==0){var e=aF.L$(j.add);
this.w4=x;this.iZ=Q;if(j.Z6()&&U!=null&&(JSON.stringify(i)!=JSON.stringify(c.T6)||JSON.stringify(e)!=JSON.stringify(c.gd))){this.a3N=Date.now();
var k=new jO(u.E.M,!0);k.data={d:u.H.hW,hF:ke.u$,b:e};Q.T(k);k.data={d:u.H.hW,hF:ke.Rc,b:i};Q.T(k)}}else if(b){var K=JSON.stringify(b);
if(K!=JSON.stringify(c.xV)){var k=new jO(u.E.M,!0);k.data={d:u.H.hW,hF:ke.hV,b:JSON.parse(K)};Q.T(k)}}};
X.qW.prototype.Fy=function(x,Q){if(this.w4==null)return;if(Q==ke.m6||Q==ke.u$||Q==ke.Rc){if(Date.now()-this.a3N<50)return;
var c=Q==ke.u$,$=this.w4,z=c?x.gd:x.T6,j=[],U=$.g;for(var F=0;F<U.length;F++){var i=U[F],b=$.B[i];if(!b.Z6()||b.add.vmsk==null)continue;
j.push(i)}var e=new jO(u.E.v,!0);e.f=X.Mf;e.data={d:eM.KE,PG:j,jJ:c,b:z};if(j.length!=0)this.iZ.T(e)}};
X.qW.prototype.a1T=function(x){if(typeof x=="number"){var Q=new jO(u.E.G2,!0);Q.data=X.Rp.YJ(0);Q.data.dx.Usng.v.Type.v.Clr.v=d.I.lV({Z:x>>>16&255,r:x>>>8&255,J:x>>>0&255});
this.iZ.T(Q)}};X.qW.prototype.To=function(x,Q,c,$,z){this.iZ=Q;if(x.d=="newfill"){if(x.Iz==0){var j=new jO(u.E.M,!0);
j.data={d:u.H.LL,AD:"colorpicker",aW:z.Gj,_k:this.a1T.bind(this)};Q.T(j)}}else if(x.d=="smplp"){if(c==null)return;
var U=c.zo(),i=U[0],b=U[1];if(b.length==0){alert("No paths selected");return}var k=i[b[0]];if(k.add.vmsk.g.length<=0){alert("No paths selected");
return}if(this.WX==null){this.WX=k.add.vmsk.clone();this.DG=JSON.stringify(k.add.vogk);this.gM=k;this.w4=c}var j=new jO(u.E.M,!0);
j.data={d:u.H.LL,AD:"simplifypath",ZR:100,ka:this.am1.bind(this)};Q.T(j)}else if(x.d=="pathedit"){var K=x.Zq,g="",R=c.iL.slice(0),T=c.IH.slice(0),D=c.iL.slice(0),a=c.IH.slice(0);
if(K=="rnm"){var _=-1-x.xR,I=R[_],f=hf._S(x.name,I.add);if(_!=0)D[_]=f;else{a=[D.length];D.push(f);D[0]=hf._S("Work Path")}g="Rename"}else if(K=="new"){var f=hf._S("Path "+R.length);
if(x.a6E){var U=c.zo(),i=U[0],b=U[1],y=i[b[0]];f.add.vmsk=y.add.vmsk.clone();f.add.vogk=JSON.parse(JSON.stringify(y.add.vogk));
if(y.xR==-1){var Z=D[a[0]]=hf._S("Path "+R.length);Z.name=y.name;Z.xR=y.xR}}D.push(f);a=[D.length-1];
g="New"}else if(K=="del"){if(a.length==0)return;a.sort(function(O,S){return O-S});if(a[0]==0){D[0]=hf._S(R[0].name);
a=a.slice(1)}var v=0;while(a.length!=0){D.splice(a[0]-v,1);a=a.slice(1);v++}g="Delete"}else if(K=="fromsel"){var k=D[0]=hf._S("Work Path");
a=[0];if(c.u==null)return;var G=c.u.channel.slice(0);for(var F=0;F<G.length;F++)G[F]=G[F]>128?2:1;var q=c.u.rect.clone();
q.ss(1,1);var h=d.R(q.P());d.L2(G,c.u.rect,h,q);var r=iw.a6(h,q.m,q.e,Math.round(q.P()*5e-4)),i=iw.zo(r),H=new bI(1,0,0,1,-1+c.u.rect.x,-1+c.u.rect.y);
for(var F=0;F<i.length;F++)d.A.i(i[F].path.j,H,i[F].path.j);for(var F=0;F<i.length;F++){var o=i[F];if(o.color==1&&o.parent==-1)continue;
var P=d.A.tf(i[F].path,!1);P[2].Kp=0;k.add.vmsk.$=k.add.vmsk.$.concat(P.slice(2))}k.add.vogk=eM.jz(k.add.vmsk.$);
g="Selection to"}var O=new dg(g+" Path",this);O.data={oV:R,dh:T,aDH:D,z0:a};if(K=="fromsel"){O.data.Cj=c.u;
O.data.UI=null}c.kp(O);this.Tz(O.data,c)}else{var p=x.LX,U=c.zo(x.d=="append"||x.d=="fromAction"),i=U[0],b=U[1],k=i[b[0]],C=k.add.vmsk,W=k.add.vogk,J=C.clone(),t=C.clone(),Y=JSON.stringify(W);
if(x.d=="fromAction"){var l=x.fe,m=l.q4,B=l.dx,L=B.T;if(m=="set"){if(L){W.push(d.eV.Yy(L));t.$.push({type:0,Kp:1,length:0});
d.eV.Rt(W,t);p=[12,76,0]}else throw B}else if(m=="draw"){W=[d.eV.Yy(B.Shp)];t.$.push({type:0,Kp:1,length:0});
d.eV.Rt(W,t);X.qW.ap7(t.$,B.AntA.v,z.Gj,Q);return}else throw m}else if(x.d=="remove"){if(x.PS&&t.xf.length!=0){t.$=d.o.aB1(t.$,t.xf,W,x.acw);
var A=d.o.WV(t.$);for(var F=0;F<t.g.length;F++)if(t.g[F]>=A){t.g.splice(F,1);F--}t.xf=[];p="Delete Anchors"}else{if(t.g.length==0)return;
var v=0;for(var F=0;F<t.g.length;F++){W.splice(t.g[F]+v,1);v--}t.$=d.o.azr(t.$,t.g);t.g=[];t.xf=[];if(p==null)p="Delete Paths"}}if(x.d=="append"){X.qW.SR(x.adQ,t,W)}this.kS(c,k.xR,t,W);
this.FU(c,p,k.xR,J,t.clone(),null,Y,JSON.stringify(W))}};X.qW.ap7=function(x,Q,c,$){var z=new eM.hn;
z.$=z.$.concat(x.slice(2));var j=z.Rz();if(!Q)d.round(j.channel);var U=d.R(j.rect.P()*4);d.h4(U,(c&255)<<16|(c>>8&255)<<8|(c>>16&255)<<0);
d.Dm(j.channel,U,3);var i=new jO(u.E.v,!0);i.f=X.gN;i.data={d:"draw",sn:{buffer:U,rect:j.rect.clone()},LX:this.name};
$.T(i)};X.qW.an=function(x,Q){var c=d.o.auZ(x.$,x.g),$=[];for(var F=0;F<x.g.length;F++)$.push(JSON.parse(JSON.stringify(Q[x.g[F]])));
return[c,$]};X.qW.SR=function(x,Q,c){var $=d.o.WV(Q.$),z=d.o.WV(x[0]);Q.$=Q.$.concat(x[0].slice(2));
Q.g=[];for(var F=0;F<z;F++)Q.g.push($+F);for(var F=0;F<z;F++)c.push(JSON.parse(JSON.stringify(x[1][F])))};
X.qW.prototype.Da=function(x,Q){if(Q==null)return!1;var c=Q.zo(),$=c[0],z=c[1];if(z.length==0)return!1;
var j=$[z[0]],U=j.add.vmsk;if(U&&U.g.length+U.xf.length!=0)return[fM.Hm,fM.Z1].indexOf(x)!=-1};X.qW.prototype.sM=function(x,Q,c,$){if(x==null)return;
var z=x.zo(),j=z[0],U=z[1];if(U.length==0)return;var i=j[U[0]],b=i.add.vmsk;if($.S(fM.En)||$.S(fM.ln)||this.id==X.tD&&$.S(fM.dp)&&b.xf.length==1){b.xf=[];
x.vu=!0}if(b.g.length!=0){var e=$.um(x?x.Q.A6:0);if(e.x!=0||e.y!=0){var k=b.clone(),K=b.clone(),g=new bI(1,0,0,1,e.x,e.y),R=i.add.vogk,T=JSON.stringify(R);
if($.S(fM.Al)){var D=X.qW.an(K,R);X.qW.SR(D,K,R)}d.o.Of(K.$,g,K.g);d.eV.i(R,d.D.Gr(g),K.g);this.kS(x,i.xR,K,R);
this.FU(x,"Move Paths",i.xR,k,K.clone(),!0,T,JSON.stringify(R))}if($.S(fM.Hm)||$.S(fM.Z1))this.To({d:"remove",PS:this.id==X.tD},Q,x,$,c)}};
X.qW.prototype.FU=function(x,Q,c,$,z,j,U,i){var b=new dg(Q,this);b.data={nL:c,XN:$,Qw:z,a6h:j,aw1:U,Yb:i};
x.kp(b)};X.qW.prototype.Tz=function(x,Q){if(x.nL!=null)this.kS(Q,x.nL,x.Qw.clone(),JSON.parse(x.Yb));
else{Q.iL=x.aDH.slice(0);Q.IH=x.z0.slice(0);Q.vu=Q.tP=!0}if(x.Cj||x.UI){Q.u=x.UI;Q.ox=!0}};X.qW.prototype.pC=function(x,Q){if(x.nL!=null)this.kS(Q,x.nL,x.XN.clone(),JSON.parse(x.aw1));
else{Q.iL=x.oV.slice(0);Q.IH=x.dh.slice(0);Q.vu=Q.tP=!0}if(x.Cj||x.UI){Q.u=x.Cj;Q.ox=!0}};X.qW.prototype.kS=function(x,Q,c,$){var z=Q<0?x.iL[-1-Q]:Q<1e6?x.B[Q]:x.B[Q-1e6].add.TySh,j=z.add.vmsk;
j.channel=null;j.ha=!0;if(j.OE){j.OE.channel=null;j.OE.ha=!0}z.add.vmsk=c;z.add.vogk=$;if(1e6<=Q){dU.c5(z);
var U=x.B[Q-1e6],i=z,b=this.n$;aE.Wz(U,b.Dn);x.c()}else if(0<=Q){c.ha=!0;z.kT(x);x.c()}x.vu=x.tP=!0};
X.Rp=function(x,Q,c,$){X.qW.call(this,x,Q,c);this.h8={shape:dJ.$H(),pshape:0,binop:0,crad:0,irad:40,length:4,sides:5,width:5,tolr:5,tsiz:300,cstr:{z_:0},anta:!0,aopts:[!1,!1,50,100,0]};
this.agk=$;this.VZ=null;this.$0=null;this.Ux=null;this.P3=new ak};X.Rp.prototype=new X.qW;X.Rp.prototype.R4=function(x){return x.TZ&&this.id!=X.cZ};
X.Rp.prototype.enable=function(x,Q,c,$,z){this.n$=c;var j=new jO(u.E.M,!0);j.data={d:u.H.aK,Wu:"crosshair"};
Q.T(j)};X.Rp.prototype.sM=function(x,Q,c,$){X.qW.prototype.sM.call(this,x,Q,c,$);this.P3.sM($);this.CB(Q,c)};
X.Rp.prototype.CB=function(x,Q){var c=new jO(u.E.M,!0);c.data={d:u.H.gR,f:this.id,Ym:this.QW(Q)};x.T(c)};
X.Rp.prototype.QW=function(x){var Q=this.P3.zx(0),c=this.P3.gW(0),$=X.U_.IJ(this.h8.binop,Q,c);if(x.cb==1&&$==0)$=1;
return $};X.Rp.prototype.YB=function(x,Q,c,$){};X.Rp.prototype.Eu=function(x,Q,c,$,z){var j=c.cb;if(j!=2)this.aCK(Q,c);
if(j==2&&!x.hS())return;var U=x.Q.$X(z.x,z.y);U=X.qV.Bw(x,U,c);this.Ux=[U.x,U.y];this.VZ=U;this.$0=new bC(0,0);
this.P3.Eu($)};X.Rp.prototype.ajD=function(x,Q,c,$){var z=[this.VZ.clone(),Q.clone()];c=this.P3.zx(1)||c.S(fM.FT)||this.P3.gW(1)?c:null;
if(this.agk)z=X.Rp.SN(z[0],z[1],c,!0,this.h8.cstr);if(x)x.Q._u=new gh(z[0].x,z[0].y,z[1].x-z[0].x,z[1].y-z[0].y);
return this.YB(z[0],z[1],this.P3.zx(1)&&c.S(fM.FT),this.Ux,x.Q,$)};X.Rp.prototype.amG=function(x,Q,c){var $=x.Q.$X(Q.x,Q.y);
if(this.id==X.cZ)return $;var z=this.h8.cstr;if(z.z_==2){var j=new gh($.x-z.x,$.y-z.y,z.x,z.y),U=X.qV.H1(x,j,c);
$.x+=U[0];$.y+=U[1];X.qV.ao(x,j,U)}else $=X.qV.Bw(x,$,c);return $};X.Rp.prototype.CK=function(x,Q,c,$,z){if(this.VZ==null)return;
var j=this.Ux,U=j.length,i=z?this.amG(x,z,c):new bC(j[U-2],j[U-1]);if($.S(fM.r_))this.VZ=i.HY(this.$0);
else this.$0=i.HY(this.VZ);j.push(i.x,i.y);if(this.h8.shape==null)this.h8.shape=c.jS[0];var b=this.ajD(x,i,$,!0)[0],e=d.A.CJ(b);
x.N.LV=e;if(this.id!=X.cZ&&this.id!=X.Lw&&this.id!=X.y4)X.Ur.fZ(z,x.Q._u,x,c);x.vu=!0;this.P3.CK()};
X.Rp.prototype.al5=function(x,Q,c,$){var z=x[4].clone();if($){z.x-=Q/2;z.y-=c/2}if(this.id==X.Lw){Q/=2;
c/=2;z.x+=Q;z.y+=c;c=-c;Q=0}var j=this.YB(z,new bC(z.x+Q,z.y+c),!1,this.Ux);this.amm(x[0],x[1],x[2],j)};
X.Rp.prototype.amm=function(x,Q,c,$){var z=c.cb,j=new jO(u.E.G2,!0);if(z==0)j.data=X.Rp.aik($[1],c);
else if(z==1){var U={__name:"Set",classID:"setd",null:{t:"obj ",v:[{t:"prop",v:{classID:"Path",keyID:"WrPt"}}]},T:$[1]};
j.data={q4:"set",dx:U}}else{var U={__name:"Draw",classID:"Draw",AntA:{t:"bool",v:!0},Shp:$[1]};j.data={q4:"draw",dx:U}}Q.T(j);
if($[1].v.classID=="customShape"&&$[1].v.Nm.v.startsWith("--")){var i=x.zo(),b=i[0],k=i[1],K=b[k.pop()],g=K.add.vmsk,R=K.add.vogk;
d.eV.axu(R);var T=g.clone();T.$=$[0];this.kS(x,K.xR,T,R)}};X.Rp.prototype.km=function(x,Q,c,$,z,j){if(this.VZ==null)return;
var U=this.amG(x,z,c),i=this.QW(c),b=c.cb,e=this.Ux,k=e.length;if(this.id==X.cZ&&k<=4){}else if(k<=4){U.x=Math.round(U.x);
U.y=Math.round(U.y);var K=new jO(u.E.M);K.data={d:u.H.LL,AD:"createshape",axg:this.al5.bind(this),adE:this.name,aBb:[x,Q,c,$,U]};
if(!j)Q.T(K)}else if(k!=2){var g=this.ajD(x,U,$),R=g[0],T=x.zo(!0),D=T[0],a=T[1],_=a.length-1;if(b==1&&R.length>2||b==0&&i!=0&&_!=-1&&D[a[_]].xR>=0){R[2].Kp=[1,2,3,0][i-1];
var I=D[a.pop()],f=I.add.vmsk,y=I.add.vogk,Z=f.clone(),v=f.clone(),G=JSON.stringify(y);v.$=v.$.concat(R.slice(2));
v.g=[d.o.WV(v.$)-1];var q=d.eV.Yy(g[1]);y.push(q?q:d.eV.rB());this.kS(x,I.xR,v,y);this.FU(x,this.name,I.xR,Z,v,null,G,JSON.stringify(y))}else if(b==0){this.amm(x,Q,c,g)}else if(b==2){X.qW.ap7(R,this.h8.anta,c.Gj,Q)}}this.VZ=null;
x.N.LV=null;x.N.zZ=null;x.N.It=[];x.Q._u=null;x.vu=!0;this.P3.km();this.CB(Q,c)};X.Rp.prototype.np=function(x,Q,c,$,z){for(var c in x)this.h8[c]=x[c]};
X.Rp.SN=function(x,Q,c,$,z){var j=x.x,U=x.y,i=Q.x,b=Q.y;if(z&&z.z_==2){if($){i=Math.round(i);b=Math.round(b)}j=i-z.x;
U=b-z.y}else{var e=0;if(z&&z.z_==1)e=z.y/z.x;else if(c&&c.S(fM.FT))e=1;if(e!=0){if($){if(j<i)j=Math.floor(j);
else j=Math.ceil(j);if(U<b)U=Math.floor(U);else U=Math.ceil(U)}var k=Math.abs(i-j),K=Math.abs(b-U),g=k;
if(K/k<e)g*=K/k/e;i=i>j?j+g:j-g;b=b>U?U+g*e:U-g*e}if(c&&c.S(fM.Al)){j-=i-j;U-=b-U}}var x=new bC(j,U),Q=new bC(i,b);
if($)X.Rp.agZ(x,Q);return[x,Q]};X.Rp.agZ=function(x,Q){if(x.x>Q.x){var c=x.x;x.x=Q.x;Q.x=c}if(x.y>Q.y){var c=x.y;
x.y=Q.y;Q.y=c}x.x=Math.floor(x.x);x.y=Math.floor(x.y);Q.x=Math.ceil(Q.x);Q.y=Math.ceil(Q.y)};X.Rp.anx=function(){return{classID:"Mk",null:{t:"obj ",v:[{t:"Clss",v:{classID:"contentLayer"}}]},Usng:{t:"Objc",v:{classID:"contentLayer",Type:{t:"Objc",v:{}}}}}};
X.Rp.YJ=function(x,Q){var c=X.Rp.anx(),$=c.Usng.v.Type;if(Q==null){$.v=JSON.parse(JSON.stringify(aF.Y3[x]));
$.v.classID=["solidColorLayer","gradientLayer","patternLayer"][x]}else X.de.WH(Q,$.v,x);return{q4:"make",dx:c}};
X.Rp.aik=function(x,Q){var c=Q.gd,$=JSON.parse(JSON.stringify(Q.T6));$.fillEnabled.v=c.bf!=0;var z=X.Rp.YJ(Math.max(0,c.bf-1),c.WB);
z.dx.Usng.v.Shp=x;z.dx.Usng.v.strokeStyle={t:"Objc",v:$};return z};X.qj=function(x){X.qW.call(this,[[10,29],[10,51],"Add Anchor Point","Delete Anchor Point","Convert Point"][x],[X.tD,X.akJ,X.a4F,X.ah1,X.ao$][x],["tools/pen","tools/cpen","tools/aapoint","tools/dapoint","tools/capoint"][x]);
this.iV=x;this.OY=null;this.If=null;this.WX=null;this.DG=null;this.mZ=0;this.D3=null;this.lH=!1;this.fj=!1;
this.Lx=!1;this.bA=!1;this.nI=!1;this.Fp=!1;this.mU=0};X.qj.prototype=new X.qW;X.qj.prototype.R4=function(x){return this.WX!=null};
X.qj.prototype.sM=function(x,Q,c,$){if(!$.S(fM.Al))this.nI=!1;if(this.iV==1&&($.S(fM.Hm)||$.S(fM.Z1))&&this.Da(fM.Hm,x)){this.To({d:"remove",PS:!0},Q,x,$,c);
return}if(this.If)this.Rv(x,Q,c,$,this.If);X.qW.prototype.sM.call(this,x,Q,c,$)};X.qj.prototype.p7=function(x,Q,c,$){var z=x.Q.$X($.x,$.y,!0),j=X.qV.Bw(x,z,Q),U=this.iV,i=Q.cb,b=this.mZ;
if(i==2)i=0;var e=x.zo(i==1),k=e[0],K=e[1],g=k[K.pop()],R=g?g.add.vmsk:null;if(i==0&&b!=0&&g&&g.xR>=0)i=1;
var T=X.Ee(x,$);if(U<2&&i==0&&(R==null||R.xf.length==0&&d.o.e$(R.$,z,!0,T).xR==-1))return["new",!0];
if(R==null)return[null];var D=R.$,a=d.o.qy(D,new gh(z.x-T,z.y-T,T*2,T*2),R.xf,!0),_=d.o.e$(D,z,!0,T);
if(U<3&&_.xR!=-1&&a[0].length==0)return["add"];if((a[3]!=0||_.xR!=-1)&&(c.S(fM.Al)||U==4))return["cnv"];
var I=a[0].length==1&&D[a[0][0]-1]&&(D[a[0][0]-1].L!=null||D[a[0][0]-1].type==0||D[a[0][0]-1].length==1);
if(I)return[U==0||U==3?"del":U==2?"mva":"mov"];if(U<2){var f=d.o.dQ(D,d.o.Js(D,R.xf[0]));if(f!=-1&&bC.Xc(z,D[f+1].L)<T)return["fin"];
if(R.xf.length!=1)return["new"];return["nrm"]}return[null]};X.qj.prototype.Eu=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y,!0),U=X.qV.Bw(x,j,c),i=this.iV,b=c.cb,e=this.mZ;
if(b==2)b=0;var k=x.zo(b==1),K=k[0],g=k[1],R=K[g.pop()],T=R?R.add.vmsk:null;if(b==0&&e!=0&&R&&R.xR>=0)b=1;
var D=X.Ee(x,z),a=this.p7(x,c,$,z);if(a[0]==null)return;if(a[1]){var _=new jO(u.E.G2,!0),I=d.eV.Xt("customShape",[0,0,1,1],null,null,null,"--");
_.data=X.Rp.aik(I,c);Q.T(_);this.Fp=!0;k=x.zo(!0);K=k[0];g=k[1];R=K[g.pop()];T=R.add.vmsk;T.$=T.$.slice(0,2)}var f=R.add.vogk,y=T.$;
this.WX=T.clone();this.DG=JSON.stringify(f);this.OY=z;this.aCK(Q,c);var Z=d.o.qy(y,new gh(j.x-D,j.y-D,D*2,D*2),T.xf,!0),v=d.o.e$(y,j,!0,D);
if(a[0]=="add"){var G=d.o.dQ(y,v.xR),q=y[G].length;while(q<=v.xu){v.xu-=q;G+=q+1}var h={type:4,Hw:U.clone(),L:U.clone(),Im:U.clone()},r=G+2+v.xu,H=G+1+(1+v.xu)%q,o=y[r-1],P=y[H];
if(!o.L.HM(o.Im)||!P.Hw.HM(P.L)){var O=d.A.a1f(o.L,o.Im,P.Hw,P.L,v.JC);o.Im=O[0];h.Hw=O[1];h.L=O[2];
h.Im=O[3];P.Hw=O[4]}this.bA=!0;y.splice(r,0,h);y[G].length++;T.xf=[r];if(i==1){h.Hw.x+=2;this.jH(T)}}else if(a[0]=="cnv"){var p=-1;
if(Z[0].length!=0){p=Z[0][0];var C=y[p],W=C.type>=3?3:0,J=p==y.length-1;C.type=W+1;if(!(i==4&&$.S(fM.Al))&&!(i==0&&J))C.Hw=C.L.clone();
C.Im=C.L.clone();this.bA=!0;if(i==0&&!J)this.nI=!0}else if(Z[1].length+Z[2].length!=0){var p=Z[2][0];
if(p==null){p=Z[1][0];this.fj=!0}var C=y[p],W=C.type>=3?3:0;C.type=W+2}else p=d.o.dQ(y,v.xR)+v.xu+1;
if(p!=-1)T.xf=[p]}else if(a[0]=="mva"){this.Lx=!0;T.xf=[Z[0][0]]}else if(a[0]=="mov"){var p=Z[0][0],t=y[p],Y=t.L,l=Math.abs(d.A.bV(t.Hw.x,t.Hw.y,Y.x,Y.y,t.Im.x,t.Im.y));
if(l>.01){t.Hw=Y.clone();t.Im=Y.clone()}if(Date.now()-this.mU<300){var m=t.Hw.HM(Y)&&t.Im.HM(Y);if(m)t.Im.offset(2,2);
else{t.Hw=Y.clone();t.Im=Y.clone()}this.mU=0}else this.mU=Date.now();T.xf=[p];this.jH(T)}else if(a[0]=="del"){var p=Z[0][0],G=d.o.dQ(y,d.o.Js(y,p)),I=y[G],B=G+I.length;
if(p!=B||I.type==0){y[G].length--;y.splice(p,1);B--;if(I.length==0){y.splice(G,1);B=-1}}if(B!=-1)T.xf=[B];
else T.xf=[]}else if(a[0]=="fin"){var G=d.o.dQ(y,d.o.Js(y,T.xf[0]));y[G].type=0;T.xf=[G+1];this.D3=U;
this.lH=!0;this.bA=!0}else{var L=0;if(a[0]=="new"){T.g=[d.o.WV(y)];y.push({type:3,length:1,Kp:[1,2,3,0][Math.max(0,e-1)],YS:0,kO:0,QQ:0});
L=y.length;f.push(d.eV.rB())}if(a[0]=="nrm"){var G=d.o.dQ(y,d.o.Js(y,T.xf[0])),t=G+y[G].length;y[G].length++;
L=t+1;if(t==G+1&&y[G].length!=2)L=G+1}if($.S(fM.FT)&&y[L-1]&&y[L-1].L)U=X._q.Lz(y[L-1].L,U);var h={type:4,Hw:U.clone(),L:U.clone(),Im:U.clone()};
y.splice(L,0,h);T.xf=[L];this.D3=U;if(this.iV==1){h.Hw.x+=2;this.jH(T)}this.bA=!0;this.mU=Date.now()}this.kS(x,R.xR,T,f);
x.vu=!0};X.qj.prototype.jH=function(x){var Q=x.$,c=x.xf[0],$=d.o.dQ(Q,d.o.Js(Q,c))+1,z=Q[$-1].length;
if(z<3)return;var j=[],U=[];for(var F=0;F<5;F++){var i=$+(c-$-2+F+5*z)%z;U.push(i);var b=Q[i].L;j.push(b.x,b.y)}var e=d.A.ag_(j);
for(var F=1;F<4;F++){var k=F*4,K=Q[U[F]],b=K.L,g=K.Hw.HM(b)&&K.Im.HM(b);if(!g){K.Hw.r$(e[k],e[k+1]);
K.Im.r$(e[k+2],e[k+3])}else{K.Hw=b.clone();K.Im=b.clone()}}};X.qj.prototype.Rv=function(x,Q,c,$,z){var j=this.p7(x,c,$,z)[0],U=null;
if(j==null)U="default";else U=X.qj.$a(j);var i=new jO(u.E.M,!0);i.data={d:u.H.aK,Wu:U};Q.T(i)};X.qj.prototype.CK=function(x,Q,c,$,z){this.If=z;
if(this.WX==null){this.Rv(x,Q,c,$,z);return}var j=this.OY;if(j&&bC.Xc(j,z)<X.Ee({Q:{W:1}},z))return;
this.OY=null;var U=x.Q.$X(z.x,z.y),i=X.qV.Bw(x,U,c),b=x.zo(c.cb==1),e=b[0],k=b[1],K=e[k.pop()],g=K.add.vmsk,R=g.$,T=R[g.xf[0]];
if(this.iV==1){var D=T.L.HM(T.Hw)&&T.L.HM(T.Im);T.L=U.clone();T.Hw=U.clone();T.Im=U.clone();if(!D)T.Hw.x+=2;
this.jH(g)}else if($.S(fM.r_)){if($.S(fM.FT))i=X._q.Lz(this.D3,i);var a=T.L.HY(T.Im),_=T.Hw.HY(T.L);
T.Im=i;T.L=i.add(a);T.Hw=T.L.add(_)}else if(this.Lx){var I=T.Hw.HY(T.L),f=T.Im.HY(T.L);T.L=i;T.Hw=T.L.add(I);
T.Im=T.L.add(f)}else{if($.S(fM.FT))i=X._q.Lz(T.L,i);if(this.fj){var y=T.Hw;T.Hw=T.Im;T.Im=y}if(this.lH){var Z=bC.Xc(T.L,i),v=Z==0?0:bC.Xc(T.L,T.Im)/Z;
T.Im.x=T.L.x+v*(i.x-T.L.x);T.Im.y=T.L.y+v*(i.y-T.L.y)}else T.Im=i;var G=T.type>=3?3:0;if(this.bA&&!this.nI)T.type=G+$.S(fM.Al)?2:1;
if(T.type-G==1){T.Hw=T.L.add(T.L.HY(i))}this.D3=i;if(this.fj){var y=T.Hw;T.Hw=T.Im;T.Im=y}}this.kS(x,K.xR,g,K.add.vogk);
x.vu=!0};X.qj.prototype.km=function(x,Q,c,$,z){if(this.WX==null)return;var j=x.zo(c.cb==1),U=j[0],i=j[1],b=U[i.pop()],e=b.add.vmsk,k=b.add.vogk;
if(this.lH){e.xf=[];this.kS(x,b.xR,e,b.add.vogk)}var K=this.WX.$.length,g=e.$.length;if(!this.Fp)this.FU(x,this.lH?"Close Path":(K==g?"Move":K<g?"Add":"Delete")+" Anchor Point",b.xR,this.WX,e.clone(),null,this.DG,JSON.stringify(k));
this.Fp=!1;this.lH=!1;this.fj=!1;this.Lx=!1;this.bA=!1;this.WX=null};X.qj.prototype.np=function(x,Q,c,$,z){this.mZ=x.binop};
X.qj.a0W={};X.qj.$a=function(x){var Q=X.qj.a0W[x],c=64,i=2,b=10,e=25,k=5,K=35;if(Q)return Q;var $=new gh(0,0,c,c),z=-.38,j=d.nc(c,c);
j.clearRect(0,0,c,c);var U=X.q_();j.save();j.lineWidth=i;j.translate(4-i/2,4-i/2);j.rotate(z);if(U<1.5){var g=.66;
b*=g;e*=g;k*=g;K*=g}j.lineJoin="miter";j.beginPath();if(x=="cnv"){j.moveTo(-b,e);j.lineTo(0,0);j.lineTo(b,e);
j.stroke()}else{j.moveTo(0,0);j.lineTo(b,e);j.lineTo(k,K);j.lineTo(-k,K);j.lineTo(-b,e);j.lineTo(0,0);
j.moveTo(0,0);j.lineTo(0,e);j.fillStyle="white";j.fill();j.stroke();j.fillStyle="black";j.fillRect(-k-1,K,2*k+2,6);
j.beginPath();j.arc(0,e-2,2.5,0,2*Math.PI,!1);j.fill();j.rotate(-z);j.translate(24,7);j.beginPath();
if(x=="add"||x=="del"||x=="new"){j.moveTo(-5,0);j.lineTo(5,0);if(x=="add"){j.moveTo(0,-5);j.lineTo(0,5)}if(x=="new"){j.moveTo(-2.5,-4.5);
j.lineTo(2.5,4.5);j.moveTo(2.5,-4.5);j.lineTo(-2.5,4.5)}}else if(x=="fin")j.arc(0,0,5,0,2*Math.PI,!1);
else if(x=="mov"||x=="mva"){for(var F=0;F<4;F++){j.moveTo(0,0);j.lineTo(-7,0);var R=1+i;j.moveTo(-7+R,-R);
j.lineTo(-7,0);j.lineTo(-7+R,R);j.rotate(Math.PI/2)}}j.stroke()}j.restore();var T=new Uint8Array(j.getImageData(0,0,c,c).data.buffer),D=d.R(c*c);
d.GS(T,D,3);var a=d.R(c*c),_=[3,5,3,4,8,4,3,5,3];_=d.hx.C6(_);d.hx.iy(D,a,c,c,_);for(var F=0;F<a.length;
F++)a[F]=Math.min(255,a[F]*2);d.hx.iy(a,D,c,c,_);for(var F=0;F<D.length;F++)D[F]=Math.min(255,D[F]*2);
var I=T.slice(0);T.fill(255);d.Dm(D,T,3);d.l.UY("norm",I,$,T,$,$,1);X.qj.a0W[x]=Q={QK:T,W4:$,pt:new bC(4,4)};
return Q};X.vQ=function(){X.Rp.call(this,[10,30],X.cZ,"tools/fpen",!1)};X.vQ.prototype=new X.Rp;X.vQ.prototype.YB=function(x,Q,c,$,z,j){var U=$.length-1,i=Math.sqrt(($[U-1]-$[0])*($[U-1]-$[0])+($[U]-$[1])*($[U]-$[1]))<6/z.W;
return[d.o.S8($,i,j),d.eV.Xt("customShape",[0,0,1,1],null,null,null,"--")]};X.i4=function(){X.qW.call(this,[10,27],X.T3,"tools/pselect");
this.Bf=null;this.a4=!1;this.gM=null;this.WX=null;this.FP=null;this.DG=null;this.Om=null;this.bC=null;
this.XX=null;this.Xy=null};X.i4.prototype=new X.qW;X.i4.prototype.R4=function(x){return x.TZ};X.i4.prototype.Eu=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y),U=x.zo(),i=U[0],b=U[1],e,k;
for(var F=0;F<b.length;F++){var K=i[b[F]],g=K.add.vmsk,R=d.o.e$(g.$,j).xR;if(R!=-1){this.gM=e=K;k=R}for(var T=0;
T<g.Sr.length;T++){var D=d.o.ar1(g.$,g.Sr[T]);if(D==null)continue;var a=bC.Xc(D,j);if(a<4*X.q_()/x.Q.W){var _=x.B[K.xR-1e6].add.TySh,I=_.HW.Curve,f=_.i,y=I.Reversed;
I.Reversed=!1;var I=fQ.kh(_.HW.Curve);I.Reversed=y;d.A.i(I[0],f,I[0]);this.XX=[I,T,f.V*f.xq-f.J*f.dC];
this.gM=e=K;k=0}}if(this.XX)break}if(e!=null){var g=e.add.vmsk;g.xf=[];var Z=g.g.indexOf(k);if($.S(fM.FT)){if(Z==-1){g.g.push(k);
this.a4=!0}else g.g.splice(Z,1)}else{if(Z==-1)g.g=[k];this.a4=!0}this.bC=d.o.sP(g.$,g.g)}this.Bf=j;this.Xy=new jP(j);
x.tP=!0;x.vu=!0};X.i4.prototype.CK=function(x,Q,c,$,z){if(this.Bf==null)return;var j=x.Q.$X(z.x,z.y);
if(this.a4){j=this.Xy.PW(j,$);var U=this.gM;if(this.WX==null){this.WX=this.FP=U.add.vmsk.clone();this.DG=this.Om=JSON.stringify(U.add.vogk);
if($.S(fM.Al)){var i=this.WX.clone(),b=JSON.parse(this.DG),e=X.qW.an(i,b);X.qW.SR(e,i,b);this.FP=i;this.Om=JSON.stringify(b)}}var i=this.FP.clone(),b=JSON.parse(this.Om);
if(this.XX){var k=this.XX,K=k[0][0],g=d.A.b2(K,j.x,j.y);i.Sr[k[1]]=k[0][1][g];var R=K[g*2],T=K[g*2+1],D=(K[g*2+2]-R)*(j.y-T)-(K[g*2+3]-T)*(j.x-R);
if(k[2]<0)D=-D;i.$S=D>0}else{var a=this.bC.clone(),_=a.x,I=a.y;a.offset(j.x-this.Bf.x,j.y-this.Bf.y);
a.x=Math.round(a.x);a.y=Math.round(a.y);var f=X.qV.H1(x,a,c),y=new bI(1,0,0,1,a.x-_+f[0],a.y-I+f[1]);
d.o.Of(i.$,y,i.g);d.eV.i(b,d.D.Gr(y),i.g);X.qV.ao(x,a,f)}this.kS(x,U.xR,i,b)}else{var Z=this.Bf;x.N.LV=d.A.Hg(new gh(Z.x,Z.y,j.x-Z.x,j.y-Z.y));
x.vu=!0}};X.i4.prototype.km=function(x,Q,c,$,z){if(this.Bf==null)return;var j=x.Q.$X(z.x,z.y),U=this.gM,i=U?U.add.vmsk:null;
if(this.a4){var b=JSON.stringify(U.add.vogk);if(!this.Bf.HM(j))this.FU(x,"Move Paths",U.xR,this.WX,i,null,this.DG,b);
if(x!=null&&x.N.zZ){x.N.zZ=null;x.vu=!0}}else{if(i){var e=this.Bf,k=new gh(e.x,e.y,j.x-e.x,j.y-e.y),K=d.o.ahB(i.$,k);
if($.S(fM.FT)){for(var F=0;F<K.length;F++)if(i.g.indexOf(K[F])==-1)i.g.push(K[F])}else i.g=K}x.N.LV=null;
x.vu=!0}this.Bf=null;this.WX=null;this.XX=null;this.a4=!1;this.Xy=null};X.i4.prototype.am1=function(x){var Q=this.gM,c=this.w4,$=Q.add.vmsk,z=Q.add.vogk,j=z.length;
if(x=="confirm"){if($!=this.WX)this.FU(c,[12,94,2],Q.xR,this.WX,$,null,this.DG,JSON.stringify(z));this.SJ();
return}if(x=="cancel"){this.kS(this.w4,this.gM.xR,this.WX.clone(),JSON.parse(this.DG));this.SJ()}else{var $=this.WX.clone(),z=JSON.parse(this.DG);
$.$=d.o.atq($.$,$.g,x);this.kS(this.w4,this.gM.xR,$,z)}};X.i4.prototype.SJ=function(){this.gM=null;this.WX=null;
this.Bf=null;this.dU=this.aS=-1;this.Xy=null};X.i4.prototype.gb=function(x,Q,c,$){X.qW.prototype.gb.call(this,x,Q,c,$);
if(c.Oj!=this.id)return;if(x.g.length==0)return;var z=x.zo(),j=z[0],U=z[1];if(U.length==0)return;var i=j[U[0]],b=i.add.vmsk,e=i.add.vstk,k=i.add.vogk,K=new jO(u.E.M,!0);
K.data={d:u.H.gR,f:this.id,Iu:"main",hk:b?b:null,eV:k};Q.T(K)};X.i4.prototype.np=function(x,Q,c,$,z){var j=x.b3;
if(j.hk){var U=c.zo(),i=U[0],b=U[1];if(b.length==0)return;var e=i[b[0]],k=e.add.vmsk.clone(),K=JSON.stringify(e.add.vogk),g=j.hk;
this.kS(c,e.xR,g,j.eV);var R=[18,5];if(k.$.length==g.$.length)R=k.g[0]==g.g[0]?"Fill Rule":"Path Order";
this.FU(c,R,e.xR,k,g,null,K,JSON.stringify(j.eV))}};X.rM=function(){X.qW.call(this,[10,28],X.YW,"tools/dselect");
this.dU=-1;this.aS=-1;this.CL=null;this.Bf=null;this.gM=null;this.WX=null;this.DG=null;this.w4=null;
this.V9=0;this.QX={psnap:!1};this.Xy=null};X.rM.prototype=new X.qW;X.rM.prototype.R4=function(x){return x.TZ};
X.rM.prototype.np=function(x){this.QX=x};X.rM.prototype.To=function(x,Q,c,$,z){if(x.d=="crnr"){if(c==null)return;
var j=c.zo(),U=j[0],i=j[1];if(i.length==0){alert("No paths selected");return}var b=U[i[0]],e=b.add.vmsk;
if(e.xf.length==0){alert("No corners selected");return}for(var F=0;F<e.xf.length;F++){var k=e.$[e.xf[F]];
if(!k.L.HM(k.Im)||!k.L.HM(k.Hw)){alert("Only sharp corners can be rounded");return}}if(this.WX==null){this.WX=b.add.vmsk.clone();
this.DG=JSON.stringify(b.add.vogk);this.gM=b;this.w4=c}var K=new jO(u.E.M,!0);K.data={d:u.H.LL,AD:"cornerradius",ZR:5,ka:this.aje.bind(this)};
Q.T(K)}else X.qW.prototype.To.call(this,x,Q,c,$,z)};X.rM.prototype.aje=function(x){if(x=="confirm"){var Q=this.w4,c=this.gM,$=c.add.vmsk,z=c.add.vogk;
this.FU(Q,[12,94,0],c.xR,this.WX,$,null,this.DG,JSON.stringify(z));this.SJ();return}var $=this.WX.clone(),z=JSON.parse(this.DG),j=$.xf;
if(x=="cancel"){}else{var U=[];for(var F=0;F<j.length;F++){var i=j[F],b=d.o.Js($.$,i,!0),K=0;if(U.indexOf(b)!=-1)continue;
U.push(b);var e=d.o.dQ($.$,b,!0),k=$.$[e].length,g=[];for(var R=0;R<k;R++){var T=$.xf.indexOf(e+R+1)==-1?0:x;
g.push(T);if(T!=0)K++}d.o.Hs($.$,e,g);for(var R=0;R<j.length;R++)if(j[R]>e+k)j[R]+=K}this.Is($,z);$.xf=[]}this.kS(this.w4,this.gM.xR,$,z);
if(x=="cancel")this.SJ()};X.rM.prototype.disable=function(x,Q,c,$){this.mj(x)};X.rM.prototype.Eu=function(x,Q,c,$,z){this.mj(x);
var j=x.Q.$X(z.x,z.y),K,g,R;this.CL=j.clone();var U=x.zo(),i=U[0],b=U[1];if(b.length==0)return;var e=X.Ee(x,z),k=new gh(j.x-e,j.y-e,e*2,e*2);
for(var T=0;T<b.length;T++){K=this.gM=i[b[T]];g=K.add.vmsk;R=d.o.qy(g.$,k);if(R[0].length+R[1].length+R[2].length!=0)break}var D=[!1,!1,!1];
for(var F=0;F<3;F++){for(var a=0;a<R[F].length;a++){var _=R[F][a],I=g.$[_];if(g.xf.indexOf(_)!=-1||F==1&&g.xf.indexOf(_-1)!=-1&&!I.L.HM(I.Hw)||F==2&&g.xf.indexOf(_+1)!=-1&&!I.L.HM(I.Im)){R[F]=[_];
D[F]=!0;break}}}if(R[0].length!=0&&(D[0]||!D[1]&&!D[2])){var f=R[0][0],y=g.xf.indexOf(f);if($.S(fM.FT)){if(y==-1)g.xf.push(f);
else{g.xf.splice(y,1);x.vu=!0;return}}else if(y==-1)g.xf=[f];this.dU=f;this.aS=0}else if(R[1].length!=0&&D[1]){this.dU=R[1][0];
this.aS=1}else if(R[2].length!=0&&D[2]){this.dU=R[2][0];this.aS=2}else{var Z=d.o.e$(g.$,j,!0,e);if(Z.xR==-1)this.Bf=j;
else{g.g=[Z.xR];g.xf=[]}}if(this.WX==null){this.WX=K.add.vmsk.clone();this.DG=JSON.stringify(K.add.vogk)}this.Xy=new jP(j);
x.vu=!0};X.rM.prototype.CK=function(x,Q,c,$,z){if(x==null)return;var j=x.Q.$X(z.x,z.y),U=this.gM;if(this.dU!=-1){var i=this.WX.clone(),b=U.add.vogk,e=i.$[this.dU];
e=[e.L,e.Hw,e.Im][this.aS];if($.S(fM.FT)){if(this.aS==0){j=this.Xy.PW(j,$);j.x+=e.x-this.CL.x;j.y+=e.y-this.CL.y}else j=X._q.Lz(i.$[this.dU].L,j)}else{if(this.QX.psnap){j.x=Math.round(j.x);
j.y=Math.round(j.y)}j=X.qV.Bw(x,j,c)}if(this.aS==0){var k=new bI(1,0,0,1,j.x-e.x,j.y-e.y);d.o.Of(i.$,k,null,i.xf)}else{var K=i.$[this.dU],g=K.Hw,R=K.Im;
if(this.aS==2){g=K.Im;R=K.Hw}if($.S(fM.Al)&&(K.type==1||K.type==4))K.type++;g.r$(j.x,j.y);if(K.type==1||K.type==4){var T=bC.Xc(g,K.L),D=bC.Xc(R,K.L);
if(D!=0){R.x=K.L.x-(g.x-K.L.x)*(D/T);R.y=K.L.y-(g.y-K.L.y)*(D/T)}}}this.Is(i,b);this.kS(x,U.xR,i,b)}else if(this.Bf!=null){var a=this.Bf;
x.N.LV=d.A.Hg(new gh(a.x,a.y,j.x-a.x,j.y-a.y));x.vu=!0}else{var _=x.zo(),I=_[0],f=_[1],U,i,v;if(f.length==0)return;
var y=X.Ee(x,z),Z=new gh(j.x-y,j.y-y,y*2,y*2);for(var G=0;G<f.length;G++){U=I[f[G]];i=U.add.vmsk;v=d.o.qy(i.$,Z);
if(v[0].length+v[1].length+v[2].length!=0)break}this.mj(x);for(var F=0;F<3;F++){for(var q=0;q<v[F].length;
q++){var h=v[F][q],r=i.$[h];r=F==0?r.L:F==1?r.Hw:r.Im;x.N._V.push(r.x,r.y);x.vu=!0}}}};X.rM.prototype.mj=function(x){if(x&&x.N._V.length!=0){x.N._V=[];
x.vu=!0}};X.rM.prototype.km=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y),U=this.gM,i=U?U.add.vmsk:null,b=U?U.add.vogk:null;
if(this.dU!=-1){if(Date.now()-this.V9<300){var e=i.$[this.dU],k=this.aS,K=null;if(k==0){var g=e.Hw.HM(e.L),R=e.Im.HM(e.L);
if(!g&&!R){K="Anchor Type";if(e.type==1||e.type==4)e.type++;else{e.type--;e.Im=e.L.add(e.L.HY(e.Hw))}}else{K="Add Handles";
if(g&&R){e.Hw.x-=30;e.Im.x+=30}else if(g)e.Hw=e.L.add(e.L.HY(e.Im));else if(R)e.Im=e.L.add(e.L.HY(e.Hw))}}else{K="Remove Handle";
if(k==1)e.Hw.be(e.L);else e.Im.be(e.L)}this.Is(i,b);this.kS(x,U.xR,i,b);this.FU(x,K,U.xR,this.WX,i,null,this.DG,JSON.stringify(b))}else if(!this.CL.HM(j)){this.FU(x,"Drag Anchors",U.xR,this.WX,i,null,this.DG,JSON.stringify(b))}this.V9=Date.now()}else if(this.Bf!=null){var T=this.Bf,D=new gh(T.x,T.y,j.x-T.x,j.y-T.y);
if(D.m<0)D.x+=D.m;if(D.e<0)D.y+=D.e;D.m=Math.abs(D.m);D.e=Math.abs(D.e);var a=d.o.qy(i.$,D);i.xf=a[0].concat($.S(fM.FT)?i.xf:[]);
x.N.LV=null}this.SJ();x.vu=!0};X.rM.prototype.SJ=function(){this.gM=null;this.WX=null;this.Bf=null;this.dU=this.aS=-1;
this.Xy=null};X.rM.prototype.Is=function(x,Q){for(var F=0;F<x.xf.length;F++){var c=d.o.Js(x.$,x.xf[F]);
d.eV.Bq(Q,c)}};X.rM.prototype.sM=function(x,Q,c,$){if(x==null)return;var z=x.zo(),j=z[0],U=z[1];if(U.length==0)return;
var i=j[U[0]],b=i.add.vmsk;if(b==null||b.xf.length==0)return;var e=i.add.vogk,k=JSON.stringify(e),K=$.um(x?x.Q.A6:0);
if(K.x!=0||K.y!=0){var g=b.clone(),R=b.clone(),T=new bI(1,0,0,1,K.x,K.y);d.o.Of(R.$,T,null,R.xf);this.Is(R,e);
this.kS(x,i.xR,R,e);this.FU(x,"Move Anchors",x.g[0],g,R.clone(),!0,k,JSON.stringify(e))}if($.S(fM.Hm)||$.S(fM.Z1))this.To({d:"remove",PS:!0,acw:!0},Q,x,$,c)};
X.rM.prototype.FU=function(x,Q,c,$,z,j,U,i){var b=x.O2();if(j&&b!=null&&b.f==this&&b.data.a6h&&b.data.nL==c&&JSON.stringify(b.data.XN.xf)==JSON.stringify($.xf)){b.data.Qw=z;
b.data.Yb=i}else{var b=new dg(Q,this);b.data={nL:c,XN:$,Qw:z,a6h:j,aw1:U,Yb:i};x.kp(b)}};X.Rect=function(){X.Rp.call(this,[10,32],X.J7,"tools/rect",!0)};
X.Rect.prototype=new X.Rp;X.Rect.prototype.YB=function(x,Q,c){var $=this.h8.crad,z=Q.x-x.x,j=Q.y-x.y;
return[d.o.JE.Rect(x.x,x.y,z,j,$),d.eV.Xt("Rctn",[x.x,x.y,Q.x,Q.y],[$,$,$,$])]};X.Sl=function(){X.Rp.call(this,[10,33],X.db,"tools/ellipse",!0)};
X.Sl.prototype=new X.Rp;X.Sl.prototype.YB=function(x,Q,c){var $=Q.x-x.x,z=Q.y-x.y;return[d.o.JE.Sl(x.x,x.y,$,z),d.eV.Xt("Elps",[x.x,x.y,Q.x,Q.y])]};
X.EX=function(){X.Rp.call(this,[10,34],X.Lw,"tools/pshape",!1);this.h8.aopts=[!1,!0,50,100,0]};X.EX.prototype=new X.Rp;
X.EX.prototype.YB=function(x,Q,c){var $=this.h8.pshape,z=this.h8.crad,j=this.h8.irad/100,U=this.h8.sides,i=this.h8.width,b=this.h8.aopts,e=this.h8.length,a;
Q=Q.clone();var k=x.x,K=x.y,g=Q.x,R=Q.y,T=Math.sqrt((g-k)*(g-k)+(R-K)*(R-K)),D=Math.atan2(-R+K,g-k);
if(c)D=Math.round(D*180/Math.PI/15)*15*Math.PI/180;if($==0)a=d.o.JE.sY(k,K,T,D,U,z);if($==1)a=d.o.JE.aAI(k,K,T,D,U,z,j);
if($==2)a=d.o.JE.ec(x.x,x.y,Q.x,Q.y,i,b);if($==3)a=d.o.JE.a8d(k,K,T,D,e);return[a,d.eV.Xt("customShape",[x.x,x.y,Q.x,Q.y],null,null,null,"--")]};
X.EX.prototype.sM=function(x,Q,c,$){X.Rp.prototype.sM.call(this,x,Q,c,$);var z=$.um(),j=this.h8,U,i;
if(z.y!=0){var b=-z.y,e=j.pshape;if(e<2){U="sides";i=Math.max(3,Math.min(100,j.sides+b))}else if(e==2){U="width";
i=Math.max(1,Math.min(100,j.width+b))}else if(e==3){U="length";i=Math.max(4,Math.min(40,j.length+b))}}if(z.x!=0){U="pshape";
i=Math.max(0,Math.min(3,j.pshape+z.x))}if(U){var k=new jO(u.E.M,!0),K={};K[U]=i;j[U]=i;k.data={d:u.H.gR,f:this.id,Zq:"vals",aAD:K};
Q.T(k);this.CK(x,Q,c,$)}};X.AE=function(){X.Rp.call(this,[10,35],X.y4,"tools/line",!1)};X.AE.prototype=new X.Rp;
X.AE.prototype.YB=function(x,Q,c){var $=this.h8.width,z=this.h8.aopts;Q=Q.clone();if(c){Q=X._q.Lz(x,Q)}return[d.o.JE.ec(x.x,x.y,Q.x,Q.y,$,z),d.eV.Xt("Ln",null,null,[x.x,x.y,Q.x,Q.y],$,null,z)]};
X.aM=function(){X.Rp.call(this,[10,31],X.NI,"tools/cshape",!0)};X.aM.prototype=new X.Rp;X.aM.prototype.YB=function(x,Q,c){var $=this.h8.shape,z=$.LB.m/$.LB.e,j=eM.hn.gG($.$);
Q=Q.clone();if(c){Q.y=x.y+(Q.x-x.x)/z}var U=Q.x-x.x,i=Q.y-x.y;d.o.Of(j,new bI(U,0,0,i,x.x,x.y));return[j,d.eV.Xt("customShape",[x.x,x.y,Q.x,Q.y],null,null,null,$.mk)]};
X.Y=function(x,Q,c){X.Ur.call(this,x,Q,c);this.Kh=0;this.B=null;this.QU=null;this.B4=null;this.G_=1;
this.oS=0;this.OB=!0;this.ex=!1;this.cursor=null;this.Nc=null;this.Cj=null;this.TL=!1;this.N$=null;this.a2G=0;
this.Wc=null;this.iV=0;this.oT=null;this.B5=null;this.wQ=null;this.YZ=null;this.a63=null;this.Yz=null};
X.Y.prototype=new X.Ur;X.Y.Kz=function(x,Q,c){var $={classID:"null",null:ep.QP(c?"Lyr":"Dcmn",!0)};if(x)$.Angl={t:"UntF",v:{type:"#Ang",val:Q}};
else $.Axis={t:"enum",v:{Ornt:Q}};return{q4:x?"rotateEventEnum":"flip",dx:$}};X.Y.prototype.x1=function(x,Q,c,$,z){var j=new jO(u.E.M,!0);
j.data={d:u.H.gR,f:this.id,xK:z,rx:x,B4:c};Q.T(j);this.Ld=!1};X.Y.prototype.R4=function(x){return this.B5&&this.B5.awo()};
X.Y.prototype.To=function(x,Q,c,$,z){this.B4=z;if(x.d=="again"&&this.Wc==null)return;if(!this.l1(c,z))return;
if(this.B5){this.aaB(x,this.B5.a5(),Q,c,$,z);this.d_(c,z,0,!0);this.qo(c);return}this.ahc(c,x.a==null,x.a);
this.asf(c);this.aaB(x,x.a7S,Q,c,$,z);this.UM(c,Q,x.LX,!1)};X.Y.prototype.aaB=function(x,Q,c,$,z,j){var U=this.oT;
if(Q==null){var i=x.gy!=null?x.gy:4;Q=this.B5.acT()[i]}var b=Q.x,e=Q.y;if(x.d=="rot"&&x.b!=Math.PI&&(U.m+U.e&1)==1){b=Math.floor(b);
e=Math.floor(e)}var k=new bI;k.translate(-b,-e);if(x.d=="rot")k.rotate(x.b);if(x.d=="scl")k.scale(x.b.x,x.b.y);
if(x.d=="mat")k.concat(x.b);k.translate(b,e);if(x.d=="again")k=this.Wc;var K=d.D.Gr(k);if(x.d=="dtr"){var g=d.D;
K=g.Vi(x.b,g.R(-b,-e));K=g.Vi(g.R(b,e),K)}var R=this.B5.hZ();d.D.i(K,R);this.B5.eA(R);if(x.JV){var T=x.JV.v;
this.np({Iu:"switchWarp"},c,$,z);this.np({Iu:"wrp",JV:T},c,$,z)}};X.Y.prototype.sD=function(){return!0};
X.Y.prototype.l1=function(x,Q,c){if(x==null)return!1;if(this.id==X.Um)return x.u!=null;var $=x.zi(!0,null,null,!0);
if(this.id==X.Ks&&x.B[$[0]].rect._6()){alert("Layer is empty.");return!1}for(var F=0;F<$.length;F++){var z=x.B[$[F]];
if(z.e6(2)||z.e6(31)){alert(ah.get([6,57,0]));return!1}if(z.add.artb){alert("You can not transform the whole artboard");
return!1}if(z.add.TySh)if(!aE.$B(z.add.TySh,Q.Dn))return!1;if(z.add.SoLd){if($.length==1&&(c&&c.AW==-1)&&(z.Rz()&&z.Rz().uz||z.add.vmsk&&z.add.vmsk.uz)){alert("Unlink masks before transforming Smart Object");
return!1}if(!x.aCa(z.add.SoLd.Idnt.v)){alert("Unsupported format of the smart object ("+x.ZL(z.add.SoLd.Idnt.v).uo+")");
return!1}}}if(x.u==null)return!0;if(!x.hS())return!1;return x.aDr()};X.Y.prototype.Eu=function(x,Q,c,$,z){var j=this.pI(z,x),U=j[0],i=j[1],b=this.iV==0?this.B5:this.wQ;
x.Q.W*=i;this.ex=b.Eu(x,c,$,U,null,null,z);this.qo(x,U);x.Q.W/=i;if(this.ex&&b.uc(U)){if(Date.now()-this.a2G<250)this.UM(x,Q,null,!0);
this.a2G=Date.now()}};X.Y.prototype.Rv=function(x){var Q=new jO(u.E.M,!0);Q.data={d:u.H.aK,Wu:this.cursor};
x.T(Q)};X.Y.prototype.pI=function(x,Q){var c=1;x=Q.Q.$X(x.x,x.y);if(this.iV==1){var $=d.D.u_(this.B5.hZ(),this.oT);
c=d.D.uL($).c0();var z=d.D.HQ($);x=d.D.ayn(z,x)}return[x,c]};X.Y.prototype.CK=function(x,Q,c,$,z){var j=this.pI(z,x),U=j[0],i=j[1],b=this.iV==0?this.B5:this.wQ;
if(!z.TZ){var e="default";if(b){var k=b.o7(U,x.Q.W*i,null,z);if(k)e=k}if(e!=this.cursor){this.cursor=e;
this.Rv(Q)}if(this.wQ){this.qo(x,U)}}if(!this.ex)return;x.Q.W*=i;var K=this.n0=b.CK(x,c,$,U,this.OB);
x.Q.W/=i;this.d_(x,c,0,!0);this.qo(x,U);this.u2(Q)};X.Y.prototype.km=function(x,Q,c,$,z){var j=this.pI(z,x),U=j[0],i=j[1];
this.B5.km(x,c,$,U);if(this.wQ){var b=this.wQ.km(x,c,$,U);if(b){this.u2(Q,!0);this.qo(x)}}if(this.n0){var e=this.U6(),k=d.A.Hg(this.oT).j;
d.D.i(e,k);this.B5.eA(k);this.n0=null}this.ex=!1};X.Y.prototype.sM=function(x,Q,c,$){if($.S(fM.ln))this.UM(x,Q,null,!0);
else if($.S(fM.En))this.ce(x,Q);else{var z=this.B5.sM(x,c,$);if(z){this.d_(x,c,0,!0);this.u2(Q)}}};X.Y.prototype.np=function(x,Q,c,$){if(x.Iu=="commit")this.UM(c,Q,null,!0);
else if(x.Iu=="cancel")this.ce(c,Q);else if(x.Iu=="switchWarp"){this.iV=1-this.iV;this.amh();this.qo(c);
this.u2(Q)}else if(x.Iu=="wrp"){this.wQ.a7E(x.JV);this.qo(c);this.d_(c,this.B4,0,!0)}else if(x.Iu=="splt")this.wQ.aAO(x.b);
else if(x.Iu=="ctyp"){this.B5.aso(x.o2);this.qo(c);this.u2(Q)}else if(x.Iu=="cen"){this.B5.aC1(x.pt);
this.qo(c);this.d_(c,this.B4,0,!0)}else if(x.Iu=="trn"){var z=d.D.Gr(x.uT),j=this.oT,U=d.D.u_(this.B5.hZ(),this.oT);
z[6]=U[6],z[7]=U[7];var i=[j.x,j.y,j.x+j.m,j.y,j.x+j.m,j.y+j.e,j.x,j.y+j.e];d.D.i(z,i);this.G_=x.G_;
if(x.oS!=this.oS){this.oS=x.oS;this.axD(c)}this.OB=x.OB;this.B5.eA(i);this.qo(c);this.d_(c,this.B4,0,!0)}};
X.Y.prototype.qo=function(x,Q){if(this.iV==0)this.B5.Ex(x,this.B4);else{this.wQ.Ex(x,Q);var c=this.U6();
d.D.i(c,x.N.hJ.j);d.D.i(c,x.N.ai);d.D.i(c,x.N.AB)}};X.Y.prototype.UM=function(x,Q,c,$){this.d_(x,this.B4,this.G_);
var z=new dg(c?c:this.name,this),Z="";if(this.Kh==0)z.data={type:this.Kh,B:this.B,N$:this.QU,MV:X.Y.my(x,this.B)};
else if(this.Kh==1){var j=x.B[this.B[0]],U;if(j.$Q.kk<=0){U=d.R(j.$Q.hX.P());d.GS(j.$Q.YT,U,3)}else U=x.u.channel;
var i={rect:j.$Q.hX.clone(),channel:U};z.data={type:this.Kh,a:this.B[0],Cj:this.Cj,UI:i,Nc:this.Nc,TL:this.TL,$Q:j.$Q,N$:this.N$,MV:{W4:j.$Q.hX,aJ:j.$Q.YT}}}else if(this.Kh==2){z.data={type:this.Kh,Cj:this.Cj,UI:{rect:x.u.rect.clone(),channel:x.u.channel.slice(0)}}}x.kp(z);
var b=this.oT,e=d.D.u_(this.B5.hZ(),b),k=this.QU,K=k?k[0]:null;if(k&&k.length==1&&K[4]){var g=X.Y.e3(K[4].nonAffineTransform),b=d.A.pA(d.fr.ES(K[4].quiltWarp.v)[3]),R=d.D.u_(g,b);
e=d.D.Vi(e,d.D.HQ(R))}var T=d.D.uL(e),D=this.B5.a5(),a=new bI;a.translate(D.x,D.y);a.concat(T);a.translate(-D.x,-D.y);
T=a.clone();var _=-Math.atan2(-T.J,T.V),I=new bI;I.rotate(_);T.concat(I);function f(r,H){return{t:"UntF",v:{type:["#Pxl","#Prc","#Ang"][H],val:r}}}var y=ep.QP("Lyr",!0);
if(this.id==X.Um)y.v[0]={t:"prop",v:{classID:"Chnl",keyID:"fsel"}};var v=X.Y.a0p;for(var G in v)if(v[G]==this.B5.og)Z=G;
if(Z==""){Z="Qcsi";a.DX=a.ti=0}var q={classID:"null",null:y,FTcs:{t:"enum",v:{QCSt:Z}},Intr:{t:"enum",v:{Intp:"Bcbc"}},Ofst:{t:"Objc",v:{__name:"Offset",classID:"Ofst",Hrzn:f(a.DX,0),Vrtc:f(a.ti,0)}},Skew:{t:"Objc",v:{classID:"Pnt",Hrzn:f(Math.atan(T.dC/T.xq)*180/Math.PI,2),Vrtc:f(0,2)}},Usng:{t:"Objc",v:{classID:"Pnt",Hrzn:f(100*0,1),Vrtc:f(100*0,1)}},Wdth:f(T.V*100,1),Hght:f(T.xq*100,1),Angl:f(_*180/Math.PI,2)};
if(Z=="Qcsi")q.Pstn={t:"Objc",v:{Hrzn:f(D.x,0),Vrtc:f(D.y,0)}};var h=this.wQ?this.wQ.yw():null;if(h&&!d.fr.Cu(h)){q.quiltWarp={t:"Objc",v:h}}this.iZ=Q;
this.track({q4:"transform",dx:q});this.escape(x,Q,$)};X.Y.a0p={Qcsa:4,Qcs0:0,Qcs1:2,Qcs2:8,Qcs3:6,Qcs4:1,Qcs5:5,Qcs6:7,Qcs7:3};
X.Y.prototype.ce=function(x,Q){if(this.Kh==0)X.Y.Lp(x,this.B,this.QU);else if(this.Kh==1){var c=x.B[this.B[0]];
x.u=this.Cj;if(!this.TL){c.$Q.hX=this.N$.W4;c.$Q.YT=this.N$.aJ;c.rI(x,0,0,x.u)}else{c.Gw(x,this.Nc)}x.c();
x.ox=!0}else if(this.Kh==2){x.u=this.Cj;x.ox=!0}this.escape(x,Q,!0)};X.Y.prototype.escape=function(x,Q,c){this.B5.clear(x);
if(this.wQ)this.wQ.clear(x);this.B5=null;this.wQ=null;this.Yz=null;this.iV=0;if(c)this.VG(Q,u.E.M,{d:u.H.JG})};
X.Y.prototype.Tz=function(x,Q){if(x.type==0)X.Y.Lp(Q,x.B,x.MV);else{if(x.type==1){var c=Q.B[x.a];if(x.TL){c.$Q=x.$Q}else{c.$Q.hX=x.MV.W4;
c.$Q.YT=x.MV.aJ}c.rI(Q,0,0,Q.u);Q.c()}Q.u={rect:x.UI.rect.clone(),channel:x.UI.channel.slice(0)};Q.ox=!0}};
X.Y.prototype.pC=function(x,Q){if(x.type==0)X.Y.Lp(Q,x.B,x.N$);else{if(x.type==1){var c=Q.B[x.a];if(x.TL){c.Gw(Q,x.Nc)}else{c.$Q.hX=x.N$.W4;
c.$Q.YT=x.N$.aJ;c.rI(Q,0,0,Q.u)}Q.c()}Q.u=x.Cj;Q.ox=!0}};X.Y.prototype.ahc=function(x,Q,c){x.zo();var $=[];
if(c==null)for(var F=0;F<x.IH.length;F++)if(x.iL[x.IH[F]].add.vmsk.$.length>2)$.push(-1-x.IH[F]);var z=[],j=x.Q.O;
if(j[0]+j[1]+j[2]==3)if(c!=null||$.length==0||x.ZQ!=null&&x.ZQ.length!=0){if(x.g.length==1){var U=x.B[x.g[0]];
if(U.Uy()&&U.Et)z=[x.g[0]]}if(z.length==0)z=x.zi(Q,c,null,!0)}z=z.concat($);for(var F=0;F<x.oW.length;
F++)z.push(-1e3-x.oW[F]);this.B=z};X.Y.prototype.enable=function(x,Q,c,$,z,j){if(this.cursor==null)this.cursor="default";
this.Rv(Q);if(this.B5)return;this.B4=c;this.ahc(x,!0);this.asf(x,j&&j.AW!=null&&j.AW!=-1?j.AW:null);
this.u2(Q,null,x);this.qo(x);if(j&&j.AW==-1)this.np({Iu:"switchWarp"},Q,x,$)};X.Y.prototype.Jh=function(){return[this.OB?1:0]};
X.Y.prototype.sr=function(x,Q,c){if(x&&x[0]!=null)this.OB=x[0]==1};X.Y.prototype.u2=function(x,Q,c){var $={d:u.H.gR,f:this.id};
if(this.iV==0){var z=d.D.u_(this.B5.hZ(),this.oT),j=d.D.uL(z);$.uT={BS:j,o2:this.B5.ahS(),pt:this.B5.a5(),W4:this.oT.clone(),OB:this.OB}}else{$.aBa=Q;
$.JV=this.wQ.yw()}if(c){$.fG=["---"];for(var F=0;F<c.fG.length;F++)$.fG.push(c.fG[F].name)}$.aDS=this.wQ!=null;
this.VG(x,u.E.M,$)};X.Y.prototype.asf=function(x,Q){var c=this.id==X.Um,$=!0,z=this.B[0],j=x.B[z],i=null,b=null,e=null,g=null;
if(c){this.Kh=2;this.Cj=x.u}else if(x.u&&this.B.length==1&&z>=0&&!j.rect._6()){this.Kh=1;this.Cj=x.u;
this.Nc=j.$Q;this.TL=!1;if(!j.jc(x,x.u)){this.TL=!0;j.xn(x,x.u,!1)}this.N$={aJ:j.$Q.YT,W4:j.$Q.hX}}else{this.Kh=0;
this.QU=X.Y.my(x,this.B,null);for(var F=0;F<this.QU.length;F++)if(this.QU[F][3]!=null)$=!1}var U=this.Kh==1;
if(this.QU&&this.QU.length==1){var k=this.QU[0];if(k[2]!=null)b=k[2].hk;if(k[3]==null)U=!0;if(k[3]!=null)e=k[3];
if(k[4]!=null){i=x.B[this.B[0]].add.SoLd;if(k[1]||k[2])U=!1}}var K=c?x.u.rect.clone():X.Y.Pe(x,this.B);
this.oT=K;if(!c&&b&&i9==1){g=b.auh();this.YZ=d.D.u_(g,this.oT)}else if(!c&&e&&i9==1){var R=x.B[this.B[0]],e=R.add.TySh;
g=d.A.Hg(R.ft.os).j;d.A.i(g,e.i,g);this.YZ=d.D.u_(g,this.oT)}else if(!c&&i){g=X.Y.e3(i.nonAffineTransform);
this.oT=d.A.pA(d.fr.ES(i.quiltWarp.v)[3]);if(U)this.wQ=new hI(i.quiltWarp.v);this.YZ=d.D.u_(g,this.oT)}else{if(U||c)this.wQ=new hI(d.fr.R(this.oT));
this.YZ=[1,0,0,0,1,0,0,0];if(this.id==X.Ks)Q=3;g=[K.x,K.y,K.x+K.m,K.y,K.x+K.m,K.y+K.e,K.x,K.y+K.e]}this.B5=new aH(g,!0,!0,$,!1,!1,Q);
this.a63=[1,0,0,0,1,0,0,0];this.axD(x)};X.Y.prototype.axD=function(x){if(this.id==X.Ks){var Q,c,j=null;
if(this.QU&&x.u==null){var $=this.QU[0][0],z=$.Xd;Q=z[0];c=z[1]}else if(this.N$){Q=this.N$.aJ;c=this.N$.W4}if(this.oS!=0)j=x.fG[this.oS-1].EF(c);
this.Yz=d._W.a3w(Q,c.m,c.e,j)}};X.Y.Pe=function(x,Q){if(Q==null)Q=x.zi(!0,null,null,!0);var c=new gh,$=new gh;
if(x.u&&Q.length==1&&Q[0]>=0)c=x.u.rect.clone();else for(var F=0;F<Q.length;F++){var z=Q[F],j=0<=z?x.B[z]:-1e3<z?x.iL[-1-z]:x.fG[-1e3-z],U=j.add?j.add.vmsk:null,i=0<=z?j.Q8(x,Q.length==1,!1,!0):-1e3<z?d.o.sP(U.$,Q.length==1&&U.g.length!=0?U.g:null):j.rect.clone();
c=c.iO(i);if(z>0&&j.add.artb)$=$.iO(j.Dd())}return!$._6()?$:c};X.Y.prototype.VG=function(x,Q,c,$){var z=new jO(Q,!0);
z.data=c;if($)z.f=$;x.T(z)};X.Y.my=function(x,Q,c){var $=[];for(var F=0;F<Q.length;F++){var z=Q[F],j,U;
if(z>=0){j=x.B[z];U=j.AA(x,c,!0)}else if(z>-1e3){j=x.iL[-1-z];U=[2]}else{$.push([null,null,null,null,null,null,null,x.fG[-1e3-z].clone()]);
continue}var i=[],b=U.indexOf(0)!=-1;if(b){var e={Xd:j.add.SoLd?null:[j.buffer.slice(0),j.rect.clone()]};
i.push(e);if(j.Oz()){var k=j.U5(x);e.ab3=k.buffer.slice(0);e.as0=k.rect.clone()}}else i.push(null);if(U.indexOf(1)!=-1)i.push(j.Rz().clone());
else i.push(null);if(U.indexOf(2)!=-1)i.push({hk:j.add.vmsk.clone(),XM:j.add.vstk?JSON.parse(JSON.stringify(j.add.vstk)):null,WB:j.add.vstk?aF.L$(x.B[z].add):null,xV:j.add.vstl?JSON.stringify(j.add.vstl):null,eV:j.add.vogk?JSON.parse(JSON.stringify(j.add.vogk)):null});
else i.push(null);if(j.add.TySh&&b){dU.c5(j.add.TySh);i.push(j.add.TySh.i.clone())}else i.push(null);
if(j.add.SoLd&&b)i.push(JSON.parse(JSON.stringify(j.add.SoLd)));else i.push(null);if(U.indexOf(3)!=-1)i.push(j.U5(x).F.clone());
else i.push(null);if(j.add.lmfx)i.push(JSON.stringify(j.add.lmfx));else i.push(null);$.push(i)}return $};
X.Y.Lp=function(x,Q,c){for(var F=0;F<Q.length;F++){var $=Q[F],z=0<=$?x.B[$]:-1e3<$?x.iL[-1-$]:x.fG[-1e3-$],j=c[F];
if(j[0]){if(j[0].Xd){z.rect=j[0].Xd[1].clone();z.buffer=j[0].Xd[0].slice(0)}if(z.Oz()){var U=z.U5(x);
U.buffer=j[0].ab3.slice(0);U.rect=j[0].as0.clone()}}if(j[1]){z.Rz().channel=j[1].channel.slice(0);z.Rz().rect=j[1].rect.clone();
z.Rz().ha=!0}if(j[2]){z.add.vmsk=j[2].hk.clone();if(j[2].WB)aF.C4(z.add,j[2].WB);if(j[2].XM)z.add.vstk=JSON.parse(JSON.stringify(j[2].XM));
if(j[2].eV)z.add.vogk=JSON.parse(JSON.stringify(j[2].eV));if(j[2].xV)z.add.vstl=JSON.parse(j[2].xV)}if(j[3]){z.add.TySh.i=j[3].clone();
dU.jC(z.add.TySh)}if(j[4]){z.add.SoLd=JSON.parse(JSON.stringify(j[4]))}if(j[5]){var i=z.U5(x).F;i.channel=j[5].channel.slice(0);
i.rect=j[5].rect.clone()}if(j[6]){z.add.lmfx=JSON.parse(j[6])}if(j[7]){z.channel=j[7].channel.slice(0);
z.rect=j[7].rect.clone();z.ha=!0}if(0<=$){z.kT(x);z.c();if(j[4])z.bx(x,!1)}}x.c()};X.Y.wS=function(x,Q,c,$,z,j,U,i,b,e){if(typeof j[0]=="number"){var k=[];
for(var F=0;F<c.length;F++)k[F]=j;j=k}for(var F=0;F<c.length;F++){var K=j[F],g=d.D.uL(K),R=g.c0(),T=c[F],D=0<=T?x.B[T]:-1e3<T?x.iL[-1-T]:x.fG[-1e3-T],a=$[F];
if(D.add&&D.add.lmfx&&i)en.pa(D.add.lmfx,R);if(a[0]&&!a[3]&&!a[4]&&!a[5]){var _=a[0].Xd;if(b){var I=b.clone(),f=d.R(I.P()*4);
d.WK(_[0],_[1],f,I);_=[f,I]}var y=X.Y.av(_,z,K,U,z==0?D.buffer.buffer:null,null,null,e);if(y){D.rect=y.rect;
D.buffer=y.buffer}}if(a[1]){var Z=D.Rz();X.Y.lN(x,a[1],Z,z,K,U,Z.uz&&U&&!d.fr.Cu(U)&&a[0]?a[0].Xd[1]:null);
if(b){var I=D.rect.y_(b),v=d.R(I.P());d.L2(Z.channel,Z.rect,v,I);Z.channel=v;Z.rect=I}}if(a[2]){var G=U&&!d.fr.Cu(U),q=a[2].hk.clone(),h=c.length==1&&q.g.length!=0,r=c.length==1&&q.xf.length>1;
if(r)h=!1;var H=h?q.g:null,o=r?q.xf:null;if(G){var P=d.fr.ES(U);d.D.i(K,P[3]);d.o.aiv(q.$,P,H,o)}else d.o.a2Y(q.$,K,H,o);
if(D.add.vstk&&i){D.add.vstk.strokeStyleLineWidth.v.val=a[2].XM.strokeStyleLineWidth.v.val*R;var O=a[2].WB;
if(O&&O.bf==3){O=JSON.parse(JSON.stringify(O));var p=O.WB.phase.v;O.WB.Scl.v.val=Math.round(O.WB.Scl.v.val*R);
p.Hrzn.v=Math.round(p.Hrzn.v*R);p.Vrtc.v=Math.round(p.Vrtc.v*R);aF.C4(D.add,O)}}if(D.add.vogk){D.add.vogk=JSON.parse(JSON.stringify(a[2].eV));
if(G||r)d.eV.axu(D.add.vogk);else d.eV.i(D.add.vogk,K,c.length>1?[]:q.g,i)}if(D.add.vstl){var C=D.add.vstl=JSON.parse(a[2].xV);
for(var W=0;W<2;W++){var J=W==0?C.aA:C.sf;if(J==null||J[3]==null)continue;var t=J[3],Y=new bI(t[0],t[1],t[2],t[3],t[4],t[5]);
Y.concat(g);J[3]=[Y.V,Y.J,Y.dC,Y.xq,Y.DX,Y.ti]}}q.bS*=R;var l=new bI;l.rotate(q.ir);l.concat(g);q.ir=Math.atan2(-l.J,l.V);
D.add.vmsk=q;if(D.add.vogk)d.eV.Rt(D.add.vogk,D.add.vmsk)}if(a[3]){var Y=a[3].clone();Y.concat(g);D.add.TySh.i=Y;
dU.jC(D.add.TySh);aE.Wz(D,Q.Dn)}if(a[4]){var m=D.add.SoLd,B=X.Y.e3(a[4].nonAffineTransform);d.D.i(K,B);
var L=d.A.cl(B);if(aH.pM(B)){if(U){var A=d.A.pA(d.fr.ES(a[4].quiltWarp.v)[3]),v=d.D.u_(B,A),S=d.A.pA(d.fr.ES(U)[3]);
B=[S.x,S.y,S.x+S.m,S.y,S.x+S.m,S.y+S.e,S.x,S.y+S.e];d.D.i(v,B);m.quiltWarp.v=U}var M=d.D.u_(B),N=B;if(!d.D.up(M)){M[6]=M[7]=0;
N=[0,0,1,0,1,1,0,1];d.D.i(M,N)}m.Trnf=X.Y.TD(N);m.nonAffineTransform=X.Y.TD(B);if(m.filterFX)m.filterFX=JSON.parse(JSON.stringify(a[4].filterFX));
X.Y.aqT(m,g);D.bx(x,z==0,Q.Dn)}}if(a[5])X.Y.lN(x,a[5],D.U5(x).F,z,K,U);if(a[7])X.Y.lN(x,a[7],D,z,K,U);
if(0<=T){if(!e)D.NK();D.kT(x);D.c()}}x.c()};X.Y.BG=function(x,Q){var c=Q.c0(),$=0;d.t8(x);var z=d.a19(x,Q,.3,4);
$=z[0];Q=z[1];var j=x[$],U=x[$+1],i=U.m,b=U.e,e=d.A.Hg(U).j;d.A.i(e,Q,e);var k=d.A.cl(e),K=d.R(k.P()),g=k.x,R=k.y,T=k.m,D=k.e,a=Q.clone();
a.HQ();var _=a.RE(new bC(0,0)),I=a.RE(new bC(1,0)),f=I.x-_.x,y=I.y-_.y;for(var Z=0;Z<D;Z++){var v=a.V*(g+.5)+a.dC*(Z+R+.5)+a.DX,G=a.J*(g+.5)+a.xq*(Z+R+.5)+a.ti;
for(var q=0;q<T;q++){K[Z*T+q]=Math.floor(.5+d.D.a8r(v,G,j,i,b));v+=f;G+=y}}return{rect:k,channel:K}};
X.Y.rN=function(x,Q,c,$,z,j){if(c==null)c=!1;return X.Y.av(x,c?0:1,d.D.Gr(Q),null,$,z,j,c)};X.Y.av=function(x,Q,c,$,z,j,U,i){if(i==null)i=!1;
if(i&&U)throw"e";var b={},k=0;if($&&!d.fr.Cu($)){var e=d.fr.ES($);d.D.i(c,e[3]);b.rect=d.A.cl(e[3]);
b.buffer=d.R(b.rect.P()*4);d.uE.drawImage(e,x[0],x[1].m,x[1].e,b.buffer,b.rect,Q==0);return b}if(d.D.up(c)){d.gk(x);
var K=.3,k=0,g=d.D.uL(c),R=x[1],T=R.P()*g.c0();if(i&&T>4e6)K=T>8e6?2.2:1.2;var D=d.a19(x,g,K,16);k=D[0];
c=d.D.Gr(D[1])}var a=x[k],R=x[k+1],_=d.D.Vi(c,d.D.Gr(new bI(R.m,0,0,R.e,R.x,R.y))),I=[0,0,1,0,1,1,0,1];
d.D.i(_,I);b.rect=d.A.cl(I);if(U)b.rect=b.rect.y_(U);if(i){while((b.rect.m&3)!=0)b.rect.m++;while((b.rect.e&3)!=0)b.rect.e++}if(!aH.pM(I)||b.rect.m>1e5||b.rect.e>1e5||b.rect.P()>3e4*3e4)return null;
var f=b.rect.P()*4;if(z&&z.byteLength>=f&&f>=z.byteLength>>2){b.buffer=new Uint8Array(z)}else{b.buffer=d.R(f)}d.D.drawImage(_,a,R.m,R.e,b.buffer,b.rect,Q==0,j,i);
if(Q==2&&b.buffer){var y=b.rect.m,Z=b.rect.e,v;v=[0,-1,0,-1,16,-1,0,-1,0];v=d.hx.C6(v);var G=b.buffer.slice(0);
d.hx.QY(G,b.buffer,y,Z,v,255,!1,!0)}if(b.buffer)return b};X.Y.lN=function(x,Q,c,$,z,j,U){var i=Q.rect,b=Q.channel;
if(U){i=U;b=Q.EF(i)}if(Q.color==255)d.HQ(b);var e=d.R(i.P()*4);d.Dm(b,e,3);var k=X.Y.av([e,i],$,z,j);
if(k){c.rect=k.rect;c.channel=d.R(k.rect.P());d.GS(k.buffer,c.channel,3);c.ha=!0}if(Q.color==255){d.HQ(b);
if(k)d.HQ(c.channel)}};X.Y.aqT=function(x,Q){var c=x.filterFX;if(c)c=c.v.filterFXList;if(c)c=c.v;if(c)for(var $=0;
$<c.length;$++){var z=c[$].v.Fltr;if(z==null||z.v.classID!="rigidTransform")continue;z=z.v;console.log(z);
var j=[];for(var U=0;U<4;U++)j.push(z["PuX"+U].v,z["PuY"+U].v);d.A.i(j,Q,j);for(var U=0;U<4;U++){z["PuX"+U].v=j[U*2];
z["PuY"+U].v=j[U*2+1]}var i=["PinP","posFinalPins"],b=["originalVertexArray","deformedVertexArray"],e=z.puppetShapeList.v;
for(var k=0;k<e.length;k++){var K=e[k].v;for(var g=0;g<i.length;g++){var R=X.Y.e3(K[i[g]]);d.A.i(R,Q,R);
K[i[g]]=X.Y.TD(R);var T=new Uint8Array(K[b[g]].v),D=new Float32Array(T.buffer);d.A.i(D,Q,D);var a=[];
for(var _=0;_<T.length;_++)a[_]=T[_];K[b[g]].v=a}}}};X.Y.e3=function(x){var Q=[],c=x.v.length;for(var F=0;
F<c;F++)Q.push(x.v[F].v);return Q};X.Y.TD=function(x){var Q={t:"VlLs",v:[]},c=x.length;for(var F=0;F<c;
F++)Q.v.push({t:"doub",v:x[F]});return Q};X.Y.prototype.amh=function(){var x=d.A.pA(d.fr.ES(this.wQ.yw())[3]),Q=d.D.u_(this.B5.hZ(),this.oT),c=[x.x,x.y,x.x+x.m,x.y,x.x+x.m,x.y+x.e,x.x,x.y+x.e];
d.D.i(Q,c);this.B5.eA(c);this.oT=x};X.Y.prototype.U6=function(){var x=d.D.u_(this.B5.hZ(),this.oT);if(this.n0)x=d.D.Vi(x,d.D.Gr(this.n0));
return x};X.Y.prototype.d_=function(x,Q,c,$){var z=this.U6();z=d.D.Vi(z,d.D.HQ(this.YZ));var j=this.wQ?this.wQ.yw():null;
if(this.Kh==0){var U=this.Wc=d.D.uL(z);if(this.id==X.Ks){var i=this.QU[0][0],b=i.Xd,e=b[1],k=~~(e.m*Math.max(0,U.V)),K=~~(e.e*Math.max(0,U.xq)),g=new gh(Math.round(U.V*e.x+U.DX),Math.round(U.xq*e.y+U.ti),k,K),R=d._W.i(this.Yz,g),T=x.B[this.B[0]];
T.buffer=R;T.rect=g;T.c();x.c()}else X.Y.wS(x,Q,this.B,this.QU,c,z,j,null,null,$)}else if(this.Kh==1){var D=x.B[this.B[0]],e=this.N$.W4;
if(D.kk<=0){var a=this.N$.aJ,_=this.Cj,I=null;if(j&&!d.fr.Cu(j)&&!_.rect.HM(e)){var R=d.R(_.rect.P()*4);
d.WK(a,e,R,_.rect);a=R;e=_.rect}if(this.id==X.Ks){var U=this.Wc=d.D.uL(z),k=~~(e.m*Math.max(0,U.V)),K=~~(e.e*Math.max(0,U.xq)),g=new gh(Math.round(U.V*e.x+U.DX),Math.round(U.xq*e.y+U.ti),k,K),R=d._W.i(this.Yz,g);
I={buffer:R,rect:g}}else I=X.Y.av([a,e],c,z,j);if(I){D.$Q.YT=I.buffer;D.$Q.hX=I.rect;var f=d.R(I.rect.P());
d.GS(D.$Q.YT,f,3);x.u={channel:f,rect:D.$Q.hX.clone()}}}else{var y=d.R(e.P()*4);d.Dm(this.N$.aJ,y,3);
var I=X.Y.av([y,e],c,z,j);if(I){D.$Q.YT=d.R(I.rect.P());d.GS(I.buffer,D.$Q.YT,3);D.$Q.hX=I.rect}this.awh(x,c,z,j)}D.rI(x,0,0,x.u);
if(c!=0){D.NK();d.NK(x.u)}x.ox=!0;x.c()}else if(this.Kh==2)this.awh(x,c,z,j)};X.Y.prototype.awh=function(x,Q,c,$){var z=this.Cj.rect,j=d.R(z.P()*4);
d.Dm(this.Cj.channel,j,3);var U=X.Y.av([j,z],Q,c,$),i=d.R(U.rect.P());d.GS(U.buffer,i,3);x.u={channel:i,rect:U.rect};
x.ox=!0};X.Y.prototype.disable=function(x,Q,c,$){if(this.B5)this.UM(x,Q,null,!0)};X.abu=function(){X.Y.call(this,[10,16],X.va,"tools/transform")};
X.abu.prototype=new X.Y;X.aoj=function(){X.Y.call(this,[7,10],X.Um,"tools/transform")};X.aoj.prototype=new X.Y;
X.a05=function(){X.Y.call(this,[10,48],X.Ks,"tools/transform")};X.a05.prototype=new X.Y;X.Aj=function(x,Q,c){X.Ur.call(this,[10,46],X.V1,"tools/transform");
this.wm=[1,1,2,!0];this.PU="rigidTransform";this.kL=null;this.aeG=null;this.GG=null;this.NZ=null;this.If=null;
this.NG=null;this.K7=[]};X.Aj.prototype=new X.Ur;X.Aj.prototype.sD=function(){return!0};X.Aj.g3=function(x){if(x==null)return!1;
if(x.g.length!=1)return!1;var Q=x.B[x.g[0]];return Q.add.SoLd||x.hS(!1)};X.Aj.prototype.l1=function(x,Q){return X.Aj.g3(x)};
X.Aj.prototype.enable=function(x,Q,c,$,z,j,U){this.aeG=j.nS;var i=j.nS,b,D=null;if(i){var e=x.B[i.a];
if(e.add.SoLd.filterFX!=null){var k=e.add.SoLd.filterFX.v.filterFXList.v;if(k[i.index])b=JSON.parse(JSON.stringify(k[i.index].v.Fltr.v))}}var K=b==null,e=x.B[x.g[0]],g=e.buffer,R=e.rect,T=e.add.SoLd;
if(T){var a=T.nonAffineTransform.v;D=[];for(var F=0;F<4;F++)D.push(a[F*2].v,a[F*2+1].v);if(K)this.R5("edit",Q);
var _=e.U5(x);g=_.buffer;R=_.rect}this.kL={buffer:g.slice(0),rect:R.clone(),a3R:D};if(K)b=X.Aj.f$(this.kL,this.wm);
this.GG=b;this.NZ=X.Aj.kE(this.GG,this.wm);this.iW();this.QE(x);if(K)this._I(Q);var I=new jO(u.E.M,!0);
I.data={d:u.H.gR,f:this.id,hF:this.wm};Q.T(I);I.data={d:u.H.aK,Wu:"default"};Q.T(I)};X.Aj.prototype.disable=function(x,Q,c,$){if(this.NZ)this.UM(x,Q,!0)};
X.Aj.prototype.iW=function(x){var Q=this.NZ;this.K7=[];for(var F=0;F<Q.length;F++){var c=Q[F];for(var $=0;
$<c.g.length;$++)this.K7.push([F,c.g[F]]);c.Xr=d.NO.avA(c);if(x)d.NO.avq(c)}};X.Aj.prototype.np=function(x,Q,c,$){if(x.Iu=="commit")this.UM(c,Q,!0);
else if(x.Iu=="cancel")this.ce(c,Q,!0);else if(x.Iu=="prm"){var z=!1;for(var F=0;F<3;F++)if(this.wm[F]!=x.hF[F])z=!0;
this.wm=x.hF;if(z){this.GG=X.Aj.f$(this.kL,this.wm,this.GG);this.NZ=X.Aj.kE(this.GG,this.wm);this.iW(!0);
this._I(Q)}this.QE(c)}else if(x.Iu=="moveDepth"){var j=this.NZ;for(var U=0;U<j.length;U++){var i=j[U];
for(var F=0;F<i.g.length;F++){var b=i.g[F];i.g8[b]+=x.aht?1:-1}}this._I(Q)}};X.Aj.prototype.Da=function(x,Q){return x==fM.Hm||x==fM.Z1};
X.Aj.prototype.sM=function(x,Q,c,$){var z=$.um();if($.S(fM.ln))this.UM(x,Q,!0);else if($.S(fM.En))this.ce(x,Q,!0);
else if($.S(fM.Hm)||$.S(fM.Z1)){var j=this.NZ;for(var U=0;U<j.length;U++){var i=j[U];i.g.sort(function(k,K){return K-k});
for(var F=0;F<i.g.length;F++){var b=i.g[F],e=b*2;i.g8.splice(b,1);i.mc.splice(b,1);i.Ou.splice(b,1);
i.kf.splice(b,1);i.qA.splice(e,2);i.eI.splice(e,2)}i.g=[];if(i.kf.length==0){i.sS=i.wf.slice(0);i.Sz=i.wf.slice(0)}}this.iW(!0);
this._I(Q);this.QE(x)}else if(z.x!=0||z.y!=0){this.avo(x,z.x,z.y,Q);this.ng=null}};X.Aj.prototype.UM=function(x,Q,c){this.R5("confirm",Q);
this.escape(x,Q,c)};X.Aj.prototype.ce=function(x,Q,c){this.R5("cancel",Q);this.escape(x,Q,c)};X.Aj.prototype.escape=function(x,Q,c){x.N.LV=null;
x.N._V=[];x.N.Je=[];x.vu=!0;this.NZ=null;var $=new jO(u.E.M,!0);$.data={d:u.H.JG};if(c)Q.T($)};X.Aj.prototype.Eu=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y),U=j.x,i=j.y,b=this.NZ,e=null,k=[0,2,4,1.2,1.2,1.2],K=-1,g=X.Ee(x,z);
for(var F=0;F<b.length;F++){var R=b[F],T=d.A.b2(R.eI,U,i,g);if(T!=-1)e=[F,T];if(K==-1&&d.NO.a9P.a0c(R.Sz,R.AJ,U,i))K=F}if(e==null&&K!=-1){var R=b[K];
X.Aj.aA_(R,U,i,U,i,0);e=[K,R.kf.length-1];R.Xr=d.NO.avA(R)}this.If=j;if(e){var D=b[e[0]].g.indexOf(e[1])!=-1;
if($.S(fM.FT)&&!D){b[e[0]].g.push(e[1]);this.K7.push(e)}else if(!D){b[e[0]].g=[e[1]];this.K7=[e]}}this.QE(x)};
X.Aj.aA_=function(x,Q,c,$,z,j){var U=d.A.b2(x.Sz,Q,c);x.kf.push(U);x.eI.push($,z);x.qA.push(x.Sz[U*2]-Q,x.Sz[U*2+1]-c);
x.Ou.push(0);x.mc.push(!1);x.g8.push(j)};X.Aj.prototype.CK=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y),U=this.If;
if(U)this.avo(x,j.x-U.x,j.y-U.y,Q)};X.Aj.prototype.avo=function(x,Q,c,$){var z={},j=this.K7,U=this.NZ;
if(this.ng==null){this.ng=[];for(var F=0;F<U.length;F++)this.ng.push(U[F].eI.slice(0))}for(var F=0;F<j.length;
F++){var i=this.K7[F],b=i[0],e=U[i[0]],k=i[1]*2;e.eI[k+0]=this.ng[b][k+0]+Q;e.eI[k+1]=this.ng[b][k+1]+c;
z[b]=b}for(var b in z)d.NO.avq(this.NZ[z[b]]);this.QE(x);this._I($)};X.Aj.prototype.R5=function(x,Q){var c=new jO(u.E.v,!0);
c.f=X.iT;c.data={d:x,nS:this.aeG,PU:this.PU,_B:this.GG};Q.T(c)};X.Aj.prototype.km=function(x,Q,c,$,z){this.If=null;
this.ng=null};X.Aj.prototype._I=function(x){X.Aj.akD(this.NZ,this.wm,this.GG);this.R5("edit",x)};X.Aj.prototype.QE=function(x){var Q=this.NZ,c=this.GG;
x.N.LV={j:[],G:[]};x.N._V=[];x.N.Je=[];for(var F=0;F<Q.length;F++){var $=Q[F];for(var z=0;z<$.eI.length;
z+=2){var j=x.N.Je;if($.g.indexOf(z>>>1)!=-1)j=x.N._V;j.push($.eI[z],$.eI[z+1])}if(this.wm[3])d.A.concat(x.N.LV,d.A.ap5($.Sz,$.AJ))}x.vu=!0};
X.Aj.f$=function(x,Q,c){var $=x.buffer,z=x.rect,j=x.a3R,U=fK.$H("rigidTransform");if(j)for(var F=0;F<4;
F++){U["PuX"+F].v=j[F*2];U["PuY"+F].v=j[F*2+1]}var i=U.puppetShapeList.v,b=d.NO.agf($,z.m,z.e,Q[1],Q[2]),e=[];
for(var k=0;k<b.length;k++){var K={classID:"puppetShape",rigidType:{t:"bool",v:!0},VrsM:{t:"long",v:1},VrsN:{t:"long",v:0},originalVertexArray:{t:"tdta",v:[]},deformedVertexArray:{t:"tdta",v:[]},indexArray:{t:"tdta",v:[]},pinOffsets:{t:"VlLs",v:[]},posFinalPins:{t:"VlLs",v:[]},pinVertexIndices:{t:"VlLs",v:[]},PinP:{t:"VlLs",v:[]},PnRt:{t:"VlLs",v:[]},PnOv:{t:"VlLs",v:[]},PnDp:{t:"VlLs",v:[]},meshQuality:{t:"long",v:2},meshExpansion:{t:"long",v:2},meshRigidity:{t:"long",v:2},imageResolution:{t:"doub",v:72},selectedPin:{t:"VlLs",v:[]}};
K.meshBoundaryPath={t:"Objc",v:{classID:"pathClass",pathComponents:{t:"VlLs",v:[{t:"Objc",v:{classID:"PaCm",shapeOperation:{t:"enum",v:{shapeOperation:"xor"}},SbpL:{t:"VlLs",v:[{t:"Objc",v:{classID:"Sbpl",Clsp:{t:"bool",v:!0},Pts:{t:"VlLs",v:[]}}}]}}}]}}};
var g=b[k];i.push({t:"Objc",v:K});var R=g.wf.slice(0);d.A.i(R,new bI(1,0,0,1,z.x,z.y),R);var T=g.AJ;
for(var F=0;F<T.length;F+=3){var D=T[F+1];T[F+1]=T[F+2];T[F+2]=D}e.push({AJ:T,wf:R,sS:R,Sz:R,kf:[],qA:[],eI:[],Xr:null,g:[],Ou:[],mc:[],g8:[]})}if(c){var a=X.Aj.kE(c,[]),_=e[0];
for(var F=0;F<a.length;F++){var I=a[F];for(var f=0;f<I.g.length;f++)_.g.push((_.eI.length>>>1)+I.g[f]);
for(var f=0;f<I.kf.length;f++){var y=I.kf[f]*2,Z=I.wf[y]-I.qA[f*2],v=I.wf[y+1]-I.qA[f*2+1];X.Aj.aA_(_,Z,v,I.eI[f*2],I.eI[f*2+1],I.g8[f])}}}X.Aj.akD(e,Q,U);
return U};X.Aj.kE=function(x,Q){var c=X.Y.e3,$=x.puppetShapeList.v,z=[];for(var j=0;j<$.length;j++){var U=$[j].v;
Q[0]=U.meshRigidity.v-1;Q[1]=U.meshQuality.v-1;Q[2]=U.meshExpansion.v;var i=U.pinVertexIndices.v.length,b=U.meshBoundaryPath.v.pathComponents.v;
if(b.length!=0){var e=b[0].v.SbpL.v[0].v.Pts;e.v=[]}var k=new Uint32Array(new Uint8Array(U.indexArray.v).buffer),K=new Float32Array(new Uint8Array(U.originalVertexArray.v).buffer),g=new Float32Array(new Uint8Array(U.deformedVertexArray.v).buffer),R=[],T=[],D=[];
for(var F=0;F<k.length;F++)R.push(k[F]);for(var F=0;F<K.length;F++){T.push(K[F]);D.push(g[F])}var a=c(U.pinVertexIndices),_=c(U.pinOffsets),I=c(U.posFinalPins),f=c(U.PnRt),y=c(U.PnOv),Z=c(U.PnDp),v=c(U.selectedPin);
z.push({AJ:R,wf:T,sS:D.slice(0),Sz:D,kf:a,qA:_,eI:I,Xr:null,Ou:f,mc:y,g8:Z,g:v})}return z};X.Aj.akD=function(x,Q,c){function $(g,R){var T=[];
for(var F=0;F<g.length;F++)T.push({t:R,v:g[F]});return T}function z(g,R,T){var D=new(T?Uint32Array:Float32Array)(g),a=new Uint8Array(D.buffer);
for(var F=0;F<a.length;F++)R[F]=a[F]}var j=c.puppetShapeList.v;for(var U=0;U<j.length;U++){var i=x[U],b=j[U].v;
b.meshRigidity.v=Q[0]+1;b.meshQuality.v=Q[1]+1;b.meshExpansion.v=Q[2];z(i.AJ,b.indexArray.v,!0);z(i.wf,b.originalVertexArray.v);
z(i.Sz,b.deformedVertexArray.v);var e=[];for(var F=0;F<i.kf.length;F++){var k=i.kf[F]*2,K=F*2;e[K]=i.wf[k]-i.qA[K];
e[K+1]=i.wf[k+1]-i.qA[K+1]}b.PinP.v=$(e,"doub");b.pinVertexIndices.v=$(i.kf,"long");b.pinOffsets.v=$(i.qA,"doub");
b.posFinalPins.v=$(i.eI,"doub");b.PnRt.v=$(i.Ou,"long");b.PnOv.v=$(i.mc,"bool");b.PnDp.v=$(i.g8,"doub");
b.selectedPin.v=$(i.g,"long")}};X.x5=function(x,Q,c){X.Ur.call(this,x?x:[10,40],Q?Q:X.bb,c?c:"tools/slice");
this.D9=null;this.iZ=null;this.aQ=null;this.aC3=null;this.xB=null;this._1=null};X.x5.prototype=new X.Ur;
X.x5.e$=function(x,Q){var c=-1;for(var F=0;F<x.length;F++){var $=X.x5.YA(x,F);if($[0]<=Q.x&&Q.x<=$[2]&&$[1]<=Q.y&&Q.y<=$[3]){c=F;
break}}return c};X.x5.prototype.To=function(x,Q,c,$,z){if(c==null)return;this.CE(c);if(x.d=="fromAction"){var j=x.fe,U=j.q4,i=j.dx,b=c.wZ(),e=c.lG(),k=e==-1?new gh(0,0,c.m,c.e):c.B[e].Dd();
if(U=="divide"){if(c.wE.length!=0){var K=c.wE[0],g=X.x5.YA(c.p9,K);k=new gh(g[0],g[1],g[2]-g[0],g[3]-g[1]);
c.p9.splice(K,1);c.wE=[]}b=[[],[]];for(var R=0;R<2;R++){var T=["Across","Down"][R],D=i["pixels"+T]?0:1,a=i[["pixels","slices"][D]+T];
if(a==null)continue;a=a.v;var _=R==0?k.x:k.y,I=R==0?k.m:k.e;if(D==0)for(var F=1;F*a<I;F++){b[0].push([R,_+F*a]);
b[1].push(e)}else{var f=Math.floor(I/a);for(var F=1;F<a;F++){b[0].push([R,_+F*f]);b[1].push(e)}}}}var y=[k.x,k.x+k.m],Z=[k.y,k.y+k.e];
for(var F=0;F<b[0].length;F++){var v=b[0][F],G=Math.round(v[1]),q=b[1][F];if(q!=-1&&q!=e)continue;if(v[0]==0&&y.indexOf(G)==-1)y.push(G);
if(v[0]==1&&Z.indexOf(G)==-1)Z.push(G)}y.sort(function(J,t){return J-t});Z.sort(function(J,t){return J-t});
for(var h=1;h<Z.length;h++)for(var r=1;r<y.length;r++){c.p9.push(X.x5._0());X.x5.YV(c.p9,c.p9.length-1,[y[r-1],Z[h-1],y[r],Z[h]]);
c.vu=!0}}else if(x.d=="reorder"){if(c.wE.length==0)return;var H=c.p9,o=c.wE;o.sort(function(J,t){return J-t});
console.log(o);var P=H.slice(0),O=[],p=[];for(var F=0;F<o.length;F++){var K=o[F],C=H[K];p.push(C);P.splice(P.indexOf(C),1)}var W=Math.max(0,Math.min(P.length,o[0]-x.dir));
for(var F=0;F<p.length;F++){P.splice(W+F,0,p[F]);O.push(W+F)}c.p9=P;c.wE=O}else if(x.d=="delete"){var H=c.p9.slice(0);
for(var F=0;F<c.wE.length;F++)c.p9.splice(c.p9.indexOf(H[c.wE[F]]),1);c.wE=[]}else if(x.d=="deleteAll"){c.p9=[];
c.wE=[]}else{c.p9[c.wE[0]].v=x;c.vu=!0}this.oc(c)};X.x5.prototype.enable=function(x,Q,c,$,z,j){X.Ur.prototype.enable.call(this,x,Q,c,$,z,j);
if(!c.Zo.p9){var U=new jO(u.E.M,!0);U.data={d:u.H.hW,hF:ke.m$};Q.T(U)}};X.x5.prototype.disable=function(){this.D9=null;
this.iZ=null};X.x5.prototype.x1=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y),U=X.x5.e$(x.p9,j);if(U==-1)return;
this.D9=x;this.iZ=Q;x.wE=[U];x.vu=!0;if(this._1==null){this._1=new ev([{name:[5,4]},{name:[8,11,1],Q2:!0}]);
this._1.k("select",this.Df,this)}var i=this._1;i.parent=Q;i._();i.update(x,c);var b=new jO(u.E.M,!0);
b.data={d:u.H.A_,G7:i,x:z.TN+2,y:z.yv+1};Q.T(b)};X.x5.prototype.Df=function(x){var Q=this._1.Vk()[0],c=this.D9;
if(Q==0){this.CE(c);c.p9.splice(c.wE[0],1);c.wE=[];c.vu=!0;this.oc(c)}if(Q==1){var $=new jO(u.E.M,!0);
$.data={d:u.H.LL,AD:"soptions",b:c.p9[c.wE[0]].v};this.iZ.T($)}};X.x5.prototype.Eu=function(x,Q,c,$,z){if(x==null)return;
this.CE(x);var j=x.Q.$X(z.x,z.y);j=X.qV.Bw(x,j,c,[!0,null,!1]);j.x=Math.round(j.x);j.y=Math.round(j.y);
this.xB=j;x.p9.unshift(X.x5._0());x.wE=[0];X.x5.YV(x.p9,0,[j.x,j.y,j.x+20,j.y+20]);x.vu=!0};X.x5.prototype.CK=function(x,Q,c,$,z){if(this.aQ==null)return;
var j=x.Q.$X(z.x,z.y),U=this.xB;j=X.qV.Bw(x,j,c,[!0,null,!1]);j.x=Math.round(j.x);j.y=Math.round(j.y);
var i=[U.x,U.y,j.x,j.y];X.x5.aAr(i);X.x5.YV(x.p9,0,i);x.vu=!0};X.x5.prototype.km=function(x,Q,c,$,z){this.oc(x);
this.xB=null};X.x5.prototype.CE=function(x){this.aQ=JSON.stringify(x.p9);this.aC3=JSON.stringify(x.wE)};
X.x5.prototype.oc=function(x){var Q=JSON.stringify(x.p9);if(Q!=this.aQ){var c=new dg(this.name,this);
c.data={N$:this.aQ,MV:Q,aal:this.aC3,a4q:JSON.stringify(x.wE)};x.kp(c)}this.aQ=null};X.x5.prototype.pC=function(x,Q){Q.p9=JSON.parse(x.N$);
Q.wE=JSON.parse(x.aal);Q.vu=!0};X.x5.prototype.Tz=function(x,Q){Q.p9=JSON.parse(x.MV);Q.wE=JSON.parse(x.a4q);
Q.vu=!0};X.x5.prototype.Da=function(x,Q){return Q!=null&&Q.wE.length!=0&&(x==fM.Hm||x==fM.Z1)};X.x5.prototype.sM=function(x,Q,c,$){if(x==null)return;
if($.S(fM.Hm)||$.S(fM.Z1))this.To({d:"delete"},Q,x,$,c);var z=$.um();if(z.x!=0||z.y!=0){this.CE(x);X.x5.uB(x,z);
this.oc(x)}};X.x5.prototype.np=function(x,Q,c,$,z){};X.x5.aad=function(x,Q,c,$){var z=new bC(-Q.x,-Q.y),j=Q.m/c.m,U=Q.e/c.e,i=[0,0,Q.m,Q.e];
for(var F=0;F<x.length;F++){var b=X.x5.YA(x,F);if($){b[0]=Math.round(b[0]*j);b[1]=Math.round(b[1]*U);
b[2]=Math.round(b[2]*j);b[3]=Math.round(b[3]*U)}else{X.x5.dZ(b,z);X.x5.asm(b,i)}if(b[0]>=b[2]||b[1]>=b[3]){x.splice(F,1);
F--;continue}X.x5.YV(x,F,b)}};X.x5.uB=function(x,Q){var c=x.p9;for(var F=0;F<x.wE.length;F++){var $=X.x5.YA(c,x.wE[F]);
X.x5.dZ($,Q);X.x5.YV(c,x.wE[F],$)}};X.x5.asm=function(x,Q){if(x[0]<Q[0])x[0]=Q[0];if(x[1]<Q[1])x[1]=Q[1];
if(Q[2]<x[2])x[2]=Q[2];if(Q[3]<x[3])x[3]=Q[3]};X.x5.dZ=function(x,Q){x[0]=Math.round(x[0]+Q.x);x[2]=Math.round(x[2]+Q.x);
x[1]=Math.round(x[1]+Q.y);x[3]=Math.round(x[3]+Q.y)};X.x5.YV=function(x,F,Q){var c=x[F].v.bounds.v;c.Left.v=Q[0];
c.Top.v=Q[1];c.Rght.v=Q[2];c.Btom.v=Q[3]};X.x5.YA=function(x,F){var Q=x[F].v.bounds.v;return[Q.Left.v,Q.Top.v,Q.Rght.v,Q.Btom.v,F]};
X.x5.aAr=function(x){if(x[2]<x[0]){var Q=x[0];x[0]=x[2];x[2]=Q}if(x[2]==x[0])x[2]++;if(x[3]<x[1]){var Q=x[1];
x[1]=x[3];x[3]=Q}if(x[3]==x[1])x[3]++};X.x5.pA=function(x,Q){var c=1e9,$=-1e9,z=1e9,j=-1e9;for(var F=0;
F<Q.length;F++){var U=X.x5.YA(x,Q[F]);c=Math.min(c,U[0]);z=Math.min(z,U[1]);$=Math.max($,U[2]);j=Math.max(j,U[3])}return[c,z,$,j]};
X.x5._0=function(){return{t:"Objc",v:{classID:"slice",sliceID:{t:"long",v:0},groupID:{t:"long",v:0},origin:{t:"enum",v:{ESliceOrigin:"userGenerated"}},Type:{t:"enum",v:{ESliceType:"Img"}},bounds:{t:"Objc",v:{classID:"Rct1",Top:{t:"long",v:0},Left:{t:"long",v:0},Btom:{t:"long",v:0},Rght:{t:"long",v:0}}},url:{t:"TEXT",v:""},null:{t:"TEXT",v:""},Msge:{t:"TEXT",v:""},altTag:{t:"TEXT",v:""},cellTextIsHTML:{t:"bool",v:!0},cellText:{t:"TEXT",v:""},horzAlign:{t:"enum",v:{ESliceHorzAlign:"default"}},vertAlign:{t:"enum",v:{ESliceVertAlign:"default"}},bgColorType:{t:"enum",v:{ESliceBGColorType:"None"}},topOutset:{t:"long",v:0},leftOutset:{t:"long",v:0},bottomOutset:{t:"long",v:0},rightOutset:{t:"long",v:0}}}};
X.SB=function(){X.x5.call(this,[10,41],X.ic,"tools/sselect");this.xB=null;this.zS=null;this.VQ=null;
this.NG=null;this.gu=!1};X.SB.prototype=new X.x5;X.SB.prototype.Eu=function(x,Q,c,$,z){if(x==null)return;
var j=x.Q.$X(z.x,z.y),U=X.SB.abo(j,4/x.Q.W,x.p9,x.wE);U.pop();if(U.length!=0){this.xB=j;this.VQ=U;this.CE(x);
return}var i=x.p9,b=X.x5.e$(i,j);if(b==-1)x.wE=[];else{var e=x.wE.indexOf(b);if($.S(fM.FT)){if(e==-1)x.wE.push(b);
else x.wE.splice(e,1)}else{x.wE.sort(function(D,a){return D-a});if(e==-1)x.wE=[b];this.xB=j;this.CE(x);
this.zS=X.x5.pA(i,x.wE);this.NG=[];for(var F=0;F<x.wE.length;F++)this.NG.push(X.x5.YA(i,x.wE[F]));if($.S(fM.Al)){var k=i.slice(0),K=x.wE,g=[];
for(var F=0;F<K.length;F++){var b=K[F],R=k[b],T=i.indexOf(R);g.push(T);i.splice(T,0,JSON.parse(JSON.stringify(R)))}x.wE=g}}}x.vu=!0};
X.SB.prototype.CK=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y);if(this.xB==null){var U=X.SB.abo(j,4/x.Q.W,x.p9,x.wE),i=U.pop(),b=U.length==0?"default":["ew","nwse","ns","nesw"][i]+"-resize",e=new jO(u.E.M,!0);
e.data={d:u.H.aK,Wu:b};Q.T(e);return}if(!this.gu&&j.HM(this.xB))return;this.gu=!0;var k=x.p9,U=this.VQ;
if(U){j=X.qV.Bw(x,j,c,[!0,null,!1]);var K=Math.round(j.x),g=Math.round(j.y);for(var F=0;F<U.length;F+=2){var R=X.x5.YA(k,U[F]),T=U[F+1];
R[T]=(T&1)==0?K:g;X.x5.aAr(R);X.x5.YV(k,U[F],R)}}else{var D=j.HY(this.xB),a=this.zS.slice(0);X.x5.dZ(a,D);
var _=new gh(a[0],a[1],a[2]-a[0],a[3]-a[1]),I=X.qV.H1(x,_,c,[!0,null,!1],!0);X.qV.ao(x,_,I);D.x+=I[0];
D.y+=I[1];for(var F=0;F<x.wE.length;F++)X.x5.YV(k,x.wE[F],this.NG[F]);X.x5.uB(x,D)}x.vu=!0};X.SB.prototype.km=function(x,Q,c,$,z){if(this.xB==null)return;
this.oc(x);x.N.zZ=null;x.vu=!0;this.xB=null;this.VQ=null;this.NG=null;this.gu=!1};X.SB.abo=function(x,Q,c,$){var z=x.x,j=x.y,U=[],i=-1,b=[];
for(var F=0;F<$.length;F++){var e=$[F],k=X.x5.YA(c,e),K=k[0],g=k[1],R=k[2],T=k[3];if(z<K-Q||R+Q<z||j<g-Q||T+Q<j)continue;
var D=[z<K+Q,j<g+Q,R-Q<z,T-Q<j],a=-1;for(var _=0;_<4;_++){if(D[_]&&D[_+1&3])a=1+2*(_&1);if(D[_])U.push(e,_)}if(a==-1){if(D[0]||D[2])a=0;
if(D[1]||D[3])a=2}if(a!=-1){i=a;b.push(e)}}var I=U.length;for(var F=0;F<I;F+=2){var e=U[F],f=U[F+1],y=X.x5.YA(c,e)[f];
for(var _=0;_<$.length;_++){var Z=$[_];if(b.indexOf(Z)!=-1)continue;var k=X.x5.YA(c,Z);if(k[f&1]==y)U.push(Z,f&1);
if(k[2+(f&1)]==y)U.push(Z,2+(f&1))}}U.push(i);return U};X.Rl=function(){X.U_.call(this,[10,44],X.aDZ,"tools/oselect");
this.bY="crosshair";this.aug=0};X.Rl.prototype=new X.U_;X.Rl.prototype.Nn=function(x,Q,c,$){if(Math.random()<1/(1+this.aug)){alert("The cross should be fully inside the object.",3500);
this.aug++}};X.Rl.prototype.G3=function(x,Q,c,$){X.v_.pN(x,X.U_.nO,this.iZ);if(!$.TZ||!this.sR)return;
var z=this.Pe(x,c,!1),j=z.m,U=z.e,i=z.x,b=z.y,e=z.x+j,k=z.y+U,K=i+j/2,g=b+U/2,R=X.Rl.a5G;x.N.LV={j:[i,b,e,b,e,k,i,k,K-j*R,g,K+j*R,g,K,g-U*R,K,g+U*R],G:"M L L L Z M L M L".split(" ")};
x.vu=!0};X.Rl.a5G=.12;X.Rl.prototype.zc=function(x,Q,c,$){x.N.LV=null;x.vu=!0;this.finish(x,Q,c,$)};
X.Rl.prototype.getSelection=function(x,Q,c,$){if(this.Tl.HM(this.Oq)||!this.sR)return null;var z=this.Pe(x,c,!1),j=x.B[x.g[0]];
if(z._6()||!z.dM(j.rect))return null;return X.U_.w7("ObSl",z)};X.v_=function(){X.x7.call(this,[10,37],X.Lr,"tools/qselect");
this.VJ="qselect"};X.v_.prototype=new X.x7;X.v_.prototype.Eu=function(x,Q,c,$,z){X.v_.pN(x,X.U_.nO,Q,!0);
this.nB(x,c,$,z,1);if(this.Vr==null)return;this.X4(x)};X.v_.prototype.CK=function(x,Q,c,$,z){this.iB(x,Q,c);
X.v_.pN(x,X.U_.nO,Q);if(this.sO)this.jB(x,c,z);if(this.Vr==null)return;if(!z.TZ)return;var j=this.QG(x,c,$,z);
if(j!=1)this.X4(x)};X.v_.pN=function(x,Q,c,$){if(x&&Q.key!=X.v_.wp(x)){Q.key=X.v_.wp(x);var z=x.B[x.g[0]].rect.P(),U="Image Analysis ...";
if(z==0)return;var j=z>1e6&&$!=!0,i=new jO(u.E.M,!0);i.data={d:u.H.Tb,xx:U};if(j)c.T(i);var b=function(){var k=X.v_.alH(x);
for(var K in k)Q[K]=k[K];var i=new jO(u.E.M,!0);i.data={d:u.H.MM,xx:U};if(j)c.T(i)};if($)b();else setTimeout(b,30)}};
X.v_.wp=function(x){var Q=x.g[0],c=x.B[Q],$=c.rect,z=$.m,j=$.e,U=z*j,i=c.buffer;return[Q,$.x,$.y,z,j,i[0],i[1],i[2],i[3]].join(",")};
X.v_.alH=function(x){var Q=x.g[0],c=x.B[Q],$=c.rect,z=$.m,j=$.e,U=z*j,i=c.buffer,b=Date.now(),e=d.R(U);
e.fill(128);var k=d.w9.ew(i,z,j);console.log(Date.now()-b);var K={key:X.v_.wp(x),Ij:i,rect:$.clone(),ww:z,R0:j,Ql:12,qa:e,UU:k,u:d.R(U),cA:null,pB:null,JQ:null};
X.v_.Fd(K,null,x);return K};X.v_.Fd=function(x,Q,c){var $=x.ww,z=x.R0,j=0,U=0,i=Date.now(),b=x.cA!=null&&d.w9.ZV(x.cA.AJ,x.cA.ui,x.qa)==-1;
j=Date.now()-i;i=Date.now();if(!b){var e=d.w9.ZV(x.UU.AJ,x.UU.ui,x.qa),k=0;while(e!=-1){var K=[],g=[],R=x.UU.AJ;
for(var T=0;T<z;T++)for(var D=0;D<$;D++){var F=T*$+D;if(R[F]==e){var a=x.qa[F];if(a==0)K.push(D,T);if(a==255)g.push(D,T)}}var _=c.B[c.g[0]],I=_.buffer;
d.w9.ew.TP(I,$,z,x.UU,K,g);e=d.w9.ZV(x.UU.AJ,x.UU.ui,x.qa);k++;if(k>=10){console.log("too many subdivisions");
break}}x.cA=d.w9.S8(x.UU,$,z,x.qa,x.Ql);x.pB=d.w9.axH(x.Ij,$,z,x.cA.AJ,x.cA.ui);x.JQ=[x.pB[0].slice(0),[]];
U=Date.now()-i;i=Date.now()}var i=Date.now();if(Q){x.JQ[0].set(x.pB[0]);var f=x.pB[1],y=x.JQ[1];for(var Z=0;
Z<f.length;Z++)y[Z]=f[Z].slice(0);d.w9.ao1(x.cA.AJ,$,z,x.cA.ui,x.qa,x.u,x.JQ)}};X.cj=function(){X.Ur.call(this,[10,50],X.TC,"tools/artb");
this.tz=null;this.MG=!1;this.B5=null;this.fS=!1;this.ajv=null;this.Tu=100;this._r=null;this.V9=0};X.cj.prototype=new X.Ur;
X.cj.prototype.To=function(x,Q,c,$,z){this.D0(c,x.afZ,Q,x.AW)};X.cj.aBP=function(x,Q){var c=x[0],$=0,z=0;
if(c==0)z=-1;else if(c==1)$=1;else if(c==2)z=1;else $=-1;return[20/Q.fi,x[1]+$*60/Q.fi,x[2]+z*60/Q.fi]};
X.cj.prototype.np=function(x,Q,c,$,z){this.tz=x.hF;this.V9=Date.now()};X.cj.prototype.gb=function(x,Q,c,$){if(c.Oj!=this.id)return;
if(x==null||x.g.length!=1){this.SJ(x);return}var z=x.g[0],j=x.B[z],U=j.add.artb;if(U==null){this.SJ(x);
return}if(this.fS)return;if(Date.now()-this.V9>50){this.tz={};var i=["artboardBackgroundType","Clr"];
for(var F=0;F<i.length;F++)if(U[i[F]])this.tz[i[F]]=JSON.parse(JSON.stringify(U[i[F]]));var b=new jO(u.E.M,!0);
b.data={d:u.H.gR,f:this.id,Zz:this.tz};Q.T(b)}var k=j.Dd(),K=d.A.Hg(k).j,g=this.B5=new aH(K,!0,!1,!1,!0,!1,3,!1);
g.Ex(x,c,!1);var R={j:[1,0],G:["M"]};for(var F=1;F<30;F++){var T=Math.PI*2*F/30;R.j.push(Math.cos(T),Math.sin(T));
R.G.push("L")}R.G.push("Z","M","L","M","L");R.j.push(-.5,0,.5,0,0,-.5,0,.5);var D=k.x+k.m/2,a=k.y+k.e/2,_=this.Tu*1.1,I=this.ajv=[D,k.y,k.x+k.m,a,D,k.y+k.e,k.x,a],f=[0,-_,_,0,0,_,-_,0],y=x.root.children;
x.N.sw=[];for(var F=0;F<4;F++){var Z=new bC(I[F*2]+f[F*2],I[F*2+1]+f[F*2+1]),v=!1;for(var G=0;G<y.length;
G++){var j=y[G].a;if(j.add.artb==null)continue;var k=j.Dd();if(k.Wl(Z))v=!0}if(v){I[F*2]=1e9;continue}x.N.sw.push([F,I[F*2],I[F*2+1]])}};
X.cj.prototype.disable=function(x,Q,c,$,z){this.SJ(x)};X.cj.prototype.SJ=function(x){if(this.B5){this.B5.clear(x);
this.B5=null;x.N.sw=null}};X.cj.prototype.Eu=function(x,Q,c,$,z){this.V9=Date.now();var j=x.Q.$X(z.x,z.y),U=this.B5;
if(U){var i=new jO(u.E.v),b=U.p7(null,j,x,z);if(b<9){this.fS=U.Eu(x,c,$,j,null,!0,z);return}else if(U.uc(j)){i.f=X.kU;
i.data={d:"disabAuto"};Q.T(i);var k=new jO(u.E.M);k.data={d:u.H.ax,f:X.kU,aqC:!0};Q.T(k);return}else{var K=-1,g=x.N.sw;
for(var F=0;F<g.length;F++){var R=X.cj.aBP(g[F],x.Q);if(bC.Xc(j,new bC(R[1],R[2]))<R[0])K=g[F][0]}if(K!=-1){var T=x.B[x.g[0]].Dd(),D=T.clone(),a=(K==0||K==2?T.e:T.m)+this.Tu;
if(K==0||K==3)a=-a;if(K==0||K==2)T.y+=a;else T.x+=a;if($.S(fM.Al)){var _=new gh(0,0,x.m,x.e);i.f=X.Mf;
i.data={d:eM.DN};Q.T(i);X.qV.vS(x,x.zi(null,x.g[0],null,!0),null,T.x-D.x,T.y-D.y);x.g=x.g.slice(x.g.length-1);
var I=X.r7.sA(x);if(I){var f=x.O2();f.data.oT=_;f.data.gq=I;f.data.z2=x.g}}else this.D0(x,T,Q);return}}}this._r=X.qV.Bw(x,j,c)};
X.cj.prototype.D0=function(x,Q,c,$){if($==null)$=0;var z=x.B.slice(0),j=[x.B.length+1],U=x.Xh();U.gF(ah.get([1,16,0])+" "+(x.add.artd==null?1:x.root.children.length+1));
U.add.lsct=hA.DJ;U.Zp(Q);if(this.tz){var i=U.add.artb,b=this.tz;for(var e in b)i[e]=b[e]}U.s3="pass";
U.H2=24;if($==0){if(x.add.artd||Q.y_(new gh(0,0,x.m,x.e))._6())z.push(x.x6());else z.unshift(x.x6())}else{var k=x.zi();
k.sort(function(D,a){return D-a});var K=X.de.Ag(x,k,z.length-1,!1,null,!1),g=K.pop(),R=K.pop();z=K.pop();
z.splice(x.B.length-k.length,0,x.x6())}z.push(U);var T=new jO(u.E.v);T.f=X.Mf;T.data={d:eM.ty,Yo:z,UI:j,LX:[1,16,2]};
c.T(T)};X.cj.prototype.CK=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y),U=this.B5,i=this._r;if(U){if(this.fS){U.CK(x,c,$,j)}else{var b=U.o7(j,x.Q.W,null,z);
if(b==null)b="default";var e=new jO(u.E.M,!0);e.data={d:u.H.aK,Wu:b};Q.T(e)}}if(i){var k=this.YA(x,j,$,c);
x.N.LV=d.A.Hg(k);x.vu=!0;X.Ur.fZ(z,k,x,c)}};X.cj.prototype.km=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y),U=this._r;
if(this.fS){this.B5.km(x,c,$,j);this.fS=!1;var i=d.A.cl(this.B5.hZ()),b=eM.YF(i),e=x.B[x.g[0]],k=JSON.parse(JSON.stringify(e.add.artb));
k.artboardRect.v=b;var K=new jO(u.E.v,!0);K.f=X.Mf;K.data={d:eM.MU,xz:k};Q.T(K)}if(U){var g=this.YA(x,j,$,c);
if(g.P()>20)this.D0(x,g,Q);x.N.LV=null;x.vu=!0;this._r=null;x.N.It=[]}};X.cj.prototype.YA=function(x,Q,c,$){var z=this._r,j=X.qV.Bw(x,Q,$),U=X.Rp.SN(z,j,c,!0);
z=U[0];j=U[1];return d.A.cl([z.x,z.y,j.x,j.y])};function aH(x,Q,c,$,z,j,U,i){this.oV=null;this.Sr=x?x.slice(0):null;
this.zf=1;this.og=4;this.Oq=null;this.OH=null;this.cW=null;this.$G=-1;this.IQ=null;this.ajf=!1;this.axz=[];
for(var F=0;F<8;F++)this.axz.push(ar.aau(0,PIMG.rotate,-.5,-.5,-45-F*45));this.ajg=Q;this.a25=c;this.akh=$;
this.a59=z;this.ajN=j;this.AW=U;this.auB=i==null?1:i}aH.prototype.awo=function(){return this.$G!=-1};
aH.prototype.hZ=function(){return this.Sr.slice(0)};aH.prototype.eA=function(x){this.Sr=x};aH.prototype.acT=function(){return this.bv(this.Sr)};
aH.prototype.ahS=function(){return this.og};aH.prototype.aso=function(x){this.og=x};aH.prototype.a5=function(x){if(x==null)x=this.Sr;
if(this.og==9)return this.Oq;else return this.bv(x)[this.og]};aH.prototype.aC1=function(x){if(this.og==9)this.Oq=x.clone();
else{var Q=this.a5(),c=new bI(1,0,0,1,x.x-Q.x,x.y-Q.y);d.A.i(this.Sr,c,this.Sr)}};aH.prototype.wC=function(x){this.zf=x};
aH.prototype.o7=function(x,Q,c,$,z){var j=this.Lo(null,x,Q,$),U;if(j==9)return"default";if(j==10){if(c)return null;
return!this.ajg?"move":null}if(j==-1||j==4)return null;if(j==11){var i=this.a5().HY(x);if(z==null)z=Math.atan2(i.y,i.x);
U=90-z*180/Math.PI;var b=Math.round(8*(U/360));b=(b+8)%8;return this.axz[b]}else{var e=this.gU(x,this.Sr);
U=[135,90,45,180,0,0,225,270,315][j]*Math.PI/180;var k=d.D.u_(this.Sr);return aH.a6y(k[0],k[3],U)}};
aH.a6y=function(x,Q,c){var $=Math.atan2(-Q,x);if(c)$+=c;var z="ew nesw ns nwse ew nesw ns nwse".split(" "),j=Math.round(8*($/(2*Math.PI)));
j=(j+8)%8;return z[j]+"-resize"};aH.prototype.gU=function(x,Q){var c=d.D.HQ(d.D.u_(Q)),$=new Float64Array(2);
d.D.YO(x.x,x.y,c,$);return new bC($[0],$[1])};aH.prototype.uc=function(x){var Q=this.gU(x,this.Sr);return 0<=Q.x&&Q.x<=1&&0<=Q.y&&Q.y<=1};
aH.prototype.Eu=function(x,Q,c,$,z,j,U,i){this.ajf=j;this.IQ=$;var b=x.Q.W,e;if(this.Sr==null)$=X.qV.Bw(x,$,Q);
this.cW=$.clone();if(this.Sr==null){if(i==null)i=0;var k=new bI;k.rotate(i);var K=k.RE(new bC(1,1));
this.cW.offset(K.x,K.y);var g=z==null?1:1/z,R=this.Sr=[0,0,1,0,1,g,0,g];k.translate($.x,$.y);d.A.i(this.Sr,k,this.Sr);
e=8}else{e=this.Lo(c,$,b,U);if(0<=e&&e<=8)this.cW=this.bv(this.Sr)[e];if(e==9){this.og=9;this.Oq=$.clone()}}this.oV=this.Sr.slice(0);
this.$G=e;this.Ex(x,Q);this.OH=this.a5();return e!=-1};aH.prototype.p7=function(x,Q,c,$){return this.Lo(x,Q,c.Q.W,$)};
aH.prototype.Lo=function(x,Q,c,$){var z=-1,j=this.bv(),U=[0,2,6,8,1,3,5,7],i=$?X.Ee({Q:{W:c}},$):8*X.q_()/c,b=bC.Xc(j[0],j[2]),e=bC.Xc(j[0],j[6]),k=this.gU(Q,this.Sr);
k.x*=b;k.y*=e;var K=new gh(0,0,b,e);K.ss(i,i);if(z==-1)if(bC.Xc(this.a5(),Q)<i)z=9;if(z==-1)for(var F=0;
F<U.length;F++)if(bC.Xc(j[U[F]],Q)<i)z=U[F];if(z==-1&&K.Wl(k)){if(Math.abs(k.y-0)<i)z=1;if(Math.abs(k.x-0)<i)z=3;
if(Math.abs(k.y-e)<i)z=7;if(Math.abs(k.x-b)<i)z=5}if(z==-1&&x&&x.S(fM.Al))z=9;if(z==-1||this.AW==4){if(this.uc(Q)){if(this.ajg)z=10}else{var g=[3,.85][i9];
K.ss(g*i,g*i);z=K.Wl(k)&&this.AW!=3?11:10}}return z};aH.prototype.CK=function(x,Q,c,$,z){if(this.$G==-1)return;
this.IQ=$;var j=c&&c.S(fM.FT),U=c&&c.S(fM.Al),i=c&&c.S(fM.qP),b=x.Q.W,e=this.cW,k=this.$G,K=this.bv(),g=X.qV.Bw(x,e,Q),R=X.qV.Bw(x,$,Q),T,D;
if(k==9){var K=this.bv(),a=-1;for(var F=0;F<K.length;F++)if(bC.Xc(K[F],R)*b<10)a=F;this.og=a==-1?9:a;
this.Oq=j?X._q.Lz(g,R):R.clone()}else if(k==10){D=d.A.pA(this.oV);var _=D.x,I=D.y;D.offset($.x-e.x,$.y-e.y);
if(this.a3E()){D.x=Math.round(D.x);D.y=Math.round(D.y)}T=X.qV.H1(x,D,Q);var f=new bI(1,0,0,1,D.x-_+T[0],D.y-I+T[1]);
d.A.i(this.oV,f,this.Sr)}else if(k==11){var y=this.a5(this.oV),Z=y.HY($),v=y.HY(e),G=Math.atan2(Z.y,Z.x),q=Math.atan2(v.y,v.x),f=new bI(1,0,0,1,-y.x,-y.y),h=Math.PI/12;
if(j)f.rotate(Math.round((q-G)/h)*h);else f.rotate(q-G);f.translate(y.x,y.y);d.A.i(this.oV,f,this.Sr)}else{var r=j,H;
if(z&&!i)r=!r;if(this.ajN)r=!0;var o=this.oV,P=k==0||k==2||k==6||k==8;if(this.AW==1){if(P)j=U=i=!0}else if(this.AW==2&&P&&this.ajf!=!0)i=!0;
if(this.AW==3)i=!1;else if(this.AW==5){j=i=!0}if(this.akh&&P&&i){var F=[0,0,2,0,0,0,6,0,4,0][k],O=-1,p=R.x,C=R.y;
if(j){var W=F+6&7,J=F+10&7,t=aH.acF(o[F],o[F+1],o[W],o[W+1],R.x,R.y),Y=aH.acF(o[F],o[F+1],o[J],o[J+1],R.x,R.y),l=t[2]<Y[2]?t:Y;
p=l[0];C=l[1];if(U)O=t[2]<Y[2]?W:J}else if(U)O=F+4&7;H=o.slice(0);if(O!=-1){var m=o[O],B=o[O+1],L=(o[F]+m)/2,A=(o[F+1]+B)/2;
H[O]=L-(p-L);H[O+1]=A-(C-A)}H[F]=p;H[F+1]=C}else if(P&&U){var y=this.OH,S=y.x,M=y.y,N=g.x-S,s=g.y-M,V=1,g8=1;
if(Math.abs(N)>=1)V=(R.x-S)/N;if(Math.abs(s)>=1)g8=(R.y-M)/s;if(r)V=g8=(V+g8)/2;var f=new bI;f.translate(-S,-M);
f.scale(V,g8);f.translate(S,M);H=o.slice(0);d.A.i(H,f,H)}else{if(this.a3E()){R.x=Math.round(R.x);R.y=Math.round(R.y)}var n=[0,1,2,5,8,7,6,3],cQ=n[(n.indexOf(k)+4)%8],hk=[];
for(var F=0;F<3;F++)for(var O=0;O<3;O++)hk.push(new bC(O/2,F/2));var y=this.OH,eG=this.gU(R,o),ie=this.gU(e,o),eN=U&&(this.og==4||this.og==9)?this.gU(y,o):hk[cQ],gr=new bI,ek=new bI,V=(eG.x-eN.x)/(ie.x-eN.x);
if(V==0)V=1e-4;var g8=(eG.y-eN.y)/(ie.y-eN.y);if(g8==0)g8=1e-4;if(this.a59){V=Math.max(V,0);g8=Math.max(g8,0)}if(k==0||k==2||k==6||k==8){if(r)gr.scale(V,V);
else gr.scale(V,g8)}if(k==1||k==3||k==5||k==7){var jK=r,iE=i&&j;if(iE)jK=!1;if(k==1||k==7)gr.scale(jK?g8:1,iE?1:g8);
else gr.scale(iE?1:V,jK?V:1);if(this.a25&&i){if(k==1||k==7)ek.dC=(eG.x-eN.x)/(eG.y-eN.y);else ek.J=(eG.y-eN.y)/(eG.x-eN.x)}}var f=new bI;
f.translate(-eN.x,-eN.y);f.concat(gr);f.concat(ek);f.translate(eN.x,eN.y);H=[0,0,1,0,1,1,0,1];d.A.i(H,f,H);
var l=d.D.u_(o);d.D.i(l,H)}if(aH.pM(H))this.Sr=H}this.Ex(x,Q);if(T)X.qV.ao(x,D,T)};aH.acF=function(x,Q,c,$,z,j){var U=c-x,i=$-Q,b=z-x,e=j-Q,k=U*U+i*i,K=b*U+e*i,g=K/k,R=x+g*U,T=Q+g*i,D=z-R,a=j-T;
return[R,T,Math.sqrt(D*D+a*a)]};aH.prototype.a3E=function(){var x=this.Sr;return Math.abs(x[1]-x[3])<1e-6&&Math.abs(x[2]-x[4])<1e-6||Math.abs(x[0]-x[2])<1e-6&&Math.abs(x[3]-x[5])<1e-6};
aH.pM=function(x){return d.A.afD(x)||d.A.afD([x[6],x[7],x[4],x[5],x[2],x[3],x[0],x[1]])};aH.prototype.km=function(x,Q,c,$){this.$G=-1;
this.IQ=null;x.N.zZ=null;x.N.It=[];x.vu=!0};aH.prototype.sM=function(x,Q,c){var $=c.um(x?x.Q.A6:0);if($.x||$.y){var z=new bI(1,0,0,1,$.x,$.y);
d.A.i(this.Sr,z,this.Sr);this.Ex(x,Q);return!0}return!1};aH.prototype.bv=function(x){if(x==null)x=this.Sr;
var Q=x[6]-x[0],c=x[7]-x[1],$=x[4]-x[2],z=x[5]-x[3],j=[x[0],x[1],x[2],x[3],x[0]+Q/2,x[1]+c/2,x[2]+$/2,x[3]+z/2,x[6],x[7],x[4],x[5]],U=[];
for(var F=0;F<3;F++){var i=F*4,b=j[i+0],e=j[i+1],k=j[i+2],K=j[i+3];U.push(new bC(b,e));U.push(new bC(b+(k-b)/2,e+(K-e)/2));
U.push(new bC(k,K))}return U};aH.prototype.Ex=function(x,Q,c){if(x.N==null)return;if(c==null)c=!1;var $=this.zf,z=this.bv(),j=z[0],U=z[2],i=z[6],b=z[8],e={G:[],j:[]};
if($==0)x.N.LV=e;else x.N.hJ=e;e.G.push("M","L","L","L","Z");e.j.push(j.x,j.y,U.x,U.y,b.x,b.y,i.x,i.y);
var k=this.auB;if(k>1){x.N.wV=JSON.parse(JSON.stringify(e));var K=U.HY(j),g=i.HY(j),R=b.HY(U),T=b.HY(i);
for(var F=1;F<k;F++){e.G.push("M","L","M","L");var D=F/k;e.j.push(j.x+K.x*D,j.y+K.y*D,i.x+T.x*D,i.y+T.y*D);
e.j.push(j.x+g.x*D,j.y+g.y*D,U.x+R.x*D,U.y+R.y*D)}}x.Q._u=new gh(0,0,bC.Xc(z[0],z[2]),bC.Xc(z[0],z[6]));
if(this.$G!=-1&&this.$G<9&&this.IQ){var a=x.Q.wu(this.IQ.x,this.IQ.y);X.Ur.fZ(a,x.Q._u,x,Q)}if(!c){var _=[];
if($==0)x.N.SE=_;else x.N.ai=_;for(var F=0;F<z.length;F++)if(F!=4)_.push(z[F].x,z[F].y);var I=this.a5();
_.push(I.x,I.y)}x.vu=!0};aH.prototype.clear=function(x){x.Q._u=null;x.N.zZ=null;x.N.LV=null;x.N.hJ=null;
x.N.wV=null;x.N.SE=[];x.N.ai=[];x.vu=!0};function hI(x){this.fr=null;this.$G=-1;this.hv=null;this.azB=null;
this.Uv=null;this.C0=-1;this.a1p=null;this.a7E(x)}hI.prototype.yw=function(){return JSON.parse(JSON.stringify(this.fr))};
hI.prototype.a7E=function(x){this.fr=JSON.parse(JSON.stringify(x))};hI.prototype.aAO=function(x){this.C0=x};
hI.prototype.uc=function(x){return!0};hI.prototype.o7=function(x,Q,c,$){var z=this.Lo(x,Q,$);if(z==-1)return"default";
return"pointer"};hI.prototype.Eu=function(x,Q,c,$,z,j,U){if(this.C0!=-1)return!0;this.$G=this.Lo($,x.Q.W,U);
var i=d.fr.ES(this.fr),b=d.uE.da(i,$),e=0<b[0]&&b[0]<1&&0<b[1]&&b[1]<1;this.hv=e?b:null;this.azB=JSON.stringify(i);
this.a1p=JSON.stringify(this.fr);this.Uv=$;return this.$G!=-1||e};hI.prototype.Lo=function(x,Q,c){var $=c?X.Ee({Q:{W:Q}},c)*2:20*X.q_()/Q,z=this.fr,j=hI.atK(z),U=-1;
if(j){U=d.A.b2(j,x.x,x.y,$);if(U!=-1)U+=1e6}else{var i=d.fr.ES(z);U=d.A.b2(i[3],x.x,x.y,$);if(U!=-1&&this.Qt(i,U)==null)U=-1}return U};
hI.prototype.CK=function(x,Q,c,$){if(this.C0!=-1)return;var z=this.fr,j=this.$G,U=this.hv,i=JSON.parse(this.azB),b=i[0],e=i[1],k=i[3];
if(j>=1e6){var K=z.warpStyle.v.warpStyle,g=d.fr.Pe(z);if(K=="warpCylinder"){this.fr=z=JSON.parse(this.a1p);
var R=X.Y.e3(z.warpValues),T=(R[2]-R[0])/(R[1]-R[3]),D=R[4]*T*g.e,a=R[5]*T*g.e,_=$.x-this.Uv.x,I=$.y-this.Uv.y;
R[0]=g.x;R[1]=g.y+g.e;R[2]=g.x+g.m;R[3]=g.y;j-=1e6;if(j==0){R[0]+=_;R[1]+=I}if(j==1){R[2]+=_;R[3]+=I}if(j==2){D+=2*I;
a+=2*I}if(j==3){a+=2*I}if(j==4){R[6]=Math.max(0,Math.min(1,R[6]-2*_/g.m))}var f=d.A.pA(R.slice(0,4)),y=f.m/g.m,Z=f.e/g.e;
R[4]=D/f.m;R[5]=a/f.m;z.warpValues=X.Y.TD(R);var v=new bI;v.translate(-g.x,-g.y);v.scale(y,Z);v.translate(f.x,f.y);
if(j<4)return v}else{var G=z.warpRotate.v.Ornt,q=G=="Vrtc",h=d.fr.a21[K],r=q?-$.x/g.m:-$.y/g.e;r+=h[1];
if(h[1]>.5)r=-r;r/=h[2];var y=g.m/g.e;if(q)y=1/y;if(h[3])r/=y;z.warpValue.v=100*Math.max(-1,Math.min(1,r))}}else if(j!=-1){var H=[j],_=$.x-k[j*2],I=$.y-k[j*2+1];
if(b*e>16){var o=this.Qt(i,j);if(o[0]==0){var P=Math.floor(j/b),O=j-P*b;if(O>0)H.push(j-1);if(O<b-1)H.push(j+1);
if(P>0)H.push(j-b);if(P<e-1)H.push(j+b)}}for(var F=0;F<H.length;F++){k[H[F]*2]+=_;k[H[F]*2+1]+=I}d.fr.TE(z,i)}else if(U){d.uE.a49(i,U[0],U[1],$.x-this.Uv.x,$.y-this.Uv.y);
d.fr.TE(z,i)}};hI.prototype.km=function(x,Q,c,$){var z=this.C0;this.hv=null;this.C0=-1;if(z!=-1){var j=d.fr.ES(this.fr),U=d.uE.da(j,$);
if(z==0||z==1)d.uE.split(j,0,U[0]);if(z==0||z==2)d.uE.split(j,1,U[1]);d.fr.TE(this.fr,j)}x.vu=!0;return z!=-1};
hI.prototype.sM=function(x,Q,c){var $=c.um();if($.x||$.y){var z=new bI(1,0,0,1,$.x,$.y);d.A.i(this.Sr,z,this.Sr);
this.Ex(x)}};hI.prototype.Qt=function(x,F){var Q=x[0],c=x[1],$=this.$G,z=Math.floor($/Q),j=$-z*Q,U=$%3,i=$%3,b=U==0&&i==0,z=Math.floor(F/Q),j=F-z*Q,U=j%3,i=z%3;
if(U!=0&&i!=0)return null;if(U==0&&i==0)return[0];else{var e=0;if(i==0)e=U==1?F-1:F+1;if(U==0)e=i==1?F-Q:F+Q;
if(Q*c>16){var k=$==F||$==F+1||$==F-1||$==F+Q||$==F-Q;if(b&&(k||$==F+2||$==F-2||$==F+2*Q||$==F-2*Q)){}else if(!b&&k){}else return null}return[1,e]}};
hI.atK=function(x,Q){var Q=x.warpStyle.v.warpStyle,$;if(Q=="warpCustom"||Q=="warpNone")return null;var c=d.fr.ES(x);
if(Q=="warpCylinder"){var z=x.warpValues.v;$=[0,1,1,0,.5,0,.5,1,.75-.25*z[6].v,.5]}else{var j=x.warpRotate.v.Ornt,U=d.fr.a21[Q];
$=j=="Hrzn"?[U[0],U[1]]:[U[1],U[0]]}d.uE.i(c,$,new gh(0,0,1,1));return $};hI.prototype.Ex=function(x,Q){var c=this.fr,$=c.warpStyle.v.warpStyle,z=d.fr.ES(c),j=z[0],U=z[1],i=z[3],b=x.N.hJ={G:[],j:[]},e=x.N.ai=[],k=x.N.AB=[],K=this.$G;
if($=="warpCustom")for(var g=0;g<U;g++)for(var R=0;R<j;R++){var F=g*j+R,T=this.Qt(z,F);if(T==null)continue;
var D=i[2*F],a=i[2*F+1],_=k;if(T[0]==0)_=F==K&&j*U>16?k:e;else{var I=T[1];b.G.push("M","L");b.j.push(D,a,i[2*I],i[2*I+1])}_.push(D,a)}else{var f=hI.atK(c);
if(f)for(var F=0;F<f.length;F++)e.push(f[F])}for(var g=0;g+1<U;g+=3)for(var R=0;R+1<j;R+=3){b.G.push("M","C","C","C","C");
var F=g*j+R,y=F+j+j,Z=[F,F+1,F+2,F+3,F+j+3,y+3,y+j+3,y+j+2,y+j+1,y+j,y,F+j,F];for(var F=0;F<Z.length;
F++){var D=i[Z[F]*2],a=i[Z[F]*2+1];b.j.push(D,a)}}var v=[],G=[];function q(h,R,o){for(var Z=0;Z<=o;Z++){G.push(Z==0?"M":"L");
if(h==0)v.push(R,Z/o);else v.push(Z/o,R)}}if(Q)Q=d.uE.da(z,Q);for(var h=0;h<2;h++){var r=z[2][h],H=h==0?j:U,o=H*5;
for(var P=1;P<H;P++){var O=Math.floor((P-1)/3),p=P-(1+O*3);if(p==0)continue;var R=r[O]+p/3*(r[O+1]-r[O]);
q(h,R,o)}var C=this.C0;if(Q&&C!=-1&&(C==0||C-1==h))q(h,Q[h],o)}d.uE.i(z,v,new gh(0,0,1,1));d.A.concat(b,{j:v,G:G});
x.vu=!0};hI.prototype.clear=function(x){x.N.hJ=null;x.N.ai=[];x.N.AB=[];x.vu=!0};function ak(){this.FZ=!1;
this.iQ=!1;this.acX=!1;this.at8=!1;this.pL=!1;this.Vu=!1;this.si=0;this.iH=0}ak.prototype.Eu=function(x){this.FZ=!0;
this.iQ=!1;this.pL=x.S(fM.FT);this.Vu=x.S(fM.Al);this.si=this.pL?0:1;this.iH=this.Vu?0:1};ak.prototype.sM=function(x){var Q=this.at8=x.S(fM.FT),c=this.acX=x.S(fM.Al);
if(this.iQ){if(this.si==0&&!Q)this.si++;if(this.si==1&&Q)this.si++;if(this.iH==0&&!c)this.iH++;if(this.iH==1&&c)this.iH++}};
ak.prototype.CK=function(){this.iQ=!0};ak.prototype.km=function(){this.FZ=!1};ak.prototype.gW=function(F){if(F==0)return this.FZ?this.Vu:this.acX;
if(F==1)return this.iQ?this.iH==2:!1};ak.prototype.zx=function(F){if(F==0)return this.FZ?this.pL:this.at8;
if(F==1)return this.iQ?this.si==2:!1};X.History=function(){X.Ur.call(this,"History",X.RZ);this.a2=!0;
this.avZ=0};X.History.prototype=new X.Ur;X.History.prototype.To=function(x,Q,c,$){c.Fq=!0;if(x.d=="h_itemchange"){if(x.index<c.FS)for(var F=c.FS;
F>x.index;F--)this._e(c);if(x.index>c.FS)for(var F=c.FS;F<x.index;F++)this.uW(c)}if(x.d=="h_stepfwd")this.uW(c);
if(x.d=="h_stepbck")this._e(c);if(x.d=="h_undoredo"){var z=this.a2||this.avZ!=c.FS;if(z){this._e(c);
z=!1}else{this.uW(c);z=!0}this.a2=z;this.avZ=c.FS}if(x.d=="h_clear"){if(x.force==null)if(!window.confirm("Do you really want to clear all states in History? You won't be able to undo it."))return;
c.history=[new dg([1,0],null)];c.FS=0}else this.a2=!0};X.History.prototype._e=function(x){if(x.FS==0)return;
var Q=x.history[x.FS];Q.f.pC(Q.data,x);x.FS--};X.History.prototype.uW=function(x){if(x.FS==x.history.length-1)return;
var Q=x.history[x.FS+1];Q.f.Tz(Q.data,x);x.FS++};X.de=function(){X.Ur.call(this,"Layers",X.Mf);this.iZ=null};
X.de.prototype=new X.Ur;X.de.prototype.To=function(x,Q,c,$,z){this.iZ=Q;var j=x.d,U=x.a!=null?x.a:c.g.length!=0?c.g[0]:c.B.length-1,i=c.B[U];
c.tP=!0;var b=$.S(fM.Al),e=$.S(fM.FT),k=$.S(fM.qP);if(j==eM.ly&&c.u==null&&(c.g.length>1||!c.hS(!1)))j=eM.DN;
if(j==eM.BT){var K=new dg([6,33],this),g=i.Uy()?["pass"].concat(cq.X$):cq.X$,R=g[x.j7],T=x.a!=null?[x.a]:c.g,D=JSON.stringify(T),a=[];
for(var F=0;F<T.length;F++)a.push(c.B[T[F]].s3);K.data={d:j,PG:D,Q6:a,j7:R};c.kp(K);this.Tz(K.data,c);
this.track(ep.QF("Md",{t:"enum",v:{BlnM:cq.DU(R)}}))}if(j==eM.ML){var K,_=c.O2(),T=x.a!=null?[x.a]:c.g,D=JSON.stringify(T);
if(_&&_.data&&_.data.d==j&&_.data.PG==D)K=_;else{var I=ep.QF("Opct",{t:"UntF",v:{type:"#Prc",val:0}});
this.track(I);var a=[];for(var F=0;F<T.length;F++)a.push(c.B[T[F]].opacity);K=new dg([6,32],this);K.data={d:j,PG:D,Q6:a,j7:x.j7,s0:I.dx};
c.kp(K)}K.data.j7=x.j7;K.data.s0.T.v.Opct.v.val=Math.round(x.j7*100/255);this.Tz(K.data,c)}if(j==eM.tZ){if(i.add.iOpa==null)i.add.iOpa=255;
var K,_=c.O2();if(_&&_.data&&_.data.d==j&&_.data.a==U)K=_;else{K=new dg("Fill Opacity Change",this);
K.data={d:j,a:U,Q6:i.add.iOpa,j7:x.j7};c.kp(K)}K.data.j7=x.j7;this.Tz(K.data,c)}if(j==eM.HC){var f=x.j7,y=x.a!=null?[x.a]:c.g.slice(0),Z=[],v=[],K;
for(var G=0;G<y.length;G++){var q=c.B[y[G]];if(q.add.lspf==null)q.add.lspf=0;var a=q.add.lspf,R=a;for(var F=0;
F<f[0].length;F++){var h=f[1][F],r=1<<h;if((R&r)==0&&f[0][F])R^=r;else if((R&r)!=0&&!f[0][F])R^=r}Z.push(a);
v.push(R)}var _=c.O2(),T=JSON.stringify(y);if(_&&_.data&&_.data.d==j&&JSON.stringify(_.data.PG)==T){K=_;
K.data.j7=v}else{var K=new dg([6,57,1],this);K.data={d:j,PG:T,Q6:Z,j7:v};c.kp(K)}this.Tz(K.data,c)}if(j==eM._$){var H="----",o=x.W8,R=null;
for(var F=0;F<jY.mB.KV.length;F++)if(i.add[jY.mB.KV[F]])H=jY.mB.KV[F];var P=i.add[H];if(o=="TySh")R=dU.Y7(50,50,z._M);
var K=new dg("Layer Type",this);K.data={d:j,a:U,amT:[H,P],W8:[o,R]};c.kp(K);this.Tz(K.data,c)}if(j==eM.Ul){var y=[];
if(b){var O=c.O2(),p=O?O.data:null;if(O!=null&&O.f==this&&p.d==eM.Ul&&p.PG.length!=1){var C=new jO(u.E.v);
C.f=X.RZ;C.data={d:"h_stepbck"};Q.T(C);if(p.a==U)return}var W=c.root.FV(U),J=W,t=[x.a];while(J.parent!=c.root){t.push(J.parent.index);
J=J.parent}for(var F=0;F<c.B.length;F++){var Y=c.B[F],J=c.root.FV(F),l=t.indexOf(F)!=-1?!0:Y.M5()&&W.depth<J.depth;
if(l!=Y.M5())y.push(F)}}else if(x.PG)y=x.PG;else{y.push(U);var m=c.B[U].M5(),I={q4:m?"hide":"show",dx:{classID:m?"Hd":"Shw",null:{t:"VlLs",v:[ep.QP("Lyr",!0)]}}};
this.track(I)}var K=new dg("Layer visibility",this,!0);K.data={d:j,PG:y,a:U};c.kp(K);this.Tz(K.data,c)}if(j==eM.zp){if(z.Oj==X.TC){var B=new jO(u.E.M);
B.data={d:u.H.ax,f:X.kU};Q.T(B)}var L=x.a1_,A=x.eN,N,escape=!1,s=!1;if(x.EE){if(k&&(A==0||A==1||A==2)){var S=0;
if(e)S++;if(b)S+=2;var M=new jO(u.E.v,!0);M.f=X.kJ;M.data={d:"fromlayer",b3:[x.a,A,S]};Q.T(M);return}}var I={q4:"select",dx:{classID:"null",MkVs:{t:"bool",v:!1}}};
c.asc();if($.S(fM.qP)||x.wy==0){var V=c.g.indexOf(U);if(V==-1)c.g.push(U);else if(c.g.length>1){if(x.wy!=0)c.g.splice(V,1)}c.g.sort(function(K,iC){return K-iC});
I.dx.selectionModifier={t:"enum",v:{selectionModifierType:"addToSelection"}};N=U}else if(e&&!b&&A>0){j=A==1?eM.wr:A==2?eM.TK:eM.mS;
escape=!0}else if((e||x.wy==1)&&c.g.length>0){var g8=Math.min(U,c.g[0]),n=Math.max(U,c.g[c.g.length-1]);
c.g=[];for(var F=g8;F<=n;F++)if(c.B[F].add.lsct!=hA.oA)c.g.push(F);I.dx.selectionModifier={t:"enum",v:{selectionModifierType:"addToSelectionContinuous"}};
N=U}else{N=U;if(U>=c.B.length)return;var Y=c.B[U];if(Y&&Y.Uy()&&x.ayP)Y.add.lsct=hA.DJ;else if(c.g.length==1&&c.g[0]==U&&Math.max(0,A)==Y.kk){s=!0;
c.tP=!1}if(!s){c.g=[U];c.la()}}if(!s){if(N!=null&&N<c.B.length){I.dx.null={t:"obj ",v:[{t:"name",v:{classID:"Lyr",val:c.B[N].getName()}}]},this.track(I)}if(!escape){console.log("no escape");
if(c.g.length==1){var cQ=c.g[0];for(var F=0;F<c.B.length;F++){if(F==cQ)continue;var q=c.B[F];q.kk=0;
q.Et=!1}var i=c.B[cQ];if(A==2){i.Et=!i.Et;c.IH=[]}else if(i){i.kk=A<=0?0:A}}else for(var F=0;F<c.B.length;
F++){var q=c.B[F];q.kk=0;q.Et=!1}c.ZQ=null;c.Fq=!0}}if(x.EE&&b){if((A==1||A==3)&&L!=null){var M=new jO(u.E.v,!0);
M.f=X.QT;M.data={d:"mskView",b:L!=0?0:e?1:2};Q.T(M)}else{this.To({d:eM.DF,a:x.a},Q,c,$,z)}}}if(j==eM.wr||j==eM.mS){var hk=j==eM.wr,eG=hk?i.Rz():i.U5(c).F;
if(eG==null)return;var K=new dg(eG.isEnabled?hk?[6,15]:[6,42]:hk?[6,14]:[6,41],this);K.data={d:j,a:U};
c.kp(K);this.Tz(K.data,c)}if(j==eM.TK){var eG=i.add.vmsk;if(eG==null)return;var K=new dg(eG.isEnabled?[6,17]:[6,16],this);
K.data={d:j,a:U};c.kp(K);this.Tz(K.data,c)}if(j==eM.a0A){var ie=i.add.lsct==hA.DJ?hA.H3:hA.DJ,J=c.root.FV(c.B.indexOf(i)),ek=!1;
if($.S(fM.qP)){var eN=J.parent;for(var F=0;F<eN.children.length;F++){var gr=eN.children[F].a;if(gr.Uy())gr.add.lsct=ie}}else i.add.lsct=ie;
for(var F=0;F<c.g.length;F++){var jK=c.g[F];if(J.G5<jK&&jK<J.index)ek=!0}if(ek)c.g=[J.index];c.Fq=!0}if(j==eM.DF){if(!c.XR(U))return;
var K=new dg(i.cG?[6,19]:[6,18],this);K.data={d:j,a:U};c.kp(K);if(x.j7==null||x.j7!=i.cG)this.Tz(K.data,c)}if(j==eM.awR){if(i.lo())i.H2-=32;
else i.H2+=32;c.Fq=!0}if(j==eM.sJ||j==eM.l9){var K;if(j==eM.sJ)K=new dg(i.add.lmfx.masterFXSwitch.v?[6,30,0]:[6,29],this);
if(j==eM.l9)K=new dg(i.add.SoLd.filterFX.v.enab.v?[6,44]:[6,43],this);K.data={d:j,a:U};c.kp(K);this.Tz(K.data,c)}if(j==eM.IB||j==eM.z6){var cQ=x.index,K;
if(j==eM.IB)K=new dg(i.add.lmfx[aF.mh[cQ[0]]].v[cQ[1]].v.enab.v?[6,30,0]:[6,29],this);if(j==eM.z6)K=new dg(i.add.SoLd.filterFX.v.filterFXList.v[cQ].v.enab.v?[6,44]:[6,43],this);
K.data={d:j,a:U,index:x.index};c.kp(K);this.Tz(K.data,c)}if(j==eM.E1){if(x.src==x.qC)return;var iE=c.B[x.src],e9=c.B[x.qC],dm=iE.add.lmfx?JSON.stringify(iE.add.lmfx):"",kD=e9.add.lmfx?JSON.stringify(e9.add.lmfx):"";
if(e9.add.lmfx==null){e9.add.lmfx=JSON.parse(aF.default);for(var F=0;F<aF.order.length;F++)e9.add.lmfx[aF.mh[F]]={t:"VlLs",v:[]}}if(x.Pa==null){e9.add.lmfx=JSON.parse(dm);
if(!b)delete iE.add.lmfx}else{var gJ=x.Pa[0],dR=aF.mh[gJ];if(aF.atS.indexOf(aF.order[gJ])==-1)e9.add.lmfx[dR].v=[];
e9.add.lmfx[dR].v.push(iE.add.lmfx[dR].v[x.Pa[1]]);if(!b)iE.add.lmfx[dR].v.splice(x.Pa[1],1)}var fO=iE.add.lmfx?JSON.stringify(iE.add.lmfx):"",ko=e9.add.lmfx?JSON.stringify(e9.add.lmfx):"";
if(!e9.lo())e9.H2+=32;var K=new dg("Move Layer Styles",this);K.data={d:j,rE:x.src,gc:x.qC,aem:dm,aat:kD,ab5:fO,a8o:ko};
c.kp(K);this.Tz(K.data,c)}if(j==eM.nq){if(x.src!=null)U=x.src;var q=c.B[U],d8=JSON.stringify(q.add.SoLd),fj=JSON.parse(d8),ja=fj.filterFX.v.filterFXList.v;
ja.splice(x.Pa,1);var K=new dg([6,53],this);K.data={d:eM.JY,$q:[{nL:U,hN:[d8,JSON.stringify(fj)]}]};
c.kp(K);this.Tz(K.data,c)}if(j==eM.aw8){var eD=b,iE=c.B[x.src],e9=c.B[x.qC],d3=[];if(iE!=e9&&e9.add.SoLd==null){alert("Target layer is not a smart object!");
return}if(iE==e9&&!eD&&x.Pa==x.m4)return;if(iE==e9&&x.Pa==-1)return;var fP=iE.U5(c),d8=JSON.stringify(iE.add.SoLd),fj=JSON.parse(d8),ja=fj.filterFX.v.filterFXList.v;
if(iE==e9){ja.splice(x.m4,0,ja[x.Pa]);if(!eD)ja.splice(x.Pa+(x.Pa<x.m4?0:1),1);d3.push({nL:x.src,hN:[d8,JSON.stringify(fj)]})}else if(x.Pa==-1){var jE=fj.filterFX;
if(!eD){delete fj.filterFX;d3.push({nL:x.src,hN:[d8,JSON.stringify(fj)],lt:[fP,null]})}var cR=e9.Oz()?e9.U5(c):null,ex=hf.ain(fP),er=JSON.stringify(e9.add.SoLd),cE=JSON.parse(er);
cE.placed.v=ex.id;cE.filterFX=jE;d3.push({nL:x.qC,hN:[er,JSON.stringify(cE)],lt:[cR,ex]})}else{var a7=ja[x.Pa];
if(!eD){ja.splice(x.Pa,1);d3.push({nL:x.src,hN:[d8,JSON.stringify(fj)]})}var er=JSON.stringify(e9.add.SoLd),cE=JSON.parse(er);
if(cE.filterFX==null)cE.filterFX=fK.xO();var dl=cE.filterFX.v.filterFXList.v;dl.splice(x.m4,0,a7);var hl={nL:x.qC,hN:[er,JSON.stringify(cE)]};
if(!e9.Oz()){var ex=hf.aov(e9.add.SoLd.placed.v);hl.lt=[null,ex]}d3.push(hl)}var K=new dg([6,52],this);
K.data={d:eM.JY,$q:d3};c.kp(K);this.Tz(K.data,c)}if(j==eM.$R){var eG=i.Rz(),K=new dg(eG.uz?[6,26]:[6,25],this);
K.data={d:j,a:U};c.kp(K);this.Tz(K.data,c);this.track({q4:"set",dx:{classID:"setd",null:{t:"obj ",v:[ep.QP("Lyr",!0)]},T:{t:"Objc",v:{classID:"Lyr",Usrs:{t:"bool",v:eG.uz}}}}})}if(j==eM.YL){var eG=i.add.vmsk,K=new dg(eG.uz?[6,28]:[6,27],this);
K.data={d:j,a:U};c.kp(K);this.Tz(K.data,c)}if(j==eM.gh){var K=new dg("Variables / Datasets",this),f4=JSON.stringify([c.vB,c.x8]);
if(f4==x.b)return;K.data={d:j,a47:f4,al3:x.b};c.kp(K);this.Tz(K.data,c)}if(j==eM.on){var em=[],K;for(var F=0;
F<c.g.length;F++){var G=c.g[F],Y=c.B[G];if(Y.add.vogk)em.push(G,JSON.stringify(Y.add.vogk))}for(var F=0;
F<c.IH.length;F++){var G=c.IH[F],Y=c.iL[G];if(Y.add.vogk)em.push(-1-G,JSON.stringify(Y.add.vogk))}d.eV.a8$(c,x.b,x.ai$);
var e$=[];for(var F=0;F<c.g.length;F++){var G=c.g[F],Y=c.B[G];if(Y.add.vogk)e$.push(G,JSON.stringify(Y.add.vogk))}for(var F=0;
F<c.IH.length;F++){var G=c.IH[F],Y=c.iL[G];if(Y.add.vogk)e$.push(-1-G,JSON.stringify(Y.add.vogk))}var _=c.O2();
if(_&&_.data&&_.data.d==j){var iP=!0;for(var F=0;F<em.length;F+=2)if(em[F]!=_.data.n3[F])iP=!1;if(iP){K=_;
K.data.WC=e$}}if(K==null){var K=new dg([12,91,1],this);K.data={d:j,n3:em,WC:e$};c.kp(K)}this.Tz(K.data,c)}if(j==eM.MU){var b2=JSON.stringify(i.add.artb),k7=JSON.stringify(x.xz),K;
c.B[U].add.artb=JSON.parse(k7);var at=new gh(0,0,c.m,c.e),ju=X.r7.OZ(c),_=c.O2();if(_&&_.data&&_.data.d==j&&_.data.a==U){K=_;
K.data.xz=k7}if(K==null){var K=new dg("Editing Artboard",this);K.data={d:j,a:U,ars:b2,xz:k7,oT:at};c.kp(K)}K.data.gq=ju;
this.Tz(K.data,c)}if(j==eM.Rd){var e$=c.fG.slice(0),jL=c.oW.slice(0),fJ=c.u,h6=c.u,l=c.Q.O.slice(0);
if(x.Zq=="seltochannel"){var iq=x.b3[0],iI=e$[iq]=e$[iq].clone(),J=d.NE.B2(c.u,iI,x.b3[1]);iI.channel=J.channel;
iI.rect=J.rect}if(x.Zq=="fromAction"){var dM=x.b.q4,ik=x.b.dx;if(dM=="make"||dM=="duplicate"){var jp=e$.length,k8=!1,ay=!1;
if(c.HI())jp--;var eA=new eM.zM;eA.name="Alpha "+(jp+1);if(dM=="make"){var bK=ik.Nw.v;eA.color=0;jL=[jp];
eA.fd=!0;eA.Fr=bK.Opct.v;if(bK.Nm)eA.name=bK.Nm.v;if(bK.classID=="SCch"){k8=!0;h6=null;eA.Iz=1}for(var F=0;
F<c.fG.length;F++)c.fG[F].fd=!1;l=[0,0,0]}else{var Y=c.B[c.g[0]],a4=Y.kk==1?Y.Rz():Y.kk==3?Y.U5(c).F:null,h_=ik.null.v[0].v;
if(ik.Nm)eA.name=ik.Nm.v;if(h_.keyID=="fsel")k8=!0;else if(a4){eA.channel=a4.channel.slice(0);eA.rect=a4.rect.clone();
eA.color=a4.color}else{var bj=X.U_.aya(c);h6=X.U_.a8f(c,bj);eA.color=0;eA.rect=h6.rect;eA.channel=h6.channel}}if(k8){eA.color=0;
if(c.u){eA.rect=c.u.rect.clone();eA.channel=c.u.channel.slice(0)}if(ay){eA.color=255-eA.color;d.HQ(eA.channel)}}e$.splice(jp,0,eA)}else if(dM=="delete"){if(i&&i.Rz()&&i.kk==1){this.To({d:eM.zb},Q,c,$,z);
return}var gs=c.oW;gs.sort(function(K,iC){return iC-K});if(gs.length==0)return;for(var F=0;F<gs.length;
F++)e$.splice(gs[F],1);jL=[];l=[1,1,1]}else if(dM=="show"||dM=="hide"){var bs=ik.null.v,e3=null,jA=!1;
for(var F=0;F<bs.length;F++){var kn=bs[F].v[0].v,j6=kn.enum;if(j6=="Trgt"){if(e$[jL[0]]==null)continue;
e$[jL[0]]=e$[jL[0]].clone();e$[jL[0]].fd=dM=="show";jA=!0}else{var iq=["Rd","Grn","Bl"].indexOf(j6);
if(e3==null)e3=c.Q.O.slice(0);e3[iq]=dM=="show"?1:0}}if(e3){var C=new jO(u.E.v,!0);C.f=X.Oi;C.data={d:"setcls",O:e3};
Q.T(C);if(!jA)return}}}if(x.Zq=="rnm"){e$[x.xR]=e$[x.xR].clone();e$[x.xR].name=x.name}var K=new dg("Channel Edit",this);
K.data={d:j,n3:c.fG.slice(0),dh:c.oW.slice(0),WC:e$,z0:jL,Cj:fJ,UI:h6,agY:c.Q.O.slice(0),ap9:l};this.Tz(K.data,c);
c.kp(K)}if(j==eM.ty){var cL=new gh(0,0,c.m,c.e),K=new dg(x.LX,this);K.data={d:eM.ty,GF:c.B.slice(0),Yo:x.Yo,xa:c.g.slice(0),z2:x.UI};
c.kp(K);this.Tz(K.data,c);var eb=X.r7.sA(c);if(eb){K.data.oT=cL;K.data.gq=eb}}if(j==eM.bU){var dY=c.zi(null,x.a),ks=1e10;
if(dY.length==0)return;if(c.B.length==dY.length){alert("Project must have at least 1 layer");return}var aP=[];
for(var F=0;F<c.B.length;F++)if(dY.indexOf(F)==-1)aP.push(c.B[F]);for(var F=0;F<dY.length;F++)ks=Math.min(ks,dY[F]);
ks=Math.max(ks-1,0);while(aP[ks].name=="</Layer group>")ks++;this.track({q4:"delete",dx:{classID:"Dlt",null:ep.QP("Lyr",!0)}});
var at=new gh(0,0,c.m,c.e),K=new dg([6,31],this);K.data={d:eM.ty,GF:c.B.slice(0),Yo:aP,xa:c.g.slice(0),z2:[ks]};
c.kp(K);this.Tz(K.data,c);var ju=X.r7.OZ(c);if(ju){K.data.gq=ju;K.data.oT=at;X.r7.sA(c)}}if(j==eM.wN){if(!$.S(fM.FT))return;
var K=new dg("Switch Layer Link",this);K.data={d:j,a:x.a};c.kp(K);this.Tz(K.data,c)}if(j==eM.v6){var gs=x.av3?x.av3:c.g,jC=0,eB=!1;
if(gs.length==0)return;if(gs.length==1&&c.B[gs[0]].to==0){alert(ah.get([15,7,5]));return}var ig=[];for(var F=0;
F<c.B.length;F++){var cD=c.B[F].to;ig.push(cD);jC=Math.max(jC,cD)}var c1=-1,dq=-1;for(var F=0;F<gs.length;
F++){var cD=c.B[gs[F]].to;if(cD==0)eB=!0;else if(c1==-1||c1==cD)c1=cD;else dq=cD}if(!eB)for(var F=0;
F<gs.length;F++)c.B[gs[F]].to=0;else if(c1!=-1&&dq==-1)for(var F=0;F<gs.length;F++)c.B[gs[F]].to=c1;
else for(var F=0;F<gs.length;F++)c.B[gs[F]].to=jC+1;var b$=[];for(var F=0;F<c.B.length;F++){var cD=c.B[F].to;
if(b$[cD]==null)b$[cD]=0;b$[cD]++}for(var F=0;F<c.B.length;F++){var cD=c.B[F].to;if(b$[cD]==1)c.B[F].to=0}var d7=ig;
ig=[];for(var F=0;F<c.B.length;F++){var cD=c.B[F].to;ig.push(cD);jC=Math.max(jC,cD)}var K=new dg(eB?[6,54,0]:[6,54,1],this);
K.data={d:eM.v6,a3G:d7,a7Y:ig};c.kp(K);this.Tz(K.data,c)}if(j==eM.DN&&(x.a!=null||c.g.length!=0)||j==eM.NJ){var he=c.oU(j==eM.DN?x.a:U,null,x.a2M),k4;
if(j==eM.NJ){var q=he[0],dM=q.add.SoLd.Idnt.v,a6=c.ZL(dM).clone();q.add.SoLd.Idnt.v=a6.P6=hf.KN()+dM.slice(8);
c.add.lnk2.push(a6)}if(j==eM.DN){var cK={q4:"duplicate",dx:{classID:"null",null:ep.QP("Lyr",!0)}};if(x.BW){he[he.length-1].gF(x.BW);
cK.Nm={t:"TEXT",v:x.BW}}this.track(cK);x.aqh=x.a}j=eM.nK;x.B=he;x.ov=c;x.et=c}if(j==eM.nK){var ds,iy,gu=x.ov,gL=x.et,dc=0,aQ=0,ec=gu.lG(),gl=!1,dC,cO=0,bY=0;
if(gu!=gL){console.log("ADDLAYERS different projs");var ds=new gh(0,0,gu.m,gu.e),iy=new gh(0,0,gL.m,gL.e),gH=[],gj=[],fx=new gh;
for(var F=0;F<x.B.length;F++){var q=x.B[F];fx=fx.iO(q.rect);if(q.add.SoLd==null)continue;var dM=q.add.SoLd.Idnt.v;
if(gH.indexOf(dM)==-1){gH.push(dM);gj.push(hf.KN()+dM.slice(8))}q.add.SoLd.Idnt.v=gj[gH.indexOf(dM)];
var fP=q.U5(gu);if(fP){gu.e1(fP);gL.C3(fP)}}if(ec==-1&&!x.Mi&&x.a3H&&!iy.dM(fx)){dc=-fx.x;aQ=-fx.y}if(gH.length>0){if(gL.add.lnk2==null)gL.add.lnk2=[];
for(var F=0;F<gH.length;F++){var aT=gu.ZL(gH[F]),a6=aT.clone();a6.P6=gj[F];gL.add.lnk2.push(a6)}}}var fJ=gL.g.slice(0);
fJ.sort(function(K,iC){return K-iC});var aP=gL.B.slice(0),h6=[],bL=-1;for(var F=0;F<fJ.length;F++)bL=Math.max(bL,fJ[F]);
if(x.aqh!=null)bL=x.aqh;if(x.Mi){bL=x.Mi-1;var kr=gL.B[x.Mi].Dd();dc+=kr.x;aQ+=kr.y}if(ec!=-1&&(gu!=gL||x.Mi)){var jS=gu.B[ec].Dd();
dc-=jS.x;aQ-=jS.y}var bE=gL.wZ();for(var F=0;F<bE[0].length;F++){var ci=bE[1][F];if(ci!=-1)bE[1][F]=aP[ci]}bL++;
for(var F=0;F<x.B.length;F++){var Y=x.B[F],kC=Y.add.artb;aP.splice(bL,0,Y);h6.push(bL);bL++;if(kC){dC=!0;
var aI=kC.guideIndeces;if(aI){aI=aI.v;for(var fB=0;fB<aI.length;fB++){bE[0].push(gu.Bo[aI[fB].v].slice(0));
bE[1].push(Y);gl=!0}}}}for(var F=0;F<bE[0].length;F++){var ci=bE[1][F];if(ci!=-1)bE[1][F]=aP.indexOf(ci)}for(var F=0;
F<x.B.length;F++){var Y=x.B[F];if(Y.add.lsct==hA.oA){if(cO==0)bY++;cO++}else if(Y.Uy())cO--}if(bY==1)h6=[bL-1];
var K=new dg([6,0],this);K.data={d:eM.ty,GF:gL.B.slice(0),Yo:aP,xa:fJ,z2:h6};if(gl){K.data.l5=[gL.wZ(),bE]}gL.kp(K);
this.Tz(K.data,gL);if(dc!=0||aQ!=0)X.qV.vS(gL,gL.zi(),null,dc,aQ);if(dC){K.data.oT=new gh(0,0,gL.m,gL.e);
K.data.gq=X.r7.OZ(gL);X.r7.sA(gL)}}if(j==eM.TQ){var fS=x.a!=null?[x.a]:c.zi(),aP=c.B.slice(0);for(var F=0;
F<fS.length;F++){var Y=c.B[fS[F]].clone();Y.pZ(c);aP.splice(fS[F],1,Y)}var K=new dg([6,8],this);K.data={d:eM.ty,GF:c.B.slice(0),Yo:aP,xa:c.g.slice(0),z2:c.g.slice(0)};
c.kp(K);this.Tz(K.data,c)}if(j==eM.a5w){var aP=c.B.slice(0),Y=aP[c.g[0]]=aP[c.g[0]].clone(),i_=Y.add.lmfx,dv,kr;
delete Y.add.lmfx;var g1=c.g[0],jo=g1+1;if(Y.Uy()){var eS=c.B[c.g[0]].ft;kr=eS.a9i;dv=eS.My;var J=c.root.FV(g1);
g1=J.G5}else{kr=Y.rect;dv=d.R(kr.P());d.GS(Y.buffer,dv,3)}var gX=en.wH(i_,Y.add.fxrp,dv,kr,c,kr).type;
for(var F=0;F<aF.order.length;F++){var fT=aF.order[F],gm=gX[fT];gm.reverse();for(var fB=0;fB<gm.length;
fB++){var hq=gm[fB],T=c.Xh(),bD=F>7;if(fT=="ebbl"){if(hq.yx||hq.$p){var dj=hq.yx?hq.yx:hq.$p;if(hq.yx)delete hq.yx;
else delete hq.$p;if(hq.$p||hq.lx)fB--}else if(hq.lx||hq.gX){var dj=hq.gX?hq.gX:hq.lx;if(hq.gX){delete hq.gX;
if(hq.lx)fB--}bD=!0}hq=dj}T.s3=hq.iu;T.opacity=Math.round(255*hq.Ym);T.buffer=hq.AX;T.rect=hq.oj.clone();
T.rect.offset(kr.x,kr.y);if(fT=="FrFX"){T.buffer=T.buffer.slice(0);d.Dm(hq.Cc?hq.Cc:hq.A$,T.buffer,3);
if(hq.Cc){bD=!0;delete hq.Cc;if(hq.A$)fB--}}T.cG=!bD;T.gF(Y.getName()+"'s "+ah.get(aF.names[F]));aP.splice(bD?g1:jo,0,T);
if(bD)jo++}}var K=new dg("Styles to Layers",this);K.data={d:eM.ty,GF:c.B.slice(0),Yo:aP,xa:c.g.slice(0),z2:[jo-1]};
c.kp(K);this.Tz(K.data,c)}if(j==eM.aBQ){var fS=c.zi(),aP=c.B.slice(0),g3=new gh(0,0,c.m,c.e);for(var F=0;
F<fS.length;F++){var dF=c.B[fS[F]],e1=dF.M5();dF.KW(!0);var fE=c.root.FV(fS[F]);if(dF.Uy())continue;
if(fE==null)continue;var Y=dF.clone();Y.pZ(c);var cl=fE.Pe(c,!0),i1=c.B;c.Bd([dF]);c.c();c.eB();Y.buffer=d.R(cl.P()*4);
d.WK(c.VY(),g3,Y.buffer,cl);Y.rect=cl;Y.opacity=255;Y.add.iOpa=255;Y.s3="norm";Y.c();Y.ft.JP=!0;c.Bd(i1);
if(Y.add.lmfx)delete Y.add.lmfx;Y.F=Y.OE=null;aP.splice(fS[F],1,Y);Y.KW(e1);dF.KW(e1)}var K=new dg([6,34],this);
K.data={d:eM.ty,GF:c.B.slice(0),Yo:aP,xa:c.g.slice(0),z2:c.g.slice(0)};c.kp(K);this.Tz(K.data,c)}if(j==eM.ax9){var fS=c.zi(),aP=c.B.slice(0);
for(var F=0;F<fS.length;F++){var Y=c.B[fS[F]],cU=Y.add.TySh;if(cU==null)continue;var q=new fQ(cU.HW,z.Dn,cU.Gb),hb=d.A.j9(aE.Fc(q,cU,!0));
for(var gw in hb){var kf=hb[gw],gr=Y.clone();delete gr.add.TySh;gr.H2=gr.H2|1<<4;gr.add.SoCo=JSON.parse(JSON.stringify(aF.Y3[0]));
var f3=gr.add.SoCo.Clr.v;f3.Rd.v=parseInt(gw.slice(1,3),16);f3.Grn.v=parseInt(gw.slice(3,5),16);f3.Bl.v=parseInt(gw.slice(5,7),16);
var kq=new eM.hn;kq.$=d.A.tf(kf,!1);if(gr.add.vmsk!=null){gr.add.vmsk.a0u();kq.concat(gr.add.vmsk)}gr.add.vmsk=kq;
gr.add.vstk=aF.XM.$H(!0);gr.jz();gr.kT(c);aP.splice(aP.indexOf(Y),0,gr)}aP.splice(aP.indexOf(Y),1)}var h6=c.g.slice(0);
for(var F=h6.length-1;F>=0;F--)if(h6[F]>=aP.length)h6.splice(F,1);var K=new dg([6,40],this);K.data={d:eM.ty,GF:c.B.slice(0),Yo:aP,xa:c.g.slice(0),z2:h6};
c.kp(K);this.Tz(K.data,c)}if(j==eM.DP){var kt=c.g.length,ho,aR;if(kt<2){alert("Select two or more layers.");
return}for(var F=0;F<kt;F++){var jS=c.B[c.g[F]].rect;ho=F==0?jS:ho.y_(jS);aR=F==0?jS:aR.iO(jS)}if(ho.P()*1.2>aR.P()){alert("stacking images");
var co=[],iD=[];for(var F=0;F<kt;F++){var Y=c.B[c.g[F]];co.push(Y.buffer);iD.push(Y.rect)}var ir=d.avx.Z8(co,iD),j$=ir[0],dn=ir[1],gC=[];
for(var F=0;F<kt;F++){var eG=new eM.zM;eG.color=255;eG.rect=dn;eG.channel=j$[F];gC.push(c.g[F],null,eG)}var K=new dg("Focus-Stack",this);
K.data={d:eM.tW,yD:gC};c.kp(K);this.Tz(K.data,c);return}if(!c.VP())return;var gr=c.B[c.g[0]].clone(),aP=[];
for(var F=0;F<c.B.length;F++)if(c.g.indexOf(F)==-1)aP.push(c.B[F]);aP.splice(c.g[0],0,gr);for(var F=1;
F<kt;F++)if(c.B[c.g[F]].rect.P()>2e6){alert("Blended areas are too large.");return}for(var F=1;F<kt;
F++){var Y=c.B[c.g[F]],dn=Y.rect.clone();dn.ss(1,1);var iC=d.R(dn.P()*4);d.WK(Y.buffer,Y.rect,iC,dn);
gr.extend(dn);var bU=d.R(dn.P()*4);d.WK(gr.buffer,gr.rect,bU,dn);var K=d.R(dn.P());d.GS(iC,K,3);d.round(K,200);
d.Dm(K,iC,3);d.l.UY("norm",iC,dn,bU,dn,dn,1);d.vj.rT(bU,K,dn);d.WK(bU,dn,gr.buffer,gr.rect)}var K=new dg([2,10,0],this);
K.data={d:eM.ty,GF:c.B.slice(0),Yo:aP,xa:c.g.slice(0),z2:[c.g[0]]};c.kp(K);this.Tz(K.data,c)}if(j==eM.sm){var aP=c.B.slice(0),jL=c.g.slice(0);
for(var F=0;F<aP.length;F++){var Y=aP[F],eJ=Y.add.vmsk;if(Y.Z6()&&eJ&&Y.add.vstk.strokeEnabled.v&&!Y.add.vstk.fillEnabled.v){var ia=eJ.$,dP=0,bu=-1;
for(var fB=0;fB<ia.length;fB++){if((ia[fB].type==0||ia[fB].type==3)&&ia[fB].Kp!=-1){dP++;if(ia[fB].type==3&&bu==-1){ia[fB].YS=ia[fB].Kp=1;
bu=fB}}}if(dP>1&&bu!=-1&&dP<10){console.log("separating an open path into a new layer");Y=Y.clone();
eJ=Y.add.vmsk;ia=eJ.$;var T=ia[bu].length,jB=Y.clone();jB.add.lyid=c.nQ();eJ.$=ia.slice(0,2).concat(ia.slice(bu,bu+T+1));
eJ.g=[];Y.kT(c);Y.c();var jw=jB.add.vmsk.$;jB.add.vmsk.$=jw.slice(0,bu).concat(jw.slice(bu+T+1,jw.length));
jB.add.vmsk.g=[];jB.kT(c);aP[F]=Y;aP.splice(F+1,0,jB);for(var fB=0;fB<jL.length;fB++)if(jL[fB]>F)jL[fB]++;
var av=jL.indexOf(F);if(av!=-1){jL.splice(av+1,0,F+1)}}}}if(aP.length!=c.B.length){var K=new dg("Splitting open paths",this);
K.data={d:eM.ty,GF:c.B.slice(0),Yo:aP,xa:c.g.slice(0),z2:jL};c.kp(K);this.Tz(K.data,c)}}if(j==eM.rQ){this.To({d:eM.sm},Q,c,$,z);
var fJ=c.g.slice(0),i1=c.B.slice(0),fS=c.zi();if(fS.length==0)return;c.a8D(fS,!1,x.mN);var K=new dg([6,36,0],this);
K.data={d:eM.ty,GF:i1,Yo:c.B.slice(),xa:fJ,z2:c.g.slice(0)};c.kp(K);this.Tz(K.data,c)}if(j==eM.a3L){var d8=i.add.SoLd;
if(d8==null)return;var dM=d8.Idnt.v,i8=c.ZL(dM);i8.VY(!1);var hC=i8.iw[0],dn=i8.iw[1];if(d.Ty(hC)){alert("The smart object contains transparency.");
return}var c5=ar.pz("jpg").YU([[hC.buffer]],dn.m,dn.e,[90]);this.To({d:eM.aY,data:new Uint8Array(c5),uo:"image.jpg"},Q,c,$,z);
console.log(c.add);return}if(j==eM.aY){var g3=x.Ta,dM=x.id;if(g3==null)g3=c;if(dM==null)dM=i.add.SoLd.Idnt.v;
var aT=g3.ZL(dM),a6=aT.clone();a6.raw=x.data;a6.uo=x.uo;var a$=ar.HB(x.data.buffer);if(a$=="psd"){a6.eD="8BIM";
a6.bf="8BPB"}else{a6.eD="    ";a6.bf="    "}a6.VY(!1);aT.VY(!1);var K=new dg([6,36,1],this);K.data={d:eM.aY,id:dM,iI:aT,Tp:a6};
g3.kp(K);this.Tz(K.data,g3)}if(j==eM.Z3){var K=new dg([6,36,4],this);K.data={d:j,a:U,ZR:i.add.SoLd.Impr.v.classID,j7:x.j7};
c.kp(K);this.Tz(K.data,c)}if(j==eM.aCS){var eO,f6;if(x.yU){eO=x.Ta;f6=x.yU}else{x.Ta.jf();x.Ta.Kn();
x.Ta.c();x.Ta.eB();x.Ta.VY();eO=ar.pz("PSD").YU(x.Ta,0,0,[!0,!0]);f6=x.Ta.name}if(!(eO instanceof ArrayBuffer))throw"e";
eO=new Uint8Array(eO);var V=x.fU;if(V==null){if(c.g.length==0)V=c.g.length;else{var jK=c.g[c.g.length-1],T=c.B[jK];
V=T.Uy()?jK:jK+1}}var iZ=new gh(0,0,c.m,c.e),ix=c.lG();if(ix!=-1)iZ=c.B[ix].Dd();var jU=c.BQ(eO,f6,null,null,iZ,z.Dn,Q),aP=c.B.slice(0);
aP.splice(V,0,jU);var K=new dg([6,36,2],this);K.data={d:eM.ty,GF:c.B.slice(),Yo:aP,xa:c.g.slice(0),z2:[aP.indexOf(jU)]};
c.kp(K);this.Tz(K.data,c)}if(j==eM.mn&&x.Zq=="merge"){var df=[],gy=c.root.children,eu=0;for(var F=0;
F<gy.length;F++){var J=gy[F],Y=J.a,bR=J.children,cs=!0;if(!Y.Uy()||bR.length==0)continue;for(var fB=0;
fB<bR.length;fB++)if(!bR[fB].a.getName().startsWith("_a_")){cs=!1;break}if(cs)df.push(c.B.indexOf(Y))}var fG=[];
for(var F=0;F<df.length;F++)if(c.g.indexOf(df[F])!=-1)fG.push(df[F]);if(fG.length>=2)df=fG;if(df.length<2){alert("At least two animation folders needed (whose layers start with \"_a_\").",3500);
return}var g0=[];for(var F=0;F<df.length;F++)g0.push(c.B[df[F]].getName());var gm=[];for(var gb=0;gb<df.length;
gb++){var J=c.root.FV(df[gb]),hl=[[],[],0,gb];gm.push(hl);for(var F=0;F<J.children.length;F++){var G=J.children[F].index,Y=J.children[F].a,eA=Y.getName(),d2=20,gY=eA.split(",");
if(gY.length>1){var f8=parseInt(gY.pop());if(!isNaN(f8)&&f8!=0)d2=f8}if(d2<17)d2=17;hl[0].push(Y);hl[1].push(d2);
hl[2]+=d2}}gm.sort(function(K,iC){return iC[2]-K[2]});if(gm[0][2]>2e3){var iv=0,gQ=0;for(var F=0;F<gm.length;
F++){var aO=gm[F][1].length/gm[F][2];if(aO>gQ){gQ=aO;iv=F}}var cA=(gm[0][2]/1e3).toFixed(1),aK=window.confirm("- \""+g0[gm[0][3]]+"\" is "+cA+" seconds long\n"+"- \""+g0[gm[iv][3]]+"\" is playing at "+Math.round(gQ*1e3)+" frames per second\n"+"A merged animation must be "+cA+" sec, up to "+Math.round(gm[0][2]*gQ)+" frames. Proceed?");
if(!aK)return}var kE=gm[0],by=kE[2];for(var ci=1;ci<gm.length;ci++){var hl=gm[ci],i4=1,kg=hl[1].slice(0),jN=0;
while((i4+1)*hl[2]<=kE[2]){i4++;kg=kg.concat(hl[1])}hl[1]=kg;hl[2]*=i4;var gI=kE[2]/hl[2];for(var F=0;
F<hl[1].length;F++){var kH=Math.floor(hl[1][F]*gI);hl[1][F]=kH;jN+=kH}while(jN<by){jN++;hl[1][hl[1].length-1]++}hl[2]=jN}var eU=[],fo=[],kH=[];
for(var F=0;F<gm.length;F++){eU.push(0);fo.push(0)}while(eu<by){var aM=1e9,jp=-1;for(var F=0;F<gm.length;
F++){var i7=gm[F][1],g1=eU[F];if(g1!=i7.length&&fo[F]+i7[g1]<eu+aM){jp=F;aM=fo[F]+i7[g1]-eu}}fo[jp]+=gm[jp][1][eU[jp]];
eU[jp]++;if(aM!=0){kH.push(aM);eu+=aM}}for(var F=1;F<kH.length;F++){var aV=kH[F];if(aV<16&&(kH[F-1]<16||F<kH.length-1&&16<=kH[F+1])){kH[F-1]+=aV;
kH.splice(F,1);F--}}var e1=[],g3=new gh(0,0,c.m,c.e);for(var F=0;F<c.B.length;F++){e1[F]=c.B[F].M5();
c.B[F].KW(!1)}var iR=c.g.slice(0);c.g=df;var dY=c.zi();dY.sort(function(K,iC){return K-iC});var aP=[];
for(var F=0;F<c.B.length;F++){if(dY.indexOf(F)==-1)aP.push(c.B[F])}gm.sort(function(K,iC){return K[3]-iC[3]});
function br(i7,hS){var F=0,cw=0;while(cw+i7[F]<=hS){cw+=i7[F];F++}return F}eu=0;aP.splice(dY[0],0,c.x6());
for(var kN=0;kN<kH.length;kN++){var y=[];for(var F=0;F<gm.length;F++){var g1=br(gm[F][1],eu)%gm[F][0].length,Y=gm[F][0][g1];
y.push(Y)}var Y=c.Xh();for(var F=0;F<gm.length;F++){var iW=y[F],eN=c.B[df[F]];iW.KW(!0);eN.KW(!0)}c.c();
c.eB();var hC=c.VY();Y.rect=d.kH(hC,g3,2);Y.buffer=d.R(Y.rect.P()*4);d.WK(hC,g3,Y.buffer,Y.rect);for(var F=0;
F<gm.length;F++){var iW=y[F],eN=c.B[df[F]];iW.KW(!1);eN.KW(!1)}Y.KW(kN==0);Y.gF("_a_frm"+kN+","+kH[kN]);
aP.splice(dY[0]+1+kN,0,Y);eu+=kH[kN]}var Y=c.Xh();Y.gF(g0.join(" + "));Y.s3="pass";Y.add.lsct=hA.H3;
Y.H2=24;aP.splice(dY[0]+1+kH.length,0,Y);for(var F=0;F<c.B.length;F++)c.B[F].KW(e1[F]);var K=new dg([6,12,0],this);
K.data={d:eM.ty,GF:c.B,Yo:aP,xa:iR,z2:[dY[0]+1+kH.length]};c.kp(K);this.Tz(K.data,c)}if(j==eM.TJ||j==eM.Ev){var ao=c.g.length==1&&!c.B[c.g[0]].Uy(),b4=!0,jU=null,h6;
if(ao&&c.g[0]==0)return;var i1=c.B.slice(0),fJ=c.g.slice(0);if(ao)c.g=[U,U-1];if(j==eM.Ev){c.g=[];for(var F=0;
F<c.B.length;F++)if(c.B[F].M5())c.g.push(F)}var fS=c.zi();fS.sort(function(K,iC){return K-iC});var ee=new gh,g3=new gh(0,0,c.m,c.e);
for(var F=0;F<fS.length;F++){var G=fS[F],Y=c.B[G];if(Y.Uy()||Y.getName()=="</Layer group>")continue;
b4=b4&&Y.Z6()&&Y.add.vmsk!=null;ee=ee.iO(c.root.FV(G).Pe(c,!0))}if(x.NE!=null&&!b4){alert("Select shape layers only.");
return}if(b4){var eJ=null,j_=x.NE;for(var F=0;F<fS.length;F++){var T=c.B[fS[F]];if(T.rect.P()==0)continue;
if(jU==null){jU=T.clone();eJ=jU.add.vmsk}else{var T=c.B[fS[F]],jw=eM.hn.gG(T.add.vmsk.$);if(j_!=null)for(var fB=0;
fB<jw.length;fB++)if(jw[fB].Kp!=null&&jw[fB].Kp!=-1)jw[fB].Kp=[1,2,3,0][j_];eJ.$=eJ.$.concat(jw.slice(2));
jU.add.vogk=jU.add.vogk.concat(JSON.parse(JSON.stringify(T.add.vogk)))}}jU.add.vmsk.ha=!0;jU.kT(c)}else if(g3.PC(ee)){jU=c.Xh();
jU.gF(c.B[fS[fS.length-1]].getName());jU.rect=ee;jU.buffer=d.R(ee.P()*4);var gc=c.add.artd;delete c.add.artd;
var d4=c.VY(fS);if(gc)c.add.artd=gc;d.WK(d4,g3,jU.buffer,ee);jU.NK();jU.c()}else{c.a8D(fS,!0);jU=c.B[c.g[0]];
c.B.splice(c.g[0],1);var c9=c.ZL(jU.add.SoLd.Idnt.v);c.add.lnk2.splice(c.add.lnk2.indexOf(c9),1);delete jU.add.SoLd}var fW=b,il=-1;
if(x.dx&&x.dx.Dplc&&x.dx.Dplc.v)fW=!0;if(fW&&j==eM.Ev&&fJ.length!=0&&c.B[fJ[0]].nd()&&c.B[fJ[0]].rect._6()){il=fJ[0]}if(il!=-1||ao){var bF=c.B[il!=-1?il:U-1];
jU.gF(bF.getName());jU.add.lclr=bF.add.lclr}var aP=[];for(var F=0;F<c.B.length;F++)if(fW||fS.indexOf(F)==-1)if(F!=il)aP.push(c.B[F]);
var bB=fS[fS.length-1],jr=bB==c.B.length-1?null:c.B[bB+1],dV=jr?aP.indexOf(jr):aP.length;aP.splice(dV,0,jU);
h6=[dV];var K=new dg([6,12,0],this);K.data={d:eM.ty,GF:i1,Yo:aP,xa:fJ,z2:h6};c.kp(K);this.Tz(K.data,c)}if(j==eM.a9Y){var gr=c.Xh();
gr.rect=new gh(0,0,c.m,c.e);gr.buffer=d.R(gr.rect.P()*4);d.h4(gr.buffer,4294967295);d.l.UY("norm",c.VY(),gr.rect,gr.buffer,gr.rect,gr.rect,1);
gr.gF("Background");gr.add.lspf=1<<2;var K=new dg([6,12,1],this);K.data={d:eM.ty,GF:c.B.slice(),Yo:[gr],xa:c.g.slice(0),z2:[0]};
c.kp(K);this.Tz(K.data,c)}var ge=j==eM.ly||j==eM._3;if(j==eM.Hx||j==eM.PX||j==eM.Ob||j==eM.Ap||ge){var Y=ge?c.oU()[0]:c.Xh(),im=ah.get([0,3]),dG=x.BW,hU=!1,kx,fy;
if(j==eM.Ob)im=ah.get([12,76,1]);if(ge){if(c.u){var dF=c.B[c.g[0]],eR=dF.I0(c,c.u);if(eR==null){alert("Copied area is empty");
return}Y.rect=eR.rect;Y.buffer=eR.aJ;Y.pZ(c);Y.KW(!0)}else dG=Y.getName();Y.add.lspf=0;Y.cG=!1;if((Y.H2&1)!=0)Y.H2--}if(j==eM.Ap){Y.rect=X.de.aow(x.sn,c);
Y.buffer=x.sn.buffer.slice(0);if(x.$l&&c.u){Y.F=new eM.zM;Y.F.rect=c.u.rect;Y.F.color=0;Y.F.channel=c.u.channel.slice(0)}}if(j==eM.Hx){this.track({q4:"make",dx:{classID:"Mk",null:ep.QP("Lyr")}})}if(j==eM.PX){Y.H2|=16;
var eh=x.dx.Usng.v,as=eh.Type.v,fY=k5.HD[as.classID];im=ah.get(k5.names[fY]);if(eh.Nm)dG=eh.Nm.v;Y.add[fY]=fK.$H(fY);
if(Y.add[fY]==null)Y.add[fY]={};for(var iL in as)Y.add[fY][iL]=JSON.parse(JSON.stringify(as[iL]));Y.F=X.de.a18(c);
Y.kk=1}if(j==eM.Ob){Y.H2|=16;var ik=x.dx,eh=ik.Usng.v,bP=eh.Type.v,ff=eh.Shp;if(eh.Nm)dG=eh.Nm.v;if(ff==null){var ha=c.zo(),hb=ha[0],dp=ha[1];
if(dp.length!=0&&hb[dp[0]].xR<0){var gi=hb[dp[0]].add;Y.add.vmsk=gi.vmsk.clone();Y.add.vstk=aF.XM.$H(!0);
Y.add.vogk=JSON.parse(JSON.stringify(gi.vogk));c.IH=[]}else Y.F=X.de.a18(c)}else{Y.add.vmsk=new eM.hn;
Y.add.vstk=JSON.parse(JSON.stringify(eh.strokeStyle?eh.strokeStyle.v:aF.XM.$H(!0)));Y.add.vogk=[];if(ff){var gZ=d.eV.Yy(ff);
if(gZ){Y.add.vogk=[gZ];Y.add.vmsk.$.push({type:0,Kp:1,length:0});d.eV.Rt(Y.add.vogk,Y.add.vmsk)}else{ff=ff.v;
var a3=ff.classID;if(a3=="Plgn"){var kn=ff.Cntr.v,jS=ff.corner.v;kn=new bC(kn.Hrzn.v.val,kn.Vrtc.v.val);
jS=new bC(jS.Hrzn.v.val,jS.Vrtc.v.val);Y.add.vmsk.$=d.o.JE.sY(kn.x,kn.y,Math.sqrt(jS.x*jS.x+jS.y*jS.y),Math.atan2(jS.y,jS.x),ff.sides.v,0)}else if(a3=="customShape"){var fD=d.eV.Nu(ff),aX=fD[2]-fD[0],ac=fD[3]-fD[1],dD=z.jS,ax,g5;
for(var F=0;F<dD.length;F++)if(dD[F].mk==ff.Nm.v)ax=dD[F];if(ax){g5=eM.hn.gG(ax.$);d.o.Of(g5,new bI(aX,0,0,ac,fD[0],fD[1]))}else g5=d.o.JE.Rect(fD[0],fD[1],aX,ac,0);
Y.add.vmsk.$=g5}Y.jz()}}}var cS={solidColorLayer:0,gradientLayer:1,patternLayer:2}[bP.classID],kA=["SoCo","GdFl","PtFl"][cS];
Y.add[kA]=JSON.parse(JSON.stringify(aF.Y3[cS]));if(cS==0)Y.add[kA].Clr.v=d.I.lV(d.RD(z.Gj));X.de.WH(bP,Y.add[kA],cS);
if(ff==null)im=ah.get([6,48,0,cS]);if(kA=="PtFl"){var eH=Y.add[kA].Ptrn.v,gY=en.yr(eH,z.Yf);if(gY==null)gY=en.yr(eH,c.add.Patt);
eH.Idnt.v=gY.id;c.uh(gY)}Y.kT(c)}var kt=X.de.fE(c,im+" ");Y.gF(im+" "+(kt+1));if(dG)Y.gF(dG);var ft=c.g.length==0?c.B.length-1:c.g[c.g.length-1],dX=c.B[ft];
if(j==eM.Ob&&dX.nd()&&dX.rect._6()){hU=!0;Y.gF(dX.getName());kx=ft}else{kx=ft+(j==eM.Hx&&k&&!e?0:1);
if(dX&&dX.add.lsct==hA.DJ)kx--}if(x.aa3)kx=Math.max(0,kx-1);var aP=c.B.slice(0);if(j==eM._3){var js=aP[c.g[0]]=aP[c.g[0]].clone(),b7=c.u.channel.slice(0);
d.HQ(b7);d.Pp(b7,c.u.rect,js.buffer,js.rect)}aP.splice(kx,hU?1:0,Y);var fa=[5,2];if(j==eM.Hx)fa=[6,13];
if(j==eM.PX)fa=[6,1];if(j==eM.Ob){fa=[6,48,1];var ff=x.dx.Usng.v.Shp;if(ff){var gn={Rctn:[10,32],Ln:[10,35],Elps:[10,33],Plgn:[12,93,0],customShape:[10,31]}[ff.v.classID];
if(gn)fa=gn}}if(ge){fa=[6,49,j==eM.ly?0:1]}if(ge||j==eM.Ob||j==eM.Ap||j==eM.PX)if(c.u)fy=[c.u,null];
var K=new dg(fa,this);K.data={d:eM.ty,GF:c.B.slice(0),Yo:aP,xa:c.g.slice(0),z2:[kx],Bt:fy};c.kp(K);this.Tz(K.data,c);
if(j==eM.Ob&&ff==null&&cS!=0||j==eM.PX){var B=new jO(u.E.M);B.data={d:u.H.cR,AD:cC.Pn.E7};Q.T(B)}}if(j==eM.jK){var Y=c.Xh(),im=ah.get([0,4]),kt=X.de.fE(c,im+" ");
Y.gF(im+" "+(kt+1));Y.s3="pass";Y.add.lsct=hA.DJ;Y.H2=24;if(x.BW)Y.gF(x.BW);if(x.hP!=null)Y.add.lclr=x.hP;
var gf=c.x6(),ft=U,kx=ft+(k?0:1),aP=c.B.slice(0);aP.splice(kx,0,gf,Y);var K=new dg([6,20],this);K.data={d:eM.ty,GF:c.B.slice(0),Yo:aP,xa:c.g.slice(0),z2:[kx+1]};
c.kp(K);this.Tz(K.data,c)}if(j==eM.Eg||j==eM.qz){var aj=j==eM.Eg?x.source:c.g[0],cZ,fb,jx=c.g.indexOf(aj)!=-1,eE=b|x.atj,dH,aM=null;
if(jx)dH=c.zi();else dH=c.Sa(aj);dH.sort(function(K,iC){return K-iC});if(j==eM.Eg){cZ=x.target;fb=x.aX>.5}else if(x.target!=null){cZ=Math.min(x.target,c.B.length-1);
fb=x.target<c.B.length;c.Rr=!0}else{var jD=x.Zq;fb=jD>1;if(jD==0){cZ=c.B.length-1}if(jD==1){cZ=dH[dH.length-1]+1;
var T=c.Sa(cZ);if(T.indexOf(aj)==-1)cZ+=T.length-1}if(jD==2){cZ=dH[0]-1;var T=c.Sa(cZ);if(T.indexOf(aj)==-1)cZ-=T.length-1}if(jD==3){cZ=0;
if(c.B[0].add.lnsr=="bgnd")cZ++}if(cZ<0||cZ>c.B.length-1)return;c.Rr=!0}if(dH.indexOf(cZ)!=-1&&!eE)return;
var fI=X.de.Ag(c,dH,cZ,fb,eE?c.oU(jx?null:aj):null,j==eM.Eg&&x.aX>.8),gp=fI.pop(),jL=fI.pop(),aP=fI.pop(),fH=c.g;
c.g=[aj];var ec=c.lG();c.g=[cZ];var bZ=c.lG();if(bZ==cZ&&!fb)bZ=-1;c.g=fH;if(aj==ec){}else if(ec!=bZ){var aM=new bC(0,0);
if(ec!=-1){var dn=c.B[ec].Dd();aM.x-=dn.x;aM.y-=dn.y}if(bZ!=-1){var dn=c.B[bZ].Dd();aM.x+=dn.x;aM.y+=dn.y}}var K=new dg(eE?[6,0]:[6,35],this);
K.data={d:eM.ty,GF:c.B.slice(0),Yo:aP,xa:c.g.slice(0),z2:jL,ol:aM};c.kp(K);this.Tz(K.data,c);var ik={classID:"move",null:ep.QP("Lyr",!0),T:{t:"obj ",v:[{t:"indx",v:{classID:"Lyr",val:gp+(fb?0:1)}}]},Adjs:{t:"bool",v:!1},Vrsn:{t:"long",v:5},Dplc:{t:"long",v:eE}};
this.track({q4:"move",dx:ik})}if(j==eM.xt){if(x.DV){if(i==null||!i.Uy())return;var J=c.root.FV(U),e7=c.B.indexOf(J.aA5),aP=c.B.slice(0);
aP.splice(U,1);aP.splice(e7,1);var jL=[];for(var F=e7;F<U-1;F++)jL.push(F);var K=new dg("Ungroup Layers",this);
K.data={d:eM.ty,GF:c.B.slice(0),Yo:aP,xa:c.g.slice(0),z2:jL};c.kp(K);this.Tz(K.data,c)}else{var Y=c.Xh(),jy=ah.get([0,4])+" ";
Y.gF(jy+(X.de.fE(c,jy)+1));Y.s3="pass";if(x.BW)Y.gF(x.BW);if(x.hP!=null)Y.add.lclr=x.hP;Y.add.lsct=c.g.length==1?hA.DJ:hA.H3;
Y.H2=24;var gf=c.x6(),dH=c.zi();if(dH.length==0)return;dH.sort(function(K,iC){return K-iC});var aP=[];
for(var F=0;F<c.B.length;F++)if(dH.indexOf(F)==-1)aP.push(c.B[F]);var ft=c.g[c.g.length-1]-dH.length;
aP.splice(ft+1,0,gf);for(var F=0;F<dH.length;F++)aP.splice(ft+2+F,0,c.B[dH[F]]);aP.splice(ft+2+dH.length,0,Y);
var K=new dg([6,9],this);K.data={d:eM.ty,GF:c.B.slice(0),Yo:aP,xa:c.g.slice(0),z2:[aP.indexOf(Y)]};c.kp(K);
this.Tz(K.data,c);var I={q4:"make",jT:!0};I.dx={classID:"Mk",null:ep.QP("layerSection"),From:ep.QP("Lyr",!0),Usng:{t:"Objc",v:{classID:"layerSection",Nm:{t:"TEXT",v:Y.getName()}}}};
this.track(I)}}if(j==eM.axR){if(c.g.length!=1)return;var V=c.g[0],dO=b;if(c.B[V].Rz()==null&&!$.S(fM.qP)){j=eM.zP;
x.AW=c.u?!dO?"RvlS":"HdSl":!dO?"RvlA":"HdAl"}else{j=eM.Vo;x.aCY=!0}}if(j==eM.zP){if(c.g.length!=1)return;
var V=c.g[0],Y=c.B[V];if(Y.add.vmsk&&Y.F==null)Y.kT(c);var eg=Y.Rz();if(eg==null||x.apf){var K=new dg(x.BW?x.BW:[6,21],this),ab=new eM.zM,iO=x.AW,c6=iO=="RvlS"||iO=="HdSl";
if(iO=="RvlS"||iO=="HdAl"||iO=="Trns")ab.color=0;if(c6){ab.channel=c.u.channel.slice(0);ab.rect=c.u.rect.clone();
if(iO=="HdSl")d.HQ(ab.channel)}if(iO=="Trns"){ab.rect=Y.rect.clone();ab.channel=d.R(Y.rect.P());d.GS(Y.buffer,ab.channel,3)}K.data={d:eM.tW,yD:[V,eg,ab],Bt:c6?[c.u,null]:null,a43:iO=="Trns"};
c.kp(K);this.Tz(K.data,c);c.B[V].kk=1;this.track({q4:"make",dx:{__name:"Make",classID:"Mk",Nw:{t:"type",v:{classID:"Chnl"}},At:{t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:"Msk"}}]},Usng:{t:"enum",v:{UsrM:iO}}}})}}else if(j==eM.a7W){var iE=c.B[x.src],e9=c.B[x.qC],K=new dg([6,21],this),c2=iE.Rz(),bO=e9.Rz(),eG=[x.src,c2,null,x.qC,bO,c2];
if(b||e){var eA=c2.clone();if(b)eG=[x.qC,bO,eA];else eG[5]=eA;if(e){d.HQ(eA.channel);eA.color=255-eA.color}}K.data={d:eM.tW,yD:eG};
c.kp(K);this.Tz(K.data,c)}if(j==eM.zb){if(c.g.length!=1)return;var V=U,fm=c.B[V].Rz();if(fm!=null){var K=new dg([6,22],this);
K.data={d:eM.tW,yD:[U,fm,null]};c.kp(K);this.Tz(K.data,c)}}if(j==eM.Bc){var i1=c.B.slice(0),gr=i.clone(),a4=gr.Rz();
d.Pp(a4.EF(gr.rect),gr.rect,gr.buffer,gr.rect);X.de.z9(c,gr);gr.NK();c.B[c.g[0]]=gr;var K=new dg([5,8],this);
K.data={d:eM.ty,GF:i1,Yo:c.B.slice(),xa:c.g.slice(0),z2:c.g.slice(0)};c.kp(K);this.Tz(K.data,c)}if(j==eM.XE){if(c.g.length!=1)return;
var V=c.g[0];if(c.B[V].U5(c).F==null){var K=new dg([6,45],this);K.data={d:j,a:V,F:new eM.zM};c.kp(K);
this.Tz(K.data,c)}}if(j==eM.aq){if(c.g.length!=1)return;var V=c.g[0];if(c.B[V].U5(c).F!=null){var K=new dg([6,46],this);
K.data={d:j,a:V,F:c.B[V].U5(c).F};c.kp(K);this.Tz(K.data,c)}}if(j==eM.Hy){if(x.src==null&&c.g.length!=1)return;
if(x.src!=null)U=x.src;if(c.B[U].Oz()){var K=new dg([6,47],this),d8=JSON.stringify(c.B[U].add.SoLd),fj=JSON.parse(d8);
delete fj.filterFX;K.data={d:eM.JY,$q:[{nL:U,hN:[d8,JSON.stringify(fj)],lt:[c.B[U].U5(c),null]}]};c.kp(K);
this.Tz(K.data,c)}}if(j==eM.Vo){if(c.g.length!=1)return;if(i.add.vmsk==null){var K=new dg([6,23],this),ia=c.zo(),gs=ia[1],ia=ia[0],ab,gZ;
if(x.aCY&&gs.length!=0){var gi=ia[gs[0]].add;ab=gi.vmsk.clone();gZ=gi.vogk}else{ab=new eM.hn;gZ=[];ab.$[1].all=x.yk?0:1}K.data={d:j,a:U,Fi:!0,F:ab,eV:JSON.stringify(gZ),XM:null};
if(i.Z6()){K.data.XM=Stroke.XM.$H(!0)}c.kp(K);this.Tz(K.data,c)}}if(j==eM.Gu){var iE=c.B[x.src],e9=c.B[x.qC];
if(e9.add.vmsk)return;var K=new dg([6,23],this),eJ=iE.add.vmsk;K.data={a:x.qC,Fi:iE.Et,F:eJ.clone(),eV:JSON.stringify(iE.add.vogk),XM:iE.add.vstk?JSON.stringify(iE.add.vstk):null};
if(b){K.data.d=eM.Vo}else{K.data.d=j;K.data.src=x.src;K.data.qC=x.qC}c.kp(K);this.Tz(K.data,c)}if(j==eM.T7||j==eM.ld){if(c.g.length!=1)return;
var Y=c.B[U],eJ=Y.add.vmsk;if(eJ!=null){var io=j==eM.ld,K=new dg(io?[6,8]:[6,24],this);K.data={d:eM.T7,a:U,Fi:Y.Et,F:eJ,eV:JSON.stringify(Y.add.vogk),XM:Y.add.vstk?JSON.stringify(Y.add.vstk):null};
if(io){K.data.OE=eJ.Rz(Y.add.vstk)}c.kp(K);this.Tz(K.data,c)}}if(j==eM.yp){var K=new dg("Metadata",this);
K.data={d:j,N$:JSON.stringify(c.hD),MV:JSON.stringify(x.MV)};c.kp(K);this.Tz(K.data,c)}if(j==eM.iz){var eZ=x.qC?x.qC:c,aw=eZ.name,dG=x.b+".psd";
if(aw==dG)return;var K=new dg([6,37],this);K.data={d:j,aji:aw,BW:dG};if(x.ajw!=!0)eZ.kp(K);this.Tz(K.data,eZ)}if(j==eM.mn&&x.Zq.endsWith("makeframes")){var cb=[],iz=x.Zq.startsWith("make");
for(var F=0;F<c.g.length;F++){var G=c.g[F],Y=c.B[G],jT=Y.getName(),d_=jT.startsWith("_a_");if(iz==d_||Y.add.lsct==hA.oA)continue;
var jM=iz?"_a_"+jT:jT.slice(3);cb.push([G,jT,jM,Y.add.lnsr,null])}var K=new dg([6,37],this);K.data={d:eM.ZH,hF:cb};
c.kp(K);this.Tz(K.data,c)}if(j==eM.ZH){var aw=i.getName(),dG=x.name.substring(0,255);if(aw==dG)return;
var K=new dg([6,37],this);K.data={d:j,hF:[[U,aw,dG,i.add.lnsr,null]]};c.kp(K);this.Tz(K.data,c);this.track(ep.QF("Nm",{t:"TEXT",v:dG}))}if(j==eM.rb){var b8=c.zi(),i6=[],hT=[];
for(var F=0;F<b8.length;F++){i6.push(c.B[b8[F]].add.lclr);hT.push(x.aDo)}var K=new dg([6,38],this);K.data={d:j,B:b8,agH:i6,hP:hT};
c.kp(K);this.Tz(K.data,c)}if(j==eM.tA){var K=c.history[c.FS];if(K!=null&&K.f==this&&K.data.d==j&&K.data.a==x.tV&&K.data.j7.G$==x.nk.G$)K.data.j7=x.nk;
else{K=new dg("Mask Density / Feather",this);K.data={d:j,a:x.tV,ZR:c.B[x.tV].qq(x.nk.G$),j7:x.nk};c.kp(K)}this.Tz(K.data,c)}if(j==eM.KE){var c0=JSON.stringify(x.b),hy=JSON.parse(c0),K=c.history[c.FS];
if(K!=null&&K.f==this&&K.data.d==j&&K.data.jJ==x.jJ&&K.data.PG.join(",")==x.PG.join(",")){for(var F=0;
F<x.PG.length;F++)K.data.$g[F]=hy;if(K.data.dx&&hy.bf!=0)X.de.WH(hy.WB,K.data.dx.T.v,hy.bf-1)}else{K=new dg([11,6],this);
K.data={d:j,PG:x.PG,jJ:x.jJ,aph:[],$g:[]};var bl=!1;for(var F=0;F<x.PG.length;F++){var G=x.PG[F],Y=c.B[G],hj=x.jJ?aF.L$(Y.add):JSON.parse(JSON.stringify(Y.add.vstk));
K.data.aph.push(hj);K.data.$g.push(hy);if(JSON.stringify(hj)!=c0)bl=!0}if(!bl)return;c.kp(K);if(x.jJ&&hy.bf>0){var ik=K.data.dx={classID:"setd",null:ep.QP("contentLayer",!0),T:{t:"Objc",v:{}}};
X.de.WH(hy.WB,ik.T.v,hy.bf-1);this.track({q4:"set",dx:ik})}}if(x.jJ&&hy.bf==3)c.uh(en.yr(hy.WB.Ptrn.v,z.Yf));
if(!x.jJ){var hv=hy.strokeStyleContent.v;if(hv.classID==aF.XM.R7[2])c.uh(en.yr(hv.Ptrn.v,z.Yf))}this.Tz(K.data,c)}};
X.de.Ag=function(x,Q,c,$,z,j){var U=x.B[c],i=[];if(z)i=x.B.slice(0);else for(var F=0;F<x.B.length;F++)if(Q.indexOf(F)==-1)i.push(x.B[F]);
var b=i.indexOf(U);if(j&&U.Uy()&&U.add.lsct==hA.H3)b-=x.Sa(c).length-1;var e=[];for(var F=0;F<Q.length;
F++){var k=b+($?0:1)+F,K=z?z[F]:x.B[Q[F]];i.splice(k,0,K);e.push(k)}return[i,e,b]};X.de.WH=function(x,Q,c){var $=[aF.ZS,aF.ul,aF.qK][c];
if(Q.classID==null)Q.classID=["solidColorLayer","gradientLayer","patternLayer"][c];for(var F=0;F<$.length;
F++)if(x[$[F]])Q[$[F]]=JSON.parse(JSON.stringify(x[$[F]]))};X.de.a18=function(x){var Q=new eM.zM;if(x.u!=null){Q.color=0;
Q.channel=x.u.channel.slice(0);Q.rect=x.u.rect.clone()}return Q};X.de.qZ=function(x,Q,c,$,z){var j=$.m/c.m,U=$.e/c.e,i=$.m/2,b=$.e/2,e=d.A.Hg($).j;
for(var F=0;F<x.B.length;F++){var k=x.B[F],K=k.add.SoLd;if(K==null||K.Idnt.v!=Q)continue;var g=j!=1||U!=1;
if(g){var R=X.Y.e3(K.nonAffineTransform),T=d.D.u_(R,$),D=new bI;D.translate(-i,-b);D.scale(j,U);D.translate(i,b);
var a=d.D.Vi(T,d.D.Gr(D)),_=e.slice(0);d.D.i(a,_);K.Trnf=X.Y.TD(_);K.nonAffineTransform=X.Y.TD(_);if(d.fr.Cu(K.quiltWarp.v)){var I=K.quiltWarp.v.bounds.v;
I.Rght.v.val=$.m;I.Btom.v.val=$.e}}k.bx(x,null,z,!g)}x.c()};X.de.a0L=function(x,Q,c){Q.color=255-Q.color;
d.HQ(Q.channel);Q.ha=!0;x.kT(c);c.c()};X.de.prototype.pC=function(x,Q){var c=x.d,$=Q.B[x.a];Q.tP=!0;
if(c==eM.aY){Q.add.lnk2.splice(Q.add.lnk2.indexOf(x.Tp),1,x.iI);X.de.qZ(Q,x.id,x.Tp.iw[1],x.iI.iw[1])}if(c==eM.Z3){$.add.SoLd.Impr.v.classID=x.ZR;
$.bx(Q)}if(c==eM.BT){var z=JSON.parse(x.PG);for(var F=0;F<z.length;F++)Q.B[z[F]].s3=x.Q6[F];Q.c()}if(c==eM.ML){var z=JSON.parse(x.PG);
for(var F=0;F<z.length;F++)Q.B[z[F]].opacity=x.Q6[F];Q.c()}if(c==eM.HC){var z=JSON.parse(x.PG);for(var F=0;
F<z.length;F++)if(Q.B[z[F]].add.lsct!=hA.oA)Q.B[z[F]].add.lspf=x.Q6[F]}if(c==eM._$){var j=x.W8,U=x.amT;
delete $.add[j[0]];if(U[0]!="----")$.add[U[0]]=U[1]}if(c==eM.tZ){$.add.iOpa=x.Q6;Q.c()}if(c==eM.Ul){for(var F=0;
F<x.PG.length;F++){var i=Q.B[x.PG[F]];i.KW(!i.M5())}Q.c()}if(c==eM.wr){var b=$.Rz();b.isEnabled=!b.isEnabled;
$.kT(Q);Q.c()}if(c==eM.mS){var b=$.U5(Q).F;b.isEnabled=!b.isEnabled;$.c();Q.c()}if(c==eM.TK){var b=$.add.vmsk;
b.isEnabled=!b.isEnabled;if(!b.isEnabled){if($.OE){$.F=$.OE;$.OE=null}else $.F=null}else if($.F){$.OE=$.F;
$.F=null}$.kT(Q);Q.c()}if(c==eM.DF){$.cG=!$.cG;Q.c()}if(c==eM.sJ){$.add.lmfx.masterFXSwitch.v=!$.add.lmfx.masterFXSwitch.v;
$.ft.JP=!0;Q.c()}if(c==eM.l9){$.add.SoLd.filterFX.v.enab.v=!$.add.SoLd.filterFX.v.enab.v;$.o1(Q);Q.c()}if(c==eM.IB){var e=x.index,k=$.add.lmfx[aF.mh[e[0]]].v[e[1]].v;
k.enab.v=!k.enab.v;$.ft.JP=!0;Q.c()}if(c==eM.E1){var K=Q.B[x.rE],g=Q.B[x.gc],R=x.aem,T=x.aat;if(R=="")delete K.add.lmfx;
else K.add.lmfx=JSON.parse(R);if(T=="")delete g.add.lmfx;else g.add.lmfx=JSON.parse(T);K.ft.JP=!0;g.ft.JP=!0;
Q.c()}if(c==eM.z6){var D=$.add.SoLd.filterFX.v.filterFXList.v[x.index].v;D.enab.v=!D.enab.v;$.o1(Q);
Q.c()}if(c==eM.akX){$.add.SoLd.filterFX.v=JSON.parse(JSON.stringify(x.aB5));$.o1(Q);Q.c()}if(c==eM.$R){var b=$.Rz();
b.uz=!b.uz}if(c==eM.YL){var b=$.add.vmsk;b.uz=!b.uz}if(c==eM.gh){var a=JSON.parse(x.a47);Q.vB=a[0];Q.x8=a[1]}if(c==eM.on){var a=x.n3;
for(var F=0;F<a.length;F+=2){var _=a[F],i=_>=0?Q.B[_]:Q.iL[-1-_];i.add.vogk=JSON.parse(a[F+1]);d.eV.Rt(i.add.vogk,i.add.vmsk);
if(_>=0)i.kT(Q)}Q.c()}if(c==eM.MU){$.add.artb=JSON.parse(x.ars);Q.c();X.r7.zh(Q,x)}if(c==eM.Rd){Q.u=x.Cj;
if(x.agY)Q.Q.O=x.agY.slice(0);Q.fG=x.n3.slice(0);Q.oW=x.dh.slice(0);Q.vu=Q.Fq=!0}if(c==eM.wN){$.Rm=!$.Rm}if(c==eM.v6){var I=x.a3G;
for(var F=0;F<I.length;F++)Q.B[F].to=I[F]}if(c==eM.ty){if(x.ol)X.qV.vS(Q,Q.g,null,-x.ol.x,-x.ol.y);if(x.xa)Q.g=x.xa;
if(x.Bt)Q.u=x.Bt[0];Q.ZQ=null;Q.c();X.r7.zh(Q,x);Q.Bd(x.GF);if(x.l5)Q.tF(x.l5[0])}if(c==eM.tW){for(var F=0;
F<x.yD.length;F+=3)X.de.z9(Q,Q.B[x.yD[F]],x.yD[F+1]);if(x.Bt){var f=x.Bt[0];if(f==null)delete Q.u;else Q.u=f}if(x.a43){var i=Q.B[x.yD[0]];
d.Dm(x.yD[2].channel,i.buffer,3)}}if(c==eM.XE){$.U5(Q).F=null;$.c();Q.c()}if(c==eM.aq){$.U5(Q).F=x.F;
$.c();Q.c()}if(c==eM.JY){X.de.a1j(Q,x.$q,0)}if(c==eM.Vo){X.de.n4(Q,$,!0)}if(c==eM.Gu){X.de.n4(Q,Q.B[x.qC],x.F.isEnabled);
X.de.wA(Q,Q.B[x.src],x)}if(c==eM.T7){if(x.OE)X.de.z9(Q,$,null);X.de.wA(Q,$,x)}if(c==eM.yp){Q.hD=JSON.parse(x.N$)}if(c==eM.iz){Q.name=x.aji}if(c==eM.ZH){for(var F=0;
F<x.hF.length;F++){var y=x.hF[F],i=Q.B[y[0]];i.gF(y[1]);if(y[3])i.add.lnsr=y[3];else delete i.add.lnsr}}if(c==eM.rb){for(var F=0;
F<x.B.length;F++)Q.B[x.B[F]].add.lclr=x.agH[F]}if(c==eM.KE){var Z=x.aph;for(var F=0;F<x.PG.length;F++){var i=Q.B[x.PG[F]],v=Z[F];
if(!x.jJ)i.add.vstk=JSON.parse(JSON.stringify(v));else aF.C4(i.add,JSON.parse(JSON.stringify(v)));i.om(Q)}Q.c()}if(c==eM.tA){$.any(x.ZR);
$.kT(Q);Q.c()}Q.Fq=!0};X.de.prototype.Tz=function(x,Q){var c=x.d,$=Q.B[x.a];Q.tP=!0;if(c==eM.aY){Q.add.lnk2.splice(Q.add.lnk2.indexOf(x.iI),1,x.Tp);
X.de.qZ(Q,x.id,x.iI.iw[1],x.Tp.iw[1])}if(c==eM.Z3){$.add.SoLd.Impr.v.classID=x.j7;$.bx(Q)}if(c==eM.BT){var z=JSON.parse(x.PG);
for(var F=0;F<z.length;F++)Q.B[z[F]].s3=x.j7;Q.c()}if(c==eM.ML){var z=JSON.parse(x.PG);for(var F=0;F<z.length;
F++)Q.B[z[F]].opacity=x.j7;Q.c()}if(c==eM.HC){var z=JSON.parse(x.PG);for(var F=0;F<z.length;F++)if(Q.B[z[F]].add.lsct!=hA.oA)Q.B[z[F]].add.lspf=x.j7[F]}if(c==eM._$){var j=x.amT,U=x.W8;
delete $.add[j[0]];if(U[0]!="----")$.add[U[0]]=U[1]}if(c==eM.tZ){$.add.iOpa=x.j7;Q.c()}if(c==eM.Ul){for(var F=0;
F<x.PG.length;F++){var i=Q.B[x.PG[F]];i.KW(!i.M5())}Q.c()}if(c==eM.wr){var b=$.Rz();b.isEnabled=!b.isEnabled;
$.kT(Q);Q.c()}if(c==eM.mS){var b=$.U5(Q).F;b.isEnabled=!b.isEnabled;$.c();Q.c()}if(c==eM.TK){var b=$.add.vmsk;
b.isEnabled=!b.isEnabled;if(!b.isEnabled){if($.OE){$.F=$.OE;$.OE=null}else $.F=null}else if($.F){$.OE=$.F;
$.F=null}$.kT(Q);Q.c()}if(c==eM.DF){$.cG=!$.cG;Q.c()}if(c==eM.sJ){$.add.lmfx.masterFXSwitch.v=!$.add.lmfx.masterFXSwitch.v;
$.ft.JP=!0;Q.c()}if(c==eM.l9){$.add.SoLd.filterFX.v.enab.v=!$.add.SoLd.filterFX.v.enab.v;$.o1(Q);Q.c()}if(c==eM.IB){var e=x.index,k=$.add.lmfx[aF.mh[e[0]]].v[e[1]].v;
k.enab.v=!k.enab.v;$.ft.JP=!0;Q.c()}if(c==eM.E1){var K=Q.B[x.rE],g=Q.B[x.gc],R=x.ab5,T=x.a8o;if(R=="")delete K.add.lmfx;
else K.add.lmfx=JSON.parse(R);if(T=="")delete g.add.lmfx;else g.add.lmfx=JSON.parse(T);K.ft.JP=!0;g.ft.JP=!0;
Q.c()}if(c==eM.z6){var D=$.add.SoLd.filterFX.v.filterFXList.v[x.index].v;D.enab.v=!D.enab.v;$.o1(Q);
Q.c()}if(c==eM.akX){$.add.SoLd.filterFX.v=JSON.parse(JSON.stringify(x.ayW));$.o1(Q);Q.c()}if(c==eM.$R){var b=$.Rz();
b.uz=!b.uz}if(c==eM.YL){var b=$.add.vmsk;b.uz=!b.uz}if(c==eM.gh){var a=JSON.parse(x.al3);Q.vB=a[0];Q.x8=a[1]}if(c==eM.on){var a=x.WC;
for(var F=0;F<a.length;F+=2){var _=a[F],i=_>=0?Q.B[_]:Q.iL[-1-_];i.add.vogk=JSON.parse(a[F+1]);d.eV.Rt(i.add.vogk,i.add.vmsk);
if(_>=0)i.kT(Q)}Q.c()}if(c==eM.MU){$.add.artb=JSON.parse(x.xz);Q.c();X.r7.sq(Q,x)}if(c==eM.Rd){Q.u=x.UI;
if(x.ap9)Q.Q.O=x.ap9.slice(0);Q.fG=x.WC.slice(0);Q.oW=x.z0.slice(0);Q.vu=Q.Fq=!0}if(c==eM.wN){$.Rm=!$.Rm}if(c==eM.v6){var I=x.a7Y;
for(var F=0;F<I.length;F++)Q.B[F].to=I[F]}if(c==eM.ty){Q.asc();var f=x.Yo,y=0,Z;for(var F=0;F<f.length;
F++){var i=f[F],v=i.add.lsct;if(v==hA.oA)y++;else if(v==hA.DJ||v==hA.H3)y--;if(i.add.artb&&y!=0)Z="Artboards can not be inside folders."}if(Z){Q.history.pop();
Q.FS--;alert(Z);return}if(x.z2)Q.g=x.z2;if(x.Bt)Q.u=x.Bt[1];Q.ZQ=null;Q.c();Q.Bd(x.Yo);X.r7.sq(Q,x);
if(x.ol)X.qV.vS(Q,Q.g,null,x.ol.x,x.ol.y);if(x.l5)Q.tF(x.l5[1])}if(c==eM.tW){for(var F=0;F<x.yD.length;
F+=3)X.de.z9(Q,Q.B[x.yD[F]],x.yD[F+2]);if(x.Bt){var G=x.Bt[1];if(G==null)delete Q.u;else Q.u=G}if(x.a43){var i=Q.B[x.yD[0]],q=i.buffer;
for(var F=0;F<q.length;F+=4)q[F+3]=255}}if(c==eM.XE){$.U5(Q).F=x.F;$.kk=0;$.c();Q.c()}if(c==eM.aq){$.U5(Q).F=null;
$.kk=0;$.c();Q.c()}if(c==eM.JY){X.de.a1j(Q,x.$q,1)}if(c==eM.Vo){X.de.wA(Q,$,x)}if(c==eM.Gu){X.de.n4(Q,Q.B[x.src],x.F.isEnabled);
X.de.wA(Q,Q.B[x.qC],x)}if(c==eM.T7){X.de.n4(Q,$,x.F.isEnabled);if(x.OE)X.de.z9(Q,$,x.OE)}if(c==eM.yp){Q.hD=JSON.parse(x.MV)}if(c==eM.iz){Q.name=x.BW}if(c==eM.ZH){for(var F=0;
F<x.hF.length;F++){var h=x.hF[F],i=Q.B[h[0]];i.gF(h[2]);if(h[4])i.add.lnsr=h[4];else delete i.add.lnsr}}if(c==eM.rb){for(var F=0;
F<x.B.length;F++)Q.B[x.B[F]].add.lclr=x.hP[F]}if(c==eM.KE){var r=x.$g;for(var F=0;F<x.PG.length;F++){var i=Q.B[x.PG[F]],H=r[F];
if(!x.jJ)i.add.vstk=JSON.parse(JSON.stringify(H));else aF.C4(i.add,JSON.parse(JSON.stringify(H)));i.om(Q)}Q.c()}if(c==eM.tA){$.any(x.j7);
$.kT(Q);Q.c()}Q.Fq=!0};X.de.fE=function(x,Q){var c=0;for(var F=0;F<x.B.length;F++){var $=x.B[F].getName();
if($.startsWith(Q)){var z=$.slice(Q.length).trim(),j=parseInt(z);if(!isNaN(j)&&j+""==z&&j>c)c=j}}return c};
X.de.a1j=function(x,Q,c){for(var F=0;F<Q.length;F++){var $=Q[F],z=x.B[$.nL];if($.hN){z.add.SoLd=JSON.parse($.hN[c])}if($.lt){if($.lt[1-c]!=null)x.e1($.lt[1-c]);
if($.lt[c]!=null)x.C3($.lt[c]);else z.kk=0}z.bx(x)}};X.de.aow=function(x,Q){var c=x.h1,$=x.rect.clone();
if(c!=null&&(c.x!=Q.m||c.y!=Q.e)){$.x=Math.floor((Q.m-$.m)/2);$.y=Math.floor((Q.e-$.e)/2)}else if(c==null){var z=new gh(0,0,Q.m,Q.e),j=Q.lG();
if(j!=-1)z=Q.B[j].Dd();$.x+=z.x;$.y+=z.y}return $};X.de.aAk=function(x,Q){if(Q.OE)Q.OE=null;else Q.F=null;
Q.kT(x);x.c();Q.kk=0};X.de.z9=function(x,Q,c){var $=Q.Rz();if($==null&&c==null)return;if($)X.de.aAk(x,Q);
if(c==null)return;if(Q.F)Q.OE=c;else Q.F=c;Q.kT(x);x.c()};X.de.n4=function(x,Q,c){if(Q.OE&&c){Q.F=Q.OE;
Q.OE=null}else if(Q.F&&c){Q.F=null}delete Q.add.vogk;delete Q.add.vstk;delete Q.add.vmsk;Q.kT(x);Q.Et=!1;
x.ZQ=[];x.c()};X.de.wA=function(x,Q,c){Q.add.vogk=JSON.parse(c.eV);if(c.XM)Q.add.vstk=JSON.parse(c.XM);
else delete Q.add.vstk;Q.add.vmsk=c.F.clone();if(Q.F&&Q.add.vmsk.isEnabled)Q.OE=Q.F;Q.kT(x);Q.Et=c.Fi;
x.ZQ=[x.B.indexOf(Q)];x.IH=[];x.c()};X.so=function(){X.Ur.call(this,"Layer Styles",X.vR);this.L1=null;
this.FX=null;this.zy=null;this.lF=[];this.Kd=null};X.so.prototype=new X.Ur;X.so.prototype.To=function(x,Q,c,$,z){var j=x.a;
if(j==null)j=c.g[0];var U=c.B[j],i=x.xR;if(this.L1==null){this.zy=X.so.h6(c,U);this.L1=JSON.stringify(this.zy);
if(U.add.lmfx)this.FX=JSON.stringify(U.add.lmfx)}if(U.add.lmfx==null){U.add.lmfx=JSON.parse(aF.default);
for(var F=0;F<aF.order.length;F++)U.add.lmfx[aF.mh[F]]={t:"VlLs",v:[]}}if(x.d=="scaleeffects"){if(x.b=="confirm"||x.b=="cancel"){this.To({d:x.b},Q,c,$,z);
return}U.add.lmfx=JSON.parse(this.FX);en.pa(U.add.lmfx,x.b/100)}else if(x.d=="changeprop"){var b=null;
if(i!=0){var e=this.lF[i[0]];if(e==null)e=aF.lF[i[0]];e=JSON.parse(e);var k=U.add.lmfx[aF.mh[i[0]]].v;
if(k[i[1]]==null)k[i[1]]={t:"Objc",v:e};b=k[i[1]].v;for(var K in e)if(b[K]==null)b[K]=e[K]}if(x.d=="changeprop"){if(i==0){this.zy[x.Wm].v=x.b;
X.so.mm(c,U,this.zy)}else if(x.Wm=="lagl"){if(b.uglg&&b.uglg.v){c.tK(x.b.val);this.zy.gagl.v.val=c.FO()}else b[x.Wm].v=x.b}else if(x.Wm=="Lald"){if(b.uglg.v){c.nx(x.b.val);
this.zy.azO=c.dG()}else b[x.Wm].v=x.b}else if((i[0]==3||i[0]==8)&&(x.Wm=="Clr"||x.Wm=="Grad")){if(x.Wm=="Clr"){b.Clr={t:"Objc",v:x.b};
delete b.Grad}if(x.Wm=="Grad"){b.Grad={t:"Objc",v:x.b};delete b.Clr}}else{b[x.Wm].v=x.b}if(i!=0)this.lF[i[0]]=JSON.stringify(b)}if(i!=0)if(b.Ptrn)c.uh(en.yr(b.Ptrn.v,z.Yf))}else if(x.d=="setstl"){var g=x.b.Lefx;
if(g)en.a7D(g,c,z.Yf);en.awe(x.b,U,null,c);this.zy=X.so.h6(c,U)}else if(x.d=="st_dupsingle"){var R=U.add.lmfx[aF.mh[x.qM[0]]].v;
if(R[x.qM[1]]==null)return;var T=JSON.parse(JSON.stringify(R[x.qM[1]]));R.splice(x.qM[1],0,T)}else if(x.d=="st_movsingle"){var D=x.qM[1],R=U.add.lmfx[aF.mh[x.qM[0]]].v;
if(R[x.qM[1]]==null)return;var a=Math.max(0,Math.min(R.length-1,D+x.agi)),_=R[a];R[a]=R[D];R[D]=_}else if(x.d=="cancel"){if(this.FX==null)delete U.add.lmfx;
else U.add.lmfx=JSON.parse(this.FX);X.so.mm(c,U,JSON.parse(this.L1));this.L1=null;this.FX=null}else if(x.d=="confirm"){var I=JSON.stringify(U.add.lmfx),f=new dg([11,6],this);
f.data={B:[j],M6:[this.FX],Ib:[I],tn:[this.L1],YM:[JSON.stringify(this.zy)]};c.kp(f);this.L1=null;this.FX=null;
if(I!=null){var y=JSON.parse(I);hz.p6(y);y.classID="Lefx";delete y.masterFXSwitch;var Z=new jO(u.E.G2);
Z.Oe=!0;Z.data={q4:"set",jT:!0};var v=ep.QP("Lyr",!0);v.v.splice(0,0,{t:"prop",v:{classID:"Prpr",keyID:"Lefx"}});
Z.data.dx={__name:"Set",classID:"setd",null:v,T:{t:"Objc",v:y}};Q.T(Z)}}else if(x.d=="st_copy"){this.Kd=[this.L1,this.FX];
this.L1=null;this.FX=null}else if(x.d=="st_paste"||x.d=="st_clear"){if(x.d=="st_paste"&&this.Kd==null)return;
var G=x.a!=null?[x.a]:c.g.slice(0),q=[],h=[],r=[],H=[];for(var F=0;F<G.length;F++){var U=c.B[G[F]],o=X.so.h6(c,U);
q.push(U.add.lmfx?JSON.stringify(U.add.lmfx):null);r.push(JSON.stringify(o));if(x.d=="st_paste"){h.push(this.Kd[1]);
H.push(this.Kd[0])}else{h.push(null);o.lrMd.v=0;o.Opct.v.val=100;o.iOpa.v.val=100;o.blIf={v:[]};for(var P=0;
P<10;P++)o.blIf.v.push(0,0,255,255);H.push(JSON.stringify(o))}}var f=new dg([11,6],this);f.data={B:G,M6:q,Ib:h,tn:r,YM:H};
this.Tz(f.data,c);c.kp(f);this.L1=null;this.FX=null}else{var O=this.zy,y=null;if(x.d=="st_delsingle"){y=JSON.parse(this.FX);
y[aF.mh[x.qM[0]]].v.splice(x.qM[1],1);y=JSON.stringify(y)}if(y==null)delete U.add.lmfx;else U.add.lmfx=JSON.parse(y);
if(O!=null)X.so.mm(c,U,O);var f=new dg([11,6],this);f.data={B:[x.a],M6:[this.FX],Ib:[y],tn:[this.L1],YM:[JSON.stringify(O)]};
c.kp(f);this.L1=null;this.FX=null}U.ft.JP=!0;c.tP=!0;c.c()};X.so.h6=function(x,Q){if(Q.add.iOpa==null)Q.add.iOpa=255;
if(Q.add.brst==null)Q.add.brst=[1,1,1];var c=Q.Uy()?["pass"].concat(cq.X$):cq.X$;return{lrMd:{v:c.indexOf(Q.s3)},Opct:{v:{type:"#Prc",val:Math.round(Q.opacity*100/255)},t:"UntF"},iOpa:{v:{type:"#Prc",val:Math.round(Q.add.iOpa*100/255)},t:"UntF"},blIf:{v:Q.uJ.slice(0)},brst:{v:Q.add.brst},gagl:{t:"UntF",v:{type:"#Ang",val:x.FO()}},azO:x.dG(),Uy:Q.Uy()}};
X.so.mm=function(x,Q,c){var $=Q.Uy()?["pass"].concat(cq.X$):cq.X$;Q.s3=$[c.lrMd.v];Q.opacity=Math.round(c.Opct.v.val*255/100);
Q.add.iOpa=Math.round(c.iOpa.v.val*255/100);Q.uJ=c.blIf.v.slice(0);Q.add.brst=c.brst.v.slice(0);x.tK(c.gagl.v.val);
x.nx(c.azO)};X.so.prototype.pC=function(x,Q){for(var F=0;F<x.B.length;F++){var c=Q.B[x.B[F]],$=x.M6[F];
if($==null)delete c.add.lmfx;else c.add.lmfx=JSON.parse($);X.so.mm(Q,c,JSON.parse(x.tn[F]));c.ft.JP=!0}Q.tP=!0;
Q.c()};X.so.prototype.Tz=function(x,Q){for(var F=0;F<x.B.length;F++){var c=Q.B[x.B[F]],$=x.Ib[F];if($==null)delete c.add.lmfx;
else c.add.lmfx=JSON.parse($);X.so.mm(Q,c,JSON.parse(x.YM[F]));c.ft.JP=!0}Q.tP=!0;Q.c()};X.T8=function(){X.Ur.call(this,"Layer Comps",X.yd)};
X.T8.prototype=new X.Ur;X.T8.prototype.To=function(x,Q,c,$){var z=JSON.parse(JSON.stringify(c.A2)),j=JSON.parse(JSON.stringify(c.A2)),U=null,i=null,b=null,e=-1,k=!1;
if(x.d=="delLC"){var K=X.T8.nj(c.A2,x.xR),g=c.A2.lastAppliedComp?c.A2.lastAppliedComp.v:0;j.list.v.splice(K,1);
if(g==x.xR)delete j.lastAppliedComp;U="Delete Layer Comp"}if(x.d=="editLC"){var K=X.T8.nj(c.A2,x.xR),R=j.list.v[K].v;
if(x.BW!=null)R.Nm.v=x.BW;if(x.avc!=null){var T=x.avc,D=R.capturedInfo.v,a=D&(1<<T)-1;D=D>>T;if((D&1)==1)D--;
else D++;R.capturedInfo.v=(D<<T)+a}U="Layer Comp properties"}if(x.d=="setLC"){X.T8.LY(c);if(x.xR==0)delete j.lastAppliedComp;
else j.lastAppliedComp={t:"long",v:x.xR};U="Switch Layer Comp";k=!0}if(x.d=="updLC"){X.T8.LY(c);i=X.T8.atl(c,x.xR);
b=X.T8.e7(c,x.xR);j.lastAppliedComp={t:"long",v:x.xR};U="Update Layer Comp";e=x.xR;k=!0}if(x.d=="addLC"){X.T8.LY(c);
var _=1;for(var F=0;F<j.list.v.length;F++)_=Math.max(_,j.list.v[F].v.compID.v)+1;_+=Math.floor(Math.random()*1e4);
var I={t:"Objc",v:{classID:"Comp",Nm:{t:"TEXT",v:"New Comp "+(j.list.v.length+1)},compID:{t:"long",v:_},capturedInfo:{t:"long",v:7}}};
j.list.v.push(I);j.lastAppliedComp={t:"long",v:_};U="New Layer Comp";var f=X.T8.e7(c,_);X.T8.bj(c,f,_)}var y=new dg(U,this);
y.data={a4t:z,axA:j,arv:i,atB:b,xR:e,Zi:k};this.Tz(y.data,c);c.kp(y)};X.T8.prototype.Tz=function(x,Q){Q.A2=x.axA;
Q.tP=!0;if(x.atB)X.T8.bj(Q,x.atB,x.xR);if(x.Zi){var c=Q.A2.lastAppliedComp?Q.A2.lastAppliedComp.v:0,$=X.T8.nj(Q.A2,c),z=$==-1?null:Q.A2.list.v[$].v,j=z?z.capturedInfo.v:7;
X.T8.nG(Q,c,j);Q.c()}};X.T8.prototype.pC=function(x,Q){Q.A2=x.a4t;Q.tP=!0;if(x.arv)X.T8.bj(Q,x.arv,x.xR);
if(x.Zi){var c=Q.A2.lastAppliedComp?Q.A2.lastAppliedComp.v:0,$=X.T8.nj(Q.A2,c),z=$==-1?null:Q.A2.list.v[$].v,j=z?z.capturedInfo.v:7;
X.T8.nG(Q,c,j);Q.c()}};X.T8.LY=function(x){if(x.A2.lastAppliedComp!=null||!x.Dl)return;var Q=X.T8.e7(x,0);
X.T8.bj(x,Q,0);x.Dl=!1};X.T8.BY=function(x,Q,c){x.v.Hrzn.v+=Q;x.v.Vrtc.v+=c};X.T8.nj=function(x,Q){var c=x.list.v;
for(var F=0;F<c.length;F++)if(c[F].v.compID.v==Q)return F;return-1};X.T8.a0H=function(x){var Q=x.layerSettings.v,z=null;
if(Q.length==0)return;var c="compList enab Ofst blendOptions Lefx FXRefPoint imageMask vectorMask layerSpecific".split(" "),$=Q[0].v;
if($.enab==null)$.enab={t:"bool",v:!0};if($.Ofst==null)$.Ofst={t:"Objc",v:{classID:"null",Hrzn:{t:"long",v:0},Vrtc:{t:"long",v:0}}};
for(var F=0;F<Q.length;F++){var j=Q[F].v;if(z==null)z=JSON.parse(JSON.stringify(j));else for(var U=0;
U<c.length;U++){var i=c[U];if(j[i])z[i]=JSON.parse(JSON.stringify(j[i]))}Q[F].v=JSON.parse(JSON.stringify(z))}};
X.T8.ape=function(x,Q){var c=x.add.shmd.cmls,$=c.layerSettings.v;for(var z=0;z<$.length;z++){var j=$[z].v,U=j.compList.v[0].v;
if(U==Q)return z}return-1};X.T8.anh=function(x,Q){var c=X.T8.ape(x,Q);return c==-1?null:x.add.shmd.cmls.layerSettings.v[c].v};
X.T8.nG=function(x,Q,c){for(var F=0;F<x.B.length;F++){var $=x.B[F],z=$.add.shmd.cmls;if(z==null)continue;
var j=z.layerSettings.v,U=X.T8.anh($,Q);if(U==null){$.KW(!1);continue}if((c&1)!=0){if(U.enab)$.KW(U.enab.v);
else $.KW(!0)}if((c&2)!=0){if(U.Ofst){var i=U.Ofst.v,b=$.Q8(x),e=Math.round(i.Hrzn.v-b.x),k=Math.round(i.Vrtc.v-b.y);
if(e!=0||k!=0)X.qV.vS(x,[F],null,e,k)}}if((c&4)!=0){if(U.Lefx){var K=JSON.parse(JSON.stringify(U.Lefx.v));
hz.wo(K);if(JSON.stringify(K)!=JSON.stringify($.add.lmfx)){$.add.lmfx=K;$.ft.JP=!0}}else delete $.add.lmfx;
if(U.blendOptions){var g=U.blendOptions.v;if(g.Opct)$.opacity=Math.round(255*g.Opct.v.val/100);if(g.fillOpacity)$.add.iOpa=Math.round(255*g.fillOpacity.v.val/100);
if(g.Md)$.s3=$.add.lsct==hA.oA?"norm":cq.Rg(g.Md.v.BlnM)}else{$.opacity=255;$.s3=$.Uy()?"pass":"norm";
$.add.iOpa=255}}}};X.T8.atl=function(x,Q){var c={};for(var F=0;F<x.B.length;F++){var $=x.B[F];if($.add.shmd==null||$.add.shmd.cmls==null)continue;
c["l"+$.add.lyid]=JSON.parse(JSON.stringify(X.T8.anh($,Q)))}return c};X.T8.e7=function(x,Q){var c={};
for(var F=0;F<x.B.length;F++){var $=x.B[F],z=$.add.lyid;c["l"+z]=X.T8.aBS(x,$,Q)}return c};X.T8.aBS=function(x,Q,c){var $=Q.add.shmd?Q.add.shmd.cmls:null,z={classID:"null"},j=Q.Q8(x),U={t:"Objc",v:{classID:"null",Hrzn:{t:"long",v:j.x},Vrtc:{t:"long",v:j.y}}};
z.compList={t:"VlLs",v:[{t:"long",v:c}]};z.enab={t:"bool",v:Q.M5()};z.Ofst=JSON.parse(JSON.stringify(U));
z.FXRefPoint=JSON.parse(JSON.stringify($&&$.origFXRefPoint?$.origFXRefPoint:U));z.blendOptions={t:"Objc",v:{classID:"null",Md:{t:"enum",v:{BlnM:cq.DU(Q.s3)}},Opct:{t:"UntF",v:{type:"#Prc",val:100*Q.opacity/255}},fillOpacity:{t:"UntF",v:{type:"#Prc",val:Q.add.iOpa!=null?100*Q.add.iOpa/255:100}}}};
if(Q.add.vmsk){z.vectorMask={t:"Objc",v:{classID:"null"}};z.vectorMask.v.Ofst=JSON.parse(JSON.stringify(U))}if(Q.add.lmfx){z.Lefx={t:"Objc",v:JSON.parse(JSON.stringify(Q.add.lmfx))};
hz.p6(z.Lefx.v)}return z};X.T8.a60=function(x,Q){var c=Q.add.lyid;if(Q.add.shmd==null)Q.add.shmd={};
if(Q.add.shmd.cmls==null){Q.add.shmd.cmls={classID:"null",LyrI:{t:"long",v:c},layerSettings:{t:"VlLs",v:[{t:"Objc",v:X.T8.aBS(x,Q,0)}]}}}};
X.T8.bj=function(x,Q,c){for(var F=0;F<x.B.length;F++){var $=x.B[F],z=$.add.lyid;X.T8.a60(x,$);var j=$.add.shmd.cmls,U=j.layerSettings.v,i=Q["l"+z];
if(i!=null)i={t:"Objc",v:JSON.parse(JSON.stringify(i))};var b=X.T8.ape($,c);if(b==-1){if(i==null)continue;
else U.push(i)}else{if(i==null)U.splice(b,1);else U[b]=i}}};X.T8.ds=function(x,Q){for(var F=0;F<x.B.length;
F++){var c=x.B[F],$=c.add.lyid;if(c.add.shmd==null||c.add.shmd.cmls==null)continue;var z=c.Q8(x),j=Math.round(z.x),U=Math.round(z.y);
if(!Q){j=-j;U=-U}var i=c.add.shmd.cmls,b=i.layerSettings.v;if(i.origFXRefPoint)X.T8.BY(i.origFXRefPoint,-j,-U);
for(var e=0;e<b.length;e++){var k=b[e].v;X.T8.BY(k.Ofst,j,U);var K=k.imageMask,g=k.vectorMask;if(K&&K.v.Ofst)X.T8.BY(K.v.Ofst,j,U);
if(g&&g.v.Ofst)X.T8.BY(g.v.Ofst,j,U)}}};X.vD=function(){X.Ur.call(this,"Adjust Edit",X.FQ);this.MV=null;
this.GH=null};X.vD.prototype=new X.Ur;X.vD.gZ=function(x,Q,c,$){if($)Q/=4;var z=0,j=0,U=255,i=0,b=0,e=255;
while(j+x[z]<Q){j+=x[z];z++}while(i+x[U]<Q){i+=x[U];U--}if($){z-=Math.round(x[z]/(c/32));U+=Math.round(x[U]/(c/32));
if(z<0)b=Math.round(-z*255/(U-z));if(U>255)e=255-Math.round((U-255)*255/(U-z))}return[Math.max(z,0),Math.min(U,255),b,e,100]};
X.vD.prototype.To=function(x,Q,c,$,z){var j=x.d;if(j=="auto"){var U=x.dw,i=X.vD.getData(c);for(var F=0;
F<i.length;F++){var b=i[F],e;if(U<3){}else{var k=fK.$H("hue2");hu.SU(k,0,[0,-100,0]);e=k5.hd("hue2",k)}k5.NH(e,b.aJ,b.AC,b.W4)}X.vD.yI(c,i);
X.vD.MD(c,i,U<3?[4,16,U]:[19,7,0],this);c.c()}if(j=="edit_layer")this.a8s(x,Q,c,$);if(j=="edit"||j=="confirm"||j=="cancel")this.FB(x,Q,c,z,!0);
if(j=="start"){if(c.g.length==0)return;var K=c.B[c.g[0]];if(K.add.SoLd&&K.kk<=0&&c.oW.length==0){var g=new jO(u.E.v,!0);
g.f=X.iT;g.data={d:"start",PU:x.wU,_B:x._B};Q.T(g);return}if(!c.VP(Q,null,!0))return;if(jH[x.wU]&&x._B==null){if(c.g.length!=1)alert("Will be applied to "+c.g.length+" layers.");
var g=new jO(u.E.M,!0);g.data={d:u.H.LL,AD:"afw_"+x.wU};Q.T(g)}else{this.FB({d:"edit",_B:x._B,PU:x.wU},Q,c,z);
this.FB({d:"confirm",PU:x.wU},Q,c,z)}}};X.vD.prototype.a8s=function(x,Q,c,$){var z=x.d,j=c.g[0],U=c.B[j],i=k5.get(U.add),g;
if(U.add[i]==null)return;var b=JSON.parse(JSON.stringify(U.add[i]));for(var e in x.b)b[e]=x.b[e];var k=JSON.parse(JSON.stringify(b));
for(var e in k5.HD)if(k5.HD[e]==i)k.classID=e;var K=c.history[c.FS];if(K&&K.f==this&&K.data.ZR!=null&&K.data.a==j)g=K;
else{var R=new jO(u.E.G2,!0),T={classID:"setd",null:ep.QP("AdjL",!0),T:{t:"Objc",v:k}};R.data={jT:!0,q4:"set",dx:T};
Q.T(R);var g=new dg([6,39],this);g.data={a:j,ZR:U.add[i],j7:b,s0:T};c.kp(g)}g.data.j7=b;g.data.s0.T.v=k;
this.Tz(g.data,c)};X.vD.getData=function(x,Q,c){var $=[],z=new gh(0,0,x.m,x.e),j=x.oW.length!=0?[-1-x.oW[0]]:x.g;
for(var F=0;F<j.length;F++){var U=j[F],i=U<0?null:x.B[U],b={a:U,y2:U<0?1:i.kk};$.push(b);var e=x.fG[-1-U];
if(0<=U)e=i.kk<=0?null:i.kk==1?i.Rz():i.U5(x).F;var k=e?e.rect:i.rect;if(x.u){b.W4=x.u.rect.y_(Q||e!=null?z:k)}else b.W4=Q||e!=null?k.iO(z):k.clone();
if(c)b.W4=c[F].W4.clone();var K=b.W4.P();b.aJ=d.R(K*4);if(e)X.x7.oO(e.channel,e.rect,e.color,b.aJ,b.W4);
else d.WK(i.buffer,k,b.aJ,b.W4);b.AC=b.aJ.slice(0);if(x.u){b.yD=d.R(K);d.L2(x.u.channel,x.u.rect,b.yD,b.W4)}}return $};
X.vD.ahe=function(x,Q,c){if(Q==null)return Q;var $=k5.m5(x,Q),j;if($==-1)return Q;var z=c.length>>>2,U=d.q9(c),i=.001*z;
if($==0||$==2)j=[[0,255,0,255,100],X.vD.gZ(U[1],i,z,$==2),X.vD.gZ(U[2],i,z,$==2),X.vD.gZ(U[3],i,z,$==2)];
if($==1)j=[X.vD.gZ(U[0],i*.33,z,!1),[0,255,0,255,100],[0,255,0,255,100],[0,255,0,255,100]];var b=fK.$H("levl");
for(var F=0;F<4;F++)bV.SU(b,F,j[F]);return b};X.vD.agn=function(x,Q,c,$){var z,j;if(c.t=="name"){var U=0;
for(var i=0;i<x.B.length;i++)if(x.B[i].getName()==c.v.val)U=i;if(x==Q&&U==$.a){z=$.aJ;j=$.W4}else{var b=x.B[U];
z=b.buffer;j=b.rect}}else{j=new gh(0,0,x.m,x.e);z=x==Q?$.QK:x.VY()}return[z,j]};X.vD.prototype.FB=function(x,Q,c,$){if(this.MV==null){if(x.PU=="aply")c.B[c.g[0]].extend(new gh(0,0,c.m,c.e));
this.MV=X.vD.getData(c,null,x.PU=="fade"?c.O2().data:null);if(x.PU=="aply"||x.PU=="matc")this.MV[0].QK=c.VY()}if(x.d=="edit"){this.GH=[x.PU,x._B];
var z=this.MV[0],j=X.vD.ahe(x.PU,x._B,z.aJ),U=k5.hd(x.PU,j);if(x.PU=="fade"||x.PU=="matc"||x.PU=="aply")U=x._B;
if(U!=null){for(var i=0;i<this.MV.length;i++){var b=this.MV[i];if(x.NQ)d.SO(b.aJ,b.AC);else if(x.PU=="fade"){var e=cq.Rg(x._B.Md.v.BlnM),k=x._B.Opct.v.val/100,K=c.O2().data[i];
d.SO(K.aJ,b.AC);if(e=="norm")d.l.$A(b.aJ,b.W4,b.AC,b.W4,null,null,null,b.W4,k);else{var g=en.co();g.N9=!0;
for(var F=0;F<K.aJ.length;F+=4)if(K.aJ[F+3]!=b.aJ[F+3]){g=null;break}d.l.UY(e,b.aJ,b.W4,b.AC,b.W4,b.W4,k,g)}}else if(x.PU=="matc"){var R;
if(U.noReference&&U.noReference.v)R=b.aJ;else{var T=U.Srce.v,D=T[1].v.val,a=Q.H0,_=c;for(var F=0;F<a.length;
F++)if(a[F].name==D)_=a[F];var I=X.vD.agn(_,c,T[0],b);R=I[0]}hi(b.aJ,b.W4.m,b.W4.e,R,b.AC,[U.Lght.v,U.ClrR.v,U.Fade.v,U.neutralizeColor?U.neutralizeColor.v:!1])}else if(x.PU=="aply"){U=U.With.v;
var f=U.T.v,I=X.vD.agn(c,c,f[1],b),R=I[0],y=I[1],Z=U.Clcl?U.Clcl.v.Clcn:null,e=Z?cq.Rg(Z):"norm",k=U.Opct?U.Opct.v.val/100:1,v=["RGB","Rd","Grn","Bl","Trsp"].indexOf(f[0].v.enum),j=U.Invr&&U.Invr.v;
if(j||v!=0){R=R.slice(0);if(j)d.a2p(R);if(v!=0){var G=d.R(y.P());d.GS(R,G,v-1);if(v==4)d.HQ(G);for(var q=0;
q<3;q++)d.Dm(G,R,q)}}if(Z=="Add"||Z=="Sbtr"){var h=1/U.Scl.v,r=U.Ofst.v,H=Z=="Add"?1:-1,o=new Uint8ClampedArray(b.AC.buffer);
for(var F=0;F<R.length;F+=4){o[F]=(b.aJ[F]+H*R[F])*h+r;o[F+1]=(b.aJ[F+1]+H*R[F+1])*h+r;o[F+2]=(b.aJ[F+2]+H*R[F+2])*h+r}}else{var g=en.co();
g.N9=U.PrsT&&U.PrsT.v;b.AC.fill(0);b.AC.set(b.aJ);d.l.UY(e,R,y,b.AC,b.W4,b.W4,k,g)}}else k5.NH(U,b.aJ,b.AC,b.W4)}X.vD.yI(c,this.MV)}}if(x.d=="cancel"){X.vD.a52(c,this.MV);
this.MV=null}if(x.d=="confirm"){var P={fade:[2,11],aply:[2,12],matc:[4,18]},O=P[x.PU];if(O==null)O=k5.names[x.PU];
var p=k5.m5(x.PU,this.GH[1]);if(p!=-1)O=[4,16,p];X.vD.MD(c,this.MV,O,this);this.MV=null;if(p==-1)X.vD.Xj(Q,this.GH)}c.c()};
X.vD.Xj=function(x,Q){var c=Q[0],$=Q[1],z,j;if(k5.GR[c]){z=k5.GR[c];if(jH[c])j=$}if(fK.GR[c]){z=fK.GR[c];
if(jH[c])j=$}if(c=="fade"){z="fade";j=$}if(c=="matc"){z="matchColor";j=$}if(c=="aply"){z="applyImageEvent";
j=$}if(c=="GEfc"){if(j.GEfs)j=j.GEfs.v[0].v}if(z==null)return;var U=new jO(u.E.G2,!0);U.data={jT:!0,q4:z};
if(j){j=JSON.parse(JSON.stringify(j));U.data.dx=j}x.T(U)};X.vD.a52=function(x,Q){X.vD.uR(x,Q)};X.vD.MD=function(x,Q,c,$){for(var F=0;
F<Q.length;F++){var z=Q[F],j=x.B[z.a],U=z.a<0?x.fG[-1-z.a]:z.y2<=0?null:z.y2==1?j.Rz():j.U5(x).F;if(U){U.NK();
U.ha=!0;if(j)j.kT(x)}else{j.NK();j.c()}delete z.AC;delete z.yD}var i=new dg(c,$);i.data=Q;x.kp(i);x.tP=!0};
X.vD.yI=function(x,Q,c){for(var F=0;F<Q.length;F++){var $=Q[F],z=x.B[$.a],j=c?$.aJ:$.AC,U=$.W4;if($.y2==0){z.extend(U);
if($.yD){d.WK($.aJ,U,z.buffer,z.rect);d.l.$A(j,U,z.buffer,z.rect,$.yD,U,0,U,1)}else d.WK(j,U,z.buffer,z.rect)}else{var i=$.a<0?x.fG[-1-$.a]:$.y2==1?z.Rz():z.U5(x).F;
i.extend(U);if($.yD){var b=d.R(U.P()*4);d.SO($.aJ,b);d.l.$A(j,U,b,U,$.yD,U,0,U,1);X.x7.PY(b,U,i)}else X.x7.PY(j,U,i);
i.ha=!0;if(z)z.kT(x)}if(z)z.c()}if(!c)X.vD.axN(x,Q)};X.vD.uR=function(x,Q){for(var F=0;F<Q.length;F++){var c=Q[F],$=x.B[c.a],z=c.W4,j=d.R(z.P()*4);
if(c.y2==0){d.WK($.buffer,$.rect,j,z);$.extend(z);d.WK(c.aJ,z,$.buffer,$.rect);$.NK()}else{var U=c.a<0?x.fG[-1-c.a]:c.y2==1?$.Rz():$.U5(x).F;
X.x7.oO(U.channel,U.rect,U.color,j,z);U.extend(z);X.x7.PY(c.aJ,z,U);U.NK();U.ha=!0;if($)$.kT(x)}c.aJ=j;
if($)$.c()}x.tP=!0};X.vD.Ce=function(x){var Q=0;for(var F=0;F<x.length;F++)Q+=x[F].aJ.length;return Q};
X.vD.axN=function(x,Q){var c=X.vD.ahG(x),$=~c;if(c==16777215)return;for(var F=0;F<Q.length;F++){var z=Q[F],j=x.B[z.a],U=z.W4;
if(z.y2!=0)continue;j.extend(U);var i=U.x-j.rect.x,b=U.y-j.rect.y,e=j.rect.m,k=new Uint32Array(z.aJ.buffer),K=new Uint32Array(j.buffer.buffer);
for(var g=0;g<U.e;g++)for(var R=0;R<U.m;R++){var T=g*U.m+R,D=(g+b)*e+(R+i);K[D]=K[D]&c|k[T]&$}j.NK();
j.c()}x.c()};X.vD.ahG=function(x){var Q=x.Q.O;return Q[2]*16711680|Q[1]*65280|Q[0]*255};X.vD.prototype.pC=function(x,Q){var c=Q.B[x.a];
if(x.ZR!=null)c.add[k5.get(c.add)]=x.ZR;else X.vD.uR(Q,x);Q.c()};X.vD.prototype.Tz=function(x,Q){var c=Q.B[x.a];
if(x.ZR!=null)c.add[k5.get(c.add)]=x.j7;else X.vD.uR(Q,x);Q.c()};X.vD.prototype.Ce=function(x){return x.ZR==null?X.vD.Ce(x):0};
X.LC=function(){X.Ur.call(this,"Filter Edit",X.iT);this.MV=null;this.fV=null;this.d=null;this.GH=null};
X.LC.prototype=new X.Ur;X.LC.prototype.To=function(x,Q,c,$,z){if(x.d=="start"){if(c.g.length==0)return;
var j=c.B[c.g[0]];if(j.add.SoLd&&j.kk<=0&&c.oW.length==0){}else if(!c.VP(Q,null,!0))return;var U=x.PU;
if((jH[U]||fK.s[U])&&x._B==null){if(c.g.length!=1)alert("Will be applied to "+c.g.length+" layers.");
var i=new jO(u.E.M,!0);i.data=X.LC.an$(U,this._K(c,U));Q.T(i)}else{var b={d:"edit",PU:U,_B:x._B,nS:this._K(c)};
this.To(b,Q,c,$,z);b.d="confirm";delete b._B;this.To(b,Q,c,$,z)}}if(x.d=="edit"||x.d=="cancel"||x.d=="confirm"){if(x.d=="edit")this.GH=[x.PU,x._B];
if(x.nS)this.a8N(x,Q,c,z);else this.af4(x,Q,c,z)}if(x.d=="applylast"&&this.GH!=null){var b={d:"edit",PU:this.GH[0],_B:this.GH[1],nS:this._K(c)};
this.To(b,Q,c,$,z);b.d="confirm";delete b._B;this.To(b,Q,c,$,z)}};X.LC.an$=function(x,Q){var c=fK.s[x];
if(c)return{d:u.H.ax,f:c,Zz:{nS:Q}};else return{d:u.H.LL,AD:"afw_"+x,nS:Q}};X.LC.prototype._K=function(x,Q){var c=x.B[x.g[0]],$;
if(c.add.SoLd&&c.kk<=0&&x.oW.length==0){$={a:x.g[0],index:0};if(c.add.SoLd.filterFX!=null){var z=c.add.SoLd.filterFX.v.filterFXList.v;
$.index=z.length;for(var F=0;F<z.length;F++)if(fK.hB(z[F].v)==Q&&fK.s[Q])$.index=F}}return $};X.LC.prototype.a8N=function(x,Q,c,$){var z=c.B[x.nS.a],j=x.PU;
if(x.d=="edit"){if(this.d==null){var U=fK.names[j];if(U==null)U=k5.names[j];if(j=="blendOptions")U=[14,10];
this.d=new dg(U,this);this.d.data={nS:x.nS,awu:JSON.parse(JSON.stringify(z.add.SoLd))}}if(!z.Oz()){z.add.SoLd.filterFX=fK.xO();
var i=this.d.data.lt=hf.aov(z.add.SoLd.placed.v);c.C3(i);if(c.u){i.F.channel=c.u.channel.slice(0);i.F.rect=c.u.rect.clone();
i.F.color=0;this.d.data.Cj=c.u;c.u=null}z.bx(c)}var b=z.add.SoLd.filterFX.v.filterFXList.v;if(b[x.nS.index]==null){b.push(fK.Z5(j,$))}if(x._B){b[x.nS.index].v.enab.v=x.NQ!=!0;
if(j=="blendOptions")b[x.nS.index].v.blendOptions.v=x._B;else b[x.nS.index].v.Fltr.v=x._B}this.d.data.av1=JSON.parse(JSON.stringify(z.add.SoLd));
this.Tz(this.d.data,c)}if(x.d=="cancel"){if(this.d)this.pC(this.d.data,c);this.d=null}if(x.d=="confirm"){if(this.d)c.kp(this.d);
X.vD.Xj(Q,this.GH);this.d=null}};X.LC.prototype.tt=function(x){return{Z:x>>>16,r:x>>>8&255,J:x&255}};
X.LC.prototype.af4=function(x,Q,c,$){if(this.MV==null){var z=fK.xs(x.PU,x._B);this.MV=X.vD.getData(c,z.x!=0||z.y!=0,x.PU=="VaPo"?[{W4:x.QK[1]}]:null)}if(x.d=="edit"){var j=JSON.stringify(x._B);
if((x._B==null||j!=this.fV)&&x.NQ!=!0)for(var F=0;F<this.MV.length;F++){var U=this.MV[F],i={rect:U.W4,buffer:U.aJ},b={rect:U.W4,buffer:U.AC};
if(x.PU=="Avrg"&&U.yD){i.buffer=U.aJ.slice(0);d.nb(U.yD,i.buffer)}fK.NH(x.PU,i,x._B,this.tt($.Gj),this.tt($.QI),b,[c.add.lnk2?c.add.lnk2:[],c.B[c.g[0]].Rz(),c.fG,c.zo()]);
if(x.PU=="VaPo"){d.WK(x.QK[0],x.QK[1],b.buffer,b.rect)}if(x.PU=="Avrg"&&U.yD){var e=U.aJ.length;for(var F=0;
F<e;F+=4)U.AC[F+3]=U.aJ[F+3]}this.fV=j}X.vD.yI(c,this.MV,x.NQ)}if(x.d=="cancel"){X.vD.a52(c,this.MV);
this.MV=null;this.fV=null}if(x.d=="confirm"){if(x.PU=="VaPo"){this.MV.a6t=JSON.stringify(c.rs);this.MV.Wn=JSON.stringify(x.b);
c.rs=x.b}X.vD.MD(c,this.MV,fK.names[x.PU],this);this.MV=null;this.fV=null;X.vD.Xj(Q,this.GH)}c.c();c.tP=!0};
X.LC.prototype.pC=function(x,Q){if(x.Wn)Q.rs=JSON.parse(x.a6t);if(x.nS){var c=Q.B[x.nS.a];if(x.lt)Q.e1(x.lt);
if(x.Cj)Q.u=x.Cj;c.add.SoLd=JSON.parse(JSON.stringify(x.awu));if(c.Oz())c.o1(Q);else{c.bx(Q);c.kk=0}}else X.vD.uR(Q,x);
Q.c();Q.tP=!0};X.LC.prototype.Tz=function(x,Q){if(x.Wn)Q.rs=JSON.parse(x.Wn);if(x.nS){var c=Q.B[x.nS.a];
if(x.lt)Q.C3(x.lt);if(x.Cj)Q.u=null;c.add.SoLd=JSON.parse(JSON.stringify(x.av1));if(c.Oz())c.o1(Q);else c.bx(Q);
if(!c.lo())c.H2+=32}else X.vD.uR(Q,x);Q.c();Q.tP=!0};X.LC.prototype.Ce=function(x){return x.nS==null?X.vD.Ce(x):0};
var ke={m6:"0",gN:"1",L7:"2",qY:"3",rD:"3.5",ZO:"4",qL:"5",fB:"6",oY:"7",v:"8",Uf:"8.5",oy:"8.8",NF:"9",Be:"10",kg:"11",u$:"12",Rc:"13",TV:"14",jw:"15",mz:"16",oP:"17",hV:"18",$s:"21",ZZ:"22",eH:"23",sT:"23.0",V4:"23.1",F_:"23.2",TM:"23.3",DR:"23.4",m$:"23.5",S0:"23.6",a9z:"30",kq:"31",W$:"40",Ts:"41",P5:"42"};
ke.dO={};ke.dO[ke.gN]=["abr","brushes",eW,[9,3],3];ke.dO[ke.L7]=["grd","gradients",ib,[12,37],4];ke.dO[ke.qY]=["shc","contours",de,[12,21],0];
ke.dO[ke.rD]=["acv","curves",jq,[4,2],0];ke.dO[ke.ZO]=["asl","styles",kb,[12,22],5];ke.dO[ke.qL]=["pat","patterns",dN,[12,62],6];
ke.dO[ke.fB]=["csh","shapes",dJ,[12,77],7];ke.dO[ke.oY]=["aco","swatches",gR,[9,8],0];ke.dO[ke.v]=["atn","actions",i0,[9,9],2];
ke.dO[ke.Uf]=["tpl","tpresets",k6,[9,12],0];ke.dO[ke.oy]=["icc","profiles",hm,"LUTs",8];function dg(x,Q,c){if(c==null)c=!1;
this.name=x;this.f=Q;this.do=c;this.data=null;this.aoC=Date.now()}dg.prototype.Ce=function(){return this.f?this.f.Ce(this.data):0};
var ep={};ep.QP=function(x,Q){var c={t:"Clss",v:{classID:x}};if(Q)c={t:"Enmr",v:{classID:x,typeID:"Ordn",enum:"Trgt"}};
return{t:"obj ",v:[c]}};ep.QF=function(x,Q){var c={classID:"Lyr"};c[x]=Q;return{q4:"set",dx:{classID:"null",null:ep.QP("Lyr",!0),T:{t:"Objc",v:c}}}};
ep.av9=function(x,Q,c,$,z){var j=new jO(u.E.G2,!0),U=[],F=0,i=ep.oz(Q,c,$,U);while(U.length!=0){var b=U.pop();
F++;if(!b.w)continue;console.log(F-1);if(b.q4=="conditional"){var e=x.B[x.g[0]],k=b.dx.null.v.Cndt,K=!1;
if(k=="Bckg")K=!1;else if(k=="Pxel"&&x.hS(!1))K=!0;else if(k=="Adjs"&&k5.get(e.add))K=!0;else if(k=="Shp"&&e.add.vogk)K=!0;
else if(k=="Grup"&&e.Uy())K=!0;else if(k=="Opn"&&x!=null)K=!0;else if(k=="32Bt")K=!1;else if(k=="RGB")K=!0;
var g=b.dx.then,R=b.dx.else;if(K&&g)ep.oz(Q,g.v[0].v.val,g.v[1].v.val,U);if(!K&&R)ep.oz(Q,R.v[0].v.val,R.v[1].v.val,U)}else if(b.q4=="stop"){if(b.dx.Cntn&&b.dx.Cntn.v==!0)window.confirm(b.dx.Msge.v);
else{alert(b.dx.Msge.v);break}}else if(b.q4=="play"){var T=b.dx.null.v,D=new jO(u.E.M,!0);D.data={d:u.H.Zr,b3:[T[0].v.val,T[1].v.val]};
z.T(D)}else{j.data={q4:b.q4,dx:b.dx};z.T(j)}}};ep.g_=function(x,Q,c){var $;for(var F=0;F<x.length;F++){if(x[F].LX!=c)continue;
var z=x[F].yY;for(var j=0;j<z.length;j++){if(z[j].LX!=Q)continue;$=z[j]}}return $};ep.oz=function(x,Q,c,$){var z=ep.g_(x,Q,c).yY,j=z.length;
for(var F=0;F<j;F++)$.push(z[j-1-F])};ep.arN=function(x){var Q=x.q4,c=x.dx,$,U,i,b,e;if(c&&c.null)$=c.null.v[0];
if(c&&$==null&&c.At)$=c.At.v[0];if($&&$.t=="obj ")$=$.v[0];var z=$&&$.v?$.v.classID:null,j=["purge"];
if(j.indexOf(Q)!=-1)return Q[0].toUpperCase()+Q.slice(1);if(Q=="GEfc"||Q=="paintDaubs")return ag.names[c.GEfk.v.GEft][1];
e=k5.GR;for(U in e)if(e[U]==Q)i=U;e=fK.GR;for(U in e)if(e[U]==Q)b=U;e=fK.GR;for(U in e)if(U==Q)b=U;if(i){var k=k5.m5(i,c);
if(k!=-1)return[4,16,k];return k5.names[i]}if(b)return fK.names[b];var K=ep.aCc;if(Q=="make"){if($){if(z=="AdjL")return[6,1];
else if(z=="layerSection")return c.From?[6,9]:[6,20];else if(z=="Lyr")return[6,13];else if(z=="Chnl"&&$.v.enum=="Msk")return[6,2];
else if(z=="contentLayer")return[6,48,1];else if(z=="BckL")return"Make Background Layer";else if(z=="Path")return"Make Path";
else if(z=="TxLr")return"Make Text Layer";else if(z=="slice")return"Make Slices";else if(z=="Dcmn")return[11,7];
else if(z=="Gd")return[23,4]}if(c.Nw){z=c.Nw.v.classID;if(z=="Dcmn")return[11,7];else if(z=="Chnl"||z=="SCch")return"New Channel"}}else if(Q=="deselect"){if(z=="Path")return"Deselect current path";
else throw z}else if(Q=="draw"){return"Draw"}else if(Q=="select"){if(z=="Chnl"){var g={Msk:"Mask",Grn:"Green",Rd:"Red",Bl:"Blue",RGB:"RGB"}[$.v.enum];
if(g==null)g="";return"Select "+g+" Channel"}else if(z=="Mn")return"Select Panel \""+$.v.enum+"\"";else if(z=="Lyr"){if($.t=="Enmr")return"Select "+{Bckw:"Backward",Frwr:"Forward",Back:"Back",Frnt:"Front"}[$.v.enum]+" Layer";
return"Select Layer \""+$.v.val+"\""}else if(z=="Path")return"Select Path";else if(z=="Brsh")return"Select Brush";
else if(z=="Dcmn")return"Select Document"}else if(K[Q]&&z=="Chnl"){var R=$.v.keyID=="fsel";return K[Q]+" "+(R?"Selection":"Channel")}else if(Q=="set"){if(z=="Lyr")return"Set Current Layer";
else if(z=="AdjL")return[6,39];else if(z=="contentLayer")return[6,48,2];else if(z=="Prpr"){var T=$.v.keyID;
if(T=="TxtS")return"Set Text Style";else if(T=="paragraphStyle")return"Set Paragraph Style";else if(T=="Lefx")return[11,6];
else console.log(T)}else if(z=="Clr")return"Set "+($.v.keyID=="FrgC"?"Foreground":"Background")+" color";
else if(z=="Brsh")return"Set Brush";else if(z=="Path")return"Set Work Path";else console.log(z)}else if(Q=="move"){if(z=="Lyr")return"Move Layer";
else if(z=="Chnl"&&$.v.keyID=="fsel")return[7,7];else console.log(z)}else if(Q=="show"||Q=="hide"){var D="";
if(z=="Lyr")D="Layer";if(z=="Chnl")D="Channel";if(z=="filterFX")D="Filter Effect";return(Q=="show"?"Show":"Hide")+" "+D}else if(Q=="reset"){if(z=="Clr")return"Reset Colors"}else if(Q=="exchange"){if(z=="Clr")return[22,7,0]}else if(Q=="rotateEventEnum")return[2,5];
else if(Q=="flip"){var a=c.Axis.v.Ornt=="Hrzn";return[[2,6],[22,4,a?2:3]]}if(Q=="duplicate"&&z=="Dcmn")return"Duplicate first document";
if(z=="Chnl"){if(Q=="duplicate"){if($.v.keyID=="fsel")return"Selection to Channel";else return"Duplicate Channel"}if(Q=="delete")return"Delete Channel"}if(Q=="transform")return $&&$.v.keyID=="fsel"?[7,10]:[10,16];
var _={cut:[5,0],copyEvent:[5,1],copyToLayer:[6,49,0],cutToLayer:[6,49,1],copyMerged:[5,7],paste:[5,2],close:[1,12,0],save:[1,2],groupEvent:[6,18],ungroup:[6,19],duplicate:[6,0],mergeLayersNew:[6,12,0],mergeVisible:"Merge Visible",flattenImage:[6,12,1],updatePlacedLayer:[6,36,1],fade:[2,11],applyImageEvent:[2,12],matchColor:[4,18],fill:[2,3],stroke:[14,9],colorRange:[7,8],desaturate:[19,7,0],Dstt:[19,7,0],delete:c?z=="Lyr"?[6,31]:"Delete Path":[2,2],align:[20,4,0],applyLocking:[6,57,1],crop:[11,12,1],placedLayerEditContents:"Edit Contents",placedLayerExportContents:"Export Contents",placedLayerReplaceContents:"Replace Contents",convertMode:"Convert Mode",grow:"Grow Selection",similar:"Similar Selection",newPlacedLayer:[6,7,0],selectNoLayers:"Deselect Layers",selectAllLayers:"Select All Layers",canvasSize:[11,3],imageSize:[11,10],rasterizeLayer:[6,8],revealAll:[11,12,2],divide:"Divide Current Slice",collapseAllGroupsEvent:"Collapse All Groups",conditional:"If"},I=_[Q];
if(I==null)I=ep.ah2[Q];if(I)return I;return Q};ep.ah2={border:[7,9],smoothness:[19,3,0],expand:[7,4],contract:[7,5],feather:[7,6],inverse:[7,2]};
ep.aCc={set:"Set",add:"Add Transparency",addTo:"Add To",subtract:"Subtract Transparency",subtractFrom:"Subtract From",interfaceIconFrameDimmed:"Intersect Transparency",interfaceWhite:"Intersect With"};
ep.an4=function(x,Q,c,$){var z=x.q4,j=x.dx,U=!1,i=new jO(u.E.v,!0),g,R,T,D;i.f=X.Mf;var b=new jO(u.E.M,!0),k=["purge","updatePlacedLayer","convertMode","convertToProfile"];
if(k.indexOf(z)!=-1)return;var K=z;while(K.length<4)K+=" ";D=k5.GR;for(g in D)if(D[g]==K)R=g;D=fK.GR;
for(g in D)if(D[g]==K)T=g;D=fK.GR;for(g in D)if(g==K)T=g;if(z=="fade")R=z;if(z=="matchColor")R="matc";
if(z=="applyImageEvent")R="aply";if(R){i.f=X.FQ;i.data={d:"start",wU:R,_B:j}}else if(T){i.f=X.iT;i.data={d:"start",PU:T,_B:j}}else if(z=="GEfc"||z=="paintDaubs"){i.f=X.iT;
i.data={d:"start",PU:"GEfc",_B:j}}else if(z=="imageSize"||z=="canvasSize"||z=="revealAll"||z=="trim"||z=="crop"){i.f=X.LZ;
i.data={d:"fromAction",fe:x}}else if(z=="fill"||z=="stroke"||z=="delete"&&j==null){var a=null;if($.g.length!=0)a=$.B[$.g[0]];
var _=d.RD(c.Gj);if(a!=null&&z=="fill"&&a.add.TySh){var I="var c = new SolidColor();  c.rgb.red="+_.Z+";  c.rgb.green="+_.r+";  c.rgb.blue="+_.J+";  app.activeDocument.activeLayer.textItem.color = c;";
b.data={d:u.H.kv,rq:I}}else if(a!=null&&z=="delete"&&a.add.TySh){i.f=X.gr;i.data={d:"insertText",b:""}}else if(a!=null&&z=="fill"&&a.Z6()){var i=new jO(u.E.G2,!0),j={classID:"setd",null:ep.QP("contentLayer",!0),T:{t:"Objc",v:{}}};
X.de.WH({Clr:{t:"Objc",v:d.I.lV(d.RD(c.Gj))}},j.T.v,0);i.data={q4:"set",dx:j};Q.T(i);return}else if(z=="stroke"&&j&&j.null==null){i.f=X.tH;
i.data={d:"stroke",apF:j}}else{if(z=="stroke"&&j&&j.Usng)i.f=X.GR[j.Usng.v.classID];else i.f=c.Oj==X.fx?X.fx:X.gN;
i.data={d:"fromAction",fe:x}}}else if(z=="colorRange"||z=="grow"||z=="similar"){i.f=X.K2;i.data={d:"fromAction",fe:x}}else if(z=="set"&&j&&j.T&&j.T.v.Ordn=="Al"&&c.Oj==X.gr&&Q.T9().sD()){i.f=X.gr;
i.data={d:"selectAll"}}else if(ep.ah2[z]||ep.aCc[z]&&(!1||j.With&&j.With.v[0].v.keyID=="fsel"||j.From&&j.From.v[0].v.keyID=="fsel"||j.null&&j.null.v[0].v.keyID=="fsel"||j.T.v[0]&&j.T.v[0].v.keyID=="fsel")){i.f=X.kJ;
i.data={d:"fromAction",fe:x}}else if(z=="rasterizeLayer"){i.data={d:j.What?eM.aBQ:eM.TQ}}var f={copyToLayer:eM.ly,cutToLayer:eM._3,mergeLayersNew:eM.TJ,mergeVisible:eM.Ev,flattenImage:eM.a9Y,newPlacedLayer:eM.rQ};
if(f[z])i.data={d:f[z],dx:j};if(i.data){Q.T(i);return}if(z=="collapseAllGroupsEvent"){for(var F=0;F<$.B.length;
F++){var a=$.B[F];if(a.Uy())a.add.lsct=hA.H3}$.Fq=!0;return}if(z=="desaturate"||z=="Dstt"){i.f=X.FQ;
i.data={d:"auto",dw:3};if($&&$.B[$.g[0]].add.SoLd==null)Q.T(i);return}if(z=="close"){if(j&&j.Svng.v.YsN=="Ys"){b.data={d:u.H.E9};
Q.T(b)}b.data={d:u.H.AF,yn:$};Q.T(b);return}if(z=="save"){b.data={d:u.H.E9};Q.T(b);return}if(z=="copyMerged"){b.data={d:u.H.mH,Qo:!0,O3:!0};
Q.T(b);return}if(z=="placedLayerReplaceContents")b.data={d:u.H.OD,cw:!0};var f={placedLayerEditContents:u.H.ad9,placedLayerExportContents:u.H.atd,copyEvent:u.H.mH,paste:u.H.Nt};
if(f[z])b.data={d:f[z],O3:!0};if(b.data){Q.T(b);return}var y=j.null?j.null.v:null,Z=y?y[0].v.classID:"";
if(z=="make"){if(j.null==null&&j.Nw)Z=j.Nw.v.classID;if(Z=="AdjL"){i.data={d:eM.PX,dx:j}}else if(Z=="layerSection"){i.data=j.From?{d:eM.xt}:{d:eM.jK};
if(j.Usng){var v=j.Usng.v;if(v.Nm)i.data.BW=v.Nm.v;if(v.Clr)i.data.hP=ep.Jf(v)}}else if(Z=="Lyr"){if(j.Usng&&j.Usng.v.length==2)i.data={d:eM.a5w};
else{i.data={d:eM.Hx};if(j.Usng)i.data.BW=j.Usng.v.Nm.v;if(j.below&&j.below.v)i.data.aa3=!0}}else if(Z=="Chnl"&&j.At&&j.At.v[0].v.enum=="Msk"){i.data={d:eM.zP,AW:j.Usng.v.UsrM}}else if(Z=="Chnl"||Z=="SCch"){i.data={d:eM.Rd,Zq:"fromAction",b:x}}else if(Z=="contentLayer"){i.data={d:eM.Ob,dx:j}}else if(Z=="BckL"){$.B[$.g[0]].at5();
return}else if(Z=="Dcmn"){if(j.Nw==null)return;var G=j.Nw.v;b.data={d:u.H.th,Ta:hf.a0l(G,c)}}else if(Z=="Ptrn")b.data={d:u.H.hK,hF:0};
else if(Z=="Path"){var q=j.At;if(q&&q.v&&q.v[0]&&q.v[0].v&&q.v[0].v.enum=="vectorMask"){i.f=X.Mf;var h=j&&j.Usng&&j.Usng.v.vectorMaskEnabled=="RvlA";
i.data={d:eM.Vo,yk:!h}}else{i.f=X.T3;i.data={d:"pathedit",Zq:"fromsel"}}}else if(Z=="TxLr"){i.f=X.gr;
i.data={d:"fromAction",fe:x}}else if(Z=="slice"){i.f=X.bb;i.data={d:"fromAction",fe:x}}else if(Z=="Gd"){var r=[[],[]],G=j.Nw.v;
r[G.Ornt.v.Ornt=="Vrtc"?0:1].push(G.Pstn.v.val);var H=je.J6(r);X.qV.ia(H,$.wZ());i.f=X.kU;i.data={d:"gids",Gv:H}}else{console.log(z,Z,j);
throw"e"}}else if(z=="divide"){i.f=X.bb;i.data={d:"fromAction",fe:x}}else if(z=="deselect"){if(Z=="Path"){$.IH=[];
$.ZQ=[];$.Fq=$.vu=!0;return}else throw Z}else if(z=="selectNoLayers"){$.g=[];$.tP=!0}else if(z=="selectAllLayers"){$.g=[];
for(var F=0;F<$.B.length;F++)$.g.push(F);$.tP=!0;return}else if(z=="select"){var o=X.GR;if(Z=="Lyr"){var P=j.selectionModifier,O=P?P.v.selectionModifierType:null,p=ep.ns($,y[0]),C=0;
if(p==-1){alert("Layer "+y[0].v.val+" does not exist.");return}var a=$.B[p];if(a.Uy()&&a.Rz()&&P==null)C=1;
i.data={d:eM.zp,a:p,wy:O?["addToSelection","addToSelectionContinuous"].indexOf(O):null,eN:C}}else if(Z=="Path"){if(y[0].v.keyID=="WrPt"){$.IH=[0];
$.Fq=$.vu=!0;return}else throw y[0]}else if(Z=="Chnl"){var W=y?y[0].v.enum:"",J=["Rd","Grn","Bl"].indexOf(W);
if(J!=-1){var t=j.Extd&&j.Extd.v?$.Q.O.slice(0):[0,0,0];t[J]=1;i.f=X.Oi;i.data={d:"setcls",O:t}}else i.data={d:eM.zp,a:p,eN:W=="RGB"?0:1}}else if(Z=="Dcmn"){if(Q.H0.length<2)return;
b.data={d:u.H.aiS,dir:j.null.v[0].v.val}}else if(Z=="Brsh"){var Y=c.bX.list,l;for(var F=0;F<Y.length;
F++){if(Y[F].v.Nm.v.split("/").pop()==y[0].v.val)l=Y[F].v}if(c.Oj==X.kU){b.data={d:u.H.ax,f:X.gN};Q.T(b)}b.data={d:u.H.hW,hF:ke.TV,I6:l}}else if(Z=="Mn"){if(y[0].v.enum=="Scl")b.data={d:u.H.ax,f:X.va,Zz:{AW:3}};
if(y[0].v.enum=="Plce")b.data={d:u.H.OD,amX:!0};if(y[0].v.enum=="ZmIn"){i.f=X.QT;i.data={d:"zoom",bH:!0}}if(y[0].v.enum=="ZmOt"){i.f=X.QT;
i.data={d:"zoom",bH:!1}}if(y[0].v.enum=="FtOn"){i.f=X.QT;i.data={d:"adapt",b:"fitscr"}}}else if(o[Z]){b.data={d:u.H.ax,f:o[Z]}}else throw Z}else if(z=="draw"){i.f=X.T3;
i.data={d:"fromAction",fe:x}}else if(z=="gradientClassEvent"){i.f=X.o8;i.data={d:"fromAction",fe:x}}else if((z=="set"||z=="reset"||z=="exchange")&&Z=="Clr"){b.data={d:u.H.hW,hF:ke.$s,Zq:z=="reset"?3:2};
if(z=="set"){b.data.Zq=y[0].v.keyID=="FrgC"?0:1;var m=d.I.Du(j.T.v);b.data.b=m.Z<<16|m.r<<8|m.J}}else if(z=="set"){if(Z=="AdjL"){var B=j.T.v.classID;
B=k5.HD[B];i.f=X.FQ;if(B)i.data={d:"edit_layer",b:j.T.v}}else if(Z=="Lyr"){var L=j.T.v,p=ep.ns($,y[0]);
for(var A in L){if(A=="classID")continue;i.f=X.Mf;if(A=="Nm")i.data={d:eM.ZH,name:L.Nm.v};else if(A=="Opct")i.data={d:eM.ML,j7:Math.round(L.Opct.v.val*255/100)};
else if(A=="fillOpacity")i.data={d:eM.tZ,j7:Math.round(L.fillOpacity.v.val*255/100)};else if(A=="Md")i.data={d:eM.BT,j7:cq.hg.indexOf(L.Md.v.BlnM)+($.B[p].Uy()?1:0)};
else if(A=="Usrs")i.data={d:eM.$R,a:p};else if(A=="Blnd"){i.f=X.vR;i.data={d:"setstl",a:p,b:{blendOptions:{t:"objc",v:L}}};
Q.T(i);i.data={d:"confirm",a:p}}else if(A=="userMaskFeather"||A=="userMaskDensity"){var S=L.userMaskFeather,M=L.userMaskDensity,p=$.g[0],N=$.B[p].qq(0);
if(S)N.k1=S.v.val;if(M)N.Vn=M.v.val;i.data={d:eM.tA,tV:p,nk:N}}else if(A=="Clr"){var _=ep.Jf(L);i.data={d:eM.rb,aDo:_}}else if(A=="Lefx")ep.a0M(Q,p,L.Lefx.v,c);
else{console.log(j);throw A}if(i.data){Q.T(i);delete i.data}}i.data={};var a=$.B[p];a.axW()}else if(Z=="Prpr"){var L=JSON.parse(JSON.stringify(j.T.v)),p=ep.ns($,j.null.v[1]),a=$.B[p],s=y[0].v.keyID;
if(s=="TxtS"||s=="paragraphStyle"){var V=a.add.TySh,g8=JSON.parse(JSON.stringify(V.HW)),n=dU.bs(g8),cQ=dU.zl(g8,0,n.length-2);
if(s=="TxtS")dU.al_(L,cQ);else dU.a68(L,cQ);dU.G4(g8,0,n.length-1,cQ);i.f=X.gr;i.data={d:"newED",Tc:p,vY:g8}}else if(s=="Lefx"){for(var hk in L)if(L[hk].v){if(hk=="Scl")L[hk].v.val=100}ep.a0M(Q,p,L,c);
i.data={}}else throw s}else if(Z=="contentLayer"){var p=ep.ns($,y[0]),L=j.T.v,eG=!0;if(L.classID=="shapeStyle"){if(L.strokeStyle){L=L.strokeStyle.v;
eG=!1}else L=L.FlCn.v}if(eG){var ie={solidColorLayer:0,gradientLayer:1,patternLayer:2}[L.classID],eN=aF.L$($.B[p].add),T=eN.bf==ie+1?eN.WB:aF.Y3[ie];
T=JSON.parse(JSON.stringify(T));X.de.WH(L,T,ie);i.data={d:eM.KE,PG:[p],jJ:!0,b:{bf:ie+1,WB:T}}}else{var gr=JSON.parse(JSON.stringify($.B[p].add.vstk));
for(var hk in L)gr[hk]=L[hk];i.data={d:eM.KE,PG:[p],jJ:!1,b:gr}}}else if(Z=="Brsh"){var l=JSON.parse(JSON.stringify(c.bX.eT)),ek=j.T.v;
if(ek.masterDiameter)l.Brsh.v.Dmtr.v.val=ek.masterDiameter.v.val;else console.log("unknown brush parameters");
b.data={d:u.H.hW,hF:ke.TV,I6:l}}else if(Z=="Path"){i.f=X.T3;i.data={d:"fromAction",fe:x}}else{console.log(y[0],j);
throw Z}}else if(z=="move"){if(Z=="Lyr"){var L=j.T.v;if(L.classID=="Ofst"){i.data={d:"trsl",RM:L.Hrzn.v.val,Bi:L.Vrtc.v.val};
i.f=X.kU}else{var iE,e9;if(L[0].t=="Enmr"){if(L[0].v.enum=="Frnt")e9=0;else if(L[0].v.enum=="Nxt")e9=1;
else if(L[0].v.enum=="Prvs")e9=2;else if(L[0].v.enum=="Back")e9=3;else throw"e"}else iE=L[0].v.val;i.data={d:eM.qz,target:iE,Zq:e9,atj:j.Dplc?j.Dplc.v:!1}}}else if(Z=="Chnl"&&y[0].v.keyID=="fsel"){i.f=X.kJ;
i.data={d:"fromAction",fe:x}}}else if(z=="groupEvent"||z=="ungroup")i.data={d:eM.DF};else if(z=="show"||z=="hide"){var dm=j.null.t;
if(dm=="obj "){if(y[0].v.val!=null)i.data={d:eM.z6,index:y[0].v.val-1};else i.data={d:eM.l9}}else if(dm=="VlLs"){var Z=y[0].v[0].v.classID;
if(Z=="Chnl")i.data={d:eM.Rd,Zq:"fromAction",b:x};else{var kD=Z=="filterFX"?y:y[0].v;for(var F=0;F<kD.length;
F++){if(Z=="filterFX")i.data={d:eM.z6,index:kD[F].v[0].v.val-1};else{var p=ep.ns($,kD[F]),gJ=$.B[p].M5();
if(z=="show"&&gJ||z=="hide"&&!gJ)continue;i.data={d:eM.Ul,PG:[p]}}Q.T(i)}return}}else throw dm}else if(z=="rotateEventEnum"){i.f=Z=="Lyr"?X.va:X.LZ;
var dR=j.Angl.v.val;i.data={d:"rot",LX:[2,5],b:-dR*Math.PI/180}}else if(z=="flip"){i.f=Z=="Lyr"?X.va:X.LZ;
var fO=j.Axis.v.Ornt=="Hrzn",ko=fO?new bC(-1,1):new bC(1,-1);i.data={d:"scl",LX:[[2,6],[22,4,fO?2:3]],b:ko}}else if(z=="transform"){var d8=1,fj=1,ja=0,eD=0,d3=0,fP=0,jE=0,a7=null,dl=null;
if(j.Wdth)d8=j.Wdth.v.val/100;if(j.Hght)fj=j.Hght.v.val/100;if(j.Skew){var cR=j.Skew.v;ja=cR.Hrzn.v.val;
eD=cR.Vrtc.v.val}if(j.Ofst){var ex=j.Ofst.v;fP=ex.Hrzn.v.val;jE=ex.Vrtc.v.val}if(j.Angl)d3=j.Angl.v.val;
var er=new bI;er.concat(new bI(d8,d8*Math.tan(eD*Math.PI/180),fj*Math.tan(ja*Math.PI/180),fj,0,0));er.rotate(-d3*Math.PI/180);
er.translate(fP,jE);var cE=d.D.Gr(er);if(j.Usng){var ex=j.Usng.v;cE[6]=ex.Hrzn.v.val/100;cE[7]=ex.Vrtc.v.val/100}var hl=j.FTcs.v.QCSt;
if(hl=="Qcsi"){var f4=j.Pstn.v;a7=new bC(f4.Hrzn.v.val,f4.Vrtc.v.val)}else dl=X.Y.a0p[hl];var y=j.null;
if(y&&y.v instanceof Array)y=y.v[0];var p=y?ep.ns($,y):null;if(p==-1)p=null;i.f=y&&y.v.keyID=="fsel"?X.Um:X.va;
i.data={d:"dtr",gy:dl,b:cE,JV:j.warp,a7S:a7}}else if(z=="duplicate"){if(Z=="Chnl")i.data={d:eM.Rd,Zq:"fromAction",b:x};
else if(Z=="Dcmn"){var em=ar.pz("PSD").YU($);hF.nn({url:$.name},em,Q);return}else if(Z=="Actn"){var e$=c.Q$,iP=y[1].v.val,b2=null;
for(var F=0;F<e$.length;F++)if(e$[F].LX==iP)b2=e$[F];var k7=ep.g_(e$,y[0].v.val,iP);k7=JSON.parse(JSON.stringify(k7));
k7.LX+=" copy";b2.yY.push(k7);return}else i.data={d:eM.DN,BW:j.Nm?j.Nm.v:null}}else if(z=="delete"){if(Z=="filterFX"){if(y[0].v.val!=null)i.data={d:eM.nq,Pa:y[0].v.val-1};
else i.data={d:eM.Hy}}else if(Z=="Path"){i.f=X.T3;i.data={d:"pathedit",Zq:"del"}}else if(Z=="Lyr")i.data={d:eM.bU};
else if(Z=="Chnl"&&y[0].v.enum=="Msk")i.data={d:eM.zb};else if(Z=="Chnl")i.data={d:eM.Rd,Zq:"fromAction",b:x};
else if(Z=="Cmnd"){var e$=c.Q$,iP=y[2].v.val,k7=ep.g_(e$,y[1].v.val,iP);k7.yY.splice(y[0].v.val-1,1);
return}else if(Z=="Actn"){var e$=c.Q$,iP=y[1].v.val,b2=null;for(var F=0;F<e$.length;F++)if(e$[F].LX==iP)b2=e$[F];
var k7=ep.g_(e$,y[0].v.val,iP);b2.yY.splice(b2.yY.indexOf(k7),1);return}else throw Z}else if(z=="align"){if(j.Aply&&j.Aply.v.projection=="Auto"){i.f=X.LZ;
i.data={d:"auto-align"}}else{i.f=X.kU;var at=j.Usng.v.ADSt,R={AdLf:0,AdCH:1,AdRg:2,AdTp:4,AdCV:5,AdBt:6}[at];
if(R==null)throw at;i.data={d:"algn",b:R}}}else if(z=="applyLocking"){var ju=j.layerLocking.v,jL;if(ju.protectTransparency)jL=[[ju.protectTransparency.v],[0]];
else if(ju.protectNone)jL=[[!1,!1,!1,!1],[0,1,2,31]];else{console.log(ju);throw"e"}i.data={d:eM.HC,j7:jL}}if(i.data)Q.T(i);
else if(b.data)Q.T(b);else{console.log(x);alert("Unknown action \""+z+"\"");throw"e"}};ep.a0M=function(x,Q,c,$){c=JSON.parse(JSON.stringify(c));
hz.wo(c);if(c.masterFXSwitch==null)c.masterFXSwitch={t:"bool",v:!0};console.log(c);var z=aF.mh;for(var j=0;
j<z.length;j++)if(c[z[j]]){for(var F=0;F<c[z[j]].v.length;F++){var U=c[z[j]].v[F].v;for(var i=0;i<2;
i++){var b=U[i==0?"TrnS":"MpgS"];if(b&&b.v.Crv==null){var e=b.v,k=e.Nm.v.split("=").pop(),K=$.fc;for(var g=0;
g<K.length;g++){var R=K[g].Nm.v.split("=").pop();if(R==k)e.Crv=JSON.parse(JSON.stringify(K[g].Crv))}if(b.v.Crv==null){console.log(b);
throw"e"}}}}}var T=new jO(u.E.v,!0);T.f=X.vR;T.data={d:"setstl",a:Q,b:{Lefx:{t:"objc",v:c}}};x.T(T);
T.data={d:"confirm",a:Q};x.T(T)};ep.Jf=function(x){var Q={None:0,Rd:1,Orng:2,Ylw:3,Grn:4,Bl:5,Vlt:6,Gry:7}[x.Clr.v.Clr];
if(Q==null)throw x.Clr.v.Clr;return Q};ep.ns=function(x,Q){var c=1e6,$=0,z=x.B.length;for(var F=0;F<x.g.length;
F++){c=Math.min(c,x.g[F]);$=Math.max($,x.g[F])}var j=Q.t,U=-1;if(j=="name"){var i=Q.v.val,U=-1;for(var F=0;
F<z;F++)if(x.B[F].getName()==i){U=F;break}}else if(j=="Enmr"){if(x.g.length!=0)U=x.g[0];if(Q.v.enum=="Frwr")U=$+1;
if(Q.v.enum=="Bckw")U=c-1;if(Q.v.enum=="Back")U=0;if(Q.v.enum=="Frnt")U=z-1;U=(U+z)%z}else if(j=="prop"){if(Q.v.keyID=="Bckg")U=0}else if(j=="indx")U=Q.v.val-1;
return U};var k5={};k5.names={brit:[4,0],levl:[4,1],curv:[4,2],expA:[4,3],vibA:[4,4],hue2:[4,5],blnc:[4,6],blwh:[4,7],phfl:[4,8],mixr:[4,9],clrL:[4,10],nvrt:[4,11],post:[4,12],thrs:[4,13],grdm:[4,14],selc:[4,15],rplc:[4,17]};
k5.apr=["expA","clrL","selc"];k5.uZ=[[13,1,1],[13,1,3],[13,1,4],[13,1,11],[13,1,5],[13,1,12]];k5.aj_=[[13,1,11],[13,1,12],[13,1,3],[13,1,10]];
k5.v4=[[13,1,1],[13,1,4],[13,1,5]];k5.WZ={BrgC:"brit",Lvls:"levl",Crvs:"curv",Exps:"expA",vibrance:"vibA",HStr:"hue2",ClrB:"blnc",BanW:"blwh",photoFilter:"phfl",Invr:"nvrt",Pstr:"post",Thrs:"thrs",GrMp:"grdm",SlcC:"selc",ChnM:"mixr",colorLookup:"clrL",rplc:"rplc"};
k5.HD=function(){var x=JSON.parse(JSON.stringify(k5.WZ));delete x.GrMp;x.GdMp="grdm";return x}();k5.GR={brit:"brightnessEvent",levl:"levels",curv:"curves",expA:"exposure",vibA:"vibrance",hue2:"hueSaturation",blnc:"colorBalance",blwh:"blackAndWhite",phfl:"photoFilter",mixr:"channelMixer",clrL:"colorLookup",nvrt:"invert",post:"posterization",thrs:"thresholdClassEvent",grdm:"gradientMapEvent",selc:"selectiveColor",rplc:"replaceColor"};
k5.keys={levl:[fM.qP,fM.xv],curv:[fM.qP,fM.dm],hue2:[fM.qP,fM.q3],nvrt:[fM.qP,fM.Wd],blnc:[fM.qP,fM.HK]};
k5.aBw=function(x){var Q=fK.$H("mixr");Q.Mnch={t:"bool",v:x.Xw};function c($,F){var z={classID:"ChMx"},j={Rd:0,Grn:1,Bl:2,Cnst:4};
for(var U in j)z[U]={t:"UntF",v:{type:"#Prc",val:$[F+j[U]]}};return{t:"Objc",v:z}}if(x.Xw)Q.Gry=c(x.b,0);
else{Q.Rd=c(x.b,0);Q.Grn=c(x.b,5);Q.Bl=c(x.b,10)}return Q};k5.Le=function(x){function Q($,z,F){var j={Rd:0,Grn:1,Bl:2,Cnst:4};
for(var U in j)if($[U])z[F+j[U]]=$[U].v.val}var c={Xw:!1,b:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]};
if(x.Mnch&&x.Mnch.v)c.Xw=!0;if(c.Xw)Q(x.Gry.v,c.b,0);else{Q(x.Rd.v,c.b,0);Q(x.Grn.v,c.b,5);Q(x.Bl.v,c.b,10)}return c};
k5.get=function(x){for(var Q in k5.names)if(x[Q]!=null)return Q;return null};k5.hd=function(x,Q){var c=k5.C$,$;
if(x=="brit"){var z=Q.Brgh?Q.Brgh.v:0,j=Q.Cntr?Q.Cntr.v:0,U=Q.useLegacy?Q.useLegacy.v:!1;if(U){var i=z/255,b=1+j/100;
if(b>1)b=1+Math.tan(Math.PI/2*j/101);var e=(1-b)/2,k=d.gg.yL(i,i,i),K=[b,0,0,e,0,b,0,e,0,0,b,e,0,0,0,1],g=d.gg.multiply(K,k),R=new d.PT(256);
for(var F=0;F<256;F++)R.Z[F]=F;d.gg.transform(R,R,g);$={type:c.W5,mX:R.Z,Cq:R.Z,iu:R.Z,cU:!1,ky:!1}}else{var T=1024,D=-30+60*(j+100)/200,a=[];
for(var F=0;F<4;F++)a.push(d.eu.UW(F/3*255,F/3*255,!0));a[1].v.Hrzn.v=64;a[1].v.Vrtc.v=64-D;a[2].v.Hrzn.v=128+64;
a[2].v.Vrtc.v=128+64+D;a.sort(function(iy,gu){return iy.v.Hrzn.v-gu.v.Hrzn.v});var _=d.eu.ho(a,T);function I(iy,T){var a=[],jF=3;
for(var F=0;F<jF+1;F++)a.push(d.eu.UW(F/jF*255,F/jF*255,!0));a[1].v.Hrzn.v=130-iy*26;a[1].v.Vrtc.v=130+iy*51;
a[2].v.Hrzn.v=233-iy*48;a[2].v.Vrtc.v=233+iy*10;return d.eu.ho(a,T)}var f=I(Math.abs(z)/100,T);if(z<0){var y=[],Z=1/T;
for(var F=0;F<T;F++){var v=F*Z,G=F;while(f[G]>v&&G>1)G--;y[F]=G*Z}f=y}var q=new Uint8Array(T);for(var F=0;
F<T;F++){var h=Math.round((T-1)*f[F]);q[F]=Math.round(255*_[h])}$={type:c.W5,mX:q,Cq:q,iu:q,cU:!1,ky:!1}}}if(x=="levl"){var r=[],H,o,k,P,O,p;
for(var F=0;F<4;F++)r.push(bV.Hb(Q,F));H=-r[0][0]/255;o=1/(r[0][1]/255-r[0][0]/255);k=d.gg.multiply(d.gg.G6(o,o,o),d.gg.yL(H,H,H));
P=d.gg.G6(1/(r[1][1]/255-r[1][0]/255),1/(r[2][1]/255-r[2][0]/255),1/(r[3][1]/255-r[3][0]/255));O=d.gg.yL(-r[1][0]/255,-r[2][0]/255,-r[3][0]/255);
p=d.gg.multiply(P,O);var q=new d.PT(256);for(var F=0;F<256;F++)q.Z[F]=q.r[F]=q.J[F]=F;var C=1/(r[0][4]/100),W=1/(r[1][4]/100),J=1/(r[2][4]/100),t=1/(r[3][4]/100);
d.gg.transform(q,q,p);for(var F=0;F<256;F++){q.Z[F]=Math.round(Math.max(0,Math.min(255,255*Math.pow(q.Z[F]/255,W))));
q.r[F]=Math.round(Math.max(0,Math.min(255,255*Math.pow(q.r[F]/255,J))));q.J[F]=Math.round(Math.max(0,Math.min(255,255*Math.pow(q.J[F]/255,t))))}d.gg.transform(q,q,k);
for(var F=0;F<256;F++){q.Z[F]=Math.round(Math.max(0,Math.min(255,255*Math.pow(q.Z[F]/255,C))));q.r[F]=Math.round(Math.max(0,Math.min(255,255*Math.pow(q.r[F]/255,C))));
q.J[F]=Math.round(Math.max(0,Math.min(255,255*Math.pow(q.J[F]/255,C))))}H=r[0][2]/255;o=r[0][3]/255-r[0][2]/255;
k=d.gg.multiply(d.gg.yL(H,H,H),d.gg.G6(o,o,o));P=d.gg.G6(r[1][3]/255-r[1][2]/255,r[2][3]/255-r[2][2]/255,r[3][3]/255-r[3][2]/255);
O=d.gg.yL(r[1][2]/255,r[2][2]/255,r[3][2]/255);p=d.gg.multiply(O,P);d.gg.transform(q,q,d.gg.multiply(k,p));
$={type:c.W5,mX:q.Z,Cq:q.r,iu:q.J,cU:!1,ky:!1}}if(x=="curv"){var Y=jq.Hb(Q,0).length==256?1:0,l=[];if(Y==0){var m=d.eu.WN(jq.Hb(Q,0),256);
for(var F=1;F<4;F++){var B=d.eu.WN(jq.Hb(Q,F),256);l.push(d.eu.anP(B,m))}}else{var L=[];for(var F=0;
F<4;F++){var A=new Uint8Array(256);L.push(A);var S=jq.Hb(Q,F);for(var G=0;G<256;G++)A[G]=S[G]}for(var F=1;
F<4;F++)l.push(d.eu.anP(L[F],L[0]))}$={type:c.W5,mX:l[0],Cq:l[1],iu:l[2],cU:!1,ky:!1}}if(x=="expA"){var M=Q.Exps,N=Q.Ofst,s=Q.gammaCorrection,V=M?M.v:0,g8=N?N.v:0,n=s?s.v:1,q=new Uint8Array(256);
for(var F=0;F<256;F++){var Q=F/255,cQ=Math.pow(Math.abs(g8),1/(Math.PI/2));if(g8>0){Q=Math.max(g8/Math.E,Q);
Q=Q*Math.exp(g8/1.75+V/Math.PI);Q=(1-cQ)*Q+cQ*1}else{Q=Q*Math.exp(-g8*1.75+V/Math.PI);Q=Q+-cQ*1.14}Q=Math.pow(Q,1/n);
Q=Math.max(0,Math.min(1,Q));q[F]=Math.round(Q*255)}$={type:c.W5,mX:q,Cq:q,iu:q,cU:!1,ky:!1}}if(x=="vibA"){var hk=(Q.vibrance?Q.vibrance.v:0)/100,eG=(Q.Strt?Q.Strt.v:0)/100,cQ=1+hk*(hk>0?.25:.5),ie=.8+.2/cQ;
$={type:c.sz,hF:[hk,eG,ie,cQ]}}if(x=="hue2"){var eN=[],gr=[],ek=[],jK=Q.Clrz?Q.Clrz.v:!1;for(var F=0;
F<256;F++){eN[F]=F/255;gr[F]=0;ek[F]=0}var iE=hu.Hb(Q,0),e9=k5.WD(iE[1]/100);if(jK){var dm=iE[0]/360;
for(var F=0;F<256;F++){eN[F]=dm;gr[F]=e9}}else{for(var F=0;F<256;F++){var kD=eN[F],gJ=gr[F];eN[F]+=iE[0]/360;
for(var G=0;G<6;G++){var dR=hu.Hb(Q,G+1),fO=dR.qR,ko=dR.XS,cQ=0;for(var d8=1;d8<4;d8++)if(ko[d8]<ko[0])ko[d8]+=360;
var fj=ko[0],ja=ko[1],eD=ko[2],d3=ko[3],fP=kD*360;if(fP<ko[0])fP+=360;var jE=(fP-fj)/(ja-fj),cR=(fP-eD)/(d3-eD);
if(jE<0)cQ=0;else if(jE<1)cQ=jE;else if(cR<0)cQ=1;else if(cR<1)cQ=1-cR;else cQ=0;var b=k5.WD(fO[1]/100);
eN[F]+=cQ*fO[0]/360;gr[F]+=cQ*b;ek[F]+=cQ*fO[2]/100}}for(var F=0;F<256;F++){gr[F]=(1+gr[F])*(1+e9)-1;
ek[F]=Math.max(-1,Math.min(1,ek[F]))}}var ex=new Uint8Array(256),er=new Uint8Array(256),cE=new Uint8Array(256);
for(var F=0;F<256;F++){var a7=eN[F],eG=gr[F],dl=ek[F];if(a7>1)a7--;if(a7<0)a7++;eG=k5.aCg(eG);eG=(1+eG)*.5;
dl=(1+dl)*.5;ex[F]=Math.round(255*a7);er[F]=Math.round(255*eG);cE[F]=Math.round(255*dl)}var hl=iE[2]/100,f4=hl<0?-hl:hl,em=hl<0?0:1;
$={type:c.go,ajb:ex,WU:er,aj0:cE,aaC:f4*em,B_:1-f4,axt:iE[2]/100,abO:jK?1:0}}if(x=="nvrt"){var q=new Uint8Array(256);
for(var F=0;F<256;F++)q[F]=255-F;$={type:c.W5,mX:q,Cq:q,iu:q,cU:!1,ky:!1}}if(x=="post"){var e$=Q.Lvls.v,q=new Uint8Array(256),cQ=e$/255.001,iP=255/(e$-1);
for(var F=0;F<256;F++)q[F]=Math.floor(F*cQ)*iP;$={type:c.W5,mX:q,Cq:q,iu:q,cU:!1,ky:!1}}if(x=="grdm"){var b2=Q.Grad.v,k7=Q.Rvrs,T=1024,at;
if(b2.Clrs){var ju=d.I.rr(b2,0,0);at=d.I.aeX(b2,ju,T,k7?k7.v:!1)}else{at=d.I.aCT(b2,T,k7?k7.v:!1)}var jL=d.R(T),fJ=d.R(T),h6=d.R(T);
d.GS(at,jL,0);d.GS(at,fJ,1);d.GS(at,h6,2);$={type:c.W5,mX:jL,Cq:fJ,iu:h6,cU:!0,ky:!1}}if(x=="selc"){var iq=new Float32Array(9*3*2),iI=Q.OQ,dM=Q.Mthd?Q.Mthd.v.CrcM=="Absl":!1;
for(var G=0;G<9;G++){var ik=G*6,jp=cP.Hb(Q,G),eA=jp[0]/100,k8=jp[1]/100,ay=jp[2]/100,bK=jp[3]/100;if(dM){iq[ik]=iq[ik+1]=iq[ik+2]=1;
iq[ik+3]=eA*(1+bK)+bK;iq[ik+4]=k8*(1+bK)+bK;iq[ik+5]=ay*(1+bK)+bK}else{iq[ik+0]=(1+eA)*(1+bK);iq[ik+1]=(1+k8)*(1+bK);
iq[ik+2]=(1+ay)*(1+bK)}}$={type:c.NS,amS:iq}}if(x=="blwh"){var a4="Rd Yllw Grn Cyn Bl Mgnt".split(" "),$=[],e3=0,jA=0;
for(var F=0;F<6;F++)$.push(Q[a4[F]].v);$.push(Q.useTint.v,Q.tintColor.v);var h_=[];for(var F=0;F<6;F++)h_.push(($[F]-50)/50);
var bj=d.I.Du($[7]);bj.Z/=255;bj.r/=255;bj.J/=255;var gs=d.a$(bj.Z,bj.r,bj.J),dl=d.jY(d.qs(gs.R0,1,.5)),bs=gs.ks*gs._B;
if(dl==.5)e3=jA=.5;else{e3=bs*(.5-dl)/(.5/dl-1);jA=1-bs*(.5-dl)-1/(2*(1-dl));jA/=1-1/(2*(1-dl))}$={type:c.Ro,aBd:h_,OG:$[6]?1:0,arq:gs.R0,jY:dl,ao9:bs,GX:e3,aeM:jA}}if(x=="blnc"){var r=[],kn=["ShdL","MdtL","HghL"];
for(var F=0;F<3;F++){if(Q[kn[F]]==null){r[F]=[0,0,0];continue}var e$=Q[kn[F]].v,j6=e$[0].v/100,cL=e$[1].v/100,eb=e$[2].v/100,dY=Q.PrsL==null||Q.PrsL.v?(Math.min(j6,cL,eb)+Math.max(j6,cL,eb))/2:0;
r[F]=[j6-dY,cL-dY,eb-dY]}var l=[d.R(256),d.R(256),d.R(256)];for(var G=0;G<3;G++)for(var F=0;F<256;F++){var v=F*(1/255),aP=0,D=0,ks=0;
D=r[2][G];ks=Math.abs(D);if(D<0)aP=Math.pow(v,Math.SQRT2);else aP=1.63*(Math.pow(v+.04,.5)-.2);v=ks*aP+(1-ks)*v;
D=r[1][G];ks=Math.abs(D);if(D<0)aP=Math.pow(v,2);else aP=Math.min(2.35*(Math.pow(v+.09,.5)-.3),Math.pow(v,1/2));
v=ks*aP+(1-ks)*v;D=r[0][G];ks=Math.abs(D);if(D<0)aP=v<.4?0:Math.pow((v-.4)/.6,Math.SQRT2);else aP=Math.pow(v,Math.SQRT2/2);
v=ks*aP+(1-ks)*v;v=Math.max(0,Math.min(1,v));l[G][F]=Math.round(v*255)}$={type:c.W5,mX:l[0],Cq:l[1],iu:l[2],cU:!1,ky:!1}}if(x=="phfl"){var jC=d.I.Du(Q.Clr.v),ig=[jC.Z/255,jC.r/255,jC.J/255],cD=Q.Dnst.v/100,l=[d.R(256),d.R(256),d.R(256)];
for(var G=0;G<3;G++)for(var F=0;F<256;F++){var v=F*(1/255),eB=v*ig[G];eB=Math.max(0,Math.min(1,eB));
v=cD*eB+(1-cD)*v;l[G][F]=Math.round(v*255)}$={type:c.W5,mX:l[0],Cq:l[1],iu:l[2],cU:!1,ky:Q.PrsL.v}}if(x=="thrs"){var q=d.R(256);
for(var F=Q.Lvl.v;F<256;F++)q[F]=255;$={type:c.W5,mX:q,Cq:q,iu:q,cU:!0,ky:!1}}if(x=="mixr"){var c1=k5.Le(Q),g=[];
for(var F=0;F<c1.b.length;F++)if(F%5!=3)g.push(c1.b[F]/100);if(c1.Xw){for(var b$=1;b$<3;b$++)for(var v=0;
v<4;v++)g[b$*4+v]=g[v]}$={type:c.PP,BS:g}}if(x=="rplc"){var d7=Q.Mnm.v,he=Q.Mxm.v;$={type:c.zC,qH:[d7.Lmnc.v,d7.A.v,d7.B.v],L6:[he.Lmnc.v,he.A.v,he.B.v],shift:[Q.H.v/360,Q.Strt.v/100,Q.Lght.v/100],Ql:Q.Fzns.v/150}}if(x=="clrL"&&Q.profile){var k4=new Uint8Array(Q.profile.v),a6=ICC.R(k4.buffer),cK=[],ds=17,cK=ICC.U.sampleLUT(a6,ds);
$={type:c.QR,aJ:ICC.U.lutToRGBA8(cK,ds),aqt:cK,sE:ds}}return $};k5.m5=function(x,Q){var c=-1;if(x!="levl"||Q==null)c=-1;
else if(Q.Auto)c=0;else if(Q.AuCo)c=1;else if(Q.autoBlackWhite)c=2;return c};k5.C$={W5:0,go:1,sz:2,NS:3,Ro:4,PP:5,zC:6,QR:7};
k5.WD=function(x){if(x<0)return x;return Math.pow(Math.tan(Math.PI/2*x),1.3)};k5.aCg=function(x){if(x<0)return x;
x=Math.pow(x,1/1.3);return Math.atan2(x,1)/(Math.PI/2)};k5.NH=function(x,Q,c,$){var z=k5.C$,j=Date.now();
if(eV.Mx&&$.P()>300*300&&x.type!=z.W5&&x.type!=z.QR){$=$.clone();$.x=$.y=0;var U=eV.Zk(0,$.m,$.e);U.set(Q);
eV.qk(U,$);U.Zw($);k5.NP(x,U.xY,$);U.get(c);return}if(x.type==z.QR){var i=x.aqt,b=x.sE;ICC.U.applyLUT(i,b,Q,c);
var e=Q.length;for(var F=0;F<e;F+=4)c[F+3]=Q[F+3]}if(x.type==z.PP)d.gg.acU(Q,c,x.BS);if(x.type==z.Ro){var k=x.ao9,K=x.jY,g=x.GX,R=x.aeM,e=Q.length;
for(var F=0;F<e;F+=4){var $=Q[F]*(1/255),T=Q[F+1]*(1/255),D=Q[F+2]*(1/255),a=d.Zb($,T,D),_=0;for(var I=0;
I<6;I++)_+=Math.min(1,1.7*(1-a.UZ))*a.ks*x.aBd[I]*k5.azR(a.R0,I*(1/6));var f=Math.max(0,Math.min(1,a.UZ*(1+_)));
if(x.OG==1){var y=0;if(f<g)y=f*(.5/K);else if(f<R)y=f+k*(.5-K);else y=1-(1-f)*.5/(1-K);a.R0=x.arq;a.ks=Math.min(1,k+3*k*Math.abs(f-.5*(g+R)));
a.UZ=y}else{a.R0=0;a.ks=0;a.UZ=f}var Z=d.qs(a.R0,a.ks,a.UZ);c[F]=Math.round(Z.Z*255);c[F+1]=Math.round(Z.r*255);
c[F+2]=Math.round(Z.J*255)}}if(x.type==z.NS){var v=x.amS,e=Q.length,G=1/255;for(var F=0;F<e;F+=4){var $=Q[F]*G,T=Q[F+1]*G,D=Q[F+2]*G,a=d.Zb($,T,D),q=Math.max($,Math.max(T,D)),h=Math.min($,Math.min(T,D)),r=1-$,H=1-T,o=1-D,P=0,O=0,p=0;
for(var I=0;I<9;I++){var C=I*6,Y=0;if(v[C]==1&&v[C+1]==1&&v[C+2]==1&&v[C+3]==0&&v[C+4]==0&&v[C+5]==0)continue;
var W=r*v[C]+v[C+3],J=H*v[C+1]+v[C+4],t=o*v[C+2]+v[C+5];if(I<6)Y=k5.azR(a.R0,I*(1/6))*a.ks*2*Math.min(a.UZ,1-a.UZ);
else if(I==6)Y=Math.max(0,h-.5)*2;else if(I==7)Y=1-(Math.abs(q-.5)+Math.abs(h-.5));else Y=Math.max(0,.5-q)*2;
P+=(Math.max(0,Math.min(1,W))-r)*Y;O+=(Math.max(0,Math.min(1,J))-H)*Y;p+=(Math.max(0,Math.min(1,t))-o)*Y}r=Math.max(0,Math.min(1,r+P));
H=Math.max(0,Math.min(1,H+O));o=Math.max(0,Math.min(1,o+p));$=1-r;T=1-H;D=1-o;c[F]=Math.round($*255);
c[F+1]=Math.round(T*255);c[F+2]=Math.round(D*255)}}if(x.type==z.W5){d.ajI(Q,c,x.mX,x.Cq,x.iu,x.cU,x.ky)}if(x.type==z.go){var l=new Uint32Array(Q.buffer),m=new Uint32Array(c.buffer),e=l.length;
if(k5.j$==null){k5.j$=new Float64Array(256);for(var F=0;F<256;F++)k5.j$[F]=k5.WD(-1+2*F/255)}var B=k5.j$;
for(var F=0;F<e;F++){var L=l[F],$=(L&255)*(1/255),T=(L>>>8&255)*(1/255),D=(L>>>16&255)*(1/255),A=L>>>24,S=Math.min($,T,D),M=Math.max($,T,D),N=0,s=0,V=0;
N=d.Zb($,T,D).R0;var g8=~~(N*255+.5),n=x.ajb[g8]*(1/255),cQ=x.WU[g8]*(1/255)*2-1,hk=x.aj0[g8]*(1/255)*2-1,_=-hk,eG=S;
if(0<hk){_=hk;eG=M}var ie=x.aaC+x.B_*_*eG,eN=x.B_*(1-_);$=ie+eN*$;T=ie+eN*T;D=ie+eN*D;M=Math.max($,T,D);
S=Math.min($,T,D);V=(M+S)*.5;if(M!=S){var gr=M-S;s=V>.5?gr/(2-(M+S)):gr/(M+S)}var ek=cQ;if(x.abO==0){cQ=B[Math.floor((1+cQ)*127.5)];
ek=Math.min(s*(1+cQ),1)}var Z=d.qs(n,ek,V);$=Z.Z;T=Z.r;D=Z.J;m[F]=A<<24|D*255<<16|T*255<<8|$*255}}if(x.type==z.zC){d.SO(Q,c);
var l=new Uint32Array(Q.buffer),m=new Uint32Array(c.buffer),e=l.length,jK=x.Ql,iE=1/jK,e9={xv:x.qH[0],V:x.qH[1],J:x.qH[2]},dm={xv:x.L6[0],V:x.L6[1],J:x.L6[2]};
for(var F=0;F<e;F++){var L=l[F],kD=L&255,gJ=L>>>8&255,dR=L>>>16&255,$=kD*(1/255),T=gJ*(1/255),D=dR*(1/255),A=L>>>24,fO=d.eC(kD,gJ,dR),ko=d.awB(fO,e9,dm,jK,iE);
if(ko==0)continue;var a=d.Zb($,T,D),n=2+a.R0+x.shift[0];a.R0=n-~~n;a.ks=Math.max(0,Math.min(1,a.ks+x.shift[1]));
a.UZ=Math.max(0,Math.min(1,a.UZ+x.shift[2]));var Z=d.qs(a.R0,a.ks,a.UZ);$=(1-ko)*$+ko*Z.Z;T=(1-ko)*T+ko*Z.r;
D=(1-ko)*D+ko*Z.J;m[F]=A<<24|D*255<<16|T*255<<8|$*255}}if(x.type==z.sz){var l=new Uint32Array(Q.buffer),m=new Uint32Array(c.buffer),e=l.length,d8=x.hF[0],fj=x.hF[1],ja=x.hF[2],_=x.hF[3],eD=d.gg.V6([.299,.587,.114,-.147,-.289,.436,.615,-.515,-.1]),d3=d.gg.HQ(eD),fP=2.4;
function b(cE){return Math.max(0,Math.min(1,cE))}function jE(cE){return Math.pow(cE,fP)}function cR(cE){return Math.pow(cE,1/fP)}function ex($,T,D,cE){$=jE($);
T=jE(T);D=jE(D);var a7=d.gg.V3(eD,[$,T,D,1]);a7[0]*=ja;a7[1]*=_;a7[2]*=_;var Z=d.gg.V3(d3,a7);Z[0]=cR(b(Z[0]));
Z[1]=cR(b(Z[1]));Z[2]=cR(b(Z[2]));return Z}for(var F=0;F<e;F++){var L=l[F],$=(L&255)*(1/255),T=(L>>>8&255)*(1/255),D=(L>>>16&255)*(1/255),A=L>>>24,Z=ex($,T,D,d8);
$=Z[0];T=Z[1];D=Z[2];var er=d.Zb($,T,D);er.ks=Math.max(0,Math.min(1,er.ks*(1+fj)));Z=d.qs(er.R0,er.ks,er.UZ);
$=Z.Z;T=Z.r;D=Z.J;m[F]=A<<24|D*255<<16|T*255<<8|$*255}}};k5.NP=function(x,Q,c){eV.wU.NP(x,Q)};k5.azR=function(x,Q){var c=d.vV(Q,x)*6;
return Math.max(0,Math.min(1,c<0?1+c:1-c))};var fK={};fK.hB=function(x){var Q=x.filterID.v;return Q>16777215?w.ajt(Q):x.Fltr.v.classID};
fK.Db=[{WB:"GEfc"},{WB:"LnCr"},{WB:"Adobe Camera Raw Filter"},{WB:"LqFy"},{WB:"VaPo",P$:!0},{J4:"3D",sB:["lightFilterGradient","Dila"]},{J4:[24,2],sB:"Avrg,Blr ,BlrM,boxblur,GsnB,Bokh,MtnB,RdlB,surfaceBlur".split(",")},{J4:[24,4],sB:"Dspl,Kale,Pnch,Plr ,Rple,Shr ,Sphr,Twrl,Wave,ZgZg".split(",")},{J4:[24,6],sB:["AdNs","Dspc","DstS","Mdn ","denoise"]},{J4:[24,8],sB:"ClrH,Crst,Frgm,Mztn,Msc ,Pntl".split(",")},{J4:[24,10],sB:["Flam","Clds","DfrC","Fbrs","LnsF"]},{J4:[24,12],sB:["Shrp","ShrE","ShrM","smartSharpen","UnsM"]},{J4:[24,14],sB:"Dfs ,Embs,FndE,oilPaint,Slrz,TrcC,Wnd ".split(",")},{J4:[24,16],sB:"HghP,HsbP,Mxm ,Mnm ,Ofst,Rept,Ctoa,Dthr,Part".split(",")},{J4:"Fourier",sB:["dDFT","iDFT"]}];
fK.GR={LqFy:"LqFy",LnCr:"LnCr",GEfc:"GEfc","Adobe Camera Raw Filter":"Adobe Camera Raw Filter",Avrg:"Avrg","Blr ":"blurEvent",BlrM:"blurMethod",boxblur:"boxblur",GsnB:"gaussianBlur",Bokh:"Bokh",MtnB:"motionBlur",RdlB:"radialBlur",surfaceBlur:"surfaceBlur",lightFilterGradient:"lightFilterGradient",adaptCorrect:"adaptCorrect",Dspl:"displace",Kale:"Kale",Pnch:"pinch","Plr ":"polar",Rple:"ripple","Shr ":"shear",Sphr:"spherize",Twrl:"twirl",Wave:"wave",ZgZg:"zigZag",AdNs:"addNoise",Dspc:"despeckle",DstS:"dustAndScratches","Mdn ":"median",denoise:"denoise",ClrH:"colorHalftone",Crst:"crystallize",Frgm:"fragment",Mztn:"mezzotint","Msc ":"mosaic",Pntl:"pointillize",Flam:"",Clds:"clouds",DfrC:"differenceClouds",Fbrs:"Fbrs",LnsF:"LnsF",Shrp:"sharpen",ShrE:"sharpenEdges",ShrM:"sharpenMore",smartSharpen:"smartSharpen",UnsM:"unsharpMask","Dfs ":"diffuse",Embs:"emboss",FndE:"findEdges",oilPaint:"oilPaint",Slrz:"solarize",TrcC:"traceContour","Wnd ":"wind",HghP:"highPass",HsbP:"HsbP","Mxm ":"maximum","Mnm ":"minimum",Ofst:"offset",Rept:"Rept",Ctoa:"Ctoa",Dthr:"Dthr",Part:"Part",dDFT:"dDFT",iDFT:"iDFT"};
fK.rp={AddNoise:"AdNs",Average:"Avrg",Blur:"Blr ",BlurMore:"BlrM",Clouds:"Clds",DifferenceClouds:"DfrC",DustAndScratches:"DstS",GaussianBlur:"GsnB",HighPass:"HghP",Maximum:"Mxm ",Minimum:"Mnm ",MotionBlur:"MtnB",Offset:"Ofst",Pinch:"Pnch",PolarCoordinates:"Plr ",Ripple:"Rple",Sharpen:"Shrp",SharpenMore:"ShrM",Twirl:"Twrl",UnsharpMask:"UnsM",Wave:"Wave",Displace:"Dspl",BrightnessContrast:"brit"};
fK.s={rigidTransform:X.V1};fK.names={lightFilterGradient:[24,17,8],rigidTransform:[10,46],LnCr:[24,1,1,0],LqFy:[24,1,0,0],GEfc:[24,0],Avrg:[24,3,0],"Blr ":[24,3,1],BlrM:[24,3,2],boxblur:[24,3,3],GsnB:[24,3,4],Bokh:[24,3,5],MtnB:[24,3,6],RdlB:[24,3,7],surfaceBlur:[24,3,10],Dspl:[24,5,0],Pnch:[24,5,1],"Plr ":[24,5,2],Rple:[24,5,3],"Shr ":[24,5,4],Sphr:[24,5,5],Twrl:[24,1,0,1,3],Wave:[24,5,6],ZgZg:[24,5,7],Kale:[24,5,8],AdNs:[24,7,0],Dspc:[24,7,1],DstS:[24,7,2],"Mdn ":[24,7,3],denoise:[24,7,4],ClrH:[24,9,0],Crst:[24,9,1],Frgm:[24,9,3],Mztn:[24,9,4],"Msc ":[24,9,5],Pntl:[24,9,6],Clds:[24,11,0],DfrC:[24,11,1],LnsF:[24,11,2],Flam:[24,11,3],Fbrs:[24,11,4],Shrp:[24,13,0],ShrE:[24,13,1],ShrM:[24,13,2],smartSharpen:[24,13,3],UnsM:[24,13,4],"Dfs ":[24,15,0],Embs:[24,15,1],FndE:[24,15,3],oilPaint:[24,15,4],Slrz:[24,15,5],TrcC:[24,15,6],"Wnd ":[24,15,7],HghP:[24,17,1],HsbP:"HSB/HSL","Mxm ":[24,17,2],"Mnm ":[24,17,3],Ofst:[24,17,4],Rept:[24,17,5],Ctoa:[24,17,6],Dthr:[12,23,3],Part:[24,17,7],dDFT:"Fourier Transform",iDFT:"Inverse Fourier Transform",defr:[2,13],Dila:"Texture Dilation",VaPo:"Vanishing Point",adaptCorrect:["VAR0/VAR1",[19,6,0],[19,6,2]],"Adobe Camera Raw Filter":"Camera Raw"};
fK.$H=function(x){var Q=null;if(x=="GEfc")Q={__name:"Filter Gallery",classID:"GEfc",GEfs:{t:"VlLs",v:[{t:"Objc",v:ag.$H("GlwE")}]}};
if(x=="LqFy"){var c={ww:5,R0:5,map:new Float32Array(5*5*2)},$=new Uint8Array(id.o5(c)),z=[];for(var F=0;
F<$.length;F++)z.push($[F]);Q={__name:"Liquify",classID:"LqFy",LqMe:{t:"tdta",v:z}}}if(x=="rigidTransform"){Q={__name:"Puppet Warp",classID:"rigidTransform",null:{t:"obj ",v:[{t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Trgt"}}]},rigidType:{t:"bool",v:!0},puppetShapeList:{t:"VlLs",v:[]},PuX0:{t:"doub",v:0},PuX1:{t:"doub",v:1e3},PuX2:{t:"doub",v:1e3},PuX3:{t:"doub",v:0},PuY0:{t:"doub",v:0},PuY1:{t:"doub",v:0},PuY2:{t:"doub",v:1e3},PuY3:{t:"doub",v:1e3}}}if(x=="LnCr")Q={__name:"Lens Correction",classID:"LnCr",LnAg:{t:"bool",v:!0},LnAc:{t:"bool",v:!1},LnAv:{t:"bool",v:!1},LnAs:{t:"bool",v:!1},LnIp:{t:"bool",v:!1},LnFo:{t:"doub",v:0},LnPr:{t:"TEXT",v:""},LnIa:{t:"doub",v:0},LnI0:{t:"doub",v:0},LnI1:{t:"doub",v:0},LnI2:{t:"doub",v:0},LnI3:{t:"doub",v:1},LnRa:{t:"doub",v:0},LnVp:{t:"doub",v:0},LnHp:{t:"doub",v:0},LnSi:{t:"doub",v:100},LnFt:{t:"long",v:2},LnSb:{t:"doub",v:0},LnSt:{t:"long",v:50},LnRc:{t:"doub",v:0},LnGm:{t:"doub",v:0},LnBy:{t:"doub",v:0},LnNa:{t:"long",v:64},LnIh:{t:"long",v:0},LnIv:{t:"long",v:0},LnIs:{t:"Objc",v:{classID:"RGBC",Rd:{t:"doub",v:127},Grn:{t:"doub",v:127},Bl:{t:"doub",v:127}}},LnNm:{t:"bool",v:!1}};
if(x=="adaptCorrect")Q={__name:"Shadow/Highlight",classID:"adaptCorrect",sdwM:{t:"Objc",v:{__name:"Parameters",classID:"adaptCorrectTones",Amnt:{t:"UntF",v:{type:"#Prc",val:50}},Wdth:{t:"UntF",v:{type:"#Prc",val:25}},Rds:{t:"long",v:12}}},hglM:{t:"Objc",v:{__name:"Parameters",classID:"adaptCorrectTones",Amnt:{t:"UntF",v:{type:"#Prc",val:0}},Wdth:{t:"UntF",v:{type:"#Prc",val:0}},Rds:{t:"long",v:0}}},BlcC:{t:"doub",v:0},WhtC:{t:"doub",v:0},Cntr:{t:"long",v:0},ClrC:{t:"long",v:0}};
if(x=="Dfs ")Q={__name:"Diffuse",classID:"Dfs",Md:{t:"enum",v:{DfsM:"Nrml"}},FlRs:{t:"long",v:14061024}};
if(x=="Fbrs")Q={__name:"Fibers",classID:"Fbrs",Vrnc:{t:"long",v:10},Strg:{t:"long",v:1},RndS:{t:"long",v:8438429}};
if(x=="Embs")Q={__name:"Emboss",classID:"Embs",Angl:{t:"long",v:45},Hght:{t:"long",v:5},Amnt:{t:"long",v:100}};
if(x=="oilPaint")Q={__name:"Oil Paint",classID:"oilPaint",lightingOn:{t:"bool",v:!0},stylization:{t:"doub",v:3},brushScale:{t:"doub",v:1},microBrush:{t:"doub",v:0},LghD:{t:"long",v:45},specularity:{t:"doub",v:1},cleanliness:{t:"doub",v:2}};
if(x=="TrcC")Q={__name:"Trace Contour",classID:"TrcC",Lvl:{t:"long",v:128},Edg:{t:"enum",v:{CntE:"Lwr"}}};
if(x=="Wnd ")Q={__name:"Wind",classID:"Wnd",WndM:{t:"enum",v:{WndM:"Wnd"}},Drct:{t:"enum",v:{Drct:"Rght"}}};
if(x=="lightFilterGradient")Q={__name:"Generate Normals",classID:"lightFilterGradient",blur:{t:"doub",v:0},textureScale:{t:"doub",v:1},Scl:{t:"doub",v:1},Dtl:{t:"VlLs",v:[{t:"doub",v:1},{t:"doub",v:1},{t:"doub",v:1}]}};
if(x=="boxblur")Q={__name:"Box Blur",classID:"boxblur",Rds:{t:"UntF",v:{type:"#Pxl",val:15}}};if(x=="GsnB")Q={__name:"Gaussian Blur",classID:"GsnB",Rds:{t:"UntF",v:{type:"#Pxl",val:7.2}}};
if(x=="Bokh")Q={__name:"Lens Blur",classID:"Bokh",BkDi:{t:"enum",v:{BtDi:"BeIn"}},BkDp:{t:"long",v:0},BkDs:{t:"bool",v:!1},BkIs:{t:"enum",v:{BtIs:"BeS6"}},BkIb:{t:"doub",v:30},BkIc:{t:"long",v:0},BkIr:{t:"long",v:0},BkSb:{t:"doub",v:0},BkSt:{t:"long",v:255},BkNa:{t:"long",v:0},BkNt:{t:"enum",v:{BtNt:"BeNu"}},BkNm:{t:"bool",v:!1}};
if(x=="MtnB")Q={__name:"Motion Blur",classID:"MtnB",Angl:{t:"long",v:0},Dstn:{t:"UntF",v:{type:"#Pxl",val:4}}};
if(x=="RdlB")Q={__name:"Radial Blur",classID:"RdlB",Amnt:{t:"long",v:10},BlrM:{t:"enum",v:{BlrM:"Spn"}},BlrQ:{t:"enum",v:{BlrQ:"Gd"}},Cntr:{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:.5},Vrtc:{t:"doub",v:.5}}}};
if(x=="surfaceBlur")Q={__name:"Surface Blur",classID:"surfaceBlur",Rds:{t:"UntF",v:{type:"#Pxl",val:15}},Thsh:{t:"long",v:15}};
if(x=="denoise")Q={__name:"Reduce Noise",classID:"denoise",ClNs:{t:"UntF",v:{type:"#Prc",val:29}},Shrp:{t:"UntF",v:{type:"#Prc",val:0}},removeJPEGArtifact:{t:"bool",v:!1},channelDenoise:{t:"VlLs",v:[{t:"Objc",v:{classID:"channelDenoiseParams",Chnl:{t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:"Cmps"}}]},Amnt:{t:"long",v:5},EdgF:{t:"long",v:0}}},{t:"Objc",v:{classID:"channelDenoiseParams",Chnl:{t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:"Rd"}}]},Amnt:{t:"long",v:0}}},{t:"Objc",v:{classID:"channelDenoiseParams",Chnl:{t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:"Grn"}}]},Amnt:{t:"long",v:0}}},{t:"Objc",v:{classID:"channelDenoiseParams",Chnl:{t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:"Bl"}}]},Amnt:{t:"long",v:0}}}]},preset:{t:"TEXT",v:"Default"}};
if(x=="Dspl")Q={__name:"Displace",classID:"Dspl",HrzS:{t:"long",v:10},VrtS:{t:"long",v:10},DspM:{t:"enum",v:{DspM:"StrF"}},UndA:{t:"enum",v:{UndA:"RptE"}},DspF:{t:"Pth ",v:{sig:"txtu",pth:"file.psd\0"}}};
if(x=="Pnch")Q={__name:"Pinch",classID:"Pnch",Amnt:{t:"long",v:-100}};if(x=="Plr ")Q={__name:"Polar Coordinates",classID:"Plr",Cnvr:{t:"enum",v:{Cnvr:"RctP"}}};
if(x=="Rple")Q={__name:"Ripple",classID:"Rple",Amnt:{t:"long",v:999},RplS:{t:"enum",v:{RplS:"Mdm"}}};
if(x=="Shr ")Q={__name:"Shear",classID:"Shr",ShrP:{t:"VlLs",v:[{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:0},Vrtc:{t:"doub",v:1}}},{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:0},Vrtc:{t:"doub",v:128}}}]},UndA:{t:"enum",v:{UndA:"WrpA"}},ShrS:{t:"long",v:0},ShrE:{t:"long",v:1}};
if(x=="Sphr")Q={__name:"Spherize",classID:"Sphr",Amnt:{t:"long",v:100},SphM:{t:"enum",v:{SphM:"Nrml"}}};
if(x=="Twrl")Q={__name:"Twirl",classID:"Twrl",Angl:{t:"long",v:90}};if(x=="Wave")Q={__name:"Wave",classID:"Wave",Wvtp:{t:"enum",v:{Wvtp:"WvSn"}},NmbG:{t:"long",v:1},WLMn:{t:"long",v:101},WLMx:{t:"long",v:102},AmMn:{t:"long",v:36},AmMx:{t:"long",v:37},SclH:{t:"long",v:100},SclV:{t:"long",v:100},UndA:{t:"enum",v:{UndA:"WrpA"}},RndS:{t:"long",v:743887}};
if(x=="ZgZg")Q={__name:"ZigZag",classID:"ZgZg",Amnt:{t:"long",v:50},NmbR:{t:"long",v:10},ZZTy:{t:"enum",v:{ZZTy:"ArnC"}}};
if(x=="AdNs")Q={__name:"Add Noise",classID:"AdNs",Dstr:{t:"enum",v:{Dstr:"Unfr"}},Nose:{t:"UntF",v:{type:"#Prc",val:20}},Mnch:{t:"bool",v:!1},FlRs:{t:"long",v:100691320}};
if(x=="DstS")Q={__name:"Dust & Scratches",classID:"DstS",Rds:{t:"long",v:2},Thsh:{t:"long",v:26}};if(x=="Mdn ")Q={__name:"Median",classID:"Mdn",Rds:{t:"UntF",v:{type:"#Pxl",val:7}}};
if(x=="ClrH")Q={__name:"Color Halftone",classID:"ClrH",Rds:{t:"long",v:8},Ang1:{t:"long",v:10},Ang2:{t:"long",v:40},Ang3:{t:"long",v:70},Ang4:{t:"long",v:80}};
if(x=="Crst")Q={__name:"Crystallize",classID:"Crst",ClSz:{t:"long",v:10},FlRs:{t:"long",v:1554929224}};
if(x=="Mztn")Q={__name:"Mezzotint",classID:"Mztn",MztT:{t:"enum",v:{MztT:"FnDt"}},FlRs:{t:"long",v:204994187}};
if(x=="Msc ")Q={__name:"Mosaic",classID:"Msc",ClSz:{t:"UntF",v:{type:"#Pxl",val:12}}};if(x=="Pntl")Q={__name:"Pointillize",classID:"Pntl",ClSz:{t:"long",v:10},FlRs:{t:"long",v:1554929236}};
if(x=="LnsF")Q={__name:"Lens Flare",classID:"LnsF",Brgh:{t:"long",v:100},FlrC:{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:.19140625},Vrtc:{t:"doub",v:.185628741979599}}},Lns:{t:"enum",v:{Lns:"Zm"}}};
if(x=="Dthr")Q={__name:"Dither",classID:"Dthr",Plte:{t:"long",v:0},Mthd:{t:"long",v:1}};if(x=="Part")Q={__name:"Dither",classID:"Part",Cont:{t:"long",v:10},Size:{t:"long",v:8},Dpth:{t:"long",v:100},Brgh:{t:"long",v:800},Clr:{t:"Objc",v:{classID:"RGBC",Rd:{v:255,t:"doub"},Grn:{v:255,t:"doub"},Bl:{v:255,t:"doub"}}},Time:{t:"doub",v:0},Turb:{t:"long",v:0},Blnk:{t:"bool",v:!0},Fall:{t:"bool",v:!1},RndS:{t:"long",v:8438429}};
if(x=="Adobe Camera Raw Filter")Q={__name:"Camera Raw Filter",classID:"Adobe Camera Raw Filter",CMod:{t:"TEXT",v:"Filter"},Sett:{t:"enum",v:{Sett:"Cst"}},WBal:{t:"enum",v:{WBal:"AsSh"}},Temp:{t:"long",v:0},Tint:{t:"long",v:0},CtoG:{t:"bool",v:!1},Strt:{t:"long",v:0},Shrp:{t:"long",v:0},LNR:{t:"long",v:0},CNR:{t:"long",v:0},VigA:{t:"long",v:0},BlkB:{t:"long",v:0},RHue:{t:"long",v:0},RSat:{t:"long",v:0},GHue:{t:"long",v:0},GSat:{t:"long",v:0},BHue:{t:"long",v:0},BSat:{t:"long",v:0},Vibr:{t:"long",v:0},HA_R:{t:"long",v:0},HA_O:{t:"long",v:0},HA_Y:{t:"long",v:0},HA_G:{t:"long",v:0},HA_A:{t:"long",v:0},HA_B:{t:"long",v:0},HA_P:{t:"long",v:0},HA_M:{t:"long",v:0},SA_R:{t:"long",v:0},SA_O:{t:"long",v:0},SA_Y:{t:"long",v:0},SA_G:{t:"long",v:0},SA_A:{t:"long",v:0},SA_B:{t:"long",v:0},SA_P:{t:"long",v:0},SA_M:{t:"long",v:0},LA_R:{t:"long",v:0},LA_O:{t:"long",v:0},LA_Y:{t:"long",v:0},LA_G:{t:"long",v:0},LA_A:{t:"long",v:0},LA_B:{t:"long",v:0},LA_P:{t:"long",v:0},LA_M:{t:"long",v:0},STSH:{t:"long",v:0},STSS:{t:"long",v:0},STHH:{t:"long",v:0},STHS:{t:"long",v:0},STB:{t:"long",v:0},PC_S:{t:"long",v:0},PC_D:{t:"long",v:0},PC_L:{t:"long",v:0},PC_H:{t:"long",v:0},PC_1:{t:"long",v:25},PC_2:{t:"long",v:50},PC_3:{t:"long",v:75},ShpR:{t:"doub",v:1},ShpD:{t:"long",v:25},ShpM:{t:"long",v:0},PCVA:{t:"long",v:0},GRNA:{t:"long",v:0},LPEn:{t:"long",v:0},MDis:{t:"long",v:0},PerV:{t:"long",v:0},PerH:{t:"long",v:0},PerR:{t:"doub",v:0},PerS:{t:"long",v:100},PerA:{t:"long",v:0},PerU:{t:"long",v:0},PerX:{t:"doub",v:0},PerY:{t:"doub",v:0},AuCA:{t:"long",v:0},Ex12:{t:"doub",v:0},Cr12:{t:"long",v:0},Hi12:{t:"long",v:0},Sh12:{t:"long",v:0},Wh12:{t:"long",v:0},Bk12:{t:"long",v:0},Cl12:{t:"long",v:0},DfPA:{t:"long",v:0},DPHL:{t:"long",v:30},DPHH:{t:"long",v:70},DfGA:{t:"long",v:0},DPGL:{t:"long",v:40},DPGH:{t:"long",v:60},Dhze:{t:"long",v:0},TMMs:{t:"long",v:0},Crv:{t:"VlLs",v:[{t:"long",v:0},{t:"long",v:0},{t:"long",v:255},{t:"long",v:255}]},CrvR:{t:"VlLs",v:[{t:"long",v:0},{t:"long",v:0},{t:"long",v:255},{t:"long",v:255}]},CrvG:{t:"VlLs",v:[{t:"long",v:0},{t:"long",v:0},{t:"long",v:255},{t:"long",v:255}]},CrvB:{t:"VlLs",v:[{t:"long",v:0},{t:"long",v:0},{t:"long",v:255},{t:"long",v:255}]},CamP:{t:"TEXT",v:"Embedded"},CP_D:{t:"TEXT",v:"54650A341B5B5CCAE8442D0B43A92BCE"},PrVe:{t:"long",v:184549376},Rtch:{t:"TEXT",v:""},REye:{t:"TEXT",v:""},LCs:{t:"TEXT",v:""},Look:{t:"TEXT",v:""},Pset:{t:"TEXT",v:""}};
if(x=="smartSharpen")Q={__name:"Smart Sharpen",classID:"smartSharpen",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},useLegacy:{t:"bool",v:!1},Amnt:{t:"UntF",v:{type:"#Prc",val:150}},Rds:{t:"UntF",v:{type:"#Pxl",val:1}},noiseReduction:{t:"UntF",v:{type:"#Prc",val:0}},blur:{t:"enum",v:{blurType:"GsnB"}}};
if(x=="UnsM")Q={__name:"Unsharp Mask",classID:"UnsM",Amnt:{t:"UntF",v:{type:"#Prc",val:142}},Rds:{t:"UntF",v:{type:"#Pxl",val:4.5}},Thsh:{t:"long",v:0}};
if(x=="HghP")Q={__name:"High Pass",classID:"HghP",Rds:{t:"UntF",v:{type:"#Pxl",val:3}}};if(x=="HsbP")Q={__name:"HSB/HSL",classID:"HsbP",Inpt:{t:"enum",v:{ClrS:"RGBC"}},Otpt:{t:"enum",v:{ClrS:"HSBl"}}};
if(x=="Mxm ")Q={__name:"Maximum",classID:"Mxm",Rds:{t:"UntF",v:{type:"#Pxl",val:8}},preserveShape:{t:"enum",v:{preserveShape:"squareness"}}};
if(x=="Mnm ")Q={__name:"Minimum",classID:"Mnm",Rds:{t:"UntF",v:{type:"#Pxl",val:8}},preserveShape:{t:"enum",v:{preserveShape:"squareness"}}};
if(x=="Ofst")Q={__name:"Offset",classID:"Ofst",Hrzn:{t:"long",v:144},Vrtc:{t:"long",v:278},Fl:{t:"enum",v:{FlMd:"Wrp"}}};
if(x=="Kale")Q={__name:"Kaleidoscope",classID:"Kale",Mirr:{t:"long",v:6},MRot:{t:"long",v:0}};if(x=="Rept")Q={__name:"Repeat",classID:"Rept",Scl:{v:{type:"#Prc",val:100},t:"UntF"},Rsft:{v:{type:"#Prc",val:0},t:"UntF"},SpcX:{v:{type:"#Prc",val:0},t:"UntF"},SpcY:{v:{type:"#Prc",val:0},t:"UntF"},SpcC:{t:"bool",v:!1},Angl:{t:"long",v:0}};
if(x=="Flam")Q={__name:"Repeat",classID:"Flam",Type:{t:"long",v:0},Leng:{t:"long",v:140},RndL:{t:"bool",v:!1},Widt:{t:"long",v:100},Angl:{t:"long",v:0},Intr:{t:"long",v:100},Adpt:{t:"bool",v:!1},Qual:{t:"long",v:1},Clr:{v:{classID:"RGBC",Rd:{v:255,t:"doub"},Grn:{v:110,t:"doub"},Bl:{v:28,t:"doub"}},t:"Objc"},Turb:{t:"long",v:50},Jag:{t:"long",v:0},Opct:{v:{type:"#Prc",val:25},t:"UntF"},Lins:{t:"long",v:10},Botm:{t:"long",v:30},Styl:{t:"long",v:0},Shap:{t:"long",v:0},RnSh:{t:"bool",v:!1},Arng:{t:"long",v:18}};
if(x=="Ctoa")Q={__name:"Color to Alpha",classID:"Ctoa",Trsp:{v:{type:"#Prc",val:0},t:"UntF"},Opct:{v:{type:"#Prc",val:100},t:"UntF"},Clr:{v:{classID:"RGBC",Rd:{v:0,t:"doub"},Grn:{v:0,t:"doub"},Bl:{v:0,t:"doub"}},t:"Objc"}};
if(x=="brit")Q={__name:"Brightness/Contrast",classID:"BrgC",Brgh:{t:"long",v:0},Cntr:{t:"long",v:0},useLegacy:{t:"bool",v:!1}};
if(x=="levl")Q={__name:"Levels",classID:"Lvls",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Adjs:{t:"VlLs",v:[]}};
if(x=="curv")Q={__name:"Curves",classID:"Crvs",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Adjs:{t:"VlLs",v:[]}};
if(x=="expA")Q={__name:"Exposure",classID:"Exps",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Exps:{t:"doub",v:0},Ofst:{t:"doub",v:0},gammaCorrection:{t:"doub",v:1}};
if(x=="vibA")Q={__name:"Vibrance",classID:"vibrance",vibrance:{t:"long",v:0},Strt:{t:"long",v:0}};if(x=="hue2")Q={__name:"Hue/Saturation",classID:"HStr",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Clrz:{t:"bool",v:!1},Adjs:{t:"VlLs",v:[]}};
if(x=="blnc")Q={__name:"Color Balance",classID:"ClrB",ShdL:{t:"VlLs",v:[{t:"long",v:0},{t:"long",v:0},{t:"long",v:0}]},MdtL:{t:"VlLs",v:[{t:"long",v:0},{t:"long",v:0},{t:"long",v:0}]},HghL:{t:"VlLs",v:[{t:"long",v:0},{t:"long",v:0},{t:"long",v:0}]},PrsL:{t:"bool",v:!0}};
if(x=="blwh")Q={__name:"Black & White",classID:"BanW",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Rd:{t:"long",v:40},Yllw:{t:"long",v:85},Grn:{t:"long",v:204},Cyn:{t:"long",v:60},Bl:{t:"long",v:20},Mgnt:{t:"long",v:80},useTint:{t:"bool",v:!0},tintColor:{t:"Objc",v:{classID:"RGBC",Rd:{t:"doub",v:0},Grn:{t:"doub",v:0},Bl:{t:"doub",v:0}}}};
if(x=="phfl")Q={__name:"Photo Filter",classID:"photoFilter",Clr:{t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:67.06},A:{t:"doub",v:32},B:{t:"doub",v:120}}},Dnst:{t:"long",v:80},PrsL:{t:"bool",v:!0}};
if(x=="grdm")Q={__name:"Gradient Map",classID:"GrMp",Rvrs:{t:"bool",v:!1},Grad:JSON.parse(aF.lF[6]).Grad};
if(x=="selc")Q={__name:"Selective Color",classID:"SlcC",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Mthd:{t:"enum",v:{CrcM:"Rltv"}},ClrC:{t:"VlLs",v:[]}};
if(x=="thrs")Q={__name:"Threshold",classID:"Thrs",Lvl:{t:"long",v:128}};if(x=="mixr")Q={__name:"Channel Mixer",classID:"ChnM",presetKind:{t:"enum",v:{presetKindType:"presetKindDefault"}},Mnch:{t:"bool",v:!1},Rd:{t:"Objc",v:{classID:"ChMx",Rd:{t:"UntF",v:{type:"#Prc",val:100}}}},Grn:{t:"Objc",v:{classID:"ChMx",Grn:{t:"UntF",v:{type:"#Prc",val:100}}}},Bl:{t:"Objc",v:{classID:"ChMx",Bl:{t:"UntF",v:{type:"#Prc",val:100}}}}};
if(x=="clrL")Q={__name:"Color Lookup",classID:"colorLookup"};if(x=="post")Q={__name:"Posterize",classID:"Pstr",Lvls:{t:"long",v:3}};
if(x=="rplc")Q={__name:"Replace Color",classID:"RplC",Fzns:{t:"long",v:55},Mnm:{t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:73.1},A:{t:"doub",v:23.95},B:{t:"doub",v:8.03}}},Mxm:{t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:73},A:{t:"doub",v:23},B:{t:"doub",v:8}}},H:{t:"long",v:-22},Strt:{t:"long",v:0},Lght:{t:"long",v:0}};
if(x=="fade")Q={__name:"Fade",classID:"fade",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Md:{t:"enum",v:{BlnM:"Nrml"}}};
if(x=="aply")Q={classID:"null",With:{t:"Objc",v:{classID:"Clcl",T:{t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:"RGB"}},{t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Mrgd"}}]},Invr:{t:"bool",v:!1},Clcl:{t:"enum",v:{Clcn:"Nrml"}},Opct:{t:"UntF",v:{type:"#Prc",val:100}},Ofst:{t:"long",v:128},Scl:{t:"doub",v:1},PrsT:{t:"bool",v:!1}}}};
if(x=="matc"){Q={__name:"Match Color",classID:"matchColor",Lght:{t:"long",v:100},ClrR:{t:"long",v:100},Fade:{t:"long",v:0},fsel:{t:"bool",v:!0},neutralizeColor:{t:"bool",v:!1},noReference:{t:"bool",v:!0}}}if(x=="Dila")Q={__name:"Texture Dilation",classID:"Dila",Crop:{t:"UntF",v:{type:"#Pxl",val:0}},Rds:{t:"UntF",v:{type:"#Pxl",val:10}}};
if(x=="blendOptions")Q={classID:"blendOptions",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Md:{t:"enum",v:{BlnM:"Nrml"}}};
return Q};fK.qX={sFlam:function(x,Q){Q[0]=x.Type.v;Q[1]=x.Leng.v;Q[2]=x.RndL.v;Q[3]=x.Widt.v;Q[4]=x.Angl.v;
Q[5]=x.Intr.v;Q[6]=x.Adpt.v;Q[7]=x.Clr.v;Q[8]=x.Qual.v;Q[9]=x.Turb.v;Q[10]=x.Jag.v;Q[11]=x.Opct.v.val;
Q[12]=x.Lins.v;Q[13]=x.Botm.v;Q[14]=x.Styl.v;Q[15]=x.Shap.v;Q[16]=x.RnSh.v;Q[17]=x.Arng.v},gFlam:function(x,Q){x.Type.v=Q[0];
x.Leng.v=Q[1];x.RndL.v=Q[2];x.Widt.v=Q[3];x.Angl.v=Q[4];x.Intr.v=Q[5];x.Adpt.v=Q[6];x.Clr.v=Q[7];x.Qual.v=Q[8];
x.Turb.v=Q[9];x.Jag.v=Q[10];x.Opct.v.val=Q[11];x.Lins.v=Q[12];x.Botm.v=Q[13];x.Styl.v=Q[14];x.Shap.v=Q[15];
x.RnSh.v=Q[16];x.Arng.v=Q[17]},sAdNs:function(x,Q){Q[0]=x.Nose.v.val;Q[1]=["Gsn","Unfr"].indexOf(x.Dstr.v.Dstr);
Q[2]=x.Mnch.v},gAdNs:function(x,Q){x.Nose.v.val=Q[0];x.Dstr.v.Dstr=["Gsn","Unfr"][Q[1]];x.Mnch.v=Q[2]},sDstS:function(x,Q){Q[0]=x.Rds.v;
Q[1]=x.Thsh.v},gDstS:function(x,Q){x.Rds.v=Q[0];x.Thsh.v=Q[1]},sGsnB:function(x,Q){Q[0]=x.Rds.v.val},gGsnB:function(x,Q){x.Rds.v.val=Q[0]},sDila:function(x,Q){Q[0]=x.Crop.v.val;
Q[1]=x.Rds.v.val},gDila:function(x,Q){x.Crop.v.val=Q[0];x.Rds.v.val=Q[1]},sHghP:function(x,Q){Q[0]=x.Rds.v.val},gHghP:function(x,Q){x.Rds.v.val=Q[0]},sHsbP:function(x,Q){var c=["RGBC","HSBl","HSLC"];
Q[0]=c.indexOf(x.Inpt.v.ClrS);Q[1]=c.indexOf(x.Otpt.v.ClrS)},gHsbP:function(x,Q){var c=["RGBC","HSBl","HSLC"];
x.Inpt.v.ClrS=c[Q[0]];x.Otpt.v.ClrS=c[Q[1]]},"sMxm ":function(x,Q){var c="preserveShape";Q[0]=x.Rds.v.val;
Q[1]=x[c]?["squareness","Rndn"].indexOf(x[c].v[c]):0},"gMxm ":function(x,Q){var c="preserveShape";x.Rds.v.val=Q[0];
x[c]={t:"enum",v:{preserveShape:["squareness","Rndn"][Q[1]]}}},"sMnm ":function(x,Q){var c="preserveShape";
Q[0]=x.Rds.v.val;Q[1]=x[c]?["squareness","Rndn"].indexOf(x[c].v[c]):0},"gMnm ":function(x,Q){var c="preserveShape";
x.Rds.v.val=Q[0];x[c]={t:"enum",v:{preserveShape:["squareness","Rndn"][Q[1]]}}},sMtnB:function(x,Q){Q[0]=[x.Angl.v];
Q[1]=x.Dstn.v.val;console.log(Q)},gMtnB:function(x,Q){x.Angl.v=typeof Q[0]=="number"?Q[0]:Q[0][0];x.Dstn.v.val=Q[1]},sOfst:function(x,Q){Q[0]=x.Hrzn.v;
Q[1]=x.Vrtc.v;Q[2]=["Rpt","Bckg","Wrp"].indexOf(x.Fl.v.FlMd)},gOfst:function(x,Q){x.Hrzn.v=Q[0];x.Vrtc.v=Q[1];
x.Fl.v.FlMd=["Rpt","Bckg","Wrp"][Q[2]]},sPnch:function(x,Q){Q[0]=x.Amnt.v},gPnch:function(x,Q){x.Amnt.v=Q[0]},"sPlr ":function(x,Q){Q[0]=["RctP","PlrR"].indexOf(x.Cnvr.v.Cnvr)},"gPlr ":function(x,Q){x.Cnvr.v.Cnvr=["RctP","PlrR"][Q[0]]},sRple:function(x,Q){Q[0]=x.Amnt.v;
Q[1]=["Sml","Mdm","Lrg"].indexOf(x.RplS.v.RplS)},gRple:function(x,Q){x.Amnt.v=Q[0];x.RplS.v.RplS=["Sml","Mdm","Lrg"][Q[1]]},sTwrl:function(x,Q){Q[0]=x.Angl.v},gTwrl:function(x,Q){x.Angl.v=Q[0]},sZgZg:function(x,Q){Q[0]=x.Amnt.v;
Q[1]=x.NmbR.v;Q[2]=["ArnC","OtFr","PndR"].indexOf(x.ZZTy.v.ZZTy)},gZgZg:function(x,Q){x.Amnt.v=Q[0];
x.NmbR.v=Q[1];x.ZZTy.v.ZZTy=["ArnC","OtFr","PndR"][Q[2]]},sUnsM:function(x,Q){Q[0]=x.Amnt.v.val;Q[1]=x.Rds.v.val;
Q[2]=x.Thsh.v},gUnsM:function(x,Q){x.Amnt.v.val=Q[0];x.Rds.v.val=Q[1];x.Thsh.v=Q[2]},sWave:function(x,Q){Q[0]=x.NmbG.v;
Q[1]=x.WLMn.v;Q[2]=x.WLMx.v;Q[3]=x.AmMn.v;Q[4]=x.AmMx.v;Q[5]=x.SclH.v;Q[6]=x.SclV.v;Q[7]=["WvSn","WvTr","WvSq"].indexOf(x.Wvtp.v.Wvtp);
Q[8]=["WrpA","RptE"].indexOf(x.UndA.v.UndA);Q[9]=x.RndS.v},gWave:function(x,Q){x.NmbG.v=Q[0];x.WLMn.v=Q[1];
x.WLMx.v=Q[2];x.AmMn.v=Q[3];x.AmMx.v=Q[4];x.SclH.v=Q[5];x.SclV.v=Q[6];x.Wvtp.v.Wvtp=["WvSn","WvTr","WvSq"][Q[7]];
x.UndA.v.UndA=["WrpA","RptE"][Q[8]];if(Q[9]!=null){var c=parseInt(Q[9]);if(isNaN(c))c=248325464;c=Math.max(0,Math.min(268435455,c));
x.RndS.v=c}},sDspl:function(x,Q){Q[0]=x.HrzS.v;Q[1]=x.VrtS.v;Q[2]=0;Q[3]=["WrpA","RptE"].indexOf(x.UndA.v.UndA)},gDspl:function(x,Q){x.HrzS.v=Q[0];
x.VrtS.v=Q[1];x.UndA.v.UndA=["WrpA","RptE"][Q[3]];x.DspF.v.pth=Q[4]},sbrit:function(x,Q){Q[0]=x.Brgh?x.Brgh.v:0;
Q[1]=x.Cntr?x.Cntr.v:0;Q[2]=x.useLegacy?x.useLegacy.v:!1},gbrit:function(x,Q){x.Brgh.v=Q[0];x.Cntr.v=Q[1];
if(Q[2]!=null)x.useLegacy.v=Q[2]}};fK.ajX=function(x){var Q=new bC(0,0);if(x.enab.v==!1)return Q;var c=x.filterFXList.v;
for(var F=0;F<c.length;F++){var $=c[F].v;if($.enab.v==!1)continue;var z=fK.hB($),j=fK.xs(z,$.Fltr?$.Fltr.v:null);
if(j.x>Q.x)Q.x=j.x;if(j.y>Q.y)Q.y=j.y}return Q};fK.xs=function(x,Q){var c=0,$=0;if(["GsnB","boxblur","smartSharpen","UnsM","HghP"].indexOf(x)!=-1){var z=Q.Rds?Q.Rds.v.val:1;
c=$=z*2.57}if(x=="MtnB")c=$=Q.Dstn.v.val;if("Dila,Ofst,Rept,LqFy,Dspl,Pnch,Rple,Shr ,Sphr,Twrl,ZgZg,Wave,RdlB,Clds,DfrC,Plr ,LnCr,Wnd ,lightFilterGradient,rigidTransform,Frgm,Flam".split(",").indexOf(x)!=-1){c=$=1e4}if(x=="GEfc")return ag.xs(Q);
return new bC(Math.ceil(c),Math.ceil($))};fK.xO=function(){return{t:"Objc",v:{classID:"filterFXStyle",enab:{t:"bool",v:!0},validAtPosition:{t:"bool",v:!0},filterMaskEnable:{t:"bool",v:!0},filterMaskLinked:{t:"bool",v:!0},filterMaskExtendWithWhite:{t:"bool",v:!0},filterFXList:{t:"VlLs",v:[]}}}};
fK.Z5=function(x,Q){var c={Z:Q.Gj>>16,r:Q.Gj>>8&255,J:Q.Gj&255},$={Z:Q.QI>>16,r:Q.QI>>8&255,J:Q.QI&255},z=fK.names[x];
if(z==null)z=k5.names[x];var j=x;for(var U in k5.WZ)if(k5.WZ[U]==x)j=U;var i={t:"Objc",v:{classID:"filterFX",Nm:{t:"TEXT",v:ah.get(z)},blendOptions:{t:"Objc",v:{classID:"blendOptions",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Md:{t:"enum",v:{BlnM:"Nrml"}}}},enab:{t:"bool",v:!0},hasoptions:{t:"bool",v:!0},FrgC:{t:"Objc",v:d.I.lV(c)},BckC:{t:"Objc",v:d.I.lV($)},filterID:{t:"long",v:j.length==4?w.azi(j):777}}},b=fK.$H(x);
if(b)i.v.Fltr={t:"Objc",v:b};return i};fK.xM=function(x,Q,c,$){var z=Date.now(),j=eV.Mx&&Math.max($.m,$.e)<=eV.Yt.getParameter(eV.Yt.MAX_TEXTURE_SIZE);
if(x<1){var U=Math.round(x*5),i=[1,2,1,2,[40,26,13,6,4,2][U],2,1,2,1];i=d.hx.C6(i);if(!j){d.HO(c);var b=c.slice(0);
d.hx.QY(b,c,$.m,$.e,i,255);d.mQ(c)}else{var e=$.m,k=$.e,K=eV.Zk(0,e,k);K.set(c);var g=eV.Zk(1,e,k),R=new Float32Array([1/e,1/k]);
eV.qk(g);eV.filter.NP({type:eV.filter.ahP,d$:R,a1$:new Float32Array(i)},K.cm);g.get(c)}}else{var T=Q==d.yg.k_?0:Q==d.yg.a1A?1:2,D=[];
while(T!=2&&x*[1,2.4][T]>20&&D.length<4){var a=d.t1(c,$);D.push(c,$);c=a.AX;$=a.rect;x/=2}var e=$.m,k=$.e;
if(!j||T==2&&x>15){d.HO(c);Q(c,$,x);d.mQ(c)}else{var K=eV.Zk(0,e,k);K.set(c);var g=eV.Zk(1,e,k),R=new Float32Array([1/e,1/k]);
if(T==0){var _=1;while(_<x)_<<=1;eV.qk(g);eV.filter.NP({type:eV.filter.W7,d$:R,Ui:x,Zz:[0,0,_]},K.cm);
eV.qk(K);eV.filter.NP({type:eV.filter.W7,d$:R,Ui:x,Zz:[0,1,_]},g.cm);K.get(c)}else if(T==1){var I=3,f=d.yg.E0(x,I);
for(var F=0;F<I;F++){var y=f[F]>>>1,Z=1;while(Z<y)Z<<=1;if(y==0)continue;eV.qk(g);eV.filter.NP({type:eV.filter.W7,d$:R,Ui:y,Zz:[0,0,Z]},K.cm);
eV.qk(K);eV.filter.NP({type:eV.filter.W7,d$:R,Ui:y,Zz:[0,1,Z]},g.cm)}K.get(c)}else{var _=1;while(_<x)_<<=1;
eV.qk(g);eV.filter.NP({type:eV.filter.W7,d$:R,Ui:x,Zz:[0,0,_]},K.cm);g.get(c)}}var v=Date.now();while(D.length!=0){var G=D.pop(),q=D.pop();
d.scale.aap(c,$.m,$.e,q,G.m,G.e);c=q;$=G}}};fK.ami=function(x,Q,c,$){for(var F=0;F<x.length;F++){c[F]=x[F]*(1/255);
$[F]=0}FFT.fft2d(c,$);var z=Q>>>1,j=16384,U=128,b=100;while(U<Q){U<<=1;j<<=2}var i=255/Math.log(j),e=-100;
for(var k=0;k<Q;k++)for(var K=0;K<z;K++){var g=Q+z+k&Q-1,R=c[g*Q+K],T=$[g*Q+K],D=Math.sqrt(R*R+T*T),a=Math.atan2(T,R);
x[k*Q+K]=Math.round(i*Math.log(D+1));x[k*Q+z+K]=Math.round((Math.PI+a)*(255*.5/Math.PI))}};fK.akb=function(x,Q,c,$){c.fill(0);
$.fill(0);var z=Q>>>1,j=16384,U=128;while(U<Q){U<<=1;j<<=2}var i=255/Math.log(j),b=[],e=[],k=[];for(var F=0;
F<256;F++){b[F]=Math.exp(F/i)-1;var K=F*(2*Math.PI/255)-Math.PI;e[F]=Math.sin(K);k[F]=Math.cos(K)}for(var g=0;
g<Q;g++)for(var R=0;R<z;R++){var T=Q+z+g&Q-1,D=b[x[g*Q+R]],K=x[g*Q+z+R],a=D*k[K],_=D*e[K];c[T*Q+R]=a;
$[T*Q+R]=_;if(R!=0){var I=T==0?T*Q+Q-R:(Q-T)*Q+(Q-R);c[I]=a;$[I]=-_}}FFT.ifft2d(c,$);for(var F=0;F<x.length;
F++){x[F]=Math.max(0,Math.min(255,~~(.5+255*c[F])))}};fK.a30=new ArrayBuffer(512);fK.aq5=function(x){var Q=fK.a30,c=x.length;
if(Q.byteLength<c)fK.a30=Q=new ArrayBuffer(c);var $=new Uint8Array(Q);for(var F=0;F<c;F+=4){$[F]=x[F];
$[F+1]=x[F+1];$[F+2]=x[F+2];$[F+3]=x[F+3]}return Q};fK.NH=function(x,Q,c,$,z,j,U){if(j==null)j={buffer:d.R(Q.buffer.length),rect:Q.rect.clone()};
j.buffer.set(Q.buffer);var i=c&&c.RndS?c.RndS.v>>>1:0;if(x=="GEfc"){var b=[];if(c.GEfs){var e=c.GEfs.v;
for(var F=0;F<e.length;F++){var k=e[F].v;if(k.GELv&&k.GELv.v==!1)continue;b.push(k)}}else b=[c];for(var F=0;
F<b.length;F++){var K;if(F==0)ag.NH(x,Q,b[F],$,z,j,U);else{if(K==null)K={buffer:d.R(Q.buffer.length),rect:Q.rect.clone()};
d.SO(j.buffer,K.buffer);ag.NH(x,K,b[F],$,z,j,U)}}}if(x=="Dila"){var g=c.Crop.v.val,R=c.Rds.v.val+g;R=R*R;
if(R==0)return;var T=Q.rect,D=T.m,a=T.e,_=D*a,I=Q.buffer,K=j.buffer,f=d.R(_);d.GS(I,f,3);if(g!=0){var y=T.clone();
y.ss(1,1);var Z=d.R(y.P());d.L2(f,T,Z,y);d.HQ(Z);d.style.stroke(Z,Z,y,g);d.HQ(Z);d.L2(Z,y,f,T)}var v=d.style.qD(f,D,a);
K.fill(0);for(var G=0;G<a;G++)for(var q=0;q<D;q++){var F=G*D+q,h=F<<1,r=F<<2,H=v[h],o=v[h+1];if(H*H+o*o<R){var P=(G+o)*D+(q+H)<<2;
K[r]=I[P];K[r+1]=I[P+1];K[r+2]=I[P+2];K[r+3]=255}}}if(x=="Adobe Camera Raw Filter"){var T=Q.rect,D=T.m,a=T.e,_=D*a,O=_*4,p=_*3,C=new Float32Array(D*a*3),W=Q.buffer;
for(var F=0;F<_;F++){var J=F*3,r=F*4;C[J]=W[r]*(1/255);C[J+1]=W[r+1]*(1/255);C[J+2]=W[r+2]*(1/255)}var t=JSON.parse(JSON.stringify(c));
delete t.Upri;delete t.GuUr;var Y=C.slice(0);cc(C,D,a,Y,t);C=Y;W=j.buffer;for(var F=0;F<_;F++){var J=F*3,r=F*4;
W[r]=255*Math.max(0,Math.min(1,C[J]));W[r+1]=255*Math.max(0,Math.min(1,C[J+1]));W[r+2]=255*Math.max(0,Math.min(1,C[J+2]))}}if(x=="Fct "){var T=Q.rect,D=T.m,a=T.e,_=D*a,O=_*4;
function l(g5){var d3=g5.slice(0);for(var G=0;G<3;G++)for(var q=0;q<3;q++)d3[G*3+q]=g5[(2-q)*3+G];return d3}function m(j_,cu,cZ,fb){var co=0;
for(var G=0;G<3;G++)for(var q=0;q<3;q++)co+=cu[G*3+q]*j_[(fb-1+G)*D+cZ-1+q];return co}var B=[8,5,2,5,2,-1,2,-1,-4],L=[5,5,5,2,2,2,-1,-1,-1],A=[2,2,2,2,2,2,2,2,2],S=[];
S.push(B);for(var F=0;F<3;F++)S.push(l(S[S.length-1]));S.push(L);for(var F=0;F<3;F++)S.push(l(S[S.length-1]));
S.push(A);for(var F=0;F<9;F++)S[F]=d.hx.C6(S[F]);var M=[-D-1,-D,-D+1,-1,0,1,D-1,D,D+1],N=[-1,-1,0,-1,1,-1,-1,0,0,0,1,0,-1,1,0,1,1,1],s=d.R(_),V=new Float32Array(_),Y=d.R(_);
for(var g8=0;g8<3;g8++){d.GS(Q.buffer,s,g8);for(var n=0;n<1;n++){for(var G=1;G<a-1;G++)for(var q=1;q<D-1;
q++){var cQ=G*D+q,hk=s[cQ];V[cQ]=1e9;for(var F=0;F<9;F++){var eG=m(s,S[F],q,G),ie=(eG-hk)*(eG-hk);if(ie<V[cQ])V[cQ]=ie}}for(var G=1;
G<a-1;G++)for(var q=1;q<D-1;q++){var eN=0,ek=1e9;for(var F=0;F<9;F++){var jK=G*D+q+M[F],ie=V[jK];if(ie<ek){ek=ie;
eN=s[jK]}}Y[G*D+q]=eN}s.set(Y)}d.Dm(Y,j.buffer,g8)}}if(x=="adaptCorrect"){var T=Q.rect,D=T.m,a=T.e,_=D*a,O=_*4,iE=c.sdwM.v,e9=iE.Amnt.v.val/100,dm=iE.Wdth.v.val/100,kD=iE.Rds.v,gJ=c.hglM.v,dR=gJ.Amnt.v.val/100,fO=gJ.Wdth.v.val/100,ko=gJ.Rds.v;
d.a6j.Z8(Q.buffer,j.buffer,D,a,e9,dm,kD,dR,fO,ko,c.ClrC.v/100,c.Cntr.v/100)}if(x=="denoise"){var T=Q.rect,D=T.m,a=T.e,d8=c.channelDenoise.v[0].v;
d.ave.a1g(Q.buffer,D,a,j.buffer,d8.Amnt.v/10,d8.EdgF.v/100)}if(x=="HsbP"){var fj=c.Inpt.v.ClrS,ja=c.Otpt.v.ClrS,T=Q.rect,D=T.m,a=T.e,_=D*a;
for(var F=0;F<_;F++){var r=F*4,n=Q.buffer[r]*(1/255),eD=Q.buffer[r+1]*(1/255),d3=Q.buffer[r+2]*(1/255);
if(fj=="RGBC"){}else if(fj=="HSLC"){var Y=d.qs(n,eD,d3);n=Y.Z;eD=Y.r;d3=Y.J}else if(fj=="HSBl"){var Y=d.aAL(n,eD,d3);
n=Y.Z;eD=Y.r;d3=Y.J}var fP=n,jE=eD,cR=d3;if(ja=="RGBC"){}else if(ja=="HSLC"){var Y=d.Zb(n,eD,d3);fP=Y.R0;
jE=Y.ks;cR=Y.UZ}else if(ja=="HSBl"){var Y=d.aks(n,eD,d3);fP=Y.R0;jE=Y.ks;cR=Y.J}j.buffer[r]=~~(255*fP);
j.buffer[r+1]=~~(255*jE);j.buffer[r+2]=~~(255*cR)}}if(x=="Fbrs"){var T=Q.rect,D=T.m,a=T.e;d.X.atC(Q.buffer,D,a,j.buffer,[c.Vrnc.v,c.Strg.v,i]);
var ex=d.R(D*a);d.GS(j.buffer,ex,0);d.HQ(ex);ag.kX(ex,j.buffer,$,z)}if(x=="Frgm"){var T=Q.rect,D=T.m,a=T.e,er=Q.buffer.slice(0);
d.HO(er);d.X.a9s(er,D,a,j.buffer);d.mQ(j.buffer)}if(x=="Flam"){var T=Q.rect,D=T.m,a=T.e,cE=c.Clr.v,a7={type:c.Type.v+1,length:c.Leng.v,aA0:c.RndL.v,nf:c.Widt.v,arA:c.Angl.v,avV:c.Intr.v,ano:c.Adpt.v,color:{Z:cE.Rd.v,r:cE.Grn.v,J:cE.Bl.v},e_:c.Qual.v+1,Ye:c.Turb.v,Jp:c.Jag.v,opacity:c.Opct.v.val,zn:c.Lins.v,aoO:c.Botm.v,style:c.Styl.v+1,shape:c.Shap.v+1,a7N:c.RnSh.v,aC8:c.Arng.v,aAN:!1},dl=U[3],hl=dl[0],f4=dl[1],em=hl[f4.length!=0?f4[0]:0];
if(em==null){alert("Make a path first");return}var e$=em.add.vmsk.$,iP=d.o.WV(e$),b2=[];for(var P=0;
P<iP;P++){var k7=d.o.dQ(e$,P),at=e$[k7];if(at.length<2)continue;var ju=[];b2.push(ju);var jL=at.length-(at.type==3?1:0);
for(var cQ=0;cQ<jL;cQ++){var fJ=e$[k7+1+cQ],h6=cQ==at.length-1?e$[k7+1]:e$[k7+1+cQ+1],iq=fJ.L,iI=fJ.Im,B=h6.Hw,dM=h6.L,ik=Math.round(bC.Xc(iq,dM)/5);
for(var jp=0;jp<ik;jp++){var eA=jp/ik,k8=1-eA,q=k8*k8*k8*iq.x+3*k8*k8*eA*iI.x+3*k8*eA*eA*B.x+eA*eA*eA*dM.x,G=k8*k8*k8*iq.y+3*k8*k8*eA*iI.y+3*k8*eA*eA*B.y+eA*eA*eA*dM.y;
ju.push(q,G)}}}var ay=[b2,a7],bK=Date.now(),a4=gU(ay);aA(Q.buffer,D,a,j.buffer,a4,ay)}if(x=="Dfs "){var T=Q.rect,D=T.m,a=T.e,h_=["Nrml","DrkO","LghO","anisotropic"].indexOf(c.Md.v.DfsM);
if(h_<3)d.X.atZ(Q.buffer,D,a,j.buffer,[h_]);else{var ay=[1.4,1.6,1,4,!1,2,[0,0,.001]],T=Q.rect.clone();
T.x=T.y=0;d.$T.filter(Q.buffer,T,j.buffer,ay)}}if(x=="TrcC"){var T=Q.rect,D=T.m,bj=D<<2,a=T.e,gs=c.Lvl.v,bs=c.Edg.v.CntE=="Lwr",e3=Q.buffer,jA=j.buffer;
d.h4(jA,16777215,4278190080);function kn(eh,as){cL(eh,as);cL(eh+1,as+1);cL(eh+2,as+2)}function j6(eh,as){eb(eh,as);
eb(eh+1,as+1);eb(eh+2,as+2)}function cL(eh,as){var fP=e3[eh],jE=e3[as];if(fP>=gs&&jE<gs)jA[eh]=0;if(fP<gs&&jE>=gs)jA[as]=0}function eb(eh,as){var fP=e3[eh],jE=e3[as];
if(fP>gs&&jE<=gs)jA[as]=0;if(fP<=gs&&jE>gs)jA[eh]=0}if(bs)for(var G=1;G<a;G++)for(var q=1;q<D;q++){var r=G*D+q<<2;
kn(r,r-4);kn(r,r-bj)}else for(var G=1;G<a;G++)for(var q=1;q<D;q++){var r=G*D+q<<2;j6(r,r-4);j6(r,r-bj)}}if(x=="Embs"){var T=Q.rect,D=T.m,a=T.e,dY=-c.Angl.v*Math.PI/180,aP=c.Hght.v,ks=c.Amnt.v/100;
aP/=2;var H=Math.cos(dY)*aP,o=Math.sin(dY)*aP,e3=Q.buffer,jA=j.buffer;jA.fill(0);var jC=new Uint32Array(e3.buffer),Y=new Uint8Array(4),ig=new Uint32Array(Y.buffer);
for(var G=0;G<a;G++)for(var q=0;q<D;q++){var cD=0,eB=0,c1=0;if(0<=q+H&&q+H<D&&0<=G+o&&G+o<a){d.D.Sj(q+H+.5,G+o+.5,jC,D,a,ig,0,0);
cD+=Y[0]-128;eB+=Y[1]-128;c1+=Y[2]-128}if(0<=q-H&&q-H<D&&0<=G-o&&G-o<a){d.D.Sj(q-H+.5,G-o+.5,jC,D,a,ig,0,0);
cD-=Y[0]-128;eB-=Y[1]-128;c1-=Y[2]-128}var r=G*D+q<<2;jA[r]=Math.max(0,Math.min(255,cD*ks+128));jA[r+1]=Math.max(0,Math.min(255,eB*ks+128));
jA[r+2]=Math.max(0,Math.min(255,c1*ks+128));jA[r+3]=e3[r+3]}}if(x=="ShrE"){var T=Q.rect,D=T.m,a=T.e;
d.X.a2R(Q.buffer,D,a,j.buffer)}if(x=="Dspc"){var T=Q.rect,D=T.m,a=T.e;d.X.at1(Q.buffer,D,a,j.buffer)}if(x=="Slrz"){var dq=j.buffer,b$=128;
for(var F=0;F<dq.length;F+=4){if(dq[F]>b$)dq[F]=255-dq[F];if(dq[F+1]>b$)dq[F+1]=255-dq[F+1];if(dq[F+2]>b$)dq[F+2]=255-dq[F+2]}}if(x=="Wnd "){var T=Q.rect,D=T.m,a=T.e,d7=["Wnd","Blst","Stgr"],he=c.WndM.v.WndM;
d.X.AD(Q.buffer,D,a,j.buffer,[d7.indexOf(he),c.Drct.v.Drct!="Left"])}if(x=="Bokh"){var T=Q.rect,D=T.m,a=T.e,_=D*a,O=_*4,k4=Q.buffer.slice(0),a6=c.BkDi.v.BtDi,cK=c.BkDc,ds=c.BkDs.v,iy=c.BkDp.v/255;
if(a6=="BeIn")iy=0;var gu=57*(.3+.7*((D+a)/2)/1750)*(c.BkIb.v/100)*(1+.2*Math.pow(iy,.1)),jF=parseInt(c.BkIs.v.BtIs.slice(3)),gL=-c.BkIr.v*Math.PI/180,dc=[];
for(var F=0;F<8;F++){var aQ=gL+F*(Math.PI*2/jF),ec=gL+(F+1)*(Math.PI*2/jF),gH=Math.cos(aQ),ap=Math.sin(aQ),gj=Math.cos(ec),fx=Math.sin(ec),aT=[0,0,0];
d.BS.I1([[gH,ap,1,0],[gj,fx,1,0],[1,1,1,1]],aT);if(aT[2]>0){aT[0]*=-1;aT[1]*=-1;aT[2]*=-1}dc.push(aT[0],aT[1],aT[2],0)}if(a6=="BeIn"){d.h4(k4,0,16777215);
iy=1}else if(a6=="BeIt"&&cK.v.BtDc=="BeCt"){}else{var bL;if(a6=="BeIt"&&cK.v.BtDc=="BeCm")bL=U[1];else if(a6=="BeIa")bL=U[2][cK.v];
if(bL==null){d.h4(k4,0,16777215)}else{var s;if(bL.rect.HM(T))s=bL.channel;else s=bL.EF(T);d.Dm(s,k4,3)}}if(ds)for(var F=0;
F<O;F+=4)k4[F+3]=255-k4[F+3];if(eV.Mx){var kr=k4,jS=D,bE=a,gl=1,dC=(c.BkSb.v==0||c.BkSt.v==255)&&a6=="BeIn";
if(!dC){var ci=0;for(var F=0;F<O;F+=4)ci+=Math.abs(iy-k4[F+3]*(1/255));ci=ci/_*gu;var kC=3.14*ci*ci*D*a/3e6;
if(kC>2e3){alert("too large radius");return}}while(dC&&3*(gu/gl)*(gu/gl)*D*a>500*2e3*2e3){var aI=d.aej(k4,new gh(0,0,jS,bE));
k4=aI.AX;jS=aI.rect.m;bE=aI.rect.e;gl*=2}var bK=Date.now(),I=eV.Zk(0,jS,bE);I.set(k4);var fB=eV.Zk(1,D,a);
eV.qk(fB);eV.filter.NP({type:eV.filter.aDz,d$:new Float32Array([1/jS,1/bE]),ah3:iy,x$:gu/gl,a73:new Float32Array([c.BkSb.v/100,c.BkSt.v/255]),aoS:new Float32Array([c.BkNa.v/100,c.BkNt.v.BtNt=="BeNu"?0:1,c.BkNm.v?1:0]),a5u:new Float32Array(dc.slice(0,16)),anV:new Float32Array(dc.slice(16))},I.cm);
fB.get(j.buffer);var cO=j.buffer;for(var F=0;F<O;F+=4)cO[F+3]=Q.buffer[F+3]}}if(x=="rigidTransform"){var bK=Date.now(),bY=fK.aq5,I=Q.buffer.slice(0),eS=0,gX=0;
d.HO(I);d.h4(j.buffer,0);var D=Q.rect.m,a=Q.rect.e,fS=c.puppetShapeList.v,i_=[],dv=[],g1=[],jo=[];for(var cQ=0;
cQ<fS.length;cQ++){var fT=fS[cQ].v,h=eS*2,J=gX*3,gm=fT.originalVertexArray.v.length>>>2,hq=fT.indexArray.v.length>>>2,bD=new Float32Array(bY(fT.originalVertexArray.v));
for(var F=0;F<gm;F++)i_[h+F]=bD[F];var dj=new Float32Array(bY(fT.deformedVertexArray.v));for(var F=0;
F<gm;F++)dv[h+F]=dj[F];var g3=new Uint32Array(bY(fT.indexArray.v));for(var F=0;F<hq;F++)g1[J+F]=eS+g3[F];
var dF=[],e1=[],fE=fT.PnDp.v;for(var F=0;F<fE.length;F++){dF.push(fT.pinVertexIndices.v[F].v);e1.push(fE[F].v)}var cl=d.NO.aiU(bD,g3,dF,e1);
for(var F=0;F<cl.length;F++)jo[eS+F]=cl[F];eS+=gm>>>1;gX+=~~(hq/3)}var n=Q.rect,D=n.m,a=n.e;d.NO.i6(I,D,a,j.buffer,D,a,i_,dv,jo,g1);
d.mQ(j.buffer)}if(x=="lightFilterGradient"){function i1(iq){var cu=1/Math.sqrt(iq[0]*iq[0]+iq[1]*iq[1]+iq[2]*iq[2]);
iq[0]*=cu;iq[1]*=cu;iq[2]*=cu}var D=Q.rect.m,a=Q.rect.e,_=D*a,bK=Date.now(),cU=d.R(_),jE=.3,cR=.7;d._8(j.buffer,cU);
var hb=d.R(_);d.yg.ZA(cU,hb,j.rect,16);var gw=d.R(_);d.yg.ZA(cU,gw,j.rect,8);var kf=cU,f3=new Float32Array(_),kq=c.Dtl.v,kt=kq[2].v,ho=kq[1].v,aR=kq[0].v,co=c.Scl.v*40*c.textureScale.v/(kt+ho+aR);
kt*=co;ho*=co;aR*=co;for(var F=0;F<_;F++){var iD=hb[F]*(1/255),ir=gw[F]*(1/255),j$=kf[F]*(1/255);j$=j$*j$;
f3[F]=kt*iD+ho*ir+aR*j$}var dn=c.blur.v;if(dn!=0){d.yg.U2(f3,j.rect,dn)}var gC=D-1,iC=a-1;for(var G=0;
G<a;G++)for(var q=0;q<D;q++){var F=G*D+q,r=F*4,bU=f3[F],H=jE*(f3[F+(q==gC?0:1)]-bU)+cR*(bU-f3[F-(q==0?0:1)]),o=jE*(f3[F+(G==iC?0:D)]-bU)+cR*(bU-f3[F-(G==0?0:D)]),iq=[1,0,H],iI=[0,1,o];
i1(iq);i1(iI);var ec=iq[0],eJ=iq[2],ia=iI[1],dP=iI[2],jB=-eJ*ia,jw=-ec*dP,av=ec*ia;j.buffer[r]=~~(127.5+jB*127.5);
j.buffer[r+1]=~~(127.5+jw*127.5);j.buffer[r+2]=~~(127.5+av*127.5)}}if(x=="defr"){var D=Q.rect.m,a=Q.rect.e;
eK(Q.buffer,D,a,j.buffer)}if(x=="dDFT"||x=="iDFT"){function i8(jF){if(jF==0)return 1;jF--;jF|=jF>>1;
jF|=jF>>2;jF|=jF>>4;jF|=jF>>8;jF|=jF>>16;return jF+1}var D=Q.rect.m,a=Q.rect.e,hC=i8(Math.max(D,a)),c5=hC>>>1,a$=new gh(0,0,hC,hC),eO=new gh(0,0,D,a);
eO.y=hC-a>>>1;var f6=D>>>1,iZ=new gh(0,eO.y,f6,a),jU=new d.PT(D*a);d.jy(Q.buffer,jU);var df=new Float64Array(hC*hC),gy=new Float64Array(hC*hC),s=d.R(hC*hC);
FFT.init(hC);var bR=[jU.Z,jU.r,jU.J];for(var F=0;F<3;F++){var cs=bR[F];s.fill(0);if(x=="dDFT"){d.L2(cs,eO,s,a$);
fK.ami(s,hC,df,gy);d.L2(s,a$,cs,eO,iZ);iZ.x+=f6;a$.x-=c5-f6;d.L2(s,a$,cs,eO,iZ);iZ.x-=f6;a$.x+=c5-f6}else{d.L2(cs,eO,s,a$,iZ);
iZ.x+=c5;eO.x+=c5-f6;d.L2(cs,eO,s,a$,iZ);iZ.x-=c5;eO.x-=c5-f6;fK.akb(s,hC,df,gy);d.L2(s,a$,cs,eO)}}d.li(jU,j.buffer)}if(x=="Avrg"){var fG=0,g0=0,gb=0,d2=0,gY=1;
for(var F=0;F<Q.buffer.length;F+=4){var f=Q.buffer[F+3];gb+=Q.buffer[F]*f;g0+=Q.buffer[F+1]*f;fG+=Q.buffer[F+2]*f;
d2+=f}var f8=1/d2;fG=Math.round(gY*(fG*f8)+(1-gY)*255);g0=Math.round(gY*(g0*f8)+(1-gY)*255);gb=Math.round(gY*(gb*f8)+(1-gY)*255);
d.h4(j.buffer,fG<<16|g0<<8|gb,4278190080)}if(["GsnB","boxblur","smartSharpen","UnsM","HghP"].indexOf(x)!=-1){var iv=c.Rds?c.Rds.v.val:1,gQ=x=="boxblur"?d.yg.k_:d.yg.a1A;
fK.xM(iv,gQ,j.buffer,j.rect);if(x=="UnsM"||x=="smartSharpen"){var ks=(c.Amnt?c.Amnt.v.val:200)/100,aO=0;
if(x=="UnsM")aO=c.Thsh.v;else ks*=.75;for(var F=0;F<Q.buffer.length;F++){if((F&3)==3){j.buffer[F]=Q.buffer[F];
continue}var hk=Q.buffer[F],eG=j.buffer[F],cA=ks*(hk-eG);if(cA>0)cA=Math.max(0,cA-aO);else cA=Math.min(0,cA+aO);
j.buffer[F]=Math.max(0,Math.min(255,hk+cA))}}if(x=="HghP")for(var F=0;F<Q.buffer.length;F++){if((F&3)==3){j.buffer[F]=Q.buffer[F];
continue}var hk=Q.buffer[F],eG=j.buffer[F];j.buffer[F]=Math.max(0,Math.min(255,128+hk-eG))}}if(x=="AdNs"){var aK=new Uint8ClampedArray(j.buffer.buffer),kE=255*c.Nose.v.val/100,by;
if(c.Dstr.v.Dstr=="Gsn")by=function(){return(Math.random()+Math.random()+Math.random()+Math.random()-2)*2};
else by=function(){return Math.random()*2-1};for(var F=0;F<aK.length;F+=4){var n=aK[F],eD=aK[F+1],d3=aK[F+2],i4,kg,gI;
if(c.Mnch.v){i4=kg=gI=by()}else{i4=by();kg=by();gI=by()}n+=kE*i4;eD+=kE*kg;d3+=kE*gI;aK[F]=n;aK[F+1]=eD;
aK[F+2]=d3}}var bK=Date.now();if(x=="Mdn "||x=="DstS"||x=="Mxm "||x=="Mnm "||x=="surfaceBlur"){var n=0,jN=c.Thsh,fT=0;
if(jN)jN=jN.v;else jN=0;if(x=="Mdn "||x=="Mxm "||x=="Mnm "||x=="surfaceBlur")n=c.Rds.v.val;else n=c.Rds.v;
var kH=10*Math.ceil(n/10),D=Q.rect.m,a=Q.rect.e,eu=["Mnm ","Mxm ","surfaceBlur"].indexOf(x),fo=(fT==0?1:.75)*[.73,.73,1.2][eu]*(D*a*Math.pow(kH*kH,1.05))/6022387,i7=.6*(D*a*Math.pow(n,1/2.6))/6500;
if(x=="Mxm "||x=="Mnm ")i7=D*a/13e3;var aV=c.preserveShape;if(aV&&aV.v.preserveShape=="Rndn")fT=1;if(eV.Mx&&eu!=-1&&(fo<i7||fT==1)&&fo<500){var I=eV.Zk(0,D,a);
I.set(Q.buffer);var K=eV.Zk(1,D,a);eV.qk(K);eV.filter.NP({type:eV.filter.aB0,d$:new Float32Array([1/D,1/a]),x$:n,ame:jN/255,Zz:[fT,eu,kH]},I.cm);
K.get(j.buffer)}else if(x=="Mxm "||x=="Mnm "){var D=Q.rect.m,a=Q.rect.e;d.VT.ay2(Q.buffer,j.buffer,D,a,1+Math.floor(c.Rds.v.val)*2,x=="Mxm ")}else{n=Math.round(n);
d.Zt.LP=.5;d.Zt.St=jN;var gQ=x=="surfaceBlur"?1:0;d.Zt.fO(Q.buffer,j.buffer,D,a,n,gQ);if(x=="DstS")for(var F=0;
F<D*a*4;F++){var iR=Math.abs(Q.buffer[F]-j.buffer[F]);if(iR<=jN)j.buffer[F]=Q.buffer[F]}}}if(x=="ClrH"){var iZ=Q.rect.clone(),hK=0;
iZ.x=iZ.y=0;var n=c.Rds.v;n=n*Math.sqrt(2);var D=iZ.m,a=iZ.e,br=d.nc(D,a),kN=new Float32Array(256);for(var F=0;
F<256;F++){var cE=F/255,iv=Math.sqrt(cE*(1/Math.PI));if(iv>.5)iv=.5+Math.pow((iv-.5)/(.564-.5),1.35)*.2;
kN[F]=n*iv}var iW=Math.floor(2*D/n),ao=Math.floor(2*a/n),b4=10-(n-54*Math.sqrt(2))*1.5,cW=[Q.buffer,iZ];
d.gk(cW);while(cW[hK*2+1].m>1.5*D/n)hK++;var cD=cW[hK*2+1],c1=cW[hK*2],ee=d.R(cD.P()),gl=1/(1<<hK),jS=cD.m,bE=cD.e,s=d.R(D*a);
for(var j_=0;j_<3;j_++){d.GS(c1,ee,j_);d.HQ(ee);var dY=Math.PI*c["Ang"+(j_+1)].v/180,gc=new bI;gc.translate(-D/2,-a/2);
gc.rotate(-dY);gc.translate(D/2,a/2);br.clearRect(0,0,D,a);for(var G=-(ao>>>2);G<ao;G++)for(var q=-(iW>>>2);
q<iW;q++){var d4=gc.RE(new bC((q+.5)*n-b4,(G+.5)*n-b4)),c9=Math.max(0,Math.min(d4.x*gl,jS-.51)),fW=Math.max(0,Math.min(d4.y*gl,bE-.51)),_=~~d.D.k3(c9,fW,ee,jS,bE);
br.beginPath();br.arc(d4.x,d4.y,kN[_],0,2*Math.PI);br.fill()}var il=br.getImageData(0,0,D,a);d.GS(il.data,s,3);
d.HQ(s);d.Dm(s,j.buffer,j_)}}if(x=="Crst"||x=="Pntl"){var D=Q.rect.m,a=Q.rect.e,gQ=x=="Crst"?d.X3.ael:d.X3.aoL;
gQ(Q.buffer,D,a,j.buffer,c.ClSz.v,[Math.round(z.Z),Math.round(z.r),Math.round(z.J)])}if(x=="Mztn"){var D=Q.rect.m,a=Q.rect.e,_=D*a,jU=new d.PT(_),bF=[jU.Z,jU.r,jU.J];
d.jy(Q.buffer,jU);var he=c.MztT.v.MztT,dV={FnDt:[.1,0,.3,1.4],MdmD:[.9,0,.1,1.4],GrnD:[3,0,.2,1.4],CrsD:[7,0,.1,1.4],ShrL:[0,10,.16,3],MdmL:[0,22,.06,3],LngL:[0,25,.01,4.5],ShSt:[3,10,.05,4.4],MdmS:[4,25,.15,4],LngS:[4,30,.05,4]}[he],bK=Date.now(),am=[];
for(var F=0;F<_;F++){am[F]=Math.random()}var _=D*a,ge=Math.round(_*dV[0]),im=_-D-1;for(var F=0;F<ge;
F++){var dG=Math.random(),eR=1;if(dG<.5){eR=D;dG*=2}else dG=2*(dG-.5);var eh=Math.floor(dG*im),as=eh+eR;
am[eh]=am[as]}var fY=Math.round(D*dV[1]);for(var G=0;G<a;G++)for(var F=0;F<fY;F++){var dG=d.l.xk(G*_+F),eh=G*D+Math.floor(dG*(D-1));
am[eh]=am[eh+1]}var bP=new Float64Array(256);for(var F=0;F<256;F++){var ff=F/255,ha=2*(ff<.5?ff:1-ff);
ha=dV[2]+Math.pow(ha,dV[3])*(1-dV[2]);ff=ff<.5?ha*.5:1-ha*.5;bP[F]=ff}for(var g8=0;g8<3;g8++){var s=bF[g8];
for(var G=0;G<a;G++){for(var q=0;q<D;q++){var F=G*D+q,bG=s[F],ff=bP[bG],dG=am[F];s[F]=dG>ff?0:255}}}d.li(jU,j.buffer)}if(x=="Msc "){var iP=c.ClSz.v.val,D=Q.rect.m,a=Q.rect.e,dp=Math.ceil(D/iP),gZ=Math.ceil(a/iP),fD=d.R(dp*gZ*4);
d.scale.hR(Q.buffer,D,a,fD,dp,gZ,1/iP);d.scale.hR(fD,dp,gZ,j.buffer,D,a,iP)}if(x=="Clds"||x=="DfrC"){var D=j.rect.m,a=j.rect.e,_=D*a,dD=d.R(_);
if(x=="Clds")d.h4(j.buffer,4278190080);var ax=d.R(256*4);for(var F=0;F<256;F++){var r=F<<2,g5=F/255,g3=1-g5;
ax[r]=Math.round(g5*$.Z+g3*z.Z);ax[r+1]=Math.round(g5*$.r+g3*z.r);ax[r+2]=Math.round(g5*$.J+g3*z.J)}d.X.ach(Q.buffer,D,a,dD);
var cS=j.buffer;for(var F=0;F<_;F++){var r=F<<2,g8=dD[F]<<2,n=ax[g8],eD=ax[g8+1],d3=ax[g8+2];if(x=="Clds"){cS[r]=n;
cS[r+1]=eD;cS[r+2]=d3}else{cS[r]=Math.abs(cS[4*F]-n);cS[r+1]=Math.abs(cS[4*F+1]-eD);cS[r+2]=Math.abs(cS[4*F+2]-d3)}}}if(x=="LnsF"){var D=Q.rect.m,a=Q.rect.e,he=["Zm","Nkn","Nkn1","PnVs"].indexOf(c.Lns.v.Lns),kA=c.FlrC.v,eH=[Math.min(he,2),c.Brgh.v/100,kA.Hrzn.v,kA.Vrtc.v],bK=Date.now();
d.ab$(Q.buffer,D,a,j.buffer,eH)}var ft=["Blr ","BlrM","Shrp","ShrM"].indexOf(x);if(ft!=-1){var dX=ft>1,D=Q.rect.m,a=Q.rect.e,hU=d.hx.tY[ft],kx=Q.buffer.slice(0);
if(!dX)d.HO(kx);d.hx.QY(kx,j.buffer,D,a,hU,255,!1,dX);if(!dX)d.mQ(j.buffer)}if(x=="MtnB"){var js=-c.Angl.v*Math.PI/180,b7=c.Dstn.v.val/2,bK=Date.now(),D=Q.rect.m,a=Q.rect.e,T=Q.rect.clone();
T.x=T.y=0;if(eV.Mx){var bK=Date.now(),fa=j.buffer;fa.set(Q.buffer);d.HO(fa);var fy=eV.Zk(0,D,a);fy.set(fa);
var e3=d.R(4);e3[0]=Math.round(128+127*Math.cos(js));e3[1]=Math.round(128+127*Math.sin(js));new Uint32Array(fa.buffer).fill(new Uint32Array(e3.buffer)[0]);
var gn=eV.Zk(1,D,a);gn.set(fa);eV.qk(fy,T);fy.Zw(T);eV.filter.NP({type:eV.filter.WT,t7:gn.cm,d$:new Float32Array([1/D,1/a]),a2y:b7/2,aD3:1},fy.xY);
fy.get(fa);d.mQ(fa)}else{var gf=new bI;gf.rotate(js);var Y=X.Y.rN([Q.buffer,Q.rect],gf,!1,null,!0);fK.xM(b7,d.yg.a0P,Y.buffer,Y.rect);
gf.HQ();Y=X.Y.rN([Y.buffer,Y.rect],gf,!1,j.buffer.buffer,!0,j.rect)}console.log(Date.now()-bK)}if(x=="RdlB"){var D=Q.rect.m,a=Q.rect.e,ks=c.Amnt.v,aj=c.BlrM.v.BlrM=="Zm",j_=c.Cntr.v,cZ=j_.Hrzn.v,fb=j_.Vrtc.v,H=Math.max(cZ,1-cZ)*D,o=Math.max(fb,1-fb)*a,iv=Math.sqrt(H*H+o*o),jx=2*Math.PI*iv*1.5,eE=Math.round(jx),dH=Math.round(iv),iZ=new gh(0,0,eE,dH),jD=d.R(eE*dH*4),fI=aj?4:1,gp=aj?.6:8*((D+a)/2)/1400,fH=.1,gl=1,iW=1;
d.D.a3I(Q.buffer,D,a,jD,eE,dH,cZ,fb,fI,fH,gl,iW);var bZ=aj?d.R(eE*dH*4):null;if(aj){d.D.Ny(jD,bZ,eE,dH);
var eA=bZ;bZ=jD;jD=eA;iZ.m=dH;iZ.e=eE}fK.xM(gp*ks,d.yg.a0P,jD,iZ);if(aj){d.D.Ny(jD,bZ,dH,eE);var eA=bZ;
bZ=jD;jD=eA;iZ.m=eE;iZ.e=dH}d.D.ax7(jD,eE,dH,j.buffer,D,a,cZ,fb,fI,fH,gl,iW)}if(x=="Plr "){var D=Q.rect.m,a=Q.rect.e;
if(c.Cnvr.v.Cnvr=="RctP")d.D.ax7(Q.buffer,D,a,j.buffer,D,a,.5,.5,1,0,2,D/a);else d.D.a3I(Q.buffer,D,a,j.buffer,D,a,.5,.5,1,0,2,D/a)}if(x=="FndE"){var D=Q.rect.m,a=Q.rect.e;
d.hx.a2g(Q.buffer,j.buffer,D,a)}if(x=="oilPaint"){var dY=c.LghD.v*Math.PI/180,e7=[Math.cos(dY),Math.sin(dY),.001],ay=[c.stylization.v,c.cleanliness.v,c.brushScale.v,c.microBrush.v,c.lightingOn.v,c.specularity.v,e7],T=Q.rect.clone();
T.x=T.y=0;d.$T.filter(Q.buffer,T,j.buffer,ay)}if(x=="Ofst"){var D=Q.rect.m,a=Q.rect.e,jy=new Uint32Array(Q.buffer.buffer),dO=new Uint32Array(j.buffer.buffer),eg=c.Hrzn.v,ab=c.Vrtc.v,iO=c.Fl.v.FlMd;
d.h4(dO,0);if(iO=="Bckg"||iO=="Rpt"){var iZ=Q.rect.clone();iZ.offset(eg,ab);d.WK(jy,iZ,dO,j.rect)}if(iO=="Rpt"){var gH,ap,gj,fx,c6;
eg=Math.max(-D,Math.min(D,eg));ab=Math.max(-a,Math.min(a,ab));gH=eg>0?eg:0;gj=eg>0?D:D+eg;ap=ab>0?0:ab+a;
fx=ab>0?ab:a;c6=ab>0?0:D*(a-1);for(var G=ap;G<fx;G++)for(var q=gH;q<gj;q++)dO[G*D+q]=jy[c6+q-eg];gH=eg>0?0:D+eg;
gj=eg>0?eg:D;ap=ab>0?ab:0;fx=ab>0?a:a+ab;c6=eg>0?0:D-1;for(var G=ap;G<fx;G++)for(var q=gH;q<gj;q++)dO[G*D+q]=jy[c6+D*(G-ab)];
if(eg>=0&&ab>=0){gH=0;gj=eg;ap=0;fx=ab;c6=0}if(eg>=0&&ab<0){gH=0;gj=eg;ap=a+ab;fx=a;c6=D*(a-1)}if(eg<0&&ab>=0){gH=D+eg;
gj=D;ap=0;fx=ab;c6=D-1}if(eg<0&&ab<0){gH=D+eg;gj=D;ap=a+ab;fx=a;c6=D*a-1}for(var G=ap;G<fx;G++)for(var q=gH;
q<gj;q++)dO[G*D+q]=jy[c6]}if(iO=="Wrp"){eg=(eg+100*D)%D;ab=(ab+100*a)%a;var iZ=new gh(eg-D,ab-a,D,a);
d.WK(jy,iZ,dO,j.rect);iZ.offset(D,0);d.WK(jy,iZ,dO,j.rect);iZ.offset(0,a);d.WK(jy,iZ,dO,j.rect);iZ.offset(-D,0);
d.WK(jy,iZ,dO,j.rect)}}if(x=="Rept"){var c2=c.Rsft.v.val/100,bO=c.SpcX.v.val/100;bO=Math.max(bO,-.99);
var fm=c.SpcY.v.val/100;fm=Math.max(fm,-.99);var gl=c.Scl.v.val/100,gf=new bI;gf.rotate(c.Angl.v*Math.PI/180);
gf.scale(gl,gl);var io={buffer:Q.buffer,rect:Q.rect};d.HT(io);if(io.rect._6()){io.buffer=Q.buffer;io.rect=Q.rect}var cS=io.buffer,iZ=io.rect,eZ=d.kH(cS,iZ,0),aw=new Uint32Array(cS.buffer)[0];
if(!eZ._6()&&!eZ.HM(iZ)){var cb=d.R(eZ.P()*4);d.WK(cS,iZ,cb,eZ);cS=cb;iZ=eZ}iZ.x=iZ.y=0;aw=bO==0&&fm==0||c.SpcC.v?aw:0;
function iz(q){return q<0?Math.ceil(q):Math.floor(q)}var jT=gf.RE(new bC(iZ.m,0));jT.x=iz(jT.x);jT.y=iz(jT.y);
var d_=gf.RE(new bC(0,iZ.e));d_.x=iz(d_.x);d_.y=iz(d_.y);var Y=X.Y.rN([cS,iZ],gf,!1),eO=Y.rect,jA=Y.buffer,jM=Math.round(eO.x),b8=Math.round(eO.y),i6=Math.max(j.rect.m,j.rect.e)/Math.min(iZ.m*gl*(1+bO),iZ.e*gl*(1+fm));
i6=Math.ceil(i6*1.7);d.h4(j.buffer,aw);for(var G=-i6;G<i6;G++){for(var q=-i6;q<i6;q++){var hT=(q+G*c2)*(1+bO),c0=G*(1+fm);
eO.x=jM+Math.round(hT*jT.x+c0*d_.x);eO.y=b8+Math.round(hT*jT.y+c0*d_.y);if(eO.dM(j.rect))d.l.UY("norm",jA,eO,j.buffer,j.rect,eO,1)}}}if(x=="Ctoa"){var z=d.I.Du(c.Clr.v),jN=c.Trsp.v.val/100,hy=c.Opct.v.val/100;
jN=hy==0?0:jN/hy;var D=Q.rect.m,a=Q.rect.e,bl=~~z.Z,hj=~~z.r,hv=~~z.J,c6=Q.buffer,jK=j.buffer;for(var G=0;
G<a;G++)for(var q=0;q<D;q++){var F=G*D+q,r=F<<2,iZ=c6[r],hS=c6[r+1],cS=c6[r+2],cw=Math.abs(bl-iZ),fr=Math.abs(hj-hS),c$=Math.abs(hv-cS),fe=Math.max(cw,fr,c$)*(1/255);
fe=Math.max(0,Math.min(1,fe/hy));var h9=fe==0?0:1/fe,aN=jN==1?1:Math.max(0,Math.min(1,(fe-jN)/(1-jN)));
jK[r]=Math.max(0,Math.min(255,(iZ-bl*(1-fe))*h9));jK[r+1]=Math.max(0,Math.min(255,(hS-hj*(1-fe))*h9));
jK[r+2]=Math.max(0,Math.min(255,(cS-hv*(1-fe))*h9));jK[r+3]=Math.min(jK[r+3],~~(.5+aN*255))}}if(x=="Dthr"){function b0(q){return~~(.5+255*d.t9(q/255))}var cQ=c.Plte.v,bH;
if(cQ==0)bH=[4278190080,4294967295];else{var bm=[[1,1,1],[2,2,2],[3,3,2]][cQ-1],gE=[1<<bm[0],1<<bm[1],1<<bm[2]],fz=[~~(255/(gE[0]-1)),~~(255/(gE[1]-1)),~~(255/(gE[2]-1))];
bH=[];for(var n=0;n<gE[0];n++)for(var eD=0;eD<gE[1];eD++)for(var d3=0;d3<gE[2];d3++)bH.push(255<<24|b0(d3*fz[2])<<16|b0(eD*fz[1])<<8|b0(n*fz[0]))}var D=Q.rect.m,a=Q.rect.e,_=D*a,aS=_*4,c1=Q.buffer.slice(0),bx=j.buffer;
for(var F=0;F<aS;F++)c1[F]=~~(.5+255*d.t9(c1[F]/255));var bd=d.R(D*a);UPNG.encode.dither(c1,D,a,bH,bx,bd,c.Mthd?c.Mthd.v:1);
for(var F=0;F<aS;F++)bx[F]=~~(.5+255*d.Yw(bx[F]/255))}if(x=="Part"){var kp=[c.RndS.v,c.Cont.v/100,c.Size.v,c.Dpth.v/100,c.Brgh.v/100,d.I.Du(c.Clr.v),c.Time.v,c.Blnk.v,c.Fall.v,c.Turb.v/100];
d.rv.Jg(j.buffer,Q.rect.m,Q.rect.e,kp)}if("LqFy,Dspl,Pnch,Sphr,Twrl,Rple,Shr ,Wave,LnCr,ZgZg,Kale".split(",").indexOf(x)!=-1){var g2=U[0],D=Q.rect.m,a=Q.rect.e,bP,j8=0;
if(x=="LqFy")bP=id.s5(new Uint8Array(c.LqMe.v).buffer);else{var fv=3;if(x=="Wave")fv=Math.min(3,c.WLMn.v);
bP={ww:Math.floor(D/fv),R0:Math.floor(a/fv)};bP.map=new Float32Array(bP.ww*bP.R0*2);if(x=="LnCr"){var cZ=.5*(bP.ww-1),fb=.5*(bP.R0-1),g4=Math.max(Math.abs(0-cZ),Math.abs(1-cZ)),aq=Math.max(Math.abs(0-fb),Math.abs(1-fb)),gc=Math.sqrt(g4*g4+aq*aq),bi=0,j2=0,iV=-1,ck=2,gl=c.LnSi.v/100,aj=1/gl,hO=c.LnIa.v/100,e5=hO==0?1e-6:hO*4.6,c3=aj/gc;
for(var G=0;G<bP.R0;G++){for(var q=0;q<bP.ww;q++){var H=(q-cZ)*c3,o=(G-fb)*c3,n=Math.sqrt(H*H+o*o)*e5,ef=Math.atan(n),hD=hO>0?ef/n:n/ef,iW=cZ+gc*hD*H,ao=fb+gc*hD*o,F=G*bP.ww+q<<1;
bP.map[F]=iW-q;bP.map[F+1]=ao-G}}}else if(x=="Kale"){var dp=bP.ww,gZ=bP.R0,cv=(dp-1)*.5,iC=(gZ-1)*.5,d$=c.MRot.v*Math.PI/180+Math.PI/2+4*Math.PI,kc=c.Mirr.v,i5=Math.PI*2/kc,cB=.5*i5;
for(var G=0;G<gZ;G++)for(var q=0;q<dp;q++){var H=q-cv,o=G-iC,hG=Math.sqrt(H*H+o*o),dY=Math.atan2(o,H)+d$;
dY=dY%i5;if(dY>cB)dY=i5-dY;var iW=cv+Math.cos(dY-d$)*hG,ao=iC+Math.sin(dY-d$)*hG,F=(G*dp+q)*2;bP.map[F]=iW-q;
bP.map[F+1]=ao-G}}else if(x=="Dspl"&&g2.length!=0){j8=c.UndA.v.UndA=="WrpA"?2:1;var jj=c.DspF.v.pth,bt,hg=c.DspD,kv,jv,dA;
if(hg){var fG=hg.v;kv=fG[1]*256+fG[0];jv=fG[5]*256+fG[4];dA=new Uint8Array(fG.slice(10,10+kv*jv))}else{for(var F=0;
F<g2.length;F++)if(g2[F].P6==jj)bt=g2[F];if(bt==null)bt=g2[0];bt.VY();var cw=bt.iw[1],dA=d.R(cw.P());
d._8(bt.iw[0],dA);kv=cw.m;jv=cw.e}bP={ww:kv,R0:jv};bP.map=new Float32Array(bP.ww*bP.R0*2);var f$=2.54*c.HrzS.v*kv/D,b_=2.54*c.VrtS.v*jv/a;
for(var G=0;G<bP.R0;G++){for(var q=0;q<bP.ww;q++){var iR=-.5+dA[G*kv+q]*(1/255),F=G*bP.ww+q<<1;bP.map[F]=iR*f$;
bP.map[F+1]=iR*b_}}}else if(x=="Pnch"||x=="Twrl"||x=="Sphr"||x=="ZgZg"){var ks=1,js=Math.PI,iQ=0,ip=1,iB=0,j_=3,iP=1.53,hD=1;
if(x=="Pnch"||x=="Sphr"||x=="ZgZg")ks=c.Amnt.v/100;if(x=="ZgZg"){ip=c.NmbR.v;iB=["ArnC","OtFr","PndR"].indexOf(c.ZZTy.v.ZZTy)}if(x=="Twrl")js=c.Angl.v*Math.PI/180;
if(x=="Sphr")iQ=["Nrml","HrzO","VrtO"].indexOf(c.SphM.v.SphM);function gQ(q){q=Math.pow(q,1-q*.3-q*q*(q*q)*.5);
return-.225*Math.sin(q*Math.PI)}function jJ(a,cu,n,gH,ap,gj,fx,hD){var H=gj-gH,o=fx-ap,h3=gH-a,cp=ap-cu,g5=H*H+o*o,d3=2*(H*h3+o*cp),j_=h3*h3+cp*cp-n*n,h8=Math.sqrt(d3*d3-4*g5*j_),h4=hD/(2*g5),eQ=(-d3+h8)*h4,fA=(-d3-h8)*h4;
return hD*Math.min(eQ,fA)}var dp=bP.ww,gZ=bP.R0,cv=bP.ww/2,iC=bP.R0/2,cn=1/cv,n=Math.sqrt(j_*j_+1)/j_,cs=j_+Math.sqrt(1/(j_*j_));
if(ks<0){j_=1.72;n=1;cs=j_;iP=-1;hD=-1}for(var G=0;G<gZ;G++){var o=(G-iC)/iC;for(var q=0;q<dp;q++){var H=(q-cv)*cn;
if(iQ==1)o=0;else if(iQ==2)H=0;var bq=Math.sqrt(H*H+o*o);if(bq<1&&bq!=0){var F=G*bP.ww+q<<1;if(x=="Pnch"){var hM=-ks*gQ(bq)/bq;
bP.map[F]=H*hM*cv;bP.map[F+1]=o*hM*iC}else if(x=="Sphr"){var eA=jJ(0,cs,n,0,0,bq,j_,hD),b4=iP*ks*(eA-1);
bP.map[F]=H*b4*cv;bP.map[F+1]=o*b4*iC}else if(x=="Twrl"){var dY=Math.atan2(o,H)-js*(1-bq)*(1-bq),ai=Math.cos(dY),iH=Math.sin(dY);
bP.map[F]=(bq*ai-H)*cv;bP.map[F+1]=(bq*iH-o)*iC}else if(x=="ZgZg"){var ai=0,iH=0,aL=ks*(.5-.5*Math.cos(bq*ip*2*Math.PI))*(1-bq);
if(iB==0){var dY=Math.atan2(o,H)-3.5*aL;ai=bq*Math.cos(dY);iH=bq*Math.sin(dY)}if(iB==1){aL=100/D*aL/bq;
ai=(1-aL)*H;iH=(1-aL)*o}if(iB==2){var A=512/D*aL*Math.PI/4;ai=A+H;iH=A+o}bP.map[F]=(ai-H)*cv;bP.map[F+1]=(iH-o)*iC}}}}}else if(x=="Shr "){var e$=JSON.parse(JSON.stringify(c.ShrP.v));
d.eu.i(e$,new bI(0,255/127,255/127,0,-2,0));var dT=d.eu.ho(e$,bP.R0,!0);j8=c.UndA.v.UndA=="WrpA"?2:1;
for(var G=0;G<bP.R0;G++){var H=-dT[G]*bP.ww;for(var q=0;q<bP.ww;q++){var F=G*bP.ww+q<<1;bP.map[F]=H}}}else if(x=="Wave"){var aW=c.NmbG.v,fn=c.WLMn.v,dr=c.WLMx.v,ez=c.AmMn.v*(Math.PI/4),ji=c.AmMx.v*(Math.PI/4),cy=c.SclH.v/100,eT=c.SclV.v/100,he=c.Wvtp.v.Wvtp,aL=Math.sin;
if(he=="WvTr")aL=function(q){q*=2/Math.PI;return-.5+Math.abs(q%2-1)};if(he=="WvSq")aL=function(q){q*=2/Math.PI;
return 1+2*Math.floor(q%2-1)};var g$=[],aa=new d.l.Zg(c.RndS.v);for(var F=0;F<aW;F++){g$.push(aa.get()*10);
g$.push(Math.PI*fv/(fn+aa.get()*(dr-fn)));g$.push(cy*(ez+aa.get()*(ji-ez))/fv);g$.push(aa.get()*10);
g$.push(Math.PI*fv/(fn+aa.get()*(dr-fn)));g$.push(eT*(ez+aa.get()*(ji-ez))/fv)}var eo=[],gz=[],iY=Math.max(bP.ww,bP.R0);
for(var F=0;F<iY;F++){var H=0,o=0;for(var jp=0;jp<aW;jp++){var f1=jp*6;H+=g$[f1+2]*aL(g$[f1]+F*g$[f1+1]);
o+=g$[f1+5]*aL(g$[f1+3]+F*g$[f1+4])}eo[F]=o;gz[F]=H}for(var G=0;G<bP.R0;G++){for(var q=0;q<bP.ww;q++){var F=G*bP.ww+q<<1;
bP.map[F]=gz[G];bP.map[F+1]=eo[q]}}j8=c.UndA.v.UndA=="WrpA"?2:1}else if(x=="Rple"){j8=1;var ks=c.Amnt.v/100,it=4,fU=[0,-.19,-.29,-.32,.92,.37,.93,.54,-.54,.42,-.29,-.58,-.67,.85,0,.64],d6=1,ce=1,h3=0,fq=["Sml","Mdm","Lrg"].indexOf(c.RplS.v.RplS);
if(fq==0){d6=1;ce=.2;h3=3}if(fq==2){d6=1;ce=2;h3=-1;fU=fU.reverse()}var gM=function(q,G){var j_=Math.cos,co=0;
for(var F=0;F<it;F++)for(var jp=0;jp<it;jp++)co+=fU[F*it+jp]*j_(q*(F+h3)-G*(jp+h3));return co},f7=Math.floor(50/fv),gq=new Float32Array(f7*f7*2),hp=ce*ks*.5/fv;
for(var G=0;G<f7;G++)for(var q=0;q<f7;q++){var cZ=d6*q*2*Math.PI/f7,fb=d6*G*2*Math.PI/f7,kJ=gM(cZ,fb),H=(gM(cZ+.01,fb)-kJ)*100,o=(gM(cZ,fb+.01)-kJ)*100,F=(G*f7+q)*2;
gq[F]=H*hp;gq[F+1]=o*hp}for(var G=0;G<bP.R0;G++)for(var q=0;q<bP.ww;q++){var iH=G%f7,ai=q%f7,F=G*bP.ww+q<<1,hd=iH*f7+ai<<1;
bP.map[F]=gq[hd];bP.map[F+1]=gq[hd+1]}}}d.pX.rz(Q.buffer,j.buffer,D,a,null,bP.map,bP.ww,bP.R0,j8)}return j};
var ag={};ag.ax1="BrSm BrsL BrDR BrsW BrbW BrSp".split(" ");ag.GU="LDBt LDBL LDLf LDTL LDTp LDTR LDRg LDBR".split(" ");
ag.i5=["ScrC","ScrD","ScrL"];ag.O4=["SDRD","SDHz","SDLD","SDVt"];ag.d5="TxBl TxCa TxFr TxTL TxBr TxBu TxSt".split(" ");
ag.iJ="LPBt LPBL LPLf LPTL LPTp LPTR LPRg LPBR".split(" ");ag.MH="GrnR GrSf GrSr GrnC GrCn GrnE GrSt GrnH GrnV GrSp".split(" ");
ag.Db=[[24,19,0],[24,19,1],[24,4],[24,19,2],[24,14],[12,67]];ag.names={ClrP:[0,[24,20,0]],Ct:[0,[24,20,1]],DryB:[0,[24,20,2]],FlmG:[0,[24,20,3]],Frsc:[0,[24,20,4]],NGlw:[0,[24,20,5]],PntD:[0,[24,20,6]],PltK:[0,[24,20,7]],PlsW:[0,[24,20,8]],PstE:[0,[24,20,9]],RghP:[0,[24,20,10]],SmdS:[0,[24,20,11]],Spng:[0,[24,20,12]],Undr:[0,[24,20,13]],Wtrc:[0,[24,20,14]],AccE:[1,[24,20,15]],AngS:[1,[24,20,16]],Crsh:[1,[24,20,17]],DrkS:[1,[24,20,18]],InkO:[1,[24,20,19]],Spt:[1,[24,20,20]],SprS:[1,[24,20,21]],Smie:[1,[24,20,22]],DfsG:[2,[24,20,23]],Gls:[2,[24,20,24]],OcnR:[2,[24,20,25]],BsRl:[3,[24,20,26]],ChlC:[3,[24,20,27]],Chrc:[3,[24,20,28]],Chrm:[3,[24,20,29]],CntC:[3,[24,20,30]],GraP:[3,[24,20,31]],HlfS:[3,[24,20,32]],NtPr:[3,[24,20,33]],Phtc:[3,[24,20,34]],Plst:[3,[24,20,35]],Rtcl:[3,[24,20,36]],Stmp:[3,[24,20,37]],TrnE:[3,[24,20,38]],WtrP:[3,[24,20,39]],GlwE:[4,[24,20,40]],Crql:[5,[24,20,41]],Grn:[5,[24,20,42]],MscT:[5,[24,20,43]],Ptch:[5,[24,20,44]],StnG:[5,[24,20,45]],Txtz:[5,[24,20,46]]};
ag.$H=function(x){var Q;if(x=="ClrP")Q={Pncl:{t:"long",v:4},StrP:{t:"long",v:8},PprB:{t:"long",v:25}};
if(x=="Ct")Q={NmbL:{t:"long",v:4},EdgS:{t:"long",v:3},EdgF:{t:"long",v:1}};if(x=="DryB")Q={BrsS:{t:"long",v:4},BrsD:{t:"long",v:4},Txtr:{t:"long",v:2}};
if(x=="FlmG")Q={Grn:{t:"long",v:4},HghA:{t:"long",v:0},Intn:{t:"long",v:10},FlRs:{t:"long",v:23068185}};
if(x=="Frsc")Q={BrsS:{t:"long",v:2},BrsD:{t:"long",v:8},Txtr:{t:"long",v:1}};if(x=="NGlw")Q={Sz:{t:"long",v:5},Brgh:{t:"long",v:15},Clr:{t:"Objc",v:{classID:"RGBC",Rd:{t:"doub",v:0},Grn:{t:"doub",v:0},Bl:{t:"doub",v:255}}}};
if(x=="PntD")Q={Sz:{t:"long",v:10},Shrp:{t:"long",v:10},BrsT:{t:"enum",v:{BrsT:"BrSm"}}};if(x=="PltK")Q={StrS:{t:"long",v:25},StDt:{t:"long",v:3},Sftn:{t:"long",v:2}};
if(x=="PlsW")Q={HghS:{t:"long",v:20},Dtl:{t:"long",v:4},Smth:{t:"long",v:5}};if(x=="PstE")Q={EdgT:{t:"long",v:2},EdgI:{t:"long",v:1},Pstr:{t:"long",v:2}};
if(x=="RghP")Q={StrL:{t:"long",v:6},StDt:{t:"long",v:4},TxtT:{t:"enum",v:{TxtT:"TxCa"}},Scln:{t:"long",v:100},Rlf:{t:"long",v:20},LghD:{t:"enum",v:{LghD:"LDBt"}},InvT:{t:"bool",v:!1}};
if(x=="SmdS")Q={StrL:{t:"long",v:2},HghA:{t:"long",v:0},Intn:{t:"long",v:10},FlRs:{t:"long",v:6399750}};
if(x=="Spng")Q={BrsS:{t:"long",v:2},Dfnt:{t:"long",v:12},Smth:{t:"long",v:5},FlRs:{t:"long",v:218877241}};
if(x=="Undr")Q={BrsS:{t:"long",v:6},TxtC:{t:"long",v:16},TxtT:{t:"enum",v:{TxtT:"TxCa"}},Scln:{t:"long",v:100},Rlf:{t:"long",v:4},LghD:{t:"enum",v:{LghD:"LDTp"}},InvT:{t:"bool",v:!1}};
if(x=="Wtrc")Q={BrsD:{t:"long",v:9},ShdI:{t:"long",v:1},Txtr:{t:"long",v:3}};if(x=="AccE")Q={EdgW:{t:"long",v:2},EdgB:{t:"long",v:38},Smth:{t:"long",v:5}};
if(x=="AngS")Q={DrcB:{t:"long",v:50},StrL:{t:"long",v:15},Shrp:{t:"long",v:3}};if(x=="Crsh")Q={StrL:{t:"long",v:9},Shrp:{t:"long",v:6},Strg:{t:"long",v:1}};
if(x=="DrkS")Q={Blnc:{t:"long",v:5},BlcI:{t:"long",v:6},WhtI:{t:"long",v:2}};if(x=="InkO")Q={StrL:{t:"long",v:4},DrkI:{t:"long",v:20},LghI:{t:"long",v:10}};
if(x=="Smie")Q={StrW:{t:"long",v:10},StrP:{t:"long",v:5},Cntr:{t:"long",v:16}};if(x=="Spt")Q={SprR:{t:"long",v:10},Smth:{t:"long",v:5},FlRs:{t:"long",v:10738420}};
if(x=="SprS")Q={StrL:{t:"long",v:12},SprR:{t:"long",v:7},SDir:{t:"enum",v:{StrD:"SDRD"}},FlRs:{t:"long",v:893120664}};
if(x=="DfsG")Q={Grns:{t:"long",v:6},GlwA:{t:"long",v:10},ClrA:{t:"long",v:15},FlRs:{t:"long",v:325892160}};
if(x=="Gls")Q={Dstr:{t:"long",v:3},Smth:{t:"long",v:1},TxtT:{t:"enum",v:{TxtT:"TxTL"}},Scln:{t:"long",v:100},InvT:{t:"bool",v:!1}};
if(x=="OcnR")Q={RplS:{t:"long",v:5},RplM:{t:"long",v:15},FlRs:{t:"long",v:64008840}};if(x=="BsRl")Q={Dtl:{t:"long",v:11},Smth:{t:"long",v:7},LghD:{t:"enum",v:{LghD:"LDBt"}}};
if(x=="ChlC")Q={ChrA:{t:"long",v:6},ChlA:{t:"long",v:6},StrP:{t:"long",v:1},FlRs:{t:"long",v:314004633}};
if(x=="Chrc")Q={ChAm:{t:"long",v:1},Dtl:{t:"long",v:5},LgDr:{t:"long",v:50},GELv:{t:"bool",v:!0}};if(x=="Chrm")Q={Dtl:{t:"long",v:4},Smth:{t:"long",v:4}};
if(x=="CntC")Q={FrgL:{t:"long",v:11},BckL:{t:"long",v:7},TxtT:{t:"enum",v:{TxtT:"TxCa"}},Scln:{t:"long",v:100},Rlf:{t:"long",v:4},LghD:{t:"enum",v:{LghD:"LDTp"}},InvT:{t:"bool",v:!1}};
if(x=="GraP")Q={StrL:{t:"long",v:7},LgDr:{t:"long",v:50},SDir:{t:"enum",v:{StrD:"SDRD"}},FlRs:{t:"long",v:55993248}};
if(x=="HlfS")Q={HlSz:{t:"long",v:1},Cntr:{t:"long",v:5},ScrT:{t:"enum",v:{ScrT:"ScrD"}}};if(x=="NtPr")Q={ImgB:{t:"long",v:25},Grns:{t:"long",v:10},Rlf:{t:"long",v:11},FlRs:{t:"long",v:52642770}};
if(x=="Phtc")Q={Dtl:{t:"long",v:10},Drkn:{t:"long",v:4}};if(x=="Plst")Q={ImgB:{t:"long",v:20},Smth:{t:"long",v:2},LghP:{t:"enum",v:{LghP:"LPTp"}}};
if(x=="Rtcl")Q={Dnst:{t:"long",v:12},BlcL:{t:"long",v:40},WhtL:{t:"long",v:5},FlRs:{t:"long",v:301835400}};
if(x=="Stmp")Q={LgDr:{t:"long",v:25},Smth:{t:"long",v:4}};if(x=="TrnE")Q={ImgB:{t:"long",v:25},Smth:{t:"long",v:11},Cntr:{t:"long",v:17},FlRs:{t:"long",v:461109340}};
if(x=="WtrP")Q={FbrL:{t:"long",v:15},Brgh:{t:"long",v:60},Cntr:{t:"long",v:80},FlRs:{t:"long",v:83852682}};
if(x=="GlwE")Q={EdgW:{t:"long",v:1},EdgB:{t:"long",v:10},Smth:{t:"long",v:1}};if(x=="Crql")Q={CrcS:{t:"long",v:15},CrcD:{t:"long",v:6},CrcB:{t:"long",v:9},FlRs:{t:"long",v:495615720}};
if(x=="Grn")Q={Intn:{t:"long",v:40},Cntr:{t:"long",v:50},Grnt:{t:"enum",v:{Grnt:"GrnR"}},FlRs:{t:"long",v:217582197}};
if(x=="MscT")Q={TlSz:{t:"long",v:12},GrtW:{t:"long",v:3},LghG:{t:"long",v:9},FlRs:{t:"long",v:25445584}};
if(x=="Ptch")Q={SqrS:{t:"long",v:4},Rlf:{t:"long",v:8},FlRs:{t:"long",v:383529723}};if(x=="StnG")Q={ClSz:{t:"long",v:10},BrdT:{t:"long",v:4},LghI:{t:"long",v:0},FlRs:{t:"long",v:319935998}};
if(x=="Txtz")Q={TxtT:{t:"enum",v:{TxtT:"TxBr"}},Scln:{t:"long",v:100},Rlf:{t:"long",v:10},LghD:{t:"enum",v:{LghD:"LDBL"}},InvT:{t:"bool",v:!1}};
Q.__name="Filter Gallery";Q.classID="GEfc";Q.GEfk={t:"enum",v:{GEft:x}};Q.GELv={t:"bool",v:!0};return Q};
ag.cU=function(x,Q){for(var F=0;F<Q.length;F++)~~(Q[F]=(x[4*F]+x[4*F+1]+x[4*F+2])*(1/3))};ag.a1e=function(x,Q,c,$,z,j){var U=UPNG.quantize(x,Q);
U={AJ:U.inds,cA:U.plte};if(j){var i=new Uint32Array(U.cA.length);for(var F=0;F<i.length;F++)i[F]=U.cA[F].est.rgba;
U.AJ=d.aCf(new Uint8Array(x),c,$,new Uint8Array(i.buffer))}var b=Math.floor((c+$)*.015);if(b!=0&&z)d.w9.a9I(U.AJ,c,$,b);
return U};ag.NH=function(x,Q,c,$,z,j,U){x=c.GEfk.v.GEft;var i=Q.rect,b=i.m,e=i.e,k=b*e,K=c.FlRs?c.FlRs.v>>>1:0;
function g(Z){return Z.Z<<24|Z.r<<16|Z.J<<8|255}if(x=="ClrP")d.X.afw(Q.buffer,b,e,j.buffer,[c.Pncl.v,c.StrP.v,c.PprB.v]);
if(x=="Ct"){var R=c.NmbL.v,T=c.EdgS.v,D=ag.a1e(Q.buffer.buffer,R*2,b,e,!0);for(var F=0;F<D.AJ.length;
F++)D.AJ[F]++;var a=new Uint8Array((b+2)*(e+2));d.L2(D.AJ,new gh(1,1,b,e),a,new gh(0,0,b+2,e+2));var _=d.A.aeY(a,b+2,e+2,T,!1),I=new bI(1,0,0,1,-1,-1);
for(var F=0;F<_.length;F++)d.A.i(_[F].path.j,I,_[F].path.j);var f=[],y=D.cA;for(var F=0;F<y.length;F++){var Z=y[F].est.q;
f.push({Z:Math.round(255*Z[0]),r:Math.round(255*Z[1]),J:Math.round(255*Z[2]),V:Math.round(255*Z[3])})}var v=d.nc(b,e);
for(var F=0;F<_.length;F++){var G=_[F],Z=f[G.color-1];if(Z.V==0)continue;v.fillStyle="rgba("+Z.Z+","+Z.r+","+Z.J+","+Z.V/255+")";
v.beginPath();Typr.U.pathToContext({crds:G.path.j,cmds:G.path.G},v);v.fill()}if(!i._6()){var q=v.getImageData(0,0,b,e);
d.SO(q.data,j.buffer)}}if(x=="DryB")d.X.aAR(Q.buffer,b,e,j.buffer,[c.BrsS.v,c.BrsD.v,c.Txtr.v]);if(x=="FlmG")d.X.azX(Q.buffer,b,e,j.buffer,[c.Grn.v,c.HghA.v,c.Intn.v,K]);
if(x=="Frsc")d.X.acI(Q.buffer,b,e,j.buffer,[c.BrsS.v,c.BrsD.v,c.Txtr.v]);if(x=="NGlw")d.X.akc(Q.buffer,b,e,j.buffer,[c.Sz.v,c.Brgh.v,g(d.I.Du(c.Clr.v)),g($),g(z)]);
if(x=="PltK")d.X.aCd(Q.buffer,b,e,j.buffer,[c.StrS.v,c.StDt.v,c.Sftn.v]);if(x=="PstE")d.X.a76(Q.buffer,b,e,j.buffer,[c.EdgT.v,c.EdgI.v,c.Pstr.v]);
if(x=="RghP")d.X.ayk(Q.buffer,b,e,j.buffer,[c.StrL.v,c.StDt.v,ag.d5.indexOf(c.TxtT.v.TxtT),c.Scln.v,c.Rlf.v,ag.GU.indexOf(c.LghD.v.LghD),c.InvT.v]);
if(x=="SmdS")d.X.agv(Q.buffer,b,e,j.buffer,[c.StrL.v,c.HghA.v,c.Intn.v,c.FlRs?c.FlRs.v:0,K]);if(x=="Spng")d.X.adK(Q.buffer,b,e,j.buffer,[c.BrsS.v,c.Dfnt.v,c.Smth.v,c.FlRs?c.FlRs.v:0,K]);
if(x=="Undr")d.X.a1C(Q.buffer,b,e,j.buffer,[c.BrsS.v,c.TxtC.v,ag.d5.indexOf(c.TxtT.v.TxtT),c.Scln.v,c.Rlf.v,ag.GU.indexOf(c.LghD.v.LghD),c.InvT.v]);
if(x=="Wtrc")d.X.a39(Q.buffer,b,e,j.buffer,[c.BrsD.v,c.ShdI.v,c.Txtr.v]);if(x=="AccE")d.X.a74(Q.buffer,b,e,j.buffer,[c.EdgW.v,c.EdgB.v,c.Smth.v]);
if(x=="AngS")d.X.art(Q.buffer,b,e,j.buffer,[c.DrcB.v,c.StrL.v,c.Shrp.v]);if(x=="Crsh")d.X.alA(Q.buffer,b,e,j.buffer,[c.StrL.v,c.Shrp.v,c.Strg.v]);
if(x=="DrkS")d.X.aAG(Q.buffer,b,e,j.buffer,[c.Blnc.v,c.BlcI.v,c.WhtI.v]);if(x=="InkO")d.X.ait(Q.buffer,b,e,j.buffer,[c.StrL.v,c.DrkI.v,c.LghI.v]);
if(x=="Smie")d.X.axU(Q.buffer,b,e,j.buffer,[c.StrW.v,c.StrP.v,c.Cntr.v]);if(x=="DfsG")d.X.aqA(Q.buffer,b,e,j.buffer,[c.Grns.v,c.GlwA.v,c.ClrA.v,g(z),K]);
if(x=="CntC")d.X.a5T(Q.buffer,b,e,j.buffer,[c.FrgL.v,c.BckL.v,ag.d5.indexOf(c.TxtT.v.TxtT),c.Scln.v,c.Rlf.v,ag.GU.indexOf(c.LghD.v.LghD),c.InvT.v,g(z),g($)]);
if(x=="ChlC")d.X.a5p(Q.buffer,b,e,j.buffer,[c.ChrA.v,c.ChlA.v,c.StrP.v,K,g(z),g($)]);var h=x=="GraP"||x=="Chrc"||x=="Plst"||x=="Rtcl"||x=="Stmp"||x=="TrnE";
if(h){var r=d.R(b*e);if(x=="GraP")d.X.awv(Q.buffer,b,e,j.buffer,[c.StrL.v,c.LgDr.v,ag.O4.indexOf(c.SDir.v.StrD),K]);
if(x=="Chrc")d.X.azw(Q.buffer,b,e,j.buffer,[c.ChAm.v,c.Dtl.v,c.LgDr.v]);if(x=="Plst")d.X.aBf(Q.buffer,b,e,j.buffer,[c.ImgB.v,ag.iJ.indexOf(c.LghP.v.LghP),c.Smth.v]);
if(x=="Rtcl")d.X.aDm(Q.buffer,b,e,j.buffer,[c.Dnst.v,c.BlcL.v,c.WhtL.v,K]);if(x=="Stmp")d.X.a2V(Q.buffer,b,e,j.buffer,[c.LgDr.v,c.Smth.v]);
if(x=="TrnE")d.X.aE1(Q.buffer,b,e,j.buffer,[c.ImgB.v,c.Smth.v,c.Cntr.v,K]);d.GS(j.buffer,r,0);ag.kX(r,j.buffer,$,z)}if(x=="NtPr")d.X.awS(Q.buffer,b,e,j.buffer,[c.ImgB.v,c.Grns.v,c.Rlf.v,g($),g(z),K]);
if(x=="WtrP")d.X.a5N(Q.buffer,b,e,j.buffer,[c.FbrL.v,c.Brgh.v,c.Cntr.v,K>>>1]);if(x=="Crql")d.X.auc(Q.buffer,b,e,j.buffer,[c.CrcS.v,c.CrcD.v,c.CrcB.v,K]);
if(x=="Grn")d.X.aDw(Q.buffer,b,e,j.buffer,[c.Intn.v,ag.MH.indexOf(c.Grnt.v.Grnt),c.Cntr.v,g($),g(z),K]);
if(x=="MscT")d.X.abe(Q.buffer,b,e,j.buffer,[c.TlSz.v,c.GrtW.v,c.LghG.v,K]);if(x=="Ptch")d.X.az9(Q.buffer,b,e,j.buffer,[c.SqrS.v,c.Rlf.v,K]);
if(x=="Phtc"){function H(e$,iP,i,dY){d.yg.hh(e$,iP,i,dY);for(var F=0;F<k;F++)iP[F]=Math.max(0,Math.min(255,128+e$[F]-iP[F]))}var o=c.Dtl.v,P=c.Drkn.v,O=d.R(k);
d._8(Q.buffer,O);var p=d.R(k);H(O,p,i,1);if(o==1){o=2;P=Math.round(P/4)}var C=d.R(k);H(O,C,i,o);for(var F=0;
F<k;F++)O[F]=Math.max(0,Math.min(255,255-(p[F]-C[F])*P));ag.kX(O,j.buffer,$,z)}if(x=="Spt"||x=="SprS"){var W,J=1,t=1;
W={ww:Math.floor(b/t),R0:Math.floor(e/t)};W.map=new Float32Array(W.ww*W.R0*2);var Y=new d.l.Zg(K),l=new Float32Array(8192),m=c.SprR.v,B=m<20?.018*m:.36+(m-20)*.128;
if(x=="SprS"){B=.07+[0,.02,.04,.06,.08,.1,.12,.14,.16,.18,.2,.22,.24,.26,.28,.3,.34,.38,.5,.65,.75,.85,1,1.5,2.2,3][m]}for(var F=0;
F<8192;F++)l[F]=(-1+2*Y.get())*B*70;for(var L=0;L<e;L++)for(var A=0;A<b;A++){var S=L*b+A<<1;W.map[S]=l[S%7919];
W.map[S+1]=l[(S+1)%7919]}var M=W.map.slice(0),N=x=="Spt"?c.Smth.v-1:1;if(x=="Spt"&&N!=0){ag.a56(W.map,M,b,e,N);
ag.aqd(M,W.map,b,e,N)}if(x=="SprS"){var s=c.StrL.v>>>1,V=s==0?2:1;ag.a56(W.map,M,b,e,V);ag.aqd(M,W.map,b,e,V);
if(s!=0){var g8=ag.O4.indexOf(c.SDir.v.StrD),n=[1,1,1,0][g8],cQ=[-1,0,1,1][g8],hk=2*s+1,eG=1/hk;for(var L=0;
L<e;L++)for(var A=0;A<b;A++){var S=L*b+A<<1,ie=0,eN=0;for(var F=0;F<hk;F++){var ek=Math.max(0,Math.min(b-1,A-(s+F)*n)),jK=Math.max(0,Math.min(e-1,L-(s+F)*cQ)),iE=jK*b+ek<<1;
ie+=W.map[iE];eN+=W.map[iE+1]}M[S]=ie*eG;M[S+1]=eN*eG}W.map=M}}d.pX.rz(Q.buffer,j.buffer,b,e,null,W.map,W.ww,W.R0,J)}if(x=="BsRl"||x=="PlsW"||x=="Chrm"){var e9=Date.now(),dm=d.R(k),kD=dm.slice(0);
d._8(Q.buffer,dm);var o=c.Dtl.v,gJ=c.Smth.v;if(o!=15){d.yg.ZA(dm,kD,i,Math.round((15-o)*.5));d.SO(kD,dm)}var dR=1.4/b,fO=1.4/e,ko=new Float32Array(k),d8=new Float32Array(k),fj=new Float32Array(j.buffer.buffer);
for(var L=0;L<e;L++)for(var A=0;A<b;A++){var F=L*b+A,n=A==b-1?dm[F]-dm[F-1]:dm[F+1]-dm[F],cQ=L==e-1?dm[F]-dm[F-b]:dm[F+b]-dm[F],ja=A*dR-.7,eD=L*fO-.7;
ko[F]=n==0?ja:n*.4;d8[F]=cQ==0?eD:cQ*.4}if(x=="BsRl"){var d3=(2+ag.GU.indexOf(c.LghD.v.LghD))*Math.PI*.25,ie=Math.cos(d3);
if(Math.abs(ie)<.1)ie=0;ie=Math.sign(ie);var eN=Math.sin(d3);if(Math.abs(eN)<.1)eN=0;eN=Math.sign(eN);
var fP=1/(ie*ie+eN*eN);for(var L=0;L<e;L++)for(var A=0;A<b;A++){var F=L*b+A,jE=Math.max(-1,Math.min(1,ie*ko[F])),cR=Math.max(-1,Math.min(1,eN*d8[F]));
kD[F]=128+127*(jE+cR)*fP}if(gJ!=1){d.yg.ZA(kD,dm,i,Math.round((gJ-1)*.5));d.SO(dm,kD)}ag.kX(kD,j.buffer,$,z)}else{if(x=="Chrm")gJ=5+gJ;
if(gJ>1)ag.xM(ko,d8,fj,i,gJ-1);if(x=="PlsW"){var ex=new Uint8Array(ko.buffer);for(var F=0;F<k;F++){var er=F<<2,n=ko[F],cQ=d8[F],cE=1/(Math.sqrt(1+n*n)*Math.sqrt(1+cQ*cQ)),a7=cE*cE,dl=a7*a7,Z=~~(255*(dl*dl*a7));
ex[er+0]=Z;ex[er+1]=Z;ex[er+2]=Z;ex[er+3]=Z}j.buffer.set(Q.buffer);d.l.UY("norm",ex,i,j.buffer,i,i,c.HghS.v/20)}else if(x=="Chrm"){var hl=j.buffer,f4=b>>>1,em=e>>>1;
for(var F=0;F<k;F++){var er=F<<2,n=ko[F],cQ=d8[F],e$={x:1,y:0,wP:n};en.H9(e$);var iP={x:0,y:1,wP:cQ};
en.H9(iP);var b2=en.a8S(e$,iP),k7=1/b2.wP,at=~~Math.max(0,Math.min(b-1,f4-b2.x*k7*f4)),ju=~~Math.max(0,Math.min(e-1,em-b2.y*k7*em)),Z=dm[ju*b+at];
hl[er+0]=Z;hl[er+1]=Z;hl[er+2]=Z}}}}if(x=="Gls"||x=="OcnR"||x=="Txtz"){var jL=x=="OcnR"?2:ag.d5.indexOf(c.TxtT.v.TxtT),fJ=ag.kR(jL),h6=fJ[0],dm=fJ[1],iq=h6.m,iI=h6.e,hk=24,h_=0,bj,gs;
function dM(bL,kr,jS){return~~(ik*(bL+kr)+8192)&127}var ko=new Float32Array(k),d8=new Float32Array(k),fj=new Float32Array(j.buffer.buffer),ik=x=="OcnR"?1/(1+(c.RplS.v-1)*.1):100/c.Scln.v;
if(jL==3)ik*=32/22.2;var e9=Date.now(),jp=ik,dR=1.4/b,fO=1.4/e;if(x=="Txtz"){jp*=1/255;hk=256}for(var L=0;
L<e;L++){var eA=dM(L,i.y,iI),jK=eA+1&127;for(var A=0;A<b;A++){var F=L*b+A,k8=dM(A,i.x,iq),ek=k8+1&127,ay=0,bK=0,a4=0;
if(x=="Txtz"){ay=d.D.k3(ik*A,ik*L,dm,128,128);bK=d.D.k3(ik*A,ik*L+1,dm,128,128);a4=d.D.k3(ik*A+1,ik*L,dm,128,128)}else{ay=dm[eA*iq+k8];
bK=dm[jK*iq+k8];a4=dm[eA*iq+ek]}ko[F]=Math.max(-hk,Math.min((a4-ay)*jp,hk));d8[F]=Math.max(-hk,Math.min((bK-ay)*jp,hk))}}if(x=="Txtz")ag.al$(ko,d8,fj,i,6);
else ag.xM(ko,d8,fj,i,x=="Txtz"?1:x=="OcnR"?3.5/ik:c.Smth.v);if(x=="Txtz")h_=c.InvT.v?-1:1;else if(x=="Gls"){h_=[1,.4,.5,.5,.5,.5,.5][jL]*(Math.exp(c.Dstr.v*.155)-1);
if(c.InvT.v)h_=-h_}else{h_=.5*(Math.exp(c.RplM.v*.155)-1)}var hl=j.buffer;if(x=="Txtz"){var d3=(2+ag.GU.indexOf(c.LghD.v.LghD))*Math.PI*.25,ie=Math.cos(d3),eN=Math.sin(d3);
bj={x:ie,y:eN,wP:0};en.H9(bj);gs=c.Rlf.v;gs=gs/4+Math.max(0,(gs-35)*2)}function bs(e$,iP,jA){var eB=d.l.overF(iP,e$,1),bL=(1-jA)*e$+jA*(jA*iP+(1-jA)*eB);
return bL*255}for(var L=0;L<e;L++)for(var A=0;A<b;A++){var F=L*b+A,er=F<<2,n=ko[F],cQ=d8[F],e$={x:1,y:0,wP:n};
en.H9(e$);var iP={x:0,y:1,wP:cQ};en.H9(iP);var b2=en.a8S(e$,iP);if(x=="Txtz"){var e3=en.a45(b2,bj)*h_,jA=1,Z=1;
if(e3<0){Z=0;e3=-e3}jA=Math.min(1,e3*gs);hl[er+0]=~~bs(Q.buffer[er]*(1/255),Z,jA);hl[er+1]=~~bs(Q.buffer[er+1]*(1/255),Z,jA);
hl[er+2]=~~bs(Q.buffer[er+2]*(1/255),Z,jA)}else{var k7=h_/b2.wP,at=~~Math.max(0,Math.min(b-1,A-b2.x*k7)),ju=~~Math.max(0,Math.min(e-1,L-b2.y*k7)),kn=ju*b+at<<2;
hl[er+0]=Q.buffer[kn];hl[er+1]=Q.buffer[kn+1];hl[er+2]=Q.buffer[kn+2]}}}if(x=="PntD"){var j6=c.Shrp.v*.4,cL=c.BrsT.v.BrsT,eb={BrSm:[.75],BrsL:[.85],BrDR:[.68],BrsW:[.75],BrbW:[.78],BrSp:[.62]}[cL],dY=Math.round(c.Sz.v*.5);
d.Zt.LP=eb[0];d.Zt.fO(Q.buffer,j.buffer,b,e,dY,0,[]);var aP=[-.7,-1,-.7,-1,10,-1,-.7,-1,-.7];aP=d.hx.C6(aP);
var ks=j.buffer.slice(0);d.hx.QY(ks,j.buffer,b,e,aP,0);for(var F=0;F<Q.buffer.length;F++){var jC=j.buffer[F]-ks[F];
j.buffer[F]=Math.max(0,Math.min(255,ks[F]+j6*jC))}}if(x=="GlwE"){var ig=j.buffer.slice(0);d.Zt.LP=.5;
d.Zt.fO(Q.buffer,ig,b,e,c.Smth.v>>>1,0,[]);d.hx.a2g(ig,j.buffer,b,e);d.SO(j.buffer,ig);d.HQ(ig);d.h4(ig,4278190080,16777215);
d.VT.ay2(ig,j.buffer,b,e,(c.EdgW.v>>>1)*2+1,!0);var cD=c.EdgB.v/10;for(var F=0;F<ig.length;F++){if((F&3)==3)continue;
var eB=j.buffer[F];j.buffer[F]=Math.max(0,Math.min(255,eB*cD))}}if(x=="StnG"){d.X3.aw4(Q.buffer,b,e,j.buffer,c.ClSz.v,[Math.round($.Z),Math.round($.r),Math.round($.J)],c.BrdT.v)}if(x=="HlfS"){var c1=c.HlSz.v,dq=c1*2+1,b$=c.Cntr.v,d7=ag.i5.indexOf(c.ScrT.v.ScrT),k=b*e,he=k*4,k4=d.R(k),a6=Q.buffer,gL=0,dc=0;
ag.cU(a6,k4);var cK=k4.slice(0);d.yg.asP(cK,k4,i,c1);var ds=Math.PI/dq,iy=new Float64Array(b),ie=new Float64Array(b),gu=new Float64Array(2*b);
for(var A=0;A<b;A++){var k8=(A-(b>>>1))*ds;iy[A]=k8*k8;ie[A]=Math.cos(k8);var n=A<<1;gu[n]=Math.sin(n*(1/4.5));
gu[n+1]=Math.sin((n+1)*(1/4.5))}for(var L=0;L<e;L++){var eA=(L-(e>>>1))*ds,eN=Math.cos(eA),aQ=eA*eA;
for(var A=0;A<b;A++){var Z=eN;if(d7==0){var ec=.5+Math.sqrt(iy[A]+aQ)*4.5;Z=gu[~~ec]}else if(d7==1){Z=ie[A]*eN}var F=L*b+A,gH=k4[F]*(.75+.25*Z),jA=a6[(F<<2)+3]*(1/255),gj=Math.max(0,Math.min(255,~~gH));
gL+=gj*jA,dc+=jA;k4[F]=gj}}gL/=dc;var fx=128+1.26*(gL-128),cD=.08+.25*Math.abs((128-gL)/128),aT=1+cD*b$;
for(var F=0;F<k;F++){var gH=fx+(k4[F]-fx)*aT;k4[F]=Math.max(0,Math.min(255,~~gH))}if(b$>46)d.round(k4);
ag.kX(k4,j.buffer,$,z)}for(var F=0;F<Q.buffer.length;F+=4)j.buffer[F+3]=Q.buffer[F+3]};ag.kX=function(x,Q,c,$){var z=x.length,j=c.Z,U=c.r,i=c.J,b=$.Z,e=$.r,k=$.J;
for(var F=0;F<z;F++){var K=x[F]*(1/255),g=1-K,R=F<<2;Q[R]=~~(j*g+b*K);Q[R+1]=~~(U*g+e*K);Q[R+2]=~~(i*g+k*K)}};
ag.kR=function(x){if(x==6)x=2;var Q="blocks canvas frosted tinylens brick burlap".split(" ")[x];if(ag.tT==null)ag.tT=[];
if(ag.tT[x]==null){var c,$;if(x==2){$=new gh(0,0,128,128);var z=fK.$H("AdNs");z.Mnch.v=!0;z.Dstr.v.Dstr="Gsn";
z.Nose.v.val=50;var c=d.R($.P()*4),j=c.slice(0);new Uint32Array(j.buffer).fill(4286611584);fK.NH("AdNs",{buffer:j,rect:$},z,0,0,{buffer:c,rect:$})}else{var U=ar.dy.get("tex/"+Q,!0)[0];
$=U.K$;c=new Uint8Array(U.data)}var i=d.R($.P());d.GS(c,i,0);ag.tT[x]=[$,i]}return ag.tT[x]};ag.xM=function(x,Q,c,$,z){if(z<=1){z=Math.round(z);
ag.al$(x,Q,c,$,[1,16,4][z]);return}var j=z*.42;if(x){d.yg.U2(x,$,j,3)}if(Q){d.yg.U2(Q,$,j,3)}};ag.al$=function(x,Q,c,$,z){var j=d.hx.C6([1,2,1,2,z,2,1,2,1]);
if(x){c.set(x);d.hx.aAH(x,c,$.m,$.e,j);x.set(c)}if(Q){c.set(Q);d.hx.aAH(Q,c,$.m,$.e,j);Q.set(c)}};ag.xs=function(x){if(x==null)return new bC(0,0);
var Q=0,c=x.GEfs?x.GEfs.v:[{v:x}];for(var F=0;F<c.length;F++){var $=c[F].v,j=1e4;if($.GELv&&!$.GELv.v)continue;
var z=$.GEfk.v.GEft;if(z=="GlwE"||z=="Phtc"||z=="BsRl"||z=="PlsW"||z=="Chrm"||z=="Gls"||z=="OcnR"||z=="InkO")j=0;
Q=Math.max(Q,j)}return new bC(Q,Q)};ag.adR=function(x){var Q=[0,0,0,0,0,0,0,0,0,0,0,0,0],c=[0,.6,.7,.8,1,1.2,1.4,1.6,1.8,2,2.2,2.6,3,4,5][x];
for(var F=0;F<13;F++){var $=F-6;Q[F]=1/(c*Math.sqrt(2*Math.PI))*Math.exp(-.5*($/c)*($/c))}return Q};
ag.a56=function(x,Q,c,$,z){var j=ag.adR(z),U=6,i=13;for(var b=0;b<$;b++)for(var e=0;e<c;e++){var k=b*c+e<<1,K=0,g=0;
for(var F=0;F<i;F++){var R=e+F-U,T=R<0?0:R>=c?c-1:R,D=(b*c+T)*2,a=j[F];K+=a*x[D];g+=a*x[D+1]}Q[k]=K;
Q[k+1]=g}};ag.aqd=function(x,Q,c,$,z){var j=ag.adR(z),U=6,i=13;for(var b=0;b<$;b++)for(var e=0;e<c;e++){var k=b*c+e<<1,K=0,g=0;
for(var F=0;F<i;F++){var R=b+F-U,T=R<0?0:R>=$?$-1:R,D=(T*c+e)*2,a=j[F];K+=a*x[D];g+=a*x[D+1]}Q[k]=K;
Q[k+1]=g}};function cq(){}cq.nW=[2,5,5,7,4,4];cq.X$="norm,diss,dark,mul ,idiv,lbrn,dkCl,lite,scrn,div ,lddg,lgCl,over,sLit,hLit,vLit,lLit,pLit,hMix,diff,smud,fsub,fdiv,hue ,sat ,colr,lum ".split(",");
cq.hg="Nrml Dslv Drkn Mltp CBrn linearBurn darkerColor Lghn Scrn CDdg linearDodge lighterColor Ovrl SftL HrdL vividLight linearLight pinLight hardMix Dfrn Xclu blendSubtraction blendDivide H Strt Clr Lmns".split(" ");
cq.o_=[[15,10,0],[15,10,1],[15,10,2],[15,10,3],[15,10,4],[15,10,5],[15,10,6],[15,10,7],[15,10,8],[15,10,9],[15,10,10],[15,10,11],[15,10,12],[15,10,13],[15,10,14],[15,10,15],[15,10,16],[15,10,17],[15,10,18],[15,10,19],[15,10,20],[15,10,21],[15,10,22],[15,10,23],[15,10,24],[15,10,25],[15,10,26]];
cq.Zx=["normal",null,"darken","multiply","color-burn",null,null,"lighten","screen","color-dodge",null,null,"overlay","soft-light","hard-light",null,null,null,null,"difference","exclusion",null,null,"hue","saturation","color","luminosity"];
cq.Rg=function(x){if(x=="passThrough")return"pass";return cq.X$[cq.hg.indexOf(x)]};cq.DU=function(x){if(x=="pass")return"passThrough";
return cq.hg[cq.X$.indexOf(x)]};cq.getName=function(x){return cq.o_[cq.X$.indexOf(x)]};function eM(){this.rect=null;
this.buffer=null;this.s3="norm";this.opacity=255;this.cG=!1;this.Qc=!1;this.H2=0;this.to=0;this.Rm=!0;
this.uJ=[];for(var F=0;F<10;F++)this.uJ.push(0,0,255,255);this.name=null;this.add={};this.Qf=null;this.EW=null;
this.F=null;this.OE=null;this.aiA=30;this.GY=null;this.in=null;this.wD=null;this.Zv=null;this.kk=0;this.Et=!1;
this.$Q=null;this.ft=new eM.xH}eM.xH=function(){this.Cd=!0;this.JP=!0;this.My=d.R(0);this.aoq=d.R(0);
this.NC=null;this.Xe={};this.auI=null;this.ar=null;this.sU=null;this.Ov=null;this.Vc=null;this.Pd=null;
this.rP=null;this.CV=null;this.ET=null;this.i3=null;this.lP=null;this.iG=null;this.Sg=!1};eM.xH.prototype.aCM=function(){this.Cd=null;
this.JP=!1;this.NC=null;this.Sg=eV.Mx};eM.xH.prototype.afK=function(){en.arR(this.Xe);this.My=d.R(0);
this.aoq=d.R(0);if(this.Ov)this.Ov.delete();if(this.Vc)this.Vc.delete();this.Ov=null;this.Vc=null;var x=[this.Pd,this.rP,this.CV,this.ET,this.i3,this.lP];
for(var F=0;F<6;F++)if(x[F]!=null&&x[F]instanceof eV.PT)x[F].delete();this.Pd=null;this.rP=null;this.CV=null;
this.ET=null;this.i3=null;this.lP=null};eM.prototype.c=function(x){if(x==null)x=this.rect.clone();if(this.ft.NC==null)this.ft.NC=x;
else this.ft.NC=this.ft.NC.iO(x)};eM.prototype.Uy=function(){return this.add.lsct==hA.DJ||this.add.lsct==hA.H3};
eM.prototype.Z6=function(){var x=this.add;return x.SoCo!=null||x.GdFl!=null||x.PtFl!=null||x.vstl!=null};
eM.prototype.aBA=function(){var x=this.add.lmfx;if(x==null)return;var Q=["GrFl","patternFill"];for(var F=0;
F<Q.length;F++){var c=aF.mh[aF.order.indexOf(Q[F])],$=x[c].v;if($.length==0)continue;for(var z=0;z<$.length;
z++){var j=$[z].v;if(j.enab.v&&(j.Algn==null||!j.Algn.v))this.ft.JP=!0}}};eM.prototype.af9=function(){var x=this.F,Q=this.ft.Cd;
if(this.Z6())x=this.Rz();if(!eV.Mx)return x.hO();if(this.ft.Vc==null||Q||eV.Mx!=this.ft.Sg){var c=x.Pe(),$=this.ft.Vc,z=null;
if(Q!=!0&&Q!=null){z=Q.clone();z.offset(-c.x,-c.y)}if($==null||$.m!=c.m||$.e!=c.e){$=this.ft.Vc=new eV.X7(c.m,c.e);
z=null}$.set(x.hO(),z)}return this.ft.Vc};eM.prototype.auP=function(x){var Q=this.rect,c=this.buffer;
if(!eV.Mx){var $=this.Ja(x,c,Q);if($){c=$.AX;Q=$.rect}return c}if(this.ft.NC!=null||eV.Mx!=this.ft.Sg){var $=this.Ja(x,c,Q);
if($){c=$.AX;Q=$.rect}var z=Q;if(eV.Mx!=this.ft.Sg||this.ft.Ov==null||this.ft.Ov.m!=z.m||this.ft.Ov.e!=z.e){if(this.ft.Ov)this.ft.Ov.delete();
this.ft.Ov=new eV.PT(z.m,z.e);this.ft.Ov.set(c)}else{var j=this.ft.NC.clone();j.offset(-Q.x,-Q.y);this.ft.Ov.set(c,j)}}return this.ft.Ov};
eM.prototype.ZC=function(){var x=this.F;if(this.Z6())x=this.Rz();return x!=null&&x.isEnabled&&(!x.rect._6()||x.Du()!=255)};
eM.prototype.Ja=function(x,Q,c){if(this.Oz()){var $=this.U5(x);if($.F&&$.F.isEnabled&&(!$.F.rect._6()||$.F.color==0)){var z=this.add.SoLd.filterFX.v;
$.F.f4=z.filterMaskDensity?z.filterMaskDensity.v:255;$.F.bS=z.filterMaskFeather?z.filterMaskFeather.v:0;
var j=$.buffer,U=$.rect;if(U.P()<c.P()){U=c;j=d.R(U.P()*4);d.WK($.buffer,$.rect,j,U)}var i=$.F.EF(c);
d.HQ(i);Q=Q.slice(0);d.l.$A(j,U,Q,c,i,c,0,c,1);return{AX:Q,rect:c}}}};eM.prototype.aqo=function(){var x={Ne:!1,Qe:!1,o0:0,Vs:0};
if(this.add.vmsk&&this.add.vmsk.isEnabled)x.Qe=!0;if(this.Rz()&&this.Rz().isEnabled)x.Ne=!0;if(x.Ne&&x.Qe){x.o0=this.Rz().rect.x-this.add.vmsk.Rz().rect.x;
x.Vs=this.Rz().rect.y-this.add.vmsk.Rz().rect.y}return x};eM.prototype.kT=function(x,Q){if(i9!=0)return;
if(Q&&this.Rz().bS!=0){Q=Q.clone();var c=Math.round(this.Rz().bS*2.4);Q.ss(c,c)}var $=!1;if(this.add.lsct==hA.oA)return;
var z=this,j=this.Rz()!=null&&this.Rz().ha,U=this.add.vmsk!=null&&this.add.vmsk.ha,i=this.aqo(),b=JSON.stringify(i)!=this.ft.auI||i.Ne&&j||i.Qe&&U;
if(b){if(i.Qe){var e=this.add.vmsk.Rz();if(i.Ne){this.F=this.Rz().Vi(e);this.ft.ar=new bC(this.F.rect.x-this.Rz().rect.x,this.F.rect.y-this.Rz().rect.y)}else this.F=e}if(this.F)$=!0;
if(this.F)this.ft.sU=new bC(this.rect.x-this.F.rect.x,this.rect.y-this.F.rect.y);if(i.Ne)this.Rz().ha=!1;
if(i.Qe)this.add.vmsk.ha=!1;this.c(Q)}else{if(i.Ne&&i.Qe){this.F.rect.x=this.Rz().rect.x+this.ft.ar.x;
this.F.rect.y=this.Rz().rect.y+this.ft.ar.y}}if(z.Z6()){this.om(x)}if(z.nd()){var k;if(this.F)k=new bC(this.rect.x-this.F.rect.x,this.rect.y-this.F.rect.y);
if(this.F&&this.F.isEnabled&&(this.ft.sU==null||!k.HM(this.ft.sU))){this.ft.sU=k;this.c(Q);$=!0}}if(k5.get(z.add)!=null)$=!0;
if($){var K=this.ft.Cd;if(Q&&K&&K!=!0)K=K.iO(Q);else K=Q?Q:!0;this.ft.Cd=K}this.ft.auI=JSON.stringify(i)};
eM.prototype.om=function(x){if(i9!=0)return;var Q=this,c=Q.add.vstk,$=new gh(0,0,x.m,x.e),z,j=Q.add.vmsk?this.add.vmsk.Rz():null,b=!0,K;
if(j&&j.isEnabled&&j.Du()==0)z=j.Pe().clone();else z=$;var U=Q.Rz();if(U&&U.isEnabled&&U.Du()==0)z=z.y_(Q.F.Pe());
var i=j&&c;if(c&&(!c.strokeEnabled.v||c.strokeStyleLineWidth.v.val==0))i=!1;if(c&&!c.fillEnabled.v&&i)b=!1;
var e=d.R(z.P()*4);if(b){if(Q.add.SoCo)en.vq(e,Q.add.SoCo.Clr.v);if(Q.add.GdFl){var k=j&&j.color==0?d.o.sP(Q.add.vmsk.$,null,!0):null;
en.OW(Q.add.GdFl,e,z,x,null,k)}if(Q.add.PtFl)en.nz(Q.add.PtFl,e,z,x.add.Patt,Q.add.fxrp)}if(i)K=aF.XM.xS.indexOf(c.strokeStyleLineAlignment.v.strokeStyleLineAlignment);
if(j){var g=j.f4;if(i)j.f4=255;var R=d.R(z.P());if(j.Du()!=0)R.fill(Math.round(j.Du()));if(j&&j.isEnabled){var T=j.Pe(),D=j.hO();
if(T.HM(z))d.SO(D,R);else d.L2(D,T,R,z)}if(i&&K==2){}else{if(Q.add.SoCo&&b){d.Dm(R,e,3)}else d.Pp(R,z,e,z)}if(i)j.f4=g}Q.buffer=e;
Q.rect=z;if(i){var a=c.strokeStyleContent.v,_=aF.XM.R7.indexOf(a.classID),I=this.add.vmsk.Rz(c);if(K!=0&&!Q.rect.HM($))Q.extend(Q.rect.iO(I.Pe()));
var g=I.f4;I.f4=255;var f=I.EF(Q.rect);I.f4=g;if(I.color==255)d.HQ(f);var y=d.R(Q.rect.P()*4);if(_==0)en.vq(y,a.Clr.v);
if(_==1)en.OW(a,y,Q.rect,x,null,j.color==0?j.rect:null);if(_==2)en.nz(a,y,Q.rect,x.add.Patt,Q.add.fxrp);
var Z=c.strokeStyleOpacity.v.val/100;if(Z!=1)d.AL(f,Z);if(I.color==255)K=2-K;if(K<2){d.l.$A(y,Q.rect,Q.buffer,Q.rect,f,Q.rect,255,Q.rect,1,!1);
if(K==0)d.nb(R,Q.buffer)}if(K==2){d.nb(f,y);d.HQ(R);d.l.$A(y,Q.rect,Q.buffer,Q.rect,R,z,255,Q.rect,1,!1);
d.HQ(R)}if(I.f4!=255){var v=y.slice(0);d.h4(v,4278190080,16777215);d.l.UY("norm",v,Q.rect,Q.buffer,Q.rect,Q.rect,1-I.f4/255)}g=j.f4;
j.f4=255;this.aoq=j.EF(Q.rect);j.f4=g}this.c()};eM.prototype.bx=function(x,Q,c,$){var z=this,j=z.add.SoLd.Idnt.v,U=z.add.SoLd,i=X.Y.e3(U.nonAffineTransform),b=d.A.pA(i),e=x.Td(j,U.Crop?U.Crop.v:null,[b.m,b.e],U.Impr.v.classID,c),I=null;
if(e==null)return;var k=e.iw;U.Sz.v.Wdth.v=k[1].m;U.Sz.v.Hght.v=k[1].e;if(i9!=0)return;var K=e.cQ==null?U.Rslt.v.val:e.cQ,g=U.quiltWarp.v;
if(d.fr.Cu(g))g=null;var R=d.D.u_(i,k[1]);if(g){var b=d.A.pA(d.fr.ES(g)[3]),T=b.x,D=b.y,a=1/b.m,_=1/b.e;
R=d.D.u_(i);R=d.D.Vi(R,[a,0,-T*a,0,_,-D*_,0,0])}if(!Q&&!z.Oz()&&g==null){var f=x.B.indexOf(z),y=eM.zR(z);
for(var F=0;F<f;F++){var Z=x.B[F];if(Z.add.SoLd&&!Z.Oz()&&eM.zR(Z)[0]==y[0]){var v=eM.zR(Z);I={buffer:Z.buffer.slice(0),rect:Z.rect.clone()};
I.rect.offset(Math.round(y[1]-v[1]),Math.round(y[2]-v[2]));break}}}if(I==null)I=X.Y.av(k,Q?0:1,R,g,null,null,null,Q);
if(I==null){z.buffer=d.R();z.rect=new gh}else if(z.Oz()){var G=z.U5(x);if($){G.buffer.fill(0);d.WK(I.buffer,I.rect,G.buffer,G.rect)}else{G.buffer=I.buffer;
G.rect=I.rect.clone()}this.o1(x,Q)}else{z.buffer=I.buffer;z.rect=I.rect}z.kT(x);z.c();x.c()};eM.zR=function(x){var Q=x.add.SoLd,c=Q.Idnt.v,$=X.Y.e3(Q.nonAffineTransform),z=d.D.u_($,new gh(0,0,1e3,1e3)),j=Q.quiltWarp.v;
if(d.fr.Cu(j))j=null;return[[c,z[0],z[1],z[3],z[4],z[6],z[7],j==null].join(":"),z[2],z[5]]};eM.prototype.o1=function(x,Q){if(Q==null)Q=!1;
var c=this.U5(x),$=this.add.SoLd.filterFX.v,z=fK.ajX($),j=new gh(0,0,x.m,x.e),U=c.rect.iO(j),i=c.rect.clone();
i.ss(z.x,z.y);var b={buffer:null,rect:U.y_(i)};b.buffer=d.R(b.rect.P()*4);d.WK(c.buffer,c.rect,b.buffer,b.rect);
if($.enab.v&&Q==!1){var e=$.filterFXList.v;for(var F=0;F<e.length;F++){var k=e[F].v;if(k.enab.v==!1)continue;
var K=k.blendOptions.v,g=cq.Rg(K.Md.v.BlnM),R=K.Opct.v.val/100,T=d.I.Du(k.FrgC.v),D=d.I.Du(k.BckC.v),a=fK.hB(k),_={buffer:d.R(b.buffer.length),rect:b.rect.clone()},I=k.Fltr?k.Fltr.v:null;
if(k5.WZ[a]!=null){var f=k5.WZ[a],y=k5.hd(f,I);if(y)k5.NH(y,b.buffer,_.buffer,b.rect)}else fK.NH(a,b,I,T,D,_,[x.add.lnk2?x.add.lnk2:[],this.Rz(),x.fG]);
if(g=="norm"&&R==1)b=_;else if(g=="norm"){d.l.$A(_.buffer,_.rect,b.buffer,b.rect,null,null,null,b.rect,R)}else{d.l.UY(g,_.buffer,_.rect,b.buffer,b.rect,b.rect,R)}}}this.rect=b.rect;
this.buffer=b.buffer;this.NK();this.c();x.c()};eM.prototype.xn=function(x,Q,c){this.$Q=this.apC(x,Q,c)};
eM.prototype.I0=function(x,Q){var c=this.apC(x,Q,!0);if(c==null)return null;var $={eN:c.kk,aJ:c.YT,rect:c.hX};
if($.eN==1||$.eN==3){var z=$.rect,j=d.R(z.m*z.e*4);d.Dm($.aJ,j,0);d.Dm($.aJ,j,1);d.Dm($.aJ,j,2);d.a58(x.u.channel,x.u.rect,j,z);
$.aJ=j}return $};eM.prototype.apC=function(x,Q,c){var $,z,j,U,i,b,e;if(this.kk<=0){var k=d.R(this.rect.P());
d.GS(this.buffer,k,3);$=d.NE.B2(Q,{channel:k,rect:this.rect},3);if($==null)return null;var K=d.qQ($.channel,$.rect);
U=$.rect.clone();i=this.rect.clone();z=d.R(U.P()*4);d.WK(this.buffer,i,z,U);d.Dm($.channel,z,3);j=this.buffer.slice(0);
if(!c){var g=Q.channel.slice(0);d.HQ(g);d.Pp(g,Q.rect,j,i)}b=this.buffer.slice(0);e=this.rect.clone()}if(this.kk==1||this.kk==3){var R=this.kk==1?this.Rz():this.U5(x).F;
U=Q.rect.clone();i=R.rect.clone();z=R._P(U);var j=R.channel.slice(0);if(!c)d.l.oM(R.color==255?d.JB(U.P()):d.rB(U.P()),U,j,i,Q.channel,U,1);
b=R.channel.slice(0);e=R.rect.clone()}return{kk:this.kk,YT:z,hX:U,LB:j,_U:i,w1:b,jk:e}};eM.prototype.Gw=function(x,Q){var c=this.$Q;
if(c.kk==0){this.rect=c.jk;this.buffer=c.w1;this.c()}if(c.kk==1||c.kk==3){var $=c.kk==1?this.Rz():this.U5(x).F;
$.channel=c.w1;$.rect=c.jk;if(this.kk==1){$.ha=!0;this.kT(x)}if(this.kk==3)this.c()}this.$Q=Q};eM.prototype.jc=function(x,Q){if(this.kk<=0&&Q.rect.HM(this.rect)){var c=d.R(this.rect.P());
d.GS(this.buffer,c,3);if(d.HM(x.u.channel,c)){var $=this.rect,z=this.buffer;this.$Q={kk:this.kk,YT:z.slice(0),hX:$.clone(),LB:d.R(0),_U:new gh,w1:d.R(0),jk:new gh};
return!0}}var j=this.$Q;if(j==null)return!1;if(j.kk!=this.kk)return!1;if(!Q.rect.HM(j.hX))return!1;var U=j._U.iO(j.hX);
if(j.kk<=0){if(!U.HM(this.rect))return!1;var i=d.R(j.YT.length>>2);d.GS(j.YT,i,3);if(!d.HM(Q.channel,i))return!1;
var b=d.R(U.m*U.e*4);d.WK(j.LB,j._U,b,U);d.l.UY("norm",j.YT,j.hX,b,U,U,1);return d.HM(b,this.buffer)}if(j.kk==1||j.kk==3){var e=j.kk==1?this.Rz():this.U5(x).F;
if(!U.HM(e.rect))return!1;var k=d.R(U.P());k.fill(e.color);d.L2(j.LB,j._U,k,U);d.l.oM(j.YT,j.hX,k,U,Q.channel,U,1);
return d.HM(k,e.channel)}};eM.prototype.rI=function(x,Q,c,$){var z=this.$Q;z.hX.offset(Q,c);var j=z._U.iO(z.hX);
if(z.kk<=0){var U=d.R(j.P()*4);d.WK(z.LB,z._U,U,j);d.l.UY("norm",z.YT,z.hX,U,j,j,1);this.buffer=U;this.rect=j;
this.c()}else{var i=this.kk==1?this.Rz():this.U5(x).F,b=d.R(j.P());b.fill(i.color);d.L2(z.LB,z._U,b,j);
d.l.oM(z.YT,z.hX,b,j,$.channel,j,1);i.channel=b;i.rect=j.clone();if(this.kk==1){i.ha=!0;this.kT(x)}if(this.kk==3)this.c()}};
eM.prototype.a3b=function(x){var Q=[-1,0,1,2];if(x)Q.push(3);if(this.F)Q.push(-2);if(this.OE)Q.push(-3);
return Q};eM.prototype.getName=function(){return this.add.luni?this.add.luni:this.name};eM.prototype.gF=function(jF){this.add.luni=this.name=jF};
eM.prototype.cS=function(x){var Q=this.add.lnsr,c=this.add.TySh;if(Q=="rend"&&c){var $=dU.bs(c.HW);this.gF($.slice(0,$.length-1).replace(/(?:\r\n|\r|\n)/g," ").slice(0,32))}};
eM.prototype.M5=function(){return(this.H2&1<<1)==0};eM.prototype.nd=function(){return(this.H2&1<<4)==0};
eM.prototype.lo=function(){return(this.H2&1<<5)!=0};eM.prototype.at5=function(){var x=this;if(x.add.lnsr!="bgnd"){x.add.lnsr="bgnd";
x.gF("Background");x.add.lspf=1<<2}};eM.prototype.axW=function(){var x=this;if(x.add.lnsr=="bgnd"){delete x.add.lnsr;
x.gF("Layer 0");x.add.lspf=0}};eM.prototype.e6=function(x){var Q=this.add.lspf;return Q==null?!1:(Q>>x&1)!=0};
eM.prototype.KW=function(x){if(x&&!this.M5())this.H2-=2;if(!x&&this.M5())this.H2+=2};eM.prototype.g6=function(){var x=this.add.lmfx;
if(x==null)return!1;for(var Q in x){if(Q=="masterFXSwitch")continue;if(Q=="Scl")continue;if(Q=="classID")continue;
if(x[Q].v.length>0)return!0}return!1};eM.prototype.Oz=function(){return this.add.SoLd!=null&&this.add.SoLd.filterFX!=null};
eM.prototype.aD=function(){var x=this.add.lmfx;if(x==null)return!1;if(!x.masterFXSwitch.v)return!1;for(var Q in x){if(Q=="masterFXSwitch")continue;
if(Q=="Scl")continue;if(Q=="classID")continue;var c=x[Q].v;for(var F=0;F<c.length;F++)if(c[F].v.enab.v)return!0}return!1};
eM.prototype.K_=function(){var x=this,Q=x.add.SoLd,c=x.add.TySh,$=x.add.vmsk,z=[];if(Q)z=X.Y.e3(Q.nonAffineTransform);
if(c&&this.ft.os){z=d.A.Hg(x.ft.os).j;d.A.i(z,c.i,z)}if($)z=d.A.Hg($.ag1()).j;return z};eM.prototype.Q8=function(x,Q,c,$){if(i9==1)return d.A.pA(this.K_());
var z=new gh,j=this.AA(x,c,$);if(j.indexOf(0)!=-1)z=z.iO(this.rect);if(j.indexOf(1)!=-1){var U=this.Rz(),i=U.Pe();
z=c&&U.Du()==0?z._6()?i:z.y_(i):z.iO(i)}if(j.indexOf(2)!=-1){var b=this.add.vmsk,e=this.add.vstk,k;if(Q){if(b.xf.length>1){var K=d.o.Mn(b.$,null,b.xf);
k=d.A.pA(K);if(k._6())k=null}if(k==null)k=d.o.sP(b.$,b.g.length!=0?b.g:null)}else k=d.o.sP(b.$);if(!$&&e&&e.strokeEnabled.v){var g=e.strokeStyleLineAlignment.v.strokeStyleLineAlignment,R=e.strokeStyleLineJoinType.v.strokeStyleLineJoinType;
if(g!="strokeStyleAlignInside"){var T=e.strokeStyleLineWidth.v.val;if(R=="strokeStyleMiterJoin")k=new gh(0,0,x.m,x.e);
else k.ss(T,T)}}z=z.iO(k)}if(j.indexOf(3)!=-1)z=z.iO(this.U5(x).F.Pe());if(j.length==0&&this.Z6())z=$?new gh(0,0,0,0):new gh(0,0,x.m,x.e);
return z};eM.prototype.LM=function(){var x=this.add.artb,Q=x.artboardBackgroundType.v,c=0;if(Q==1)c=4294967295;
else if(Q==2)c=4278190080;else if(Q==3)c=0;else if(Q==4){c=x.Clr.v;c=255<<24|c.Bl.v<<16|c.Grn.v<<8|c.Rd.v}else throw Q;
return c};eM.prototype.Dd=function(){var x=this.add.artb.artboardRect.v,Q=x.Btom.v,c=x.Left.v,$=x.Rght.v,top=x.Top.v;
return new gh(c,top,$-c,Q-top)};eM.prototype.Zp=function(x){var Q=eM.YF(x);if(this.add.artb==null)this.add.artb={classID:"artboard",artboardRect:{t:"Objc",v:null},artboardBackgroundType:{t:"long",v:1}};
this.add.artb.artboardRect.v=Q};eM.YF=function(x){var Q={classID:"classFloatRect",Top:{t:"doub",v:0},Left:{t:"doub",v:0},Btom:{t:"doub",v:0},Rght:{t:"doub",v:0}};
Q.Btom.v=x.y+x.e;Q.Left.v=x.x;Q.Rght.v=x.x+x.m;Q.Top.v=x.y;return Q};eM.prototype.AA=function(x,Q,c){var $=[],z=this;
if(!Q&&z.Et&&c){$.push(2)}else if(z.kk<=0||Q){if(z.nd()){if(i9==1&&z.add.TySh)$.push(0);if(i9==1&&z.add.SoLd)$.push(0);
else if(!this.rect._6()||z.add.SoLd)$.push(0)}if(z.Rz()&&!z.Rz().rect._6())if(z.Rz().uz||Q)$.push(1);
if(z.add.vmsk)if(z.add.vmsk.uz||Q)$.push(2);if(z.Oz()&&z.U5(x).F&&!z.U5(x).F.rect._6())$.push(3)}else if(z.kk==1){$.push(1);
if(z.Rz().uz&&!z.Rz().rect._6()){if(z.nd())if(!this.rect._6())$.push(0);if(z.add.vmsk)if(z.add.vmsk.uz)$.push(2)}}else if(z.kk==3&&!z.U5(x).F.rect._6())$.push(3);
if(z.add.artb&&$.indexOf(0)==-1)$.push(0);$.sort();return $};eM.prototype.Rz=function(){var x=this;return x.OE?x.OE:x.add.vmsk&&x.add.vmsk.isEnabled?null:x.F};
eM.prototype.U5=function(x){var Q=this.add.SoLd.placed.v,c=x.add.FEid;if(c==null)return null;for(var F=0;
F<c.length;F++)if(c[F].id==Q)return c[F];return null};eM.prototype.extend=function(x){d.asG(this,x)};
eM.prototype.a4p=function(x,Q,c){var $=x.clone();if(this.aD()){var z=this.add.lmfx,j=Q.root.FV(Q.B.indexOf(this)),U=z.gradientFillMulti.v,i=!1;
for(var F=0;F<U.length;F++)if(U[F].v.enab.v&&U[F].v.Algn.v)i=!0;if(i)$=$.iO(j.Pe(Q,!1));var b=en.a02(this.add.lmfx,Q,c);
$.offset(b.x,b.y);$.m+=b.m;$.e+=b.e}return $};eM.prototype.NK=function(){if(this.nd())d.HT(this);var x=this.Rz();
if(x)x.NK()};eM.prototype.clone=function(){var x=new eM;x.rect=this.rect.clone();x.buffer=this.buffer.slice(0);
x.s3=this.s3;x.opacity=this.opacity;x.cG=this.cG;x.H2=this.H2;x.name=this.name;x.uJ=this.uJ.slice(0);
if(this.F)x.F=this.F.clone();if(this.OE)x.OE=this.OE.clone();for(var Q in this.add)x.add[Q]=hz.clone(Q,this.add[Q]);
return x};eM.prototype.pZ=function(x){var Q=this;if(Q.add.TySh)delete Q.add.TySh;if(Q.add.SoLd){var c=this.Ja(x,this.buffer,this.rect);
if(c){this.buffer=c.AX;this.rect=c.rect;this.c()}delete Q.add.SoLd}if(Q.add.SoCo||Q.add.GdFl||Q.add.PtFl){if(Q.add.vogk)delete Q.add.vogk;
if(Q.add.SoCo)delete Q.add.SoCo;if(Q.add.GdFl)delete Q.add.GdFl;if(Q.add.PtFl)delete Q.add.PtFl;if(Q.add.vmsk){console.log(Q.OE,Q.F);
delete Q.add.vmsk;if(Q.OE==null&&Q.F)delete Q.F;else if(Q.OE!=null&&Q.F!=null){Q.F=Q.OE;delete Q.OE}}}if(!Q.Uy()&&k5.get(Q.add)==null&&!this.nd())this.H2-=16};
eM.prototype.qq=function(x){var Q=255,c=0;if(x==2){var $=this.add.SoLd.filterFX.v;if($.filterMaskDensity)Q=$.filterMaskDensity.v;
if($.filterMaskFeather)c=$.filterMaskFeather.v}else{var z=x==0?this.Rz():this.add.vmsk;Q=z.f4;c=z.bS}return{G$:x,Vn:Q,k1:c}};
eM.prototype.any=function(x){if(x.G$==2){var Q=this.add.SoLd.filterFX.v;if(x.Vn==255)delete Q.filterMaskDensity;
else Q.filterMaskDensity={t:"long",v:x.Vn};if(x.k1==0)delete Q.filterMaskFeather;else Q.filterMaskFeather={t:"doub",v:x.k1};
this.c()}else{var c=x.G$==0?this.Rz():this.add.vmsk;c.f4=x.Vn;c.bS=x.k1;c.ha=!0}};eM.prototype.jz=function(){var x=this,Q=x.add.vmsk;
if(Q==null)return;x.add.vogk=d.eV.asl(Q.$)};eM.jz=function(x){var Q=[],c=d.o.WV(x);for(var $=0;$<c;$++)Q.push(d.eV.rB());
return Q};var hA={g$:0,DJ:1,H3:2,oA:3};eM.zM=function(){this.name="Mask";this.fd=!1;this.aW={Z:255,r:0,J:0};
this.Fr=50;this.Iz=0;this.color=255;this.uz=!0;this.isEnabled=!0;this.aV=!1;this.f4=255;this.bS=0;this.rect=new gh;
this.channel=d.R(0);this.kA=null;this.a94=null;this.ha=!0};eM.zM.prototype.Vi=function(x){if(!this.isEnabled)return x;
var Q=new eM.zM;Q.color=Math.round(this.Du()*x.Du()/255);if(this.Du()==0&&x.Du()==0)Q.rect=this.Pe().y_(x.Pe());
else if(x.Du()==0)Q.rect=x.Pe().clone();else if(this.Du()==0)Q.rect=this.Pe().clone();else Q.rect=this.Pe().iO(x.Pe());
Q.channel=this.EF(Q.rect);Q.f4=255;Q.bS=0;var c=x.EF(Q.rect);d.am9(c,Q.rect,Q.channel,Q.rect);return Q};
eM.zM.prototype.Pe=function(){if(this.bS==0)return this.rect;var x=Math.ceil(this.bS*2.2),Q=this.rect.clone();
if(Q.y==0){if(Q.x==0)Q.m+=x;else Q.ss(x,0);Q.e+=x}else Q.ss(x,x);return Q};eM.zM.prototype.hO=function(){if(this.bS==0&&this.f4==255)return this.channel;
if(this.bS==0){var x=this.channel.slice(0);d.HQ(x);d.AL(x,this.f4/255);d.HQ(x);return x}var Q=this.Pe(),c=this._P(Q),x=d.R(Q.P());
d.yg.ZA(c,x,Q,this.bS);if(this.f4!=255){d.HQ(x);d.AL(x,this.f4/255);d.HQ(x)}return x};eM.zM.prototype.Du=function(){return Math.round(255-(255-this.color)*(this.f4/255))};
eM.zM.prototype.extend=function(x){d.extend(this,x,this.color)};eM.zM.prototype.NK=function(){if(this.color==255)d.HQ(this.channel);
d.NK(this);if(this.color==255)d.HQ(this.channel)};eM.zM.prototype.clone=function(){var x=new eM.zM;x.name=this.name;
x.fd=this.fd;x.aW=this.aW;x.Fr=this.Fr;x.Iz=this.Iz;x.color=this.color;x.uz=this.uz;x.isEnabled=this.isEnabled;
x.aV=this.aV;x.f4=this.f4;x.bS=this.bS;x.rect=this.rect.clone();x.channel=this.channel.slice(0);return x};
eM.zM.prototype._P=function(x,Q){if(Q==null)Q=d.R(x.P());Q.fill(this.color);d.L2(this.channel,this.rect,Q,x);
return Q};eM.zM.prototype.EF=function(x,Q){var c=this.Pe(),$=this.hO();if(Q==null)Q=d.R(x.P());Q.fill(this.Du());
d.L2($,c,Q,x);return Q};eM.hn=function(){this.uz=!0;this.isEnabled=!0;this.f4=255;this.bS=0;this.ir=0;
this.Kp=0;this.$=[{type:6},{type:8,all:0}];this.Sr=[-3,-3];this.$S=!1;this.OE=null;this.ha=!0;this.g=[];
this.xf=[]};eM.hn.prototype.ag1=function(x){var Q=eM.hn.gG(this.$),c=new bI;if(x)c.rotate(-this.ir);
d.o.Of(Q,c);return d.o.sP(Q)};eM.hn.prototype.auh=function(){var x=this.ag1(!0),Q=d.A.Hg(x).j,c=new bI;
c.rotate(this.ir);d.A.i(Q,c,Q);return Q};eM.hn.prototype.offset=function(x,Q){this.OE=this.Rz();d.o.Of(this.$,new bI(1,0,0,1,x,Q));
this.OE.rect.offset(x,Q)};eM.hn.prototype.Rz=function(x){if(!this.ha&&this.OE&&x==null){this.OE.isEnabled=this.isEnabled;
return this.OE}var Q=d.o.sP(this.$),c="strokeStyleLineAlignment",$="strokeStyleLineJoinType";if(Q.P()>2e4*2e4)Q=new gh(0,0,100,100);
if(x&&x[c].v[c]!="strokeStyleAlignInside"){var z=1;if(x[$].v[$]=="strokeStyleMiterJoin"){var j=d.o.adL(this.$),U=j/2,i=Math.sin(U),b=Math.cos(U);
b/=i;i=1;var z=Math.sqrt(b*b+i*i);if(isNaN(z)||z<1)z=1}z*=x[c].v[c]=="strokeStyleAlignOutside"?1:.5;
var e=Math.ceil(x.strokeStyleLineWidth.v.val*z);e=Math.min(e,600);Q.ss(e,e)}Q=d.A.Yc(Q);var k=new eM.zM;
k.color=d.o.Qx(this.$)?0:255;k.uz=this.uz;k.isEnabled=this.isEnabled;k.aV=!0;k.rect=Q;k.f4=this.f4;k.bS=this.bS;
k.channel=d.R(k.rect.P());if(!Q._6())d.o.ahw(this.$,k.channel,k.rect,x);if(x==null){this.OE=k;this.ha=!1}return k};
eM.hn.prototype.clone=function(){var x=new eM.hn;x.uz=this.uz;x.isEnabled=this.isEnabled;x.f4=this.f4;
x.bS=this.bS;x.ir=this.ir;x.$=eM.hn.gG(this.$);x.Sr=this.Sr.slice(0);x.$S=this.$S;x.g=this.g.slice(0);
x.xf=this.xf.slice(0);return x};eM.hn.prototype.concat=function(x){var Q=x.$.slice(2);if(Q.length==0)return;
Q[0].Kp=3;this.$=this.$.concat(Q)};eM.hn.gG=function(x){var Q=[];for(var F=0;F<x.length;F++){var c=x[F];
if(c.type>5||c.type==0||c.type==3)Q.push(JSON.parse(JSON.stringify(c)));else Q.push({type:c.type,Hw:c.Hw.clone(),L:c.L.clone(),Im:c.Im.clone()})}return Q};
eM.hn.auW=function(x,Q,c){if(x.length!=Q.length)return!1;for(var F=2;F<x.length;F++){var $=x[F],z=Q[F];
if($.type!=z.type)return!1;if($.type==0||$.type==3){if($.length!=z.length||!c&&$.Kp!=z.Kp)return!1}else if(!$.Hw.HM(z.Hw)||!$.L.HM(z.L)||!$.Im.HM(z.Im))return!1}return!0};
eM.hn.prototype.a0u=function(){var x=this.$;for(var F=3;F<x.length;F++)if(x[F].type==0||x[F].type==3)x[F].Kp=-1};
eM.kY=function(){this.type=null;this.WJ=2;this.P6=null;this.uo="";this.bf="";this.eD="";this.open=0;
this.raw=null;this.iw=null;this.aqU="";this.RS=!1};eM.kY.prototype.clone=function(){var x=new eM.kY;
x.type=this.type;x.WJ=this.WJ;x.P6=this.P6;x.uo=this.uo;x.bf=this.bf;x.eD=this.eD;x.open=this.open;x.raw=new Uint8Array(this.raw.buffer.slice(0));
return x};eM.kY.prototype.VY=function(x,Q,c,$,z){if(c==null)c="none";var j=this,U=ar.HB(j.raw.buffer),i=U=="svg"||U=="pdf"||U=="ai";
if(j.iw){var b=Q&&i&&Math.max(j.iw[1].m,j.iw[1].e)<Math.max(Q[0],Q[1]);if(!b&&c==this.aqU&&!j.RS)return}this.aqU=c;
if(!i)x=0;if(U==null){alert("Unsupported format: "+w.mt(j.raw,0,4));return null}var e=ar.pz(U);if(e.f6){var k=new hf(name+(U=="psd"?"":"-"+U)+".psd"),K;
e.fk(j.raw.buffer,k,Q);var g=new gh(0,0,k.m,k.e);if("avrg maxx medn minn rang stdv summ vari".split(" ").indexOf(c)!=-1){var R=[];
for(var F=0;F<k.B.length;F++){var T=k.B[F],D=T.buffer;if(!T.rect.HM(g)){D=d.R(g.P()*4);d.WK(T.buffer,T.rect,D,g);
console.log("resizing")}R.push(D)}K=d.R(g.P()*4);d.stack.stack(R,K,c)}else{for(var F=0;F<k.B.length;
F++)if(k.B[F].Z6())k.B[F].kT(k);if($&&k.RS){var a=aE.R6(k,$,z);j.RS=!a;if(a)aE.kM(k,$,z)}k.jf();k.c();
k.eB();K=k.VY()}j.iw=[K,g];j.cQ=k.cQ!=null&&k.cQ!=0?k.cQ:72}else if(e){var _=e.fk(j.raw.buffer)[0];j.iw=[new Uint8Array(_.data),_.K$];
j.cQ=_.cQ!=null&&_.cQ!=0?_.cQ:72}if(j.iw){if(x==1){var D=j.iw[0],I=j.iw[1],f=d.R(I.P());d.GS(D,f,3);
var y=d.qQ(f,I),Z=d.R(y.P()*4);d.WK(D,I,Z,y);y.x=y.y=0;j.iw=[Z,y]}d.gk(j.iw)}};eM.DN="0";eM.bU="2";eM.v6="2.5";
eM.wN="2.6";eM.rQ="3";eM.aY="4";eM.Z3="4.5";eM.a3L="4.6";eM.aCS="5";eM.NJ="5.5";eM.TQ="6";eM.aBQ="7";
eM.a5w="8";eM.TJ="9";eM.Ev="9.3";eM.a9Y="9.5";eM.mn="9.6";eM.wr="10";eM.TK="11";eM.mS="12";eM.zP="13";
eM.zb="13.1";eM.a7W="13.2";eM.Bc="13.3";eM.tW="13.4";eM.Vo="14";eM.T7="14.1";eM.Gu="14.2";eM.ld="14.3";
eM.$R="17";eM.YL="18";eM.axR="19";eM.on="19.5";eM.Rd="19.6";eM.MU="19.7";eM.gh="19.8";eM.BT="20";eM.ML="21";
eM.HC="21.5";eM.tZ="22";eM._$="22.5";eM.Ul="23";eM.aE3="24";eM.zp="25";eM.a0A="26";eM.awR="27";eM.sJ="28";
eM.IB="29";eM.nK="30";eM.DF="31";eM.Hx="32";eM.jK="33";eM.PX="34";eM.Ap="35";eM.Eg="36";eM.E1="36.5";
eM.xt="37";eM.qz="37.5";eM.aBU="37.6";eM.ZH="38";eM.iz="38.5";eM.yp="38.6";eM.ty="39";eM.rb="40";eM.ax9="41";
eM.DP="42";eM.l9="50";eM.z6="51";eM.XE="52";eM.aq="53";eM.Hy="54";eM.aw8="54.5";eM.nq="54.6";eM.akX="54.7";
eM.JY="54.8";eM.KE="55";eM.Ob="56";eM.ly="57";eM._3="58";eM.tA="59";eM.sm="60";function bb(){this.depth=0;
this.index=-1;this.a=null;this.aA5=null;this.G5=-1;this.children=null;this.parent=null;this.y8=null}bb.prototype.aAp=function(x,Q){if(this.depth!=0)x.push(this.a.getName());
if(this.children)for(var F=0;F<this.children.length;F++)this.children[F].aAp(x,Q);if(x.length>Q._B.length)Q._B=x.slice(0);
if(this.depth!=0)x.pop()};bb.prototype.arY=function(){var x=0;if(this.a.Uy()){for(var F=0;F<this.children.length;
F++)x+=this.children[F].arY()}else if(this.a.buffer)x+=this.a.buffer.length;return x};bb.prototype.FV=function(x){var Q=this.y8[x];
return this.y8[x]};bb.prototype.a7A=function(x,Q){var c=this.a;if(!c.M5()||c.e6(2)||c.e6(31))return null;
if(c.ZC()){var $=c.F.rect.dM(x);if(!$&&c.F.color==0)return}if(c.Uy()){for(var F=0;F<this.children.length;
F++){var jF=this.children[F];jF.a7A(x,Q)}}else if(i9==1){var z=c.K_();if(x.dM(d.A.pA(z))&&Q.indexOf(this.index)==-1)Q.push(this.index)}else if(c.rect.dM(x))Q.push(this.index)};
bb.prototype.e$=function(x,Q){var c=this.a;if(!c.M5()||c.e6(2)||c.e6(31))return null;if(c.ZC()){if(c.F.rect.Wl(x)){if(!d.e$(x,c.F.channel,c.F.rect))return null}else if(c.F.color==0)return null}if(c.Uy()){if(c.add.artb&&!c.Dd().Wl(x))return null;
for(var F=this.children.length-1;F>=0;F--){var jF=this.children[F],$=jF.e$(x,Q);if($&&Q==null)return $}return null}else if(i9==1){if(c.add.vmsk){var z=c.add.vstk,j=!z.fillEnabled.v&&!c.Qc,U=z.strokeStyleLineWidth.v.val*.5,i=d.o.e$(c.add.vmsk.$,x,j,U);
return i.xR==-1?null:this}var b=c.K_();if(iw.LW(b,x.x,x.y))return this}else if(c.add.TySh&&c.rect.Wl(x)||d.anO(x,c.buffer,c.rect)){if(Q==null)return this;
else Q.push(this.index)}return null};bb.prototype.apD=function(x){var Q=this.a;if(!Q.M5()||Q.e6(2)||Q.e6(31))return null;
var c=Q.add.vmsk;if(c&&c.isEnabled){var $=d.o.e$(c.$,x).xR;if($!=-1)return{aqL:this,adf:$}}if(Q.Uy()){if(Q.add.artb&&!Q.Dd().Wl(x))return null;
for(var F=this.children.length-1;F>=0;F--){var jF=this.children[F],z=jF.apD(x);if(z)return z}return null}return null};
bb.prototype.ze=function(x,Q){x.push(this.index);if(this.a.Uy()){x.push(this.G5);if(Q)if(this.a.kk==1&&this.a.Rz().uz==!1)return;
for(var F=0;F<this.children.length;F++)this.children[F].ze(x)}};bb.Kv=function(){var x=document.createElement("canvas");
return x.getContext("2d")};bb.a3Q=function(x,Q){var c,$;if(x.m>x.e){c=Q;$=Math.floor(Q*(x.e/x.m))}else{c=Math.floor(Q*(x.m/x.e));
$=Q}return new bC(c,$)};bb.$Z=32;bb.mx=1;bb.prototype.Zh=function(x,Q,c){var $=bb.mx,z=this.a;if(z.Uy()&&z.add.artb!=null)Q=z.Dd();
var j=$==0?z.rect:Q;if(j._6()||z.add.TySh)j=Q;var U=bb.$Z*X.q_(),i=bb.a3Q(j,U),b=i.x,e=i.y,k=bb.a3Q(Q,U);
if(z.Z6()&&z.add.vmsk==null||z.add.TySh)b=e=Math.max(e,16);else if(z.Uy()){b=e=Math.round(18*X.q_())}else{b=Math.max(b,6);
e=Math.max(e,6)}if(c&&z.GY==null){z.GY=bb.Kv();z.in=bb.Kv();z.wD=bb.Kv();z.Zv=bb.Kv()}var K=z.Z6()&&z.add.vmsk;
if(K){if(c&&z.add.vstk)d.k5.PO(z.GY,b,e,j,z.buffer,z.rect,!1,null,!z.add.vstk.fillEnabled.v&&!z.add.vstk.strokeEnabled.v);
if(c)d.k5.a0m(z.GY,b,e)}else if(z.add.TySh){if(c)d.k5.aoe(z.GY,e,e,z.add.TySh)}else if(z.add.SoCo){if(c)d.k5.a8A(z.GY,e,e,z.add.SoCo)}else if(z.add.GdFl){if(c)d.k5.aps(z.GY,e,e,z.add.GdFl)}else if(z.add.PtFl){if(c)d.k5.apM(z.GY,e,e,z.add.PtFl,x)}else if(k5.get(z.add)!=null){if(c)d.k5.av4(z.GY,e,e,z.add)}else if(z.add.SoLd){if(c)d.k5.PO(z.GY,b,e,j,z.buffer,z.rect,!1);
if(c)d.k5.asi(z.GY,b,e,z.add.SoLd)}else if(z.Uy()){}else{if(c){if(z.nd())d.k5.PO(z.GY,b,e,j,z.buffer,z.rect,!1);
else{d.k5.ail(z.GY,e,e)}}}var g=z.Rz();if(c){if(g)d.k5.wI(z.in,k.x,k.y,Q,g);if(z.Oz()&&z.U5(x)&&z.U5(x).F){var R=z.U5(x).F;
d.k5.wI(z.Zv,k.x,k.y,Q,R)}if(!K&&z.add.vmsk){d.k5.wI(z.wD,k.x,k.y,Q,z.add.vmsk.Rz(),!0)}}if(g||z.add.vmsk)e=Math.max(e,k.y);
z.aiA=Math.max(e,16);if(c!=!0&&z.Uy()&&(z.add.lsct==hA.DJ||x.B.length<4e3))for(var F=0;F<this.children.length;
F++)this.children[F].Zh(x,Q)};bb.prototype.as$=function(x,Q,c,$){this.depth=c;var z=x[Q];if($==null)$=[];
this.y8=$;if(z.add.lsct==hA.oA){this.aA5=z;this.G5=Q-1;this.children=[];var F=Q+1;while(!0){var j=x[F];
if(j==null)console.log(F,x.length);if(j.add.lsct==hA.DJ||j.add.lsct==hA.H3){if(z.add.lyid==j.add.lyid)z.add.lyid+=16777215;
this.a=j;this.index=F-1;$[this.index]=this;$[Q-1]=this;break}var U=new bb;U.parent=this;F=U.as$(x,F,c+1,$);
this.children.push(U)}return F+1}else{this.a=z;this.index=Q-1;$[this.index]=this;return Q+1}};bb.prototype.XW=function(x,Q,c,$){var z=this.FV(c),j=x;
while(z.parent!=null){j=z.a.a4p(j,Q,$);z=z.parent}return j};bb.prototype.Pe=function(x,Q){var c=this.a,$=new gh;
if(!c.M5())return $;var z=c.Rz();if(c.Uy())for(var F=0;F<this.children.length;F++){var j=this.children[F].Pe(x,!0);
$=$.iO(j)}else if(k5.get(c.add)!=null)$=c.ZC()&&c.F.color==0?c.F.Pe().clone():new gh(0,0,x.m,x.e);else if(c.Z6()&&c.add.vmsk&&c.add.vmsk.isEnabled&&c.add.vstk){$=c.rect.clone()}else if(c.Z6()&&z&&z.isEnabled&&z.Du()!=0)$=new gh(0,0,x.m,x.e);
else{$=c.Q8(x,!1,!0);if(c.add.vmsk)$=d.A.Yc($)}return Q?c.a4p($,x):$};bb.q3={delete:function(x){if(x&&x.m)x.delete()},R:function(x,Q){return eV.Mx?new eV.PT(x,Q):d.R(x*Q*4)},qu:function(x,Q,c){if(eV.Mx){if(x==null||x.m!=Q||x.e!=c){bb.q3.delete(x);
return new eV.PT(Q,c)}}else{if(x==null||!(x instanceof Uint8Array)||x.length!=Q*c*4){bb.q3.delete(x);
return d.R(Q*c*4)}}return x},L2:function(x,Q,c,$,z){(eV.Mx?eV.zJ:d.WK)(x,Q,c,$,z)},$A:function(x,Q,c,$,z,j,U,i,F,b,e){(eV.Mx?eV.l.ND:d.l.$A)(x,Q,c,$,z,j,U,i,F,b,e)},aqV:function(x,Q,c,$,z,j,U,i){var b=c.clone(),e=z.m,k=z.e,K=b.x,g=b.y,R=b.x+b.m>e?-1:0,T=b.x<0?2:1,D=b.y+b.e>k?-1:0,a=b.y<0?2:1;
for(var _=D;_<a;_++)for(var I=R;I<T;I++){b.x=K+I*e;b.y=g+_*k;bb.q3.UY(x,Q,b,$,z,j,U,i)}},UY:function(x,Q,c,$,z,j,U,i){if(eV.Mx)eV.l.agw(x,Q,c,$,z,j,U,i);
else d.l.UY(x,Q,c,$,z,j,U,i)},h4:function(x,Q,c){if(eV.Mx){eV.qk(x);eV.sN(Q,c)}else d.h4(x,Q,c)},agJ:function(x,Q,c,$,z){if(eV.Mx){eV.l.ND(null,null,$,z,x,Q,c,z,1,!1)}else{if(c==255)d.Pp(x,Q,$,z);
else{var j=d.R(Q.P());d.df($,z,j,Q);d.Tt(x,j);d.h4($,0,16777215);d.a58(j,Q,$,z)}}},$V:function(x,Q,c,$){if(eV.Mx)eV.l.ND(null,null,c,$,x,Q,0,$,1,!1);
else d.$V(x,Q,c,$)}};bb.prototype.v8=function(x,Q,c,$,z,j){var U=typeof j=="number";if(!this.a.Uy()&&(U&&this.index>j||!U&&j.indexOf(this.index)==-1)){return}var i=this.a,b=en.h6(i),e=bb.q3,k=i.Z6()?i.Rz():i.F;
if(!i.M5())return;if(i.ZC()&&k.rect._6()&&k.Du()==0){return}if(i.add.vstk==null&&this.Pe($,!1)._6()){return}if(i.Z6()&&i.rect._6())return;
var K=this.Pe($,!0).y_(c);if(!Q.HM(c)&&!c.dM(K))return;if(i.Uy()&&i.add.artb){var g=i.Dd();c=c.y_(g)}var R=bb.ayf(i,z,b);
if(!R){this.alB(x,Q,c,$,z,j);return}i.ft.Pd=e.qu(i.ft.Pd,K.m,K.e);e.L2(x,Q,i.ft.Pd,K,c);this.alB(i.ft.Pd,K,c,$,z,j);
e.$A(i.ft.Pd,K,x,Q,null,null,0,c,i.opacity/255,i.s3=="diss",b.Od)};bb.ayf=function(x,Q,c){if(c.Od[0]*c.Od[1]*c.Od[2]==0)return!0;
return x.opacity!=255&&(Q.length!=0||x.Uy()||x.aD())};bb.aBL={ft:{}};bb.prototype.alB=function(x,Q,c,$,z,j){var U=this.a,i=en.h6(U),b=k5.get(U.add)!=null,e=bb.q3,k=bb.ayf(U,z,i),K=k?1:U.opacity/255,g=U.Z6()?U.Rz():U.F,R=U.Uy()&&i.lf==null&&(U.s3=="pass"||U.add.artb)&&!(z.length>0||i.fill!=1||U.aD()),T=!U.Uy()&&!b&&!U.aD()&&z.length==0,D=b&&!U.aD()&&z.length==0,Z=null,v=null,G=null,o;
if(R||T||D){var a=x,_=Q;if(U.ZC()){_=this.Pe($,!1);a=U.ft.ET=e.qu(U.ft.ET,_.m,_.e);e.L2(x,Q,U.ft.ET,_)}if(R)this.s4(a,_,c,$,j);
if(T)e.UY(U.s3,U.auP($),U.rect,a,_,c,K,i);if(D){var I=U.ZC()&&g.Du()==0?g.Pe().clone():_.clone(),f=U.ft;
if(I.HM(new gh(0,0,$.m,$.e)))f=bb.aBL;f.CV=this.aq6(a,_,f.CV,I,U.add);i.N9=!0;e.UY(U.s3,f.CV,I,a,_,c,K,i)}if(U.ZC())e.$A(a,_,x,Q,U.af9(),g.Pe(),g.Du(),c,1,U.s3=="diss");
U.ft.aCM();return}var y=U.Uy()&&U.s3=="pass"&&(z.length>0||i.fill!=1||U.aD()),I=U.rect;if(U.Uy()){I=this.Pe($,!1);
G=U.ft.CV=e.qu(U.ft.CV,I.m,I.e);e.h4(G,0);this.s4(G,I,I,$,j);v=e.qu(U.ft.rP,I.m,I.e);e.L2(G,I,v,I)}else if(b){I=U.ZC()&&g.Du()==0?g.Pe().clone():Q.clone();
v=e.qu(U.ft.rP,I.m,I.e);e.h4(v,4294967295)}else{I=U.rect;Z=U.auP($);v=e.qu(U.ft.rP,I.m,I.e);e.L2(Z,I,v,I)}U.ft.rP=v;
if(U.ZC())e.agJ(U.af9(),g.Pe(),g.Du(),v,I);if(U.aD())if(U.ft.NC||U.ft.JP||U.ft.Sg!=eV.Mx||U.ft.Cd||U.Uy()){var q=U.add.vmsk,h=d.R(I.P());
if(en.anJ(U.add.lmfx)){if(eV.Mx){if(!U.Uy()&&U.Rz()==null&&U.rect.HM(I)&&q==null)d.GS(U.buffer,h,3);
else{var r=d.R(I.P()*4);v.get(r);d.GS(r,h,3)}}else d.GS(v,h,3)}if(U.ft.JP||U.ft.Sg!=eV.Mx||!d.HM(h,U.ft.My)){var H=null;
if(U.Z6()&&q&&q.isEnabled&&q.Rz().color==0)H=q.Rz().rect;en.arR(U.ft.Xe);U.ft.Xe=en.a9A(h,I,U.add.lmfx,U.add.fxrp,$,H);
U.ft.My=h;U.ft.a9i=I}}if(U.aD())en.a3z(U.add.lmfx,U.ft.Xe,I,x,Q,c);if(U.Uy()){Z=e.qu(U.ft.ET,I.m,I.e);
e.h4(Z,0);if(U.s3=="pass")e.L2(x,Q,Z,I);if(y)e.$V(G,I,Z,I);this.s4(Z,I,c,$,j);U.ft.ET=Z}if(b){Z=U.ft.ET=this.aq6(x,Q,U.ft.ET,I,U.add)}if(U.Uy()||b)o=Z;
else{o=e.qu(U.ft.ET,I.m,I.e);e.L2(Z,I,o,I,c);U.ft.ET=o}e.h4(o,4278190080,16777215);for(var F=0;F<z.length;
F++)z[F].v8(o,I,c,$,[],j);var P=U.ft.i3=e.qu(U.ft.i3,I.m,I.e);e.L2(x,Q,P,I,c);if(b)i.N9=!0;e.UY(U.s3=="pass"?"norm":U.s3,o,I,P,I,c,1,i);
if(U.aD()){var O=U.ft.Xe.type.FrFX,p=null;if(O.length!=0){p=O[0];for(var F=0;F<O.length;F++)if(O[F].Jj.m>p.Jj.m)p=O[F];
U.ft.lP=e.qu(U.ft.lP,p.Jj.m,p.Jj.e);e.L2(x,Q,U.ft.lP,p.Jj,c);U.ft.iG=e.qu(U.ft.iG,p.Jj.m,p.Jj.e)}en.anN(U.add.lmfx,U.ft.Xe,I,x,Q,c,P,U.ft.lP,U.ft.iG,p?p.Jj:null)}if(!eV.Mx){var C=d.R(I.P());
d.GS(v,C,3);v=C}e.$A(P,I,x,Q,v,I,0,c,1,U.s3=="diss");U.ft.aCM()};bb.prototype.aq6=function(x,Q,c,$,z){var j=k5.get(z),U;
if(j)U=k5.hd(j,z[j]);var i=bb.q3;c=i.qu(c,$.m,$.e);if(!(eV.Mx&&Q.HM($)))i.L2(x,Q,c,$);if(U){if(eV.Mx){var b=$.clone();
b.x=b.y=0;if(Q.HM($)){eV.qk(c,b);k5.NP(U,x.cm,b)}else{eV.qk(c,$);c.Zw($);k5.NP(U,c.xY,b)}}else k5.NH(U,c,c,$)}return c};
bb.prototype.s4=function(x,Q,c,$,z){var j=Q.m,U=Q.e,i=Q.x,b=Q.y,jF=c,e=jF.x,k=jF.y,K=-1,g=-1,R=2,T=2;
if(!$.d6){K=g=0;R=T=1}var D=this.children;for(var F=0;F<D.length;F++){var a=k5.get(D[F].a.add)!=null,_=[];
for(var I=F+1;I<D.length;I++)if(D[I].a.cG)_.push(D[I]);else break;for(var f=g;f<T;f++)for(var y=K;y<R;
y++){Q.x=i+y*j;Q.y=b+f*U;jF.x=e+y*j;jF.y=k+f*U;if((y!=0||f!=0)&&a)continue;D[F].v8(x,Q,jF,$,_,z)}F+=_.length}Q.x=i;
Q.y=b;jF.x=e;jF.y=k};function hf(x){this.ml="psd";this.lO=!1;this.name=x;this.ud=-1;this.d6=!1;this._g=null;
this.No=null;this.QJ=null;this.uA=null;this.m=0;this.e=0;this.buffer=null;this.B=[];this.Q_={};this.add={};
this.Vv=[];this.IC={};this.FN=4;this.Fm=null;this.cQ=72;this.hD={};this.g=[];this.Bo=[];this.l2=!1;this.p9=[];
this.wE=[];this.iL=[hf._S("Work Path")];this.IH=[];this.ZQ=null;this.A2={classID:"CompList",list:{t:"VlLs",v:[]}};
this.rs=[];this.vB=[];this.x8=[];this.root=null;this.UR=null;this.RS=!1;this.aCC=!1;this.a9E=!1;this.Dl=!1;
this.ox=!1;this.vu=!1;this.Fq=!1;this.tP=!1;this.uH=!1;this.Rr=!1;this.NC=null;this.MI=null;this.u=null;
this.fG=[];this.oW=[];this.N={oa:{},SE:[],ai:[],AB:[],_V:[],Je:[],LV:null,hJ:null,Nh:null,zZ:null,wV:null,j0:null,BX:[],It:[],sw:null};
this.history=[new dg([1,0],null)];this.FS=0;this.V7=0;this.$w=0;this.fF=0;this.Q=new dB(this);this.Ya=null;
this.E$=null}hf.prototype.sv=function(x){if(x){if(x.length==30240){this.sv(null);return}this.Q_.r1039=x;
var Q=ICC.R(x.buffer),z=null,j=17,b,e;if(Q==null){this.sv(null);return}var c=Q.header.spaceIn.toLowerCase(),$=JSON.stringify(Q.tags.desc).toLowerCase();
try{z=ICC.U.profileName(Q)}catch(dQ){}if(c!="rgb "||z==null||$.indexOf("srgb")!=-1||c=="rgb "&&this.add.fcmy==1){this.sv(null);
return}console.log("We got an ICC profile!",Q,z);try{var U=ICC.U.sampleLUT(Q,j)}catch(dQ){this.sv(null);
return}var i=U.slice(0),k=d.R(4),K=d.N0("rgbToRgbC"),g=K[2],R=K[3];for(var F=0;F<U.length;F+=3){k[0]=U[F]*255;
k[1]=U[F+1]*255;k[2]=U[F+2]*255;ICC.U.applyLUT(R,g,k,k);i[F]=k[0]/255;i[F+1]=k[1]/255;i[F+2]=k[2]/255}if(eV.Mx){b=new eV.PT(j,j*j);
b.set(ICC.U.lutToRGBA8(U,j));e=new eV.PT(j,j*j);e.set(ICC.U.lutToRGBA8(i,j))}this.Ya=[x,Q,j,U,b,i,e]}else{delete this.Q_.r1039;
this.Ya=null}};hf.prototype.dV=function(){return this.Ya};hf.prototype.XP=function(){if(this.Ya)return this.Ya;
if(this.add.fcmy==1){if(this.E$==null){var x=d.N0("rgbToRgbC"),Q=x[2],c=x[3],$;if(eV.Mx){$=new eV.PT(Q,Q*Q);
$.set(ICC.U.lutToRGBA8(c,Q))}this.E$=[null,null,Q,null,null,c,$]}return this.E$}};hf.prototype.asc=function(){var x=this;
if(x.Q.O.join("")!="111"){x.Q.O=[1,1,1];x.vu=!0}for(var F=0;F<x.B.length;F++){var Q=x.B[F],c=Q.add.vmsk;
if(Q.Oz()){var $=Q.U5(x);if($&&$.F&&$.F.fd){$.F.fd=!1;x.vu=!0}}var z=Q.Rz();if(z&&z.fd){z.fd=!1;x.vu=!0}if(c){if(c.g.length!=0)c.g=[];
if(c.xf.length!=0)c.xf=[]}}};hf.prototype.kN=function(){var x=this;return x.u!=null||x.zo()[1].length!=0||x.g.length>1};
hf.prototype.wZ=function(){var x=this.Bo,Q=[];for(var F=0;F<x.length;F++)Q[F]=-1;var c=this.root.children;
for(var F=0;F<c.length;F++){var $=c[F],z=$.a.add.artb;if(z==null)continue;var j=z.guideIndeces;j=j?j.v:[];
for(var U=0;U<j.length;U++)Q[j[U].v]=$.index}return[JSON.parse(JSON.stringify(x)),Q]};hf.prototype.tF=function(x){this.Bo=JSON.parse(JSON.stringify(x[0]));
var Q=x[1],c=this.root.children;for(var F=0;F<c.length;F++){var $=c[F],z=$.a.add.artb;if(z==null)continue;
z.guideIndeces={t:"VlLs",v:[]}}for(var F=0;F<Q.length;F++)if(Q[F]!=-1)this.B[Q[F]].add.artb.guideIndeces.v.push({t:"long",v:F})};
hf.prototype.as6=function(x){var Q=this;if(x[0])Q.add.lnk2=x[0];else delete Q.add.lnk2;if(x[1])Q.add.FEid=x[1];
else delete Q.add.FEid;if(x[2])Q.add.Patt=x[2];else delete Q.add.Patt};hf.prototype.ahW=function(x){var Q=this,c=[],$=[],z=[],T=null,D=null,a=null;
for(var F=0;F<x.length;F++){var j=x[F];if(j.add.SoLd){c.push(j.add.SoLd.Idnt.v);$.push(j.add.SoLd.placed.v)}if(j.add.PtFl)z.push(j.add.PtFl.Ptrn.v.Idnt.v);
if(j.add.lmfx){for(var U=0;U<aF.mh.length;U++){var i=j.add.lmfx[aF.mh[U]].v;for(var b=0;b<i.length;b++)if(i[b].v.Ptrn){var e=i[b].v;
if(e.classID=="FrFX"&&e.PntT.v.FrFl!="Ptrn")continue;z.push(e.Ptrn.v.Idnt.v)}}}var k=j.add.vstk;if(k&&k.strokeStyleContent.v.classID=="patternLayer"){z.push(k.strokeStyleContent.v.Ptrn.v.Idnt.v)}}var K=Q.add.lnk2,g=Q.add.FEid,R=Q.add.Patt;
if(K){T=[];for(var F=0;F<K.length;F++)if(c.indexOf(K[F].P6)!=-1)T.push(K[F]);if(T.length==0)T=null}if(g){D=[];
for(var F=0;F<g.length;F++)if($.indexOf(g[F].id)!=-1)D.push(g[F]);if(D.length==0)D=null}if(R){a=[];for(var F=0;
F<R.length;F++)if(z.indexOf(R[F].id)!=-1)a.push(R[F]);if(a.length==0)a=null}return[T,D,a]};hf.prototype.w5=function(x){var Q=this,c=Q.root.FV(x==null?Q.g[0]:x),$=!1;
while(c.parent!=null){$=$||c.a.e6(31);c=c.parent}return $};hf.prototype.HI=function(){var x=this.fG,Q=this.fG.length;
if(Q!=0&&x[Q-1].name=="Quick Mask")return x[Q-1]};hf.prototype.NL=function(){return this.ml==jk.MB("% |/!)")||this.ml==jk.jW("gP")};
hf.prototype.cV=function(x){var Q=this.add.artd;if(x!=0)this.add.artd={classID:"null",Cnt:{t:"long",v:x},autoExpandOffset:{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:0},Vrtc:{t:"doub",v:0}}},origin:{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:0},Vrtc:{t:"doub",v:0}}},autoExpandEnabled:{t:"bool",v:!0},autoNestEnabled:{t:"bool",v:!0},autoPositionEnabled:{t:"bool",v:!0}};
else delete this.add.artd};hf.prototype.C3=function(x){if(this.add.FEid==null)this.add.FEid=[];if(this.add.FEid.indexOf(x)==-1)this.add.FEid.push(x)};
hf.prototype.e1=function(x){var Q=this.add.FEid.indexOf(x);this.add.FEid.splice(Q,1);if(this.add.FEid.length==0)delete this.add.FEid};
hf.prototype.c=function(x){if(x==null)x=new gh(0,0,this.m,this.e);if(this.NC==null)this.NC=x;else this.NC=this.NC.iO(x)};
hf.prototype.a8Z=function(x){return this.NC!=null};hf.prototype.XR=function(x){var Q=this.B[x],c=this.root.FV(x);
if(c==null)return!1;if(Q.Uy()||c.parent.children.indexOf(c)==0)return!1;return!0};hf.acr=function(x){if(x.add.lnk2)for(var F=0;
F<x.add.lnk2.length;F++){var Q=x.add.lnk2[F].P6;x.add.lnk2[F].P6=hf.KN()+Q.slice(8);for(var c=0;c<x.B.length;
c++){var $=x.B[c].add.SoLd;if($&&$.Idnt.v==Q)$.Idnt.v=x.add.lnk2[F].P6}}};hf.prototype.Ao=function(x,Q,c){x.sort(function(K,g){return K-g});
var top=x[x.length-1],$=this.B.slice(0),z=this.g.slice(0),j=[],U=[];for(var F=0;F<this.B.length;F++){if(x.indexOf(F)!=-1)U.push(this.B[F]);
else j.push(this.B[F])}this.Bd(U);this.g=[];var i=this.root.Pe(this,!0);if(Q)i=i.y_(Q);if(c)i=i.iO(c);
if(i._6())i=new gh(0,0,100,100);var b=new gh(-i.x,-i.y,this.m,this.e),e=new Uint8Array(ar.pz("PSD").YU(this,0,0,[!0,!1]));
this.Bd($);this.g=z;var k=new hf(this.B[top].getName());ar.pz("PSD").fk(e.buffer,k);delete k.add.artd;
k.p9=[];k.Bd(k.B);k.tF([[],[]]);hf.acr(k);X.r7.v$(k,i);k.c();k.eB();k.VY();return[k,i,j,top]};hf.prototype.a8D=function(x,Q,c){var $=this.Ao(x),z=$[0],j=$[1],U=$[2],top=$[3],i;
if(c=="jpg")i=new Uint8Array(ar.pz("JPG").YU([[z.VY().buffer]],z.m,z.e,[80]));else i=new Uint8Array(ar.pz("PSD").YU(z,null,null,[!0,!1]));
if(Q)U=this.B.slice(0);var b=this.BQ(i,z.name,j.x,j.y);if(top==this.B.length-1)U.push(b);else U.splice(Q?top+1:top-x.length+1,0,b);
this.Bd(U);this.g=[U.indexOf(b)]};hf.KN=function(x){if(x==null)x="";var Q="";while(Q==""||Q==x){Q="";
for(var F=0;F<8;F++)Q+=Math.floor(Math.random()*16).toString(16)}return Q};hf.prototype.uh=function(x){if(x==null)return;
if(this.add.Patt==null)this.add.Patt=[];var Q=this.add.Patt;for(var F=0;F<Q.length;F++)if(Q[F].id==x.id)return;
Q.push(x)};hf.prototype.BQ=function(x,Q,c,$,z,j,U){if(this.add.lnk2==null)this.add.lnk2=[];var i=null;
for(var F=0;F<this.add.lnk2.length;F++)if(d.HM(x,this.add.lnk2[F].raw)){i=this.add.lnk2[F].P6;break}if(i==null){var b=ar.HB(x.buffer);
i=hf.KN()+"-d71c-11e5-b1ae-a548a96e5f9f";var e=new eM.kY;e.P6=i;e.eD=b=="psd"?"8BIM":"    ";e.uo=Q+"."+b;
e.bf=b=="psd"?"8BPB":"    ";e.open=0;e.raw=x;e.type="liFD";e.WJ=2;this.add.lnk2.push(e)}var k=this.Td(i,null,null,null,j,U),K=hf.KN()+"-d71c-11e5-b1ae-a548a96e5f9f",g=this.Xh(),R=k?k.iw[1]:new gh;
g.gF(Q);g.add.SoLd={classID:"null",Idnt:{t:"TEXT",v:i},Impr:{t:"Objc",v:{__name:"None",classID:"none"}},placed:{t:"TEXT",v:K},PgNm:{t:"long",v:1},totalPages:{t:"long",v:1},frameStep:{t:"Objc",v:{classID:"null",numerator:{t:"long",v:0},denominator:{t:"long",v:600}}},duration:{t:"Objc",v:{classID:"null",numerator:{t:"long",v:0},denominator:{t:"long",v:600}}},frameCount:{t:"long",v:1},Annt:{t:"long",v:16},Type:{t:"long",v:2},Trnf:null,nonAffineTransform:null,quiltWarp:{t:"Objc",v:d.fr.R(R)},Sz:{t:"Objc",v:{classID:"Pnt",Wdth:{t:"doub",v:R.m},Hght:{t:"doub",v:R.e}}},Rslt:{t:"UntF",v:{type:"#Rsl",val:k?k.cQ:72}}};
var T=R.clone();if(c!=null)T.offset(c,$);if(k!=null&&z){var b=ar.HB(x.buffer),D=z.x,a=z.y,_=z.m,I=z.e;
T=k.iw[1].clone();T.offset(D+c,a+$);var f=f=this.cQ/(b=="pdf"?144:k.cQ?k.cQ:this.cQ);T.m=T.m*f;T.e=T.e*f;
var y=Math.max(T.m/_,T.e/I);if(y>1.0001){T.m=T.m/y;T.e=T.e/y}T.x=Math.round(D+(_-T.m)/2);T.y=Math.round(a+(I-T.e)/2)}var Z=d.A.Hg(T).j;
g.add.SoLd.Trnf=X.Y.TD(Z);g.add.SoLd.nonAffineTransform=X.Y.TD(Z);if(k){if(z)g.bx(this,!1);else if(i9==0){g.rect=T;
g.buffer=k.iw[0].slice(0)}}return g};hf.prototype.afM=function(x,Q,c){var $=d.nc(x,Q);$.save();$.scale(x/this.m,Q/this.e);
this.root.a8K(this,$,c,new gh(0,0,x,Q));$.restore();return $.getImageData(0,0,x,Q).data.buffer};hf.prototype.VY=function(x){if(x!=null){this.c();
this.eB(x);var Q=this.buffer;if(eV.Mx)this.UR.get(Q);else Q=Q.slice(0);this.c();this.eB();return Q}if(this.NC){this.eB();
this.NC=null}if(eV.Mx&&this.MI){this.UR.get(this.buffer);this.MI=null;this.Fq=!0}return this.buffer};
hf.prototype.a4M=function(){for(var F=0;F<this.B.length;F++)this.B[F].aBA();this.c()};hf.prototype.a40=function(){for(var F=0;
F<this.B.length;F++)if(this.B[F].add.lmfx)this.B[F].ft.JP=!0};hf.prototype.nQ=function(){var x=this.Q_.r1044;
if(x==null){x=this.Q_.r1044=new Uint8Array(4);var Q=0;for(var F=0;F<this.B.length;F++)Q=Math.max(Q,this.B[F].add.lyid);
w.EO(x,0,Q)}var c=w.q(x,0);w.EO(x,0,c+1);return c+1};hf.prototype.hS=function(x,Q,c){if(x==null)x=!0;
var $=this;if($.oW.length!=0)return!0;if($.g.length!=1){if(x)alert($.g.length==0?"Select a layer first.":"More than one layer selected.");
return!1}return this.VP(x,Q,c)};hf.prototype.VP=function(x,Q,c){if(x==null)x=!0;if(Q==null)Q=!1;var $=this;
if($.oW.length!=0)return!0;for(var F=0;F<$.g.length;F++){var z=$.B[$.g[F]],j=Q||z.kk<=0;if(z.add.lsct!=null&&z.add.lsct!=hA.g$&&z.kk!=1){if(x)alert(ah.get([15,7,2]));
return!1}if(j&&!z.nd()){if(x)alert(ah.get([15,7,2]));return!1}if(j&&z.add.TySh){return this.a3Z(x,[15,7,3],c)}if(j&&z.add.SoLd){return this.a3Z(x,[15,7,4],c)}if(z.e6(1)||$.w5($.g[F])){if(x)alert(ah.get([6,57,0]));
return!1}}return!0};hf.prototype.a3Z=function(x,Q,c){if(x&&typeof x=="object"){var $=new jO(u.E.M);$.data={d:u.H.LL,AD:"confirm"};
$.data.b=ah.get(Q)+". "+ah.get([6,8])+"?";var z=x;$.data.ka=function(){var j=new jO(u.E.G2,!0);j.data={q4:"rasterizeLayer",dx:{classID:"rasterizeLayer",null:ep.QP("Lyr",!0)}};
z.T(j)};x.T($);return!1}if(x)alert(ah.get(Q));return!1};hf.prototype.alZ=function(x){var Q=this.root.FV(x);
if(Q.parent)return Q.a.M5()&&this.alZ(Q.parent.index);else return Q.a.M5()};hf.prototype.lG=function(x){var Q=this;
if(x){var c=0;for(var F=0;F<Q.g.length;F++)if(Q.B[Q.g[F]].add.artb)c++;if(c>1)return-1}if(Q.add.artd&&Q.g.length!=0){var $=Q.root.FV(Q.g[0]);
while($.parent.parent)$=$.parent;if($.a.add.artb)return $.index}return-1};hf.prototype.Wq=function(){var x=this.lG();
if(x!=-1){var Q=this.B[x].Dd();return new bC(Q.x,Q.y)}return new bC(0,0)};hf.prototype.aDr=function(){var x=this.B[this.g[0]];
if(x.kk<=0&&!x.rect.dM(this.u.rect)){alert("Selected area is empty.");return!1}if(this.g.length==1&&this.u){var Q=d.R(this.u.channel.length);
d.df(x.buffer,x.rect,Q,this.u.rect);d.Tt(this.u.channel,Q);if(d.Go(Q,0)){alert("Selected area is empty.");
return!1}}return!0};hf.prototype.FO=function(){if(this.Q_["r"+1037]==null)this.tK(30);return w.c4(this.Q_["r"+1037],0)};
hf.prototype.tK=function(x){if(this.Q_["r"+1037]==null)this.Q_["r"+1037]=new Uint8Array(4);if(w.c4(this.Q_["r"+1037],0)==x)return;
w.nh(this.Q_["r"+1037],0,x);this.a40()};hf.prototype.dG=function(){if(this.Q_["r"+1049]==null)this.nx(30);
return w.c4(this.Q_["r"+1049],0)};hf.prototype.nx=function(x){if(this.Q_["r"+1049]==null)this.Q_["r"+1049]=new Uint8Array(4);
if(w.c4(this.Q_["r"+1049],0)==x)return;w.nh(this.Q_["r"+1049],0,x);this.a40()};hf.prototype.ZL=function(x){if(this.add.lnk2==null)return null;
for(var F=0;F<this.add.lnk2.length;F++)if(this.add.lnk2[F].P6==x)return this.add.lnk2[F];return null};
hf.prototype.aCa=function(x){var Q=this.ZL(x);if(Q==null)return!1;var c=ar.HB(Q.raw.buffer);if(c==null)return!1;
if(ar.pz(c)!=null||c=="psd")return!0;return!1};hf.prototype.Td=function(x,Q,c,$,z,j){var U=this.ZL(x);
if(U==null)return null;U.VY(Q,c,$,z,j);if(U.iw)return U};hf.prototype.auM=function(){var x=this.m,Q=this.e;
if(eV.Mx&&this.UR==null)this.UR=new eV.PT(x,Q,!0);if(this.buffer==null||this.buffer.length!=x*Q*4||eV.Mx&&(this.UR.m!=x||this.UR.e!=Q)){this.buffer=d.R(x*Q*4);
if(this.UR)this.UR.delete();if(eV.Mx)this.UR=new eV.PT(x,Q,!0)}};hf.prototype.afb=function(){this.auM();
if(eV.Mx){this.UR.set(this.buffer)}};hf.prototype.eB=function(x){if(i9!=0)throw"redrawing in vector mode";
var Q=this.m,c=this.e,$=new gh(0,0,Q,c),z=this.d6?$:$.y_(this.NC);this.auM();if(z._6())return;if(!z.HM($)){if(!eV.Mx){var j=d.rB(z.P()*4);
d.WK(j,z,this.buffer,$)}if(eV.Mx){eV.qk(this.UR,z);eV.sN(0)}}else{if(eV.Mx){this.UR.set(null)}else{this.buffer.fill(0)}}var U=Date.now(),i=eV.Mx?this.UR:this.buffer;
if(x==null)x=1e9;var b=this.root.children;for(var F=0;F<b.length;F++){var e=b[F].a;if(e.M5()&&e.add.artb&&this.add.artd){var k=e.Dd(),K=z.y_(k),g=e.LM();
if(g!=0){if(eV.Mx){eV.qk(i,K);eV.sN(g);eV.sN(g)}else d.apy(i,$,K,g)}}}this.root.v8(i,$,z,this,[],x);
this.MI=this.NC.clone()};hf.prototype.Xh=function(x){var Q=new eM;Q.rect=new gh(0,0,0,0);Q.buffer=d.R(1);
Q.add.luni=new bC(0,0);if(x!=!0)Q.add.lyid=this.nQ();Q.add.lsct=hA.g$;Q.add.lclr=0;Q.add.fxrp=new bC(0,0);
return Q};hf.prototype.x6=function(x){var Q=this.Xh(x);Q.gF("</Layer group>");Q.add.lsct=hA.oA;Q.H2=24;
return Q};hf.prototype.tl=function(){return this.FS!=this.V7};hf.prototype.kp=function(x){while(this.history.length>this.FS+1)this.history.pop();
if(this.V7>this.FS)this.V7=-1;if(x.f.id!=X.yd){this.Dl=!0;if(this.A2.lastAppliedComp){delete this.A2.lastAppliedComp;
this.Fq=!0}}this.history.push(x);this.FS++;this.Fq=!0;var Q=dQ.OT()?60:30,c=0;for(var F=this.history.length-1;
F>=0;F--){var $=this.history[F];if($.do)continue;c++;if(c==Q){this.FS-=F;this.history=this.history.slice(F);
break}}};hf.prototype.O2=function(){if(this.FS!=this.history.length-1)return null;return this.history[this.history.length-1]};
hf.prototype.zi=function(x,Q,c,$){if(x==null)x=!1;var z=Q!=null?[Q]:this.g.slice(0);if($){var j=[];for(var F=0;
F<z.length;F++){var U=this.B[z[F]],i=U.to;if(U.Rm&&i!=0&&j.indexOf(i)==-1)j.push(i)}if(j.length!=0)for(var F=0;
F<this.B.length;F++){var U=this.B[F],i=U.to;if(U.Rm&&i!=0&&j.indexOf(i)!=-1&&z.indexOf(F)==-1)z.push(F)}}var b=[];
for(var F=0;F<z.length;F++){var e=this.Sa(z[F],x);for(var k=0;k<e.length;k++)if(b.indexOf(e[k])==-1)b.push(e[k]);
if(c){var jF=this.root.FV(z[F]);while(jF.parent!=null&&jF.parent.parent!=null){jF=jF.parent;if(b.indexOf(jF.index)==-1){b.push(jF.index,jF.G5)}}}}return b};
hf.prototype.oU=function(x,Q,c){var $=this,z=$.zi(!1,x,null,c);z.sort(function(f,y){return f-y});var j={};
for(var U=0;U<$.B.length;U++){var i=$.B[U].getName();j[i]=!0}var b=[];for(var F=0;F<z.length;F++){var e=$.B[z[F]].clone(),a,_;
e.add.lyid=$.nQ();e.add.lspf=0;if(e.Oz()){var k=e.U5($),K=hf.ain(k);$.C3(K);e.add.SoLd.placed.v=K.id}else if(e.add.SoLd){var g=e.add.SoLd.placed.v;
e.add.SoLd.placed.v=hf.KN(g.slice(0,8))+g.slice(8)}e.kT($);var R=e.getName(),T=R.length;while(48<=R.charCodeAt(T-1)&&R.charCodeAt(T-1)<=57)T--;
var D=parseInt(R.slice(T));if(isNaN(D)){if(R.endsWith(" copy")){D=1;a=R.slice(0,R.length-5)}else{D=0;
a=R}}else if(R.slice(0,T).endsWith(" copy ")){D=D;a=R.slice(0,T-6)}else{D=0;a=R}D++;while(!0){_=a+" copy"+(D==1?"":" "+D);
if(j[_]==null)break;D++}var I=z.indexOf(this.root.FV(z[F]).parent.index)!=-1;if(R=="Background"&&$.B.length==1)_="Layer 1";
if(Q!=!0&&!I)e.gF(_);j[_]=!0;b.push(e)}return b};hf.ain=function(x){return{id:hf.KN(x.id.slice(0,8))+x.id.slice(8),buffer:x.buffer.slice(0),rect:x.rect.clone(),F:x.F?x.F.clone():null}};
hf.aov=function(x){return{id:x,rect:new gh,buffer:d.R(1),F:new eM.zM}};hf._S=function(x,Q){if(Q==null)Q={vmsk:new eM.hn};
if(Q.vogk==null){Q.vogk=[];var c=d.o.WV(Q.vmsk.$);for(var $=0;$<c;$++)Q.vogk.push(d.eV.rB())}return{name:x,xR:0,add:Q}};
hf.prototype.zo=function(x){var Q=[],c=[],$=this;for(var F=1;F<$.iL.length;F++){var z=$.iL[F];z.xR=-1-F;
Q.push(z);if($.IH.indexOf(F)!=-1)c.push(Q.length-1)}if($.iL[0].add.vmsk.$.length>2){var z=$.iL[0];z.xR=-1;
Q.push(z);if($.IH.indexOf(0)!=-1)c.push(Q.length-1)}var j=$.ZQ==null;if(j)$.ZQ=[];for(var F=$.g.length-1;
F>=0;F--){var U=$.g[F],i=$.B[U],b=i.add.TySh;if(i.add.vmsk!=null){var z=hf._S("\""+i.getName()+"\" Shape Path",i.add);
z.xR=U;Q.push(z);if(j&&(i.Et||i.Z6()))$.ZQ.push(U);if($.ZQ.indexOf(U)!=-1)c.push(Q.length-1)}if(x!=!0&&b&&b.add&&d.fr.Cu(b.f2)){var z=hf._S("\""+i.getName().slice(0,10)+"..\" Text Path",b.add);
z.xR=1e6+$.g[F];Q.push(z);c.push(Q.length-1)}}if(c.length==0&&x){$.iL[0].xR=-1;$.IH=[0];c.push(Q.length);
Q.push($.iL[0])}return[Q,c]};hf.prototype.Sa=function(F,x){var Q=[],jF=this.root.FV(F);if(jF)jF.ze(Q,x);
return Q};hf.prototype.Kn=function(){this.root.Zh(this,new gh(0,0,this.m,this.e))};hf.prototype.Bd=function(x){for(var F=0;
F<this.B.length;F++){var Q=this.B[F];if(x.indexOf(Q)==-1){Q.ft.afK();Q.c()}}var c=0;for(var F=0;F<x.length;
F++)if(x[F].add.artb)c++;this.cV(c);this.B=x.slice(0);this.jf()};hf.prototype.jf=function(){var x=this.B,Q=x.length;
this.root=new bb;var c=this.Xh(!0);c.s3="pass";c.add.lsct=hA.DJ;c.gF("");var $=this.x6(!0),z=[$];for(var F=0;
F<Q;F++)z.push(x[F]);z.push(c);this.root.as$(z,0,0);if(this.g.length==0)this.g=[Q-1]};hf.prototype.la=function(){if(this.g.length!=1)return;
var x=this.root.FV(this.g[0]);while(x.parent!=null){var Q=x.parent.a;Q.add.lsct=hA.DJ;x=x.parent}this.vu=this.auo=!0};
hf.prototype.a31=function(){this.jf();var x=[this.root],au=0;while(x.length!=0){var top=x.pop();au++;
if(top.a.add.lsct==hA.DJ)for(var F=0;F<top.children.length;F++)x.push(top.children[F])}if(au>1e3){var Q=this.root.children;
for(var F=0;F<Q.length;F++)if(Q[F].a.add.lsct==hA.DJ)Q[F].a.add.lsct=hA.H3}};hf.uV=function(x,Q,c,$,z,j,U,i){if(i==null)i="sRGB IEC61966-2.1";
var b={__name:"Make",classID:"Mk",Nw:{t:"Objc",v:{classID:"Dcmn",Nm:{t:"TEXT",v:$},artboard:{t:"bool",v:j},Md:{t:"type",v:{classID:"RGBM"}},Wdth:{t:"UntF",v:{type:"#Rlt",val:x*72/c}},Hght:{t:"UntF",v:{type:"#Rlt",val:Q*72/c}},Rslt:{t:"UntF",v:{type:"#Rsl",val:c}},pixelScaleFactor:{t:"doub",v:1},Fl:{t:"enum",v:{Fl:z}},Dpth:{t:"long",v:8},profile:{t:"TEXT",v:i}}}};
if(z=="Clr")b.Nw.v.FlCl={t:"Objc",v:U};return{q4:"make",dx:b}};hf.a0l=function(x,Q){var c=0,$=0,z=72,j=Q.a17,U=x.preset&&x.preset.v=="Clipboard";
if(U){c=j.m;$=j.e}else{c=x.Wdth.v.val;$=x.Hght.v.val;z=x.Rslt.v.val;c=Math.round(c*z/72);$=Math.round($*z/72)}var i=new hf((x.Nm?x.Nm.v:ah.get([11,7]))+".psd");
i.m=c;i.e=$;i.cQ=z;var b=x.Fl?x.Fl.v.Fl:"Wht";if(x.artboard&&x.artboard.v){var e=i.Xh();e.gF(ah.get([1,16,0])+" 1");
e.add.lsct=hA.DJ;e.Zp(new gh(0,0,c,$));e.add.artb.artboardBackgroundType={t:"long",v:{Wht:1,Blck:2,Trns:3,BckC:1,Clr:4}[b]};
if(b=="Clr")e.add.artb.Clr={t:"Objc",v:d.I.lV(d.I.Du(x.FlCl.v))};e.s3="pass";e.H2=24;var k=i.Xh();k.gF("Layer 1");
i.Bd([i.x6(),k,e]);i.cV(1);i.g=[1]}else{var K=i.Xh(),g=0;K.gF("Background");i.Bd([K]);K.add.lspf=1<<2;
if(b=="Clr"){g=d.I.Du(x.FlCl.v);g=255<<24|Math.round(g.J)<<16|Math.round(g.r)<<8|Math.round(g.Z)}else{var R=Q.QI;
R=(R&255)<<16|(R>>>8&255)<<8|R>>>16;g={Trns:0,Wht:4294967295,Blck:4278190080,BckC:255<<24|R}[b]}K.rect=new gh(0,0,c,$);
K.buffer=d.R(c*$*4);d.h4(K.buffer,g)}i.buffer=d.R(c*$*4);var T=x.profile;if(T){var D={"Adobe RGB (1998)":"icc/adobe","ProPhoto RGB":"icc/prophoto","image P3":"icc/displayp3"}[T.v];
if(D)i.sv(ar.dy.get(D))}return i};hf.prototype.aw3=function(){var x=this,Q=x.add.arts=[];if(x.add.artd){delete x.add.artd;
for(var F=0;F<x.B.length;F++){var c=x.B[F],$=c.add.artb;if($==null)continue;var z=c.Dd();delete c.add.artb;
Q.push({if:c.getName(),LB:[z.x,z.y,z.x+z.m,z.y+z.e],g:!1})}}else Q.push({if:"Artboard",LB:[0,0,x.m,x.e],g:!1});
if(x.buffer)x.buffer=null;for(var F=0;F<x.B.length;F++){var c=x.B[F],z=c.rect;if(c.Uy()&&c.add.vmsk){var j=x.Xh();
x.B.splice(F,0,j);j.gF("<Clipping Path>");j.Qc=!0;j.add.vogk=c.add.vogk;delete c.add.vogk;j.add.vmsk=c.add.vmsk;
delete c.add.vmsk;j.add.vstk=aF.XM.$H();j.add.SoCo=JSON.parse(aF.lF[aF.order.indexOf("SoFi")]);j.add.vstl={};
console.log("mask here!")}else if(c.Z6()&&c.add.vstl==null){var U=aF.XM.bh(c.add.vstk),i=c.add.vstl={};
aF.xV.write(i,U,1);var b=aF.L$(c.add),e=aF.XT(c.add.vstk);for(var k=0;k<2;k++){var K=k==0?b:e,g=null;
if(K.bf==1)g=cd.z$(K.WB.Clr.v);if(K.bf==2){g=ad.yN(K.WB,c.add.vmsk.$);if(c.add._fstl)g=c.add._fstl}if(k==0)i.aA=g;
else i.sf=g}}if(c.add.SoLd||c.add.TySh||c.add.vmsk||z._6())continue;var R=z.m,T=z.e,D=d.dJ(c.buffer,R,T)?"JPG":"PNG";
if(R*T<700*700)D="PNG";var a=ar.pz(D).YU([[c.buffer.buffer]],R,T);x.B[F]=x.BQ(new Uint8Array(a),"<Image>",0,0)}};
function dB(x){this.Ta=x;this.W=0;this.fi=1;this.z=new bC(0,0);this.yH=new bC(0,0);this.A6=0;this.O=[1,1,1];
this.sI=0;this.yY=new gh(0,0,1,1);this.afP=new gh(0,0,x.m,x.e);this._u=null;this.BC=null;this.EB=new Uint32Array(0);
this.Wf=null;this.Vq=null;this.Mj=d.R(0);this.Yq=null;this.Xm=null}dB.prototype.FG=function(x){var Q=new bI,c=this.yY,$=this.Ta,z=x?this.fi:this.W,j=x?this.yH:this.z,U=Math.round((c.m-$.m*z)/2+j.x),i=Math.round((c.e-$.e*z)/2+j.y);
Q.translate(-U,-i);Q.scale(1/z,1/z);var b=$.m/2,e=$.e/2;Q.translate(-b,-e);Q.rotate(this.A6);Q.translate(b,e);
return Q};dB.prototype.atn=function(x){var Q=this.yY,c=this.Ta,$=Math.atan2(-x.J,x.V),z=c.m/2,j=c.e/2;
x.translate(-z,-j);x.rotate(-$);x.translate(z,j);var U=1/x.c0();x.scale(U,U);var i=-x.DX,b=-x.ti,e=Math.round(i-(Q.m-c.m*U)/2),k=Math.round(b-(Q.e-c.e*U)/2);
if(Math.abs(U-Math.round(U))<1e-6)U=Math.round(U);this.A6=$;this.W=U;this.z=new bC(e,k)};dB.prototype.$X=function(x,Q,c){var $=this.FG(),z=$.RE(new bC(x,Q));
if(c){z.x=Math.round(z.x);z.y=Math.round(z.y)}return z};dB.prototype.wu=function(x,Q){var c=this.FG();
c.HQ();return c.RE(new bC(x,Q))};function aF(){}aF.order="ebbl FrFX IrSh IrGl ChFX SoFi GrFl patternFill OrGl DrSh St3D".split(" ");
aF.mh="ebblMulti frameFXMulti innerShadowMulti IrGlMulti ChFXMulti solidFillMulti gradientFillMulti patternFillMulti OrGlMulti dropShadowMulti St3DMulti".split(" ");
aF.names=[[14,4],[14,9],[14,1],[14,3],[14,8],[14,5],[14,6],[14,7],[14,2],[14,0],"3D"];aF.atS=["DrSh","IrSh","SoFi","GrFl","FrFX"];
aF.ZS=["Clr"];aF.ul="Grad Rvrs Type Algn Angl Dthr Scl Ofst".split(" ");aF.qK=["Ptrn","Angl","Scl","Algn","phase"];
aF.Q5={nH:"{\"t\":\"Objc\",\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":0,\"t\":\"doub\"},\"Grn\":{\"v\":0,\"t\":\"doub\"},\"Bl\":{\"v\":0,\"t\":\"doub\"}}}",a9Q:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Grdn\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"Default/Two Color\"               },\"GrdF\":{\"t\":\"enum\",\"v\":{\"GrdF\":\"CstS\"}},\"Intr\":{\"t\":\"doub\",\"v\":4096},\"Clrs\":{\"t\":\"VlLs\",\"v\":[{\"t\":\"Objc\",\"v\":{\"classID\":\"Clrt\",\"Type\":{\"t\":\"enum\",\"v\":{\"Clry\":\"UsrS\"}},\"Lctn\":{\"t\":\"long\",\"v\":0},\"Mdpn\":{\"t\":\"long\",\"v\":50},\"Clr\":{\"t\":\"Objc\",\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"t\":\"doub\",\"v\":0},\"Grn\":{\"t\":\"doub\",\"v\":0},\"Bl\":{\"t\":\"doub\",\"v\":0}}}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"Clrt\",\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":255,\"t\":\"doub\"},\"Grn\":{\"v\":255,\"t\":\"doub\"},\"Bl\":{\"v\":255,\"t\":\"doub\"}},\"t\":\"Objc\"},\"Type\":{\"v\":{\"Clry\":\"UsrS\"},\"t\":\"enum\"},\"Lctn\":{\"v\":4096,\"t\":\"long\"},\"Mdpn\":{\"v\":50,\"t\":\"long\"}},\"t\":\"Objc\"}]},\"Trns\":{\"v\":[{\"v\":{\"classID\":\"TrnS\",\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},\"Lctn\":{\"v\":0,\"t\":\"long\"},\"Mdpn\":{\"v\":50,\"t\":\"long\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"TrnS\",\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},\"Lctn\":{\"v\":4096,\"t\":\"long\"},\"Mdpn\":{\"v\":50,\"t\":\"long\"}},\"t\":\"Objc\"}],\"t\":\"VlLs\"}}}",aAE:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Grdn\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"Default/Foreground to Background\"},\"GrdF\":{\"t\":\"enum\",\"v\":{\"GrdF\":\"CstS\"}},\"Intr\":{\"t\":\"doub\",\"v\":4096},\"Clrs\":{\"t\":\"VlLs\",\"v\":[{\"t\":\"Objc\",\"v\":{\"classID\":\"Clrt\",\"Type\":{\"t\":\"enum\",\"v\":{\"Clry\":\"FrgC\"}},\"Lctn\":{\"t\":\"long\",\"v\":0},\"Mdpn\":{\"t\":\"long\",\"v\":50}}},{\"t\":\"Objc\",\"v\":{\"classID\":\"Clrt\",\"Type\":{\"t\":\"enum\",\"v\":{\"Clry\":\"BckC\"}},\"Lctn\":{\"t\":\"long\",\"v\":4096},\"Mdpn\":{\"t\":\"long\",\"v\":50}}}]},\"Trns\":{\"t\":\"VlLs\",\"v\":[{\"t\":\"Objc\",\"v\":{\"classID\":\"TrnS\",\"Opct\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":100}},\"Lctn\":{\"t\":\"long\",\"v\":0},\"Mdpn\":{\"t\":\"long\",\"v\":50}}},{\"t\":\"Objc\",\"v\":{\"classID\":\"TrnS\",\"Opct\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":100}},\"Lctn\":{\"t\":\"long\",\"v\":4096},\"Mdpn\":{\"t\":\"long\",\"v\":50}}}]}}}",aCQ:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Grdn\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"Default/Custom\"                  },\"GrdF\":{\"t\":\"enum\",\"v\":{\"GrdF\":\"ClNs\"}},\"ShTr\":{\"t\":\"bool\",\"v\":false},\"VctC\":{\"t\":\"bool\",\"v\":false},\"ClrS\":{\"t\":\"enum\",\"v\":{\"ClrS\":\"RGBC\"}},\"RndS\":{\"t\":\"long\",\"v\":1466092501},\"Smth\":{\"t\":\"long\",\"v\":2048},\"Mnm\":{\"t\":\"VlLs\",\"v\":[{\"t\":\"long\",\"v\":0},{\"t\":\"long\",\"v\":0},{\"t\":\"long\",\"v\":0},{\"t\":\"long\",\"v\":0}]},\"Mxm\":{\"t\":\"VlLs\",\"v\":[{\"t\":\"long\",\"v\":100},{\"t\":\"long\",\"v\":100},{\"t\":\"long\",\"v\":100},{\"t\":\"long\",\"v\":100}]}}}",Li:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Ptrn\",\"Nm\":{\"v\":\"Default/orangeslices\",\"t\":\"TEXT\"},\"Idnt\":{\"v\":\"b4d43394-d71c-11e5-b1ae-a548a96e5f9f\",\"t\":\"TEXT\"}}}"};
aF.Q5.nH="\"Clr\": "+aF.Q5.nH;aF.Q5.I="\"Grad\":"+aF.Q5.a9Q+",\"Scl\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},\"Algn\":{\"v\":true,\"t\":\"bool\"},\"Angl\":{\"v\":{\"type\":\"#Ang\",\"val\":90},\"t\":\"UntF\"},\"Rvrs\":{\"v\":false,\"t\":\"bool\"},\"Type\":{\"v\":{\"GrdT\":\"Lnr\"},\"t\":\"enum\"},\"Ofst\":{\"v\":{\"classID\":\"Pnt\",\"Hrzn\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"Vrtc\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"}},\"t\":\"Objc\"},\"Dthr\":{\"v\":false,\"t\":\"bool\"}";
aF.Q5.Li="\"Ptrn\":"+aF.Q5.Li+",\"Scl\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},\"Algn\":{\"v\":true,\"t\":\"bool\"},\"Angl\":{\"v\":{\"type\":\"#Ang\",\"val\": 0},\"t\":\"UntF\"},\"phase\":{\"v\":{\"classID\":\"Pnt\",\"Hrzn\":{\"v\":0,\"t\":\"doub\"},\"Vrtc\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"}";
aF.default="{ \"classID\": \"null\", \"Scl\": {\"t\": \"UntF\", \"v\": { \"type\": \"#Prc\",\"val\": 100} }, \"masterFXSwitch\": {\"t\": \"bool\",\"v\": true} }";
aF.lF=["{\"classID\":\"ebbl\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"hglM\":{\"t\":\"enum\",\"v\":{\"BlnM\":\"Scrn\"}},\"hglC\":{\"t\":\"Objc\",\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"t\":\"doub\",\"v\":255},\"Grn\":{\"t\":\"doub\",\"v\":255},\"Bl\":{\"t\":\"doub\",\"v\":255}}},\"hglO\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":75}},\"sdwM\":{\"t\":\"enum\",\"v\":{\"BlnM\":\"Mltp\"}},\"sdwC\":{\"t\":\"Objc\",\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"t\":\"doub\",\"v\":0},\"Grn\":{\"t\":\"doub\",\"v\":0},\"Bl\":{\"t\":\"doub\",\"v\":0}}},\"sdwO\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":75}},\"bvlT\":{\"t\":\"enum\",\"v\":{\"bvlT\":\"SfBL\"}},\"bvlS\":{\"t\":\"enum\",\"v\":{\"BESl\":\"InrB\"}},\"uglg\":{\"t\":\"bool\",\"v\":true},\"lagl\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Ang\",\"val\":120}},\"Lald\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Ang\",\"val\":30}},\"srgR\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":100}},\"blur\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Pxl\",\"val\":5}},\"bvlD\":{\"t\":\"enum\",\"v\":{\"BESs\":\"In\"}},\"TrnS\":{\"t\":\"Objc\",\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"Linear\"},\"Crv\":{\"t\":\"VlLs\",\"v\":[{\"t\":\"Objc\",\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"t\":\"doub\",\"v\":0},\"Vrtc\":{\"t\":\"doub\",\"v\":0}}},{\"t\":\"Objc\",\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"t\":\"doub\",\"v\":255},\"Vrtc\":{\"t\":\"doub\",\"v\":255}}}]}}},\"antialiasGloss\":{\"t\":\"bool\",\"v\":false},\"Sftn\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Pxl\",\"val\":0}},\"useShape\":{\"t\":\"bool\",\"v\":false},\"MpgS\":{\"t\":\"Objc\",\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"Linear\"},\"Crv\":{\"t\":\"VlLs\",\"v\":[{\"t\":\"Objc\",\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"t\":\"doub\",\"v\":0},\"Vrtc\":{\"t\":\"doub\",\"v\":0}}},{\"t\":\"Objc\",\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"t\":\"doub\",\"v\":255},\"Vrtc\":{\"t\":\"doub\",\"v\":255}}}]}}},\"AntA\":{\"t\":\"bool\",\"v\":false},\"Inpr\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":28}},\"useTexture\":{\"t\":\"bool\",\"v\":false},\"InvT\":{\"t\":\"bool\",\"v\":false},\"Algn\":{\"t\":\"bool\",\"v\":true},\"Scl\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":100}},\"textureDepth\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":100}},\"Ptrn\":{\"t\":\"Objc\",\"v\":{\"classID\":\"Ptrn\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"Default/orangeslices\"},\"Idnt\":{\"t\":\"TEXT\",\"v\":\"b4d43394-d71c-11e5-b1ae-a548a96e5f9f\"}}},\"phase\":{\"t\":\"Objc\",\"v\":{\"classID\":\"Pnt\",\"Hrzn\":{\"t\":\"doub\",\"v\":0},\"Vrtc\":{\"t\":\"doub\",\"v\":0}}}}","{\"classID\":\"FrFX\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Nrml\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},\"overprint\":{\"t\":\"bool\",\"v\":false},\"Styl\":{\"v\":{\"FStl\":\"OutF\"},\"t\":\"enum\"},\"PntT\":{\"v\":{\"FrFl\":\"SClr\"},\"t\":\"enum\"},\"Sz\":{\"v\":{\"type\":\"#Pxl\",\"val\":3},\"t\":\"UntF\"},"+aF.Q5.nH+","+aF.Q5.I+","+aF.Q5.Li+"}","{\"classID\":\"IrSh\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Mltp\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\": 75},\"t\":\"UntF\"},\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":  0,\"t\":\"doub\"},\"Grn\":{\"v\":0,\"t\":\"doub\"},\"Bl\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},\"uglg\":{\"v\":true,\"t\":\"bool\"},\"lagl\":{\"v\":{\"type\":\"#Ang\",\"val\":120},\"t\":\"UntF\"},\"Dstn\":{\"v\":{\"type\":\"#Pxl\",\"val\":5},\"t\":\"UntF\"},\"Ckmt\":{\"v\":{\"type\":\"#Pxl\",\"val\":0},\"t\":\"UntF\"},\"blur\":{\"v\":{\"type\":\"#Pxl\",\"val\":5},\"t\":\"UntF\"},\"Nose\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"AntA\":{\"v\":false,\"t\":\"bool\"},\"TrnS\":{\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"v\":\"Linear\",\"t\":\"TEXT\"},\"Crv\":{\"v\":[{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":0,\"t\":\"doub\"},\"Vrtc\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":255,\"t\":\"doub\"},\"Vrtc\":{\"v\":255,\"t\":\"doub\"}},\"t\":\"Objc\"}],\"t\":\"VlLs\"}},\"t\":\"Objc\"}}","{\"classID\":\"IrGl\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Scrn\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\": 75},\"t\":\"UntF\"},\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":255,\"t\":\"doub\"},\"Grn\":{\"v\":255,\"t\":\"doub\"},\"Bl\":{\"v\":189.99710083007812,\"t\":\"doub\"}},\"t\":\"Objc\"},\"GlwT\":{\"v\":{\"BETE\":\"SfBL\"},\"t\":\"enum\"},\"Ckmt\":{\"v\":{\"type\":\"#Pxl\",\"val\":0},\"t\":\"UntF\"},\"blur\":{\"v\":{\"type\":\"#Pxl\",\"val\":5},\"t\":\"UntF\"},\"ShdN\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"Nose\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"AntA\":{\"v\":false,\"t\":\"bool\"},\"glwS\":{\"v\":{\"IGSr\":\"SrcE\"},\"t\":\"enum\"},\"TrnS\":{\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"v\":\"Linear\",\"t\":\"TEXT\"},\"Crv\":{\"v\":[{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":0,\"t\":\"doub\"},\"Vrtc\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":255,\"t\":\"doub\"},\"Vrtc\":{\"v\":255,\"t\":\"doub\"}},\"t\":\"Objc\"}],\"t\":\"VlLs\"}},\"t\":\"Objc\"},\"Inpr\":{\"v\":{\"type\":\"#Prc\",\"val\":50},\"t\":\"UntF\"}}","{\"classID\":\"ChFX\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Mltp\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\": 50},\"t\":\"UntF\"},\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":  0,\"t\":\"doub\"},\"Grn\":{\"v\":0,\"t\":\"doub\"},\"Bl\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},\"AntA\":{\"v\":false,\"t\":\"bool\"},\"Invr\":{\"v\":true,\"t\":\"bool\"},\"lagl\":{\"v\":{\"type\":\"#Ang\",\"val\":19},\"t\":\"UntF\"},\"Dstn\":{\"v\":{\"type\":\"#Pxl\",\"val\":11},\"t\":\"UntF\"},\"blur\":{\"v\":{\"type\":\"#Pxl\",\"val\":14},\"t\":\"UntF\"},\"MpgS\":{\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"v\":\"Gaussian\",\"t\":\"TEXT\"},\"Crv\":{\"v\":[{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":0,\"t\":\"doub\"},\"Vrtc\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":32,\"t\":\"doub\"},\"Vrtc\":{\"v\":7,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":64,\"t\":\"doub\"},\"Vrtc\":{\"v\":38,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":96,\"t\":\"doub\"},\"Vrtc\":{\"v\":101,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":128,\"t\":\"doub\"},\"Vrtc\":{\"v\":166,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":159,\"t\":\"doub\"},\"Vrtc\":{\"v\":209,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":191,\"t\":\"doub\"},\"Vrtc\":{\"v\":235,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":223,\"t\":\"doub\"},\"Vrtc\":{\"v\":248,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":255,\"t\":\"doub\"},\"Vrtc\":{\"v\":255,\"t\":\"doub\"}},\"t\":\"Objc\"}],\"t\":\"VlLs\"}},\"t\":\"Objc\"}}","{\"classID\":\"SoFi\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Nrml\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},"+aF.Q5.nH+"}","{\"classID\":\"GrFl\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Nrml\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},"+aF.Q5.I+"}","{\"classID\":\"patternFill\",\"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Nrml\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},"+aF.Q5.Li+"}","{\"classID\":\"OrGl\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Scrn\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\": 75},\"t\":\"UntF\"},\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":255,\"t\":\"doub\"},\"Grn\":{\"v\":255,\"t\":\"doub\"},\"Bl\":{\"v\":189,\"t\":\"doub\"}},\"t\":\"Objc\"},\"GlwT\":{\"v\":{\"BETE\":\"SfBL\"},\"t\":\"enum\"},\"Ckmt\":{\"v\":{\"type\":\"#Pxl\",\"val\":0},\"t\":\"UntF\"},\"blur\":{\"v\":{\"type\":\"#Pxl\",\"val\":5},\"t\":\"UntF\"},\"Nose\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"ShdN\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"AntA\":{\"v\":false,\"t\":\"bool\"},\"TrnS\":{\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"v\":\"Linear\",\"t\":\"TEXT\"},\"Crv\":{\"v\":[{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":0,\"t\":\"doub\"},\"Vrtc\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":255,\"t\":\"doub\"},\"Vrtc\":{\"v\":255,\"t\":\"doub\"}},\"t\":\"Objc\"}],\"t\":\"VlLs\"}},\"t\":\"Objc\"},\"Inpr\":{\"v\":{\"type\":\"#Prc\",\"val\":50},\"t\":\"UntF\"}}","{\"classID\":\"DrSh\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Mltp\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\": 57},\"t\":\"UntF\"},\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":  0,\"t\":\"doub\"},\"Grn\":{\"v\":  0,\"t\":\"doub\"},\"Bl\":{\"v\":  0,\"t\":\"doub\"}},\"t\":\"Objc\"},\"uglg\":{\"v\":true ,\"t\":\"bool\"},\"lagl\":{\"v\":{\"type\":\"#Ang\",\"val\":120},\"t\":\"UntF\"},\"Dstn\":{\"v\":{\"type\":\"#Pxl\",\"val\":27},\"t\":\"UntF\"},\"Ckmt\":{\"v\":{\"type\":\"#Pxl\",\"val\":0},\"t\":\"UntF\"},\"blur\":{\"v\":{\"type\":\"#Pxl\",\"val\":13},\"t\":\"UntF\"},\"Nose\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"AntA\":{\"v\":false,\"t\":\"bool\"},\"TrnS\":{\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"v\":\"Lineární\",\"t\":\"TEXT\"},\"Crv\":{\"v\":[{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":0,\"t\":\"doub\"},\"Vrtc\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":255,\"t\":\"doub\"},\"Vrtc\":{\"v\":255,\"t\":\"doub\"}},\"t\":\"Objc\"}],\"t\":\"VlLs\"}},\"t\":\"Objc\"},\"layerConceals\":{\"v\":true,\"t\":\"bool\"},\"Cntn\":{\"v\":false,\"t\":\"bool\"}}","{\"classID\":\"St3D\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Nrml\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":255,\"t\":\"doub\"},\"Grn\":{\"v\":  0,\"t\":\"doub\"},\"Bl\":{\"v\":  0,\"t\":\"doub\"}},\"t\":\"Objc\"},\"uglg\":{\"v\":false,\"t\":\"bool\"},\"Angl\":{\"v\":{\"type\":\"#Ang\",\"val\": 90},\"t\":\"UntF\"},\"Dstn\":{\"v\":{\"type\":\"#Pxl\",\"val\":27},\"t\":\"UntF\"},\"Srnk\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},  \"lagl\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Ang\",\"val\":90}},\"Lald\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Ang\",\"val\":90}},\"Drkn\":{\"v\":{\"type\":\"#Prc\",\"val\":25},\"t\":\"UntF\"} }"];
aF.I={types:"Lnr Rdl Angl Rflc Dmnd shapeburst".split(" "),names:[[19,0,0],[19,0,1],[19,0,2],[19,0,3],[19,0,4],[19,0,5]]};
aF.stroke={types:["InsF","CtrF","OutF"],names:[[19,5,2],[19,5,1],[19,5,0]],v7:["SClr","GrFl","Ptrn"],aoK:[[13,0],[12,37],[12,62]]};
aF.mJ={types:["SfBL","PrBL"],names:[[19,1,0],[19,1,1]],att:["SrcC","SrcE"],ay_:[[19,5,1],[12,69]]};aF.W6={types:["OtrB","InrB","Embs","PlEb","strokeEmboss"],style:[[19,2,0],[19,2,1],[19,2,2],[19,2,3],[19,2,4]],ao3:["SfBL","PrBL","Slmt"],abi:[[19,3,0],[19,3,1],[19,3,2]],dir:[[19,4,0],[19,4,1]]};
aF.XM={Sw:["strokeStyleButtCap","strokeStyleRoundCap","strokeStyleSquareCap"],xS:["strokeStyleAlignInside","strokeStyleAlignCenter","strokeStyleAlignOutside"],join:["strokeStyleMiterJoin","strokeStyleRoundJoin","strokeStyleBevelJoin"],R7:["solidColorLayer","gradientLayer","patternLayer"],default:{classID:"strokeStyle",strokeStyleVersion:{t:"long",v:2},strokeEnabled:{t:"bool",v:!1},fillEnabled:{t:"bool",v:!1},strokeStyleLineWidth:{t:"UntF",v:{type:"#Pxl",val:1}},strokeStyleLineDashOffset:{t:"UntF",v:{type:"#Pnt",val:0}},strokeStyleMiterLimit:{t:"doub",v:100},strokeStyleLineCapType:{t:"enum",v:{strokeStyleLineCapType:"strokeStyleButtCap"}},strokeStyleLineJoinType:{t:"enum",v:{strokeStyleLineJoinType:"strokeStyleMiterJoin"}},strokeStyleLineAlignment:{t:"enum",v:{strokeStyleLineAlignment:"strokeStyleAlignCenter"}},strokeStyleScaleLock:{t:"bool",v:!1},strokeStyleStrokeAdjust:{t:"bool",v:!1},strokeStyleLineDashSet:{t:"VlLs",v:[]},strokeStyleBlendMode:{t:"enum",v:{BlnM:"Nrml"}},strokeStyleOpacity:{t:"UntF",v:{type:"#Prc",val:100}},strokeStyleContent:{t:"Objc",v:JSON.parse("{\"classID\":\"solidColorLayer\","+aF.Q5.nH+"}")},strokeStyleResolution:{t:"doub",v:72}},$H:function(x,Q){var c=JSON.parse(aF.XM.a5n);
if(x)c.fillEnabled.v=!0;if(Q)c.strokeEnabled.v=!0;return c},bh:function(x,Q,c){if(Q==null)Q={};if(c==null)c=1;
var $=x.strokeStyleLineDashSet.v,z=Q.lwidth=x.strokeStyleLineWidth.v.val*c;Q.mlimit=x.strokeStyleMiterLimit.v;
Q.doff=x.strokeStyleLineDashOffset.v.val;Q.ljoin=aF.XM.join.indexOf(x.strokeStyleLineJoinType.v.strokeStyleLineJoinType);
Q.lcap=aF.XM.Sw.indexOf(x.strokeStyleLineCapType.v.strokeStyleLineCapType);Q.sal=aF.XM.xS.indexOf(x.strokeStyleLineAlignment.v.strokeStyleLineAlignment);
Q.dash=[];for(var F=0;F<$.length;F++)Q.dash.push($[F].v.val*z);if(Q.dash.length==1&&Q.dash[0]==0)Q.dash=[];
return Q},write:function(x,Q,c){var $=Q.lwidth,z=Q.mlimit,j=Q.dash,U=Q.doff,i=Q.ljoin,b=Q.lcap;if($!=null)$=x.strokeStyleLineWidth.v.val=Math.max(.4,$*c);
else $=x.strokeStyleLineWidth.v.val;if(z!=null)x.strokeStyleMiterLimit.v=z;if(j!=null)x.strokeStyleLineDashSet.v=en.xo(j,c/$);
if(U!=null)x.strokeStyleLineDashOffset.v.val=U;if(i!=null)x.strokeStyleLineJoinType.v.strokeStyleLineJoinType=aF.XM.join[i];
if(b!=null)x.strokeStyleLineCapType.v.strokeStyleLineCapType=aF.XM.Sw[b]}};aF.XM.a5n=JSON.stringify(aF.XM.default);
aF.xV={bh:function(x,Q,c){if(Q==null)Q={};var $=Q.lwidth=x.aAV*c,z=x.Pb.slice(0);for(var F=0;F<z.length;
F++)z[F]*=$;Q.mlimit=x.alu;Q.doff=x.alU;Q.ljoin=x.atc;Q.lcap=x.akI;Q.sal=x.aBC;Q.dash=z;if(Q.dash.length==1&&Q.dash[0]==0)Q.dash=[];
return Q},write:function(x,Q,c){var $=Q.lwidth*c,z=Q.mlimit,j=Q.dash.slice(0),U=Q.doff,i=Q.ljoin,b=Q.lcap;
x.aAV=$;x.alu=z;x.Pb=j;for(var F=0;F<j.length;F++)j[F]*=c/$;x.alU=U;x.atc=i;x.akI=b;x.aBC=1},$H:function(){return{aA:[1,1,1],sf:[0,0,0],aAV:1,alu:0,Pb:[],alU:0,atc:0,akI:0,aBC:1}}};
aF.XT=function(x){var Q=x.strokeEnabled.v,c=x.strokeStyleContent.v;return Q?{bf:1+aF.XM.R7.indexOf(c.classID),WB:c}:{bf:0}};
aF.dz=function(x,Q){var c=Q.bf;x.strokeEnabled.v=c!=0;if(c!=0){x.strokeStyleContent.v=Q.WB;Q.WB.classID=aF.XM.R7[c-1]}};
aF.L$=function(x){var Q=x.vstk,c=null;if(Q&&!Q.fillEnabled.v)c={bf:0};else if(x.SoCo)c={bf:1,WB:x.SoCo};
else if(x.GdFl)c={bf:2,WB:x.GdFl};else if(x.PtFl)c={bf:3,WB:x.PtFl};return c};aF.C4=function(x,Q){var c=x.vmsk,$=x.vstk,z=Q.bf;
if($)$.fillEnabled.v=z!=0;if(z>0){var j=["SoCo","GdFl","PtFl"][z-1];for(var F=0;F<3;F++)delete x[["SoCo","GdFl","PtFl"][F]];
x[j]=Q.WB}};aF.Y3=[{classID:"null",Clr:JSON.parse(aF.lF[5]).Clr},{classID:"null",Grad:JSON.parse(aF.lF[6]).Grad,Dthr:{t:"bool",v:!1},Rvrs:{t:"bool",v:!1},Angl:{t:"UntF",v:{type:"#Ang",val:0}},Type:{t:"enum",v:{GrdT:"Lnr"}},Algn:{t:"bool",v:!0},Scl:{t:"UntF",v:{type:"#Prc",val:100}},Ofst:{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Prc",val:0}},Vrtc:{t:"UntF",v:{type:"#Prc",val:0}}}}},{classID:"null",Ptrn:JSON.parse(aF.lF[7]).Ptrn,Algn:{v:!0,t:"bool"},Scl:{v:{type:"#Prc",val:100},t:"UntF"},Angl:{v:{type:"#Ang",val:0},t:"UntF"},phase:{v:{classID:"Pnt",Hrzn:{v:0,t:"doub"},Vrtc:{v:0,t:"doub"}},t:"Objc"}}];
var en={};en.nA=function(x,Q){function c(x,g){if(x==null||!x.masterFXSwitch.v)return null;var R=x[g].v,T;
if(R.length!=0){T=R[0].v;if(!T.enab.v)T=null}return T}var $=Q.SoCo,z=Q.GdFl,j=c(x,"solidFillMulti"),U=c(x,"gradientFillMulti");
if(j==null&&U==null)return[$,z];var i=en.aAS;if($&&j&&U==null){var b=JSON.parse(JSON.stringify($));b.Clr.v=i(j.Clr.v,$.Clr.v,j);
return[b,null]}if(z&&j&&U==null){var e=JSON.parse(JSON.stringify(z)),k=e.Grad.v.Clrs.v;for(var F=0;F<k.length;
F++){var K=k[F].v.Clr;K.v=i(j.Clr.v,K.v,j)}return[null,e]}if($&&U){var e=JSON.parse(JSON.stringify(U)),k=e.Grad.v.Clrs.v;
for(var F=0;F<k.length;F++){var K=k[F].v.Clr;K.v=i(K.v,$.Clr.v,U)}return[null,e]}return[j,U]};en.uF={Kk:d.R(4),c9:d.R(4),Z:new gh(0,0,1,1)};
en.aAS=function(x,Q,c){var $=cq.Rg(c.Md.v.BlnM),z=c.Opct.v.val/100,j=en.uF;x=d.I.Du(x);Q=d.I.Du(Q);j.Kk[0]=x.Z;
j.Kk[1]=x.r;j.Kk[2]=x.J;j.Kk[3]=255;j.c9[0]=Q.Z;j.c9[1]=Q.r;j.c9[2]=Q.J;j.c9[3]=255;d.l.UY($,j.Kk,j.Z,j.c9,j.Z,j.Z,z);
return{classID:"RGBC",Rd:{t:"doub",v:j.c9[0]},Grn:{t:"doub",v:j.c9[1]},Bl:{t:"doub",v:j.c9[2]}}};en.awa=function(x,Q,c){var $=x;
x=x.slice(0);var z=cq.X$[cq.hg.indexOf(Q.Md.v.BlnM)],j=d.I.Du(Q.Clr.v),U=4278190080|Math.round(j.J)<<16|Math.round(j.r)<<8|Math.round(j.Z),i=d.R(c.P()*4);
d.h4(i,U);d.l.UY(z,i,c,x,c,c,Q.Opct.v.val/100);for(var F=0;F<x.length;F+=4)x[F+3]=$[F+3];return x};en.pa=function(x,Q){var c=["Sz","blur","Sftn","Dstn"];
for(var F=0;F<aF.order.length;F++){var $=aF.order[F],z=x[aF.mh[F]].v;for(var j=0;j<z.length;j++){var U=z[j].v;
for(var i=0;i<c.length;i++){var b=U[c[i]];if(b){var e=b.v.val,k=e;k=Math.max(e==0?0:1,k*Q);if($=="ChFX")k=Math.min(k,250);
if($=="ebbl"){if(c[i]=="blur")k=Math.min(k,250);if(c[i]=="Sftn")k=Math.min(k,16)}b.v.val=Math.round(k)}}if($=="ebbl"||$=="patternFill"||$=="FrFX")if(U.Ptrn&&U.Scl)U.Scl.v.val=Math.max(1,Math.min(1e3,U.Scl.v.val*Q))}}};
en.a02=function(x,Q,c){var $=new gh(-.5,-.5,1,1);for(var F=0;F<aF.order.length;F++){var z=aF.order[F],j=x[aF.mh[F]].v;
for(var U=0;U<j.length;U++){var i=j[U].v,K;if(!i.enab.v)continue;var b=i.blur?i.blur.v.val+1:0,e=i.Ckmt?i.Ckmt.v.val/100:0,k=Math.round(b*e);
if(z=="DrSh"||z=="IrSh"&&c){K=new gh(-.5,-.5,1,1);K.ss(b,b);en.Zl(K,i,Q,0)}if(z=="St3D"){K=new gh(-.5,-.5,1,1);
en.Zl(K,i,Q,Math.PI,"Angl")}if(z=="OrGl"||z=="IrGl"&&c){K=new gh(-.5,-.5,1,1);K.ss(b,b)}if(z=="FrFX"){var g=en.dn(i),R=g[1];
if(c)R=Math.max(g[0],R);K=new gh(-.5,-.5,1,1);K.ss(Math.ceil(R),Math.ceil(R))}if(z=="ebbl"){var b=i.blur.v.val,T=i.bvlS.v.BESl;
if(T=="Embs"||T=="PlEb")b/=2;var D=["OtrB","InrB","Embs","PlEb","strokeEmboss"],a=["SfBL","PrBL","Slmt"],_=["In","Out"],I=i.bvlT.v.bvlT!="SfBL"?b:b*.43,f=Math.round(b);
K=new gh(-f-1,-f-1,2*f+2,2*f+2)}if(c&&z=="ChFX"){K=new gh(-.5,-.5,1,1);K.ss(b,b);var y=K.clone();en.Zl(K,i,Q,0);
en.Zl(y,i,Q,Math.PI);K=K.iO(y)}if(K)$=$.iO(K)}}if($.x!=Math.ceil($.x)){$.x=Math.ceil($.x);$.m-=1}if($.y!=Math.ceil($.y)){$.y=Math.ceil($.y);
$.e-=1}$.m=Math.floor($.m);$.e=Math.floor($.e);return $};en.dn=function(x){var Q,c,$=0,z=0;if(x.Sz){Q=x.Sz.v.val;
c=aF.stroke.types.indexOf(x.Styl.v.FStl)}else{Q=x.Wdth.v;c=["Insd","Cntr","Otsd"].indexOf(x.Lctn.v.StrL)}if(c==0)$=Q;
if(c==1)$=z=Q/2;if(c==2)z=Q;return[$,z]};en.aDk=function(x){if(eV.Mx&&x.wT==null){x.wT=new eV.PT(x.oj.m,x.oj.e);
x.wT.set(x.AX);delete x.AX;if(x.A$){x.d2=new eV.X7(x.oj.m,x.oj.e);x.d2.set(x.A$);delete x.A$}if(x.Cc){x.jV=new eV.X7(x.oj.m,x.oj.e);
x.jV.set(x.Cc);delete x.Cc}}};en.a8_=function(x){if(x.wT)x.wT.delete();if(x.d2)x.d2.delete();if(x.jV)x.jV.delete()};
en.arR=function(x){if(x.all==null)return;for(var F=0;F<x.all.length;F++){en.a8_(x.all[F])}};en.a9A=function(x,Q,c,$,z,j){var U=en.wH(c,$,x,Q,z,j);
for(var F=0;F<U.all.length;F++)en.aDk(U.all[F]);return U};en.anJ=function(x){for(var F=0;F<aF.order.length;
F++){var Q=aF.order[F],c=aF.mh[F],$=x[c].v;for(var z=0;z<$.length;z++){var j=$[z].v;if(j.enab.v&&["patternFill","GrFl","SoFi"].indexOf(Q)==-1)return!0}}return!1};
en.wH=function(x,Q,c,$,z,j){if(j==null)j=$;var U=0,i=0;for(var F=0;F<aF.order.length;F++){var b=aF.order[F],e=aF.mh[F],k=x[e].v;
for(var K=0;K<k.length;K++){var g=k[K].v;if(b=="DrSh"&&g.enab.v&&g.Ckmt.v.val>0&&g.blur.v.val>0)U=Math.max(U,Math.ceil(g.Ckmt.v.val*g.blur.v.val/100));
if(b=="OrGl"&&g.enab.v&&g.Ckmt.v.val>0&&g.blur.v.val>0&&g.GlwT.v.BETE=="SfBL")U=Math.max(U,Math.ceil(g.Ckmt.v.val*g.blur.v.val/100));
if(b=="OrGl"&&g.enab.v&&g.blur.v.val>0&&g.GlwT.v.BETE=="PrBL")U=Math.max(U,g.blur.v.val);if(b=="FrFX"&&g.enab.v&&g.Sz.v.val>0){if(g.Styl.v.FStl=="OutF")U=Math.max(U,g.Sz.v.val);
if(g.Styl.v.FStl=="CtrF")U=Math.max(U,Math.ceil(g.Sz.v.val/2));i=Math.max(i,en.dn(g)[1])}}}var R=new en.Yk(c,$,U,en.anJ(x)),T=-$.x,D=-$.y,a={type:{},all:[]};
for(var _=0;_<aF.order.length;_++){var b=aF.order[_],e=aF.mh[_];a.type[b]=[];for(var I=x[e].v.length-1;
I>=0;I--){var f=x[e].v[I].v,G;if(!f.enab.v)continue;var y=f.blur?f.blur.v.val:0,Z=f.Ckmt?f.Ckmt.v.val/100:0,v=y*Z;
if(b=="St3D"){var q=Math.max(1e-4,1-f.Srnk.v.val/100),O=2,eN=0;function h(r,e9,f){var dq=f.Angl.v.val;
dq*=Math.PI/180;var m=f.Dstn.v.val,av=Math.cos(dq)*m,i8=-Math.sin(dq)*m,hC=q+e9*(1-q),kD=new bI;kD.translate(-r.m/2,-r.e/2);
kD.scale(hC,hC);kD.translate(r.m/2,r.e/2);kD.translate((1-e9)*av,(1-e9)*i8);return kD}var r=$.clone(),H=c;
r.x=r.y=0;var o=Date.now(),P=r.clone();P.ss(O,O);var p=d.R(P.P());d.L2(H,r,p,P);P.x=P.y=0;d.yg.ZA(p,p,P,2);
var C=d.R(P.P()*4);C.fill(255);d.ZM(p,C);var W=d.R(r.P()),J=r.m,t=r.e,Y=P.m,l=en.axX(f,z),m=Math.cos(l[1]),B=-Math.cos(l[0])*m,L=Math.sin(l[0])*m;
if(Math.abs(B)<.001&&Math.abs(L)<.001)B=L=0;for(var A=0;A<t;A++)for(var S=0;S<J;S++){var F=(A+O)*Y+S+O,M=p[F+1]-p[F-1],N=p[F+Y]-p[F-Y],s=M*M+N*N;
if(s>10){var V=1/Math.sqrt(s);W[A*J+S]=Math.max(0,Math.min(255,128+127*(B*V*M+L*V*N)))}}var g8=[H,r],n=h(r,0,f),cQ=d.A.Hg(r).j,hk=cQ.slice(0);
d.A.i(cQ,n,hk);var eG=r.iO(d.A.cl(hk)),ie=d.R(eG.P()*4);for(var F=0;F<8;F+=2){var M=cQ[F]-hk[F],N=cQ[F+1]-hk[F+1];
eN=Math.max(eN,Math.sqrt(M*M+N*N))}var gr=Math.round(eN/2),ek=d.I.Du(f.Clr.v);ek.Z/=255;ek.r/=255;ek.J/=255;
var jK=f.Drkn.v.val/100;for(var iE=0;iE<gr;iE++){var e9=iE/gr,dm=1-jK+e9*jK,kD=h(r,e9,f),gJ=r.clone(),dR=H;
if(q!=1){var fO=X.Y.BG(g8,kD);gJ=fO.rect;dR=fO.channel}else{var ko=kD.RE(new bC(0,0));gJ.x+=Math.round(ko.x);
gJ.y+=Math.round(ko.y)}var d8=d.R(gJ.P()*4);if(B!=0||L!=0){var fj=gJ.m,ja=gJ.e,eD=ek.Z,d3=ek.r,fP=ek.J,jE=kD.clone();
jE.HQ();var cR=jE.RE(new bC(.5,.5)),ex=jE.RE(new bC(1.5,1.5)),M=ex.x-cR.x,N=ex.y-cR.y;for(var A=0;A<ja;
A++){for(var S=0;S<fj;S++){var F=A*fj+S,er=F*4,cE=Math.max(0,Math.min(J-1,~~(.5+M*S))),a7=Math.max(0,Math.min(t-1,~~(.5+N*A))),dl=W[a7*J+cE],hl=-1+2*dl*(1/255),f4=-hl,em=0;
if(hl>0){f4=0;em=hl}d8[er]=255*(1-f4)*(em+(1-em)*eD)*dm;d8[er+1]=255*(1-f4)*(em+(1-em)*d3)*dm;d8[er+2]=255*(1-f4)*(em+(1-em)*fP)*dm}}}else en.vq(d8,f.Clr.v,null,dm);
d.Dm(dR,d8,3);d.l.UY("norm",d8,gJ,ie,eG,gJ,1)}G={AX:ie,oj:eG}}else if(b=="DrSh"){var e$=R._i(v,y-v,!0),iP=e$.XC,b2=e$.W4.clone();
en.Ju(iP,f,!1);if(f.Cntn&&f.Cntn.v){var k7=new gh;en.Zl(k7,f,z,0);var at=b2.clone();at.offset(-k7.x,-k7.y);
at=at.iO(b2);var ju=d.R(at.P());d.L2(iP,b2,ju,at);var jL=Math.sqrt(k7.x*k7.x+k7.y*k7.y),fJ=iP.slice(0);
for(var F=0;F<jL-1;F++){var M=Math.round(-k7.x*F/jL),N=Math.round(-k7.y*F/jL),h6=e$.W4.clone();h6.offset(M,N);
d.aud(fJ,h6,ju,at)}iP=ju;b2=at}b2.offset(T,D);en.Zl(b2,f,z,0);var ie=d.R(b2.P()*4);en.vq(ie,f.Clr.v);
d.Dm(iP,ie,3);G={AX:ie,oj:b2,a8U:f.layerConceals.v}}else if(b=="IrSh"){var e$=R._i(v,y-v,!1);en.Zl(e$.W4,f,z,0);
var b2=R.rect().clone(),iP=d.R(b2.P());iP.fill(255);d.L2(e$.XC,e$.W4,iP,b2);en.Ju(iP,f,!0,!0);var ie=d.R(b2.P()*4);
en.vq(ie,f.Clr.v);d.Dm(iP,ie,3);b2.offset(T,D);G={AX:ie,oj:b2}}else if(b=="GrFl"){var ie=d.R(R.rect().P()*4);
en.OW(f,ie,R.rect(),z,null,j);var b2=R.rect().clone();b2.offset(T,D);G={AX:ie,oj:b2}}else if(b=="SoFi"){var ie=d.R(R.XC().length*4);
en.vq(ie,f.Clr.v);var b2=R.rect().clone();b2.offset(T,D);G={AX:ie,oj:b2}}else if(b=="ebbl"){var iq=!1;
if(iq)console.log(f);var o=Date.now(),iI=o,dM=f.bvlS.v.BESl;if(dM=="strokeEmboss"){var ik=x.frameFXMulti.v;
if(ik.length==0)continue;ik=ik[0].v;if(!ik.enab.v)continue;var jp=ik.Styl.v.FStl;if(jp=="OutF")dM="OtrB";
if(jp=="CtrF")dM="Embs";if(jp=="InsF")dM="InrB"}var y=f.blur.v.val;if(y==0)y=.7;if(dM=="Embs"||dM=="PlEb")y/=2;
var eA=["OtrB","InrB","Embs","PlEb","strokeEmboss"],k8=["SfBL","PrBL","Slmt"],ay=["In","Out"],bK=f.bvlT.v.bvlT!="SfBL"?y:y*.45,a4=Math.round(y),h_=R.rect().clone(),bj=h_.clone();
bj.ss(a4,a4);var J=bj.m,t=bj.e,gs=J*t,bs=d.R(gs);d.L2(R.XC(),h_,bs,bj);var e3=d.style.Jw(bs,J,t);d.HQ(bs);
var jA=d.style.Jw(bs,J,t);if(iq)console.log("distTransform computed",Date.now()-o);o=Date.now();for(var F=0;
F<gs;F++){var kn=jA[F]-e3[F];if(kn<-bK)kn=-bK;else if(kn>bK)kn=bK;jA[F]=kn}if(iq)console.log("summing + cropping",Date.now()-o);
o=Date.now();if(f.bvlT.v.bvlT=="SfBL"){var j6=Math.pow(y*.21,1.22);if(!0)j6=Math.max(j6,2);d.yg.U2(jA,bj,j6,2)}if(iq)console.log("blurring",Date.now()-o);
o=Date.now();var cL=jA,eb=e3;eb.set(cL);if(f.useShape.v){var dY=Math.min(100,f.Inpr.v.val+1)/100;if(dM!="OtrB"&&dM!="InrB")dY=1;
var aP=d.eu.ho(f.MpgS.v.Crv.v,2e3),ks=Math.round(2e3/dY);aP=d.eu.aE5(aP,ks,dM=="InrB");var jC=.5/bK;
for(var F=0;F<gs;F++){var ig=cL[F],cD=.99999*(ig+bK)*jC;cL[F]=-bK+2*bK*aP[~~(cD*(ks-1))]}if(iq)console.log("applying shape",Date.now()-o);
o=Date.now()}if(f.useTexture.v){var d8=d.R(J*t*4);en.nz(f,d8,bj,z.add.Patt,Q);var eB=d.R(J*t);d._8(d8,eB);
d.yg.asP(eB,eB,bj,1);var c1=y*f.textureDepth.v.val*(1/100)*(1/255);if(f.InvT.v)c1=-c1;for(var F=0;F<gs;
F++)cL[F]+=-c1*eB[F];if(iq)console.log("applying texture",Date.now()-o);o=Date.now()}var l=en.axX(f,z),dq=l[0],b$=l[1],B=Math.cos(dq)*Math.cos(b$),L=-Math.sin(dq)*Math.cos(b$),d7=Math.sin(b$),he=dM=="PlEb",k4=new Float32Array(gs),a6=k4;
k4.fill(d7);if(he){a6=new Float32Array(gs);a6.fill(d7)}var cK=(f.bvlT.v.bvlT=="SfBL"?1:.5)*(f.bvlD.v.BESs=="In"?1:-1)*f.srgR.v.val/100,ds=-.125*cK;
for(var A=0;A<t;A++){var iy=A==0?0:-J,gu=A==t-1?0:J,F=A*J;for(var S=0;S<J;S++,F++){var gL=S==0?F:F-1,dc=S==J-1?F:F+1,M=cL[dc]-cL[gL],N=cL[F+gu]-cL[F+iy],aT=1;
if(M==0&&N==0)continue;var aQ=cL[gL+iy],ec=cL[dc+iy],gH=cL[gL+gu],ap=cL[dc+gu],gj=ds*(ec+2*M+ap-aQ-gH),fx=ds*(gH+2*N+ap-aQ-ec),bL=1/Math.sqrt(gj*gj+fx*fx+1);
gj*=bL;fx*=bL;aT*=bL;var kr=gj*B+fx*L+aT*d7;k4[F]=Math.max(0,kr);if(!he)continue;var jS=-gj*B-fx*L+aT*d7;
a6[F]=Math.max(0,jS)}}if(iq)console.log("raycasting",Date.now()-o);o=Date.now();if(f.Sftn.v.val!=0){d.yg.U2(k4,bj,f.Sftn.v.val*.43,2);
if(he)d.yg.U2(a6,bj,f.Sftn.v.val*.43,2)}if(iq)console.log("softening",Date.now()-o);o=Date.now();var bE=en.OO(f.hglC.v,0),gl=en.OO(f.sdwC.v,0),dC=new Uint8Array(k4.buffer),ci=new Uint32Array(dC.buffer),kC=new Uint8Array(cL.buffer),aI=new Uint32Array(kC.buffer),fB=dC,cO=kC,bY=ci,fS=aI;
if(he){fB=new Uint8Array(a6.buffer);bY=new Uint32Array(fB.buffer);cO=new Uint8Array(eb.buffer);fS=new Uint32Array(cO.buffer)}var i_=1/d7,dv=1/(1-d7),jC=1/bK,aP=d.eu.ho(f.TrnS.v.Crv.v,1024),g1=new Float32Array(2500);
for(var F=0;F<2500;F++){var S=Math.max(0,Math.min(1,(F-500)*.001));g1[F]=Math.pow(S,.2)}for(var A=0;
A<t;A++)for(var S=0;S<J;S++){var F=A*J+S,jo=4*F+3,eS=~~(k4[F]*1023),gX=aP[eS],fT=(eb[F]+bK*.993)*jC,gm=g1[~~(500+fT*1e3)],hq=gm*(1-Math.min(1,gX*i_)),bD=gm*(1-Math.min(1,(1-gX)*dv));
aI[F]=~~(.5+255*hq)<<24|gl;ci[F]=~~(.5+255*bD)<<24|bE;if(!he)continue;var dj=aP[~~(a6[F]*1023)],g3=gm*(1-Math.min(1,dj*i_)),ja=gm*(1-Math.min(1,(1-dj)*dv));
fS[F]=~~(.5+255*g3)<<24|gl;bY[F]=~~(.5+255*ja)<<24|bE}if(iq)console.log("baking textures",Date.now()-o);
o=Date.now();bj=R.rect().clone();bj.ss(a4,a4);bj.offset(T,D);G={awG:f.bvlS.v.BESl=="strokeEmboss"};var dF=cq.Rg(f.hglM.v.BlnM),e1=f.hglO.v.val/100,fE=cq.Rg(f.sdwM.v.BlnM),cl=f.sdwO.v.val/100;
if(["InrB","Embs","PlEb"].indexOf(dM)!=-1){G.$p={AX:dC,oj:bj,iu:dF,Ym:e1};G.yx={AX:kC,oj:bj,iu:fE,Ym:cl}}if(["OtrB","Embs","PlEb"].indexOf(dM)!=-1){G.lx={AX:fB,oj:bj,iu:dF,Ym:e1};
G.gX={AX:cO,oj:bj,iu:fE,Ym:cl}}if(iq)console.log(Date.now()-iI)}else if(b=="patternFill"){var i1=R.rect(),ie=d.R(i1.P()*4);
en.nz(f,ie,i1,z.add.Patt,Q);var b2=i1.clone();b2.offset(T,D);G={AX:ie,oj:b2}}else if(b=="ChFX"){var ie=d.R(R.XC().length*4);
en.vq(ie,f.Clr.v);var y=f.blur.v.val,cU=R.rect().clone();cU.ss(y,y);var hb=d.R(cU.P()),gw=d.R(cU.P());
d.L2(R.XC(),R.rect(),gw,cU);d.yg.ZA(gw,hb,cU,y*.43);var kf=d.eu.WN(f.MpgS.v.Crv.v,256,!0);d.ad5(hb,kf);
var f3=d.R(R.XC().length),kq=d.R(R.XC().length),kt=R.rect().clone();en.Zl(kt,f,z,0);d.L2(hb,cU,f3,kt);
kt=R.rect().clone();en.Zl(kt,f,z,Math.PI);d.L2(hb,cU,kq,kt);var ho=f3.length;for(var F=0;F<ho;F++)ie[4*F+3]=Math.abs(f3[F]-kq[F]);
if(f.Invr.v)for(var F=0;F<ho;F++)ie[4*F+3]=255-ie[4*F+3];var b2=R.rect().clone();b2.offset(T,D);G={AX:ie,oj:b2}}else if(b=="OrGl"){var e$;
if(f.GlwT.v.BETE=="SfBL")e$=R._i(v,y-v,!0);else e$=R.aea(y,Z,!0);var iP=e$.XC,b2=e$.W4,aR=iP.slice(0);
en.as_(iP,f);var ie=d.R(b2.P()*4);if(f.Grad==null){en.vq(ie,f.Clr.v);en.Ju(iP,f,!1)}else{en.Ju(iP,f,null);
var co={Tu:iP,b$:255,Mr:0,I$:b2};en.OW(f,ie,b2,z,co);var iD=f.Nose.v.val/100,ir=b2.m;for(var F=0;F<aR.length;
F++){var j$=255,dn=aR[F];if(dn<32){var fT=(dn+aR[F-1]+aR[F+1]+aR[F-ir]+aR[F+ir])*.2-1;j$=Math.min(255,Math.round(Math.max(0,fT)*8))}iP[F]=j$}en.ar8(iP,f)}d.Dm(iP,ie,3);
b2.offset(T,D);G={AX:ie,oj:b2}}else if(b=="IrGl"){var e$;if(f.GlwT.v.BETE=="SfBL")e$=R._i(v,y-v,!1);
else e$=R.aea(y,Z,!1);var iP=e$.XC,b2=e$.W4;en.as_(iP,f);if(f.glwS.v.IGSr=="SrcC")d.HQ(iP);var ie=d.R(b2.P()*4);
if(f.Grad==null){en.vq(ie,f.Clr.v);en.Ju(iP,f,!0)}else{en.Ju(iP,f,null);var co={Tu:iP,b$:255,Mr:0,I$:b2};
en.OW(f,ie,b2,z,co);iP.fill(255);en.ar8(iP,f)}d.Dm(iP,ie,3);b2.offset(T,D);G={AX:ie,oj:b2}}else if(b=="FrFX"){var gC=en.dn(f),iC=gC[0],bU=gC[1],b2=R.rect().clone(),eJ=null,ia=null;
b2.ss(Math.ceil(i),Math.ceil(i));if(bU>0){var e$=R._i(bU,0,!0);ia=e$.XC;if(ia.length<b2.P()){ia=d.R(b2.P());
d.L2(e$.XC,e$.W4,ia,b2)}}if(iC>0){var e$=R._i(iC,0,!1);eJ=d.R(b2.P());eJ.fill(255);d.L2(e$.XC,e$.W4,eJ,b2)}b2.offset(T,D);
var ie=d.R(b2.P()*4),dP=f.PntT.v.FrFl;if(dP=="SClr")en.vq(ie,f.Clr.v);if(dP=="GrFl")en.OW(f,ie,b2,z,R.asY(iC,bU));
if(dP=="Ptrn")en.nz(f,ie,b2,z.add.Patt,Q);var bu=f.overprint,jB=bu?bu.v:!1;if(jB){var jw=eJ?eJ:ia;if(eJ&&ia)d.NE.y_(eJ,ia,jw);
d.Dm(jw,ie,3)}G={AX:ie,oj:b2,Cc:ia,A$:eJ,apz:jB}}a.type[b].push(G);if(b=="ebbl"){if(G.$p)a.all.push(G.$p,G.yx);
if(G.lx)a.all.push(G.lx,G.gX)}else{G.iu=cq.Rg(f.Md.v.BlnM);G.Ym=f.Opct.v.val/100,a.all.push(G)}}}return a};
en.H9=function(x){var Q=1/Math.sqrt(x.x*x.x+x.y*x.y+x.wP*x.wP);x.x*=Q;x.y*=Q;x.wP*=Q};en.a8S=function(x,Q){return{x:x.y*Q.wP-x.wP*Q.y,y:x.wP*Q.x-x.x*Q.wP,wP:x.x*Q.y-x.y*Q.x}};
en.a45=function(x,Q){return x.x*Q.x+x.y*Q.y+x.wP*Q.wP};en.ar8=function(x,Q){var c=Q.Nose.v.val/100;if(c>0)for(var F=0;
F<x.length;F++){var $=x[F];$=Math.min(510-(1+c)*d.style.xk(F),$);x[F]=$}};en.h6=function(x){var Q=en.co(),c=x.uJ,$=!1;
for(var F=0;F<32;F+=8)if(c[F]+c[F+1]+c[F+4]+c[F+5]!=0||c[F+2]+c[F+3]+c[F+6]+c[F+7]!=1020)$=!0;if($){c=c.slice(0);
for(var F=0;F<40;F+=4){var z=c[F]/255,j=c[F+1]/255,U=c[F+2]/255,i=c[F+3]/255;c[F]=z-.001;c[F+1]=z==j?1e6:1/(j-z);
c[F+2]=U==i?-1e6:1/(U-i);c[F+3]=i+.001}}var b=x.add.iOpa!=null?x.add.iOpa/255:Q.fill,e=x.add.vstk;if(e&&!e.fillEnabled.v&&(!e.strokeEnabled.v||e.strokeStyleLineWidth.v.val==0))b=0;
return{fill:b,lf:$?c:null,Od:x.add.brst!=null?x.add.brst:Q.Od,aai:x.add.knko!=null?x.add.knko:Q.aai,style:!1,N9:!1}};
en.co=function(){return{fill:1,lf:null,Od:[1,1,1],aai:0,style:!1,N9:!1}};en.a9H=function(x,Q,c,$,z,j,U,i){if(i==null)i=1;
if(U==null)U=new bI;var b=x.GD[1].m,e=x.GD[1].e,k=new bI,K=z<2;if(K)k.translate(-b/2,-e/2);if(z==0){i*=Math.max(c/b,$/e)}else if(z==1){i*=Math.min(c/b,$/e)}else if(z==2){k.scale(1/b,1/e);
k.concat(U);k.scale(c,$)}else if(z==3){i=i}k.scale(i,i);if(K)k.translate(c/2,$/2);k.concat(j);Q.Ptrn.v.Idnt.v=x.id;
Q.Scl.v.val=Math.round(100*k.c0());Q.Angl.v.val=Math.round(180*Math.atan2(-k.J,k.V)/Math.PI);Q.Algn.v=!0;
var g=Q.phase.v;g.Hrzn.v=Math.round(k.DX);g.Vrtc.v=Math.round(k.ti)};en.yr=function(x,Q){if(Q==null)return null;
var c=x.Idnt.v,$=x.Nm.v;for(var F=0;F<Q.length;F++)if(Q[F].id==c)return Q[F];for(var F=0;F<Q.length;
F++)if(Q[F].name==$)return Q[F];return null};en.a7D=function(x,Q,c){var $=["patternFillMulti","ebblMulti","frameFXMulti"];
for(var F=0;F<$.length;F++){var z=x.v[$[F]].v;for(var j=0;j<z.length;j++)if(z[j].v.Ptrn)Q.uh(en.yr(z[j].v.Ptrn.v,c))}};
en.agP=function(x,Q,c){var $=["patternFillMulti","ebblMulti","frameFXMulti"];for(var F=0;F<$.length;
F++){var z=x.v[$[F]].v;for(var j=0;j<z.length;j++)if(z[j].v.Ptrn){var U=z[j].v.Ptrn.v,i=en.yr(U,c),b=en.yr(U,Q.add.Patt);
if(i==null&&b)c.push(b)}}};en.nz=function(x,Q,c,$,z){var j=en.yr(x.Ptrn.v,$);if(j!=null&&!c._6()){var U=j.GD,i=U[0],b=U[1],e=0;
d.gk(U);var k=(x.Scl?x.Scl.v.val:100)/100;while((k<.3||k==.5)&&U[e+2]){k*=b.m/U[e+3].m;e+=2;i=U[e];b=U[e+1]}var K=d.scale.nz(i,b.m,b.e),g=x.phase?x.phase.v:{Hrzn:{v:0},Vrtc:{v:0}},R=x.Angl?x.Angl.v.val:0,T=-c.x+g.Hrzn.v-1,D=-c.y+g.Vrtc.v-1;
if(x.Algn!=null&&!x.Algn.v){}else{T+=z.x;D+=z.y}if(Q)d.scale.arB(K,Q,c.m,c.e,k,k,T+1,D+1,R*Math.PI/180);
else return[K,k,T+1,D+1,R*Math.PI/180]}};en.OW=function(x,Q,c,$,z,j){if(j==null)j=c;var U=x.Type?x.Type.v.GrdT:"shapeburst",i=x.Algn&&x.Algn.v?j:new gh(0,0,$.m,$.e),b=x.Angl?d.I.R9(x,i):[new bC(0,0),new bC(100,0)],e=b[0].x,k=b[0].y,K=b[1].x-e,g=b[1].y-k,R=Math.sqrt(K*K+g*g);
R=1/(2*R*R);var T=[K*R,g*R,-g*R,K*R],D=x.Rvrs?x.Rvrs.v:!1,a=x.Dthr?x.Dthr.v:!1;d.I.yV(x.Grad.v,Q,c,T,e,k,D,aF.I.types.indexOf(U),0,0,z,a)};
en.a3B=function(x,Q,c){for(var F=0;F<x.all.length;F++){var $=x.all[F];$.Jj=$.oj.clone();$.Jj.offset(Q,c)}};
en.a3z=function(x,Q,c,$,z,j){var U=eV.Mx?en.azu:en.aiW;en.a3B(Q,c.x,c.y);var i=Q.type.DrSh;for(var F=0;
F<i.length;F++)if(!i[F].a8U)U(i[F],$,z,j)};en.anN=function(x,Q,c,$,z,j,U,i,b,e){var k=c,K=eV.Mx?en.azu:en.aiW,g=eV.Mx?eV.l.ND:d.l.$A,R;
R=Q.type.DrSh;for(var F=0;F<R.length;F++)if(R[F].a8U)K(R[F],$,z,j);R=Q.type.St3D;for(var F=0;F<R.length;
F++)K(R[F],$,z,j);R=Q.type.OrGl;for(var F=0;F<R.length;F++)K(R[F],$,z,j);var T="patternFill GrFl SoFi ChFX IrGl IrSh".split(" ");
for(var D=0;D<T.length;D++){var R=Q.type[T[D]];for(var F=0;F<R.length;F++)K(R[F],U,k,j)}var a=Q.type.ebbl[0],_=a!=null&&a.awG;
R=Q.type.FrFX;for(var F=0;F<R.length;F++){var I=R[F];bb.q3.L2(i,e,b,e,j);K(I,b,e,j);if(_&&F==R.length-1){if(a.gX)K(a.gX,b,e,j);
if(a.lx)K(a.lx,b,e,j);if(a.yx)K(a.yx,b,e,j);if(a.$p)K(a.$p,b,e,j)}if(I.apz){if(I.A$||I.d2){K(I,U,k,j)}if(I.Cc||I.jV){K(I,$,z,j)}}else{if(I.A$||I.d2)g(b,e,U,k,eV.Mx?I.d2:I.A$,I.Jj,0,j,1);
if(I.Cc||I.jV)g(b,e,$,z,eV.Mx?I.jV:I.Cc,I.Jj,0,j,1)}}if(!_&&a!=null){if(a.gX)K(a.gX,$,z,j);if(a.lx)K(a.lx,$,z,j);
if(a.yx)K(a.yx,U,k,j);if(a.$p)K(a.$p,U,k,j)}};en.aiW=function(x,Q,c,$){var z=en.co();z.fill=x.Ym;z.style=!0;
d.l.UY(x.iu,x.AX,x.Jj,Q,c,$,1,z)};en.azu=function(x,Q,c,$){var z=en.co();z.fill=x.Ym;z.style=!0;eV.l.agw(x.iu,x.wT,x.Jj,Q,c,$,1,z)};
en.as_=function(x,Q){var c=1-Q.Inpr.v.val/100,$=1+Math.tan(c*(Math.PI/2)),z=x.length;for(var F=0;F<z;
F++)x[F]=Math.min(255,Math.round(x[F]*$))};en.Ju=function(x,Q,c,$){var z=Q.blur.v.val,j=Math.round(z*(Q.Ckmt.v.val/100));
if(z>j){var U=d.eu.WN(Q.TrnS.v.Crv.v,256,$!=!0);d.ad5(x,U)}if(c!=null&&Q.Nose.v.val>0)d.style.Sk(x,Q.Nose.v.val/100,c)};
en.OO=function(x,Q,c){if(Q==null)Q=255;var $=d.I.Du(x);if(c!=null){$.Z=Math.round($.Z*c);$.r=Math.round($.r*c);
$.J=Math.round($.J*c)}return Q<<24|$.J<<16|$.r<<8|$.Z};en.vq=function(x,Q,c,$){var z=new Uint32Array(x.buffer);
z.fill(en.OO(Q,c,$))};en.Zl=function(x,Q,c,$,z){var j=Q.uglg&&Q.uglg.v?c.FO():Q[z?z:"lagl"].v.val;j=j*Math.PI/180+$;
var U=Math.cos(j)*Q.Dstn.v.val,i=Math.sin(j)*Q.Dstn.v.val;x.x-=Math.round(U);x.y+=Math.round(i)};en.axX=function(x,Q){var c=x.uglg&&x.uglg.v?Q.FO():x.lagl.v.val;
c=c*(Math.PI/180);var $=x.uglg&&x.uglg.v?Q.dG():x.Lald.v.val;$=$*(Math.PI/180);return[c,$]};en.FH=function(x){if(x==null)return null;
var Q=x.frameFXMulti.v;if(Q.length==0)return null;Q=Q[0].v;var c=aF.XM.$H();en.aDa(Q,c);return c};en.aDa=function(x,Q){var c=aF.stroke.v7.indexOf(x.PntT.v.FrFl),$=[aF.ZS,aF.ul,aF.qK][c],z=Q.strokeStyleContent.v={classID:aF.XM.R7[c]};
for(var F=0;F<$.length;F++)z[$[F]]=x[$[F]];Q.strokeEnabled=x.enab;Q.strokeStyleLineWidth=x.Sz;Q.strokeStyleLineAlignment.v.strokeStyleLineAlignment=aF.XM.xS[aF.stroke.types.indexOf(x.Styl.v.FStl)];
Q.strokeStyleOpacity=x.Opct;Q.strokeStyleBlendMode=x.Md;Q.strokeStyleLineJoinType.v.strokeStyleLineJoinType="strokeStyleRoundJoin"};
en.xo=function(x,Q){var c=[];for(var F=0;F<x.length;F++)c.push({t:"UntF",v:{type:"#Nne",val:Math.round(x[F]*Q)}});
return c};en.apk=function(x,Q){var c=x.opacity/255*(x.add.iOpa?x.add.iOpa/255:1),$=x.add.TySh,z=x.Uy()||x.Z6()&&x.add.vmsk&&x.add.vstk.fillEnabled.v&&x.add.vstk.strokeEnabled.v;
if($){var j=$.HW.EngineDict.StyleRun.RunArray,U=j[0].StyleSheet.StyleSheetData,i=0;if(U.FillFlag)i++;
if(U.StrokeFlag)i++;if(U._FillBackgroundFlag)i++;if(i>1)z=!0}return z&&(Q||c!=1||x.s3!="pass"&&x.s3!="norm")};
en.Yk=function(x,Q,c,$){this.Am=Q.clone();this.auk=Q.clone();this.auk.ss(c,c);if($){this.Am.ss(1,1);
this.J2=d.R(this.Am.P());d.L2(x,Q,this.J2,this.Am)}else this.J2=x;this.nE=null;this.CD=null;this.tX=null};
en.Yk.prototype.XC=function(){return this.J2};en.Yk.prototype.rect=function(){return this.Am};en.Yk.prototype.EC=function(){return this.auk};
en.Yk.prototype.DV=function(){if(this.nE)return this.nE;this.nE=this.XC().slice(0);d.HQ(this.nE);return this.nE};
en.Yk.prototype.oK=function(){if(this.CD)return this.CD;this.CD=d.style.Jw(this.DV(),this.rect().m,this.rect().e);
return this.CD};en.Yk.prototype.qE=function(){if(this.tX)return this.tX;var x=this.EC(),Q=d.R(x.P());
d.L2(this.XC(),this.rect(),Q,x);var c=Date.now();this.tX=d.style.Jw(Q,x.m,x.e);return this.tX};en.Yk.prototype.asY=function(x,Q){var c={b$:-Q,Mr:x,I$:null,Tu:null};
if(Q==0){c.I$=this.rect();c.Tu=this.oK();return c}var $=this.qE().slice(0),z=this.EC();c.I$=z;c.Tu=$;
for(var F=0;F<$.length;F++)$[F]=-$[F];if(x==0)return c;var j=this.oK(),U=this.rect();for(var i=0;i<U.e;
i++)for(var b=0;b<U.m;b++){var e=i*U.m+b,k=(i+U.y-z.y)*z.m+b+U.x-z.x;$[k]+=j[e]}return c};en.Yk.prototype._i=function(x,Q,c){var $=Math.ceil(x+Q),z={W4:this.rect().clone(),XC:null};
z.W4.ss($,$);z.XC=d.R(z.W4.P());if(x==0&&Q==0)d.SO(c?this.XC():this.DV(),z.XC);else{var j=d.R(z.W4.P());
d.L2(this.XC(),this.rect(),j,z.W4);if(!c)d.HQ(j);if(x!=0){if(c)d.style.yP(j,z.W4,this.qE(),this.EC(),x);
else d.style.yP(j,z.W4,this.oK(),this.rect(),x)}if(Q!=0)d.yg.ZA(j,z.XC,z.W4,Math.max(1,Q*.43));else z.XC=j}return z};
en.Yk.prototype.aea=function(x,Q,c){var $=x*(Q-.5),z={W4:this.rect().clone(),XC:null};if(c)z.W4.ss(x,x);
z.XC=d.R(z.W4.P());var j=z.W4.m,U=z.W4.e,i=c?this.qE():this.oK(),b=c?this.EC():this.rect(),e=z.W4,k=e.y_(b),j=k.m,U=k.e,K=k.x-e.x,g=k.y-e.y,R=k.x-b.x,T=k.y-b.y,D=1-Q*2;
for(var a=0;a<U;a++)for(var _=0;_<j;_++){var I=i[(a+T)*b.m+_+R],f=I/x;z.XC[(a+g)*e.m+_+K]=Math.max(0,Math.min(255,255-255*((f+D)/(1+D))))}return z};
en.awe=function(x,Q,c,$){var z=x.Lefx,j=x.blendOptions;if(z){var U=Q.add.lmfx;if(c==null)c=U?U.Scl.v.val:100;
Q.add.lmfx=JSON.parse(JSON.stringify(z.v));if(Q.add.lmfx.Scl==null)Q.add.lmfx.Scl={t:"UntF",v:{type:"#Prc",val:100}};
en.pa(Q.add.lmfx,c/Q.add.lmfx.Scl.v.val);if(U)Q.add.lmfx.Scl.v.val=U.Scl.v.val;var i=z.v.gagl;if(i&&$)$.tK(i.v.val)}else delete Q.add.lmfx;
if(j){j=j.v;if(j.Md)Q.s3=cq.Rg(j.Md.v.BlnM);if(j.Opct)Q.opacity=Math.round(j.Opct.v.val*255/100);if(j.fillOpacity)Q.add.iOpa=Math.round(j.fillOpacity.v.val*255/100);
if(j.Blnd){var b=[];for(var F=0;F<10;F++)b.push(0,0,255,255);var e=j.Blnd.v,k="SrcB Srcl SrcW Srcm DstB Dstl DstW Dstt".split(" ");
for(var F=0;F<e.length;F++){var K=e[F].v,g=8*["Gry","Rd","Grn","Bl"].indexOf(K.Chnl.v[0].v.enum);for(var R=0;
R<8;R++){b[g+R]=K[k[R]].v}}Q.uJ=b}}};en.aja=function(x){var Q="SrcB Srcl SrcW Srcm DstB Dstl DstW Dstt".split(" "),c=[],$=x.uJ;
for(var F=0;F<4;F++){var z=F*8;if($[z]+$[z+1]+$[z+4]+$[z+5]==0&&$[z+2]+$[z+3]+$[z+6]+$[z+7]==4*255)continue;
var j={t:"Objc",v:{classID:"Blnd",Chnl:{t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:["Gry","Rd","Grn","Bl"][F]}}]}}};
c.push(j);for(var U=0;U<8;U++)j.v[Q[U]]={t:"long",v:$[F*8+U]}}var i={classID:"blendOptions"};if(x.s3!="norm")i.Md={t:"enum",v:{BlnM:cq.DU(x.s3)}};
if(x.opacity!=255)i.Opct={t:"UntF",v:{type:"#Prc",val:Math.round(x.opacity*100/255)}};if(x.add.iOpa!=null)i.fillOpacity={t:"UntF",v:{type:"#Prc",val:Math.round(x.add.iOpa*100/255)}};
if(c.length!=0)i.Blnd={t:"VlLs",v:c};var b={Uz:{classID:"null",Idnt:{t:"TEXT",v:hf.KN()+"-bd9f-11d5-b8ba-b73f8571793d"},Nm:{t:"TEXT",v:"Default/Custom Style"}},Ry:{classID:"Styl",blendOptions:{t:"Objc",v:i}}},e=x.add.lmfx;
if(e)b.Ry.Lefx={t:"Objc",v:e};return b};function d1(){}d1.Nr=function(x){return JSON.parse(JSON.stringify(x))};
d1.Bk=function(x){var Q=d1.Nr(d1.aC0),c=Q.Brsh.v;if(x!=null){delete c.Hrdn;c.classID="sampledBrush";
c.sampledData={t:"TEXT",v:x}}return Q};d1.aC0={classID:"brushPreset",Nm:{t:"TEXT",v:"Default/My Custom Brush"},Brsh:{t:"Objc",v:{classID:"computedBrush",Dmtr:{t:"UntF",v:{type:"#Pxl",val:15}},Hrdn:{t:"UntF",v:{type:"#Prc",val:100}},Angl:{t:"UntF",v:{type:"#Ang",val:0}},Rndn:{t:"UntF",v:{type:"#Prc",val:100}},Spcn:{t:"UntF",v:{type:"#Prc",val:25}},Intr:{t:"bool",v:!0},flipX:{t:"bool",v:!1},flipY:{t:"bool",v:!1}}},useTipDynamics:{t:"bool",v:!1},useScatter:{t:"bool",v:!1},dualBrush:{t:"Objc",v:{classID:"dualBrush",useDualBrush:{t:"bool",v:!1}}},brushGroup:{t:"Objc",v:{classID:"brushGroup",useBrushGroup:{t:"bool",v:!1}}},useTexture:{t:"bool",v:!1},usePaintDynamics:{t:"bool",v:!1},useColorDynamics:{t:"bool",v:!1},Wtdg:{t:"bool",v:!1},Nose:{t:"bool",v:!1},Rpt:{t:"bool",v:!1}};
d1.ahN=function(x,Q){var c=["opVr","szVr"],$=["usePaintDynamics","useTipDynamics"];for(var F=0;F<2;F++){var z=c[F];
if(x[z]==null)x[z]=JSON.parse(d1.H9.UA[z]);x[z].v.bVTy.v=Q[F]?2:0;if(Q[F])x[$[F]].v=!0}d1.H9.a7C(x)};
d1.H9={};d1.H9.check=function(x){var Q=d1.H9.YP;for(var F=0;F<Q.length;F++)if(x[Q[F]]==null)x[Q[F]]=JSON.parse(d1.H9.UA[Q[F]]);
var c=[];for(var F=0;F<Q.length;F++)c.push(Q[F]);var $=d1.H9.aa_;for(var F=0;F<$.length;F++){var z=$[F][0],j=$[F][1],U=!0;
for(var i=0;i<z.length;i++)U=U&&x[z[i]].v==!0;if(U)for(var i=0;i<j.length;i++){if(x[j[i]]==null)console.log("Missing conditional parameter "+j[i]);
else c.push(j[i])}}for(var b in x)if(c.indexOf(b)==-1&&b!="toolOptions")console.log("Extra parameter "+b);
x=x.Brsh.v;Q=d1.H9.I6.YP;for(var F=0;F<Q.length;F++)if(x[Q[F]]==null)x[Q[F]]=JSON.parse(d1.H9.I6.UA[Q[F]]);
c=[];for(var F=0;F<Q.length;F++)if(x[Q[F]])c.push(Q[F]);else console.log("Missing default parameter "+Q[F]);
$=d1.H9.I6.anQ[x.classID];for(var F=0;F<$.length;F++)if(x[$[F]]==null&&$[F]!="dtipsGridSize"&&$[F]!="dtipsErodibleTipHeightMap"&&x.azm!=1)console.log("Missing conditional parameter "+$[F]);
else c.push($[F]);for(var b in x)if(c.indexOf(b)==-1)console.log("Extra parameter "+b)};d1.H9.a7C=function(x){var Q=d1.H9.aa_;
for(var F=0;F<Q.length;F++){var c=Q[F][0],$=Q[F][1],z=!0;for(var j=0;j<c.length;j++)z=z&&x[c[j]]&&x[c[j]].v==!0;
if(z){for(var j=0;j<$.length;j++)if(x[$[j]]==null){x[$[j]]=JSON.parse(d1.H9.UA[$[j]])}}else for(var j=0;
j<$.length;j++)if(x[$[j]]!=null){delete x[$[j]]}}};d1.H9.I6={};d1.H9.I6.YP="classID Dmtr Angl Spcn Intr flipX flipY".split(" ");
d1.H9.I6.UA={flipX:"{\"t\":\"bool\",\"v\":false}",flipY:"{\"t\":\"bool\",\"v\":false}"};d1.H9.I6.anQ={computedBrush:["Hrdn","Rndn"],sampledBrush:["Nm","Rndn","sampledData"],dBrush:"Shp Dnst Lngt clumping thickness stiffness physics".split(" "),dTips:"dtipsType Shp dtipsLengthRatio dtipsHardness dtipsGridSize dtipsErodibleTipHeightMap physics dtipsAirbrushCutoffAngle dtipsAirbrushGranularity dtipsAirbrushStreakiness dtipsAirbrushSplatSize dtipsAirbrushSplatCount".split(" ")};
d1.H9.aa_=[[["useTipDynamics"],"flipX flipY brushProjection minimumDiameter minimumRoundness tiltScale szVr angleDynamics roundnessDynamics".split(" ")],[["usePaintDynamics"],["prVr","opVr","wtVr","mxVr"]],[["useBrushPose"],"overridePoseAngle overridePoseTiltX overridePoseTiltY overridePosePressure brushPosePressure brushPoseTiltX brushPoseTiltY brushPoseAngle".split(" ")],[["useTexture"],"TxtC interpretation textureBlendMode textureDepth minimumDepth textureDepthDynamics Txtr textureScale InvT textureBrightness textureContrast".split(" ")],[["useColorDynamics"],"clVr H Strt Brgh purity colorDynamicsPerTip".split(" ")],[["useScatter"],["Cnt","countDynamics","bothAxes","scatterDynamics"]],[["useScatter","bothAxes"],["Spcn"]]];
d1.H9.YP="classID Nm Brsh useTipDynamics usePaintDynamics useColorDynamics useScatter useTexture useBrushSize useBrushPose Wtdg Nose Rpt dualBrush brushGroup".split(" ");
d1.H9.UA={useBrushSize:"{\"t\":\"bool\",\"v\":false}",useBrushPose:"{\"t\":\"bool\",\"v\":false}",brushGroup:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brushGroup\",\"useBrushGroup\":{\"t\":\"bool\",\"v\":false}}}",flipX:"{\"t\":\"bool\",\"v\":false}",flipY:"{\"t\":\"bool\",\"v\":false}",brushProjection:"{\"t\":\"bool\",\"v\":false}",minimumDiameter:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}",minimumRoundness:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":25}}",tiltScale:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":200}}",szVr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":100},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",angleDynamics:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":100},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",roundnessDynamics:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":100},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",prVr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":100},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",opVr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":100},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",wtVr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":100},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",mxVr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":100},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",overridePoseAngle:"{\"t\":\"bool\",\"v\":false}",overridePoseTiltX:"{\"t\":\"bool\",\"v\":true}",overridePoseTiltY:"{\"t\":\"bool\",\"v\":true}",overridePosePressure:"{\"t\":\"bool\",\"v\":true}",brushPosePressure:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":9}}",brushPoseTiltX:"{\"t\":\"long\",\"v\":0}",brushPoseTiltY:"{\"t\":\"long\",\"v\":0}",brushPoseAngle:"{\"t\":\"long\",\"v\":0}",TxtC:"{\"t\":\"bool\",\"v\":false}",interpretation:"{\"t\":\"bool\",\"v\":true}",textureBlendMode:"{\"t\":\"enum\",\"v\":{\"BlnM\":\"CBrn\"}}",textureDepth:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":37}}",minimumDepth:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":97}}",textureDepthDynamics:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":100},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",Txtr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Ptrn\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"$$$/Presets/Patterns/Patterns_pat/Laidhorizontal=Laid-horizontal\"},\"Idnt\":{\"t\":\"TEXT\",\"v\":\"52a93427-f5d6-1172-a989-8dc82a43aa51\"}}}",textureScale:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":99}}",InvT:"{\"t\":\"bool\",\"v\":false}",textureBrightness:"{\"t\":\"long\",\"v\":14}",textureContrast:"{\"t\":\"long\",\"v\":100}",Cnt:"{\"t\":\"doub\",\"v\":4}",countDynamics:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":100},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":98}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",bothAxes:"{\"t\":\"bool\",\"v\":false}",scatterDynamics:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":100},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":56}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",clVr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":100},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",H:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}",Strt:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}",Brgh:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":36}}",purity:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}",colorDynamicsPerTip:"{\"t\":\"bool\",\"v\":false}"};
function jP(x,Q){this.avD=x;this.A6=Q==null?0:Q;this.dir=0}jP.prototype.PW=function(x,Q){var c=this.avD,$=new bC(x.x-c.x,x.y-c.y),z=new bI;
z.rotate(-this.A6);$=z.RE($);if(this.dir==0&&!c.HM(x))this.dir=Math.abs($.x)<Math.abs($.y)?1:2;if(Q.S(fM.FT)){if(this.dir==1)$.x=0;
if(this.dir==2)$.y=0}z.HQ();$=z.RE($);var j=new bC(c.x+$.x,c.y+$.y);return j};jP.prototype.aBq=function(x){if(x.S(fM.FT))return this.dir;
return 0};var g6=function(){function x(){this.azV={}}x.axp=function(Q,c){var $=Q.clone();$.DX-=Math.floor($.DX);
$.ti-=Math.floor($.ti);var z=new bC(c,0),j=new bC(0,c),U=$.RE(z),i=$.RE(j),b=new bC($.DX,$.ti);return[U,i,b]};
x.aoU=function(Q,c){var $=bC.Xc;return $(Q[0],c[0])+$(Q[1],c[1])+$(Q[2],c[2]);return dsum};x.prototype.a9M=function(Q){var c=this.azV,$=c[Q];
if($==null)$=c[Q]={NT:[],Nl:0,P:0,a4g:0,a7J:0};$.Nl=Date.now();while(Object.keys(c).length>3){var z="",j=Date.now();
for(var U in c){var i=c[U].Nl;if(i<j){j=i;z=U}}delete c[z]}return $};x.prototype.aAU=function(Q,c){var $=Q.NT,z,j=1e6;
for(var F=0;F<$.length;F++){var U=$[F],i=x.aoU(U.bS,c);if(i<j){z=U;j=i}}return z};x.prototype.a29=function(Q,c){var $=Q.NT;
$.push(c);Q.P+=c.rect.P();if($.length>1e3||Q.P>100*100*1600){console.log("pruning",Q.P,$.length);$.sort(function(j,U){return U.Nl-j.Nl});
while($.length>500||Q.P>100*100*800){var z=$.pop();Q.P-=z.rect.P()}}};return x}();function cG(x,Q,c,$,z,j,U,i,b){this.Dq=Q;
this.Rk=c;this.QI=j;this.b3=$;this.W_=null;this.pJ=null;this.X8=0;this.a8T=0;this.akd=0;this.OF=0;this.bg=0;
this.lv=b==null?Math.floor(Math.random()*16777215):b;this.iM=b==null?Math.floor(Math.random()*16777215):b;
this.K$=new gh;this.ou=new gh;if(i!=null){this.AX=i}else{var e=cG.aBv;if(e.length!=U.P()*4)e=d.R(U.P()*4);
else e.fill(0);this.AX=cG.aBv=e}this.rect=U.clone();this.fP=[];this.xh=[];this.Oq=null;this.Gj=0;this.J=null;
this.aoI="";this.a8=null;this.afX(x,z)}cG.aBv=d.R(16);cG.prototype.afX=function(x,Q){this.Gj=Q;this.J=x;
this.aoI=JSON.stringify(x)+JSON.stringify(this.b3.CM);this.a8=cG.as5(this.J,this.Dq,this.Rk)};cG.prototype.moveTo=function(x,Q,c){c=this.abk(c);
this.X8=c;var $=new bC(x,Q),z=this.J.Brsh.v.Dmtr.v.val;this.W_=$.clone();this.pJ=$.clone();this.Oq=$.clone();
this.fP=[x,Q];this.xh=[c];if(this.b3.PN!=cG.Y6){var j=this.J.angleDynamics,U=j?j.v.bVTy.v==6:!1;this.vm(U?new gh:this.aua($,this.atJ(c),c,new bC(0,0)))}this.OF=$.clone()};
cG.prototype.lineTo=function(x,Q,c){c=this.abk(c);var $=this.fP,z=$.length,j=$[z-2],U=$[z-1];if(x==j&&Q==U)return;
var i=this.J.Brsh.v.Dmtr.v.val,b=Math.ceil(i)+1,e=new gh(Math.round(j),Math.round(U),0,0);e.ss(b,b);
var k=new gh(Math.round(x),Math.round(Q),0,0);k.ss(b,b);this.fP.push(x,Q);this.xh.push(c);z+=2;if(z>=6)this.vm(this.ajO(z))};
cG.prototype.abk=function(x){if(x==null)x=1;x=Math.max(.05,Math.min(5,x));if(isNaN(x)){alert("Pressure is not a number");
throw"e"}return x};cG.prototype.vm=function(x){this.K$=x;this.ou=this.ou.iO(x)};cG.prototype.finish=function(){var x=this.fP,Q=x.length,c;
if(Q==4)c=this.Mo(x[Q-2],x[Q-1],this.xh[(Q>>1)-1],!0);if(Q>4)c=this.ajO(Q+2);if(c)this.vm(c)};cG.prototype.Pe=function(){return this.rect.clone()};
cG.prototype.BB=function(){return this.K$.y_(this.rect)};cG.prototype.vJ=function(){return this.ou.y_(this.rect)};
cG.prototype.GM=function(){return this.AX};cG.prototype.ajO=function(x){var Q=this.fP,c=this.xh,$=Q[x-6],z=Q[x-5],j=Q[x-4],U=Q[x-3],i=c[(x>>1)-3],b=c[(x>>1)-2],e=new bC(0,0),k=new bC(0,0);
if(8<=x)e=cG.atb(Q[x-8],Q[x-7],$,z,j,U);if(x<=Q.length)k=cG.atb(Q[x-2],Q[x-1],j,U,$,z);var K=$+e.x,g=z+e.y,R=j+k.x,T=U+k.y,D=new gh,a=this.ahd()?1:10;
for(var F=0;F<a;F++){var _=(F+1)/a,I=1-_,f=I*I*I*$+3*_*I*I*K+3*_*_*I*R+_*_*_*j,y=I*I*I*z+3*_*I*I*g+3*_*_*I*T+_*_*_*U,Z=this.Mo(f,y,i+_*(b-i));
D=D.iO(Z)}return D};cG.atb=function(x,Q,c,$,z,j){var U=x-c,i=Q-$,b=z-c,e=j-$,k=Math.sqrt(U*U+i*i),K=Math.sqrt(b*b+e*e),g=Math.acos((U*b+i*e)/(k*K))/Math.PI,R=.35,T=.1;
g=T+g*(R-T);var D=z-x,a=j-Q,_=Math.sqrt(D*D+a*a),I=g*K/_;return new bC(D*I,a*I)};cG.prototype.Mo=function(x,Q,c,$){var z=new gh,j=this.b3.amb;
if(j==null)j=0;if(j==0||$){z=this.abN(x,Q,c);return z}var U=this.Oq,i=x-U.x,b=Q-U.y,e=Math.sqrt(i*i+b*b);
i/=e;b/=e;if(e>j){var k=U.x+i*(e-j),K=U.y+b*(e-j);z=this.abN(k,K,c);this.Oq.r$(k,K)}return z};cG.prototype.ahd=function(){var x=this.J,Q=x.Brsh.v.Dmtr.v.val;
return this.b3.CM&&Q==1};cG.prototype.abN=function(x,Q,c){var $=new gh,z=new bC(x,Q),j=this.b3.PN,U=z.HY(this.pJ);
U.normalize(1);var i=bC.Xc(this.pJ,z),b=-this.a8T,e=this.pJ.clone();if(this.ahd()){if(i>.99){var k=this.pJ;
cG.a4X(k,z,this.AX,this.rect,this.Jf(this.J));$=d.A.cl([k.x,k.y,z.x,z.y]);b=i}else z=this.pJ}else while(!0){var K=this.X8+(c-this.X8)*(Math.max(0,b)/i),g=this.atJ(K),R=this.akl()*(g+this.akd)/2*this.a8.aaG;
if(j==cG.Y6)R=1;R=Math.max(R,.5);if(b+R<i){b+=R;this.bg+=R;var T=new bC(this.pJ.x+U.x*b,this.pJ.y+U.y*b),_=1;
if(j==cG.Y6){var D=e.clone();D.x+=U.x>0?1:-1;var a=e.clone();a.y+=U.y>0?1:-1;if(bC.Xc(D,T)<bC.Xc(a,T))T=D;
else T=a;b=bC.Xc(T,this.pJ)}if(this.J.useScatter.v==!0){_=this.J.Cnt.v;var I=this.J.countDynamics.v.jitter.v.val/100,f=I*(-1+2*this.Tr());
_+=Math.round(_*f)}for(var F=0;F<_;F++){var y=this.aua(T,g,c,U);$=$.iO(y)}e=T}else break}this.a8T=i-b;
this.pJ=z;this.X8=c;return $};cG.prototype.akl=function(){var x=this.J.Brsh.v,Q=x.Spcn.v.val,c=Math.max(5,x.Rndn.v.val);
return c/100*(Q/100)};cG.prototype.atJ=function(x){var Q=this.J,c=Q.Brsh.v.Dmtr.v.val;if(Q.useTipDynamics.v){var $=c*(Q.minimumDiameter.v.val/100);
c=$+(c-$)*(1-this.Tr(this.iM)*(Q.szVr.v.jitter.v.val/100));c*=cG.X5(Q,"szVr",x,this.bg)}return c};cG.X5=function(x,Q,c,$){var z=1,j=x[Q].v,U=j.bVTy.v,i=j.fStp.v;
if(U==1)z*=Math.max(0,(i-$)/i);if(U==2)z*=c;return z};cG.prototype.aua=function(x,Q,c,$){var z=this.b3.j_,D=0;
z=Math.min(1,z);var j=this.J,U=this.J.Brsh.v,i=U.Dmtr.v.val,b=this.b3,e=b.PN,k=b.aix,K=this.a8.GD[1],g=new bI;
g.translate(-K.m/2,-K.e/2);g.scale(1/this.a8.auw,1/this.a8.auw);g.scale(Q/i,Q/i);g.scale(1,Math.max(5,U.Rndn.v.val)/100);
if(j.usePaintDynamics&&j.usePaintDynamics.v){var R=j.opVr.v.jitter.v.val/100,T=j.prVr.v.jitter.v.val/100;
z*=1-this.Tr()*R;z*=1-this.Tr()*T;z*=cG.X5(j,"opVr",c,this.bg)*cG.X5(j,"prVr",c,this.bg)}if(j.useTipDynamics.v){var a=j.angleDynamics.v,_=j.minimumRoundness.v.val/100;
g.scale(1,_+(1-_)*Math.round(100-this.Tr()*j.roundnessDynamics.v.jitter.v.val)/100);D+=(-.5+this.Tr())*4*Math.PI*(a.jitter.v.val/100);
D+=cG.X5(j,"angleDynamics",c,this.bg)*2*Math.PI;if(a.bVTy.v==6)D+=Math.atan2(-$.y,$.x)}D+=U.Angl.v.val*(Math.PI/180);
g.rotate(D);if(j.useScatter.v){var I=(-1+2*this.Tr())*j.scatterDynamics.v.jitter.v.val/100;g.translate(-I*Q*$.y,I*Q*$.x)}g.translate(x.x,x.y);
var f=this.apA(g,x,Q),y=f.rect.clone();if(e==null){var Z=this.Jf(j);d.h4(f.Km,Math.round(Z.J*255)<<16|Math.round(Z.r*255)<<8|Math.round(Z.Z*255)<<0,4278190080);
if(this.ou._6()&&this.rect.HM(f.rect)&&z==1)this.AX=f.Km.slice(0);else{var v=-1,G=2,q=-1,h=2;if(!b.d6){v=q=0;
G=h=1}for(var r=q;r<h;r++)for(var H=v;H<G;H++){var o=f.rect.clone();o.x+=H*this.rect.m;o.y+=r*this.rect.e;
if(o.dM(this.rect)){y=y.iO(o);d.l.a4L(f.Km,o,this.AX,this.rect,o,z)}}}}if(e==cG.Y6){var P=new bC(f.rect.x+f.rect.m/2,f.rect.y+f.rect.e/2),O=Math.round(P.x-this.OF.x),p=Math.round(P.y-this.OF.y),C=f.rect.clone();
C.offset(-O,-p);var W=C.y_(this.rect);W.offset(O,p);d.WK(this.AX,this.rect,f.Km,C);d.l.alW(f.Km,f.rect,this.AX,this.rect,f.qa,f.rect,z)}if(e==cG.W7||e==cG.EJ||e==cG.lQ){var J=f.rect.y_(this.rect),t;
if(J.HM(f.rect))t=f.qa;else{t=d.R(J.P());d.L2(f.qa,f.rect,t,J)}var Y=d.R(J.P()*4);d.WK(this.AX,this.rect,Y,J);
if(e==cG.EJ){var l=Y.slice(0),m=d.hx.C6([-1,-1,-1,-1,25,-1,-1,-1,-1]);d.hx.QY(Y,l,J.m,J.e,m,0);d.SO(l,Y)}else if(e==cG.lQ){var B=fK.$H("UnsM");
B.Amnt.v.val=15;B.Thsh.v=0;B.Rds.v.val=5;var l=d.R(Y.length);fK.NH("UnsM",{buffer:Y,rect:J},B,0,0,{buffer:l,rect:J});
d.SO(l,Y)}else{fK.xM(1,d.yg.k_,Y,J)}d.l.alW(Y,J,this.AX,this.rect,t,J,z)}this.akd=Q;this.OF=P;this.iM++;
return y};cG.prototype.Jf=function(x){var Q=cG.a0r(this.Gj);if(x.useColorDynamics&&x.useColorDynamics.v){var c=1-this.Tr()*x.clVr.v.jitter.v.val/100,$=cG.a0r(this.QI);
Q.Z=c*Q.Z+(1-c)*$.Z;Q.r=c*Q.r+(1-c)*$.r;Q.J=c*Q.J+(1-c)*$.J;var z=(-.5+this.Tr())*x.H.v.val/100,j=(-1+2*this.Tr())*x.Strt.v.val/100,U=(-1+2*this.Tr())*x.Brgh.v.val/100,i=d.a$(Q.Z,Q.r,Q.J);
i.R0=(i.R0+z+1)%1;i.ks=i.ks+j;if(i.ks<0)i.ks=-i.ks;if(i.ks>1)i.ks=1-(i.ks-1);i._B=i._B+U;if(i._B<0)i._B=-i._B;
if(i._B>1)i._B=1-(i._B-1);Q=d.Us(i.R0,i.ks,i._B)}return Q};cG.prototype.H9=function(x){return Math.max(0,Math.min(1,x))};
cG.prototype.Tr=function(x){if(x==null){x=this.lv++}return cG.hash(x)};cG.a0r=function(x){return{Z:(x>>16&255)/255,r:(x>>8&255)/255,J:(x>>0&255)/255}};
cG.hash=function(x){x=x^61^x>>16;x=x+(x<<3);x=x^x>>4;x=x*668265261;x=x^x>>15;return(x&16777215)/16777215};
cG.aAY=new g6;cG.prototype.apA=function(x,Q,c){var $=Math.sqrt(this.a8.GD[1].P()),z=$*x.c0(),j=z<10?1:z<50?1.5:z<200?3:8;
if(z<30)j=0;var U=cG.aAY,i=U.a9M(this.aoI),b=this.b3.CM,e=g6.axp(x,$),k=U.aAU(i,e);if(k&&g6.aoU(k.bS,e)>j)k=null;
if(k){k.rect.x=Math.round(k.ap4.x+x.DX);k.rect.y=Math.round(k.ap4.y+x.ti);k.Nl=Date.now()}else{var K=Math.round(this.J.Brsh.v.Dmtr.v.val),g;
if(b&&K<=3){g={channel:d.R(K*K),rect:new gh(Math.round(Q.x-K/2),Math.round(Q.y-K/2),K,K)};g.channel.fill(255)}else if(x.V==1&&x.J==0&&x.dC==0&&x.xq==1){g={channel:this.a8.GD[0],rect:this.a8.GD[1].clone()};
g.rect.x=Math.round(x.DX);g.rect.y=Math.round(x.ti)}else{if(x.c0()>1e-4)g=X.Y.BG(this.a8.GD,x)}if(b){for(var F=0;
F<g.channel.length;F++)g.channel[F]=g.channel[F]>127?255:0}if(g==null)g={channel:d.R(0),rect:new gh};
k={Km:d.R(g.rect.P()*4),qa:g.channel,rect:g.rect,ap4:new bC(g.rect.x-x.DX,g.rect.y-x.ti),bS:e,Nl:Date.now()};
d.Dm(k.qa,k.Km,3);if(i)U.a29(i,k)}return k};cG.as5=function(x,Q,c){var $,z,j,U=x.Brsh.v.Dmtr.v.val,i=x.Brsh.v.classID;
if(i=="computedBrush"){var b=x.Brsh.v.Hrdn.v.val/100;z=U<100?1.4:1;j=1;$=d.a3d.aok(U,b,z)}if(i=="sampledBrush"){var e;
for(var F=0;F<Q.length;F++)if(Q[F].id==x.Brsh.v.sampledData.v)e=Q[F];$=e.GD;var k=$[1];z=Math.max(k.m,k.e)/U;
j=Math.min(k.m,k.e)/Math.max(k.m,k.e)}return{auw:z,aaG:j,GD:$}};cG.GP=null;cG.Yt=null;cG.Zh=function(x,Q,c,$,z,j){var U=cG.GP,i=cG.Yt;
if(U==null){cG.GP=U=document.createElement("canvas");cG.Yt=i=U.getContext("2d")}if(j==null)j=$;if(U.width!=j||U.height!=z){U.width=j;
U.height=z}else i.clearRect(0,0,j,z);i.fillStyle="#000000";i.font=Math.floor(10*X.q_())+"px sans-serif";
var b=x.Brsh.v.Dmtr.v.val,e=""+b,K=x.useBrushSize;if(K&&K.v)e="---";var g=i.measureText(e);i.fillText(e,($-g.width)/2,z-2);
var R=$,T=z-10*X.q_(),D=Math.min(R,T),a=x.Brsh.v.classID;if(a=="computedBrush"){i.translate(R/2,T/2);
i.rotate(-x.Brsh.v.Angl.v.val*Math.PI/180);i.scale(1,.1+.9*x.Brsh.v.Rndn.v.val/100);var _=Math.min(.95*D/2,b/2)+.5,I=.9*x.Brsh.v.Hrdn.v.val/100,f=i.createRadialGradient(0,0,0,0,0,_);
f.addColorStop(I,"rgba(0,0,0,1)");f.addColorStop((.5+I)/1.5,"rgba(0,0,0,.5)");f.addColorStop(1,"rgba(0,0,0,0)");
i.fillStyle=f;i.fillRect(-_,-_,2*_,2*_);i.setTransform(1,0,0,1,0,0)}else if(a=="sampledBrush"){var y,h=0;
for(var F=0;F<Q.length;F++)if(Q[F].id==x.Brsh.v.sampledData.v)y=Q[F];var Z=y.GD;d.t8(Z);var v=Z[0],G=Z[1].m,q=Z[1].e;
while((G>R||q>T)&&Z[h+2]){h+=2;v=Z[h];G=Z[h+1].m;q=Z[h+1].e}if(G*q!=0){var r=d.R(G*q*4);d.Dm(v,r,3);
var H=new ImageData(new Uint8ClampedArray(r.buffer),G,q);i.putImageData(H,Math.round((R-G)/2),Math.round((T-q)/2))}}else{}return U.toDataURL()};
cG.bn=function(x,Q,c,$){if(c==0)c=1;var z=x.Brsh.v,j=z.Dmtr.v.val,U=z.Dmtr.v.val=Math.min($!=null?Math.round($*2.6):3e3,j*c),i=z.Hrdn?z.Hrdn.v.val/100:1,b=$!=null?$:Math.round(U*(1+.55*(1-i)))+4,K;
b=Math.max(15,Math.min(b,3e3));var e=new gh(0,0,b,b),k=new cG(x,Q,null,{j_:1},16711712,0,e);z.Dmtr.v.val=j;
k.moveTo(e.m/2,e.e/2);var g=k.GM(),R=k.Pe();if(e.HM(R))K=g;else{K=d.R(e.P()*4);d.WK(g,R,K,e)}return[K,e,U]};
cG.a3M=function(x,Q,c,$){var z=Q.m,j=z>>>1;for(var F=0;F<4;F++){var U=6-F;x[z*(j-U)+j-1]=$;x[z*(j-U)+j]=c;
x[z*(j-U)+j+1]=$;x[z*(j+U)+j-1]=$;x[z*(j+U)+j]=c;x[z*(j+U)+j+1]=$;x[z*(j-1)+j-U]=$;x[z*j+j-U]=c;x[z*(j+1)+j-U]=$;
x[z*(j-1)+j+U]=$;x[z*j+j+U]=c;x[z*(j+1)+j+U]=$}};cG.$a=function(x,Q,c,$){var z=cG.bn(x,Q,c),j=z[0].slice(0),U=z[1],i=z[2],b=U.P(),e=d.R(b);
d.GS(j,e,3);var k=d.R(b);d.u.axj(e,k,U,X.q_()>1.9);if(i<3||d.Go(k,0)||$&&i>12){cG.a3M(k,U,255,0)}var K=[3,5,3,4,8,4,3,5,3];
K=d.hx.C6(K);d.hx.iy(k,e,U.m,U.e,K);d.h4(j,4294967295);d.Dm(e,j,3);for(var F=0;F<b;F++)if(k[F]==255){j[F<<2]=j[(F<<2)+1]=j[(F<<2)+2]=0;
j[(F<<2)+3]=255}return{QK:j,W4:U,pt:new bC(U.m/2,U.e/2)}};cG.a4X=function(x,Q,c,$,z){var j=4278190080|Math.round(z.J*255)<<16|Math.round(z.r*255)<<8|Math.round(z.Z*255)<<0;
c=new Uint32Array(c.buffer);var U=Math.floor(x.x),i=Math.floor(x.y),b=Math.floor(Q.x),e=Math.floor(Q.y),k=Math.abs(b-U),K=Math.abs(e-i),g=U<b?1:-1,R=i<e?1:-1,T=k-K;
while(!0){c[i*$.m+U]=j;if(U==b&&i==e)break;var D=2*T;if(D>-K){T-=K;U+=g}if(D<k){T+=k;i+=R}}};cG.Y6="0";
cG.W7="1";cG.EJ="2";cG.lQ="3";var aE={};aE.Wz=function(x,Q,c){if(c==null)c=!0;var $=x.add.TySh,z=$.HW,j=new fQ(z,Q,$.Gb);
x.ft.os=j.Ze();var U=x.ft.path=aE.Fc(j,$);if(i9!=0)return[U,j,null];var i=aE.i6(U,$.i,dU.Bm($));if(c){x.rect=i.W4;
x.buffer=i.AX;x.c()}return[U,j,i]};aE.i6=function(x,Q,c){x={G:x.G,j:x.j.slice(0)};d.A.i(x.j,Q,x.j);var $=d.A.cl(x.j),z=0;
for(var F=0;F<x.G.length;F++){var j=x.G[F];if(j[0]=="O"&&j[1]=="-")z=Math.max(z,parseFloat(j.split("-").pop()))}z=Math.ceil(z*Q.c0()/2);
$.ss(z,z);if($._6())return{AX:d.R(0),W4:new gh};var U=d.nc($.m,$.e);U.translate(-$.x,-$.y);aE.a1l(x,U);
var i=U.getImageData(0,0,$.m,$.e),b=new Uint8Array(i.data.buffer);if(c==0)for(var F=0;F<b.length;F+=4)b[F+3]=b[F+3]>80?255:0;
if(c==3)for(var F=0;F<b.length;F+=4)b[F+3]=Math.min(255,b[F+3]*1.5);U.resetTransform();U.beginPath();
return{AX:b,W4:$}};aE.Fc=function(x,Q,c){var $=Q.i,z=Q.HW;aE.aO=$.c0();var j=dU.Bm(Q),U=Math.max($.J*$.J,$.dC*$.dC)<1e-9?$:null;
if(j==3||j==4)U=null;var i={G:[],j:[]};aE.aAw(x,i,U,!0);aE.aAw(x,i,U,!1);i=aE.tv(i,Q,x,c);return i};
aE.aO=1;aE.tv=function(x,Q,c,$){if(x==null)return x;if(c&&c.mX)d.A.i(x.j,c.mX,x.j);if(c&&!d.fr.Cu(Q.f2)){var z=dU.Pe(Q,c);
if(!z._6()){if(x.G){x=d.A._w(x);var j=Math.min(z.m,z.e)/8;if(j<1)j=1;x=d.A.TP(x,j)}var U=d.fr.ES(Q.f2,z);
d.uE.i(U,x.j,z)}}var i=Q.i;if($)d.A.i(x.j,i,x.j);return x};aE.a1l=function(x,Q){Q.save();Q.miterLimit=2;
Typr.U.pathToContext({crds:x.j,cmds:x.G},Q);Q.restore()};aE.$B=function(x,Q,c){var $=fQ.akC(c),z=x.HW,j=z.ResourceDict.FontSet,U=z.ResourceDict.StyleSheetSet[0].StyleSheetData,i=z.EngineDict.StyleRun.RunLengthArray,b=z.EngineDict.StyleRun.RunArray,e=dU.bs(z),k=!0,K={},g=0;
for(var F=0;F<b.length;F++){var R=b[F].StyleSheet.StyleSheetData.Font;if(R==null)R=U.Font;for(var T=0;
T<i[F];T++){var D=e.charCodeAt(g+T),a=R+","+(D>128?D:-1);if(K[a]==null){K[a]=1;if(Q.WY(j[R].Name,D)==null)k=!1}}g+=i[F]}return k&&$};
aE.R6=function(x,Q,c){var $=!0;for(var z=0;z<x.B.length;z++){var j=x.B[z],U=j.add.TySh;if(U!=null&&!aE.$B(U,Q,c))$=!1}return $};
aE.kM=function(x,Q,c){for(var $=0;$<x.B.length;$++){var z=x.B[$],j=z.add.TySh;if(j!=null&&aE.$B(j,Q,c)){aE.Wz(z,Q);
x.c()}}};aE.aAw=function(x,Q,c,$){var z=new bI;for(var F=0;F<x.SW.length;F++)aE.aol(x.VA,x.SW[F],Q,z,c,$)};
aE.aol=function(x,Q,c,$,z,j){$.translate(Q.xj.x,Q.xj.y);for(var F=0;F<Q.v0.length;F++){var U={},i=Q.v0[F];
if(!i.Qa)break;var b=$.clone();b.translate(i.xj.x,i.xj.y);if(z){var e=z.ti+b.ti*z.xq;b.ti=(Math.round(e)-z.ti)/z.xq}for(var k=i.start;
k<i.end;k++)aE.a9Z(x,Q.bz[k],Q,U,c,b,j)}$.translate(-Q.xj.x,-Q.xj.y)};aE.a9Z=function(x,Q,c,$,z,j,U){j.translate(Q.xj.x,Q.xj.y);
for(var i=Q.Rn;i<=Q.$L;i++){var b=c.p_[i],e=b.W4.m,k=x[c.a1N+b.GZ],K=k.G9._FillBackgroundFlag;if(k.Qv=="\n"||U&&!K)continue;
var g=k.G9.FontSize/k.B7.head.unitsPerEm,R=j.clone();R.translate(b.xj.x+b.o0*g,b.xj.y-b.Vs*g);var T=new bI;
T.scale(g,-g);if(k.G9.FauxItalic)T.concat(new bI(1,0,-Math.tan(.18),1,0,0));T.translate(0,k.Ml);T.scale(k.scale.x,k.scale.y);
if(k.G9.BaselineShift!=null)T.translate(0,-k.G9.BaselineShift);if(b.A6!=0){T.rotate(-b.A6)}T.concat(R);
var D=(k.G9._LineWidth?k.G9._LineWidth:1)*aE.aO;if(U){z.G.push(aE.Jf(k.G9._FillBackgroundColor));var a=1.005*b.W4.e/g,_=new gh(-b.o0,-a*.27,1.03*b.W4.m/(g*k.scale.x),a);
if(k.G9.StrokeFlag)_.ss(D/g,D/g);d.A.concat(z,d.A.Hg(_),T);z.G.push("X");continue}if(k.G9.FillFlag)z.G.push(aE.Jf(k.G9.FillColor));
if(k.G9.StrokeFlag)z.G.push("O-"+aE.Jf(k.G9.StrokeColor)+"-"+D);if(b.path.G.length!=0&&k.Qv!="\t"){if(k.G9.FauxBold){var I=k.G9.FontSize/2048*27*k.scale.x,f=Math.cos(b.A6)*I,y=Math.sin(b.A6)*I;
T.DX+=f;T.ti+=y;d.A.concat(z,b.path,T);T.DX-=f+f;T.ti-=y+y;d.A.concat(z,b.path,T)}else d.A.concat(z,b.path,T)}if(k.Qv!="\n"){var Z=b.W4.m/g;
if(k.G9.Underline){if($.Br==null)$.Br=k.B7.post.underlineThickness;if($.aoo==null)$.aoo=k.B7.post.underlinePosition;
var v=0,G=$.aoo-$.Br/2,q=-$.Br;d.A.concat(z,{G:["M","L","L","L","Z"],j:[v,G,v+Z,G,v+Z,G+q,v,G+q]},T)}if(k.G9.Strikethrough){var h=k.B7["OS/2"].yStrikeoutSize,r=k.B7["OS/2"].yStrikeoutPosition,v=0,G=r+h/2,q=-h;
d.A.concat(z,{G:["M","L","L","L","Z"],j:[v,G,v+Z,G,v+Z,G+q,v,G+q]},T)}}if(k.G9.FillFlag)z.G.push("X");
if(k.G9.StrokeFlag)z.G.push("OX")}j.translate(-Q.xj.x,-Q.xj.y)};aE.Jf=function(x){var Q=dU.Du(x),c=(Math.round(Q.Z)<<16)+(Math.round(Q.r)<<8)+Math.round(Q.J);
return"#"+d.vg(c)};function fQ(x,Q,c){var $=dU.SI(x),z,j,U=dU.Sx(x),i=x._LineOrientation==2?new bI:null,K,R;
if(x.Curve)j=fQ.kh(x.Curve);if($!=0){z=new gh(U[0],U[1],U[2],U[3]);if(i){var b=z.m;z.m=z.e;z.e=b;i.translate(0,-U[2])}if($==2){z.m=j[5]-j[4];
z.e=9999}}this.SW=[];this.VA=[];this.Iz=$;this.mX=i;var e=this.akm=dU.bs(x),k=-1,g=-1;for(var F=0;F<e.length;
F++){var T=K,D=dU.aCt(x,F);if(D!=k){k=D;T=K=dU.atN(x,D)}var a=R,D=dU.aB3(x,F);if(D!=g){g=D;a=R=dU.aBG(x,D)}var _={Qv:e.charAt(F),G9:T,B7:null,Uw:-1,OS:dU.aoH(x,F),Ml:0,scale:new bC(0,0),c_:0,lineHeight:0,gi:0},I=x.ResourceDict.FontSet[T.Font].Name,f=_.B7=Q.WY(I,e.charCodeAt(F));
_.scale.x=T.HorizontalScale==null?1:T.HorizontalScale;_.scale.y=T.VerticalScale==null?1:T.VerticalScale;
var y=f["OS/2"],Z=f.hhea;if(T.FontCaps==1&&_.Qv!=_.Qv.toUpperCase()){var v=y.sxHeight?y.sxHeight/y.sTypoAscender:.76;
_.scale.x*=v;_.scale.y*=v}var G=1/f.head.unitsPerEm*T.FontSize;if(T.FontBaseline==1){var v=x.ResourceDict.SuperscriptSize;
_.scale.x*=v;_.scale.y*=v;_.Ml-=x.ResourceDict.SuperscriptPosition*T.FontSize}if(T.FontBaseline==2){var v=x.ResourceDict.SubscriptSize;
_.scale.x*=v;_.scale.y*=v;_.Ml+=x.ResourceDict.SubscriptPosition*T.FontSize}_.c_=fQ.c_(f)*T.FontSize;
var q=a.AutoLeading;_.lineHeight=T.FontSize*(q==null?1.2:q);if(T.AutoLeading==!1)_.lineHeight=T.Leading;
if(_.lineHeight==0)_.lineHeight=.01;this.VA.push(_)}var h=this.SW,r=[0];for(var F=0;F<x.EngineDict.ParagraphRun.RunLengthArray.length;
F++){var H=new fQ.FE(x,Q,this.VA,F,z,r,$==1?j:null);h.push(H)}if(i){if($==0)i.translate(0,h[0].bz[0].c_/2);
i.rotate(-Math.PI/2)}if($==2){var o=x.Curve.Points,P=j[0],O=j[1],p=j[2],C=j[3],W=j[4],J=j[5];for(var F=0;
F<h.length;F++)for(var t=0;t<h[F].v0.length;t++)if(!(F==0&&t==0))h[F].v0[t].Qa=!1;var H=h[0],Y=H.v0[0];
H.xj.r$(0,0);Y.xj.r$(0,0);for(var t=Y.start;t<Y.end;t++){var l=H.bz[t],m=l.xj.x;l.xj.x=0;for(var B=l.Rn;
B<=l.$L;B++){var L=H.p_[B],A=L.W4.m/2;L.xj.x+=m;var S=fQ.ag0(P,(W+L.xj.x+A)%C);L.xj.x=S[0]-A*S[2];L.xj.y=S[1]-A*S[3];
L.A6=Math.atan2(S[3],S[2])}}}if(c){var M=c.VAlign.v;if(M!=0&&dU.SI(x)==1){var N=dU.Sx(x)[3],s=this.Ze().e,V=0;
if(M==1)V=N-s;if(M==2)V=(N-s)/2;for(var F=0;F<this.SW.length;F++)this.SW[F].xj.y+=V}}}fQ.c_=function(x){var Q=x._hhhh;
if(Q==null){var c=Typr.U,$=c.codeToGlyph(x,104),z=d.A.pA(Typr.U.glyphToPath(x,$).crds).e;Q=x._hhhh=z*(1/x.head.unitsPerEm)}return Q};
fQ.prototype.a1E=function(){return!this.a7t(0)};fQ.prototype.aoQ=function(){return this.a7t(1)};fQ.prototype.a7t=function(x){var Q=this.SW,c=!0,$=0;
for(var F=0;F<Q.length;F++){var z=Q[F].v0,j=z.length;$+=j;for(var U=0;U<j;U++)c&=z[U].Qa}return[c,$][x]};
fQ.kh=function(x,Q,c){if(Q==null)Q=.25;var $=x.Points,z=$.length,j=z>>>3,U=x.TextOnPathTRange,i=x.Reversed,g=0,R=0;
if(i){var b=$.slice(0);for(var F=0;F<z;F+=2){b[F]=$[z-2-F];b[F+1]=$[z-1-F]}$=b;U=[j-U[1]%j,j-U[0]%j]}var e=[],k=[0],K=[0];
for(var F=0;F<z;F+=8){var T=$[F+6]-$[F+0],D=$[F+7]-$[F+1],a=Math.round(Math.sqrt(T*T+D*D)/Q),_=c&&F==z-8?a+1:a;
for(var I=0;I<_;I++){var f=I/a,y=1-f,Z=y*y*y*$[F+0]+3*y*y*f*$[F+2]+3*y*f*f*$[F+4]+f*f*f*$[F+6],v=y*y*y*$[F+1]+3*y*y*f*$[F+3]+3*y*f*f*$[F+5]+f*f*f*$[F+7];
e.push(Z,v);if(F+I!=0){var T=Z-g,D=v-R;K.push(K[K.length-1]+Math.sqrt(T*T+D*D));k.push((F>>>3)+f)}g=Z;
R=v}}var Q=K.length,G=K[Q-1],q=fQ.oZ(U[0]%j,k),h=fQ.oZ(U[1]%j,k),r=K[q%Q],H=K[h%Q];if(r>=H)H+=G;return[e,k,K,G,r,H]};
fQ.oZ=function(x,Q){var F=0;while(Q[F]<x)F++;return F};fQ.ag0=function(x,Q){var c=0,F=0,$,z,j;while(c<Q){$=x[F+2]-x[F];
z=x[F+3]-x[F+1];j=Math.sqrt($*$+z*z);c+=j;F+=2}return[x[F],x[F+1],$/j,z/j]};fQ.prototype.a07=function(x){return this.VA[x]};
fQ.prototype.a03=function(x){for(var Q=0;Q<this.SW.length;Q++){var c=this.SW[Q];for(var $=0;$<c.v0.length;
$++){var z=c.v0[$],j=c.bz[z.start].start,U=c.bz[z.end-1].end;if(j<x&&x<U)return[j,U-1]}}return[0,1]};
fQ.prototype.avE=function(x,Q){var c=-1,$=this.SW;if(this.Iz==2){var z=1e9,j=0,U=$[0],i=U.v0[0];for(var b=i.start;
b<i.end;b++){var e=U.bz[b];for(var k=e.Rn;k<=e.$L;k++){var K=U.p_[k],g=K.W4.m,R=x.x-K.xj.x,T=x.y-K.xj.y,D=R*R+T*T;
if(D<z){z=D;j=K.GZ}}}if(j!=0&&this.akm.codePointAt(j-1)>65535)j--;return j}for(var a=0;a<$.length;a++){var U=$[a];
for(var _=0;_<U.v0.length;_++){c++;var i=U.v0[_],I=U.v0[_+1];if(I==null&&a<$.length-1)I=$[a+1].v0[0];
if(Q!=null){if(c!=Q)continue}else{if(I!=null&&U.xj.y+i.xj.y<x.y)continue}for(var b=i.start;b<i.end;b++){var e=U.bz[b];
for(var k=e.Rn;k<=e.$L;k++){var K=U.p_[k],g=K.W4.m,f=U.xj.x+i.xj.x+e.xj.x,y=f+K.xj.x,Z=f+(k<e.$L?U.p_[k+1].xj.x:K.xj.x+g);
if(x.x<=Z||b+1==i.end&&k==e.$L){var v=U.a1N+K.GZ,G=this.VA[v],q=G.gi&1;if(G.Qv!="\n"&&(q==0&&x.x>y+g/2||q==1&&x.x<y+g/2))v+=this.akm.codePointAt(v)>65535?2:1;
return v}}}}}};fQ.prototype.L4=function(x){var Q={W4:new gh,jQ:0},c=0;for(var $=0;$<this.SW.length;$++){var z=this.SW[$];
for(var j=0;j<z.v0.length;j++){var U=z.v0[j];Q.jQ=c;c++;for(var i=U.start;i<U.end;i++){var b=z.bz[i];
for(var e=b.start;e<b.end;e++){if(e==x){var k=this.VA[e],K=k.Uw,g=z.p_[K].GZ,R=1;while(z.p_[K]!=null&&z.p_[K].GZ==g){var T=z.p_[K],D=z.xj.x+U.xj.x+b.xj.x+T.xj.x,a=z.xj.y+U.xj.y+b.xj.y+T.xj.y;
Q.W4=Q.W4.iO(new gh(D,a-k.lineHeight,T.W4.m,k.lineHeight));Q.A6=T.A6;K+=R}return Q}}}}}};fQ.prototype.Ze=function(){var x=Infinity,Q=Infinity,c=-Infinity,$=-Infinity;
for(var F=0;F<this.SW.length;F++){var z=this.SW[F];for(var j=0;j<z.v0.length;j++){var U=z.v0[j];if(!U.Qa)break;
for(var i=U.start;i<U.end;i++){var b=z.bz[i];for(var e=b.Rn;e<=b.$L;e++){var k=z.p_[e],K=k.W4,g=z.xj.x+U.xj.x+b.xj.x+k.xj.x,R=z.xj.y+U.xj.y+b.xj.y+k.xj.y;
x=Math.min(x,g+K.x);Q=Math.min(Q,R+K.y);c=Math.max(c,g+K.x+K.m);$=Math.max($,R+K.y+K.e)}}}}return new gh(x,Q,c-x,$-Q)};
fQ.XK=function(x){return 19968<=x&&x<=40959||12288<=x&&x<=12543};fQ.C0=function(x,Q,c,$,z,j,U){var i=[j],b=0;
for(var F=j;F<U;F++){if(c[F]==null)console.log(F,j,U,c);var e=c[F].Qv,k=e.charCodeAt(0);if(k==32||k==9){i.push(b,F,1,F+1);
b=0}else if(k==3851){i.push(b+1,F+1);b=0}else if(fQ.XK(k)){i.push(b,F);b=1}else if(F!=j&&c[F].gi!=c[F-1].gi){i.push(b,F);
b=1}else b++}i.push(b);var K=[];for(var F=0;F<i.length;F+=2){var g=i[F],R=i[F+1];if(R==0)continue;K.push(new fQ.aAB(x,Q,c,$,z,g,R))}return K};
fQ.aDG=function(x,Q,c,$,z,j,U){var i=[0,Q?Q.m:1e9],b=[];if($){var e=x[j].c_,k=z+(z==0?e:x[j].lineHeight),K=k-e*.9,g=d.A.agg($[0],K),R=g.length,T=d.A.agg($[0],k),D=T.length;
if(R!=0&&D!=0){var a=0,_=0,I=[];while(a<R&&_<D){var f=Math.max(g[a],T[_]),y=g[a+1],Z=T[_+1],v=Math.min(y,Z);
if(f<v)I.push(f,v);if(y<Z)a+=2;else _+=2}if(I.length!=0)i=I}}for(var G=0;G<i.length;G+=2){var q=0,h=j,r=Q?i[G+1]-i[G]-c.StartIndent-c.EndIndent-(j==0?c.FirstLineIndent:0):Infinity;
while(j!=x.length){var H=x[j],o=q==0||(H.aP||H.J_)||q+H.W4.m<r;if(!o)break;q+=H.W4.m;j++}b.push(j-h)}U[0]=b;
U[1]=i;U[2]=j};fQ.afJ=function(x,Q){var c=x.length,$=new Uint32Array(c),z=new Uint8Array(c),j=0;for(var F=0;
F<c;F++){z[F]=0;var U=x.charCodeAt(F);$[F]=U;if(U>j)j=U}if(j>1424)z=fQ.agO($,Q);return z};fQ.aag=function(x){return x=="ß"?x:x.toUpperCase()};
fQ.FE=function(x,Q,c,$,z,j,U){this.bz=[];this.v0=[];this.xj=new bC(0,0);this.p_=null;this.bz=null;this.G9=dU.aBG(x,$);
var i=this.G9,K=0,T="",f=0,y=1,B=0;if($!=0){var b=i.SpaceBefore;if(b!=null)j[0]+=b}var e=x.EngineDict.ParagraphRun.RunLengthArray,k=e[$];
for(var F=0;F<$;F++)K+=e[F];var g=i._Direction?i._Direction:0;this.a1N=K;var R=dU.bs(x).slice(K,K+k);
for(var D=0;D<R.length;D++){var a=R.charAt(D);T+=c[K+D].G9.FontCaps==0?a:fQ.aag(a)}R=T;var _=fQ.afJ(R,g),I=[],Z=_[F]&1,v=c[K].B7;
c[K].gi=_[0];for(var F=1;F<R.length;F++){var a=c[K+F],G=_[F];a.gi=G;if(G!=Z||a.B7!=v){I.push(f,y);f=F;
y=1;Z=G;v=a.B7}else y++}I.push(f,y);var q=this.p_=[];for(var F=0;F<I.length;F+=2){var h=I[F],r=I[F+1],H=(c[K+h].gi&1)==0,o=R.slice(h,h+r),P=Typr.U.shapeHB(c[K+h].B7,o,H),O=[],W=0;
for(var D=0;D<P.length;D++){var p=P[D];O.push({r:p.g,GZ:p.cl,TN:p.ax,yv:p.ay,o0:p.dx,Vs:p.dy})}P=O;var C=P.slice(0);
if(!H)C.reverse();for(var D=0;D<o.length;D++){while(W+1<C.length&&C[W+1].GZ<=D){W++}while(W>0&&C[W-1].GZ==D)W--;
c[K+h+D].Uw=q.length+(H?W:C.length-W-1)}for(var D=0;D<P.length;D++){q.push(P[D]);P[D].GZ+=h;var a=c[K+P[D].GZ];
if(a.OS!=-1&&a.OS<a.B7.maxp.numGlyphs){P[D].r=a.OS;var J=a.B7.hmtx;if(J){var t=Object.keys(J)[0];P[D].TN=J[t][a.OS]}}if(a.Qv=="\n")P[D].TN=0;
if(a.Qv=="\t")P[D].TN=a.B7.head.unitsPerEm*36/a.G9.FontSize}}var Y=dU.mp(i),l=this.bz=fQ.C0(x,Q,c,K,q,K,K+k),m=this.v0,L=-1,T=[null,null,0];
while(B<l.length){fQ.aDG(l,z,i,U,j[0],B,T);L++;var A={start:B,end:0,W4:new gh,xj:new bC(0,0),Qa:!0},iE=0,e9=0;
m.push(A);A.end=T[2];if(A.start==A.end)throw"e";var S=A.end==l.length;function M(C,h,gJ){var dR=gJ-h>>>1;
for(var F=0;F<dR;F++){var fO=C[h+F];C[h+F]=C[gJ-1-F];C[gJ-1-F]=fO}}for(var N=1;N<5;N++){var s=-1;for(var F=A.start;
F<A.end;F++){var G=c[l[F].start].gi;if(s==-1&&G>=N)s=F;else if(s!=-1&&G<N){M(l,s,F);s=-1}}var V=A.end;
if(g==0&&l[V-1].aP)V--;if(s!=-1)M(l,s,V)}var g8=T[0],n=T[1],s=B,cQ=B;for(var hk=0;hk<n.length;hk+=2){var eG=z?n[hk+1]-n[hk]-i.StartIndent-i.EndIndent-(B==0?i.FirstLineIndent:0):Infinity,ie=0;
s=cQ;cQ+=g8[hk>>>1];var eN=this.anE(s,cQ,l,g,z!=null);if(z){if(Y==1||S&&Y==4)ie=eN[1]+(eG-eN[0]);if(Y==2||S&&Y==5)ie=eN[1]+(eG-eN[0])/2;
if(cQ-s==1&&l[s].W4.m>eG)ie=0;if(L==0)ie+=i.FirstLineIndent;ie+=i.StartIndent}else{if(Y==0)ie=i.StartIndent+i.FirstLineIndent;
if(Y==1)ie=-eN[0]-i.EndIndent;if(Y==2)ie=-eN[0]/2}ie+=n[hk];if(z&&Y>2&&(Y==6||!S))this.a4l(s,cQ,l,eG,g,ie);
else{var gr=ie;for(var F=s;F<cQ;F++){var ek=l[F],jK=ek.W4.m;ek.xj.x=gr;if(ek.fY=="\t")jK=Math.ceil((gr+4)/36)*36-gr;
gr+=jK}}}B=A.end;for(var F=A.start;F<A.end;F++){var dm=l[F].W4.clone();dm.ok(l[F].xj);A.W4=A.W4.iO(dm);
iE=Math.max(iE,l[F].c_);e9=Math.max(e9,l[F].lineHeight)}A.xj.y=L==0?0:m[L-1].xj.y+e9;if(L==0){if($==0&&z)j[0]+=iE;
if($!=0)j[0]+=e9;this.xj.y=j[0]}else j[0]+=e9;if(z)A.Qa=this.xj.y+A.xj.y<z.y+z.e||$==0&&L==0}var kD=i.SpaceAfter;
if(kD!=null)j[0]+=kD};fQ.FE.prototype.anE=function(x,Q,c,$,z){var j=0,U=0;for(var F=x;F<Q;F++)j+=c[F].W4.m;
if(z){if($==0)for(var F=Q-1;F>=x;F--)if(c[F].aP||c[F].J_)j-=c[F].W4.m;else break;if($==1)for(var F=x;
F<Q;F++)if(c[F].aP||c[F].J_){var i=c[F].W4.m;j-=i;U-=i}else break}return[j,U]};fQ.FE.prototype.a4l=function(x,Q,c,$,z,j){var U=0,i=0,b=0,e=0;
for(var F=x;F<Q;F++)if(c[F].aP)b++;else{U+=c[F].W4.m;i++}if(z==0)for(var F=Q-1;F>=x;F--)if(c[F].aP||c[F].J_){if(c[F].aP){b--}}else break;
if(z==1)for(var F=x;F<Q;F++)if(c[F].aP||c[F].J_){if(c[F].aP){b--;e++}}else break;if(i<=1||b==0){if(i==1)c[x].xj.x=j;
return}var k=($-U)/b,K=-e*k;for(var F=x;F<Q;F++){if(c[F].aP)this.p_[c[F].Rn].W4.m=c[F].W4.m=k;c[F].xj.x=j+K;
K+=c[F].W4.m}};fQ.aAB=function(x,Q,c,$,z,j,U){this.fY="";for(var F=0;F<U;F++)this.fY+=c[j+F].Qv;this.aP=U==1&&(c[j].Qv==" "||c[j].Qv=="\t");
this.J_=U==1&&c[j].Qv=="\n";this.start=j;this.end=j+U;this.W4=new gh;this.xj=new bC(0,0);this.c_=0;this.lineHeight=0;
var i=0,b=0;if(U==0){this.lineHeight=c[j].lineHeight;this.c_=c[j].c_;this.W4=new gh(0,-c[j].lineHeight,0,c[j].lineHeight)}var e=c[j].Uw,k=c[j+U-1].Uw;
if(k<e){var K=e;e=k;k=K}while(k+1<z.length&&z[k].GZ==z[k+1].GZ){k++}this.Rn=e;this.$L=k;for(var g=e;
g<=k;g++){var R=z[g],T=c[$+R.GZ],D=x._LineOrientation==2&&(T.G9.BaselineDirection!=2||fQ.XK(T.Qv.charCodeAt(0))),a=Typr.U.glyphToPath(T.B7,R.r),Z=0;
R.path={G:a.cmds,j:a.crds};var _=T.G9.FontSize,I=1/T.B7.head.unitsPerEm*_;if(!T.G9.AutoKerning)i+=T.G9.Kerning*2*I*T.scale.x;
R.xj=new bC(i,0);R.A6=0;if(D&&R.path.j.length>0){R.A6=-Math.PI/2;R.xj.x+=_*.83;R.xj.y=-_*.3+R.TN*I/2;
R.TN=_/I}var f=R.TN*I*T.scale.x;R.W4=new gh(0,-T.lineHeight,f,T.lineHeight);var y=R.W4.clone();y.ok(R.xj);
if(T.G9.Tracking!=null)Z=T.G9.Tracking*.001*_;if(T.G9.FauxBold==!0)Z+=.027*_;i+=f+Z;if(g<z.length-2)R.W4.m+=Z;
if(U==1&&T.Qv==" "){y.m+=2*Z;R.xj.x+=Z}else if(U==1&&T.Qv!=null&&fQ.XK(T.Qv.charCodeAt(0)))y.m+=Z;this.W4=this.W4.iO(y);
this.c_=Math.max(this.c_,T.c_);this.lineHeight=Math.max(this.lineHeight,T.lineHeight)}};fQ.W1=0;fQ.akC=function(x){if(fQ.W1==2)return!0;
if(fQ.W1==1)return!1;fQ.W1=1;function Q(){fetch("code/ext/fribidi.wasm").then(function(c){return c.arrayBuffer()}).then(function(c){return WebAssembly.instantiate(c)}).then(function(c){var $=c.instance.exports,z=$.memory,j=16,U=256,i=1,b=j|U,e=j|U|i;
fQ.agO=function(K,g){var R=K.length,T=R*4+4+R*4+R*4+R;ar.IZ($,T+R+1e7);var D=new Uint8Array(z.buffer),a=new Uint32Array(z.buffer),_=$.calloc(T,1),I=_+R*4,f=I+4,y=f+R*4,Z=y+R*4;
a.set(K,_>>>2);a[I>>>2]=g==0?b:e;$.fribidi_get_bidi_types(_,R,f);$.fribidi_get_bracket_types(_,R,f,y);
$.fribidi_get_par_embedding_levels_ex(f,y,R,I,Z);var v=D.slice(Z,Z+R);$.free(_);return v};fQ.W1=2;var k=new jO(u.E.M,!0);
k.data={d:u.H.hW,_g:"add",hF:ke.Be,jn:null};x.T(k)})}Typr.U.initHB("code/ext/hb.wasm",Q);return!1};function dU(){}dU.Nr=function(x){return JSON.parse(JSON.stringify(x))};
dU.dt=function(x,Q){for(var c in Q)x[c]=Q[c]};dU.Y7=function(x,Q,c,$){var z=dU.ah_();if(c)dU.G4(z,0,0,c);
var j=new bI;if($!=null)j.rotate($);j.translate(Math.round(x),Math.round(Q));var U={i:j,HW:z};U.Gb=dU.avh();
U.f2=d.fr.R();U.Iv=new gh;return U};dU.aly=function(x){var Q=["CharacterDirection",0];for(var F=0;F<Q.length;
F+=2){if(x[Q[F]]!=null&&x[Q[F]]!=Q[F+1]){throw"e";console.log(Q[F],x[Q[F]])}}if(x instanceof Array)for(var F=0;
F<x.length;F++)dU.aly(x[F]);else if(x instanceof Object)for(var c in x)dU.aly(x[c])};dU.mp=function(x,Q){if(Q==null)Q=x.Justification;
var c=x._Direction?x._Direction:0;if(c==1){if(Q==0||Q==3)Q++;else if(Q==1||Q==4)Q--}return Q};dU.c5=function(x){if(x.add==null)return;
var Q=x.HW,c=Q.Curve,$=x.add.vmsk,z=$.$,j=d.A.CJ(z,2).j,U=x.i.clone();U.HQ();d.A.i(j,U,j);var i=j.slice(0,8);
for(var b=8;b<j.length;b+=6)i.push(j[b-2],j[b-1],j[b],j[b+1],j[b+2],j[b+3],j[b+4],j[b+5]);c.Points=i;
c.TextOnPathTRange=$.Sr.slice(0);c.Reversed=$.$S;if(dU.SI(Q)==1){var c=fQ.kh(Q.Curve),e=d.A.pA(c[0]);
dU.ei(Q,[0,0,e.m,e.e].map(Math.round));for(var F=0;F<i.length;F+=2){i[F]-=e.x;i[F+1]-=e.y}var k=new bI(1,0,0,1,e.x,e.y);
k.concat(x.i);x.i=k}};dU.jC=function(x){if(x.add==null)return;var Q=x.add.vmsk,c=x.HW.Curve,$=c.Points,z={G:["M"],j:[$[0],$[1]]};
for(var F=0;F<$.length;F+=8){z.G.push("C");z.j.push($[F+2],$[F+3],$[F+4],$[F+5],$[F+6],$[F+7])}d.A.i(z.j,x.i,z.j);
var j=d.A.tf(z,!0);Q.$=j;Q.$S=c.Reversed;Q.Sr=c.TextOnPathTRange.slice(0);x.add.vogk=eM.jz(j)};dU.Du=function(x){var Q={Z:0,r:0,J:0};
if(x){var c=x.Values;if(x.Type==1)Q={Z:c[1]*255,r:c[2]*255,J:c[3]*255};else if(x.Type==2){var $={classID:"CMYC",Cyn:{t:"doub",v:c[1]*100},Mgnt:{t:"doub",v:c[2]*100},Ylw:{t:"doub",v:c[3]*100},Blck:{t:"doub",v:c[4]*100}};
Q=d.I.Du($)}else console.log("Unknown color type")}return Q};dU.axw=function(x){for(var F=0;F<x.length;
F++){var Q=x[F].StyleSheet.StyleSheetData,c=Q.FillColor;if(c&&c.Type==2){var $=dU.Du(c);c.Type=1;c.Values=[1,$.Z/255,$.r/255,$.J/255]}}};
dU.Pe=function(x,Q){var c;if(dU.SI(x.HW)==1){var $=dU.Sx(x.HW);c=new gh(0,0,$[2]-$[0],$[3]-$[1])}else{c=Q.Ze();
if(Q.mX){var z=Q.mX.clone(),j=d.A.Hg(c);d.A.i(j.j,z,j.j);c=d.A.pA(j.j)}}return c};dU.Vi=function(x){var Q=x[0];
for(var F=0;F<x.length;F++)Q=dU.a5m(Q,x[F]);return Q};dU.a5m=function(x,Q){var c={};for(var $ in x)if(JSON.stringify(x[$])==JSON.stringify(Q[$]))c[$]=x[$];
return c};dU.gD=function(x,Q){var c=x._t,$=-1;for(var F=0;F<c.length;F++)if(c[F].Name==Q)$=F;if($==-1){$=c.length;
c.push({FontType:1,Name:Q,Script:0,Synthetic:0})}x.VA.Font=$};dU.bs=function(x){return x.EngineDict.Editor.Text.replace(/\r/g,"\n").replace(/\u0003/g,"\n")};
dU.rX=function(x,Q){x.EngineDict.Editor.Text=Q.replace(/\n/g,"\r")};dU.SI=function(x){return x.Curve&&x.Curve.TextOnPathTRange[0]>=0?2:x.EngineDict.Rendered.Shapes.Children[0].ShapeType};
dU.DY=function(x,Q){var c=x.EngineDict.Rendered.Shapes.Children[0];c.ShapeType=Q;var $=c.Cookie.Photoshop;
$.ShapeType=Q;$.Base.ShapeType=Q;if(Q==0){delete $.BoxBounds;$.PointBase=[0,0]}if(Q==1){delete $.PointBase;
$.BoxBounds=[0,0,1,1]}};dU.Sx=function(x){return x.EngineDict.Rendered.Shapes.Children[0].Cookie.Photoshop.BoxBounds};
dU.ei=function(x,Q){x.EngineDict.Rendered.Shapes.Children[0].Cookie.Photoshop.BoxBounds=Q};dU.aoH=function(x,Q){var c=x.EngineDict.AlternateGlyphRun;
if(c==null)return-1;var $=dU.YN(c.RunLengthArray,Q).yh;if(c.RunArray[$]==null)return-1;var z=c.RunArray[$].Glyph;
return z==null?-1:z};dU.a1J=function(x,Q,c){var $=x.EngineDict.AlternateGlyphRun;if($==null){$=x.EngineDict.AlternateGlyphRun=dU.ao7();
$.RunArray.push({});$.RunLengthArray.push(dU.bs(x).length)}var z=dU.YN($.RunLengthArray,Q),j=z.yh,U=Q-z.xl,i=$.RunArray[j],b=JSON.stringify(i),e=$.RunLengthArray[j];
if(U!=0){$.RunArray.splice(j,0,JSON.parse(b));$.RunLengthArray.splice(j,0,U);$.RunLengthArray[j+1]-=U;
j++;e-=U;U=0}if(e!=1){$.RunArray.splice(j+1,0,JSON.parse(b));$.RunLengthArray.splice(j+1,0,e-1);$.RunLengthArray[j]=1;
e=1}i.Glyph=c};dU.aCt=function(x,Q){var c=x.EngineDict.StyleRun.RunLengthArray;return dU.YN(c,Q).yh};
dU.atN=function(x,Q){var c=x.ResourceDict.StyleSheetSet[0].StyleSheetData,$={};for(var z in c)$[z]=c[z];
var j=x.EngineDict.StyleRun.RunArray[Q].StyleSheet.StyleSheetData;dU.dt($,j);return $};dU.aB3=function(x,Q){var c=x.EngineDict.ParagraphRun.RunLengthArray;
return dU.YN(c,Q).yh};dU.aBG=function(x,Q){var c=x.ResourceDict.ParagraphSheetSet[0].Properties,$={};
for(var z in c)$[z]=c[z];var j=x.EngineDict.ParagraphRun.RunArray[Q].ParagraphSheet.Properties;dU.dt($,j);
var U=["StartIndent","EndIndent","FirstLineIndent"];for(var F=0;F<3;F++)if($[U[F]]==null)$[U[F]]=0;return $};
dU.U3=function(x,Q,c){if(c=="")return;var $=dU.bs(x);dU.rX(x,$.substring(0,Q)+c+$.substring(Q,$.length));
var z=x.EngineDict.StyleRun,j=z.RunLengthArray,U=dU.YN(j,Q-1);j[U.yh]+=c.length;var i=x.EngineDict.AlternateGlyphRun;
if(i){var j=i.RunLengthArray,U=dU.YN(j,Q-1);j[U.yh]+=c.length}var b=x.EngineDict.ParagraphRun,j=b.RunLengthArray,e=dU.YN(j,Q),k=c.split("\n");
if(k.length==1){j[e.yh]+=c.length;return}j.splice(e.yh+1,0,j[e.yh]-(Q-e.xl));b.RunArray.splice(e.yh+1,0,dU.Nr(b.RunArray[e.yh]));
j[e.yh]-=j[e.yh+1];j[e.yh]+=k[0].length+1;for(var F=1;F<k.length-1;F++){b.RunArray.splice(e.yh+F,0,dU.Nr(b.RunArray[e.yh+F-1]));
b.RunLengthArray.splice(e.yh+F,0,k[F].length+1)}j[e.yh+k.length-1]+=k[k.length-1].length};dU.DH=function(x,Q,c){var $=dU.bs(x);
dU.rX(x,$.substring(0,Q)+$.substring(c,$.length));dU.pE(x.EngineDict.ParagraphRun,Q,c,!0);dU.pE(x.EngineDict.StyleRun,Q,c,!1);
var z=x.EngineDict.AlternateGlyphRun;if(z)dU.pE(z,Q,c,!1)};dU.pE=function(x,Q,c,$){var z=x.RunLengthArray,j=dU.YN(z,Q),U=dU.YN(z,c),i=[];
for(var F=0;F<z.length;F++)for(var b=0;b<z[F];b++)i.push(F);i.splice(Q,c-Q);var e=[];for(var F=0;F<z.length;
F++)e.push(0);for(var F=0;F<i.length;F++)e[i[F]]++;for(var F=0;F<z.length;F++){if(e[F]==0){e.splice(F,1);
z.splice(F,1);x.RunArray.splice(F,1);F--}else if(e[F]<z[F])z[F]=e[F]}if($&&j.yh!=U.yh&&j.xl!=Q){z[j.yh]+=z[j.yh+1];
z.splice(j.yh+1,1);x.RunArray.splice(j.yh+1,1)}};dU.G4=function(x,Q,c,$){var z=x.EngineDict.Editor.Text.length;
if(c==z-2)c++;if($.VA.Font!=null)x.ResourceDict.FontSet=$._t.slice(0);if(Q<=c)dU.aze(x.EngineDict.StyleRun,$.VA,Q,c,!0);
dU.aze(x.EngineDict.ParagraphRun,$.SW,Q,c,!1)};dU.zl=function(x,Q,c){var $={_t:x.ResourceDict.FontSet.slice(0),VA:[],SW:[]},z=x.EngineDict.StyleRun.RunLengthArray,j=dU.YN(z,Q).yh,U=dU.YN(z,c).yh;
for(var F=j;F<=U;F++){var i=dU.Nr(x.ResourceDict.StyleSheetSet[0].StyleSheetData),b=x.EngineDict.StyleRun.RunArray;
if(b.length==0)continue;var e=b[F].StyleSheet.StyleSheetData;dU.dt(i,e);$.VA.push(i)}var k=x.EngineDict.ParagraphRun.RunLengthArray,K=dU.YN(k,Q).yh,g=dU.YN(k,c).yh;
for(var F=K;F<=g;F++){var R=x.EngineDict.ParagraphRun.RunArray;if(R.length==0)continue;$.SW.push(dU.Nr(R[F].ParagraphSheet.Properties))}$.VA=$.VA.length==0?{}:dU.Vi($.VA);
$.SW=$.SW.length==0?{}:dU.Vi($.SW);return $};dU.aze=function(x,Q,c,$,z){var j=x.RunLengthArray;if(z){var U=dU.YN(j,c);
if(U.xl!=c){var i=j[U.yh];j.splice(U.yh,0,c-U.xl);j[U.yh+1]=i-j[U.yh];x.RunArray.splice(U.yh+1,0,dU.Nr(x.RunArray[U.yh]))}var b=dU.YN(j,$);
if(b.xl+j[b.yh]-1!=$){var i=j[b.yh];j.splice(b.yh,0,$-b.xl+1);j[b.yh+1]=i-j[b.yh];x.RunArray.splice(b.yh+1,0,dU.Nr(x.RunArray[b.yh]))}}var U=dU.YN(j,c),b=dU.YN(j,$);
if(z)for(var F=U.yh;F<=b.yh;F++)dU.dt(x.RunArray[F].StyleSheet.StyleSheetData,Q);else for(var F=U.yh;
F<=b.yh;F++)dU.dt(x.RunArray[F].ParagraphSheet.Properties,Q)};dU.aAs=function(x,Q,c){var $=x.EngineDict.StyleRun.RunLengthArray,z=[],j=0;
for(var F=0;F<$.length;F++){var U=$[F];for(var i=0;i<U;i++)if(Q<=j+i&&j+i<c)z.push(F);j+=U}var b=z[0],e=[];
for(var F=0;F<z.length;F++){var k=z[F]-b;if(k==e.length)e.push(0);e[k]++}return e};dU.amf=function(x){var Q=x.EngineDict.StyleRun,c=Q.RunArray,$=Q.RunLengthArray;
for(var F=0;F<$.length-1;F++){var z=c[F].StyleSheet.StyleSheetData,j=c[F+1].StyleSheet.StyleSheetData;
if(JSON.stringify(z)==JSON.stringify(j)){c.splice(F+1,1);$[F]+=$[F+1];$.splice(F+1,1);F--}}};dU.Bm=function(x){var Q=x.Gb.AntA.v.Annt;
Q=["Anno","antiAliasSharp","AnCr","AnSt","AnSm"].indexOf(Q);if(Q==-1)Q=1;return Q};dU.AM=function(x,Q){x.Gb.AntA.v.Annt=["Anno","antiAliasSharp","AnCr","AnSt","AnSm"][Q]};
dU.g5=function(x,Q){var c,$;c=["FontSize","Leading","BaselineShift","_LineWidth"];$=x.VA;for(var F=0;
F<c.length;F++)if($[c[F]]!=null)$[c[F]]*=Q;c=["StartIndent","EndIndent","FirstLineIndent","SpaceBefore","SpaceAfter"];
$=x.SW;for(var F=0;F<c.length;F++)if($[c[F]]!=null)$[c[F]]*=Q};dU.anw=function(){return dU.zl(dU.Nr(dU.ar5),0,0)};
dU.avh=function(){return{classID:"TxLr",Txt:{t:"TEXT",v:"\0"},textGridding:{t:"enum",v:{textGridding:"None"}},Ornt:{t:"enum",v:{Ornt:"Hrzn"}},AntA:{t:"enum",v:{Annt:"antiAliasSharp"}},TextIndex:{t:"long",v:0},VAlign:{t:"long",v:0}}};
dU.YN=function(x,Q){var c=0,F=0;while(c+x[F]<=Q){c+=x[F];F++}return{yh:F,xl:c}};dU.ah_=function(){var x=dU.Nr(this.ar5);
return x};dU.a68=function(x,Q){var c=Q.SW};dU.al_=function(x,Q){var c=Q.VA,$;$=x.Undl;if($&&$.v.Undl=="underlineOnLeftInVertical")c.Underline=!0;
$=x.syntheticItalic;if($)c.FauxItalic=$.v};dU.anA={Justification:0,FirstLineIndent:0,StartIndent:0,EndIndent:0,SpaceBefore:0,SpaceAfter:0,AutoHyphenate:!1,HyphenatedWordSize:6,PreHyphen:2,PostHyphen:2,ConsecutiveHyphens:8,Zone:36,WordSpacing:[.8,1,1.33],LetterSpacing:[0,0,0],GlyphSpacing:[1,1,1],AutoLeading:1.2,LeadingType:0,Hanging:!1,Burasagari:!1,KinsokuOrder:0,EveryLineComposer:!1,_Direction:0,_ComposerEngine:1};
dU.afE={Font:0,FontSize:12,FauxBold:!1,FauxItalic:!1,AutoLeading:!0,Leading:0,HorizontalScale:1,VerticalScale:1,Tracking:0,AutoKerning:!0,Kerning:0,BaselineShift:0,FontCaps:0,FontBaseline:0,Underline:!1,Strikethrough:!1,Ligatures:!0,DLigatures:!1,BaselineDirection:2,Tsume:0,StyleRunAlignment:2,Language:0,NoBreak:!1,FillColor:{Type:1,Values:[1,0,0,0]},StrokeColor:{Type:1,Values:[1,0,0,0]},_FillBackgroundColor:{Type:1,Values:[1,0,0,0]},FillFlag:!0,StrokeFlag:!1,_LineWidth:1,_FillBackgroundFlag:!1,FillFirst:!0,YUnderline:1,OutlineWidth:1,CharacterDirection:0,HindiNumbers:!1,Kashida:1,DiacriticPos:2};
dU.ao7=function(){return{RunArray:[],RunLengthArray:[],IsJoinable:2}};dU.ar5={EngineDict:{Editor:{Text:"\n"},ParagraphRun:{DefaultRunData:{ParagraphSheet:{DefaultStyleSheet:0,Properties:{}},Adjustments:{Axis:[1,0,1],XY:[0,0]}},RunArray:[{ParagraphSheet:{DefaultStyleSheet:0,Properties:JSON.parse(JSON.stringify(dU.anA))},Adjustments:{Axis:[1,0,1],XY:[0,0]}}],RunLengthArray:[1],IsJoinable:1},StyleRun:{DefaultRunData:{StyleSheet:{StyleSheetData:{}}},RunArray:[{StyleSheet:{StyleSheetData:{Font:0,FontSize:24,AutoKerning:!0,Kerning:0}}}],RunLengthArray:[1],IsJoinable:2},GridInfo:{GridIsOn:!1,ShowGrid:!1,GridSize:18,GridLeading:22,GridColor:{Type:1,Values:[0,0,0,1]},GridLeadingFillColor:{Type:1,Values:[0,0,0,1]},AlignLineHeightToGridFlags:!1},AntiAlias:4,UseFractionalGlyphWidths:!0,Rendered:{Version:1,Shapes:{WritingDirection:0,Children:[{ShapeType:0,Procession:0,Lines:{WritingDirection:0,Children:[]},Cookie:{Photoshop:{ShapeType:0,PointBase:[0,0],Base:{ShapeType:0,TransformPoint0:[1,0],TransformPoint1:[0,1],TransformPoint2:[0,0]}}}}]}}},ResourceDict:{KinsokuSet:[{Name:"PhotoshopKinsokuHard",NoStart:"\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01ー\u2015\u2019\u201D\uFF09\u3015\uFF3D\uFF5D\u3009\u300B\u300D\u300F\u3011ヽヾゝゞ々ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ\u309B\u309C?!)]},.:;\u2103\u2109\xA2\uFF05\u2030",NoEnd:"\u2018\u201C\uFF08\u3014\uFF3B\uFF5B\u3008\u300A\u300C\u300E\u3010([{\uFFE5\uFF04\xA3\uFF20\xA7\u3012\uFF03",Keep:"\u2015\u2025",Hanging:"\u3001\u3002.,"},{Name:"PhotoshopKinsokuSoft",NoStart:"\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u2019\u201D\uFF09\u3015\uFF3D\uFF5D\u3009\u300B\u300D\u300F\u3011ヽヾゝゞ々",NoEnd:"\u2018\u201C\uFF08\u3014\uFF3B\uFF5B\u3008\u300A\u300C\u300E\u3010",Keep:"\u2015\u2025",Hanging:"\u3001\u3002.,"}],MojiKumiSet:[{InternalName:"Photoshop6MojiKumiSet1"},{InternalName:"Photoshop6MojiKumiSet2"},{InternalName:"Photoshop6MojiKumiSet3"},{InternalName:"Photoshop6MojiKumiSet4"}],TheNormalStyleSheet:0,TheNormalParagraphSheet:0,ParagraphSheetSet:[{Name:"Normal RGB",DefaultStyleSheet:0,Properties:JSON.parse(JSON.stringify(dU.anA))}],StyleSheetSet:[{Name:"Normal RGB",StyleSheetData:JSON.parse(JSON.stringify(dU.afE))}],FontSet:[{Name:"DejaVuSans",Script:0,FontType:1,Synthetic:0},{Name:"AdobeInvisFont",Script:0,FontType:0,Synthetic:0},{Name:"MyriadHebrew-Regular",Script:6,FontType:0,Synthetic:0}],SuperscriptSize:.583,SuperscriptPosition:.333,SubscriptSize:.583,SubscriptPosition:.333,SmallCapSize:.7}};
var iA={};iA.aru=function(x){var Q=iA.a7l(x._0,x._1);iA.abd(Q,x._0);return Q};iA.a6T=function(x,Q,c){var $={};
$._98={_0:"i7"};$._0=iA.aqv(x,Q,c?c._0:null);$._1=iA.arn(x,Q,$._0,c?c._1:null);return $};iA.aqv=function(x,Q,c){var $={};
$._1=iA.a5Z(x,c?c._1:null);$._2={_0:[{_0:{_0:"s"}}],_1:[{_0:"i0"}]};$._3=JSON.parse(JSON.stringify(iA.ak5));
$._4=JSON.parse(JSON.stringify(iA.aD4));$._5=iA.aCi(x,$._1._0,c?c._5:null);$._6=iA.asH(x,c?c._6:null);
$._8=iA.anB(x,Q,c?c._8:null);$._9=iA.apO;return $};iA.abd=function(x,Q){iA.akV(x,Q._5,Q._1._0)};iA.a5Z=function(x,Q){var c=[],$=[];
for(var F=0;F<x.length;F++){var z=x[F].ResourceDict.FontSet;for(var j=0;j<z.length;j++){var U=z[j];if($.indexOf(U.Name)!=-1)continue;
c.push(U);$.push(U.Name)}}var i={_0:[]};for(var F=0;F<c.length;F++){var b=c[F],e={_0:{_99:"/CoolTypeFont",_0:{_0:"s"+b.Name,_1:"i"+b.Script,_2:"i"+b.FontType}}};
if(b.Script==0)delete e._0._0._1;i._0.push(e)}return i};iA.aCi=function(x,Q,c){var $={_0:[],_1:[]},z={_0:JSON.parse(JSON.stringify(iA.aCF))};
iA.aD_(z._0,x[0].ResourceDict.StyleSheetSet[0],Q,x[0].ResourceDict.FontSet);$._0.push(z);$._1.push({_0:"i0"});
$._0.push({_0:{_0:"sNone",_5:"i0",_6:{}}});$._1.push({_0:"i1"});return $};iA.akV=function(x,Q,c){var $=Q._0[0];
for(var F=0;F<x.length;F++)iA.a2D($._0,x[F].ResourceDict.StyleSheetSet[0],c,x[F].ResourceDict.FontSet)};
iA.asH=function(x,Q){var c={_0:[],_1:[]},$={_0:JSON.parse(JSON.stringify(iA.cY))};iA.Wp($._0,x[0].ResourceDict.ParagraphSheetSet[0]);
c._0.push($);c._1.push({_0:"i0"});$={_0:JSON.parse(JSON.stringify(iA.cY))};iA.Wp($._0,x[0].ResourceDict.ParagraphSheetSet[0]);
$._0._0="sBasic Paragraph";$._0._6="i0";c._0.push($);c._1.push({_0:"i1"});return c};iA.anB=function(x,Q,c){var $={_0:[]};
for(var F=0;F<x.length;F++){var z=x[F].Curve,j={};$._0.push({_0:j});var U=dU.SI(x[F]);j._1={};j._2={};
j._2._0="i"+U;if(x[F]._LineOrientation==2)j._2._1="i2";if(U==0){delete j._1;j._2._6=["f-1","f-1"];j._2._11={_4:"i-1",_7:!1}}else if(U==1&&z==null){var i=dU.Sx(x[F]),b=i[2],e=i[3];
j._1._0=iA.I_("f",[0,0,0,0,b,0,b,0,b,0,b,0,b,e,b,e,b,e,b,e,0,e,0,e,0,e,0,e,0,0,0,0]);j._2._6=["f-2","f-2"];
j._2._11={_4:"i-2",_7:!1}}else if(U==1){var i=dU.Sx(x[F]),b=i[2],e=i[3];j._1._0=iA.I_("f",z.Points);
j._2._6=["f-3","f-3"];j._2._11={_4:"i-3",_7:!1}}else if(U==2){j._1._0=iA.I_("f",z.Points);j._2._6=iA.I_("f",z.TextOnPathTRange);
j._2._11={_0:z.Reversed,_3:"i0",_5:"f0",_7:!1}}}return $};iA.arn=function(x,Q,c,$){var z={};z._0=JSON.parse(JSON.stringify(iA.atW));
z._1=iA.ahA(x,Q,c,$?$._1:null);z._2=JSON.parse(JSON.stringify(iA.aCF._6));z._3=JSON.parse(JSON.stringify(iA.cY._5));
return z};iA.a7l=function(x,Q){return iA.aip(x,Q._1)};iA.ahA=function(x,Q,c,$){var z=[],j=c._1._0;for(var F=0;
F<x.length;F++){var U=x[F],i={_0:{}};z.push(i);i._0._0="s"+U.EngineDict.Editor.Text;i._0._0=i._0._0;
var b=i._0._5={_0:[]},e=U.EngineDict.ParagraphRun;for(var k=0;k<e.RunArray.length;k++){var K={_0:{}};
b._0.push(K);K._0._0={_0:"s",_5:{},_6:"i1"};iA.Wp(K._0._0,e.RunArray[k].ParagraphSheet);K._1="i"+e.RunLengthArray[k]}var g=i._0._6={_0:[]};
e=U.EngineDict.StyleRun;for(var k=0;k<e.RunArray.length;k++){var R={_0:{}};g._0.push(R);R._0._0={_0:"s",_5:"i1",_6:{}};
iA.aD_(R._0._0,e.RunArray[k].StyleSheet,j,U.ResourceDict.FontSet);R._1="i"+e.RunLengthArray[k]}e=U.EngineDict.AlternateGlyphRun;
if(e){var T=i._0._9={_0:[]};for(var k=0;k<e.RunArray.length;k++){var D={_0:{}};T._0.push(D);var a=e.RunArray[k];
if(a.Glyph!=null){D._0._0={_0:"i"+a.Glyph,_1:"e"}}D._1="i"+e.RunLengthArray[k]}}i._0._10={_0:"i4",_2:!0};
i._1=iA.view.awr(U,null,F,null)}return z};iA.aip=function(x,Q){var c=[],$=x._1._0;if(Q)for(var F=0;F<Q.length;
F++){var z=dU.ah_();c.push(z);var j=Q[F];z.EngineDict.Editor.Text=j._0._0.slice(1);var U=z.EngineDict.ParagraphRun.RunArray[0],i=z.EngineDict.ParagraphRun,b=j._0._5;
if(b)for(var e=0;e<b._0.length;e++){var k=b._0[e];i.RunLengthArray[e]=parseInt(k._1.slice(1));i.RunArray[e]=JSON.parse(JSON.stringify(U));
iA.a2Q(k._0._0,i.RunArray[e].ParagraphSheet)}else{i.RunLengthArray[0]=dU.bs(z).length}var K=j._0._6;
i=z.EngineDict.StyleRun;if(K)for(var e=0;e<K._0.length;e++){var g=K._0[e];i.RunLengthArray[e]=parseInt(g._1.slice(1));
i.RunArray[e]={StyleSheet:{StyleSheetData:{}}};iA.a2D(g._0._0,i.RunArray[e].StyleSheet,$,z.ResourceDict.FontSet)}else{i.RunLengthArray[0]=dU.bs(z).length;
i.RunArray[0]={StyleSheet:{StyleSheetData:{}}}}}return c};iA.aD_=function(x,Q,c,$,z){x._0="s"+(Q.Name?Q.Name:"");
var j=x._6,U=z?z._6:null,i=Q.StyleSheetData;if(i.Font!=null){var b=$[i.Font].Name,e=-1;for(var F=0;F<c.length;
F++)if("s"+b==c[F]._0._0._0){e=F;break}j._0="i"+e}if(i.FontSize!=null)j._1="f"+i.FontSize;if(i.FauxBold!=null)j._2=i.FauxBold;
if(i.FauxItalic!=null)j._3=i.FauxItalic;if(i.AutoLeading!=null)j._4=i.AutoLeading;if(i.Leading!=null)j._5="f"+i.Leading;
if(i.HorizontalScale!=null)j._6="f"+i.HorizontalScale;if(i.VerticalScale!=null)j._7="f"+i.VerticalScale;
if(i.Tracking!=null)j._8="i"+i.Tracking;if(i.BaselineShift!=null)j._9="f"+i.BaselineShift;if(i.AutoKerning!=null)j._11="i"+(i.AutoKerning?1:0);
if(i.FontCaps!=null)j._12="i"+i.FontCaps;if(i.FontBaseline!=null)j._13="i"+i.FontBaseline;if(i.Strikethrough!=null)j._15="i"+(i.Strikethrough?1:0);
if(i.Underline!=null)j._16="i"+(i.Underline?2:0);if(i.Ligatures!=null)j._18=i.Ligatures;if(i.DLigatures!=null)j._19=i.DLigatures;
if(i.BaselineDirection!=null)j._35="i"+i.BaselineDirection;if(i.Language!=null)j._38="i"+i.Language;
if(i.FillColor!=null)j._53=iA.Jf(i.FillColor);if(i.StrokeColor!=null)j._54=iA.Jf(i.StrokeColor);if(i.FillFlag!=null)j._56=i.FillFlag;
if(i.StrokeFlag!=null)j._57=i.StrokeFlag;if(i._LineWidth!=null)j._63="f"+i._LineWidth;if(i._FillBackgroundColor!=null)j._79=iA.Jf(i._FillBackgroundColor);
if(i._FillBackgroundFlag!=null)j._80=i._FillBackgroundFlag};iA.Jf=function(x){return{_99:"/SimplePaint",_0:{_0:"i1",_1:iA.I_("f",x.Values)}}};
iA.a2D=function(x,Q,c,$){var z=x._6;if(z==null)return;var j=Q.StyleSheetData;if(z._0){var U=parseInt(z._0.slice(1)),i=c[U]._0._0._0.slice(1);
dU.gD({VA:j,_t:$},i)}if(z._1!=null)j.FontSize=parseFloat(z._1.slice(1));if(z._2!=null)j.FauxBold=z._2;
if(z._3!=null)j.FauxItalic=z._3;if(z._4!=null)j.AutoLeading=z._4;if(z._5!=null)j.Leading=parseFloat(z._5.slice(1));
if(z._6!=null)j.HorizontalScale=parseFloat(z._6.slice(1));if(z._7!=null)j.VerticalScale=parseFloat(z._7.slice(1));
if(z._8!=null)j.Tracking=parseFloat(z._8.slice(1));if(z._9!=null)j.BaselineShift=parseFloat(z._9.slice(1));
if(z._11!=null)j.AutoKerning=parseFloat(z._11.slice(1))==1;if(z._12!=null)j.FontCaps=parseFloat(z._12.slice(1));
if(z._13!=null)j.FontBaseline=parseFloat(z._13.slice(1));if(z._15!=null)j.Strikethrough=parseFloat(z._15.slice(1))==1;
if(z._16!=null)j.Underline=parseFloat(z._16.slice(1))==1;if(z._18!=null)j.Ligatures=z._18;if(z._19!=null)j.DLigatures=z._19;
if(z._35!=null)j.BaselineDirection=parseFloat(z._35.slice(1));if(z._38!=null)j.Language=parseFloat(z._38.slice(1));
if(z._53!=null)j.FillColor=iA.vr(z._53);if(z._54!=null)j.StrokeColor=iA.vr(z._54);if(z._56!=null)j.FillFlag=z._56;
if(z._57!=null)j.StrokeFlag=z._57;if(z._63!=null)j._LineWidth=parseFloat(z._63.slice(1));if(z._79!=null)j._FillBackgroundColor=iA.vr(z._79);
if(z._80!=null)j._FillBackgroundFlag=z._80};iA.vr=function(x){var Q=x._0._0,c=x._0._1,$=[1,0,0,0],z=[];
for(var F=0;F<c.length;F++)z[F]=parseFloat(c[F].slice(1));if(Q=="i0")$[1]=$[2]=$[3]=z[1];else if(Q=="i1")$=z;
else if(Q=="i2")$=[1].concat(UDOC.C.cmykToRgb(z.slice(1)));else console.log("unknown color type",Q,z);
return{Type:1,Values:$}};iA.Wp=function(x,Q){x._0="s"+(Q.Name?Q.Name:"");var c=x._5,$=Q.Properties;if($.Justification!=null)c._0="i"+$.Justification;
if($.FirstLineIndent!=null)c._1="f"+$.FirstLineIndent;if($.StartIndent!=null)c._2="f"+$.StartIndent;
if($.EndIndent!=null)c._3="f"+$.EndIndent;if($.SpaceBefore!=null)c._4="f"+$.SpaceBefore;if($.SpaceAfter!=null)c._5="f"+$.SpaceAfter;
if($.AutoLeading!=null)c._7="f"+$.AutoLeading;if($.AutoHyphenate!=null)c._9=$.AutoHyphenate;if($._Direction!=null)c._33="i"+$._Direction;
if($._ComposerEngine!=null)c._35="i"+$._ComposerEngine};iA.a2Q=function(x,Q){var c=x._5;if(c==null)return;
var $=Q.Properties;if(c._0)$.Justification=parseInt(c._0.slice(1))};iA.I_=function(x,Q){var c=[];for(var F=0;
F<Q.length;F++)c.push(x+Q[F]);return c};iA.ak5={_0:[{_0:{_0:"sPhotoshop6MojiKumiSet4",_5:{_0:"i0",_3:"i2"}}},{_0:{_0:"sPhotoshop6MojiKumiSet3",_5:{_0:"i0",_3:"i4"}}},{_0:{_0:"sPhotoshop6MojiKumiSet2",_5:{_0:"i0",_3:"i3"}}},{_0:{_0:"sPhotoshop6MojiKumiSet1",_5:{_0:"i0",_3:"i1"}}},{_0:{_0:"sYakumonoHankaku",_5:{_0:"i0",_3:"i1"}}},{_0:{_0:"sGyomatsuYakumonoHankaku",_5:{_0:"i0",_3:"i3"}}},{_0:{_0:"sGyomatsuYakumonoZenkaku",_5:{_0:"i0",_3:"i4"}}},{_0:{_0:"sYakumonoZenkaku",_5:{_0:"i0",_3:"i2"}}}],_1:[{_0:"i0"},{_0:"i1"},{_0:"i2"},{_0:"i3"},{_0:"i4"},{_0:"i5"},{_0:"i6"},{_0:"i7"}]};
iA.aD4={_0:[{_0:{_0:"sNone",_5:{_0:"s",_1:"s",_2:"s",_3:"s",_4:"i0"}}},{_0:{_0:"sPhotoshopKinsokuHard",_5:{_0:"s!),.:;?]}\xA2\u2014\u2019\u201D\u2030\u2103\u2109\u3001\u3002々\u3009\u300B\u300A\u300F\u3011\u3015ぁぃぅぇぉっゃゅょゎ\u309B\u309Cゝゞァィゥェォッャュョヮヵヶ\u30FBーヽヾ\uFF01\uFF05\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D",_1:"s([{\xA3\xA7\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3012\u3014\uFF03\uFF04\uFF08\uFF20\uFF3B\uFF5B\uFFE5",_2:"s\u2014\u2025\u2026",_3:"s\u3001\u3002\uFF0C\uFF0E",_4:"i1"}}},{_0:{_0:"sPhotoshopKinsokuSoft",_5:{_0:"s\u2019\u201D\u3001\u3002々\u3009\u300B\u300A\u300F\u3011\u3015ゝゞ\u30FBヽヾ\uFF01\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D",_1:"s\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B",_2:"s\u2014\u2025\u2026",_3:"s\u3001\u3002\uFF0C\uFF0E",_4:"i2"}}},{_0:{_0:"sHard",_5:{_0:"s!),.:;?]}\xA2\u2014\u2019\u201D\u2030\u2103\u2109\u3001\u3002々\u3009\u300B\u300A\u300F\u3011\u3015ぁぃぅぇぉっゃゅょゎ\u309B\u309Cゝゞァィゥェォッャュョヮヵヶ\u30FBーヽヾ\uFF01\uFF05\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D",_1:"s([{\xA3\xA7\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3012\u3014\uFF03\uFF04\uFF08\uFF20\uFF3B\uFF5B\uFFE5",_2:"s\u2014\u2025\u2026",_3:"s\u3001\u3002\uFF0C\uFF0E",_4:"i1"}}},{_0:{_0:"sSoft",_5:{_0:"s\u2019\u201D\u3001\u3002々\u3009\u300B\u300A\u300F\u3011\u3015ゝゞ\u30FBヽヾ\uFF01\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D",_1:"s\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B",_2:"s\u2014\u2025\u2026",_3:"s\u3001\u3002\uFF0C\uFF0E",_4:"i2"}}}],_1:[{_0:"i0"},{_0:"i1"},{_0:"i2"},{_0:"i3"},{_0:"i4"}]};
iA.aCF={_0:"sNormal RGB",_6:{_0:"i0",_1:"f12",_2:!1,_3:!1,_4:!0,_5:"f0",_6:"f1",_7:"f1",_8:"i0",_9:"f0",_10:"f0",_11:"i1",_12:"i0",_13:"i0",_14:"i0",_15:"i0",_16:"i0",_17:"f0",_18:!0,_19:!1,_20:!1,_21:!1,_22:!1,_23:!1,_24:!1,_25:!1,_26:!1,_27:!1,_28:!1,_29:!1,_30:"i0",_31:!1,_32:!1,_33:!1,_34:!1,_35:"i2",_36:"f0",_37:"i2",_38:"i0",_39:"i0",_40:!1,_41:"i2",_42:"i0",_43:{_0:"f.5"},_44:"i2",_45:"i2",_46:"i7",_47:"i0",_48:"i0",_49:"f-1",_50:"f-1",_51:"i0",_52:!1,_53:{_99:"/SimplePaint",_0:{_0:"i1",_1:["f1","f0","f0","f0"]}},_54:{_99:"/SimplePaint",_0:{_0:"i1",_1:["f1","f0","f0","f0"]}},_55:{_99:"/SimpleBlender"},_56:!0,_57:!1,_58:!0,_59:!1,_60:!1,_61:"i0",_62:"i0",_63:"f1",_64:"f4",_65:"f0",_66:[],_67:[],_68:"i0",_69:"i0",_70:"i0",_71:"i4",_72:"f0",_73:"f0",_74:!1,_75:!1,_76:!1,_77:!0,_78:!0,_79:{_99:"/SimplePaint",_0:{_0:"i1",_1:["f1","f1","f1","f0"]}},_80:!1,_81:"i0",_82:"f3",_83:"f3",_84:!1,_85:"i0",_86:{_99:"/SimpleCustomFeature"},_87:"f100",_88:!0}};
iA.cY={_0:"sNormal RGB",_5:{_0:"i0",_1:"f0",_2:"f0",_3:"f0",_4:"f0",_5:"f0",_6:"i1",_7:"f1.2",_8:"i0",_9:!0,_10:"i6",_11:"i2",_12:"i2",_13:"i0",_14:"f36",_15:!0,_16:"f.5",_17:["f.8","f1","f1.33"],_18:["f0","f0","f0"],_19:["f1","f1","f1"],_20:"i6",_21:!1,_22:"i0",_23:!0,_24:"i0",_25:"i0",_27:"/nil",_26:!1,_28:"/nil",_29:!1,_30:{},_31:"f36",_32:{},_33:"i0",_34:"i7",_35:"i1",_36:"/nil",_37:"i0",_38:!1,_39:"i0",_40:"i2"}};
iA.apO={_0:[{_0:{_0:"skPredefinedNumericListStyleTag",_6:"i1"}},{_0:{_0:"skPredefinedUppercaseAlphaListStyleTag",_6:"i2"}},{_0:{_0:"skPredefinedLowercaseAlphaListStyleTag",_6:"i3"}},{_0:{_0:"skPredefinedUppercaseRomanNumListStyleTag",_6:"i4"}},{_0:{_0:"skPredefinedLowercaseRomanNumListStyleTag",_6:"i5"}},{_0:{_0:"skPredefinedBulletListStyleTag",_6:"i6"}}],_1:[{_0:"i0"},{_0:"i1"},{_0:"i2"},{_0:"i3"},{_0:"i4"},{_0:"i5"}]};
iA.atW={_0:{_0:"i1",_1:[{_0:"s ",_1:"s1"},{_0:"s\r",_1:"s6"},{_0:"s\t",_1:"s0"},{_0:"s\u2029",_1:"s5"},{_0:"s\x03",_1:"s5"},{_0:"s\u3000",_1:"s1"},{_0:"s\xAD",_1:"s3"}]},_1:"i0",_2:"i0",_3:"f.583",_4:"f.333",_5:"f.583",_6:"f.333",_7:"f.7",_8:!0,_9:[{_0:"i0",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i1",_1:"s\u201D",_2:"s\u201D",_3:"s\u2019",_4:"s\u2019"},{_0:"i2",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i3",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i4",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i5",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i6",_1:"s\xAB",_2:"s\xBB",_3:"s\u2039",_4:"s\u203A"},{_0:"i7",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i8",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i9",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i10",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i11",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i12",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i13",_1:"s\u201D",_2:"s\u201D",_3:"s\u2019",_4:"s\u2019"},{_0:"i14",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i15",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i16",_1:"s\u201D",_2:"s\u201D",_3:"s\u2019",_4:"s\u2019"},{_0:"i17",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i18",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i19",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i20",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i21",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i22",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i23",_1:"s\u201E",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i24",_1:"s\u201E",_2:"s\u201D",_3:"s\u201A",_4:"s\u2019"},{_0:"i25",_1:"s\xAB",_2:"s\xBB",_3:"s\u2039",_4:"s\u203A"},{_0:"i26",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i27",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i28",_1:"s\u201E",_2:"s\u201D",_3:"s\u2019",_4:"s\u2019"},{_0:"i29",_1:"s\u301D",_2:"s\u301E"},{_0:"i30",_1:"s\u300C",_2:"s\u300D"},{_0:"i31",_1:"s\u201E",_2:"s\u201C",_3:"s\u2018",_4:"s\u2019"},{_0:"i32",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i33",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i34",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i35",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i36",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i37",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i38",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i39",_1:"s\xAB",_2:"s\xBB",_3:"s<",_4:"s>"},{_0:"i40",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i41",_1:"s\xAB",_2:"s\xBB",_3:"s<",_4:"s>"},{_0:"i42",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i43",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i44",_1:"s\xAB",_2:"s\xBB",_3:"s\u2039",_4:"s\u203A"},{_0:"i45",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"}],_15:{_0:"sWinSoft"},_16:!1};
var h1={};h1.ai3=function(x){return h1.QZ(x,h1.xg,0)};h1.a4a=function(x){return h1.w$(x,h1.xg)};h1.QZ=function(x,Q,c){var $;
if(typeof x=="string")return x;if(x instanceof Array){$=[];for(var F=0;F<x.length;F++)$[F]=h1.QZ(x[F],Q,c+1)}else{$={};
var z={};for(var j in Q){var U=Q[j],i="_"+U[0];if(x[i]!=null){$[j]=U[1]?h1.QZ(x[i],U[1],c+1):x[i];z[i]=!0}}for(var j in x){if(z[j]==null){if(j.length>3)continue;
console.log(Q,z);console.log(j,x);throw"e"}}}return $};h1.w$=function(x,Q){var c;if(typeof x=="string")return x;
else if(x instanceof Array){c=[];for(var F=0;F<x.length;F++)c[F]=h1.w$(x[F],Q)}else{c={};var $={};for(var z in Q){var j=Q[z],U="_"+j[0];
if(x[z]!=null){c[U]=j[1]?h1.w$(x[z],j[1]):x[z];$[z]=!0}}for(var z in x){if($[z]==null){console.log(Q,$);
console.log(z,x);throw"e"}}}return c};h1.zf={_Color:[0,{_Type:[0],_Values:[1]}],_CAIKnownStyleID:[5],_StreamTag:[99]};
h1.hg={_Font:[0],_FontSize:[1],_FauxBold:[2],_FauxItalic:[3],_AutoLeading:[4],_Leading:[5],_HorizontalScale:[6],_VerticalScale:[7],_Tracking:[8],_BaselineShift:[9],_CharacterRotation:[10],_AutoKern:[11],_FontCaps:[12],_FontBaseline:[13],_FontOTPosition:[14],_StrikethroughPosition:[15],_UnderlinePosition:[16],_UnderlineOffset:[17],_Ligatures:[18],_DiscretionaryLigatures:[19],_ContextualLigatures:[20],_AlternateLigatures:[21],_OldStyle:[22],_Fractions:[23],_Ordinals:[24],_Swash:[25],_Titling:[26],_ConnectionForms:[27],_StylisticAlternates:[28],_Ornaments:[29],_FigureStyle:[30],_ProportionalMetrics:[31],_Kana:[32],_Italics:[33],_Ruby:[34],_BaselineDirection:[35],_Tsume:[36],_StyleRunAlignment:[37],_Language:[38],_JapaneseAlternateFeature:[39],_EnableWariChu:[40],_WariChuLineCount:[41],_WariChuLineGap:[42],_WariChuSubLineAmount:[43,{_WariChuSubLineScale:[0]}],_WariChuWidowAmount:[44],_WariChuOrphanAmount:[45],_WariChuJustification:[46],_TCYUpDownAdjustment:[47],_TCYLeftRightAdjustment:[48],_LeftAki:[49],_RightAki:[50],_JiDori:[51],_NoBreak:[52],_FillColor:[53,h1.zf],_StrokeColor:[54,h1.zf],_Blend:[55,{_1:[1],_2:[2],_3:[3],_Knockout:[4],_StreamTag:[99]}],_FillFlag:[56],_StrokeFlag:[57],_FillFirst:[58],_FillOverPrint:[59],_StrokeOverPrint:[60],_LineCap:[61],_LineJoin:[62],_LineWidth:[63],_MiterLimit:[64],_LineDashOffset:[65],_LineDashArray:[66],_Type1EncodingNames:[67],_Kashidas:[68],_DirOverride:[69],_DigitSet:[70],_DiacVPos:[71],_DiacXOffset:[72],_DiacYOffset:[73],_OverlapSwash:[74],_JustificationAlternates:[75],_StretchedAlternates:[76],_FillVisibleFlag:[77],_StrokeVisibleFlag:[78],_FillBackgroundColor:[79,h1.zf],_FillBackgroundFlag:[80],_UnderlineStyle:[81],_DashedUnderlineGapLength:[82],_DashedUnderlineDashLength:[83],_SlashedZero:[84],_StylisticSets:[85],_CustomFeature:[86,{_StreamTag:[99]}],_MarkYDistFromBaseline:[87],_AutoMydfb:[88],_RefFontSize:[89],_FontSizeRefType:[90],_92:[92],_93:[93]};
h1.a0d={_Justification:[0],_FirstLineIndent:[1],_StartIndent:[2],_EndIndent:[3],_SpaceBefore:[4],_SpaceAfter:[5],_DropCaps:[6],_AutoLeading:[7],_LeadingType:[8],_AutoHyphenate:[9],_HyphenatedWordSize:[10],_PreHyphen:[11],_PostHyphen:[12],_ConsecutiveHyphens:[13],_Zone:[14],_HyphenateCapitalized:[15],_HyphenationPreference:[16],_WordSpacing:[17],_LetterSpacing:[18],_GlyphSpacing:[19],_SingleWordJustification:[20],_Hanging:[21],_AutoTCY:[22],_KeepTogether:[23],_BurasagariType:[24],_KinsokuOrder:[25],_Kinsoku:[27],_KurikaeshiMojiShori:[26],_MojiKumiTable:[28],_EveryLineComposer:[29],_TabStops:[30],_DefaultTabWidth:[31],_DefaultStyle:[32,h1.hg],_ParagraphDirection:[33],_JustificationMethod:[34],_ComposerEngine:[35],_ListStyle:[36],_ListTier:[37],_ListSkip:[38],_ListOffset:[39],_KashidaWidth:[40]};
h1.apT={_Name:[0],_Features:[5,h1.a0d],_Parent:[6],_UUID:[97]};h1.aA4={_Name:[0],_Parent:[5],_Features:[6,h1.hg],_UUID:[97]};
h1.xg={_98:[98,{_0:[0]}],_DocumentResources:[0,{_0:[0],_FontSet:[1,{_Resources:[0,{_Resource:[0,{_StreamTag:[99],_Identifier:[0,{_Name:[0],_ScriptType:[1],_Type:[2],_Synthetic:[3],_4:[4],_MMAxis:[5]}],_UUID:[97]}]}],_DisplayList:[1,{_Resource:[0]}]}],_MojiKumiCodeToClassSet:[2,{_Resources:[0,{_Resource:[0,{_Name:[0],_Members:[5],_UUID:[97]}]}],_DisplayList:[1,{_Resource:[0]}]}],_MojiKumiTableSet:[3,{_Resources:[0,{_Resource:[0,{_Name:[0],_Members:[5,{_CodeToClass:[0],_AutoTsume:[1,{_TsumeMappings:[0,{_Before:[0],_After:[1],_Code:[2]}]}],_Table:[2,{_DataArray:[0,{_SparseArray:[0,{_Index:[0],_Elements:[1,{_P:[0],_Data:[1,{_A:[0,{_R:[0],_P:[1]}],_B:[1,{_R:[0],_P:[1]}]}]}]}]}]}],_PredefinedTag:[3]}],_UUID:[97]}]}],_DisplayList:[1,{_Resource:[0]}]}],_KinsokuSet:[4,{_Resources:[0,{_Resource:[0,{_Name:[0],_Data:[5,{_NoStart:[0],_NoEnd:[1],_Keep:[2],_Hanging:[3],_PredefinedTag:[4]}],_UUID:[97]}]}],_DisplayList:[1,{_Resource:[0]}]}],_StyleSheetSet:[5,{_Resources:[0,{_Resource:[0,h1.aA4]}],_DisplayList:[1,{_Resource:[0]}]}],_ParagraphSheetSet:[6,{_Resources:[0,{_Resource:[0,h1.apT]}],_DisplayList:[1,{_Resource:[0]}]}],_7:[7,{_Resources:[0,{_Resource:[0,{_0:[0,{_0:[0],_1:[1,{_0:[0]}]}],_1:[1]}]}]}],_TextFrameSet:[8,{_Resources:[0,{_Resource:[0,{_0:[0],_Bezier:[1,{_Points:[0]}],_Data:[2,{_Type:[0],_LineOrientation:[1],_FrameMatrix:[2],_4:[4],_5:[5],_TextOnPathTRange:[6],_RowGutter:[7],_ColumnGutter:[8],_9:[9],_FirstBaselineAlignment:[10,{_Flag:[0],_Min:[1]}],_PathData:[11,{_1:[1],_Reversed:[0],_2:[2],_3:[3],_Spacing:[4],_5:[5],_6:[6],_7:[7],_18:[18]}],_12:[12],_13:[13]}],_3:[3,{_0:[0]}],_UUID:[97]}]}]}],_ListStyleSet:[9,{_Resources:[0,{_Resource:[0,{_Name:[0],_LevelStyle:[5,{_IndentUnits:[0],_TextIndent:[1],_LabelIndent:[2],_LabelAlignment:[3],_SequenceGenerator:[5,{_Prefix:[0],_Postfix:[1],_MinDigits:[2],_CaseType:[3],_Bullet:[9],_StreamTag:[99]}],_Font:[6],_UseOriginalFont:[7]}],_PredefinedTag:[6],_UUID:[97]}]}],_DisplayList:[1,{_Resource:[0]}]}]}],_DocumentObjects:[1,{_DocumentSettings:[0,{_HiddenGlyphFont:[0,{_AlternateGlyphFont:[0],_WhitespaceCharacterMapping:[1,{_WhitespaceCharacter:[0],_AlternateCharacter:[1]}]}],_NormalStyleSheet:[1],_NormalParagraphSheet:[2],_SuperscriptSize:[3],_SuperscriptPosition:[4],_SubscriptSize:[5],_SubscriptPosition:[6],_SmallCapSize:[7],_UseSmartQuotes:[8],_SmartQuoteSets:[9,{_Language:[0],_OpenDoubleQuote:[1],_CloseDoubleQuote:[2],_OpenSingleQuote:[3],_CloseSingleQuote:[4]}],_10:[10],_11:[11],_LinguisticSettings:[15,{_PreferredProvider:[0],_LinguisticProviderInfo:[1]}],_13:[13],_UseSmartLists:[16],_DefaultStoryDir:[17],_18:[18],_GreekingSize:[20]}],_TextObjects:[1,{_Model:[0,{_Text:[0],_ParagraphRun:[5,{_RunArray:[0,{_RunData:[0,{_ParagraphSheet:[0,h1.apT]}],_Length:[1]}]}],_StyleRun:[6,{_RunArray:[0,{_RunData:[0,{_StyleSheet:[0,h1.aA4]}],_Length:[1]}]}],_FirstKern:[7],_8:[8],_AlternateGlyphRun:[9,{_RunArray:[0,{_RunData:[0,{_AlternateGlyphSheet:[0,{_Glyph:[0],_Name:[1],_2:[2]}]}],_Length:[1]}]}],_StorySheet:[10,{_AntiAlias:[0],_1:[1],_UseFractionalGlyphWidths:[2],_3:[3],_4:[4]}],_KernRun:[15],_HyperlinkRun:[16]}],_View:[1,{_Frames:[0,{_Resource:[0]}],_RenderedData:[1,{_RunArray:[0,{_RunData:[0,{_0:[0],_LineCount:[1]}],_Length:[1]}]}],_Strikes:[2],_4:[4]}],_OpticalAlignment:[2]}],_OriginalNormalStyleFeatures:[2,h1.hg],_OriginalNormalParagraphFeatures:[3,h1.a0d],_4:[4]}]};
iA.view={};iA.view.awr=function(x,Q,c,$){var z={},j=dU.SI(x);z._0=[{_0:"i"+c}];return z};function CSS(){}CSS.afy=function(x,Q){var c=x.add,$=c.vmsk,z=c.vstk,j=c.lmfx,U=c.TySh,i=[],b=CSS.L$(j,c),e=x.opacity/255*(x.add.iOpa!=null?x.add.iOpa/255:1);
if(e!=1)i.push("opacity: "+e.toFixed(3));if(x.Z6()&&$){var k=d.o.sP($.$);if(!k._6()){i.push("width: "+Math.round(k.m)+"px");
i.push("height: "+Math.round(k.e)+"px")}var K=d.o.aB_($.$);if(K>0)i.push("border-radius: "+Math.round(K)+"px")}else if(U){var g=U.HW;
if(dU.SI(g)==1){var k=dU.Sx(g);i.push("width: "+Math.round(k[2])+"px");i.push("height: "+Math.round(k[3])+"px")}CSS.ac1(i,dU.zl(g,0,0),U.i,!1,!1,b[0])}CSS.adZ(Q,j,i);
if(U==null)CSS.a9w(b,i);if(z==null||!z.strokeEnabled.v)z=en.FH(j);if(z&&z.strokeEnabled.v){var R=z.strokeStyleContent.v,T=R.classID,D=z.strokeStyleOpacity.v.val/100,a=z.strokeStyleLineWidth.v.val,_="";
if(T=="solidColorLayer")_=CSS.W2(R.Clr.v,D);i.push("border: "+a+"px solid "+_)}return i};CSS.adZ=function(x,Q,c){if(Q==null||!Q.masterFXSwitch.v)return;
var $=Q.dropShadowMulti.v.concat(Q.innerShadowMulti.v);for(var F=0;F<$.length;F++){var z=$[F].v;if(z.enab.v){var j=z.classID=="IrSh",U=z.Dstn.v.val,i=z.lagl.v.val*Math.PI/180;
if(z.uglg&&z.uglg.v)i=x.FO()*Math.PI/180;var b=U*Math.cos(i),e=U*Math.sin(i),k=(b==0?"0 ":CSS.aDE(-b)+"px ")+(e==0?"0 ":CSS.aDE(e)+"px ")+z.blur.v.val/2+"px "+CSS.W2(z.Clr.v,z.Opct.v.val/100);
if(j)c.push("box-shadow: inset "+k);else c.push("filter: drop-shadow("+k+")")}}};CSS.L$=function(x,Q){var c=en.nA(x,Q),$=c[0],z=c[1],j,U;
if($){j=CSS.W2($.Clr.v,Q.iOpa!=null?Q.iOpa/255:1)}else if(z){U=CSS.yN(z)}return[j,U]};CSS.a9w=function(x,Q){if(x[0])Q.push("background-color: "+x[0]);
if(x[1])Q.push("background-image: "+x[1])};CSS.y5={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};
CSS.aDE=function(jF){return""+parseFloat(jF.toFixed(3))};CSS.zH=function(x){if(x==null)return{Z:0,r:0,J:0};
var Q=x.indexOf("(");if(Q!=-1){var c=x.slice(Q+1,x.length-1).split(",");for(var F=0;F<c.length;F++){var $=c[F].trim();
c[F]=parseFloat($)*($.endsWith("%")?255/100:1)}return{Z:c[0],r:c[1],J:c[2]}}if(x.charAt(0)!="#"){var z=CSS.y5;
if(z[x])x=z[x];else console.log("unknown color "+x)}x=x.slice(1);if(x.length==4)x=x[0]+x[0]+x[1]+x[1]+x[2]+x[2]+x[3]+x[3];
if(x.length==3)x=x[0]+x[0]+x[1]+x[1]+x[2]+x[2];var j=-1;if(x.length==8){j=parseInt(x.slice(6),16);x=x.slice(0,6)}x=parseInt(x,16);
var U={Z:x>>16&255,r:x>>8&255,J:x&255};if(j!=-1)U.V=j;return U};CSS.W2=function(x,Q){return CSS.Au(d.I.Du(x),Q)};
CSS.Au=function(x,Q){if(Q==null)Q=1;var c=Math.round(x.Z),$=Math.round(x.r),z=Math.round(x.J),j=c<<16|$<<8|z;
return Q==1?"#"+d.vg(j):"rgba("+c+","+$+","+z+","+Q+")"};CSS.yN=function(x){var Q=x.Grad.v;if(Q.Clrs==null)return"";
var c=Q.Clrs.v.slice(0),$=Q.Trns.v.slice(0),z=x.Ofst.v,j=x.Type.v.GrdT=="Rdl"?1:0,U=(j==1?"radial":"linear")+"-gradient",i=j==0?Math.round(-x.Angl.v.val+90)+"deg":"circle at center",b=x.Rvrs.v,e=d.I.d9(Q,b);
for(var F=0;F<e.length;F++){var k=e[F],K=k[1];i+=", "+CSS.Au({Z:K[0]*255,r:K[1]*255,J:K[2]*255},k[2])+" "+Math.round(k[0]*100)+"%"}return U+"("+i+")"};
CSS.ac1=function(x,Q,c,$,z,j){var U=Q.VA,i=$?1:c.c0(),b=Math.round(U.FontSize*i);x.push("font-size: "+b+"px");
var e=U.Tracking;if(!$&&e!=null&&e!=0)x.push("letter-spacing: "+Math.round(e*b/1e3)+"px");if(!U.AutoLeading)x.push("line-height: "+Math.round(U.Leading*i)+"px");
if(U.Strikethrough)x.push("text-decoration: line-through");if(U.Underline)x.push("text-decoration: underline");
if(U.FontCaps==2)x.push("text-transform: uppercase");var k=dU.Du(U.FillColor);k=[k.Z,k.r,k.J].map(Math.round);
x.push(($?"fill: ":"color: ")+(j?j:"#"+d.vg(k[0]<<16|k[1]<<8|k[2])));var K=Q._t[U.Font].Name;if(K){var g=hX.EU.WY(K),R="",T=null,D=null;
if(g!=null&&K!=hX.pi(g))g=null;if(z&&g)R+="\""+K+"\", ";var a=K.toLowerCase();if(g){T=hX.ZK(g)[0];if(g["OS/2"])D=g["OS/2"].usWeightClass}else{T=CSS.a3p(K);
if(a.indexOf("light")!=-1)D=300;else if(a.indexOf("medium")!=-1)D=500;else if(a.indexOf("black")!=-1||a.indexOf("extrabold")!=-1)D=800;
else if(a.indexOf("bold")!=-1)D="bold"}if(T!=null)R+="\""+T+"\"";if(D!=null)x.push("font-weight: "+D);
if(a.indexOf("italic")!=-1||a.indexOf("oblique")!=-1)x.push("font-style: italic");if(R)x.push("font-family: "+R)}var _=Q.SW.Justification;
if(_!=null&&_!=0)if($){}else x.push("text-align: "+["left","right","center"][_%3])};CSS.a3p=function(x){x=x.split("-")[0];
while(x.endsWith("MT")||x.endsWith("PS"))x=x.slice(0,x.length-2);var Q=!0;for(var F=0;F<x.length;F++){var c=x.charAt(F);
if(!Q&&c.toLowerCase()!=c){x=x.slice(0,F)+" "+x.slice(F);F++;Q=!0}else Q=!1}return x};function jY(){}jY.q0={document:!0,parent:!0,top:!0,eval:!0,postMessage:!0,UTIF:!0,PIMG:!0,LNG:!0,FNTS:!0};
jY.Qd=function(x,Q){var c=Date.now(),$=x.split("\n"),z;if($.length==1)$=x.split("\r");for(var F=0;F<$.length;
F++)if($[F].trim()[0]=="#"){$[F]=""}x=$.join("\n");try{z=acorn.parse(x)}catch(dQ){console.log(dQ);return}var j=JSON.parse(JSON.stringify(jY.mB.oq));
j.__return=!1;j.__continue=!1;j.__break=!1;j.__throw=!1;j.__fs={};j.__window={};jY.eval(z,Q,j);var U=j.__fs;
if(Object.keys(U).length!=0){var i=UZIP.encode(U);hF.save(i,"output.zip")}};jY.eval=function(x,Q,c){var $=x.type;
if(!1){}else if($=="Program"||$=="BlockStatement"){var z=x.body;for(var F=0;F<z.length;F++){var j=z[F].type;
if(j=="FunctionDeclaration")c[z[F].id.name]=z[F]}for(var F=0;F<z.length;F++){var j=z[F].type,U=jY.eval(z[F],Q,c);
if(c.__continue&&c.__pif==null){c.__continue=!1;return U}if(c.__return||c.__break||c.__throw)return U}}else if($=="ReturnStatement"){c.__return=!0;
return x.argument?jY.uw(x.argument,Q,c):null}else if($=="BreakStatement"){c.__break=!0}else if($=="ContinueStatement"){c.__continue=!0}else if($=="VariableDeclaration"){var i=x.declarations;
for(var F=0;F<i.length;F++)jY.eval(i[F],Q,c)}else if($=="VariableDeclarator"){c[x.id.name]=x.init?jY.uw(x.init,Q,c):null}else if($=="FunctionDeclaration"){c[x.id.name]=x}else if($=="MemberExpression"){var b=jY.uw(x.object,Q,c),e=x.computed?jY.uw(x.property,Q,c):jY.eval(x.property,Q,c),U;
if(b.O!=null)U=jY.mB.Wm(b,e,Q,c);else if(b==window&&jY.q0[e]){}else U=b[e];return U}else if($=="ArrayExpression"){var k=[],K=x.elements;
for(var F=0;F<K.length;F++)k.push(jY.uw(K[F],Q,c));return k}else if($=="ObjectExpression"){var k={},K=x.properties;
for(var F=0;F<K.length;F++){var g=K[F],R=K[F].key.name?K[F].key.name:K[F].key.value;k[R]=jY.uw(K[F].value,Q,c)}return k}else if($=="ExpressionStatement"){return jY.eval(x.expression,Q,c)}else if($=="NewExpression"){var T=x.arguments,D=x.callee,a=D.type,_=D.name,I=[],k=null;
for(var F=0;F<T.length;F++)I.push(jY.uw(T[F],Q,c));if(_=="Array")k=new window[_];else if(a=="Identifier")k=jY.mB.a3O(_,I,Q,c);
else throw"e";if(k==null)throw"new "+_;return k}else if($=="CallExpression"){var T=x.arguments,D=x.callee,a=D.type,f={};
for(var y in c)f[y]=c[y];var I=[];for(var F=0;F<T.length;F++)I.push(jY.uw(T[F],Q,c));if(a=="Identifier"){var Z=D.name,v=c[Z];
if(v&&v.O=="AppFunc"){Z=v.if;v=null}if(v){if(v.params){var G=v.params;for(var F=0;F<G.length;F++)f[G[F].name]=I[F];
return jY.eval(v.body,Q,f)}else{return v.apply(null,I)}}else if(jY.mB.aDt.indexOf(Z)!=-1)return jY.mB.Xn({O:"Application"},Z,I,Q,c);
else if(window[Z]==null)console.log("Unknown function "+Z);else if(jY.q0[Z])alert(Z+"() not available");
else{var q=window[Z].apply(window,I);return q}}else if(a=="MemberExpression"){var b=jY.uw(D.object,Q,c),e=D.computed?jY.uw(D.property,Q,c):jY.eval(D.property,Q,c);
if(b==window&&jY.q0[e])return;if(b.O!=null)return jY.mB.Xn(b,e,I,Q,c);else if(e=="sort"&&b[0]&&b[0].O=="Layer"){return b.sort(function(S,M){return S.b.getName()>M.b.getName()?1:-1})}else if(e=="toSource")return JSON.stringify(b);
else return b[e].apply(b,I)}else if(a=="FunctionExpression"){return jY.eval(D.body,Q,c)}else console.log(x)}else if($=="AssignmentExpression"){var h=x.operator,r=x.left,H=r.type,o=jY.uw(r,Q,c),P=jY.uw(x.right,Q,c),U=null;
if(!1){}else if(h=="=")U=P;else if(h=="+=")U=o+P;else if(h=="-=")U=o-P;else if(h=="*=")U=o*P;else if(h=="/=")U=o/P;
else if(h=="%=")U=o%P;else if(h=="&=")U=o&P;else if(h=="|=")U=o|P;else if(h=="&&=")U=o&&P;else if(h=="||=")U=o||P;
else console.log(x);if(H=="Identifier"){var O=r.name;if(c.hasOwnProperty(O))c[O]=U;else c.__window[O]=U}else if(H=="MemberExpression"){var p=jY.eval(r.property,Q,c),C=jY.uw(r.object,Q,c);
if(C.O!=null)jY.mB.afp(C,p,U,Q,c);else C[p]=U}else console.log(x);return U}else if($=="Identifier")return x.name;
else if($=="Literal")return x.value;else if($=="UpdateExpression"){var h=x.operator,W=x.argument.name,k=jY.uw(x.argument,Q,c),J=c;
if(J[W]==null)J=c.__window;if(!1){}else if(h=="++"){J[W]++;return x.prefix?J[W]:J[W]-1}else if(h=="--"){J[W]--;
return x.prefix?J[W]:J[W]+1}else console.log(x)}else if($=="UnaryExpression"){var h=x.operator,t=jY.uw(x.argument,Q,c);
if(t&&t.O=="UnitValue"){if(h=="-")return-t.b;else return jY.a1a(t.b,h)}else return jY.a1a(t,h)}else if($=="BinaryExpression"||$=="LogicalExpression"){var h=x.operator,r=jY.uw(x.left,Q,c);
if($=="LogicalExpression"&&h=="&&"&&!r)return r;var t=jY.uw(x.right,Q,c);if(r==null||t==null)return jY.HX(r,t,h);
else if(r.O=="UnitValue"&&t.O=="UnitValue")return jY.HX(r.b,t.b,h);else if(r.O=="UnitValue")return jY.HX(r.b,t,h);
else if(t.O=="UnitValue"){if(h=="-")return-(r-t.b);else return jY.HX(r,t.b,h)}else return jY.HX(r,t,h)}else if($=="IfStatement"){var Y=jY.uw(x.test,Q,c),l=c.__pif,U=null;
c.__pif=!0;if(Y)U=jY.eval(x.consequent,Q,c);else if(x.alternate)U=jY.eval(x.alternate,Q,c);c.__pif=l;
return U}else if($=="ConditionalExpression"){var Y=jY.uw(x.test,Q,c);if(Y)return jY.uw(x.consequent,Q,c);
else if(x.alternate)return jY.uw(x.alternate,Q,c)}else if($=="ForInStatement"){jY.eval(x.left,Q,c);var m=x.left.declarations[0].id.name,B=jY.uw(x.right,Q,c);
for(var y in B){c[m]=y;var L=jY.eval(x.body,Q,c);if(c.__break)break;if(c.__return)return L}c.__break=!1}else if($=="ForStatement"){jY.eval(x.init,Q,c);
while(jY.eval(x.test,Q,c)){var L=jY.eval(x.body,Q,c);if(c.__break)break;if(c.__return)return L;jY.eval(x.update,Q,c)}c.__break=!1}else if($=="WhileStatement"){while(jY.eval(x.test,Q,c)){var L=jY.eval(x.body,Q,c);
if(c.__break)break;if(c.__return)return L}c.__break=!1}else if($=="DoWhileStatement"){do{var L=jY.eval(x.body,Q,c);
if(c.__break)break;if(c.__return)return L}while(jY.eval(x.test,Q,c));c.__break=!1}else if($=="TryStatement"){jY.eval(x.block,Q,c);
if(c.__throw){var A=x.handler;c[A.param.name]=c.__throw;c.__throw=!1;jY.eval(A.body,Q,c);delete c[A.param.name]}}else if($=="EmptyStatement"){}else console.log(x)};
jY.HX=function(x,Q,c){if(c=="+")return x+Q;else if(c=="-")return x-Q;else if(c=="*")return x*Q;else if(c=="/")return x/Q;
else if(c=="%")return x%Q;else if(c=="^")return x^Q;else if(c=="&")return x&Q;else if(c=="&&")return x&&Q;
else if(c=="|")return x|Q;else if(c=="||")return x||Q;else if(c=="<")return x<Q;else if(c==">")return x>Q;
else if(c=="=="){if(x!=null&&Q!=null&&x.O&&Q.O)return x.b==Q.b;return x==Q}else if(c=="===")return x===Q;
else if(c=="<=")return x<=Q;else if(c==">=")return x>=Q;else if(c=="!=")return x!=Q;else if(c=="!==")return x!==Q;
else if(c=="<<")return x<<Q;else if(c==">>")return x>>Q;else console.log(c)};jY.a1a=function(x,Q){if(Q=="-")return-x;
else if(Q=="!")return!x;else if(Q=="~")return~x;else if(Q=="+")return x;else if(Q=="typeof")return typeof x;
else console.log(Q,x)};jY.uw=function(x,Q,c){var $=x.type;if($=="Identifier")return jY.a85(x.name,Q,c);
else return jY.eval(x,Q,c)};jY.a85=function(x,Q,c){if(x=="undefined")return undefined;else if(c.hasOwnProperty(x))return c[x];
else if(x=="app")return{O:"Application"};else if(x=="Folder")return{O:"Folder"};else if(x=="File")return{O:"File"};
else if(x=="$")return{O:"$"};else if(jY.mB.azC.indexOf(x)!=-1)return jY.mB.Wm({O:"Application"},x,Q,c);
else if(jY.mB.aDt.indexOf(x)!=-1)return{O:"AppFunc",if:x};else if(c.__window.hasOwnProperty(x))return c.__window[x];
else if(window[x]&&!jY.q0[x])return window[x];else{c[x]=null;return null}};jY.mB={};jY.mB.a3O=function(x,Q,c,$){var z;
if(x=="SolidColor")z={O:x,b:[1,0,0,0]};if(x=="RGBColor")z={O:x,b:[1,0,0,0]};if(x=="Window")z={O:x,b:new is(Q[0],Q[1],Q[2])};
if(x=="ExportOptionsSaveForWeb")z={O:x,b:{mN:"png",ja:100}};if(x=="PhotoshopSaveOptions")z={O:x,b:{mN:"psd"}};
if(x=="PNGSaveOptions")z={O:x,b:{mN:"png",ja:100}};if(x=="JPEGSaveOptions")z={O:x,b:{mN:"jpg",ja:100}};
if(x=="PDFSaveOptions")z={O:x,b:{mN:"pdf",a34:""}};if(x=="File")z={O:x,b:Q[0]};if(x=="ActionReference")z={O:x,b:{t:"obj ",v:[]}};
if(x=="ActionDescriptor")z={O:x,b:{t:"Objc",v:{classID:"null"}}};if(x=="ActionList")z={O:x,b:{t:"VlLs",v:[]}};
if(x=="UnitValue")z={O:x,b:Q.length==0?0:parseFloat(Q[0])};return z};jY.mB.azC="activeDocument documents fonts preferences displayDialogs foregroundColor backgroundColor version".split(" ");
jY.mB.aDt="charIDToTypeID stringIDToTypeID typeIDToStringID executeAction executeActionGet doAction showWindow UnitValue".split(" ");
jY.mB.Wm=function(x,Q,c,$){var z=c.Pf,j=c.TW();if(!1){}else if(Q=="typename"){if(x.O=="Layer")return x.b.Uy()?"LayerSet":"ArtLayer";
else return x.O}else if(["Document","Layer"].indexOf(x.O)!=-1&&["layers","artLayers","layerSets"].indexOf(Q)!=-1){var U=j;
if(x.O=="Document")U=x.b;else U=x.FC;var i=U.root,b={O:"Layers",a2i:Q,b:[],FC:U};if(x.O=="Layer")i=U.root.FV(U.B.indexOf(x.b));
if(i.children==null)return null;for(var F=0;F<i.children.length;F++){var e=i.children[F].a,k=e.Uy();
if(k&&Q=="artLayers"||!k&&Q=="layerSets")continue;b.b.push({O:"Layer",b:e,FC:U})}b.b.reverse();return b}else if(x.O=="Documents"||x.O=="Layers"||x.O=="HistoryStates"||x.O=="LayerComps"){if(!1){}else if(Q=="length")return x.b.length;
else if(Number.isInteger(Q))return x.b[Q];else console.log(x.O+": unknown property ",Q)}else if(x.O=="Application"){if(!1){}else if(Q=="activeDocument")return{O:"Document",b:c.TW()};
else if(Q=="documents"){var b={O:"Documents",b:[]};for(var F=0;F<c.H0.length;F++)b.b.push({O:"Document",b:c.H0[F]});
return b}else if(Q=="fonts")return{O:"TextFonts"};else if(Q=="preferences")return{O:"Preferences"};else if(Q=="displayDialogs")return{O:"DialogModes"};
else if(Q=="foregroundColor"||Q=="backgroundColor"){var K=Q[0]=="f"?z.Gj:z.QI;return{O:"SolidColor",b:[1,(K>>>16&255)/255,(K>>>8&255)/255,(K>>>0&255)/255]}}else if(Q=="UI")return{O:"UI"};
else if(Q=="version")return 30;else console.log(x,Q)}else if(x.O=="Document"){var j=x.b;if(!1){}else if(Q=="activeLayer"){var e=j.B[j.g[0]];
return{O:"Layer",b:e,FC:j}}else if(Q=="resolution")return j.cQ;else if(Q=="width")return j.m;else if(Q=="height")return j.e;
else if(Q=="name")return j.name;else if(Q=="saved")return!j.tl();else if(Q=="selection")return{O:"Selection"};
else if(Q=="activeHistoryState")return{O:"HistoryState",xR:j.FS};else if(Q=="source")return j.No;else if(Q=="layerComps"){var g=j.A2.list.v,R=[];
for(var F=0;F<g.length;F++)R.push({O:"LayerComp",b:F});return{O:"LayerComps",b:R}}else if(Q=="historyStates"){var T=[];
for(var F=0;F<j.history.length;F++)T.push({O:"HistoryState",xR:F});return{O:"HistoryStates",b:T}}else if(Q=="mode")return 7;
else if(Q=="colorSamplers"){var b={O:"ColorSamplers",a2i:Q,b:j.Vv.slice(0),FC:j};return b}else console.log(x,Q)}else if(x.O=="LayerComp"){if(Q=="name")return j.A2.list.v[x.b].v.Nm.v;
else throw Q}else if(x.O=="ColorSamplers"){if(Number.isInteger(Q))return{O:"ColorSampler",b:x.b[Q]};
else if(Q=="length")return j.Vv.length}else if(x.O=="ColorSampler"){if(Q=="color"){var K=X.vt.VM(j,j.Q.wu(x.b.x,x.b.y),1,2);
return{O:"SolidColor",b:[1,(K>>>16&255)/255,(K>>>8&255)/255,(K>>>0&255)/255]}}else if(Q=="position")return[x.b.x,x.b.y]}else if(x.O=="Layer"){var D={transparentPixelsLocked:0,pixelsLocked:1,positionLocked:2,allLocked:31},e=x.b;
if(!1){}else if(Q=="visible")return e.M5();else if(Q=="selected")return j.g.indexOf(j.B.indexOf(e))!=-1;
else if(Q=="grouped")return e.cG;else if(D[Q]!=null)return e.e6(D[Q]);else if(Q=="opacity")return e.opacity*100/255;
else if(Q=="fillOpacity")return(e.add.iOpa==null?255:e.add.iOpa)*100/255;else if(Q=="blendMode")return e.s3;
else if(Q=="name")return e.getName();else if(Q=="textItem")return{O:"TextItem",b:e};else if(Q=="bounds"){var a=X.Y.Pe(j,[j.B.indexOf(e)]);
return jY.mB.a5V(a,j)}else if(Q=="parent"){var _=c.H0,U;for(var F=0;F<_.length;F++)if(_[F].B.indexOf(e)!=-1)U=_[F];
var I=U.root.FV(U.B.indexOf(e)).parent;return I.depth==0?{O:"Document",b:U}:{O:"Layer",b:I.a,FC:U}}else if(Q=="kind"){var f=jY.mB.KV;
for(var F=0;F<f.length;F++)if(e.add[f[F]]!=null)return F;return 0}else if(Q=="isBackgroundLayer")return e.add.lnsr="bgnd";
else if(Q=="itemIndex")return j.B.indexOf(e)+1;else console.log(x,Q)}else if(x.O=="Selection"){if(!1){}else if(Q=="bounds"){if(j.u==null)$.__throw={message:"no selection"};
else return jY.mB.a5V(j.u.rect,j)}else console.log(x,Q)}else if(x.O=="TextItem"){var y=x.b.add.TySh,Z=y.HW,v=dU.bs(Z),G=y.i.c0(),q=dU.zl(Z,0,0);
if(Q=="contents")return v.slice(0,v.length-1).replace(/\n/g,"\r");else if(Q=="font")return q.VA.Font!=null?q._t[q.VA.Font].Name:null;
else if(Q=="size")return jY.mB.SH(q.VA.FontSize*G,j);else if(Q=="leading")return jY.mB.SH(q.VA.Leading*G,j);
else if(Q=="tracking")return jY.mB.SH(q.VA.Tracking);else if(Q=="baselineShift")return jY.mB.SH(q.VA.BaselineShift);
else if(Q=="fauxBold")return q.VA.FauxBold;else if(Q=="fauxItalic")return q.VA.FauxItalic;else if(Q=="kind")return 1-dU.SI(Z);
else if(Q=="useAutoLeading")return q.SW.AutoLeading;else if(Q=="hyphenation")return q.SW.AutoHyphenate;
else if(Q=="justification")return jY.mB.SH(q.SW.Justification);else if(Q=="color")return{O:"SolidColor",b:q.VA.FillColor.Values.slice(0)};
else if(Q=="width"||Q=="height"){var h=dU.Sx(Z),r=(h[2]-h[0])*G,H=(h[3]-h[1])*G;return jY.mB.SH(Q=="width"?r:H,j)}else if(Q=="position"){var o=y.i;
return jY.mB.a8t([o.DX,o.ti],j)}else if(Q=="horizontalScale"||Q=="verticalScale"){var P=Q[0].toUpperCase()+Q.slice(1);
return Math.round(q.VA[P]*100)}else if(Q=="antiAliasMethod")dU.Bm(y);else if(Q=="totalTextStyle"){var b={};
for(var O=0;O<2;O++){var p=["Style","Paragraph"][O],C=Z.EngineDict[p+"Run"].RunLengthArray,W=[],J=0;
for(var F=0;F<C.length;F++){var t=dU.zl(Z,J,Math.min(J+C[F],v.length-2));J+=C[F];W.push(O==0?t.VA:t.SW);
b.fontSet=t._t}b[p]={runs:C,styles:W}}return JSON.stringify(b)}else if(Q=="transform"){var o=y.i;return JSON.stringify([o.V,o.J,o.dC,o.xq,o.DX,o.ti])}else console.log(x,Q)}else if(x.O=="Preferences"){if(Q=="rulerUnits")return z.Zo.IM;
else console.log(x,Q)}else if(x.O=="SolidColor"){if(Q=="rgb")return{O:"RGBColor",b:x.b};if(Q=="cmyk")return{O:"CMYKColor",b:d.ru(x.b.slice(1))};
else console.log(x,Q)}else if(x.O=="RGBColor"){var a=Math.round(255*x.b[1]),Y=Math.round(255*x.b[2]),l=Math.round(255*x.b[3]);
if(!1){}else if(Q=="red")return a;else if(Q=="green")return Y;else if(Q=="blue")return l;else if(Q=="hexValue")return"#"+d.vg(a<<16|Y<<8|l).toUpperCase();
else console.log(x,Q)}else if(x.O=="CMYKColor"){var m=[];for(var F=0;F<4;F++)m.push(Math.round(x.b[F]*100));
var B=["cyan","magenta","yellow","black"].indexOf(Q);if(B!=-1)return m[B];else console.log(x,Q)}else if(x.O=="UnitValue"){if(Q=="value")return x.b;
else throw"e"}else if(x.O=="ExportOptionsSaveForWeb"){if(Q=="format")return x.b.mN;else if(Q=="PNG8"||Q=="interlaced")return!1;
else if(Q=="quality")return x.b.ja;else if(Q=="transparency")return!0;else throw Q}else if(x.O=="PNGSaveOptions"||x.O=="JPEGSaveOptions"||x.O=="PDFSaveOptions"){return 0}else if(x.O=="$"){if(Q=="localize")return!1;
else if(Q=="os")return"Windows";else throw Q}else if(x.O=="ActionList"){if(Q=="count")return x.b.v.length;
else throw Q}else console.log(x,Q)};jY.mB.a5V=function(x,Q){return jY.mB.a8t([x.x,x.y,x.x+x.m,x.y+x.e],Q)};
jY.mB.a8t=function(x,Q){var c=[];for(var F=0;F<x.length;F++)c.push(jY.mB.SH(x[F],Q));return c};jY.mB.zO=function(x){var Q=[];
for(var F=0;F<x.length;F++)Q.push(x[F].O?x[F].b:x[F]);return Q};jY.mB.SH=function(x,Q){return{O:"UnitValue",b:x}};
jY.mB.ajA=function(x,Q){if(x.O=="UnitValue")return x.b;return x};jY.mB.afp=function(x,Q,c,$,z){var j=new jO(u.E.v,!0),U=new jO(u.E.M,!0),i=$.TW(),b=$.Pf;
if(!1){}else if(x.O=="Application"){if(!1){}else if(Q=="activeDocument"){U.data={d:u.H.th,Ta:c.b};$.T(U)}else if(Q=="displayDialogs"){}else if(Q=="foregroundColor"||Q=="backgroundColor"){var k=c.b,K=k[1]*255<<16|k[2]*255<<8|k[3]*255<<0;
U.data={d:u.H.hW,hF:ke.$s,Zq:Q=="foregroundColor"?0:1,b:K};$.T(U)}else console.log(x,Q,c)}else if(x.O=="Document"){var g=x.b;
if(!1){}else if(Q=="name"){j.f=X.Mf;j.data={d:eM.iz,b:c,ajw:!0,qC:g};i.Fq=!0}else if(Q=="source")g.No=c;
else if(Q=="activeLayer"){g.g=[g.B.indexOf(c.b)]}else if(Q=="activeHistoryState"){j.f=X.RZ;j.data={d:"h_itemchange",index:c.xR}}else console.log(x,Q)}else if(x.O=="Layer"){j.f=X.Mf;
var R={transparentPixelsLocked:0,pixelsLocked:1,positionLocked:2,allLocked:31},T=x.b,D=i.B.indexOf(T);
if(!1){}else if(Q=="visible"){if(T.M5()!=c)j.data={d:eM.Ul,a:D}}else if(Q=="opacity"){j.data={d:eM.ML,a:D,j7:Math.round(255*c/100)}}else if(Q=="fillOpacity"){j.data={d:eM.tZ,a:D,j7:Math.round(255*c/100)}}else if(Q=="blendMode"){j.data={d:eM.BT,a:D,j7:cq.X$.indexOf(c)}}else if(Q=="name"){j.data={d:eM.ZH,a:D,name:c}}else if(R[Q]!=null){j.data={d:eM.HC,a:D,j7:[[c],[R[Q]]]}}else if(Q=="kind"){j.data={d:eM._$,a:D,W8:jY.mB.KV[c]}}else if(Q=="grouped"){j.data={d:eM.DF,a:D,j7:c}}else console.log(x,Q,c)}else if(x.O=="TextItem"){j.f=X.gr;
var T=x.b,a=T.add.TySh,_=JSON.parse(JSON.stringify(a.HW)),I=a.i.clone(),f=a.i.c0(),y=dU.bs(_),Z=dU.zl(_,0,y.length-2),v=!1;
if(!1){}else if(Q=="contents"){dU.DH(_,0,y.length-1);dU.U3(_,0,c.replace(/\r/g,"\n"))}else if(Q=="size"){Z.VA.FontSize=(c.b!=null?c.b:c)/f;
v=!0}else if(Q=="leading"){Z.VA.Leading=(c.b!=null?c.b:c)/f;v=!0}else if(Q=="tracking"){Z.VA.Tracking=c.b!=null?c.b:c;
v=!0}else if(Q=="baselineShift"){Z.VA.BaselineShift=c.b!=null?c.b:c;v=!0}else if(Q=="fauxBold"){Z.VA.FauxBold=c;
v=!0}else if(Q=="fauxItalic"){Z.VA.FauxItalic=c;v=!0}else if(Q=="kind"){var G=dU.SI(_);if(G==1&&c==1){var q=new fQ(_,$.Pf.Dn,a.Gb).SW[0],h=q.v0[0].end,r=q.bz[h-1].end;
dU.DH(_,0,y.length-1);dU.U3(_,0,y.slice(0,r-1))}if(G==c)dU.DY(_,1-c)}else if(Q=="useAutoLeading"){Z.SW.AutoLeading=c;
v=!0}else if(Q=="hyphenation"){Z.SW.AutoHyphenate=c;v=!0}else if(Q=="justification"){Z.SW.Justification=c;
v=!0}else if(Q=="font"){dU.gD(Z,c);v=!0}else if(Q=="color"){Z.VA.FillColor.Values=c.b.slice(0);v=!0}else if(Q=="width"||Q=="height"){var H=dU.Sx(_).slice(0),o=jY.mB.ajA(c);
if(Q=="width")H[2]=Math.round(H[0]+o/f);else H[3]=Math.round(H[1]+o/f);dU.ei(_,H)}else if(Q=="position"){I.DX=c[0];
I.ti=c[1]}else if(Q=="horizontalScale"||Q=="verticalScale"){var P=Q[0].toUpperCase()+Q.slice(1);Z.VA[P]=c/100;
v=!0}else if(Q=="antiAliasMethod")dU.AM(a,c);else console.log(x,Q,c);if(v)dU.G4(_,0,y.length-1,Z);j.data={d:"newED",Tc:i.B.indexOf(T),vY:_,i:I}}else if(x.O=="Preferences"){if(!1){}else if(Q=="rulerUnits"){var O=JSON.parse(JSON.stringify(b.Zo));
O.IM=c;U.data={d:u.H.hW,hF:ke.sT,j7:O};$.T(U)}else console.log(x,Q,c)}else if(x.O=="SolidColor"){if(Q=="rgb")x.b=c.b;
else throw Q}else if(x.O=="RGBColor"){if(!1){}else if(Q=="red")x.b[1]=c/255;else if(Q=="green")x.b[2]=c/255;
else if(Q=="blue")x.b[3]=c/255;else if(Q=="hexValue"){var p=d.az4(c.slice(1));x.b[1]=(p>>>16&255)/255;
x.b[2]=(p>>>8&255)/255;x.b[3]=(p>>>0&255)/255}else console.log(x,Q)}else if(x.O=="ExportOptionsSaveForWeb"){if(Q=="format")x.b.mN=c;
else if(Q=="PNG8"||Q=="transparency"||Q=="interlaced"){}else if(Q=="quality")x.b.ja=c;else throw Q}else if(x.O=="PNGSaveOptions"||x.O=="JPEGSaveOptions"){if(Q=="quality")x.b.ja=Math.round(100*c/12)}else if(x.O=="PDFSaveOptions"){if(Q=="preset")x.b.a34=c}else if(x.O=="$"){if(Q=="localize"){}}else console.log(x,Q,c);
if(j.data!=null)$.T(j)};jY.mB.Xn=function(x,Q,c,$,z){var j=x.O,U=null,i=new jO(u.E.v,!0),b=new jO(u.E.G2,!0),k=new jO(u.E.M,!0),K=$.TW(),g=$.H0;
if(!1){}else if(j=="Application"){if(!1){}else if(Q=="charIDToTypeID"){var R=c[0].trim(),T={slct:"select",Dlt:"delete",Mk:"make",Hd:"hide",Shw:"show",Dplc:"duplicate"};
return T[R]?T[R]:R}else if(Q=="stringIDToTypeID"){var D=c[0].trim(),T={red:"Rd",blue:"Bl",color:"Clr",RGBColor:"RGBC",document:"Dcmn",layer:"Lyr",type:"Type",using:"Usng",targetEnum:"Trgt",ordinal:"Ordn",property:"Prpr"},a=T[D];
return a==null?D:a}else if(Q=="typeIDToStringID"){return c[0].trim()}else if(Q=="executeAction"){var _;
if(c[1]){_=c[1].b.v;_.classID=c[0]}var I={setd:"set"},f=I[c[0]];if(f==null)f=c[0];var y=k5.WZ[c[0]];
if(y&&k5.GR[y])f=k5.GR[y];b.data={q4:f,dx:_}}else if(Q=="executeActionGet"){var Z=c[0].b.v,U={};if(Z.length==1){var v=U.classID=Z[0].v.classID;
if(v=="Lyr"){var G=ep.ns(K,Z[0]),q=K.B[G],h=q.add.SoLd,r=q.add.SoCo;if(h)U.smartObjectMore={t:"Objc",v:{transform:h.nonAffineTransform}};
if(r)U.adjustment={t:"VlLs",v:[{t:"Objc",v:JSON.parse(JSON.stringify(r))}]}}return{O:"ActionDescriptor",b:{t:"null",v:U}}}if(Z.length==2){var v=U.classID=Z[1].v.classID,D=Z[0].v.keyID;
if(v=="Dcmn"){var H=K;if(D=="numberOfLayers")U[D]={t:"long",v:H.B.length};else throw D}else if(v=="Lyr"){var G=ep.ns(K,Z[1]),q=K.B[G],o=q.add.TySh;
if(D=="textKey"){if(o){var P=o.HW.EngineDict.StyleRun.RunArray,O=o.HW.ResourceDict.FontSet,p=[];for(var F=0;
F<P.length;F++){var C=P[F].StyleSheet.StyleSheetData,W=O[C.Font].Name,J=$.Pf.Dn.WY(W);if(J&&J.name.postScriptName!=W)J=null;
p.push({t:"null",v:{textStyle:{t:"null",v:{fontAvailable:{t:"bool",v:J!=null},fontPostScriptName:{t:"TEXT",v:W}}}}})}U[D]={t:D,v:{textStyleRange:{t:"obj ",v:p}}}}}else throw D}else if(v=="ASet"){var t=$.Pf.Q$,Y=U.classID=Z[0].v.classID;
if(Y=="Actn"){U.NmbC={t:"long",v:ep.g_(t,Z[0].v.val,Z[1].v.val).yY.length}}else throw Y}else throw v;
return{O:"ActionDescriptor",b:{t:"null",v:U}}}}else if(Q=="doAction"){k.data={d:u.H.Zr,b3:[c[0],c[1]]}}else if(Q=="bringToFront"){}else if(Q=="open"){k.data={d:u.H.a0,hF:{url:c[0]}};
if(c[2]&&g.length!=0)k.data.hF.Dw=g.indexOf(K)}else if(Q=="echoToOE"){k.data={d:u.H.xy,hF:c[0]}}else if(Q=="showWindow"){k.data={d:u.H.LL,AD:c[0]}}else if(Q=="UnitValue"){return c[0]+" "+c[1]}else console.log(Q)}else if(j=="LayerComp"){if(Q=="apply"){i.f=X.yd;
i.data={d:"setLC",xR:K.A2.list.v[x.b].v.compID.v}}else throw Q}else if(j=="Document"){var K=x.b;if(!1){}else if(Q=="crop"){var l=c[0];
b.data=X.r7.as8([l[0],l[1],l[2]-l[0],l[3]-l[1]])}else if(Q=="trim"){var m=[];for(var F=0;F<4;F++)m.push(c[F+1]!=null?c[F+1]:!0);
b.data=X.r7.ro(c[0]!=null?c[0]:0,m)}else if(Q=="suspendHistory"){var B=acorn.parse(c[1]);jY.eval(B,$,z)}else if(Q=="save"){k.data={d:u.H.E9}}else if(Q=="saveToOE"){k.data={d:u.H.E9,QA:c}}else if(Q=="rotateCanvas"){b.data=X.Y.Kz(!0,c[0])}else if(Q=="resizeImage"||Q=="resizeCanvas"){var L=c[0],A=c[1];
if(typeof L!="number"){L=K.m*parseFloat(L.slice(0,L.length-1))/100;A=K.e*parseFloat(A.slice(0,A.length-1))/100}if(Q=="resizeCanvas")b.data=X.r7.an2(Math.round(L),Math.round(A),c[2]);
else b.data=X.r7.axP(Math.round(L),Math.round(A),null,1)}else if(Q=="paste"){k.data={d:u.H.Nt,$l:c.length!=0&&c[0],O3:!0}}else if(Q=="close"){k.data={d:u.H.AF,yn:K}}else if(Q=="exportDocument"||Q=="saveAs"){var S=z.__fs,M=Q=="exportDocument"?c[2].b:c[1].b,N=c[0].b.replace(":","").replace("~/","");
if(!N.toLowerCase().endsWith("."+M.mN))N+="."+M.mN;var s=ar.jd(K,M.mN,null,null,M.mN=="pdf"?null:[M.ja],$.Pf);
S[N]=new Uint8Array(s)}else if(Q=="flatten"){b.data={q4:"flattenImage"}}else if(Q=="clearHistory"){i.f=X.RZ;
i.data={d:"h_clear",force:!0}}else console.log(x,Q,c)}else if(j=="Layer"){var V=x.b,G=K.B.indexOf(V);
if(!1){}else if(Q=="copy"){jY.mB.ii(K,$,0);k.data={d:u.H.mH,Qo:c[0],nL:G,O3:!0};$.T(k);delete k.data;
jY.mB.ii(K,$,1)}else if(Q=="clear"){jY.mB.ii(K,$,0);b.data={q4:"delete"};$.T(b);delete b.data;jY.mB.ii(K,$,1)}else if(Q=="duplicate"){if(c.length==0){var g8=K.g.slice(0);
i.data={d:eM.DN,a:G};i.f=X.Mf;$.T(i);i.data=null;U={O:"Layer",b:K.B[K.g[0]],FC:x.FC};K.g=g8}else if(c[0].O=="Document"){i.data={d:eM.nK,B:K.oU(G),ov:K,et:c[0].b};
i.f=X.Mf}if(i.data){$.T(i);i.data=null;return{O:"Layer",b:K.B[K.g[0]],FC:K}}}else if(Q=="merge"||Q=="remove"){i.data={d:Q=="merge"?eM.TJ:eM.bU,a:G};
i.f=X.Mf;if(Q!="remove")U={O:"Layer",b:K.B[K.g[0]],FC:x.FC}}else if(Q=="move"){i.data={d:eM.Eg,source:G,target:K.B.indexOf(c[0].b),aX:c[1]!=3?.6:.3};
i.f=X.Mf}else if(Q=="rasterize"){i.f=X.Mf;i.data={d:eM.TQ,a:G};$.T(i);i.data=null;x.b=K.B[G]}else if(Q=="rotate"){i.data={d:"rot",LX:[2,5],b:-c[0]*Math.PI/180,gy:c[1],a:G};
i.f=X.va}else if(Q=="resize"){i.data={d:"scl",LX:[2,4],b:new bC(c[0]/100,c[1]/100),gy:c[2],a:G};i.f=X.va}else if(Q=="translate"){var n=jY.mB.zO(c);
i.data={d:"trsl",a:G,RM:n[0],Bi:n[1]};i.f=X.kU}else if(Q=="link"){i.data={d:eM.v6,av3:[G,K.B.indexOf(c[0].b)]};
i.f=X.Mf}else if(Q=="invert"){i.f=X.FQ;i.data={d:"start",wU:"nvrt"}}else if(Q=="desaturate"){b.data={q4:"desaturate"}}else if(Q.startsWith("apply")&&fK.rp[Q.slice(5)]||Q.startsWith("adjust")&&fK.rp[Q.slice(6)]){var cQ=Q.startsWith("apply"),n=jY.mB.zO(c),hk=fK.rp[Q.slice(cQ?5:6)];
if(hk=="Dspl"){for(var F=0;F<K.B.length;F++)if(K.B[F].getName()==n[4]){n[4]=K.B[F].add.SoLd.Idnt.v;break}}b.data={q4:cQ?fK.GR[hk]:k5.GR[hk]};
var _=fK.$H(hk);if(_){K.g=[G];fK.qX["g"+hk](_,n);b.data.dx=_}}else if(Q=="applyStyle"){var eG=$.Pf.Xe,C=null;
for(var F=0;F<eG.length;F++)if(eG[F].Uz.Nm.v.split("/").pop()==c[0])C=eG[F];if(C==null){alert("Style not found!");
return}i.f=X.vR;i.data={d:"setstl",b:C.Ry,a:G};$.T(i);i.data={d:"confirm",a:G}}else console.log(x,Q,c)}else if(j=="Documents"){if(Q=="getByName"){for(var F=0;
F<g.length;F++)if(g[F].name==c[0])return{O:"Document",b:g[F]};return null}else if(Q=="add"){if(c.length==0)c=[100,100,72,"New Project"];
var ie=c[5];if(ie==null)ie=1;b.data=hf.uV(c[0],c[1],c[2],c[3],["Wht","Trns","BckC"][ie],!1);$.T(b);b.data=null;
return{O:"Document",b:$.TW()}}else throw"e"}else if(j=="Layers"){if(Q=="getByName"){for(var F=0;F<x.b.length;
F++)if(x.b[F].b.getName()==c[0]){U=x.b[F];break}if(U==null)z.__throw={message:"No layer with a name "+c[0]}}else if(Q=="add"){i.data={d:x.a2i=="layerSets"?eM.jK:eM.Hx};
i.f=X.Mf;$.T(i);i.data=null;U={O:"Layer",b:K.B[K.g[0]],FC:x.FC}}else console.log(x,Q,c)}else if(x.O=="Selection"){if(Q=="select"){var eN=c[0],gr=[];
for(var F=0;F<eN.length;F++)gr.push(eN[F][0],eN[F][1]);b.data=X.U_.Pg(jY.mB.zO(gr))}else if(Q=="clear"){b.data={q4:"delete"}}else if(Q=="selectAll"){b.data=X.U_.sd(!0)}else if(Q=="invert"){b.data={q4:"inverse"}}else if(Q=="copy"){k.data={d:u.H.mH}}else if(Q=="deselect"){b.data=X.U_.sd()}else if(Q=="fill"){var ek=c[0].b;
ek=d.I.lV({Z:ek[1]*255,r:ek[2]*255,J:ek[3]*255});b.data=X.x7.YJ("Clr",c[1],c[2]==null?1:c[2]/100,ek)}else if(Q=="grow"||Q=="similar"){var _={classID:"null",null:{t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]}};
if(c[0]!=null)_.Tlrn={t:"long",v:c[0]};b.data={q4:Q,dx:_}}else if(Q=="expand"||Q=="contract"||Q=="feather"){b.data=X.U_.mg(Q,c[0],!0)}else if(Q=="translate"){var _={classID:"null",null:{t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]},T:{t:"Objc",v:{__name:"Offset",classID:"Ofst",Hrzn:{t:"UntF",v:{type:"#Pxl",val:c[0]}},Vrtc:{t:"UntF",v:{type:"#Pxl",val:c[1]}}}}};
b.data={q4:"move",dx:_}}else if(Q=="smooth"){b.data=X.U_.mg("smoothness",c[0],!1)}else if(Q=="stroke"){var C=JSON.parse(aF.lF[1]),jK=C.Clr.v,ek=c[0].b;
jK.Rd.v=ek[1]*255;jK.Grn.v=ek[2]*255;jK.Bl.v=ek[3]*255;C.Sz.v.val=c[1];C.Styl.v.FStl=aF.stroke.types[c[2]];
console.log(C,c);i.f=X.tH;i.data={d:"stroke",apF:C}}else console.log(x,Q,c)}else if(x.O=="Window"){if(Q=="show"){k.data={d:u.H.LL,AD:x.b}}else throw"e"}else if(x.O=="ActionReference"){if(Q=="putProperty"){x.b.v.push({t:"prop",v:{classID:c[0],keyID:c[1]}})}else if(Q=="putClass"){x.b.v.push({t:"Clss",v:{classID:c[0]}})}else if(Q=="putEnumerated"){x.b.v.push({t:"Enmr",v:{classID:c[0],typeID:c[1],enum:c[2]}})}else if(Q=="putName"){x.b.v.push({t:"name",v:{classID:c[0],val:c[1]}})}else if(Q=="putIndex"){x.b.v.push({t:"indx",v:{classID:c[0],val:c[1]}})}else console.log(Q,c)}else if(x.O=="ActionDescriptor"||x.O=="ActionList"){var iE=x.O=="ActionList";
if(Q.startsWith("put")){var e9=iE?c:c.slice(1),a=null;if(Q=="putReference"){a=e9[0].b}else if(Q=="putObject"){a=e9[1].b;
a.v.classID=e9[0]}else if(Q=="putList"){a=e9[0].b}else if(Q=="putDouble"){a={t:"doub",v:e9[0]}}else if(Q=="putUnitDouble"){a={t:"UntF",v:{type:e9[0],val:e9[1]}}}else if(Q=="putBoolean"){a={t:"bool",v:e9[0]}}else if(Q=="putInteger"){a={t:"long",v:e9[0]}}else if(Q=="putString"){a={t:"TEXT",v:e9[0]}}else if(Q=="putClass"){a={t:"type",v:{classID:e9[0]}}}else if(Q=="putEnumerated"){var dm=c[0].split("+");
if(dm.length==2&&c[1]==null){c[0]=dm[0];c[1]=e9[0]=dm[1]}var kD={};kD[e9[0]]=e9[1];a={t:"enum",v:kD}}else throw Q;
if(iE)x.b.v.push(a);else x.b.v[c[0]]=a}else if(Q=="hasKey"){return x.b.v[c[0]]!=null}else if(Q=="getEnumerationValue"){if(c[0]=="layerSection")U="layerSectionContent";
else console.log(c)}else if(Q=="getBoolean"){U=x.b.v[c[0]].v}else if(Q=="getString"){U=x.b.v[c[0]].v}else if(Q=="getObjectValue"){var U=x.b.v[c[0]];
return{O:"ActionDescriptor",b:U}}else if(Q=="getList"){var U=x.b.v[c[0]];return{O:"ActionList",b:U}}else if(Q=="getInteger"||Q=="getDouble"){return x.b.v[c[0]].v}else console.log(Q,c)}else if(x.O=="$"){if(Q=="writeln"){console.log(c[0])}else throw Q}else if(x.O=="UI"){if(Q=="scroll"||Q=="scrollTo"){var gJ=c[0],dR=c[1],fO=K.Q.W;
if(Q=="scrollTo"){gJ=(-K.m/2+gJ)*fO+K.Q.z.x;dR=(-K.e/2+dR)*fO+K.Q.z.y}i.f=X.Oi;i.data={d:"scroll",Kj:new bC(Math.round(gJ),Math.round(dR))}}else{var ko;
if(Q=="zoomIn"||Q=="zoomOut"){ko={d:"zoom",bH:Q=="zoomIn"}}else if(Q=="fitTheArea"){ko={d:"adapt",b:"fitscr"}}else if(Q=="pixelToPixel"){ko={d:"adapt",b:"pixel"}}i.f=X.QT;
i.data=ko;if(Q=="switchFullscreen"){var fj=$.Pf.y3,ja=document.fullscreenElement!=null==(fj==2);k.data={d:u.H.P2,b:fj==0?2:0,qO:ja}}}}else if(x.O=="ColorSamplers"){if(Q=="removeAll")K.Vv=[];
else if(Q=="add"){var eD={x:c[0][0],y:c[0][1]};K.Vv.push(eD);var U={O:"ColorSampler",b:eD}}}else if(x.O=="ColorSampler"){if(Q=="move"){var d3=K.Vv.indexOf(x.b);
eD=K.Vv[d3];eD.x=c[0][0];eD.y=c[0][1]}else if(Q=="remove"){var d3=K.Vv.indexOf(x.b);K.Vv.splice(d3,1)}}else if(x.O=="Folder"){if(Q=="selectDialog")U="img";
else throw Q}else if(x.O=="File"){if(Q=="openDialog")alert("A website can not show the Open dialog from a script");
else throw Q}else console.log(x,Q,c);if(i.data)$.T(i);if(b.data)$.T(b);if(k.data)$.T(k);return U};jY.mB.ii=function(x,Q,c){var $=new jO(u.E.v,!0);
$.f=X.kJ;var z=new jO(u.E.G2,!0);if(c==0){jY.mB.akr=x.u;z.data=X.U_.sd(!0)}else{var j=jY.mB.akr;if(j)$.data={d:"setsel",LX:"Restore Selection",u:{rect:j.rect.clone(),channel:j.channel.slice(0)}};
else z.data=X.U_.sd()}Q.T($.data?$:z)};jY.mB.akr=null;jY.mB.oq={AnchorPosition:{TOPLEFT:0,TOPCENTER:1,TOPRIGHT:2,MIDDLELEFT:3,MIDDLECENTER:4,MIDDLERIGHT:5,BOTTOMLEFT:6,BOTTOMCENTER:7,BOTTOMRIGHT:8},Units:{PIXELS:0,INCHES:1,CM:2,MM:3,PERCENT:4,PICAS:5,POINTS:6},ElementPlacement:{INSIDE:0,PLACEATBEGINNING:1,PLACEATEND:2,PLACEBEFORE:3,PLACEAFTER:4},LayerKind:{NORMAL:0,SMARTOBJECT:1,TEXT:2,SOLIDFILL:3,GRADIENTFILL:4,PATTERNFILL:5},RippleSize:{SMALL:0,MEDIUM:1,LARGE:2},PolarConversionType:{POLARTORECTANGULAR:1,RECTANGULARTOPOLAR:0},OffsetUndefinedAreas:{REPEATEDGEPIXELS:0,SETTOBACKGROUND:1,WRAPAROUND:2},NoiseDistribution:{GAUSSIAN:0,UNIFORM:1},TextType:{PARAGRAPHTEXT:0,POINTTEXT:1},DialogModes:{ALL:0,ERROR:1,NO:2},SaveOptions:{DONOTSAVECHANGES:0,PROMPTTOSAVECHANGES:1,SAVECHANGES:2},SaveDocumentType:{PNG:"png",JPEG:"jpg",COMPUSERVEGIF:"gif"},ExportType:{SAVEFORWEB:0},MatteType:{BACKGROUND:0,BLACK:1,FOREGROUND:2,NETSCAPE:3,NONE:4,SEMIGRAY:5,WHITE:6},FormatOptions:{OPTIMIZEDBASELINE:0,PROGRESSIVE:1,STANDARDBASELINE:3},DocumentMode:{BITMAP:0,CMYK:1,DUOTONE:2,GRAYSCALE:3,INDEXEDCOLOR:4,LAB:5,MULTICHANNEL:6,RGB:7},NewDocumentMode:{BITMAP:0,CMYK:1,DUOTONE:2,GRAYSCALE:3,INDEXEDCOLOR:4,LAB:5,MULTICHANNEL:6,RGB:7},DocumentFill:{WHITE:0,TRANSPARENT:1,BACKGROUNDCOLOR:2},TrimType:{TOPLEFT:0,BOTTOMRIGHT:1,TRANSPARENT:2},WaveType:{SINE:0,TRIANGULAR:1,SQUARE:2},UndefinedAreas:{WRAPAROUND:0,REPEATEDGEPIXELS:1},BlendMode:{NORMAL:"norm",DISSOLVE:"diss",DARKEN:"dark",MULTIPLY:"mul ",COLORBURN:"idiv",LINEARBURN:"lbrn",DARKERCOLOR:"dkCl",LIGHTEN:"lite",SCREEN:"scrn",COLORDODGE:"div ",LINEARDODGE:"lddg",LIGHTERCOLOR:"lgCl",OVERLAY:"over",SOFTLIGHT:"sLit",HARDLIGHT:"hLit",VIVIDLIGHT:"vLit",LINEARLIGHT:"lLit",PINLIGHT:"pLit",HARDMIX:"hMix",DIFFERENCE:"diff",EXCLUSION:"smud",SUBTRACT:"fsub",DIVIDE:"fdiv",HUE:"hue ",SATURATION:"sat ",COLOR:"colr",LUMINOSITY:"lum "},Justification:{LEFT:0,RIGHT:1,CENTER:2,LEFTJUSTIFIED:3,RIGHTJUSTIFIED:4,CENTERJUSTIFIED:5,FULLYJUSTIFIED:6},AntiAlias:{NONE:0,SHARP:1,CRISP:2,STRONG:3,SMOOTH:4},Extension:{LOWERCASE:0,NONE:1,UPPERCASE:2},RasterizeType:{ENTIRELAYER:0,FILLCONTENT:1,LAYERCLIPPINGPATH:2,LINKEDLAYERS:3,SHAPE:4,TEXTCONTENTS:5},DisplacementMapType:{STRETCHTOFIT:0,TILE:1},StrokeLocation:{INSIDE:0,CENTER:1,OUTSIDE:2}};
jY.mB.oq.ColorBlendMode=jY.mB.oq.BlendMode;jY.mB.KV="---- SoLd TySh SoCo GdFl PtFl".split(" ");function be(){}be.sx={"dc:Title":["",null,"dc:title"],"tiff:Artist":["",315,"dc:creator"],"tiff:ImageDescription":["",270,"dc:description"],"dc:Keywords":["",null,"dc:subject"],"tiff:Copyright":["",33432],"tiff:Make":["",271],"tiff:Model":["",272],"exif:ExposureTime":[[1,200],33434],"exif:FNumber":[[16,1],33437],"exif:ExposureProgram":[1,34850],"exif:ISOSpeedRatings":[200,34855],"exif:DateTimeOriginal":["",36867],"exif:ShutterSpeedValue":[[1,1],37377],"exif:ApertureValue":[[8,1],37378],"exif:ExposureBiasValue":[[1,1],37380],"exif:MaxApertureValue":[[1,1],37381],"exif:MeteringMode":[5,37383],"exif:LightSource":[0,37384],"exif:Flash":[0,37385],"exif:FocalLength":[[60,1],37386],"exif:PixelXDimension":[1,40962],"exif:PixelYDimension":[1,40963],"exif:FocalPlaneXResolution":[[1,1],41486],"exif:FocalPlaneYResolution":[[1,1],41487],"exif:FocalPlaneResolutionUnit":[2,41488],"exif:DigitalZoomRatio":[[100,100],41988],"exif:FocalLengthIn35mmFilm":[1,41989],"exif:SceneCaptureType":[0,41990],"exif:LensInfo":["",42034],"exif:Lens":["",42036],"exif:LensSerialNumber":["",42037],"exif:SensitivityType":[2,34864],"exif:RecommendedExposureIndex":[100,34866],"exif:GPSVersionID":["2.3.0.0",0],"exif:GPSLatitude":["48,35,57.646N",2],"exif:GPSLongitude":["22,56,42.238E",4],"exif:GPSAltitudeRef":[0,5],"exif:GPSAltitude":[[1,1],6],"exif:GPSStatus":["A",9],"exif:GPSMapDatum":["",18],"Iptc4xmpCore:IntellectualGenre":[""],"Iptc4xmpCore:Location":[""],"Iptc4xmpCore:CountryCode":[""],"photoshop:Instructions":[""],"photoshop:AuthorsPosition":[""],"photoshop:City":[""],"photoshop:State":[""],"photoshop:Country":[""],"photoshop:TransmissionReference":[""],"photoshop:Headline":[""],"photoshop:Credit":[""],"photoshop:Source":[""],"dc:rights":[""],"photoshop:CaptionWriter":[""]};
be.JA={"4":"Iptc4xmpCore:IntellectualGenre","5":"dc:Title","40":"photoshop:Instructions","80":"tiff:Artist","85":"photoshop:AuthorsPosition","90":"photoshop:City","92":"Iptc4xmpCore:Location","95":"photoshop:State","100":"Iptc4xmpCore:CountryCode","101":"photoshop:Country","103":"photoshop:TransmissionReference","105":"photoshop:Headline","110":"photoshop:Credit","115":"photoshop:Source","116":"dc:rights","120":"tiff:ImageDescription","122":"photoshop:CaptionWriter"};
be.alo=function(x,Q){if(Q==null)Q={};var c=be.JA,$=[],z=[],j="";for(var F=0;F<x.length;F++){var U=x[F],i=c[U[0]+""];
if(i&&Q[i]==null)Q[i]=U[1];else if(U[0]==12)z.push(U[1]);else if(U[0]==25)$.push(U[1]);else if(U[0]==55)j=U[1];
else if(U[0]==60)j+=";"+U[1]}if(j!=""&&Q["exif:DateTimeOriginal"]==null)Q["exif:DateTimeOriginal"]=j;
if(z.length!=0&&Q["Iptc4xmpCore:SubjectCode"]==null)Q["Iptc4xmpCore:SubjectCode"]=z.join(";");if($.length!=0&&Q["dc:Keywords"]==null)Q["dc:Keywords"]=$.join(";");
return Q};be.a1n=function(x){var Q=be.JA,c=[];for(var $ in Q)if(x[Q[$]])c.push([parseInt($),x[Q[$]]]);
if(x["Iptc4xmpCore:SubjectCode"]){var z=x["Iptc4xmpCore:SubjectCode"].split(";");for(var F=0;F<z.length;
F++)c.push([12,z[F].trim()])}if(x["dc:Keywords"]){var z=x["dc:Keywords"].split(";");for(var F=0;F<z.length;
F++)c.push([25,z[F].trim()])}c.sort(function(j,U){return j[0]-U[0]});return c};be.I9=function(x,Q){if(Q==null)Q={};
var c=new DOMParser,$=c.parseFromString(x,"image/svg+xml"),z=$.getElementsByTagName("rdf:Description")[0];
if(z==null)return Q;var j=be.sx;for(var U in j){var i=j[U][2];if(i==null)continue;var b=z.getElementsByTagName(i)[0];
if(b==null)continue;var e=b.getElementsByTagName("rdf:li"),k=[];for(var F=0;F<e.length;F++)k.push(e[F].textContent);
Q[U]=k.join("; ")}return Q};be.iR=function(x){var Q=["<?xpacket begin=\"\uFEFF\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>","<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c145 79.163499, 2018/08/13-16:40:22\">","<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">","<rdf:Description rdf:about=\"\" xmlns:xmp=\"http://ns.adobe.com/xap/1.0/\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:xmpMM=\"http://ns.adobe.com/xap/1.0/mm/\" xmlns:stEvt=\"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#\" xmlns:stRef=\"http://ns.adobe.com/xap/1.0/sType/ResourceRef#\">"],c=be.sx;
for(var $ in c){var z=x[$],j=c[$][2],U="Seq",i="";if(z==null||j==null)continue;if(j=="dc:title"||j=="dc:description"){U="Alt";
i=" xml:lang=\"x-default\""}if(j=="dc:subject")U="Bag";Q.push("\t<"+j+"><rdf:"+U+">");var b=j=="dc:subject"?z.split(";").join(",").split(","):[z];
for(var F=0;F<b.length;F++)Q.push("\t\t<rdf:li"+i+">"+b[F].trim()+"</rdf:li>");Q.push("\t</rdf:"+U+"></"+j+">")}Q.push("</rdf:Description>","</rdf:RDF>","</x:xmpmeta>","<?xpacket end=\"w\"?>");
return Q.join("\n")};be.a8B=function(x){var Q=[];for(var F=0;F<x.length;F++)Q[F]=x[F][1]==0?0:x[F][0]/x[F][1];
return Q};be.a72=function(x){var Q=[];for(var F=0;F<x.length;F++){var c=x[F],$=1;if(c!=Math.round(c)){$=1e3;
c=Math.round(c*$)}Q[F]=[c,$]}return Q};be.tC=function(x,Q){var c=be.sx;if(Q==null)Q={};for(var $ in c){var z=c[$][1],j="t"+z;
if(z!=null&&x[j]!=null){var U=x[j];if(z==0)U=U.join(".");else if(z==2||z==4){var i=x["t"+(z-1)];if(i==null)i=[z==2?"N":"E"];
U=be.a8B(U).join(",")+i[0]}else if(z==42034)U=be.a8B(U).join(" ");else if(z==270||z==315){var b=U[0],e=new Uint8Array(b.length);
w.f3(e,0,b);U=w.IV(e)}else U=U[0];Q[$]=U}}if(x.exifIFD)be.tC(x.exifIFD,Q);if(x.gpsiIFD)be.tC(x.gpsiIFD,Q);
return Q};be.Q3=function(x,Q,c){var $=be.sx,j=0,i=0;if(Q==null)Q={};var z={},U={};for(var b in $){if(x[b]==null||$[b][1]==null)continue;
var e=$[b][1],k="t"+e,K=Q;if(b.startsWith("exif:")){K=z;j++;if(b.startsWith("exif:GPS")){K=U;i++}}var g=x[b];
if(e==0)g=new Uint8Array(g.split(".").map(parseFloat));else if(e==2||e==4){var R=g.length;K["t"+(e-1)]=[g.slice(g.length-1)];
g=be.a72(g.split(",").map(parseFloat))}else if(e==42034)g=be.a72(g.split(" ").map(parseFloat));else if(e==270||e==315){var T=w.nT(g);
g=[w.mt(T,0,T.length)]}else g=[g];K[k]=g}if(j!=0){Q.exifIFD=z;Q.t34665=[0]}if(i!=0){Q.gpsiIFD=U;Q.t34853=[0]}var D=new Date,a=[D.getFullYear(),D.getMonth()+1,D.getDate(),D.getHours(),D.getMinutes(),D.getSeconds()];
for(var F=0;F<6;F++)a[F]=(a[F]+"").padStart(2,"0");Q.t305=["Photopea Editor (www.photopea.com)"];if(c!=!0)Q.t306=[a[0]+":"+a[1]+":"+a[2]+" "+a[3]+":"+a[4]+":"+a[5]];
return Q};function a8(){}a8.s5=function(x){var Q={a7n:",",X2:"\r\n",GC:"\""},c=[[""]],$,z,j,U,i;for($=z=j=U=0;
j<x.length;j++){switch(i=x.charAt(j)){case Q.GC:if(U&&x.charAt(j+1)==Q.GC){c[$][z]+=Q.GC;++j}else{U^=1}break;
case Q.a7n:if(!U){c[$][++z]=""}else{c[$][z]+=i}break;case Q.X2.charAt(0):if(!U&&(!Q.X2.charAt(1)||Q.X2.charAt(1)&&Q.X2.charAt(1)==x.charAt(j+1))){c[++$]=[""];
c[$][z=0]="";if(Q.X2.charAt(1)){++j}}else{c[$][z]+=i}break;default:c[$][z]+=i}}if(c[c.length-1].length<c[0].length)c.pop();
return c};var E={};E.aDW=0;E.hB=function(){E.aDW++;return E.aDW};E.a3_="uint8";E.KS=function(x){x.n.style.transition="opacity 0.1s ease-out, transform 0.1s ease-out";
x.n.style.opacity="1";x.n.style.transform="scale(1)"};E.x3=function(x,Q){x.n.style.opacity="0";x.n.style.transform="scale(0.95)";
if(Q)setTimeout(function(){Q.removeChild(x.n)},100)};E.anc=function(){var x=E.Cf();if(x=="")return 0;
if(x!=E.jW("_TXZRPB;d7@;")){var Q=E.SK[jk.JM][jk.el],c=Q.indexOf(String.fromCharCode(35)),$;if(c==-1)return 0;
try{$=JSON.parse(E.SK[jk.aoY](Q.slice(c+1)))}catch(dQ){return 0}var z=$[E.jW("bQ[ODL<E<M")];if(z==null||z.length<<2!=64)return 0;
var j=jk.Nl(),U=parseInt(z.slice(3*4).split("").reverse().join(""),16)<<16;if(U<j||z!=jk.aBe(U,x))return 0;
return 2}return 1};E.Cf=function(){var x=E.SK[E.MB("}$z{2*35")][E.jW("W[\\ZQAJ?")],Q=String.fromCharCode(46),c=x.split(Q);
if(c.length<2)return"";var $=c.pop();$=c.pop()+Q+$;return $};E.Tw=function(){return E.Cf()==jk.jW("_TXZRPB;d7@;")||E.Cf()==jk.jW("~yy")};
E.a5O=function(){if(E.SK[jk.aDQ][jk.aDR]){var x=new E.SK[jk.pm];x[jk.oG](jk.aAc,E.jW("W`]VVykhNKH[;046.,}v@r{v5samc&YgSY\\rRGLw=oaR3+`%|")+E.Cf());
x[jk.HH]()}};E.jA=function(){if(window.top!=window.self)return!1;var x=navigator.userAgent.toLowerCase();
if(x.indexOf("safari")!=-1&&x.indexOf("chrome")==-1)return!1;return window.ClipboardItem!=null};E.MZ=function(x){this.VL=x;
this.GA=E.p("img");this.Ha=E.p("canvas");this.wa=null;this.OV="";this.cC=null;this.Ah=new bC(0,0);this.MG=!0;
E.d3(this.VL,this.M2.bind(this))};E.MZ.prototype.BM=function(x,Q){this.wa=x;if(Q)this.OV=Q;this.M2()};
E.MZ.prototype.vz=function(x){this.MG=x;this.M2()};E.MZ.prototype.M2=function(x){if(x)this.Ah=E.GK(x,this.VL);
var Q=this.MG?this.wa:"auto",c=typeof Q=="string";if(!c){var $=E.q_(),z=this.Ah,j=Q.W4.m,U=Q.W4.e,i=typeof Q.QK=="string",b=i?this.GA:this.Ha;
if(i)b.setAttribute("src",Q.QK);else{b.width=j;b.height=U;var e=b.getContext("2d"),k=new ImageData(new Uint8ClampedArray(Q.QK.buffer),j,U);
e.putImageData(k,0,0)}b.setAttribute("style"," position:absolute; pointer-events:none;user-select:none;"+"top:"+(z.y-Q.pt.y/$)+"px; left:"+(z.x-Q.pt.x/$)+"px; width:"+j/$+"px; height:"+U/$+"px");
var K=this.cC;if(K==null||K!=b){if(K)this.VL.removeChild(K);this.VL.appendChild(b);this.cC=b}}else if(this.cC){this.VL.removeChild(this.cC);
this.cC=null}this.VL.setAttribute("style","cursor:"+(c?Q:"none")+"; "+this.OV)};E.iF=function(x){return x.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;")};
E.JT=function(x,Q){x.UG(ah.get([12,41]).charAt(0)+":");Q.UG(ah.get([12,42]).charAt(0)+":")};E.p=function(x,Q){var c=document.createElement(x);
if(Q!=null)c.className=Q;return c};E.Os=function(x){while(x.firstChild)x.removeChild(x.firstChild)};
E.ZW=function(x,Q){var c=x.className;c=c.split(" ");if(c.indexOf(Q)==-1)c.push(Q);x.className=c.join(" ")};
E.WP=function(x,Q){var c=x.className;if(c=="")return;c=c.split(" ");if(c.indexOf(Q)!=-1)c.splice(c.indexOf(Q),1);
x.className=c.join(" ")};E.rm=function(x){while(!0){if(x==document)return!0;if(x==null)return!1;x=x.parentNode}};
E._X=function(x){x.appendChild(E.p("br"))};E.ix=function(x){x.appendChild(E.p("hr"))};E.wb=function(x,Q,c){var $=new j7([1,12,1],c==null?!0:c,null,!0);
if(x)$.k("click",x.K6,x);if(Q)Q.appendChild($.n);return $};E.SK=document;E.Dh=function(x){var Q=0;for(var F=0;
F<x;F++)Q+=Math.random();return Q/x<Math.PI/4};E.jW=function(x){var Q="";if(!E.Dh(28))x+="-3";for(var F=0;
F<x.length;F++){var c=x.charCodeAt(F);if(c<32||126<c)throw"e";Q+=String.fromCharCode(32+(c-32+17+3*F)%95)}return Q};
E.MB=function(x){var Q="";if(!E.Dh(28))x+="-1";for(var F=0;F<x.length;F++){var c=x.charCodeAt(F);c-=32;
c+=95e4;c-=17+3*F;c=c%95;Q+=String.fromCharCode(32+c)}return Q};E.iU=function(x){var Q=Math.random();
E.a3_="uint"+(3+Q);return new x};(function(){var x=window.PointerEvent,Q=x?"pointer":"mouse",c=Q+"down",$=Q+"move",z=Q+"up",j=!1;
E.KH=function(U,i){U.addEventListener(c,i,j);if(!x)U.addEventListener("touchstart",i,j)};E.d3=function(U,i){U.addEventListener($,i,j);
if(!x)U.addEventListener("touchmove",i,j)};E.AU=function(U,i){U.addEventListener(z,i,j);if(!x)U.addEventListener("touchend",i,j)};
E.anG=function(U,i){U.removeEventListener(c,i,j);if(!x)U.removeEventListener("touchstart",i,j)};E.hY=function(U,i){U.removeEventListener($,i,j);
if(!x)U.removeEventListener("touchmove",i,j)};E.Wr=function(U,i){U.removeEventListener(z,i,j);if(!x)U.removeEventListener("touchend",i,j)}}());
E.J1=function(x){x.addEventListener("touchstart",E.Ew,!1);x.addEventListener("touchmove",E.Ew,!1);x.addEventListener("touchend",E.Ew,!1);
x.addEventListener("gesturestart",E.Ew,!1);x.addEventListener("gesturechange",E.Ew,!1);x.addEventListener("gestureend",E.Ew,!1)};
E.aef=function(x){var Q=x.sourceCapabilities;if(Q)return Q.firesTouchEvents;return!1};E.qr=function(x,Q,c,$){var z=E.q_();
x.width=Math.floor(Q*z);x.height=Math.floor(c*z);if($)$.scale(z,z);E.a7(x)};E.a7=function(x){var Q=E.q_();
x.style.width=x.width/Q+"px";x.style.height=x.height/Q+"px"};E.qJ=function(x,Q,c){x.setAttribute("style","width:"+Q/E.q_()+"px; height:"+c/E.q_()+"px")};
E.GK=function(x,Q){if(Q==null)Q=x.currentTarget;var c=Q.getBoundingClientRect();if(x.touches)x=x.touches.item(0);
return{x:x.clientX-c.left,y:x.clientY-c.top}};E.q_=function(){return window.devicePixelRatio||1};E.e5=function(x){x.addEventListener("keydown",E.ai9,!1)};
E.ai9=function(x){x.stopPropagation()};E.Ew=function(x){x.preventDefault()};E.ce=function(x){x.stopPropagation();
x.preventDefault()};E.Qk=function(x,Q,c){c=c?c:"";if(PIMG["__"+x]==null)c+=" gsicon";return"<img src=\""+PIMG[x]+"\" alt=\""+(Q?Q:"")+"\" class=\""+c+"\" />"};
E.NN=function(x,Q,c,$){var z=x.dataTransfer.getData("text/uri-list");if(z!=null&&z.startsWith("http")){var j=new jO(u.E.M,!0);
j.data={d:u.H.a0,hF:{url:z,l_:!0,Dw:c,SS:$}};Q.T(j)}if(x.dataTransfer.files.length==0)return;if(window.showOpenFilePicker){var U=[],i=x.dataTransfer.items.length,b=x.dataTransfer.files;
for(var k of x.dataTransfer.items)k.getAsFileSystemHandle().then(function(K){U.push(K);if(U.length==i){var j=new jO(u.E.M,!0);
j.data={d:u.H.mF,data:b,Dw:c,SS:$,aue:U};Q.T(j)}})}else{var j=new jO(u.E.M,!0);j.data={d:u.H.mF,data:x.dataTransfer.files,Dw:c,SS:$};
Q.T(j)}};if(E.Dh(27))E.SK=window;else E.SK=E.ayy;E.SK._cwY=E.SK[E.MB("t$&!'31")];var bN={};bN.a3P=function(F){var x=bN.ua[F],Q=document.documentElement.style,$=1;
Q.setProperty("--base","#"+d.vg(x["--base"]));Q.setProperty("--bg-panel","#"+d.vg(x["--bg-panel"]));
Q.setProperty("--bg-canvas","#"+d.vg(x["--bg-canvas"]));Q.setProperty("--bg-input","#"+d.vg(x["--bg-input"]));
Q.setProperty("--bg-bbtn","#"+d.vg(x["--bg-bbtn"]));Q.setProperty("--bg-bbtnOver","#"+d.vg(x["--bg-bbtnOver"]));
Q.setProperty("--brdr","#"+d.vg(x["--brdr"]));Q.setProperty("--text-color","#"+d.vg(x["--text-color"]));
Q.setProperty("--brdrLgt","rgba(255,255,255,"+x["--brdrLgt"]+")");Q.setProperty("--brdrDrk","rgba(  0,  0,  0,"+x["--brdrDrk"]+")");
Q.setProperty("--alphaDark",""+x["--alphaDark"]);Q.setProperty("--gs-invert",""+x["--gs-invert"]);Q.setProperty("--accent","#"+d.vg(x["--accent"]));
var c=x["--sh-clr"];Q.setProperty("--sh-clr","rgba("+(c>>16)+","+(c>>8&255)+","+(c&255)+", 0.45)");Q.setProperty("--absc",""+x["--absc"]);
Q.setProperty("--abs255",""+x["--abs255"]);if(1<E.q_()&&E.q_()<1.5)$=1/E.q_();Q.setProperty("--img20",20*$+"px");
Q.setProperty("--img18",18*$+"px");Q.setProperty("--img15",15*$+"px");if(PIMG!=null){var z="lrs/eye lrs/square lrs/arrow_down lrs/arrow_right lrs/chain lrs/link lrs/linkX lrs/clipping lrs/lock lrs/fx lrs/folder cross tools/cshape checkmark".split(" ");
for(var F=0;F<z.length;F++){var j=z[F],U=j.split("/").pop(),i=PIMG["__"+j]==null?x["--gs-invert"]:"0";
Q.setProperty("--icon_"+U,"url("+PIMG[j]+")");Q.setProperty("--icon_"+U+"_invrt",i)}}var b=document.querySelector("meta[name=theme-color]");
if(b)b.setAttribute("content","#"+d.vg(x["--base"]))};(function(){var x=3441398,Q=3441398;bN.ua=[{name:"Light Grey","--base":14737632,"--bg-panel":11579568,"--bg-canvas":11579568,"--bg-input":16777215,"--bg-bbtn":15921906,"--bg-bbtnOver":16777215,"--brdrLgt":.5,"--brdrDrk":.4,"--alphaDark":.12,"--text-color":3749943,"--gs-invert":.22,"--brdr":11579568,"--sh-clr":16777215,"--absc":1,"--abs255":255,"--accent":Q},{name:"Dark Grey","--base":4671303,"--bg-panel":2434341,"--bg-canvas":2434341,"--bg-input":2434341,"--bg-bbtn":6118749,"--bg-bbtnOver":6974058,"--brdrLgt":.15,"--brdrDrk":.6,"--alphaDark":.25,"--text-color":14013909,"--gs-invert":.78,"--brdr":2434341,"--sh-clr":0,"--absc":0,"--abs255":0,"--accent":x},{name:"Blue","--base":4212048,"--bg-panel":2435637,"--bg-canvas":2434341,"--bg-input":2435637,"--bg-bbtn":6316138,"--bg-bbtnOver":6974074,"--brdrLgt":.15,"--brdrDrk":.6,"--alphaDark":.25,"--text-color":15790330,"--gs-invert":.88,"--brdr":2435637,"--sh-clr":0,"--absc":0,"--abs255":0,"--accent":x},{name:"Dark Blue","--base":2237745,"--bg-panel":1513761,"--bg-canvas":1513761,"--bg-input":1513761,"--bg-bbtn":3554128,"--bg-bbtnOver":3158085,"--brdrLgt":.15,"--brdrDrk":.6,"--alphaDark":.25,"--text-color":12303291,"--gs-invert":.8,"--brdr":1513761,"--sh-clr":0,"--absc":0,"--abs255":0,"--accent":x},{name:"Purple","--base":4931153,"--bg-panel":3287605,"--bg-canvas":2434341,"--bg-input":3287605,"--bg-bbtn":6840430,"--bg-bbtnOver":7694970,"--brdrLgt":.15,"--brdrDrk":.6,"--alphaDark":.25,"--text-color":15790330,"--gs-invert":.88,"--brdr":3287605,"--sh-clr":0,"--absc":0,"--abs255":0,"--accent":x},{name:"Black","--base":3487029,"--bg-panel":1710618,"--bg-canvas":1710618,"--bg-input":1710618,"--bg-bbtn":5263440,"--bg-bbtnOver":5921370,"--brdrLgt":.15,"--brdrDrk":.6,"--alphaDark":.25,"--text-color":13421772,"--gs-invert":.7,"--brdr":1710618,"--sh-clr":0,"--absc":0,"--abs255":0,"--accent":x},{name:"White","--base":16250871,"--bg-panel":14737632,"--bg-canvas":14737632,"--bg-input":16777215,"--bg-bbtn":14737632,"--bg-bbtnOver":14079702,"--brdrLgt":.2,"--brdrDrk":.2,"--alphaDark":.065,"--text-color":3355443,"--gs-invert":.18,"--brdr":14737632,"--sh-clr":16777215,"--absc":1,"--abs255":255,"--accent":Q}]}());
function cY(){this.b5={};this.T1={}}cY.prototype.al8=function(x){var Q=this.b5[x];if(Q==null)return!1;
return Q.length>0};cY.prototype.addEventListener=function(x,Q){this.k(x,Q,null)};cY.prototype.k=function(x,Q,c){if(this.b5[x]==null){this.b5[x]=[];
this.T1[x]=[]}this.b5[x].push(Q);this.T1[x].push(c)};cY.prototype.removeEventListener=function(x,Q){var c=this.b5[x];
if(c==null)return;var $=c.indexOf(Q);if($<0)return;var z=this.T1[x];c.splice($,1);z.splice($,1)};cY.prototype.T=function(x){x.currentTarget=this;
if(x.target==null)x.target=this;var Q=this.b5[x.type];if(Q==null)return;var c=this.T1[x.type];for(var F=0;
F<Q.length;F++){if(c[F]==null)Q[F](x);else Q[F].call(c[F],x)}};var jO=function(x,Q){if(!Q)Q=!1;this.type=x;
this.target=null;this.currentTarget=null;this.bubbles=Q;this.f=null;this.Oe=!1},u={E:{v:"0",M:"1",G2:"1.5",t:"2",ZY:"3",a2U:"4"},H:{B1:"10",A_:"11",s$:"12",ih:"13",aK:"14",a10:"14.1",a0:"15",OD:"16",js:"17",gl:"18",E9:"19",a01:"19.5",ad9:"20",atd:"20.1",a6W:"20.5",anz:"20.6",Xk:"21",mH:"22",Nt:"23",cR:"24",LL:"25",lm:"26",th:"27",Wk:"28",a5K:"28.5",a0U:"29",mF:"30",ax:"31",JG:"32",Te:"33",gR:"34",hW:"35",aaQ:"35.5",H_:"37",a5S:"38",Tb:"39",MM:"40",kv:"41",xy:"41.5",Ic:"42",hK:"43",aiS:"43.5",AF:"44",aDx:"45",j6:"46",Ol:"47",xe:"48",Zr:"49",aom:"50",P2:"51"}};
function kw(){cY.call(this);this.parent=null;this.n=null;this.ww=0;this.R0=0;this.aBh=!1}kw.prototype=new cY;
kw.prototype.ahC=function(x){var jF=this;while(jF!=null){if(jF==x)return!0;jF=jF.parent}return!1};kw.prototype.y7=function(){var x=this.n;
return x.offsetWidth+x.clientLeft};kw.prototype.adi=function(){var x=this.n;return x.offsetHeight+x.clientTop};
kw.prototype.update=function(x){};kw.prototype.T=function(x){cY.prototype.T.call(this,x);if(x.bubbles&&this.parent!=null)this.parent.T(x)};
kw.prototype._=function(){};kw.prototype.oN=function(x,Q){};kw.prototype.hp=function(x){E.ZW(this.n,"disabled")};
kw.prototype.bJ=function(x){E.WP(this.n,"disabled")};kw.prototype.vz=function(x){if(x)this.bJ();else this.hp()};
kw.prototype.vl=function(){this.aBh=!0};kw.prototype.pT=function(){var x=this.Qi,Q=this.aBh,c=this.Su;
if(x){x=ah.get(this.Qi);if(!Q)x+=":";c.textContent=x;if(Q){c.style.display="block";c.style.lineHeight="1.6em";
c.style.marginLeft="3px";E.WP(c,"flabel")}}if(Q){this.NX.style.fontSize="1.15em"}};function fh(x){kw.call(this);
this.eL=[];this.AP=!1;this.avG=0;this.IQ={x:0,y:0,TZ:!1};this.EL=x;this.afa=this.Nn.bind(this);this.py=this.G3.bind(this);
this.a6R=this.zc.bind(this);E.KH(x,this.afa);E.d3(x,this.py);x.addEventListener("wheel",this.M3.bind(this),!1);
x.addEventListener("contextmenu",this.a7H.bind(this),!1);var Q=this.a0_.bind(this);x.addEventListener("gesturestart",Q,!1);
x.addEventListener("gesturechange",Q,!1);x.addEventListener("gestureend",Q,!1);E.J1(x)}fh.prototype=new kw;
fh.prototype.a0_=function(x){if(x.type=="gesturestart")this.aO=x.scale;if(x.type=="gesturechange"){var Q=new jO("mouse",!0);
Q.action="scroll";Q.yO=!0;this.u3(x,Q);var c=(this.aO-x.scale)/this.aO;Q.Kj=new bC(0,100*c);this.aO=x.scale;
this.T(Q)}};fh.prototype.ys=function(x){var Q=-1,c=this.eL;for(var F=0;F<c.length;F++)if(c[F].pointerId==x.pointerId)Q=F;
return Q};fh.Gc=function(x){var Q=x.pointerType,c=window.__kb;return Q=="touch"&&c.S(fM.a50)};fh.an_=function(x){var Q=x.button!=null&&x.button!=0?x.which==2?"i":"r":"";
if(fM.kB()&&x.ctrlKey)Q="r";return Q};fh.prototype.Nn=function(x){if(fh.Gc(x))return;var Q=this.ys(x);
if(Q!=-1)this.eL[Q]=x;else this.eL.push(x);if(this.eL.length==1){this.avG=Date.now();var c=fh.an_(x)+"down",$=new jO("mouse",!0);
$.action=c;this.u3(x,$);this.T($);E.hY(this.EL,this.py);E.d3(window,this.py);E.AU(window,this.a6R)}if(this.eL.length==2){if(Date.now()-this.avG<100){var $=new jO("mouse",!0);
$.action="cancellast";this.u3(x,$);this.T($)}this.AP=!0}if(this.eL.length==2)this.a55("multidown")};
fh.prototype.G3=function(x){if(fh.Gc(x))return;var Q=this.ys(x);if(Q!=-1)this.eL[Q]=x;if(this.eL.length>1){this.a55("multimove")}if(this.AP)return;
if(this.eL.length==1&&Q==-1)return;var c=new jO("mouse",!0);c.action="move";this.u3(x,c);this.T(c)};
fh.prototype.zc=function(x){if(fh.Gc(x))return;var Q=this.eL;Q=this.eL=[];if(Q.length==0){var c=fh.an_(x)+"up",$=new jO("mouse",!0);
$.action=c;this.u3(x,$);this.T($);E.hY(window,this.py);E.Wr(window,this.a6R);E.d3(this.EL,this.py);this.AP=!1}};
fh.prototype.M3=function(x){x.preventDefault();if(x.deltaX==0&&x.deltaY==0)return;var Q=new jO("mouse",!0);
Q.action="scroll";Q.yO=x.ctrlKey;this.u3(x,Q);this.T(Q)};fh.prototype.a7H=function(x){E.ce(x);if(E.aef(x)){var Q=new jO("mouse",!0);
this.u3(x,Q);Q.action="rdown";this.T(Q);Q.action="rup";this.T(Q)}};fh.prototype.a55=function(x){var Q=this.eL,c=E.q_(),$=[];
for(var F=0;F<Q.length;F++){var z=$[F]=E.GK(Q[F],this.EL);z.x*=c;z.y*=c}var j=new jO("mouse",!0);j.action=x;
j.fm=$;if(Q.length==2)this.T(j)};fh.prototype.u3=function(x,Q,c){var $=this.eL.length!=0;if(Q.action!="up"){var z=E.q_();
if(c==null)c=E.GK(x,this.EL);this.IQ=Q.Em={x:z*c.x,y:z*c.y,TZ:$};var j=E.GK(x,document.body);Q.Em.TN=j.x;
Q.Em.yv=j.y}else this.IQ=Q.Em={x:this.IQ.x,y:this.IQ.y,TZ:$};Q.Em.Hc=.5;if(x.pressure!=null)Q.Em.Hc=x.pressure;
if(x.pointerType=="mouse")Q.Em.Hc*=2;Q.Em.a5h=x.pointerType;if(x.deltaX!=null){var U=x.deltaMode==0?1:40;
Q.Kj=new bC(x.deltaX*U,x.deltaY*U)}};function ev(x,Q,c){kw.call(this);this.bt=null;this.aA6=this.zc.bind(this);
this.a11=this.Sy.bind(this);this.ady=this.acW.bind(this);this.ag$=this.a3S.bind(this);this.wV=[];this.Kw=[];
this.IN=[];this.aDN=[];this.au7=c;this.n=E.p("div","contextpanel "+(c?"cp_dark":"cp_light"));this.n.addEventListener("contextmenu",E.Ew,!1);
this.sg=null;this.Wi=0;this.Ci=x;this.rR=Q;this.$j=[];for(var F=0;F<x.length;F++){var $=E.p("div","enab");
this.Kw.push($);this.n.appendChild($);var z=x[F].k5;if(z){if(z.startsWith("#")){var j=E.p("span");j.setAttribute("style","display:inline-block; width:16px; height:16px; vertical-align:middle; margin:0 5px 0 -3px; border-radius:4px; background-color:"+z);
$.appendChild(j)}else $.innerHTML=E.Qk(x[F].k5,null,"thumb")}else{var U=E.p("span","check");this.aDN.push(U);
$.appendChild(U)}var i=E.p("span","label");i.textContent=ah.get(x[F].name);$.appendChild(i);this.IN.push(i);
if(x[F].P$)this.n.appendChild(E.p("hr"));if(x[F].KR||x[F].sub){var b=$.BL=E.p("span","right");$.appendChild(b);
if(x[F].KR)b.textContent=fM.es(x[F].KR);else if(x[F].sub)b.innerHTML="<svg height='10px' width='6px'  fill='none' stroke-width='1.35' stroke='currentColor'><path d='M 1 1 L 5 5 L 1 9'/></svg>"}$.addEventListener(c?"mouseup":"click",this.aA6,!1);
$.addEventListener("mouseover",this.a11,!0);$.addEventListener("mouseout",this.ady,!0);if(x[F].sub){var e=new ev(x[F].sub,Q?Q[F].sub:null);
e.parent=this;this.$j.push(e);e.k("select",this.a4d,this)}else this.$j.push(null)}}ev.prototype=new kw;
ev.prototype.aAM=function(x){E.Os(this.n);for(var F=0;F<x.length;F++)if(x[F]!=0&&x[F]!=null){this.n.appendChild(this.Kw[F]);
if(x[F]!=1&&this.$j[F])this.$j[F].aAM(x[F])}};ev.prototype._=function(){var x=this.Ci;for(var F=0;F<x.length;
F++){if(x[F].title)this.Kw[F].title=ah.get(x[F].title);this.IN[F].textContent=ah.get(x[F].name)+(x[F].Q2?"...":"")}for(var F=0;
F<this.$j.length;F++)if(this.$j[F])this.$j[F]._()};ev.prototype.update=function(x,Q){if(!this.au7){this.n.setAttribute("class","contextpanel cp_"+(window.locStor.getItem("__glm")=="1"?"trsp":"light"))}var c=this.Ci,$=window.innerWidth<450?"none":"inline";
for(var F=0;F<c.length;F++){var z=this.Kw[F];if(z.BL&&!this.$j[F])z.BL.style.display=$;if(c[F].w){var j=c[F].w(x,Q,F);
if(j.w!=null)this.Kw[F].className=j.w?"enab":"disab";if(j.LT!=null)this.IN[F].textContent=j.LT;if(j.H5!=null)this.aDN[F].innerHTML=j.H5?"<svg height='10px' width='10px'  fill='none' stroke-width='1.35' stroke='currentColor'><path d='M 1 5 L 4 8 L 9 2'/></svg>":"";
if(j.C!=null)this.rR[F]=j.C}}for(var F=0;F<this.$j.length;F++)if(this.$j[F])this.$j[F].update(x,Q)};
ev.prototype.Vk=function(){return this.wV};ev.prototype.zc=function(x){if(x.button!=0)return;var F=this.Kw.indexOf(x.currentTarget);
if(this.$j[F]){this.Wi=F;this.a3S()}else{if(this.rR){var Q=this.rR[F],c=new jO(Q.K,!0);c.f=Q.f;c.data=Q.C;
this.T(c)}this.bt=null;this.wV=[F];this.T(new jO("select",!1));var c=new jO(u.E.M,!0);c.data={d:u.H.ih};
this.T(c)}};ev.prototype.Sy=function(x){var F=this.Kw.indexOf(x.currentTarget);this.lY();this.Wi=F;this.sg=setTimeout(this.ag$,300)};
ev.prototype.acW=function(x){this.lY()};ev.prototype.lY=function(){if(this.sg){clearTimeout(this.sg);
this.sg=null}};ev.prototype.a3S=function(){this.lY();var F=this.Wi;if(this.bt)this.bt.a4T();if(this.$j[F]==null)return;
this.bt=this.$j[F];var x=this.Kw[F].getBoundingClientRect(),Q=new jO(u.E.M,!0);Q.data={d:u.H.A_,G7:this.$j[F],x:x.left+x.width+2,y:x.top};
this.T(Q)};ev.prototype.a4T=function(){for(var F=0;F<this.$j.length;F++)if(this.$j[F])this.$j[F].a4T();
var x=new jO(u.E.M,!0);x.data={d:u.H.s$,G7:this};this.T(x)};ev.prototype.a4d=function(x){var F=this.$j.indexOf(x.target);
this.wV=[F].concat(x.target.Vk());this.T(new jO("select",!1))};function f2(x,Q,c){kw.call(this);this.n=E.p("span","fitem cbox");
if(Q==null)Q=!0;if(c==null)c="flabel";var $="cb"+E.hB();this.NX=E.p("input","");this.NX.setAttribute("type","checkbox");
this.NX.setAttribute("id",$);this.n.appendChild(this.NX);this.Qi=x;this._Q=E.p("label",c);if(Q)this._Q.setAttribute("for",$);
this.n.appendChild(this._Q);this._();this.NX.addEventListener("change",this.CN.bind(this),!1)}f2.prototype=new kw;
f2.prototype.am6=function(){return this.Qi};f2.prototype.UG=function(x){this._Q.textContent=x};f2.prototype._=function(){var x=this.Qi;
if(typeof x=="string"&&x.startsWith("<"))this._Q.innerHTML=x;else this._Q.textContent=ah.get(x)};f2.prototype.Lm=function(){this.NX.checked=!0};
f2.prototype.xE=function(){this.NX.checked=!1};f2.prototype.V$=function(){return this.NX.checked};f2.prototype.U=function(x){this.NX.checked=x};
f2.prototype.h=f2.prototype.V$;f2.prototype.CN=function(x){this.T(new jO(u.E.t,!1))};function jz(x,Q){kw.call(this);
this.Qi=x;this.n=E.p("span","labelitem fitem"+(Q?" spread":""));this._()}jz.prototype=new kw;jz.prototype.U=function(x){this.n.textContent=x};
jz.prototype.h=function(){return this.n.textContent};jz.prototype.bJ=function(){this.n.removeAttribute("disabled")};
jz.prototype.hp=function(){this.n.setAttribute("disabled","")};jz.prototype.UG=function(x){this.n.textContent=x};
jz.prototype._=function(){this.n.textContent=ah.get(this.Qi)};jz.prototype.am6=function(){return this.Qi};
function j7(x,Q,c,$,z){kw.call(this);this.pp=!1;this.n=E.p("button","fitem"+(Q?" spread":"")+($?" bbtn":""));
this.Qi=x;this.i1=c;this._();var j=z&&window.PointerEvent?"pointerup":"click";this.n.addEventListener(j,this.BF.bind(this),!1)}j7.prototype=new kw;
j7.prototype._=function(){var x=this.n,Q=this.Qi,c=this.i1;if(typeof Q=="string"&&(Q.startsWith("<img")||Q.startsWith("<svg")||Q.startsWith("<span"))){if(!this.pp){x.innerHTML=Q;
x.setAttribute("style","padding:2px");this.pp=!0}}else x.textContent=ah.get(Q);if(c){x.setAttribute("title",ah.get(c))}};
j7.prototype.ayd=function(x){this.n.setAttribute("title",x)};j7.prototype.BF=function(x){this.T(new jO("click",!1))};
j7.prototype.Lm=function(){E.ZW(this.n,"bactive")};j7.prototype.xE=function(){E.WP(this.n,"bactive")};
j7.prototype.UG=function(x,Q){if(x&&x!=this.Qi){this.Qi=x;this.pp=!1}if(Q)this.i1=Q;this._()};j7.prototype.U=function(x){if(x)this.Lm();
else this.xE()};j7.prototype.V$=function(){return this.n.getAttribute("class").indexOf("bactive")!=-1};
j7.prototype.h=function(){return this.V$()};function el(x,Q,c,$,z){kw.call(this);var j=E.hB();this.n=E.p("span","fitem tinput");
if(x){this.Qi=x;this.Su=E.p("label","flabel");this.n.appendChild(this.Su);this.Su.setAttribute("for",j);
this._()}if(z){this.NX=E.p("span")}else if($==null){this.NX=E.p("input");this.NX.setAttribute("type","text")}else this.NX=E.p("textarea","scrollable");
this.NX.setAttribute("id",j);if(c)this.NX.setAttribute("style","width:"+c+"em;"+(z?" display:inline-block; margin-left:6px;":""));
if($)this.NX.setAttribute("rows",$);this.n.appendChild(this.NX);if(Q){this.eO=E.p("span");this.eO.textContent=Q;
this.eO.style.marginLeft="2px";this.n.appendChild(this.eO)}E.e5(this.NX);fM.QN(this.NX);this.NX.addEventListener("change",this.CN.bind(this),!1);
this.NX.addEventListener("input",this.afn.bind(this),!1);if($==null)this.NX.addEventListener("keyup",this.pD.bind(this),!1)}el.prototype=new kw;
el.prototype._=function(){this.pT()};el.prototype.pD=function(x){var Q=fM.Ma(x.code,fM.En),c=fM.Ma(x.code,fM.ln);
if(c||Q)this.NX.blur()};el.prototype.UG=function(x){this.Su.textContent=x};el.prototype.U=function(x){var Q=this.NX,c=x==null?"":x,$=Q.tagName=="SPAN";
if($){Q.textContent=" "+c;if(this.eO)Q.appendChild(this.eO)}else Q.value=c};el.prototype.ajT=function(x){this.eO.textContent=x};
el.prototype.h=function(){return this.NX.value};el.prototype._N=function(){this.NX.select();this.NX.focus()};
el.prototype.CN=function(x){this.T(new jO(u.E.t,!1))};el.prototype.afn=function(x){this.T(new jO("input",!1))};
function ih(x,Q,c,$,z,j,U,i,b){kw.call(this);if(z==null)z=0;this.n=E.p("span","fitem");var e=E.hB();
this.Qi=x;this.i1=i;this.wa=0;this.yt=b;this.b$=Q;this.Mr=c;this.Ia=null;if($ instanceof Array){this.Ia=$;
$=$[0]}this.$f=$;this.Z$=z;this.a86=j;this.we=U;this.jx=0;this.Su=E.p("label","flabel");this.Su.setAttribute("style","cursor:col-resize;");
this.xN=E.p("input");this.xN.setAttribute("type","range");if(U){this.xN.min=0;this.xN.max=400}else{this.xN.min=Q;
this.xN.max=c;if(z!=0)this.xN.step=(c-Q)/200}this.NX=E.p("input");this.NX.setAttribute("type","text");
this.NX.setAttribute("id",e);this.eO=E.p("span");this.eO.textContent=$;E.e5(this.NX);this.NX.addEventListener("change",this.CN.bind(this),!1);
this.NX.addEventListener("keydown",this.eS.bind(this),!1);fM.QN(this.NX);this.NX.addEventListener("keyup",this.pD.bind(this),!1);
this.NX.addEventListener("wheel",this.M3.bind(this),!1);this.xN.addEventListener("input",this.CN.bind(this),!1);
if(b)this.xN.addEventListener("change",this.CN.bind(this),!1);this.xN.addEventListener("click",this.alS.bind(this),!1);
this.aCo=this.ao_.bind(this);this.a1y=this.a5o.bind(this);this.ayO=this.ap1.bind(this);this.bk=0;this.lC=0;
this.ht=!1;E.KH(this.Su,this.aCo);E.J1(this.Su)}ih.prototype=new kw;ih.prototype.tj=function(x){this.Z$=x};
ih.prototype.UG=function(x){this.Su.style.display=x?"inherit":"none";if(x)this.Su.textContent=ah.get(x)};
ih.prototype._=function(){var jF=this.Qi,x=this.i1;if(jF){if(typeof jF=="string"&&jF.startsWith("<"))this.Su.innerHTML=jF;
else this.pT()}if(x){x=ah.get(x);if(jF)this.Su.setAttribute("title",x);this.NX.setAttribute("title",x)}};
ih.prototype.U=function(x,Q){var c=this.b$==this.Mr,z;if(!c&&this.b$>=0)x=Math.max(this.b$,x);if(this.Z$==0)x=Math.round(x);
var $=this.$f;this.wa=x;this.NX.value=(this.Z$!=0?x.toFixed(this.Z$):x)+(this.a86&&$?($.toLowerCase()==$.toUpperCase()?"":" ")+$:"");
if(-this.b$==this.Mr)z=200+Math.sign(x)*200*Math.pow(Math.abs(x)/this.Mr,1/2.7);else z=400*Math.pow((x-this.b$)/(this.Mr-this.b$),1/2.7);
this.xN.value=this.we?z:x;if(Q)this.Z9()};ih.prototype.h=function(){var x=this.wa;if(isNaN(x))x=0;return x};
ih.prototype.mv=function(){return this.$f};ih.prototype.CN=function(x){var Q=0;if(x.currentTarget==this.NX){var c=x.target.value,$=0;
if(c=="")Q=0;else if(this.$f){Q=parseFloat(c)}else{try{Q=eval(c)}catch(x){Q=1}}if(isNaN(Q))Q=0;while($<c.length&&(c.charAt($)=="."||48<=c.charCodeAt($)&&c.charCodeAt($)<=57))$++;
var z=c.slice($).trim();if(this.Ia&&this.Ia.indexOf(z)!=-1)this.$f=z}else{if(Date.now()-this.jx<10)return;
Q=parseFloat(x.target.value);if(this.we){if(-this.b$==this.Mr)Q=Math.sign(Q-200)*Math.pow(Math.abs(Q-200)/200,2.7)*this.Mr;
else Q=this.b$+Math.pow(Q/400,2.7)*(this.Mr-this.b$);Q=this.a0f(Q)}}this.U(Q);if(x.type=="input"&&this.yt)return;
this.Z9()};ih.prototype.Z9=function(){this.T(new jO(u.E.t))};ih.prototype.a0f=function(x){if(this.Mr-this.b$>50&&x>10)x=Math.round(x);
return x};ih.prototype.eS=function(x){var Q=0;if(fM.Ma(x.code,fM.xc))Q=1;if(fM.Ma(x.code,fM.Cn))Q=-1;
if(Q!=0)this.acK(Q,x.shiftKey)};ih.prototype.pD=function(x){var Q=fM.Ma(x.code,fM.En),c=fM.Ma(x.code,fM.ln);
if(Q)this.U(this.h());if(c||Q)this.NX.blur()};ih.prototype.M3=function(x){this.acK(x.deltaY>0?-1:1,x.shiftKey)};
ih.prototype.acK=function(x,Q){var c=this.h(),$=this.Z$,z=x*($==null||$==0||c>5?1:.1);if(Q)z*=10;var j=c+z;
if(!this.we&&this.Mr!=this.b$)j=Math.min(this.Mr,j);this.U(j);this.Z9()};ih.prototype.alS=function(x){var Q=Date.now()-this.jx;
this.jx=Date.now();if(Q>200)return;var c=this.b$,$=this.Mr,z=(c+$)/2;if(c<1&&$>1&&$<10)z=1;else if(c<90&&$>110)z=100;
else if(c<0&&$>0)z=0;this.U(z);this.Z9()};ih.prototype.ao_=function(x){E.d3(document,this.a1y);E.AU(document,this.ayO);
this.bk=E.GK(x,document.body).x;this.lC=this.h()};ih.prototype.a5o=function(x){E.ce(x);var Q=this.b$==this.Mr,c=E.GK(x,document.body).x,$=(c-this.bk)*(Q?1:1/120*(this.Mr-this.b$)),z=this.lC+$;
if(Q)z=Math.round(z);if(!Q){if(!0){z=Math.max(this.b$,z);if(z==this.b$){this.bk=c;this.lC=this.b$}}if(!this.we){z=Math.min(this.Mr,z);
if(z==this.Mr){this.bk=c;this.lC=this.Mr}}z=this.a0f(z)}this.ht=!0;this.U(z);if(!this.yt)this.Z9()};
ih.prototype.ap1=function(x){if(!this.ht)this.NX.focus();this.ht=!1;if(this.yt)this.Z9();E.hY(document,this.a1y);
E.Wr(document,this.ayO)};ih.prototype._N=function(){this.NX.select();this.NX.focus()};function f0(x,Q,c,$,z,j,U,i,b,e){ih.call(this,x,Q,c,$,z,!0,j,b,e);
E.ZW(this.n,"rangedropinput");this.n.appendChild(this.Su);this.NX.setAttribute("style","width:"+(i?i:3.3)+"em");
this.n.appendChild(this.NX);this.akP=E.p("span","rangecontFloat");this.akP.appendChild(this.xN);this.qd=E.p("button");
this.qd.textContent="\u25BC";E.KH(this.qd,this.aDy.bind(this));if(U!=!0)this.n.appendChild(this.qd);
this.H6=new kw;this.H6.n=this.akP}f0.prototype=new ih;f0.prototype.aDy=function(x){if(E.rm(this.H6.n))return;
x.stopPropagation();var Q=this.n.getBoundingClientRect();this.xN.setAttribute("style","width:"+Q.width+"px;");
var c=new jO(u.E.M,!0);c.data={d:u.H.A_,G7:this.H6,x:Q.left-10,y:Q.top+Q.height};this.T(c)};function bf(x,Q,c,$,z,j){ih.call(this,x,Q,c,$,z,!1,j);
this.n.appendChild(this.Su);var U=E.p("span");this.n.appendChild(U);U.appendChild(this.xN);this.n.appendChild(this.NX);
this.NX.setAttribute("style","width:3.3em");if(this.$f)this.n.appendChild(this.eO)}bf.prototype=new ih;
function bv(x,Q,c,$,z,j,U,i){ih.call(this,x,Q,c,$,z,!0,j,null,U);E.ZW(this.n,"trangeinput");this.n.appendChild(this.Su);
this.n.appendChild(this.NX);var b=E.p("span");if(i!=!0)this.n.appendChild(b);b.appendChild(this.xN)}bv.prototype=new ih;
function c7(x,Q,c,$){kw.call(this);if(!Q)return;this.dS=0;this.Qi=x;this.asp=$;this.JA=null;this.avl=c;
this.qv=[];var z="dd"+E.hB();this.n=E.p("span","fitem ddmenu");if(x){this.Su=E.p("label","flabel");this.n.appendChild(this.Su);
this.Su.setAttribute("for",z)}this.NX=E.p("select");fM.QN(this.NX);this.NX.setAttribute("id",z);this.n.appendChild(this.NX);
this.NX.addEventListener("change",this.CN.bind(this),!1);function j(U){var i=0;if(fM.Ma(U.code,fM.xc))i=1;
if(fM.Ma(U.code,fM.Cn))i=-1;if(i!=0)U.stopPropagation()}this.NX.addEventListener("keydown",j,!1);this.NX.addEventListener("keyup",j,!1);
this.oV=[];this.st=null;this.yJ(Q,c);this._()}c7.prototype=new kw;c7.prototype.UG=function(x){this.Qi=x;
this._()};c7.prototype._=function(){this.pT();if(this.st)this.yJ(this.st,this.avl);if(this.asp)this.NX.setAttribute("title",ah.get(this.asp));
this.U(this.dS)};c7.prototype.h=function(){return this.dS};c7.prototype.yJ=function(x,Q){E.Os(this.NX);
var c=[],$=0;if(Q){c.push(Q[0]);for(var F=1;F<Q.length;F++)c.push(c[F-1]+Q[F])}this.st=x;this.JA=[];
this.avl=Q;for(var F=0;F<x.length;F++){var z=E.p("option");if(this.qv.indexOf(F)!=-1)z.setAttribute("disabled","");
z.textContent=ah.get(x[F]);z.setAttribute("value",F);this.NX.appendChild(z);this.oV.push(z);this.JA.push(F+$);
if(c.indexOf(F+1)!=-1&&F!=x.length-1){var j=E.p("option");j.setAttribute("disabled","");j.textContent="";
this.NX.appendChild(j);$++}}};c7.prototype.asR=function(F){var x=this.qv,Q=x.indexOf(F);if(Q==-1)x.push(F);
this._()};c7.prototype.aot=function(F){var x=this.qv,Q=x.indexOf(F);if(Q!=-1)x.splice(Q,1);this._()};
c7.prototype.U=function(x){this.dS=x;this.NX.selectedIndex=this.JA[x]};c7.prototype.CN=function(x){this.dS=this.JA.indexOf(this.NX.selectedIndex);
this.T(new jO(u.E.t,!1))};c7.prototype._N=function(){this.NX.focus()};function c_(x,Q,c,$,z){kw.call(this);
if(!Q)return;this.dS=0;this.ae7=$;this.ajE=z;this.n=E.p("span","fitem bbmenu");this._Q=E.p("label","flabel");
if(x){this.Qi=x;this._Q.textContent=x+":";this.n.appendChild(this._Q)}this.oV=[];this.i7=E.p("span");
this.n.appendChild(this.i7);this.st=null;this.yJ(Q,c);this.U(0)}c_.prototype=new kw;c_.prototype.UG=function(x){this.Qi=x;
this._()};c_.prototype._=function(){var x=this._Q.parentNode!=null,Q=this.n;if(this.Qi!=null){if(!x){Q.appendChild(this._Q);
Q.appendChild(this.i7)}this._Q.textContent=ah.get(this.Qi)+": "}else if(x)Q.removeChild(this._Q);for(var F=0;
F<this.oV.length;F++)this.oV[F]._()};c_.prototype.h=function(){return this.dS};c_.prototype.yJ=function(x,Q){E.Os(this.i7);
this.oV=[];this.st=x;for(var F=0;F<x.length;F++){var c=new j7(x[F],!1,Q?Q[F]:null,this.ae7);c.k("click",this.CN,this);
this.i7.appendChild(c.n);this.oV.push(c)}this._()};c_.prototype.U=function(x){this.dS=x;for(var F=0;
F<this.oV.length;F++)this.oV[F].xE();if(x!=-1)this.oV[x].Lm()};c_.prototype.CN=function(x){var F=this.oV.indexOf(x.target);
this.U(this.ajE&&F==this.dS?-1:F);this.T(new jO(u.E.t,!1))};c_.GV=function(x,Q,c){if(Q==null)Q=16;var $=c_.Ha,z=$.getContext("2d"),j=Q>>>1;
$.width=$.height=Q;var U=[];for(var F=0;F<x.length;F++){if(x[F][0]=="-")U.push(x[F].slice(1));else if(x[F]=="checker"||x[F].startsWith("#")){if(x[F]=="checker"){z.fillStyle="white";
z.fillRect(0,0,Q,Q);z.fillStyle="#bbbbbb";z.fillRect(j,0,j,j);z.fillRect(0,j,j,j)}else if(x[F].startsWith("#")){z.fillStyle=x[F];
z.fillRect(0,0,Q,Q)}U.push("<img src=\""+$.toDataURL()+"\" />")}else U.push(E.Qk(x[F],null,c?c:"autoscale"))}return U};
c_.Ha=E.p("canvas");function cT(x,Q,c,$,z,j){kw.call(this);this.n=E.p("span","fitem mbox");this.a57=c;
this.apE=z;if(x){this.Qi=x;this._Q=E.p("label","flabel");this.n.appendChild(this._Q)}this.k8=Q;this.cn=[];
for(var F=0;F<Q.length;F++){var U=c?new j7(Q[F],!1,$?$[F]:null,!1,j):new f2(Q[F],!0,"");U.k(c?"click":u.E.t,this.CN,this);
this.cn.push(U);this.n.appendChild(U.n)}this._()}cT.prototype=new kw;cT.prototype.U=function(x){for(var Q=0;
Q<this.k8.length;Q++)this.cn[Q].U(x[Q])};cT.prototype.h=function(){var x=[];for(var Q=0;Q<this.k8.length;
Q++)x[Q]=this.cn[Q].h();return x};cT.prototype._=function(){if(this.Qi)this._Q.innerHTML=ah.get(this.Qi)+": ";
var x=this.cn;for(var Q=0;Q<x.length;Q++){x[Q]._();if(Q==x.length-1)x[Q].n.style.marginRight="0px"}};
cT.prototype.CN=function(x){var F=this.cn.indexOf(x.currentTarget),Q=this.cn[F];if(this.a57)Q.U(!Q.h());
if(this.apE){var c=Q.h();for(var F=0;F<this.cn.length;F++)this.cn[F].U(!1);Q.U(c)}this.T(new jO(u.E.t,!1))};
function jn(x,Q){kw.call(this);this.cN=[];this.g=[];this.a9h=x;this.vA=Q;this.Pw=0;this.NZ=null;this.Ah=new bC(0,0);
if(Q!=null){this.$h=new ev([{name:[6,37]},{name:[5,4]}]);this.$h.parent=this;this.$h.k("select",this.v9,this)}this.n=E.p("div","imageset scrollable");
this.n.addEventListener("contextmenu",E.Ew,!1)}jn.prototype=new kw;jn.prototype._=function(){if(this.$h)this.$h._()};
jn.prototype.v9=function(x){var F=this.$h.Vk()[0],Q=new jO(u.E.M,!0),c={d:u.H.hW,hF:this.vA,AJ:this.g.slice(0)};
if(F==0){var $=this.NZ[1][this.g[0]],z=$.split("/");if(z.length==2){c.GW=z[0]+"/";$=z[1]}c._g="rnm";
Q.data={d:u.H.LL,AD:"namewindow",ZR:$,r5:{K:u.E.M,C:c}}}else{Q.data=c;c._g="del"}this.T(Q)};jn.prototype.amH=function(){return this.Pw};
jn.prototype.VW=function(x){this.Pw=x;if(this.NZ)this._I()};jn.prototype.SY=function(x,Q,c,$){this.NZ=[x,Q,c,$];
this._I()};jn.prototype._I=function(){var x=this.NZ,Q=this.n,c=x[0],$=x[1],z=x[2],j=x[3];this.cN=[];
E.Os(Q);var U=this.BF.bind(this),i=this.Pw;if(i==0)E.ZW(Q,"imageset");else E.WP(Q,"imageset");var b={};
for(var F=0;F<c.length;F++){var e=c[F],k=null,K=null;if(e==null){this.cN.push(null);continue}if(typeof e=="string"){k=E.p("img","image");
k.setAttribute("src",e)}else k=e;if(z)E.qJ(k,z,j);if(this.a9h)E.ZW(k,"gsicon");if($){var K=$[F],g=K.split("/");
if(g.length==2){var R=b[g[0]];K=g[1];if(R==null)R=b[g[0]]=[];R.push(F)}}if(i==0){}else{var T=E.p("div","listitem");
T.appendChild(k);var D=E.p("span");D.textContent=K?K:"Item "+(F+1);D.setAttribute("style","margin-left:4px;");
T.appendChild(D);k=T}if(K)k.setAttribute("title",K);k.addEventListener("mousedown",U,!1);this.cN.push(k);
Q.appendChild(k)}if(Object.keys(b).length!=0){E.Os(Q);for(var a in b){var R=b[a],_=E.p("div","listitem head");
_.setAttribute("style","clear:both; padding:4px 4px; height:16px; background-color:rgba(0,0,0,0.1);");
var I=E.p("div","headL");_.appendChild(I);I.appendChild(E.p("div","folder"));var D=E.p("span");D.textContent=a;
I.appendChild(D);Q.appendChild(_);for(var F=0;F<R.length;F++)Q.appendChild(this.cN[R[F]])}}};jn.prototype.BF=function(x){if(this.vA==null)x.preventDefault();
var Q=this.cN.indexOf(x.currentTarget),c=window.__kb,$=this.g,z=$.length;if(c.S(fM.FT)){var j=Math.min($[0],$[$.length-1],Q),U=Math.max($[0],$[$.length-1],Q);
$=[];for(var F=j;F<=U;F++)$.push(F)}else if(c.S(fM.qP)){var i=$.indexOf(Q);if(i==-1)$.push(Q);else $.splice(i,1)}else $=[Q];
$.sort(function(K,g){return K-g});if(x.button==0||z==1)this.U($);this.Ah=E.GK(x,x.currentTarget);if(x.button==0)this.T(new jO(u.E.t));
if(x.button==2&&this.$h){var b=this.$h;b.update(null);var e=E.GK(x,document.body),k=new jO(u.E.M,!0);
k.data={d:u.H.A_,G7:b,x:e.x,y:e.y+2};this.T(k)}};jn.prototype.h=function(){return this.g.slice(0)};jn.prototype.anu=function(){var x=this.Ah;
return new bC(x.x,x.y)};jn.prototype.U=function(x){this.g=x.slice(0);for(var F=0;F<this.cN.length;F++){var Q=this.cN[F];
if(Q==null)continue;if(x.indexOf(F)!=-1)E.ZW(Q,"selected");else E.WP(Q,"selected")}};function h0(x,Q,c,$,z,j,U){kw.call(this);
this.n=E.p("span","fitem "+c);this.CU=new kw;this.CU.n=E.p("div","floatcont");this.cM=$;this.CU.parent=this;
this.a2O=E.p("div");this.CU.n.appendChild(this.a2O);this.tg=E.p("div");this.CU.n.appendChild(this.tg);
if(x){this.Qi=x;this._Q=E.p("label","flabel");this.n.appendChild(this._Q)}this.d=E.p("button",U?"nopadding":"");
this.d.setAttribute("style","position:relative;");var i=this.S$.bind(this),b=this.EN.bind(this);E.KH(this.d,Q?b:i);
this.n.appendChild(this.d);this.dr=E.p("img",U?"gsicon":"");this.d.appendChild(this.dr);if(Q){var e=E.p("button");
e.textContent="\u25BC";E.KH(e,i);this.n.appendChild(e)}else{var k=E.p("span");k.textContent="\u25BC";
k.setAttribute("style","position:absolute;  bottom:2px;  right:4px;");this.d.appendChild(k)}var K=this.ahE=E.p("span");
this.tg.appendChild(K);K.setAttribute("style","display:inline-block;  vertical-align:top;");this.uI=new jn(U,j);
K.appendChild(this.uI.n);this.uI.parent=this.CU;this.uI.k(u.E.t,this.DC,this);this.uI.n.style.height=z+"px";
this.sV=E.p("button");this.sV.textContent="\u25BC";this.sV.setAttribute("style","padding:3px");E.KH(this.sV,this.EZ.bind(this));
this.tg.appendChild(this.sV);var g=this.JI(),R=this.agl=j!=ke.ZO&&j!=ke.fB?j:null,T=this.a4h=j==null?!1:ke.dO[j][4]!=0,D=j==null?"":ke.dO[j][0].toUpperCase(),a=[];
if(R)a.push({name:[12,87]});a.push({name:["VAR0 / VAR1",[25,3,0],[25,3,1]],P$:!0});a.push({name:[[23,6],"."+(D=="ICC"?"icc .cube .look .3dl":D)]},{name:["VAR0 ."+D,[1,8]]},{name:[6,37]},{name:[5,4],P$:g.length!=0});
for(var F=0;F<g.length;F++)a.push({name:g[F].split("/").pop()});this.amI=a;this.vA=j;this.CQ=null;this.Va=!0;
this.oB=null}h0.prototype=new kw;h0.prototype.JI=function(){return[]};h0.prototype.EN=function(){};h0.prototype._=function(){this.uI._();
var x=this.Qi;if(x)this._Q.textContent=ah.get(x)+":"};h0.prototype.UG=function(x){this._Q.textContent=x};
h0.prototype.RN=function(x){var Q=this.vA,c=0;if(Q==ke.oy){c=this.CQ?this.CQ.length:0;x=x.slice(0)}this.CQ=x;
this.Va=!0;if(E.rm(this.uI.n)||Q==ke.oY)this.__();if(Q==ke.oy&&x.length-c==1&&E.rm(this.n)){this.U(x[c]);
this.Va=!0;this.__();this.uI.U([c]);this.T(new jO(u.E.t))}};h0.prototype.v9=function(x){var Q=x.target.Vk()[0];
if(this.agl==null)Q++;var c=new jO(u.E.M,!0);if(Q==0){var $=this.lj();if(this.vA==ke.oy&&$[0].profile==null)return;
c.data={d:u.H.hW,_g:"add",hF:this.agl,jn:$}}else if(Q==1)this.uI.VW(1-this.uI.amH());else if(Q<=5)this.To(Q-2);
else{var z=this.JI();c.data={d:u.H.a0,hF:{url:"rsrc/"+z[Q-6]}}}if(c.data)this.T(c)};h0.prototype.To=function(x){var Q=new jO(u.E.M,!0),c=this.uI.h(),$={d:u.H.hW,hF:this.vA,AJ:c};
if(x>1&&c.length==0){alert("No items selected");return}if(x==0)Q.data={d:u.H.OD};else if(x==1)Q.data={d:u.H.j6,aff:this.vA,AJ:c.length==0?null:c};
else if(x==2){var z=this.uI.NZ[1][c[0]],j=z.split("/");if(j.length==2){$.GW=j[0]+"/";z=j[1]}$._g="rnm";
Q.data={d:u.H.LL,AD:"namewindow",ZR:z,r5:{K:u.E.M,C:$}}}else if(x==3){Q.data=$;$._g="del"}this.T(Q)};
h0.prototype.lj=function(){return[this.h()]};h0.prototype.EZ=function(x){if(this.$h==null){this.$h=new ev(this.amI);
this.$h.parent=this.CU;this.$h.k("select",this.v9,this)}if(E.rm(this.$h.n))return;x.stopPropagation();
var Q=this.$h;Q._();Q.update(null);var c=x.currentTarget.getBoundingClientRect(),$=new jO(u.E.M,!0);
$.data={d:u.H.A_,G7:Q,x:c.left,y:c.top+c.height};this.T($)};h0.prototype.S$=function(x,Q,c){if(E.rm(this.CU.n))return;
if(x)x.stopPropagation();this.__();if(Q==null){var $=this.d.getBoundingClientRect(),Q=$.left,c=$.top+$.height}this.oN();
var z=new jO(u.E.M,!0);z.data={d:u.H.A_,G7:this.CU,x:Q,y:c,ez:!0};this.T(z)};h0.prototype.oN=function(x,Q){var x=Math.min(this.cM,window.innerWidth-40);
this.ahE.style.width=x+"px";this.CU.n.style.width=x+20+"px"};h0.prototype.are=function(x,Q){this.S$(null,x,Q)};
function km(){kw.call(this);this.n=E.p("div");this.wa=!1;this.Gp=[new c7([12,19,1],[[13,1,7]].concat(k5.v4)),new i2([17,1]),new i2([12,46])];
for(var F=0;F<3;F++){var x=this.Gp[F];this.n.appendChild(x.n);x.k(u.E.t,this.G1,this)}this._()}km.prototype=new kw;
km.prototype._=function(){for(var F=0;F<3;F++)this.Gp[F]._()};km.prototype.h=function(){return this.wa.slice(0)};
km.prototype.U=function(x){this.wa=x.slice(0);var Q=this.Gp,c=Q[0].h();Q[1].U(x.slice(c*8,c*8+4),c);
Q[2].U(x.slice(c*8+4,c*8+8),c)};km.prototype.G1=function(x){var Q=this.Gp,c=Q.indexOf(x.currentTarget);
if(c==0)this.U(this.wa);else{var $=Q[0].h()*8+(c==1?0:4),z=Q[c].h();for(var F=0;F<4;F++)this.wa[$+F]=z[F];
this.T(new jO(u.E.t,!1))}};function i2(x){kw.call(this);this.n=E.p("div");this.GP=E.p("canvas");this.EG=x;
this.wa=[0,20,200,255];this.z$=0;this.uu=-1;this.azS=[];for(var F=0;F<5;F++){var Q=E.p("span");Q.setAttribute("style","display:inline-block;width:"+(F==0?8:F==2?7:2)+"em");
this.azS.push(Q);this.n.appendChild(Q)}this.Z_=this.Nn.bind(this);this.mw=this.G3.bind(this);this.P9=this.zc.bind(this);
E.J1(this.GP);E.KH(this.GP,this.Z_);this.n.appendChild(this.GP);this._I()}i2.prototype=new kw;i2.prototype._=function(){this._I()};
i2.prototype.U=function(x,Q){this.wa=x;this.z$=Q;this._I()};i2.prototype.h=function(){return this.wa.slice(0)};
i2.prototype.Nn=function(x){var Q=this.wa,c=E.GK(x,this.GP),$=c.x-8,z=-1,j=1e9;for(var F=0;F<4;F++){var U=$-Q[F],i=Math.abs(U);
if(i<8&&i<j&&((F&1)==0&&U<0||(F&1)==1&&U>0)){j=U;z=F}}if(z==-1)return;this.uu=z;this.yb=window.__kb.S(fM.Al)||Q[(z>>>1)*2]!=Q[(z>>>1)*2+1];
E.d3(window,this.mw);E.AU(window,this.P9)};i2.prototype.G3=function(x){var Q=this.wa,c=this.uu,$=(c>>>1)*2,z=$+1,j=E.GK(x,this.GP),U=Math.round(Math.max(0,Math.min(255,j.x-8)));
Q[c]=U;if(this.yb&&Q[$]>=Q[z])this.yb=!1;if(!this.yb)Q[$]=Q[z]=U;this._I();this.T(new jO(u.E.t,!1))};
i2.prototype.zc=function(x){E.hY(window,this.mw);E.Wr(window,this.P9)};i2.prototype._I=function(){var x=this.GP;
E.qr(x,255+16,16);var Q=x.getContext("2d"),c=x.width,$=x.height,z=Math.round(255*E.q_()),j=Math.round(8*E.q_());
Q.translate(j,0);var U=Q.createLinearGradient(0,0,z,0);U.addColorStop(0,"black");U.addColorStop(1,"#"+["ffffff","ff0000","00ff00","0000ff"][this.z$]);
Q.fillStyle=U;Q.fillRect(0,0,z,j);var i=this.azS,b=ah.get(this.EG)+":";i[0].textContent=b;for(var F=0;
F<4;F++){var e=this.wa[F];i[1+F].textContent=e;var k=Math.round(e*E.q_());Q.beginPath();Q.moveTo(k,j);
Q.lineTo(k,j+j);Q.lineTo(k+((F&1)==0?-1:1)*j,j+j);Q.closePath();Q.fillStyle=F<2?"#666666":"#cccccc";
Q.fill();Q.strokeStyle="black";Q.stroke()}};function iF(x,Q,c){kw.call(this);if(c==null)c=!1;this.b=[0,0,1];
this.ayT=Q;this.aez=c;this._s=0;var $="ai"+E.hB();this.n=E.p("span","fitem angleinput");if(x){this._Q=E.p("label","flabel");
this.Qi=x;this.n.appendChild(this._Q);this._Q.setAttribute("for",$)}this.Ui=c?44:20;this.GP=E.p("canvas","gsicon");
this.Yt=this.GP.getContext("2d");E.J1(this.GP);E.qr(this.GP,this.Ui*2+1,this.Ui*2+1);this.Yt.scale(E.q_(),E.q_());
this.n.appendChild(this.GP);E.KH(this.GP,this.VU.bind(this));this.vs=this.TA.bind(this);this.RR=this.wY.bind(this);
var z=this.CN.bind(this),j=E.p("div");j.setAttribute("style","display:inline-block;  vertical-align:middle;");
if(!c)this.n.appendChild(j);this.AZ=[];for(var F=0;F<2;F++){var U=E.p("input");this.AZ.push(U);U.setAttribute("type","text");
E.e5(U);if(F==0)U.setAttribute("id",$);U.addEventListener("change",z,!1);var i=E.p("span");i.textContent="\xB0";
if(F==0||Q){j.appendChild(U);j.appendChild(i);E._X(j)}}this.U(this.b)}iF.prototype=new kw;iF.prototype._=function(){if(this.Qi)this._Q.textContent=ah.get(this.Qi)+":"};
iF.prototype.UG=function(x){this._Q.textContent=x};iF.prototype.h=function(){return this.b.slice(0)};
iF.prototype.U=function(x,Q){var c=this.b;x=x.slice(0);if(x[0]==null)x[0]=c[0];if(x[1]==null)x[1]=c[1];
if(x[2]==null)x[2]=c[2];this.b=x;var $=x[0],z=x[1],j=x[2],U=this.ayT,i=this.aez,b=this.Ui*.85;if(!U)z=0;
this.AZ[0].value=$;this.AZ[1].value=z;var e=this.Yt;e.clearRect(0,0,100,100);$=Math.PI*$/180;z=b*(90-z)/90;
var k=this.Ui+.5;e.save();e.translate(k,k);e.rotate(-$);e.strokeStyle="rgba(0,0,0,0.5)";e.beginPath();
e.ellipse(0,0,b,b*j,0,0,2*Math.PI);if(i){e.moveTo(0,-b*j);e.lineTo(0,b*j);e.moveTo(-z,0)}else e.moveTo(0,0);
e.lineTo(z,0);e.stroke();var K=this.Ui*.15;e.fillStyle="black";e.beginPath();if(i){e.arc(0,-b*j,K*.66,0,2*Math.PI);
e.arc(0,b*j,K*.66,0,2*Math.PI)}if(U){e.arc(z,0,K*.4,0,2*Math.PI)}else{e.moveTo(k-K,-K*.66);e.lineTo(k,0);
e.lineTo(k-K,K*.66)}e.fill();e.restore();if(Q)this.CN()};iF.prototype.CN=function(x){var Q=parseInt(this.AZ[0].value);
if(isNaN(Q))Q=0;var c=parseInt(this.AZ[1].value);if(isNaN(c))c=0;Q=Q%360;c=c%360;this.U([Q,c]);this.T(new jO(u.E.t,!1))};
iF.prototype.VU=function(x){E.d3(window,this.vs);E.AU(window,this.RR);var Q=E.GK(x,this.GP),k=0,K=1e9;
Q.x-=this.Ui;Q.y-=this.Ui;var c=this.b,$=c[0]*Math.PI/180,z=(90-c[1])/90,j=c[2],U=this.Ui*.85,i=Math.sin(-$),b=Math.cos(-$),e=[new bC(b*U,i*U)];
if(this.aez)e.push(new bC(-i*U*j,b*U*j),new bC(i*U*j,-b*U*j));for(var F=0;F<e.length;F++){var g=bC.Xc(Q,e[F]);
if(g<K){K=g;k=F}}this._s=k;if(k==0)this.TA(x)};iF.prototype.TA=function(x){var Q=E.GK(x,this.GP),c=this._s,$=[],z=Q.x-this.Ui,j=Q.y-this.Ui,U=this.Ui*.85;
if(c==0){var i=180*Math.atan2(-j,z)/Math.PI,b=90-90*Math.min(1,Math.sqrt(z*z+j*j)/U);if(x.shiftKey)i=Math.round(i/15)*15;
$=[Math.round(i),Math.round(b)]}else $=[null,null,Math.max(.01,Math.min(1,Math.sqrt(z*z+j*j)/U))];this.U($);
this.T(new jO(u.E.t,!1))};iF.prototype.wY=function(x){this.T(new jO(u.E.t,!1));E.hY(window,this.vs);
E.Wr(window,this.RR)};function iS(x,Q){kw.call(this);this.wa=0;this.Yx=Q;this.n=E.p("span","fitem angleinput");
if(x){this._Q=E.p("label","flabel");this.Qi=x;this.n.appendChild(this._Q)}this.GP=E.p("canvas","gsicon");
this.Yt=this.GP.getContext("2d");E.qr(this.GP,Q,Q);this.n.appendChild(this.GP);E.J1(this.GP);E.KH(this.GP,this.VU.bind(this));
this.vs=this.TA.bind(this);this.RR=this.wY.bind(this);this.U(0)}iS.prototype=new kw;iS.prototype._=function(){if(this.Qi)this._Q.textContent=ah.get(this.Qi)+":"};
iS.prototype.UG=function(x){this._Q.textContent=x};iS.prototype.h=function(){return this.wa};iS.prototype.avf=function(x){var Q=this.wa,c=Math.floor(Q/3),$=Q-c*3;
$=Math.max(0,Math.min(2,$+x.x));c=Math.max(0,Math.min(2,c+x.y));this.U(c*3+$)};iS.prototype.U=function(x){this.wa=x;
var Q=this.GP.width,c=Math.floor(x/3),$=x-3*c,z=($+.5)*Q/3,j=(c+.5)*Q/3,U=this.Yt,i=[.5,Math.round(Q/3)+.5,Math.round(2*Q/3)+.5,Q-.5];
U.clearRect(0,0,Q,Q);var b=this.Yx<30;U.setLineDash([]);U.strokeStyle=b?"rgba(0,0,0,0.5)":"#000000";
U.beginPath();for(var F=0;F<4;F++){var e=i[F];U.moveTo(e,0);U.lineTo(e,Q);U.moveTo(0,e);U.lineTo(Q,e)}U.stroke();
if(x==9)return;if(!b){U.setLineDash([1,2]);var k=Q*.53,K=Math.max(0,Math.min(Q-k,z-k/2)),g=Math.max(0,Math.min(Q-k,j-k/2));
U.strokeRect(Math.round(K)+.5,Math.round(g)+.5,Math.round(k),Math.round(k))}U.fillStyle="#000000";U.beginPath();
U.arc(z,j,Q/8,0,Math.PI*2);U.fill()};iS.prototype.VU=function(x){E.d3(document.body,this.vs);E.AU(document.body,this.RR);
this.TA(x)};iS.prototype.TA=function(x){var Q=E.GK(x,this.GP),c=Math.max(0,Math.min(2,Math.floor(Q.x/(this.Yx/3)))),$=Math.max(0,Math.min(2,Math.floor(Q.y/(this.Yx/3))));
this.U($*3+c)};iS.prototype.wY=function(x){this.T(new jO(u.E.t,!1));E.hY(document.body,this.vs);E.Wr(document.body,this.RR)};
function gx(jF){kw.call(this);this.n=E.p("span","fitem cswatch");this.awF=0;this.ey=[];this.Aw=[];var x=this.adX.bind(this);
for(var F=0;F<jF;F++){this.ey.push(0);var Q=E.p("span","colorsample");Q.addEventListener("click",x,!1);
this.Aw.push(Q);this.n.appendChild(Q)}var c=[16711680,65280,255,65535,16711935,16776960,0,8421504,16777215],$=Math.min(jF,c.length);
for(var F=0;F<$;F++)this.ey[F]=c[F];this.Og()}gx.prototype=new kw;gx.prototype.adX=function(x){this.awF=this.Aw.indexOf(x.currentTarget);
this.T(new jO(u.E.t))};gx.prototype.h=function(){return this.ey[this.awF]};gx.prototype.U=function(x){var Q=this.ey,c=Q.indexOf(x);
if(c!=-1)Q.splice(c,1);else Q.pop();Q.unshift(x);this.Og()};gx.prototype.Og=function(){for(var F=0;F<this.ey.length;
F++){this.Aw[F].setAttribute("style","background-color:#"+d.vg(this.ey[F]))}};function hc(x){kw.call(this);
this.zf={Z:0,r:0,J:0};this.z4=x;this.n=E.p("span","fitem colorsample");this.n.addEventListener("click",this.WG.bind(this),!1)}hc.prototype=new kw;
hc.prototype._=function(){};hc.prototype.WG=function(x){var Q=this.zf;this.T(new jO("click"));var c=new jO(u.E.M,!0);
c.data={d:u.H.LL,AD:"colorpicker",aW:Math.round(Q.Z)<<16|Math.round(Q.r)<<8|Math.round(Q.J),_k:this.P_.bind(this),sh:this.z4};
this.T(c)};hc.prototype.P_=function(x){this.wC(x);this.T(new jO(u.E.t))};hc.prototype.Oc=function(){this.WG(null)};
hc.prototype.as=function(){var x=this.zf;return x.Z<<16|x.r<<8|x.J};hc.prototype.h=function(){return d.I.lV(this.zf)};
hc.prototype.wC=function(x){this.zf={Z:x>>16&255,r:x>>8&255,J:x&255};this.aek()};hc.prototype.U=function(x){this.zf=d.I.Du(x);
this.aek()};hc.prototype.aek=function(){var x=this.zf,Q=x.Z,c=x.r,$=x.J,z=Q<<16|c<<8|$;this.n.setAttribute("style","background-color:#"+d.vg(z))};
function an(){kw.call(this);this.La=!1;this.Ie=20;this.a8v=10;this.ko=0;this.La=!1;this.ug={Z:255,r:0,J:0};
this.$N={Z:0,r:0,J:0};this.n$=null;this.D9=null;this.n=E.p("canvas");this._I();E.J1(this.n);E.KH(this.n,this.Z_.bind(this))}an.prototype=new kw;
an.prototype.azz=function(x){if(this.La==x)return;this.La=x;this._I()};an.prototype._=function(){};an.prototype.avv=function(x,Q){function c($){return{Z:$>>16&255,r:$>>8&255,J:$&255}}if(x!=null)this.ug=c(x);
if(Q!=null)this.$N=c(Q);this._I()};an.prototype.aiM=function(x,Q){this.n$=x;this.D9=Q;this._I()};an.prototype.Z_=function(x){var Q=E.GK(x,this.n),c=Q.x*E.q_(),$=Q.y*E.q_(),z=this.Ie,j=this.a8v,U=0;
if(c<j&&$<j){U=0}else if(c>z-j&&$>z-j){U=1}else if(c<j){U=2}else{U=3}this.Oc(U)};an.prototype.Oc=function(x){var Q=this.n$,c=new jO(u.E.M,!0);
if(x>1){if(i9==0)c.data={d:u.H.hW,hF:ke.$s,Zq:x};else{var $={bf:1,WB:JSON.parse(JSON.stringify(Q.O1[1]))},z=JSON.parse(JSON.stringify(Q.T6)),j={bf:1,WB:JSON.parse(JSON.stringify(Q.D5[1]))};
if(x==2){$=aF.XT(z);aF.dz(z,Q.gd)}else{$.WB.Clr.v=d.I.lV({Z:255,r:255,J:255});j.WB.Clr.v=d.I.lV({Z:0,r:0,J:0});
aF.dz(z,j)}c.data={d:u.H.hW,hF:ke.u$,b:$};this.T(c);c.data={d:u.H.hW,hF:ke.Rc,b:z}}}else{this.ko=x;var U=null;
if(i9==0)U=x==0?this.ug:this.$N;else{var i=x==0?Q.O1:Q.D5;U=d.I.Du(i[1].Clr.v)}c.data={d:u.H.LL,AD:"colorpicker",aW:U.Z<<16|U.r<<8|U.J,_k:this.P_.bind(this)}}this.T(c)};
an.prototype.P_=function(x){var Q=new jO(u.E.M,!0),c=this.ko,$=this.n$;if(i9==0)Q.data={d:u.H.hW,hF:ke.$s,Zq:c,b:x};
else{var z={bf:1,WB:JSON.parse(JSON.stringify($.O1[1]))};z.WB.Clr.v=d.I.lV(d.RD(x));var j=JSON.parse(JSON.stringify($.T6));
aF.dz(j,z);if(c==1)z=j;Q.data={d:u.H.hW,hF:c==0?ke.u$:ke.Rc,b:z}}this.T(Q)};an.prototype._I=function(){var x=this.n,Q=x.getContext("2d"),c=E.q_(),z="#aaaaaa",j=.62;
E.qr(x,34,34);x.setAttribute("style",x.getAttribute("style")+";cursor:pointer");var $=this.Ie=x.width,U=this.a8v=Math.round($*j);
function i(I,f){var y=I.Z,Z=I.r,v=I.J;if(f)y=Z=v=Math.round(d.I5(y,Z,v));var G=y<<16|Z<<8|v;return"#"+d.vg(G)}function b(Q,K,I,f,y,Z){Q.beginPath();
if(f>=Z*2&&y>=Z*2){Q.moveTo(K+Z,I);Q.lineTo(K+f-Z,I);Q.quadraticCurveTo(K+f,I,K+f,I+Z);Q.lineTo(K+f,I+y-Z);
Q.quadraticCurveTo(K+f,I+y,K+f-Z,I+y);Q.lineTo(K+Z,I+y);Q.quadraticCurveTo(K,I+y,K,I+y-Z);Q.lineTo(K,I+Z);
Q.quadraticCurveTo(K,I,K+Z,I)}Q.closePath()}function e(K,I,U,f,y){Q.strokeStyle=y?y:"black";Q.fillStyle=f;
b(Q,K+.5,I+.5,U-1,U-1,U*.2);Q.fill();Q.stroke()}var k=this.n$;if(k){Q.beginPath();var K=$-U,g=Math.floor(U*.28),R=U-2*g;
eY.aE0(Q,k.xV.sf,this.D9,U,U,K,K);Q.lineWidth=1;Q.strokeStyle="white";Q.clearRect(K+g,K+g,R,R);Q.strokeRect(K+g+.5,K+g+.5,R-1,R-1);
Q.strokeRect(K+.5,K+.5,U-1,U-1);eY.aE0(Q,k.xV.aA,this.D9,U,U,0,0);Q.lineWidth=1;Q.strokeStyle="white";
Q.strokeRect(.5,.5,U-1,U-1)}else{e($-U,$-U,U,i(this.$N,this.La));e(0,0,U,i(this.ug,this.La))}var T=$-U,D=Math.round(T*j);
e($-D,T-D,D,i9==0?"white":"black",z);e($-T,0,D,i9==0?"black":"white",z);Q.save();Q.fillStyle=z;Q.translate(0,$);
Q.rotate(-Math.PI/2);T=$-U;var a=Math.round(T*.28),_=Math.round(T*.25);for(var F=0;F<2;F++){Q.fillRect(a,a,T-a,1);
Q.beginPath();Q.moveTo(T-_,a+.5-_);Q.lineTo(T,a+.5);Q.lineTo(T-_,a+.5+_);Q.closePath();Q.fill();Q.transform(0,1,1,0,0,0)}Q.restore()};
function aJ(x){h0.call(this,x,!1,"brushbutton nopadding",19*13,10*13,ke.gN,!0);var Q=this.a2O;E.ZW(Q,"flexrow");
var c=E.p("div");Q.appendChild(c);var $=E.p("div");Q.appendChild($);$.setAttribute("style","margin-left:8px");
this.qn=new iF(null,null,!0);this.qn.k(u.E.t,this.AN,this);c.appendChild(this.qn.n);this.Fk=new bv([12,14,0],1,1e3," px",0,!0);
this.Fk.k(u.E.t,this.AN,this);$.appendChild(this.Fk.n);this.In=new bv([12,17],0,100,"%");this.In.k(u.E.t,this.AN,this);
$.appendChild(this.In.n);this.y9=new cT(null,["<img src=\""+PIMG.prsO+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.prsS+"\" class=\"autoscale gsicon\" />"],!0,[[15,9,0],[15,9,1]]);
this.y9.k(u.E.t,this.AN,this);$.appendChild(this.y9.n)}aJ.prototype=new h0;aJ.prototype.JI=function(){var x=["pencil","trees"];
for(var F=0;F<x.length;F++)x[F]="brushes/"+x[F]+".abr";return x};aJ.prototype.U=function(x,Q,c){this.oB=JSON.parse(JSON.stringify(x));
var $=Math.floor(20*E.q_()),z=Math.floor(36*E.q_()),j=Math.floor(24*E.q_()),U=cG.Zh(x,Q,c,$,j,z);this.dr.setAttribute("src",U);
E.qJ(this.dr,z,j);var i=x.Brsh.v;this.Fk.U(i.Dmtr.v.val);if(i.Hrdn!=null){this.In.bJ();this.In.U(i.Hrdn.v.val)}else this.In.hp();
if(i.Angl!=null)this.qn.U([i.Angl.v.val]);if(i.Rndn!=null)this.qn.U([null,null,i.Rndn.v.val/100]);var b=[!1,!1];
if(x.opVr)b[0]=x.opVr.v.bVTy.v==2;if(x.szVr)b[1]=x.szVr.v.bVTy.v==2;this.y9.U(b)};aJ.prototype.lj=function(){return{list:[{t:"Objc",v:this.h()}],Dq:[],Rk:[]}};
aJ.prototype.h=function(){return this.oB};aJ.prototype.__=function(){if(!this.Va)return;var x=[],Q=[],c=this.CQ,$=Math.floor(33*E.q_()),z=Math.floor(40*E.q_());
for(var F=0;F<c.list.length;F++){var j=c.list[F].v,U=cG.Zh(j,c.Dq,c.Rk,$,z);x.push(U);Q.push(j.Nm.v)}this.uI.SY(x,Q,$,z);
this.Va=!1};aJ.prototype.DC=function(x){var Q=this.CQ;this.U(Q.list[this.uI.h()[0]].v,Q.Dq,Q.Rk);this.T(new jO(u.E.t))};
aJ.prototype._=function(){h0.prototype._.call(this);this.qn._();this.Fk._();this.In._()};aJ.prototype.AN=function(x){var Q=this.CQ,c=this.oB,$=c.Brsh.v;
$.Dmtr.v.val=this.Fk.h();if($.Hrdn!=null)$.Hrdn.v.val=this.In.h();if($.Angl!=null)$.Angl.v.val=this.qn.h()[0];
if($.Rndn!=null)$.Rndn.v.val=Math.round(this.qn.h()[2]*100);if(x.target==this.y9)d1.ahN(c,this.y9.h());
this.U(c,Q.Dq,Q.Rk);this.T(new jO(u.E.t))};function db(x){h0.call(this,x,!0,"contourbutton",17*13,10.5*13,ke.qY)}db.prototype=new h0;
db.prototype.DC=function(x){this.U(this.CQ[x.target.h()]);this.T(new jO(u.E.t))};db.prototype.EN=function(x){var Q=new jO(u.E.M,!0);
Q.data={d:u.H.LL,AD:"contoureditor",yY:this.oB,response:this.aw7.bind(this)};this.T(Q)};db.prototype.aw7=function(x){this.U(x);
this.T(new jO(u.E.t))};db.prototype.__=function(){if(!this.Va)return;var x=Math.floor(38*E.q_()),Q=Math.floor(38*E.q_()),c=[],$=[],z=this.CQ;
for(var F=0;F<z.length;F++){$.push(z[F].Nm?z[F].Nm.v:"");c.push(d.eu.Zh(z[F].Crv.v,x,Q))}this.uI.SY(c,$,x,Q);
this.Va=!1};db.prototype.U=function(x){this.oB=JSON.parse(JSON.stringify(x));var Q=this.oB.Crv.v;for(var F=0;
F<Q.length;F++)if(Q[F].v.Cnty==null)Q[F].v.Cnty={t:"bool",v:!0};this.HG()};db.prototype.HG=function(){var x=Math.floor(30*E.q_()),Q=Math.floor(30*E.q_()),c=d.eu.Zh(this.oB.Crv.v,x,Q);
this.dr.setAttribute("src",c);E.qJ(this.dr,x,Q)};db.prototype.h=function(){return JSON.parse(JSON.stringify(this.oB))};
function eY(x){kw.call(this);this.Cr=null;this.n$=null;this.Sf=null;this.Co=null;this.ato=[];this.arD=[];
this.n=E.p("span","fitem fillbutton");this.CU=new kw;this.CU.n=E.p("div","floatcont form");this.CU.n.setAttribute("style","width: 21em;");
this.CU.parent=this;this.A4=x;this._Q=this._Q=E.p("label","flabel");this.n.appendChild(this._Q);this.GP=E.p("canvas");
this.Yt=this.GP.getContext("2d");this.a6C=null;this.n.appendChild(this.GP);E.KH(this.GP,this.S$.bind(this));
this.VX=new c_([12,66],["","Color","Grad","Patt"]);this.CU.n.appendChild(this.VX.n);this.VX.k(u.E.t,this.G1,this);
this.CU.n.appendChild(E.p("hr"));this.afY=E.p("span");this.UC=new hc(!1);this.UC.parent=this.CU;this.UC.k(u.E.t,this.G1,this);
this.IR=new gx(10);this.IR.k(u.E.t,this.G1,this);this.Gs=E.p("div","marged hiline");this.Gs.appendChild(this.UC.n);
E._X(this.Gs);this.Gs.appendChild(this.IR.n);this.Cp=new kI("GrFl",!0);this.Cp.parent=this.CU;this.Cp.k(u.E.t,this.G1,this);
this.OU=E.p("div","marged hiline");var Q="Grad Type Algn Angl Rvrs Scl Ofst".split(" ");for(var F=0;
F<Q.length;F++){var c=this.Cp.no[Q[F]].n;this.OU.appendChild(c)}this.ya=new kI("patternFill",!0);this.ya.parent=this.CU;
this.ya.k(u.E.t,this.G1,this);this.HF=E.p("div","marged hiline");var Q=["Ptrn","Angl","Scl","Algn","phase"];
for(var F=0;F<Q.length;F++){var c=this.ya.no[Q[F]].n;this.HF.appendChild(c)}}eY.prototype=new kw;eY.prototype.Fy=function(x,Q){var c=dx.sc(x,Q);
if(c!=null)this.IR.U(c);if(Q==ke.qL){this.ato=[];this.arD=[];if(this.Cr)this.U(this.Sf,this.h(),this.Cr)}this.n$=x;
this.Cp.Fy(x,Q);this.ya.Fy(x,Q)};eY.prototype._=function(){this._Q.textContent=ah.get(this.A4)+": ";
this.VX._();this.UC._();this.Cp._();this.ya._()};eY.prototype.G1=function(x){var Q=x.currentTarget;if(Q==this.VX){var c=this.VX.h(),$={bf:c,WB:this.Cr[c]};
if(c>0&&$.WB==null)$.WB=JSON.parse(JSON.stringify(aF.Y3[c-1]));if(this.Cr)this.U(this.Sf,$,this.Cr)}if(Q==this.IR)this.UC.wC(Q.h());
this.T(new jO(u.E.t,!1))};eY.prototype.S$=function(x){if(E.rm(this.CU.n))return;x.stopPropagation();
var Q=this.GP.getBoundingClientRect(),c=new jO(u.E.M,!0);c.data={d:u.H.A_,G7:this.CU,x:Q.left,y:Q.top+Q.height+4};
this.T(c)};eY.prototype.U=function(x,Q,c){this.Cr=c;this.Sf=x;var $=[[13,1,0],[13,0],[12,37],[12,62]],z=this.ato,j=this.arD,U=!1,k;
for(var F=0;F<4;F++){var i={bf:F,WB:c[F]},b=eY.a2_(i);if(j[F]==b)continue;U=!0;var e=eY.a7i(null,i,this.n$,this.Sf,22,22,!1);
z[F]="<img width=\"22\" height=\"22\" src=\""+e+"\" />";j[F]=b}if(U)this.VX.yJ(z,$);this.VX.U(Q.bf);
var b=eY.a2_(Q);if(b!=this.a6C)eY.a7i(this.Yt,Q,this.n$,this.Sf,30,23,!0);this.a6C=b;var K=Q.bf;if(K==0){k=this.afY}if(K==1){this.UC.U(Q.WB.Clr.v);
k=this.Gs}if(K==2){this.Cp.update(x,Q.WB);k=this.OU}if(K==3){this.ya.update(x,Q.WB);k=this.HF}if(k!=this.Co){if(this.Co!=null){this.CU.n.removeChild(this.Co)}this.CU.n.appendChild(k);
this.Co=k}};eY.prototype.h=function(){var x={bf:this.VX.h()};if(x.bf==1){x.WB=JSON.parse(JSON.stringify(aF.Y3[0]));
x.WB.Clr.v=this.UC.h()}if(x.bf==2){x.WB=this.Cp.h()}if(x.bf==3){x.WB=this.ya.h()}return x};eY.a2_=function(x){var Q=x.bf,c=x.WB,$="empty";
if(Q==1){$=d.I.Du(c.Clr.v);$=$.Z+","+$.r+","+$.J}if(Q==2)$=JSON.stringify(c.Grad.v);if(Q==3)$=c.Ptrn.v.Idnt.v;
return $};eY.a7i=function(x,Q,c,$,z,j,U){if(x==null)x=eY.Yt;var i=Math.floor(z*E.q_()),b=Math.floor(j*E.q_()),e=x.canvas;
e.width=i;e.height=b;E.qJ(e,i,b);eY.aun(x,Q,c,$,i,b);if(U){x.beginPath();x.strokeStyle="#000000";x.fillStyle="#ffffff";
x.lineWidth=2;var k=i*.7,K=Math.floor(b*.7),g=7*E.q_();x.moveTo(k,K);x.lineTo(k+g,K);x.lineTo(k+g/2,K+g/2);
x.closePath();x.stroke();x.fill()}if(x==eY.Yt)return e.toDataURL()};eY.Yt=E.p("canvas").getContext("2d");
eY.aun=function(x,Q,c,$,z,j,U,i){if(U==null)U=0;if(i==null)i=0;var b=Q.bf;if(b==0){x.fillStyle="#ffffff";
x.fillRect(U,i,z,j);x.strokeStyle="#ff0000";x.lineWidth=2;x.moveTo(U,i);x.lineTo(U+z,i+j);x.moveTo(U,i+j);
x.lineTo(U+z,i);x.stroke()}if(b==1){var e=Q.WB.Clr.v;e=d.I.Du(e);x.fillStyle="#"+d.vg(e.Z<<16|e.r<<8|e.J);
x.fillRect(U,i,z,j)}if(b==2){var k=X._q.Zh(Q.WB.Grad.v,z,j,0,c.Gj,c.QI,!0);x.putImageData(k,U,i)}if(b==3){var K=Q.WB.Ptrn.v,g;
if($!=null)g=en.yr(K,$.add.Patt);if(g==null)g=en.yr(K,c.Yf);bh.Zh(g,z,j,x.canvas)}};eY.aE0=function(x,Q,c,$,z,j,U){function i(R,T){return CSS.Au({Z:R[0]*255,r:R[1]*255,J:R[2]*255},T)}if(Q==null){x.fillStyle="#ffffff";
x.fillRect(j,U,$,z);x.strokeStyle="#ff0000";x.lineWidth=2;x.moveTo(j,U);x.lineTo(j+$,U+z);x.moveTo(j,U+z);
x.lineTo(j+$,U);x.stroke()}else if(Q.length==3){x.fillStyle=i(Q);x.fillRect(j,U,$,z)}else if(Q.length==4){var b=j+$/2,e=U+z/2,k=Q[0]==0?x.createLinearGradient(j,U,j+$,U):x.createRadialGradient(b,e,0,b,e,$/2),K=Q[1];
for(var F=0;F<K.length;F++)k.addColorStop(K[F][0],i(K[F][1],K[F][2]));x.fillStyle=k;x.fillRect(j,U,$,z)}else if(Q.length==2){var g=c.IC[Q[0]];
x.save();x.fillStyle="white";x.fillRect(j,U,$,z);x.rect(j,U,$,z);x.scale($/g.m,z/g.e);x.fillStyle=g.aBt;
x.fill();x.restore()}};function bh(x){h0.call(this,x,!1,"patternbutton",18*13,10*13,ke.qL);this.pS=null}bh.prototype=new h0;
bh.prototype.DC=function(x){var Q=this.CQ[this.uI.h()];this.oB={classID:"Ptrn",Nm:{t:"TEXT",v:Q.name},Idnt:{t:"TEXT",v:Q.id}};
this.T(new jO(u.E.t));this.HG()};bh.prototype.__=function(){if(!this.Va)return;var x=this.CQ,Q=Math.floor(34*E.q_()),c=Math.floor(34*E.q_()),$=[],z=[];
for(var F=0;F<x.length;F++){$.push(bh.Zh(x[F],Q,c));z.push(x[F].name)}this.uI.SY($,z,Q,c);this.Va=!1};
bh.prototype.U=function(x,Q){if(this.oB&&x.Idnt.v==this.oB.Idnt.v)return;this.oB=JSON.parse(JSON.stringify(x));
this.HG(Q)};bh.prototype.h=function(){return JSON.parse(JSON.stringify(this.oB))};bh.prototype.lj=function(){return this.pS?[this.pS]:[]};
bh.prototype.HG=function(x){var Q=Math.floor(50*E.q_()),c=Math.floor(50*E.q_()),$;if(x!=null)$=en.yr(this.oB,x.add.Patt);
if($==null)$=en.yr(this.oB,this.CQ);this.pS=$;var z=bh.Zh($,Q,c);this.dr.setAttribute("src",z);E.qJ(this.dr,Q,c)};
bh.GP=E.p("canvas","");bh.Zh=function(x,Q,c,$){if($==null)$=bh.GP;var z=$.getContext("2d");$.width=Q;
$.height=c;if(x){var j=x.GD[1],U=j.m,i=j.e,b=x.GD[0],e=Math.min(Q/U,c/i),k=e;if(k*U<2)k=2/U;var K=e;
if(K*i<2)K=2/i;var g=X.Y.rN([b,j],new bI(k,0,0,K,0,0),k>2),R=g.rect.m,T=g.rect.e,D=z.createImageData(R,T);
d.SO(g.buffer,D.data);z.putImageData(D,Math.floor((Q-R)/2),Math.floor((c-T)/2))}return $.toDataURL()};
function jV(x,Q,c){if(Q==null)Q=24.2;if(c==null)c=17;h0.call(this,x,!1,"patternbutton",Q*13,c*13,ke.ZO);
this.jb=""}jV.prototype=new h0;jV.prototype.DC=function(x){this.oB=JSON.parse(JSON.stringify(this.CQ[0][this.uI.h()[0]]));
this.T(new jO(u.E.t))};jV.prototype.__=function(){var x=this.CQ;if(x==null||!this.Va)return;var Q=Math.floor(50*E.q_()),c=Math.floor(50*E.q_()),$=[],z=[];
for(var F=0;F<x[0].length;F++){$.push(jV.Zh(this.CQ[0][F].Ry,Q,c,this.CQ[1]));z.push(x[0][F].Uz.Nm.v.split("=").pop())}this.uI.SY($,z,Q,c);
this.Va=!1};jV.prototype.U=function(x,Q,c,$){var z=JSON.stringify(x.Ry)+","+c+","+$;if(this.jb!=z){this.jb=z;
this.oB=JSON.parse(JSON.stringify(x));this.HG(Q,c,$)}};jV.prototype.h=function(){return JSON.parse(JSON.stringify(this.oB))};
jV.prototype.HG=function(x,Q,c){var $=Math.floor(68*E.q_()),z=Math.floor(68*E.q_()),j=jV.Zh(this.oB.Ry,$,z,x?x:this.CQ[1],Q,c);
this.dr.setAttribute("src",j);E.qJ(this.dr,$,z)};jV.Zh=function(x,Q,c,$,z,j){var U=new hf;U.m=Q;U.e=c;
U.buffer=d.R(Q*c*4);U.add.Patt=$;U.tK(z==null?90:z);U.nx(j==null?30:j);var i=new gh(0,0,Math.round(Q*.5),Math.round(c*.5));
i.x=Math.round((Q-i.m)/2);i.y=Math.round((c-i.e)/2);var b=U.Xh();b.rect=i;b.buffer=d.R(i.P()*4);d.h4(b.buffer,4284045657);
en.awe(x,b,.5*100);U.B.push(b);U.jf();U.c();var e=eV.Mx;eV.Mx=!1;U.eB();var k=U.VY();eV.Mx=e;var K=ar.mL(k.buffer,U.m,U.e);
return K};function ct(x){h0.call(this,null,!1,"tpresetbutton",18*13,24*13,ke.Uf,!0);E.WP(this.n,"fitem");
this.uI.VW(1);this.id=x;this.HG();this.d.style.overflow="hidden";this.TO=new f2([15,7,9]);this.TO.U(!0);
this.TO.k(u.E.t,this.awT,this);this.tg.appendChild(this.TO.n)}ct.prototype=new h0;ct.prototype.aq7=function(x){if(this.id==x)return;
this.id=x;this.RN(this.CQ)};ct.prototype.DC=function(x){var Q=this.CQ[this.uI.h()],c=new jO(u.E.M,!0);
c.data={d:u.H.hW,_g:"set",hF:ke.Uf,jn:Q};this.T(c)};ct.prototype._=function(){h0.prototype._.call(this);
this.TO._()};ct.prototype.awT=function(){this.Va=!0;this.__()};ct.prototype.__=function(){if(!this.Va)return;
var x=Math.floor(16*E.q_()),Q=Math.floor(16*E.q_()),c=[],$=[],z=this.CQ,j=this.TO.h();for(var F=0;F<z.length;
F++){var U=X.GR[z[F][1].classID];if(!j||U==this.id){$.push(z[F][0]?z[F][0].split("=").pop():"");c.push(U==-1?"":PIMG[X.hH[U]])}else{c.push(null);
$.push(null)}}this.uI.SY(c,$,x,Q);this.Va=!1};ct.prototype.HG=function(){var x=this.dr;x.setAttribute("src",PIMG[X.hH[this.id]]);
E.ZW(x,"toolicon")};ct.prototype.lj=function(){return null};ct.xg={};ct.Zh=function(x,Q,c){var $=ct.Yt,z=ct.xg,j=d.vg(x.Z<<16|x.r<<8|x.J);
if(z[j])return z[j];if($==null){var U=E.p("canvas");$=ct.Yt=U.getContext("2d")}var U=$.canvas;U.width=Q;
U.height=c;$.fillStyle="#"+j;$.fillRect(0,0,Q,c);var i=z[j]=U.toDataURL();return i};function ii(x,Q,c){kw.call(this);
this.n=E.p("span","fitem curveeditor");this.wL=null;this.a7z=0;this.z$="";this.mode=0;this.J0=x;this.aeT=Q;
this.alj=c;this.td=null;this.C_=null;this.aax=0;this.auj=0;this.pJ=new bC;this.wW=this.TA.bind(this);
this.m7=this.wY.bind(this);this.Yx=256;this.GP=E.p("canvas");this.Yt=this.GP.getContext("2d");E.J1(this.GP);
this.n.appendChild(this.GP);this.oN(256,256);E.KH(this.GP,this.VU.bind(this));this.coords=E.p("div");
this.coords.setAttribute("style","width:250px");this.n.appendChild(this.coords);var $=this.Mr=c?100:255,z=null;
this.u8=new f0("X (in)",0,$,z,0,!1,!0);this.h5=new f0("Y (out)",0,$,z,0,!1,!0);this.lk=new f2([19,3,0]);
this.u8.k(u.E.t,this.rW,this);this.h5.k(u.E.t,this.rW,this);this.lk.k(u.E.t,this.rW,this);this.coords.appendChild(this.u8.n);
if(c)this.coords.appendChild(this.lk.n);this.coords.appendChild(this.h5.n)}ii.prototype=new kw;ii.prototype._=function(){this.lk._();
this.u8._();this.h5._()};ii.prototype.oN=function(x,Q){this.Yx=Math.round(x);this.Yt.resetTransform();
E.qr(this.GP,this.Yx,this.Yx,this.Yt);this.Yt.scale(this.Yx/256,this.Yx/256);if(this.td)this.Zi()};ii.prototype.rW=function(x){var F=this.aC7(),Q=this.td[F],c=255/this.Mr;
Q.v.Hrzn.v=this.u8.h()*c;Q.v.Vrtc.v=this.h5.h()*c;if(this.alj)Q.v.Cnty.v=this.lk.h();this.td.sort(function($,z){return $.v.Hrzn.v-z.v.Hrzn.v});
this.Zi();this.T(new jO(u.E.t))};ii.prototype.U=function(x,F){var Q=JSON.stringify(x);if(Q==JSON.stringify(this.td))return;
this.mode=x.length==256?1:0;this.td=JSON.parse(Q);if(F!=null)this.C_=this.td[F];this.Zi()};ii.prototype.HJ=function(x,Q,c){this.wL=x;
this.a7z=Q;this.z$=c;this.Zi()};ii.prototype.h=function(){return JSON.parse(JSON.stringify(this.td))};
ii.prototype.aC7=function(){return this.td.indexOf(this.C_)};ii.prototype.VU=function(x){var Q=256/this.Yx,c=E.GK(x,this.GP);
c.x*=Q;c.y*=Q;var $=c.x,z=256-c.y;if(this.J0){var j=$;$=256-z;z=j}this.pJ.r$($,z);if(this.mode==0){var U=0,i=1e9,g;
for(var F=0;F<this.td.length;F++){var b=this.td[F].v,e=b.Hrzn.v-$,k=b.Vrtc.v-z,K=Math.sqrt(e*e+k*k);
if(K<i){i=K;U=F}}if(i<15)g=this.td[U];else{g=d.eu.UW($,z,!0);this.td.push(g);this.td.sort(function(R,T){return R.v.Hrzn.v-T.v.Hrzn.v})}this.C_=g;
this.auj=this.td.slice(0)}E.d3(document.body,this.wW);E.AU(document.body,this.m7);this.TA(x)};ii.prototype.TA=function(x){var Q=256/this.Yx,c=E.GK(x,this.GP);
c.x*=Q;c.y*=Q;var $=c.x,z=256-c.y;if(this.J0){var j=$;$=256-z;z=j}if(this.mode==0){var U=this.td,i=this.C_,b=this.auj,e=b.indexOf(i),k=U.indexOf(i)!=-1,K=b.length-1,g=$;
if(e==0){g=Math.max(0,Math.min(b[1].v.Hrzn.v-1,$))}else if(e==K){g=Math.min(255,Math.max(b[K-1].v.Hrzn.v+1,$))}else{var R=$<0||$>255||z<0||z>255;
if($<=b[e-1].v.Hrzn.v||$>=b[e+1].v.Hrzn.v)R=!0;if(!R&&!k)U.splice(e,0,i);if(R&&k)U.splice(e,1)}if(this.aeT&&(e==0||e==b.length-1)){}else i.v.Hrzn.v=Math.round(g);
i.v.Vrtc.v=Math.max(0,Math.min(255,Math.round(z)))}else{$=Math.round($);z=Math.round(z);$=Math.max(0,Math.min(255,$));
z=Math.max(0,Math.min(255,z));var T=this.pJ.x,D=$,a=this.pJ.y,_=z;if($<this.pJ.x){D=T;T=$;_=a;a=z}this.td[$]=z;
if(T!=D)for(var I=T;I<=D;I++)this.td[I]=Math.round(a+(I-T)*(_-a)/(D-T))}this.pJ.r$($,z);this.Zi();this.T(new jO(u.E.t))};
ii.prototype.wY=function(x){E.hY(document.body,this.wW);E.Wr(document.body,this.m7);this.T(new jO(u.E.t))};
ii.prototype.Zi=function(){var x=this.Yt,Q=this.GP;x.fillStyle="#ffffff";x.fillRect(0,0,256,256);var c=256/Q.width;
if(this.wL){x.save();x.translate(0,256);x.scale(1,-1);jh.ar_(x,this.wL,5700/this.a7z,this.z$);x.restore()}x.strokeStyle="#aaaaaa";
x.lineWidth=1*c;x.beginPath();for(var F=1;F<4;F++){var $=(Math.floor(64*F/c)+.5)*c;x.moveTo(0,$);x.lineTo(255,$);
x.moveTo($,0);x.lineTo($,255)}x.stroke();if(this.J0){x.save();x.transform(0,1,-1,0,256,0)}if(this.mode==0){var z=this.td,j=d.eu.WN(z,256);
x.strokeStyle="#000000";x.beginPath();x.moveTo(0,255.5-j[0]);for(var F=0;F<256;F++)x.lineTo(F,255.5-j[F]);
x.stroke();x.lineWidth=2*c;for(var F=0;F<z.length;F++){var U=z[F].v;x.fillStyle=this.C_==z[F]?"#333":"#fff";
x.beginPath();x.moveTo(U.Hrzn.v,255.5-U.Vrtc.v);x.arc(U.Hrzn.v,255.5-U.Vrtc.v,5*c,0,2*Math.PI);x.stroke();
x.fill()}}else{var j=this.td;x.strokeStyle="#000000";x.beginPath();x.moveTo(0,255.5-j[0]);for(var F=0;
F<256;F++)x.lineTo(F,255.5-j[F]);x.stroke()}if(this.J0)x.restore();var F=this.aC7();this.coords.className=F==-1?"disabled":"";
if(F==-1)return;var U=this.td[F].v,i=255/this.Mr;this.u8.U(Math.round(U.Hrzn.v/i));this.h5.U(Math.round(U.Vrtc.v/i));
if(U.Cnty)this.lk.U(U.Cnty.v)};function jh(x,Q){kw.call(this);this.n=E.p("span","");this.fl=new c7([12,4],["RGB",[13,1,1],[13,1,4],[13,1,5],[12,82]]);
this.fl.k(u.E.t,this._I,this);this.n.appendChild(this.fl.n);E._X(this.n);var c=E.p("div");this.n.appendChild(c);
c.setAttribute("style","background-color: var(--bg-canvas); margin:6px 0;");this.GP=E.p("canvas");var $=this.GP;
c.appendChild($);$.width=Math.round(x*E.q_());$.height=Math.round(100*E.q_());E.qJ($,$.width,$.height);
$.style.display="block";this.Yt=$.getContext("2d");this.wL=null;this.x2=0;this.a1K=null;this.ajc=[];
this.Ih=[];var z=["Mean:","Pixels:"],j=this.n;if(Q)for(var F=0;F<z.length;F++){var U=new jz(z[F]);this.ajc.push(U);
j.appendChild(U.n);var i=new jz("hi");this.Ih.push(i);j.appendChild(i.n);E._X(j)}}jh.prototype=new kw;
jh.prototype._=function(){this.fl._()};jh.prototype.VW=function(x){this.fl.U(x);this._I()};jh.prototype.U=function(x,Q){this.wL=x;
this.a1K=Q;this._I()};jh.prototype.wC=function(x){if(x==this.x2)return;this.x2=x;this._I()};jh.prototype._I=function(){if(this.wL==null)return;
var x=this.GP,Q=this.Yt,c=this.wL,$=this.a1K,z=this.fl.h(),j=6e3/c[4],U="#"+d.vg(this.x2),i=jh.ar_;x.width=x.width;
Q.setTransform(x.width/256,0,0,-x.height/100,0,x.height);Q.globalCompositeOperation="lighter";if(z==0)i(Q,c[0],j/3,U);
else if(z<4)i(Q,c[z],j,U);else{i(Q,c[1],j,"#ff0000");i(Q,c[2],j,"#00ff00");i(Q,c[3],j,"#0000ff")}Q.setTransform(1,0,0,1,0,0);
if($!=null){if(z==4)z=0;var b=0;for(var F=0;F<256;F++)b+=F*c[z][F];if(z==0)b/=3;this.Ih[0].U((b/$).toFixed(1)+"");
this.Ih[1].U($+"")}};jh.ar_=function(x,Q,c,$){x.beginPath();x.moveTo(0,0);for(var z=0;z<256;z++)x.lineTo(z,Q[z]*c);
x.lineTo(256,0);x.closePath();x.fillStyle=$;x.fill()};function jl(x,Q){kw.call(this);this.Fo={Z:0,r:0,J:0};
if(Math.abs(x-256/E.q_())<10)x=256/E.q_();var c=this.n=E.p("div","flexrow");c.style.position="relative";
var $=this.arH=E.p("div");c.appendChild($);this.On=new bC;this.vi=new bC;this.vs=this.hm.bind(this);
this.RR=this.axS.bind(this);this.GP=E.p("canvas","");this.Yt=this.GP.getContext("2d");this.GP.width=this.GP.height=256;
this.a9F=this.Yt.getImageData(0,0,256,256);this.a4j=-1;this.aAt="";this.G$=null;E.J1(this.GP);E.KH(this.GP,this.apu.bind(this));
$.appendChild(this.GP);this.ac6=this.ack.bind(this);this.a2X=this.aie.bind(this);this.Jy=E.p("canvas","");
this.n2=this.Jy.getContext("2d");this.Jy.width=20;this.Jy.height=256;this.aCB=this.n2.getImageData(0,0,20,256);
jl.a5E(this.aCB.data,20,256);E.J1(this.Jy);E.KH(this.Jy,this.au8.bind(this));c.appendChild(this.Jy);
this.GP.setAttribute("style","width:"+x+"px; height:"+x+"px");this.Jy.setAttribute("style","width:16px; height:"+x+"px");
this.pr=new f2("Web Colors\u2001");this.pr.k(u.E.t,this.update,this);this.ym=new f2("CMYK gamut");this.ym.k(u.E.t,this.update,this);
if(Q){E._X($);$.appendChild(this.pr.n);$.appendChild(this.ym.n)}var z=this.Nv=document.createElementNS("http://www.w3.org/2000/svg","svg");
c.appendChild(z)}jl.prototype=new kw;jl.prototype.oN=function(x,Q){this.GP.style.width=this.arH.style.width=x-16+"px"};
jl.prototype.U=function(x){if(this.pr.h()){var Q=JSON.parse(JSON.stringify(x));jl.TY(Q);var c=this.h();
if(Q.Z==c.Z&&Q.r==c.r&&Q.J==c.J)x=this.Fo}this.Fo=x;this.update()};jl.prototype.h=function(){var x=JSON.parse(JSON.stringify(this.Fo));
if(this.pr.h())jl.TY(x);return x};jl.prototype.update=function(){var x=this.Fo,Q=d.a$(x.Z,x.r,x.J),i=18;
if(Q._B==0)Q.ks=this.On.x/255;if(Q.ks==0||Q._B==0)Q.R0=(255-this.H9(this.vi.y))/255;if(Q._B!=0)this.On.x=Q.ks*255;
this.On.y=(1-Q._B)*255;this.vi.y=(1-Q.R0)*255;var c=this.a9F,$=this.pr.h(),z=this.ym.h(),j=$+","+z;if(Math.abs(Q.R0-this.a4j)>.002||this.aAt!=j){this.acy(c.data,256,256,Q.R0,$,z);
this.ale();this.a4j=Q.R0;this.aAt=j}var U=this.Yt;U.putImageData(c,0,0);c=this.aCB;U=this.n2;U.putImageData(c,0,0);
U.strokeStyle="#ffffff";U.beginPath();U.moveTo(0,this.vi.y);U.lineTo(20,this.vi.y);U.lineWidth=2;U.stroke();
var b=this.On.y/255,e=parseFloat(this.GP.style.width),k=parseFloat(this.GP.style.height),K=this.Nv;K.setAttribute("width",i);
K.setAttribute("height",i);var g=Math.round(x.Z*255)<<16|Math.round(x.r*255)<<8|Math.round(x.J*255),R="<circle cx=\""+i/2+"\" cy=\""+i/2+"\" r=\""+i/2+"\" fill=\"#"+d.vg(g)+"\"></circle>";
R+="<circle cx=\""+i/2+"\" cy=\""+i/2+"\" r=\""+(-.5+i/2)+"\" fill=\"none\" stroke=\"rgba(255,255,255,"+(.5-.2*b)+")\" stroke-width=\"1\"></circle>";
R+="<circle cx=\""+i/2+"\" cy=\""+i/2+"\" r=\""+(-1.2+i/2)+"\" fill=\"none\" stroke=\"rgba(0,0,0,0.07)\" stroke-width=\"0.4\"></circle>";
K.innerHTML=R;K.style.pointerEvents="none";K.style.filter="drop-shadow(0px 3px 2px rgba(0,0,0,0.4)";
K.style.position="absolute";K.style.left=e*(this.On.x/255)-i/2+"px";K.style.top=k*(this.On.y/255)-i/2+"px"};
jl.TY=function(x){x.Z=~~(.5+x.Z*5)*.2;x.r=~~(.5+x.r*5)*.2;x.J=~~(.5+x.J*5)*.2};jl.prototype.acy=function(x,Q,c,$,z,j){var U=1/Q,i=1/c;
for(var b=0;b<c;b++)for(var e=0;e<Q;e++){var k=d.Us($,e*U,(c-b-1)*i);if(z)jl.TY(k);var F=b*Q+e<<2;x[F+0]=~~(k.Z*255);
x[F+1]=~~(k.r*255);x[F+2]=~~(k.J*255);x[F+3]=255}if(j){var K=x.slice(0),g=d.N0("rgbToRgbC"),R=g[2],T=g[3];
ICC.U.applyLUT(T,R,K,K);this.G$=d.R(Q*c);for(var F=0;F<x.length;F+=4){var D=x[F]-K[F],a=x[F+1]-K[F+1],_=x[F+2]-K[F+2],I=D*D+a*a+_*_;
if(I>300){x[F]=x[F+1]=x[F+2]=200;this.G$[F>>>2]=255}}}};jl.a5E=function(x,Q,c,$,z){if($==null)$=1;if(z==null)z=0;
var j=new Uint32Array(x.buffer);for(var U=0;U<c;U++){var i=d.Us((1+$*(1-U/c)+z)%1,1,1),b=255<<24|i.J*255<<16|i.r*255<<8|i.Z*255;
for(var e=0;e<Q;e++)j[U*Q+e]=b}};jl.prototype.apu=function(x){E.d3(window,this.vs);E.AU(window,this.RR);
this.hm(x);this.Nv.style.transition="transform 150ms cubic-bezier(.4,2.2,.6,.5)";this.Nv.style.transform="scale(2.4)"};
jl.prototype.axS=function(x){E.hY(window,this.vs);E.Wr(window,this.RR);this.Nv.style.transition="transform 200ms cubic-bezier(.4,2.2,.6,.5)";
this.Nv.style.transform="scale(1)"};jl.prototype.hm=function(x){var Q=E.GK(x,this.GP);Q.x=Q.x*(256/parseFloat(this.GP.style.width));
Q.y=Q.y*(256/parseFloat(this.GP.style.height));this.On.r$(this.H9(Q.x),this.H9(Q.y));this.ale();this.Z9()};
jl.prototype.ale=function(){if(!this.ym.h())return;var x=this.On,Q=0,c=0,$=1e9;for(var z=0;z<256;z++){for(var j=0;
j<256;j++){if(this.G$[z*256+j]==255)continue;var U=j-x.x,i=z-x.y,b=U*U+i*i;if(b<$){Q=j;c=z;$=b}}}x.x=Q;
x.y=c};jl.prototype.Z9=function(){this.Fo=this.ahu();this.T(new jO(u.E.t))};jl.prototype.ahu=function(){var x=d.Us((255-this.H9(this.vi.y))/255,this.a_(this.On.x/255),this.a_(1-this.On.y/255));
return{Z:x.Z,r:x.r,J:x.J}};jl.prototype.au8=function(x){E.d3(window,this.ac6);E.AU(window,this.a2X);
this.ack(x)};jl.prototype.aie=function(x){E.hY(window,this.ac6);E.Wr(window,this.a2X)};jl.prototype.ack=function(x){var Q=E.GK(x,this.Jy);
Q.y=Q.y*(256/parseFloat(this.Jy.style.height));this.vi.r$(this.H9(Q.x),this.H9(Q.y));this.Z9()};jl.prototype.H9=function(x){return Math.max(0,Math.min(255,x))};
jl.prototype.a_=function(x){return Math.max(0,Math.min(1,x))};function az(x,Q,c,$){var z=c_.GV(Q,$);
c_.call(this,x,z,c)}az.prototype=new c_;function ed(){kw.call(this);this.B4=null;this.Gm=new a0;this.Gm.k(u.E.t,this.als,this);
this.Gm.parent=this;this.$I=new f0([12,14,0],1,150,"px",0,!0);this.$I.k(u.E.t,this.A3,this);this.$I.parent=this;
this.p1=new f0([16,0],.01,100,"px",2,!0,null,5);this.p1.k(u.E.t,this.A3,this);this.p1.parent=this;this.uO=new f2("Auto");
this.uO.k(u.E.t,this.A3,this);this.c3=new f0([16,1],-500,5e3,"%",0,!0);this.c3.k(u.E.t,this.A3,this);
this.c3.parent=this;this.PA=new f0("\u2B0D",1,300,"%",null,null,null,null,[[2,7],[22,4,3]]);this.PA.k(u.E.t,this.A3,this);
this.PA.parent=this;this.Vd=new f0("\u2B0C",1,300,"%",null,null,null,null,[[2,7],[22,4,2]]);this.Vd.k(u.E.t,this.A3,this);
this.Vd.parent=this;this.yQ=new f0([16,2],-10,10,"px");this.yQ.k(u.E.t,this.A3,this);this.yQ.parent=this;
this.zN=new hc(!0);this.zN.k(u.E.t,this.cT,this);this.zN.parent=this;this.Io=new hc(!0);this.Io.k(u.E.t,this.cT,this);
this.Io.parent=this;this.wO=new hc(!0);this.wO.k(u.E.t,this.cT,this);this.wO.parent=this;this.wF=new hc(!0);
this.wF.k(u.E.t,this.cT,this);this.wF.parent=this;this.A8=new f2([2,3]);this.A8.k(u.E.t,this.A3,this);
this.Sq=new f2([14,9]);this.Sq.k(u.E.t,this.A3,this);this.R1=new f2([12,46]);this.R1.k(u.E.t,this.A3,this);
this.U$=new j7("...",null,null,!0);this.U$.n.style.marginLeft="-8px";E.KH(this.U$.n,this.a1o.bind(this));
this.CU=new kw;var x=this.CU.n=E.p("div","floatcont form"),z=100;this.CU.parent=this;this.Y_=new f0([12,41],1,20,"px",0,!0,!0);
this.Y_.n.style.marginLeft="16px";this.Y_.k(u.E.t,this.A3,this);this.Y_.parent=this.CU;x.appendChild(this.Io.n);
x.appendChild(this.A8.n);E._X(this.CU.n);x.appendChild(this.wO.n);x.appendChild(this.Sq.n);x.appendChild(this.Y_.n);
E._X(this.CU.n);x.appendChild(this.wF.n);x.appendChild(this.R1.n);this.kK=new j7("<img src=\""+PIMG["type/bold"]+"\" class=\"autoscale gsicon\" />");
this.Uc=new j7("<img src=\""+PIMG["type/italic"]+"\" class=\"autoscale gsicon\" />");this.c1=new j7("<img src=\""+PIMG["type/caps"]+"\" class=\"autoscale gsicon\" />");
this.JH=new j7("<img src=\""+PIMG["type/scaps"]+"\" class=\"autoscale gsicon\" />");this.u6=new j7("<img src=\""+PIMG["type/sub"]+"\" class=\"autoscale gsicon\" />");
this.XV=new j7("<img src=\""+PIMG["type/sup"]+"\" class=\"autoscale gsicon\" />");this.HV=new j7("<img src=\""+PIMG["type/under"]+"\" class=\"autoscale gsicon\" />");
this.NR=new j7("<img src=\""+PIMG["type/strike"]+"\" class=\"autoscale gsicon\" />");var Q=[this.kK,this.Uc,this.c1,this.JH,this.u6,this.XV,this.HV,this.NR];
for(var F=0;F<Q.length;F++)Q[F].k("click",this.a7y,this);this.j2=new j7("<img src=\""+PIMG["par/left"]+"\" class=\"autoscale gsicon\" />");
this.Az=new j7("<img src=\""+PIMG["par/right"]+"\" class=\"autoscale gsicon\" />");this.NV=new j7("<img src=\""+PIMG["par/center"]+"\" class=\"autoscale gsicon\" />");
this.aE7=new j7("<img src=\""+PIMG["par/jleft"]+"\" class=\"autoscale gsicon\" />");this.a6K=new j7("<img src=\""+PIMG["par/jright"]+"\" class=\"autoscale gsicon\" />");
this.ae9=new j7("<img src=\""+PIMG["par/jcenter"]+"\" class=\"autoscale gsicon\" />");this.a95=new j7("<img src=\""+PIMG["par/jall"]+"\" class=\"autoscale gsicon\" />");
this._y=[this.j2,this.Az,this.NV,this.aE7,this.a6K,this.ae9,this.a95];for(var F=0;F<this._y.length;F++)this._y[F].k("click",this.A3,this);
var c=["lind","rind","flind","bind","aind"],$=[];for(var F=0;F<5;F++)$.push("<img src=\""+PIMG["par/"+c[F]]+"\" class=\"autoscale gsicon\" /> ");
this.I7=new f0($[0],-z,z,"px");this.Zf=new f0($[1],-z,z,"px");this.XF=new f0($[2],-z,z,"px");this.jl=new f0($[3],-z,z,"px");
this.uN=new f0($[4],-z,z,"px");this.ed=new c_([12,33],["Abc ...","... أي بي"]);this.FJ=new f0(["Auto VAR0",[16,0]],0,500,"%");
this.UQ=[this.I7,this.Zf,this.XF,this.jl,this.uN,this.ed,this.FJ];for(var F=0;F<this.UQ.length;F++){var j=this.UQ[F];
j.k(u.E.t,this.A3,this);j.parent=this}}ed.prototype=new kw;ed.prototype.a1o=function(x){if(E.rm(this.CU.n))return;
x.stopPropagation();var Q=this.U$.n.getBoundingClientRect(),c=new jO(u.E.M,!0);c.data={d:u.H.A_,G7:this.CU,x:Q.left,y:Q.top+Q.height+4};
this.T(c)};ed.prototype._=function(){this.Gm._();this.$I._();this.p1._();this.c3._();this.yQ._();this.PA._();
this.Vd._();this.A8._();this.Sq._();this.R1._();this.Y_._();for(var F=0;F<this.UQ.length;F++)this.UQ[F]._()};
ed.prototype.U=function(x,Q,c){this._M=JSON.parse(JSON.stringify(x));var $=this._M,z=$.VA,j=$.SW;this.kK.U(z.FauxBold!=null?z.FauxBold:!1);
this.Uc.U(z.FauxItalic!=null?z.FauxItalic:!1);this.c1.U(z.FontCaps==2);this.JH.U(z.FontCaps==1);this.XV.U(z.FontBaseline==1);
this.u6.U(z.FontBaseline==2);this.HV.U(z.Underline);this.NR.U(z.Strikethrough);this.Gm.U(z.Font==null?null:$._t[z.Font].Name,Q,c);
var U=z.FontSize==null?20:z.FontSize;this.$I.U(U);var i=z.Tracking;this.c3.U(i==null?0:i);this.Y_.U(z._LineWidth!=null?z._LineWidth:1);
this.p1.U(z.Leading!=null&&z.Leading!=0?z.Leading:U);this.uO.U(z.AutoLeading);this.PA.U((z.VerticalScale!=null?z.VerticalScale:0)*100);
this.Vd.U((z.HorizontalScale!=null?z.HorizontalScale:0)*100);this.yQ.U(z.BaselineShift!=null?z.BaselineShift:0);
this.A8.U(z.FillFlag!=null?z.FillFlag:!1);this.Sq.U(z.StrokeFlag!=null?z.StrokeFlag:!1);this.R1.U(z._FillBackgroundFlag!=null?z._FillBackgroundFlag:!1);
this.E4(z.FillColor,this.zN);this.E4(z.FillColor,this.Io);this.E4(z.StrokeColor,this.wO);this.E4(z._FillBackgroundColor,this.wF);
var b=j._Direction!=null?j._Direction:0,e=dU.mp(j);for(var F=0;F<this._y.length;F++)this._y[F].U(e==F);
this.ed.U(b);this.FJ.U((j.AutoLeading!=null?j.AutoLeading:1.2)*100);this.I7.U(j.StartIndent!=null?j.StartIndent:0);
this.Zf.U(j.EndIndent!=null?j.EndIndent:0);this.XF.U(j.FirstLineIndent!=null?j.FirstLineIndent:0);this.jl.U(j.SpaceBefore!=null?j.SpaceBefore:0);
this.uN.U(j.SpaceAfter!=null?j.SpaceAfter:0)};ed.prototype.E4=function(x,Q){if(x){var c=dU.Du(x);Q.wC(Math.round(c.Z)<<16|Math.round(c.r)<<8|Math.round(c.J))}else Q.wC(0)};
ed.prototype.bM=function(){var x=new jO(u.E.M,!0);x.data={d:u.H.hW,hF:ke.kg,_M:this._M};this.T(x);var x=new jO(u.E.v,!0);
x.f=X.gr;x.data={d:"updateStyles"};this.T(x)};ed.prototype.a7y=function(x){var Q=this._M.VA,c=x.target,$=!c.V$();
if(c==this.kK)Q.FauxBold=$;if(c==this.Uc)Q.FauxItalic=$;if(c==this.c1)Q.FontCaps=$?2:0;if(c==this.JH)Q.FontCaps=$?1:0;
if(c==this.XV)Q.FontBaseline=$?1:0;if(c==this.u6)Q.FontBaseline=$?2:0;if(c==this.HV)Q.Underline=$;if(c==this.NR)Q.Strikethrough=$;
this.bM()};ed.prototype.A3=function(x){var Q=this._M.VA,c=this._M.SW,$=x.target;if($==this.c3){var z=this.c3.h();
Q.Tracking=z}if($==this.p1){Q.AutoLeading=!1;Q.Leading=this.p1.h()}if($==this.uO){Q.AutoLeading=this.uO.h()}if($==this.Y_)Q._LineWidth=$.h();
if($==this.$I)Q.FontSize=$.h();if($==this.PA)Q.VerticalScale=$.h()/100;if($==this.Vd)Q.HorizontalScale=$.h()/100;
if($==this.yQ)Q.BaselineShift=$.h();if($==this.A8)Q.FillFlag=$.h();if($==this.Sq)Q.StrokeFlag=$.h();
if($==this.R1)Q._FillBackgroundFlag=$.h();if(this._y.indexOf($)!=-1){c.Justification=dU.mp(c,this._y.indexOf($))}if($==this.I7)c.StartIndent=$.h();
if($==this.Zf)c.EndIndent=$.h();if($==this.XF)c.FirstLineIndent=$.h();if($==this.jl)c.SpaceBefore=$.h();
if($==this.uN)c.SpaceAfter=$.h();if($==this.ed)c._Direction=$.h();if($==this.FJ)c.AutoLeading=$.h()/100;
this.bM()};ed.prototype.als=function(x){var Q=this._M,c=this.Gm.h(),$=-1;for(var F=0;F<Q._t.length;F++)if(Q._t[F].Name==c)$=F;
if($==-1){$=Q._t.length;var z=JSON.parse(JSON.stringify(Q._t[0]));z.Name=c;Q._t.splice($,0,z)}Q.VA.Font=$;
this.bM()};ed.prototype.cT=function(x){var Q=x.target,c=Q.as(),$={Type:1,Values:[1,(c>>16&255)/255,(c>>8&255)/255,(c>>0&255)/255]};
for(var F=0;F<4;F++)$.Values[F]=Math.round($.Values[F]*1e3)/1e3;var z=Q==this.zN||Q==this.Io?0:Q==this.wO?1:2;
this._M.VA[["FillColor","StrokeColor","_FillBackgroundColor"][z]]=$;this.bM()};function a0(){kw.call(this);
this.n=E.p("span","fontinput");this.jv=null;this.O_=null;this.BJ=null;this.$W="";this.cN={};this.yT=[];
this.QB={};this.as3={};this.GH=[];this.hQ=!1;this.uG=E.p("button","fitem");this.uG.setAttribute("style","width:9em;");
this.uG.textContent="Family Name \u25BC";this.n.appendChild(this.uG);E.KH(this.uG,this.a3X.bind(this));
this.Ss=new kw;this.Ss.parent=this;var x=this.Ss.n=E.p("div","floatcont");x.style.padding="7px 7px 3px 7px";
var Q=new jz("Recent");x.appendChild(Q.n);var c=this.aB4=new j7([[23,6],[22,6,0]],!1,"Load OTF / TTF file from your computer",!0);
c.k("click",this.a4y,this);c.n.style.float="right";x.appendChild(c.n);var $=this.K4=new f2("Local Fonts");
$.k(u.E.t,this.alI,this);$.n.style.float="right";$.n.style.marginRight="10px";$.n.style.marginTop="3px";
x.appendChild($.n);E._X(x);this.Rw=E.p("span","fitem imageset scrollable");this.Rw.style.maxHeight="8em";
x.appendChild(this.Rw);var z=E.p("div","form");this.Ss.n.appendChild(z);this.cy=new j7(E.Qk("tools/cshape",null,"autoscale"),!1,"Show Favorites Only");
this.cy.k("click",this.awg,this);z.appendChild(this.cy.n);this.C9=new el([12,86],null,7.5);this.C9.k("input",this.gI,this);
z.appendChild(this.C9.n);this.mo=new jf(10,"\u2630");z.appendChild(this.mo.n);this.mo.parent=this.Ss;
this.mo.k(u.E.t,this.KT,this);this.mo.n.style.float="right";this.mo.n.style.marginRight="0";this.xG=E.p("span","fitem imageset scrollable");
this.xG.style.height="30em";this.Ss.n.appendChild(this.xG);this.xG.addEventListener("scroll",this.a4m.bind(this),!1);
this.yc=E.p("button","fitem");this.yc.setAttribute("style","width:7em;");this.yc.textContent="SubFamily Name \u25BC";
this.n.appendChild(this.yc);E.KH(this.yc,this.a3X.bind(this));this.p0=new kw;this.p0.parent=this;this.p0.n=E.p("div","floatcont");
this.eP=E.p("span","fitem imageset scrollable");this.p0.n.appendChild(this.eP);this.aoh=this.a2I.bind(this);
this.ahV=this.akW.bind(this)}a0.prototype=new kw;a0.prototype.alI=function(x){hX.xu.vz(x.target.h(),function(){this.U();
this.KT()}.bind(this),function(){this.K4.U(!1)}.bind(this));this.KT()};a0.prototype.a4m=function(x){var Q=this.xG.scrollTop,c=this.yT,$=Math.floor(Q/27),z=Math.min($+20,c.length);
for(var F=$;F<z;F++)this.ao2(c[F])};a0.prototype.a4y=function(){var x=new jO(u.E.M,!0);x.data={d:u.H.OD,a7U:".otf,.ttf,.ttc"};
this.T(x)};a0.prototype._=function(){this.mo._();this.aB4._();this.K4.U(hX.xu.V$());this.cy.UG(E.Qk("tools/cshape",null,"autoscale"))};
a0.prototype.awg=function(x){this.cy.U(!this.cy.V$());this.KT()};a0.prototype.gI=function(x){this.$W=this.C9.h().toLowerCase();
this.KT()};a0.prototype.a3X=function(x){E.ce(x);var Q=x.currentTarget,c=Q.getBoundingClientRect(),$=Q==this.uG,z=$?this.Ss:this.p0;
if(E.rm(z.n)){this.a13(z);return}if(!$&&this.jv.mW()[this.BJ]==null)return;var j=new jO(u.E.M,!0);j.data={d:u.H.A_,G7:z,x:c.left,y:c.top+c.height};
this.T(j);if($){this.KT(null,!0)}};a0.prototype.a2I=function(x){var Q=x.currentTarget.firstChild.nextSibling.textContent;
if(x.target.tagName.toLowerCase()=="button"){var c=this.O_.slice(0),$=c.indexOf(Q);if($==-1){c=c.slice(Math.max(0,c.length-29));
c.push(Q)}else c.splice($,1);var z=new jO(u.E.M,!0);z.data={d:u.H.hW,hF:ke.jw,j7:c};this.T(z);this.hQ=!0;
this.KT()}else{this.ae4(Q,null)}};a0.prototype.akW=function(x){this.ae4(null,x.currentTarget.firstChild.textContent)};
a0.prototype.ae4=function(x,Q){var c=x==null?this.p0:this.Ss,$=this.jv;if(x==null)x=$.mW()[this.BJ][0];
else{var z=$.Dy(x),j=$.mW()[this.BJ];Q=hX.zd(z,j?j[1]:"regular")}var U=$.Fa(x,Q)[2];this.U(U,$);this.T(new jO(u.E.t,!1));
this.a13(c);this.KT()};a0.prototype.a13=function(x){var Q=new jO(u.E.M,!0);Q.data={d:u.H.s$,G7:x};this.T(Q)};
a0.prototype.h=function(){return this.BJ};a0.prototype.U=function(x,Q,c){var $=this.jv;if(x!=null)this.BJ=x;
else x=this.BJ;if(Q)this.jv=Q;else Q=this.jv;if(c)this.O_=c;else c=this.O_;if(x!=null){var z=Q.mW()[x],j,U;
if(z==null){j="- "+x;U="-------"}else{j=z[0];U=z[1];var i=this.GH;for(var F=0;F<i.length;F++)if(i[F][0][0]==j)i.splice(F,1);
i.push([z,Date.now()]);i.sort(function(K,g){return g[1]-K[1]});i=i.slice(0,10);E.Os(this.Rw);for(var F=1;
F<i.length;F++){var b=i[F][0],e=this.LF(b,!0);this.RG(e,b,!0);this.Rw.appendChild(e)}var k=Q.Dy(j);k.sort(hX.a82);
this.eP.textContent="";for(var F=0;F<k.length;F++){var z=Q.Fa(j,k[F]);if(!this.mo.Hr(z))continue;var e=this.LF(z,!1);
this.eP.appendChild(e)}}this.uG.textContent=j.substring(0,15)+" \u25BC";this.uG.setAttribute("title",j+", \""+x+"\"");
this.yc.textContent=U.substring(0,10)+" \u25BC";this.yc.setAttribute("title",U)}};a0.prototype.KT=function(x,Q){var c=this.jv.mW()[this.BJ],$=this.O_,z=this.jv.f0();
this.yT=[];var j=this.K4.h();for(var U in z){var i=$.indexOf(U)!=-1,b=this.jv.Dy(U),e=!1;for(var F=0;
F<b.length;F++){var k=this.jv.Fa(U,b[F]),K=!0;if(this.$W.length>0&&k[0].toLowerCase().indexOf(this.$W)==-1)K=!1;
else if(!this.mo.Hr(k))K=!1;else if(this.cy.V$()&&!i)K=!1;else if(k[5]=="--loc"&&!j)K=!1;if(K)e=!0}var g=this.cN[U];
if(g==null){var R=hX.zd(z[U],"regular"),T=this.jv.Fa(U,R),g=this.LF(T,!0);this.cN[U]=g;this.xG.appendChild(g);
this.QB[U]="[true,false,false]"}if(e)this.yT.push(U);var D=c!=null&&c[0]==U;this.as3[U]="["+e+","+D+","+i+"]";
if(!Q)this.ao2(U)}if(c&&!this.hQ){var a=this.cN[c[0]];this.xG.scrollTop=a.offsetTop-210}this.a4m();this.hQ=!1};
a0.prototype.ao2=function(x){var Q=this.cN[x];if(Q.firstChild==null){var c=this.jv.f0(),$=hX.zd(c[x],"regular"),z=this.jv.Fa(x,$);
this.RG(Q,z,!0)}var j=this.QB[x],U=this.as3[x];if(j==U)return;var i=JSON.parse(j),b=JSON.parse(U);if(i[0]!=b[0]||i[1]!=b[1]){var e=b[0]?"":"display:none; ";
if(b[1])e+="background-color:rgba(0,0,0,0.13);";Q.setAttribute("style",e)}if(i[2]!=b[2])Q.firstChild.setAttribute("style","opacity: "+(b[2]?"1":"0.2"));
this.QB[x]=U};a0.prototype.LF=function(x,Q){var c=E.p("div","fontitem");if(!Q)this.RG(c,x,Q);return c};
a0.prototype.RG=function(x,Q,c){var $=Q[c?0:1],z=c?this.aoh:this.ahV,b="";x.addEventListener("click",z,!1);
if(c)x.appendChild(E.p("button","star"));var j=E.p("span","label");j.setAttribute("title",$);j.textContent=$;
x.appendChild(j);var U=E.q_(),i=1/U,e=hX.sL*i,k=hX.OX*i;if(1<U&&U<1.5)b="width:"+e+"px; height:"+k+"px;";
var K=E.p("span","thumb gsicon");if(Q.ip){b+="background: url("+Q.ip+");";if(1<U&&U<1.5)b+="background-size: "+e+"px "+k+"px;"}else{var g=Math.ceil(FNTS.list.length/hX.cols),R=Math.floor(Q.xR/hX.cols),T=Q.xR-R*hX.cols,D=T*hX.sL,a=R*hX.OX;
if(1<U&&U<1.5){b+="background-size: "+hX.cols*e+"px "+g*k+"px;";D*=i;a*=i}b+="background-position:-"+D+"px -"+a+"px;"}K.setAttribute("style",b);
x.appendChild(K)};function jf(x,Q){kw.call(this);this.n=E.p("button","fitem bbtn");this.n.addEventListener("click",this.acg.bind(this),!1);
this.CU=new kw;this.CU.n=E.p("div","floatcont");this.CU.parent=this;this.WW=E.p("div","flexrow");this.CU.n.appendChild(this.WW);
this.EG=Q;this.nD=[];this.i9=[];var c=this.WW,$=E.p("div",""),z=E.p("div","");c.appendChild($);c.appendChild(z);
this.Db=[];for(var F=0;F<FNTS.cats.length;F++)this.Db.push({name:FNTS.cats[F],index:F,yi:0});this.je=new f2([7,0]);
this.je.U(!0);this.je.k(u.E.t,this.a1x,this);$.appendChild(this.je.n);this.Ey=E.p("div","vlist marged scrollable");
this.Ey.setAttribute("style","width:10.3em; height:"+x+"em; ");$.appendChild(this.Ey);this.r0=[];for(var F=0;
F<this.Db.length;F++){var j=this.Db[F],U=new f2(j.name);this.r0.push(U);U.k(u.E.t,this.az$,this);U.U(!0);
this.Ey.appendChild(U.n);this.nD.push(1)}this.a09=new f2([7,0]);this.a09.k(u.E.t,this.a2z,this);this.kr=E.p("div","vlist marged scrollable");
this.kr.setAttribute("style","width:8.6em; height:"+(x+1.5)+"em; ");z.appendChild(this.kr);this.AQ=[];
for(var F=0;F<FNTS.subsetNames.length;F++){var U=new f2(FNTS.subsetNames[F]);this.AQ.push(U);U.k(u.E.t,this.a6n,this);
U.U(!1);this.kr.appendChild(U.n);this.i9.push(U.h()?1:0)}}jf.prototype=new kw;jf.prototype.a2q=function(x){var Q=this.AQ;
for(var F=0;F<Q.length;F++){var c=(x>>>F&1)==1;this.i9[F]=c;Q[F].U(c)}};jf.prototype.aw0=function(){return this.WW};
jf.prototype._=function(){this.n.textContent=this.EG?this.EG:ah.get([25,1,0])+" \u25BC";this.je._();
this.a09._()};jf.prototype.acg=function(x){var Q=this.n.getBoundingClientRect(),c=new jO(u.E.M,!0);c.data={d:u.H.A_,G7:this.CU,x:Q.left,y:Q.top+Q.height,ez:!1};
this.T(c)};jf.prototype.Hr=function(x){if(this.nD[x[4]]==0)return!1;else for(var Q=0;Q<this.i9.length;
Q++)if(this.i9[Q]==1&&(x[3]>>>Q&1)==0)return!1;return!0};jf.prototype.a1x=function(x){var Q=x.target.h(),c=this.r0,$=this.nD;
for(var F=0;F<c.length;F++){c[F].U(Q);$[F]=Q?1:0}this.T(new jO(u.E.t,!1))};jf.prototype.a2z=function(x){var Q=x.target.h(),c=this.AQ,$=this.i9;
for(var F=0;F<c.length;F++){c[F].U(Q);$[F]=Q?1:0}this.T(new jO(u.E.t,!1))};jf.prototype.az$=function(x){var F=this.r0.indexOf(x.target),Q=this.Db[F].index;
this.nD[Q]=1-this.nD[Q];this.T(new jO(u.E.t,!1));this.ajQ(this.r0,this.je)};jf.prototype.a6n=function(x){var F=this.AQ.indexOf(x.target);
this.i9[F]=1-this.i9[F];this.T(new jO(u.E.t,!1))};jf.prototype.ajQ=function(x,Q){var c=!0;for(var F=0;
F<x.length;F++)c=c&&x[F].h();Q.U(c)};function eF(x,Q,c){h0.call(this,Q,!0,"gradientbutton",18*13,10*13,ke.L7);
this.Gj=-1;this.QI=-1;this.aBB=null;this.ay7=x;this.z4=c}eF.prototype=new h0;eF.prototype.DC=function(x){var Q=this.CQ;
this.U(Q[this.uI.h()]);this.T(new jO(u.E.t))};eF.prototype.EN=function(x){var Q=new jO(u.E.M,!0);Q.data={d:u.H.LL,AD:"gradienteditor",I:this.oB,_k:this.a3C.bind(this),sh:this.z4};
this.T(Q)};eF.prototype.a3C=function(x){this.U(x);this.T(new jO(u.E.t))};eF.prototype.__=function(){if(!this.Va)return;
var x=Math.floor(36*E.q_()),Q=Math.floor(36*E.q_()),c=[],$=[],z=this.CQ,j=Date.now();for(var F=0;F<z.length;
F++){var U=z[F];$.push(U.Nm?U.Nm.v:"");var i=X._q.Zh(U,x,Q,Math.PI/4,this.Gj,this.QI);c.push(i)}this.uI.SY(c,$,x,Q);
this.Va=!1};eF.prototype.uq=function(x,Q){this.a8Q(this.oB,x,Q)};eF.prototype.U=function(x){this.a8Q(x,this.Gj,this.QI)};
eF.prototype.a8Q=function(x,Q,c){this.Gj=Q;this.QI=c;if(x==null)return;var $=JSON.stringify(x),z=$+Q+","+c;
if(z==this.aBB)return;this.aBB=z;this.oB=JSON.parse($);var j=Math.floor(80*E.q_()),U=Math.floor(16*E.q_()),i=X._q.Zh(this.oB,j,U,0,this.Gj,this.QI);
this.dr.setAttribute("src",i);E.qJ(this.dr,j,U)};eF.prototype.h=function(){var x;if(this.ay7)x=X._q.aju(this.oB,this.Gj,this.QI);
else x=JSON.parse(JSON.stringify(this.oB));return x};function gK(x){h0.call(this,x,!1,"swatchbutton",16*13,8.75*13,ke.oY)}gK.prototype=new h0;
gK.prototype.DC=function(x){this.U(this.CQ[x.target.h()]);this.T(new jO(u.E.t))};gK.prototype.__=function(){if(!this.Va)return;
var x=Date.now(),Q=Math.floor(10*E.q_()),c=Math.floor(10*E.q_()),$=[],z=[],j=this.CQ;for(var F=0;F<j.length;
F++){z.push(j[F].J4?j[F].J4.split("=").pop():"");$.push(gK.Zh(j[F],Q,c))}this.uI.SY($,z,Q,c);this.Va=!1};
gK.prototype.U=function(x){this.oB=JSON.parse(JSON.stringify(x));this.HG()};gK.prototype.HG=function(){var x=Math.floor(24*E.q_()),Q=Math.floor(20*E.q_()),c=gK.Zh(this.oB,x,Q);
this.dr.setAttribute("src",c);E.qJ(this.dr,x,Q)};gK.prototype.h=function(){return JSON.parse(JSON.stringify(this.oB))};
gK.xg={};gK.Zh=function(x,Q,c){var $=255<<24|x.J<<16|x.r<<8|x.Z,z=":"+$,j=gK.xg;if(j[z])return j[z];
var U=new Uint32Array(Q*c);U.fill($);var i=UPNG.encode([U.buffer],Q,c),b=j[z]="data:image/png;base64,"+ar.al(i);
return b};function jR(x,Q,c){kw.call(this);this.n=E.p(c?"div":"span");var $=this.Wa=E.p("input");this.Wa.setAttribute("type","file");
if(Q)$.setAttribute("multiple","");this.Wa.addEventListener("change",this.a6Z.bind(this),!1);this.a2s=this.a7P.bind(this);
this.g0={};this.iP=0;this.Su=x;var z=this.a5B=new j7(ah.get(x)+" (0)",null,null,!0);this.n.appendChild(z.n);
z.addEventListener("click",function(j){$.click()});if(c){this.aF=E.p("div","scrollable");this.aF.setAttribute("style","height:120px; width:100%; line-height:1.5em;");
this.n.appendChild(this.aF);this._I()}}jR.prototype=new kw;jR.prototype.U=function(x){this.g0=x;this._I()};
jR.prototype.h=function(x){return this.g0};jR.prototype.a6Z=function(x){var Q=x.target.files;this.iP=Q.length;
this.g0={};for(var F=0;F<Q.length;F++){var c=Q[F],$=new FileReader;$.onload=this.a2s;$.Qi=c.name;$.readAsArrayBuffer(c)}};
jR.prototype.a7P=function(x){var Q=this.g0[x.target.Qi]=new Uint8Array(x.target.result);this.iP--;if(this.iP==0){this._I();
this.T(new jO(u.E.t));this.Wa.value=null}};jR.prototype._I=function(){var x=this.g0;this.a5B.UG(ah.get(this.Su)+" ("+Object.keys(x).length+")");
var Q=this.aF;if(Q==null)return;E.Os(Q);var c=[];for(var $ in x)c.push($);c.sort();for(var F=0;F<c.length;
F++){var z=E.p("div");z.textContent=c[F];Q.appendChild(z)}};function hh(x,Q,c,$,z){if(x==null)x=!1;if(Q==null)Q=!1;
if(c==null)c=!1;kw.call(this);this.l3=new bC;this.nk=new bC;this.mI=72;this.CC=72;this.CT=!0;this.ZB=!1;
this.n=E.p("span");this.gw=new f0([12,41],0,0,null,0,!1,!0,4);this.n.appendChild(this.gw.n);this.gw.k(u.E.t,this.G1,this);
var j=["px","%"];if(x)j=j.concat(["cm","mm","in"]);if(z){j=[[12,76,2],[12,76,6]];if(x)j=j.concat([[12,76,4],[12,76,5],[12,76,3]])}this.AK=new c7(null,j);
this.n.appendChild(this.AK.n);E._X(this.n);this.AK.k(u.E.t,this.G1,this);this.ZJ=new f0([12,42],0,0,null,0,!1,!0,4);
this.n.appendChild(this.ZJ.n);this.ZJ.k(u.E.t,this.G1,this);var U=new j7("\u21F5",!1,null,!0);U.k("click",this.u4,this);
this.aR=new j7("<img src=\""+PIMG["lrs/chain"]+"\" class=\"autoscale gsicon\" />",!1,[12,51]);this.aR.k("click",this.G1,this);
this.pj=new jz("");this.pj.n.style.margin="0";this.pj.n.style.padding="0";if(Q){this.n.appendChild(this.aR.n);
this.n.appendChild(this.pj.n);this.aR.Lm()}else this.n.appendChild(U.n);this.yj=new f0("DPI",0,0,null,3,!1,!0,4);
this.WI=new c7(null,[["VAR0 / Inch",[12,76,2]],["VAR0 / Cm",[12,76,2]]]);if(x&&!$){E._X(this.n);this.n.appendChild(this.yj.n);
this.n.appendChild(this.WI.n)}this.WI.k(u.E.t,this.G1,this);this.yj.k(u.E.t,this.G1,this);this.Ir=new f2([12,23,1]);
this.Ir.k(u.E.t,this.G1,this);if(c){E._X(this.n);this.n.appendChild(this.Ir.n)}E._X(this.n)}hh.prototype=new kw;
hh.prototype.oN=function(x,Q){this.gw.NX.style.width=this.ZJ.NX.style.width=(x-78-this.aR.y7())/2+"px"};
hh.prototype.vl=function(){this.gw.vl();this.ZJ.vl();this.AK.vl();var x=this.n;E.Os(x);this.AK.n.style.marginRight="0";
x.appendChild(this.gw.n);x.appendChild(this.aR.n);x.appendChild(this.ZJ.n);x.appendChild(this.AK.n)};
hh.prototype._N=function(){this.gw._N()};hh.prototype.aAy=function(x,Q){this.CT=x;if(Q!=null)this.ZB=Q;
if(!this.CT&&!this.ZB&&this.AK.h()==0){this.AK.U(4);this.TG()}};hh.prototype.axe=function(x){this.aR.U(x)};
hh.prototype._=function(){this.gw._();this.ZJ._();this.yj._();this.WI._();this.aR._();this.Ir._();this.AK._()};
hh.prototype.u4=function(x){var Q=this.nk.x;this.nk.x=this.nk.y;this.nk.y=Q;this.TG();this.T(new jO(u.E.t,!1))};
hh.prototype.G1=function(x){if(x.target==this.AK&&!this.CT&&!this.ZB&&this.AK.h()==0)this.AK.U(4);if(x.target==this.AK||x.target==this.Ir){this.TG();
return}if(x.target==this.aR)x.target.U(!x.target.h());if(x.target==this.WI)window.locStor.setItem("dpiUnit",this.WI.h());
var Q=this.l3,c=parseFloat(this.gw.h());if(isNaN(c))c=1;var $=parseFloat(this.ZJ.h());if(isNaN($))$=1;
var z=this.yj.h()*[1,2.54][this.WI.h()],j=this.AK.h();if(this.CT){var U=this.CC;if(j==1){c=this.l3.x*(c/100);
$=this.l3.y*($/100)}var i=[1,1,2.54/U,25.4/U,1/U][j];c/=i;$/=i;if(this.Ir.h()){c+=this.l3.x;$+=this.l3.y}if(x.target==this.yj){var b=z;
if(!this.ZB){var e=b/U;c*=e;$*=e}U=b}if(this.aR.h()){if(x.target==this.gw)$=c*(Q.y/Q.x);else c=$*(Q.x/Q.y)}c=Math.max(Math.abs(c),1);
$=Math.max(Math.abs($),1)}else{var U=this.mI;if(x.target==this.yj)U=z;else{if(this.aR.h()){if(x.target==this.gw)$=c*(Q.y/Q.x);
else c=$*(Q.x/Q.y)}var i=[1,1,2.54/U,25.4/U,1/U][j],k=c/(j==1?100:Q.x*i);U=U/k}c=Q.x;$=Q.y}this.nk=new bC(Math.round(c),Math.round($));
this.CC=U;this.TG();this.T(new jO(u.E.t,!1))};hh.prototype.aaR=function(F){this.AK.U(F);this.TG()};hh.prototype.U=function(x,Q,c){var $=window.locStor.getItem("dpiUnit");
if($!=null)this.WI.U($);if(c!=!0)this.l3=x.clone();this.nk=x.clone();if(Q!=null){this.mI=Q;this.CC=Q}this.TG()};
hh.prototype.TG=function(){var x=this.nk.x,Q=this.nk.y,c=this.CC,$=(x/Q).toFixed(3);while($.charAt($.length-1)=="0")$=$.substring(0,$.length-1);
if($.charAt($.length-1)==".")$=$.substring(0,$.length-1);var z="  "+$+" : 1",j=function(k,K){while(K!=0){var g=K;
K=k%K;k=g}return k},U=j(x,Q);if(Math.min(x,Q)/U<10)z="  "+Math.round(x/U)+" : "+Math.round(Q/U);this.pj.U(z);
if(this.Ir.h()){x-=this.l3.x;Q-=this.l3.y}var i=this.AK.h();if(i==1){if(this.CT){x=100*x/this.l3.x;Q=100*Q/this.l3.y}else{x=Q=100*this.mI/this.CC}}else{x=Math.round(x);
Q=Math.round(Q)}var b=[1,1,2.54/c,25.4/c,1/c][i];x*=b;Q*=b;var e=i==1||i==2||i==4?2:0;this.gw.tj(e);
this.ZJ.tj(e);this.gw.U(x);this.ZJ.U(Q);this.yj.U(c*[1,1/2.54][this.WI.h()])};hh.prototype.h=function(){return this.nk.clone()};
hh.prototype.ne=function(){return this.CC};function cM(x,Q,c){kw.call(this);var $=x==0?["W","X","H","Y"]:["\u250F","\u2513","\u2517","\u251B"];
this.iV=x;this.asS=Q;this.Ff=1;this.$i=[1,1,0];var z=this.n=E.p("div","numlist"),j=this.RA=[];for(var F=0;
F<4;F++){var U=new f0($[F],0,0,null,2,!1,!0,4,null,c&&(F==0||F==2));U.k(u.E.t,this.G1,this);z.appendChild(U.n);
j[F]=U;if(F==1||F==3)E._X(z)}j[4]=new f2(x==0?[12,51]:[12,91,2]);j[4].U(!0);z.appendChild(j[4].n)}cM.prototype=new kw;
cM.prototype._=function(){var x=this.RA;for(var F=0;F<5;F++)x[F]._();if(this.iV==0)E.JT(x[0],x[2])};
cM.prototype.U=function(x,Q,c){if(Q)this.$i=Q;Q=this.$i;var $=c?x:this.iV==0?[x[2],x[0],x[3],x[1]]:[x[0],x[1],x[3],x[2]];
this.Ff=$[0]/$[2];for(var F=0;F<4;F++){var z=this.RA[F];z.tj(Q[2]==0&&this.asS?0:2);z.U(d.fR.apX($[F],Q[0],Q[1],Q[2]))}};
cM.prototype.h=function(x){var Q=[],c=this.$i;for(var F=0;F<4;F++){var $=d.fR.X_(this.RA[F].h(),c[0],c[1],c[2]);
Q[F]=this.asS?Math.round($):$}return x?Q:this.iV==0?[Q[1],Q[3],Q[0],Q[2]]:[Q[0],Q[1],Q[3],Q[2]]};cM.prototype.G1=function(x){var Q=this.iV,c=this.RA.indexOf(x.currentTarget),$=this.h(!0),z=this.RA[4].h();
if(Q==0){$[0]=Math.max(1,$[0]);$[2]=Math.max(1,$[2]);if(z&&c==0)$[2]=$[0]/this.Ff;if(z&&c==2)$[0]=$[2]*this.Ff}if(Q==1){$[c]=Math.max(0,$[c]);
if(z)for(var F=0;F<4;F++)$[F]=$[c]}this.U($,null,!0);this.T(new jO(u.E.t,!1))};function fZ(){kw.call(this);
this.m0=0;this.Ih=[0,0,1,1,100,100];this.vN=[10,5,1,1,4,3,3,2,16,9];this.n=E.p("span","fitem");this.Vl=new c7(null,[[12,89,0],[12,89,1],[12,89,2],"Original Ratio","1 : 1","4 : 3","3 : 2","16 : 9"],[3,5]);
this.n.appendChild(this.Vl.n);this.Vl.k(u.E.t,this.G1,this);this.gw=new f0("W",0,0,null,0,!1,!0);this.n.appendChild(this.gw.n);
this.gw.k(u.E.t,this.G1,this);var x=this.wv=new j7("\u21C4",!1,null,!0);x.k("click",this.u4,this);this.n.appendChild(x.n);
this.ZJ=new f0("H",0,0,null,0,!1,!0);this.n.appendChild(this.ZJ.n);this.ZJ.k(u.E.t,this.G1,this);this.U({z_:0,x:0,y:0})}fZ.prototype=new kw;
fZ.prototype.a5M=function(x,Q){this.vN[0]=x;this.vN[1]=Q};fZ.prototype._=function(){E.JT(this.gw,this.ZJ);
this.Vl._()};fZ.prototype.u4=function(x){var Q=this.ZJ.h();this.ZJ.U(this.gw.h());this.gw.U(Q);this.G1(x)};
fZ.prototype.G1=function(x){if(x.target==this.Vl){var F=this.Vl.h(),Q=this.Ih;if(F>2){F-=3;var c=this.vN[2*F],$=this.vN[2*F+1];
Q[2]=c;Q[3]=$;this.gw.U(c);this.ZJ.U($);this.Vl.U(1)}var z=this.h();Q[this.m0*2]=z.x;Q[this.m0*2+1]=z.y;
this.m0=z.z_;this.U({z_:z.z_,x:Q[z.z_*2],y:Q[z.z_*2+1]})}if(this.gw.h()<1)this.gw.U(1);if(this.ZJ.h()<1)this.ZJ.U(1);
this.T(new jO(u.E.t,!1))};fZ.prototype.U=function(x){this.Vl.U(x.z_);this.gw.U(x.x);this.ZJ.U(x.y);if(x.z_==0){this.gw.hp();
this.ZJ.hp();this.wv.hp()}else{this.gw.bJ();this.ZJ.bJ();this.wv.bJ()}};fZ.prototype.h=function(){return{z_:this.Vl.h(),x:this.gw.h(),y:this.ZJ.h()}};
function eq(x){kw.call(this);this.n=E.p("span","");this.auE=x;var Q=x?100:300;this.cH=new bf("Off X",-Q,Q,x?"%":"px",0,!x);
this.k0=new bf("Off Y",-Q,Q,x?"%":"px",0,!x);this.cH.k(u.E.t,this.G1,this);this.k0.k(u.E.t,this.G1,this);
this.n.appendChild(this.cH.n);this.n.appendChild(this.k0.n)}eq.prototype=new kw;eq.prototype._=function(){this.cH._();
this.k0._()};eq.prototype.G1=function(x){this.T(new jO(u.E.t,!1))};eq.prototype.afg=function(x){this.cH.U(x.x);
this.k0.U(x.y)};eq.prototype.aDf=function(){return new bC(this.cH.h(),this.k0.h())};eq.prototype.U=function(x,Q){var c=x.Hrzn.v,$=x.Vrtc.v;
if(this.auE){c=c.val;$=$.val}this.cH.U(c);this.k0.U($);if(Q==!0)this.G1()};eq.prototype.h=function(){var x=this.cH.h(),Q=this.k0.h();
if(this.auE)return{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Prc",val:x}},Vrtc:{t:"UntF",v:{type:"#Prc",val:Q}}};
else return{classID:"Pnt",Hrzn:{v:x,t:"doub"},Vrtc:{v:Q,t:"doub"}}};function g_(){kw.call(this);this.n=E.p("span","fitem strokebutton");
this.LS=[[null,null,null,50,""],[null,0,null,50,"4 2"],[1,1,null,50,"0 2"]];this.hw=aF.XM.$H();this.xm=E.p("button");
this.n.appendChild(this.xm);E.KH(this.n,this.S$.bind(this));var x=E.p("canvas","gsicon");this.Yt=x.getContext("2d");
this.xm.appendChild(x);var Q=E.p("span");Q.textContent=" \u25BC";this.xm.appendChild(Q);this.CU=new kw;
this.CU.parent=this;this.CU.n=E.p("div","floatcont form");var c=this.CU.n;c.setAttribute("style","width: 16.7em;");
this.cN=[new c7([12,40],[[19,5,2],[19,5,1],[19,5,0]]),new c_([19,9,0],["<img src=\""+PIMG["caps/butt"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["caps/round"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["caps/square"]+"\" class=\"autoscale gsicon\" />"]),new c_([19,9,1],["<img src=\""+PIMG["joins/miter"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["joins/round"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["joins/bevel"]+"\" class=\"autoscale gsicon\" />"]),new f0("Limit",0,50,null,null,null,!0,2.5),new el([19,9,2])];
for(var F=0;F<this.cN.length;F++){var $=this.cN[F];c.appendChild($.n);$.k(u.E.t,this.G1,this)}E._X(c);
this.Aw=[];var z=this.O9.bind(this);this.hw.strokeStyleLineWidth.v.val=3;for(var F=0;F<this.LS.length;
F++){var j=E.p("button","fitem");this.Aw.push(j);c.appendChild(j);j.addEventListener("click",z,!1);var x=E.p("canvas","gsicon"),U=x.getContext("2d");
j.appendChild(x);this.afU(U,40,20,this.LS[F])}this.hw.strokeStyleLineWidth.v.val=1}g_.prototype=new kw;
g_.prototype.S$=function(x){if(E.rm(this.CU.n))return;x.stopPropagation();var Q=this.xm.getBoundingClientRect(),c=new jO(u.E.M,!0);
c.data={d:u.H.A_,G7:this.CU,x:Q.left,y:Q.top+Q.height+4};this.T(c)};g_.prototype.G1=function(x){var Q=this.cN,c=[];
for(var F=0;F<5;F++)c.push(Q[F].h());this.hw=this.ajS(c);this.T(new jO(u.E.t,!1))};g_.prototype.O9=function(x){var Q=this.Aw.indexOf(x.currentTarget);
this.U(this.ajS(this.LS[Q]));this.T(new jO(u.E.t,!1))};g_.prototype.ajS=function(x){var Q=JSON.parse(JSON.stringify(this.hw)),c=x[0],$=x[1],z=x[2],j=x[3],U=x[4];
if(c!=null)Q.strokeStyleLineAlignment.v.strokeStyleLineAlignment=aF.XM.xS[c];if($!=null)Q.strokeStyleLineCapType.v.strokeStyleLineCapType=aF.XM.Sw[$];
if(z!=null)Q.strokeStyleLineJoinType.v.strokeStyleLineJoinType=aF.XM.join[z];Q.strokeStyleMiterLimit.v=j;
var i=Q.strokeStyleLineDashSet.v=[];U=U.split(" ");while((U.length&1)!=0)U.pop();for(var F=0;F<U.length;
F++)i.push({t:"UntF",v:{type:"#Nne",val:parseInt(U[F])}});return Q};g_.prototype._=function(){for(var F=0;
F<this.cN.length;F++)this.cN[F]._()};g_.prototype.U=function(x){this.hw=JSON.parse(JSON.stringify(x));
var Q=aF.XM.xS.indexOf(x.strokeStyleLineAlignment.v.strokeStyleLineAlignment),c=aF.XM.Sw.indexOf(x.strokeStyleLineCapType.v.strokeStyleLineCapType),$=aF.XM.join.indexOf(x.strokeStyleLineJoinType.v.strokeStyleLineJoinType),z=x.strokeStyleMiterLimit.v,j=[],U=x.strokeStyleLineDashSet.v;
for(var i=0;i<U.length;i++)j.push(U[i].v.val);var b=this.cN;b[0].U(Q);b[1].U(c);b[2].U($);b[3].U(z);
b[3].vz($==0);b[4].U(j.join(" "));var e=[];for(var F=0;F<5;F++)e.push(b[F].h());this.afU(this.Yt,40,16,e)};
g_.prototype.h=function(){return JSON.parse(JSON.stringify(this.hw))};g_.prototype.afU=function(x,Q,c,$){var z=$[0],j=$[1],U=$[2],i=$[3],b=$[4].split(" ").map(parseFloat);
E.qr(x.canvas,Q,c);var e=Math.min(5,this.hw.strokeStyleLineWidth.v.val);for(var F=0;F<b.length;F++)b[F]*=e;
x.clearRect(0,0,Q,c);x.setLineDash(b);x.lineCap=["butt","round","square"][j];x.lineJoin=["miter","round","bevel"][U];
x.lineWidth=e;x.beginPath();x.moveTo(0,c/2);x.lineTo(Q*2,c/2);x.stroke()};function gT(x){h0.call(this,x,!1,"contourbutton",34*13,16*13,ke.fB,!0);
this.C9=new el([12,86],null,16);this.C9.k("input",this.gI,this);this.CU.n.appendChild(this.C9.n);this.KZ=null;
this.$W="";this.MO=null;this.U(dJ.$H())}gT.prototype=new h0;gT.prototype._=function(){h0.prototype._.call(this);
this.C9._()};gT.prototype.DC=function(x){this.U(this.KZ[x.target.h()[0]]);this.T(new jO(u.E.t))};gT.prototype.gI=function(x){this.$W=this.C9.h().toLowerCase();
this.apo()};gT.a15=!1;gT.prototype.__=function(){if(!this.Va)return;var x=this.CQ;if(x==null||!gT.a15){var Q=new jO(u.E.M,!0);
Q.data={d:u.H.a0,hF:{url:"rsrc/basic/Default.csh"}};this.T(Q);gT.a15=!0}else{var c=Math.floor(38*E.q_()),$=Math.floor(38*E.q_());
this.MO=[];for(var F=0;F<x.length;F++)this.MO.push(gT.ayu(x[F],c,$));this.apo();this.Va=!1}};gT.prototype.apo=function(){var x=Math.floor(38*E.q_()),Q=Math.floor(38*E.q_());
this.KZ=[];var c=[],$=[],z=this.CQ;for(var F=0;F<z.length;F++){if(z[F].mk.toLowerCase().indexOf(this.$W)==-1)continue;
this.KZ.push(z[F]);c.push(this.MO[F]);$.push(z[F].mk)}this.uI.SY(c,$,x,Q)};gT.prototype.U=function(x){this.oB=gT.clone(x);
this.HG()};gT.prototype.HG=function(){var x=Math.floor(23*E.q_()),Q=Math.floor(23*E.q_()),c=gT.ayu(this.oB,x,Q);
this.dr.setAttribute("src",c);E.qJ(this.dr,x,Q)};gT.prototype.h=function(){return gT.clone(this.oB)};
gT.clone=function(x){return{mk:x.mk,Uz:x.Uz,$:eM.hn.gG(x.$),LB:x.LB.clone()}};gT.GP=null;gT.eg=null;
gT.ayu=function(x,Q,c){var $=eM.hn.gG(x.$),z=x.LB,j=Math.min(Q/z.m,c/z.e)*.9,U=new bI;U.translate(-.5,-.5);
U.scale(.95,.95);U.translate(.5,.5);U.scale(j*z.m,j*z.e);d.o.Of($,U);var i=new eM.hn;i.$=$;var b=i.Rz();
b.rect.x=Math.floor((Q-b.rect.m)/2);b.rect.y=Math.floor((c-b.rect.e)/2);var e=d.R(b.rect.P()*4);d.Dm(b.channel,e,3);
var k=gT;if(k.GP==null)k.GP=E.p("canvas");var K=k.GP,g=K.getContext("2d");if(K.width!=Q||K.height!=c||k.eg==null){K.width=Q;
K.height=c;k.eg=g.createImageData(Q,c)}var R=k.eg;R.data.fill(0);d.WK(e,b.rect,R.data,new gh(0,0,Q,c));
g.putImageData(R,0,0);return K.toDataURL()};function bX(x){h0.call(this,x,!1,"ICCButton",16*13,12*13,ke.oy,!0);
this.uI.VW(1)}bX.prototype=new h0;bX.prototype.JI=function(){var x="Arabica 12,Ava 614,Azrael 93,Bourbon 64,Byers 11,Clayton 33,Clouseau 54,Cobi 3,Contrail 35,Cubicle 99,Django 25,Domingo 145,Faded 47,Folger 50,Fusion 88,Hyla 68,Chemical 168,Korben 214,Lenox 340,Lucky 64,McKinnon 75,Milo 5,Neon 770,Paladin 1875,Pasadena 21,Pitaya 15,Reeve 38,Remy 24,Sprocket 231,Teigen 28,Trent 18,Tweed 71,Vireo 37,Zed 32,Zeke 39".split(",");
for(var F=0;F<x.length;F++)x[F]="luts/"+x[F]+".CUBE";return x};bX.prototype.DC=function(x){this.U(this.CQ[x.target.h()]);
this.T(new jO(u.E.t))};bX.prototype.__=function(){if(!this.Va)return;var x=Math.floor(1*E.q_()),Q=Math.floor(1*E.q_()),c=[],$=[],z=this.CQ;
for(var F=0;F<z.length;F++){var j=z[F].Nm.v.split("\\").pop().split("/").pop();$.push(j);c.push(bX.Zh(z[F],x,Q))}this.uI.SY(c,$,x,Q);
this.Va=!1};bX.prototype.U=function(x){this.oB=JSON.parse(JSON.stringify(x));this.HG()};bX.Zh=function(x,Q,c){var $=E.p("canvas"),U="ICC / 3DL / look / cube";
$.width=Q;$.height=c;var z=$.getContext("2d"),j=Math.floor(14*E.q_());z.font=j+"px sans-serif";if(x.Nm)U=x.Nm.v.split("\\").pop().split("/").pop();
z.fillText(U,10,j);return $.toDataURL()};bX.prototype.HG=function(){var x=Math.floor(120*E.q_()),Q=Math.floor(20*E.q_());
this.dr.setAttribute("src",bX.Zh(this.oB,x,Q));E.qJ(this.dr,x,Q)};bX.prototype.h=function(){return JSON.parse(JSON.stringify(this.oB))};
function dL(){kw.call(this);this.Fo=null;this.n=E.p("span","fitem");this.w3=new eY([14,9]);this.Z7=new f0(null,0,150,"px",1,!0,null,null,[19,2,5]);
this.Xz=new g_;this.z5=[this.w3,this.Z7,this.Xz];for(var F=0;F<this.z5.length;F++){var x=this.z5[F];
this.n.appendChild(x.n);x.parent=this;x.k(u.E.t,this.G1,this)}}dL.prototype=new kw;dL.prototype._=function(){for(var F=0;
F<this.z5.length;F++)this.z5[F]._()};dL.prototype.Fy=function(x,Q){this.w3.Fy(x,Q)};dL.prototype.G1=function(x){var Q=this.Fo,c=this.w3.h();
aF.dz(Q,c);Q.strokeStyleLineWidth.v.val=this.Z7.h();if(x.target==this.Xz)Q=this.Xz.h();this.Fo=Q;this.T(new jO(u.E.t,!1))};
dL.prototype.U=function(x,Q,c){this.Fo=JSON.parse(JSON.stringify(Q));var $=aF.XT(Q);this.w3.U(x,$,c);
this.Z7.U(Q.strokeStyleLineWidth.v.val);this.Xz.U(Q)};dL.prototype.h=function(){return JSON.parse(JSON.stringify(this.Fo))};
function fC(x){var Q=[[18,0],[18,1],[18,2],[18,3]],c=c_.GV(["set/front","set/union","set/difference","set/intersection"]);
c_.call(this,x?[12,36]:null,c,Q)}fC.prototype=new c_;function gv(){kw.call(this);this.n=E.p("button","fitem bbtn");
E.KH(this.n,this.S$.bind(this));this.CU=new kw;this.CU.n=E.p("div","floatcont form");this.CU.n.setAttribute("style","max-width: 200px;");
this.CU.parent=this;var x=bv;this.wm=[new f2("Start"),new f2("End"),new x([12,41],0,100,"px",null,!0,null,!0),new x([12,80,0],0,100,"px",null,!0,null,!0),new x("Concavity",-50,50,"%",null,null,null,!0)];
for(var F=0;F<this.wm.length;F++){var Q=this.wm[F];Q.parent=this;Q.k(u.E.t,this.Z9,this);this.CU.n.appendChild(Q.n)}this.azl=E.p("div");
this.CU.n.appendChild(this.azl)}gv.prototype=new kw;gv.prototype.U=function(x){for(var F=0;F<5;F++)this.wm[F].U(x[F]);
this._I()};gv.prototype.h=function(x){var Q=[];for(var F=0;F<5;F++)Q[F]=this.wm[F].h();return Q};gv.prototype._=function(){this.n.textContent=ah.get([12,93,4]);
for(var F=0;F<this.wm.length;F++)this.wm[F]._()};gv.prototype.Z9=function(x){this.T(new jO(u.E.t,!1));
this._I()};gv.prototype._I=function(x){var Q=this.h(),c=200,$=60;Q[2]/=E.q_();Q[3]/=E.q_();var z=d.o.JE.ec(0,$/2,c,$/2,5,Q),j=d.o.vb(z);
this.azl.innerHTML="<svg width=\""+c+"\" height=\""+$+"\" class=\"gsicon\">\t\t\t<path d=\""+j.Fg+"\" />\t\t\t</svg>"};
gv.prototype.S$=function(x){if(E.rm(this.CU.n))return;x.stopPropagation();var Q=this.n.getBoundingClientRect(),c=new jO(u.E.M,!0);
c.data={d:u.H.A_,G7:this.CU,x:Q.left,y:Q.top+Q.height,ez:!0};this.T(c)};function fF(){kw.call(this);
this.n=E.p("div");this.RA=[];this.axF=[];var x=this.EU=E.p("div"),Q=E.p("h2");Q.textContent="Create Teams";
x.appendChild(Q);Q.style.margin="26px 0 16px 0";var c=new j7("More about Teams",!1,null,!0);Q.appendChild(c.n);
c.n.style.float="right";c.k("click",this.as4,this);this.Pj=E.p("div");x.appendChild(this.Pj);this.aoJ=new el("Team Name",null,10);
x.appendChild(this.aoJ.n);var $=this.aD5=new j7("Create Team",null,null,!0);x.appendChild($.n);$.k("click",this.ak2,this);
var Q=E.p("h2");Q.textContent="Join Teams";x.appendChild(Q);Q.style.margin="26px 0 16px 0";this.kG=E.p("div");
x.appendChild(this.kG);this.am5=new el("Team ID",null,10);x.appendChild(this.am5.n);var $=new j7("Join Team",null,null,!0);
x.appendChild($.n);$.k("click",this.ak2,this);this.azL;this.a42=this.BM.bind(this);this.aE2=this.amK.bind(this);
this.B3=!1;this.fg();this.Sb=null;this.agh=""}fF.prototype=new kw;fF.prototype.as4=function(x){var Q=new jO(u.E.M,!0);
Q.data={d:u.H.H_,link:"https://www.photopea.com/api/accounts#teams"};this.T(Q)};fF.prototype.fg=function(){clearTimeout(this.au4);
this.au4=setTimeout(this.aE2,this.Sb?10:3e3)};fF.prototype.amK=function(){var x=dQ.rf();if(document.hidden||!E.rm(this.n)||x==null){this.fg();
return}var Q=dQ.JO();if(this.Sb==null&&Q==null)return;dQ._J(this.Sb?this.Sb:Q,this.a42);this.B3=!0;this.Sb=null};
fF.prototype.a3m=function(x){x.acc.update=!0;this.n.style.pointerEvents="none";this.n.style.opacity="0.5";
if(this.B3)this.Sb=x;else{clearTimeout(this.au4);dQ._J(x,this.a42)}};fF.prototype.Di=function(x){var Q=typeof x=="string"?this.azL:this.RA.indexOf(x.target),c=this.axF[Q],$=c[0],z=dQ.JO();
if(z==null)z={};var j=z.acc,U=j.tjoin,i=j.tstart;if($=="leave"){U.splice(U.indexOf(c[1]),1)}if($=="add"||$=="remove"||$=="delTeam"||$=="showRename"||$=="rename"){var b=-1,k=0;
for(var F=0;F<i.length;F++){k+=i[F][1].length;if(i[F][2]==c[1])b=F}var K=i[b];if($=="add"){var g=dQ.OT();
if(g&&g[0]==0&&g[1][2]<=k){alert("You can have at most "+g[1][2]+" members in your Premium.");return}K[1].push(c[2])}if($=="remove")K[1].splice(K[1].indexOf(c[2]),1);
if($=="delTeam"){if(K[1].length!=0){alert("Remove members first.");return}i.splice(b,1)}if($=="showRename"){var R=new jO(u.E.M,!0);
R.data={d:u.H.LL,AD:"namewindow",ZR:K[0],ka:this.Di.bind(this)};this.T(R);this.azL=Q;c[0]="rename";return}if($=="rename")K[0]=x}this.a3m(z)};
fF.prototype.ak2=function(x){var Q=this.aD5==x.target,c=(Q?this.aoJ:this.am5).h().trim();if(c==""){alert("The Team "+(Q?"Name":"ID")+" is empty.");
return}if(!Q){c=parseInt(c);if(isNaN(c)){alert("The ID must be a number");return}}var $=dQ.JO();if($==null)$={};
var z=$.acc;if(z==null)z=$.acc={};var j=z.tstart,U=z.tjoin;if(Q){if(j==null)j=z.tstart=[];if(j.length>5){alert("You can have at most 5 teams");
return}j.push([c,[]])}else{if(j)for(var F=0;F<j.length;F++)if(j[F][2]==c){alert("You are the owner of this team");
return}if(U==null)U=z.tjoin=[];if(U.indexOf(c)!=-1){alert("You already asked to join this team.");return}z.tjoin.push(c)}z.update=!0;
this.a3m($)};fF.prototype.BM=function(){this.B3=!1;var x=dQ.rf(),Q=x!=null,c=this.EU.parentNode!=null;
if(Q!=c){E.Os(this.n);if(Q)this.n.appendChild(this.EU);else this.n.textContent="Log In to access Team Settings."}if(!Q)return;
var $=dQ.JO();if($==null)$={};var z=$.acc;if(z==null)z={};var j=JSON.stringify(z)+"===="+JSON.stringify(x);
if(j!=this.agh){this.agh=j;var U=this.Pj,i=this.kG;E.Os(U);E.Os(i);var b=this.RA=[],e=this.axF=[],k=this.Di.bind(this);
function K(O,p){O.addEventListener("click",k);b.push(O);e.push(p)}function g(y,O){var G=E.p("div"),p="rgba(255,255,255,0.15)";
G.appendChild(T("ID: "+y[2],54,p));G.appendChild(T(y[0],160,null,!0));if(O){G.appendChild(T(y[1].length+" members",80,null,!0))}else{G.appendChild(T(y[1]==-1?"... not accepted yet":"Accepted",160));
if(Date.now()<y[1]*1e3)G.appendChild(T("Premium",80,"rgba(0,140,0,1)"))}var C=T("",120);G.appendChild(C);
C.setAttribute("style","float:right;text-align:right");if(O){var W=new j7("Rename",null,null,!0);K(W,["showRename",y[2]]);
C.appendChild(W.n)}var W=new j7(O?"Delete":"Leave",null,null,!0);K(W,[O?"delTeam":"leave",y[2]]);C.appendChild(W.n);
return G}function R(O,p,P){var G=E.p("div");G.style.paddingLeft="46px";G.appendChild(T(p?"\u2713":"...",8,p?"#229922":"#aa7700"));
G.appendChild(T(O[1],200));G.appendChild(T(O[2],240));var C=T("",120);G.appendChild(C);C.setAttribute("style","float:right;text-align:right");
var W=new j7(p?"Remove":"Add",null,null,!0);K(W,[p?"remove":"add",P,O[0]]);C.appendChild(W.n);return G}function T(O,p,C,W){var J=E.p("span");
J.textContent=O;J.setAttribute("style","display:inline-block;  padding:0 10px;  border-radius:4px;  overflow:hidden;  width:"+p+"px;  "+(C!=null?"background-color:"+C+";":"")+(W?"font-weight:bold;":""));
return J}var D=z.tstart,a=z.tjoin,_=x.wantToJoin,I=x.inTeams;if(D)for(var f=0;f<D.length;f++){var y=D[f],Z=_["t"+y[2]];
if(Z==null)Z=[];var v={};for(var F=0;F<Z.length;F++)v["u"+Z[F][0]]=Z[F];var G=g(y,!0);U.appendChild(G);
G.style.marginTop="10px";for(var F=0;F<y[1].length;F++){var q=y[1][F],h=v["u"+q];if(h==null)h=[q,"========","... user has left your team"];
delete v["u"+q];var r=R(h,!0,y[2]);U.appendChild(r)}for(var H in v){var h=v[H],r=R(h,!1,y[2]);U.appendChild(r)}}if(a){var o={};
for(var F=0;F<I.length;F++)o["t"+I[F][2]]=I[F];for(var f=0;f<a.length;f++){var P=a[f],y=o["t"+P],G=g(y?y:["==========",-1,P],!1);
i.appendChild(G)}}this.T(new jO(u.E.t))}if(this.Sb==null){this.n.style.pointerEvents="auto";this.n.style.opacity="1"}this.fg()};
function kk(){kw.call(this);this.NZ=[16,!0,!0];this.n=E.p("span","");this.Gp=[new f0([12,24],0,255),new f2([12,25,1]),new f2([12,25,0])];
for(var F=0;F<3;F++){var x=this.Gp[F];x.parent=this;x.U(this.NZ[F]);this.n.appendChild(x.n);x.k(u.E.t,this.G1,this)}}kk.prototype=new kw;
kk.prototype.G1=function(){for(var F=0;F<3;F++)this.NZ[F]=this.Gp[F].h();this.T(new jO(u.E.t,!1))};kk.prototype.U=function(x){this.NZ=x.slice(0);
for(var F=0;F<3;F++)this.Gp[F].U(x[F])};kk.prototype.h=function(){return this.NZ.slice(0)};kk.prototype._=function(){for(var F=0;
F<3;F++)this.Gp[F]._()};function c4(x,Q){kw.call(this);if(Q==null)Q=!1;this.MO=[];this.iA=Math.floor(120*E.q_());
this.awD=Math.floor(23*E.q_());this.s6=0;this.Vp=[];this.o_=[];for(var c in d.fr.type){if((c=="warpCustom"||c=="warpCylinder")&&!Q)continue;
this.Vp.push(c);this.o_.push(d.fr.type[c])}this.n=E.p("span","fitem warpbutton");this.CU=new kw;this.CU.n=E.p("div","floatcont");
if(x){this.Su=x;this._Q=E.p("label","flabel");this.n.appendChild(this._Q)}this.d=E.p("button");this.n.appendChild(this.d);
E.KH(this.d,this.S$.bind(this));this.Qp=new jn(!0);this.CU.n.appendChild(this.Qp.n);this.Qp.k(u.E.t,this.af$,this);
this.CU.n.setAttribute("style","width:"+Math.floor(8+this.iA/E.q_())+"px;");this._()}c4.prototype=new kw;
c4.prototype.UG=function(x){this._Q.textContent=x};c4.prototype._=function(){if(this.Su)this._Q.innerHTML=ah.get(this.Su)+":";
this.HG()};c4.aeq={};c4.awE=function(x,Q,c){var $=ah.get(d.fr.type[x]),z=$+"-"+x+"-"+Q+"-"+c,j=c4.aeq[z];
if(j)return j;var U=c4.Yt;if(i==null){var i=E.p("canvas");U=c4.Yt=i.getContext("2d")}var i=U.canvas;
if(i.width!=Q||i.height!=c){i.width=Q;i.height=c}U.font=Math.floor(13*E.q_())+"px sans-serif";U.lineWidth=1;
U.strokeStyle="#000000";var b=Math.floor(16*E.q_()),e=new gh(0,0,b,b);U.clearRect(0,0,i.width,i.height);
var k=d.fr.fr(x,x=="warpCylinder"?[0,0,1,1,-.2,-.3,1]:.3,!0,0,0,1);d.fr.agb(k[3],e);var K=d.A.Hg(e);
K.G.push("M","L","M","L");K.j.push(0,b/2,b,b/2);K.j.push(b/2,0,b/2,b);K=d.A._w(K);K=d.A.TP(K,b/5);d.uE.i(k,K.j,e);
d.A.i(K.j,new bI(1,0,0,1,Math.floor(8*E.q_())+.5,Math.floor(3*E.q_())+.5),K.j);U.beginPath();Typr.U.pathToContext({cmds:K.G,crds:K.j},U);
U.stroke();U.fillText($,Math.floor(40*E.q_()),Math.floor(16*E.q_()));j=c4.aeq[z]=i.toDataURL();return j};
c4.prototype.S$=function(x){if(E.rm(this.CU.n))return;x.stopPropagation();var Q=this.iA,c=this.awD;for(var F=0;
F<this.Vp.length;F++)this.MO[F]=c4.awE(this.Vp[F],Q,c);this.Qp.SY(this.MO,null,Q,c);var $=this.d.getBoundingClientRect(),z=new jO(u.E.M,!0);
z.data={d:u.H.A_,G7:this.CU,x:$.left,y:$.top+$.height+4};this.T(z)};c4.prototype.af$=function(x){var Q=new jO(u.E.M,!0);
Q.data={d:u.H.s$,G7:this.CU};this.T(Q);this.s6=x.target.h()[0];this.HG();this.T(new jO(u.E.t))};c4.prototype.HG=function(){var x=this.iA,Q=this.awD;
this.Qp.U([this.s6]);this.d.innerHTML="<img src=\""+c4.awE(this.Vp[this.s6],x,Q)+"\" class=\"gsicon\" />";
E.qJ(this.d.firstChild,x,Q)};c4.prototype.h=function(){return this.Vp[this.s6]};c4.prototype.U=function(x){this.s6=this.Vp.indexOf(x);
this.HG()};function kL(x,Q,c){kw.call(this);if(x==null)x=!1;if(Q==null)Q=!1;if(c==null)c=!1;this.ayZ=Q;
this.fr=null;this.Uh=new c4([12,22],c);this.Uh.parent=this;this.Uh.k(u.E.t,this.bM,this);this.PE=new c7([22,0],[[22,4,0],[22,4,1]]);
this.PE.k(u.E.t,this.bM,this);var $=x?f0:bv;this.Nf=new $([22,1],-100,100,"%");this.v2=new $("Horizontal Distortion:",-100,100,"%");
this.Nq=new $("Vertical Distortion:",-100,100,"%");this.Nf.parent=this.v2.parent=this.Nq.parent=this;
this.Nf.k(u.E.t,this.bM,this);this.v2.k(u.E.t,this.bM,this);this.Nq.k(u.E.t,this.bM,this)}kL.prototype=new kw;
kL.prototype._=function(){this.Uh._();this.PE._();this.Nf._();var x=this.ayZ?1:100;this.v2.UG(ah.get([22,2]).substring(0,x)+":");
this.Nq.UG(ah.get([22,3]).substring(0,x)+":")};kL.prototype.bM=function(){var x=this.fr,Q=this.Uh.h(),c=x.warpStyle.v.warpStyle;
if(Q=="warpCustom")d.fr.TE(x,d.fr.ES(x));else delete x.customEnvelopeWarp;x.warpStyle.v.warpStyle=this.Uh.h();
x.warpRotate.v.Ornt=["Hrzn","Vrtc"][this.PE.h()];var $=this.Nf.h();x.warpPerspective.v=this.v2.h();x.warpPerspectiveOther.v=this.Nq.h();
if(Q=="warpNone"||Q=="warpCustom"){$=0;x.warpPerspective.v=0;x.warpPerspectiveOther.v=0}else if(c=="warpNone"||c=="warpCustom"||c=="warpCylinder")$=50;
if(Q!="warpCylinder"){x.warpValue={t:"doub",v:$};delete x.warpValues}else{x.warpValues=X.Y.TD([0,100,100,0,.15,.2,1]);
delete x.warpValue}this.T(new jO(u.E.t,!1));this.U(x)};kL.prototype.h=function(x){return JSON.parse(JSON.stringify(this.fr))};
kL.prototype.U=function(x){this.fr=JSON.parse(JSON.stringify(x));var Q=x.warpStyle.v.warpStyle,c=Q=="warpNone"||Q=="warpCustom"||Q=="warpCylinder";
this.Uh.U(Q);if(!c){this.PE.U(x.warpRotate.v.Ornt=="Hrzn"?0:1);this.Nf.U(x.warpValue.v);this.v2.U(x.warpPerspective.v);
this.Nq.U(x.warpPerspectiveOther.v)}var $=[this.PE,this.Nf,this.v2,this.Nq];for(var F=0;F<$.length;F++)if(c)$[F].hp();
else $[F].bJ()};function cJ(x){kw.call(this);this.Av={};this.n=E.p("div");this.bZ=x;this.Ns=null;this.Ah=new bC(0,0);
this.OV="position:relative;overflow:hidden;background-color:var(--bg-canvas);";this.N7=null;this.vp=new E.MZ(this.n);
this.vM("grab");this.GP=E.p("canvas","canv");this.n.appendChild(this.GP);this.Yt=this.GP.getContext("2d",{willReadFrequently:!0});
this.av5=null;this.Dc=null;this.Hh=null;this.yM=0;this.am8=0;this.sQ=0;this.qT=0;this.axV=this.ah0.bind(this);
this.ava=null;this.Q=new dB({m:1,e:1});this.cW=null;this.oH=null;this.eL=[];this.aaU=0;this.tp=0;this.aDJ=this.Nn.bind(this);
this.a5_=this.G3.bind(this);this.ahb=this.zc.bind(this);this.ahj=this.M3.bind(this);this.akL=0;this.ig=null;
this.a9v(this.GP);this.dN(this)}cJ.prototype=new kw;cJ.prototype.a2x=function(x){this.Av=x;this.Zi()};
cJ.A1=function(x){var Q=new fM(!0);if(x>=0)Q.kQ("Space");if(x>=1){Q.kQ("ControlLeft");if(x==2)Q.kQ("AltLeft")}return Q};
cJ.prototype.sM=function(x){var Q=this.N7,c=null;if(x.S(fM.r_)){c="grab";if(x.S(fM.qP)){c="zoom-in";
if(x.S(fM.Al))c="zoom-out"}}this.Ns=c;if(c)Q=c;this.vp.BM(Q,this.OV);if(x.S(fM.qP)){var $=0;if(x.S(fM.LJ))$=1;
if(x.S(fM.m8))$=-1;if($!=0){this.GE(new bC(this.GP.width/2,this.GP.height/2),$==1)}}};cJ.prototype.vM=function(x){this.N7=x;
if(this.Ns)return;this.vp.BM(x,this.OV)};cJ.prototype.a9v=function(x){E.KH(x,this.aDJ);E.J1(x);x.addEventListener("wheel",this.ahj,!1)};
cJ.prototype.dN=function(x){x.k("viewchange",this.a9X,this)};cJ.prototype.a9X=function(x){var Q=this.Q.W,c=x.currentTarget.m1();
this.Q.W=c.W;this.Q.z=c.z.clone();if(Q!=c.W)this.zm();this.Zi()};cJ.prototype.m1=function(){return{W:this.Q.W,z:this.Q.z}};
cJ.prototype.U=function(x,Q,c,$){var z=x[0].K$;if(this.Dc!=null&&this.Dc[0].K$.HM(z)){}else{this.Q.Ta={m:z.m,e:z.e};
this.Q.W=1;this.Q.z=new bC(0,0)}this.Dc=x;this.zm($);this.jh();this.yM=0;this.am8=Date.now();this.sQ=0;
this.qT=Q==null?0:Q;if(c)this.Av=c;this.ah0()};cJ.prototype.M3=function(x){x.preventDefault();if(x.deltaY==0||Date.now()-this.akL<100)return;
var Q=E.GK(x);Q.x=E.q_()*Q.x;Q.y=E.q_()*Q.y;this.akL=Date.now();this.GE(Q,x.deltaY<0)};cJ.prototype.GE=function(x,Q){X.nF.Ec(this.Q,x,Q);
this.agK()};cJ.prototype.MR=function(x){var Q=this.Q,c=Q.Ta;this.Q.W=X.nF.rK(c.m,c.e,Q.yY.m,Q.yY.e);
if(x)this.Q.z=new bC(0,0);this.agK()};cJ.prototype.agK=function(){this.zm();this.T(new jO("viewchange"));
this.T(new jO("zoom"))};cJ.prototype.zm=function(x){var Q=this.Hh;this.Hh=[];var c=this.Q.W;if(this.Dc==null)return;
if(x){var $=d.iE(c),z=1;for(var j=0;j<$.length;j++)z*=$[j];var U=x.x,i=x.y,b=U+x.m,e=i+x.e;U=Math.floor(U/z)*z;
b=Math.ceil(b/z)*z;i=Math.floor(i/z)*z;e=Math.ceil(e/z)*z;x=new gh(U,i,b-U,e-i)}for(var F=0;F<this.Dc.length;
F++){var k=this.Dc[F],K=new Uint8Array(k.data),g;if(c>=1)g={AX:K,rect:k.K$};else{if(Q&&Q[F]&&x){var R=d.R(x.P()*4);
d.WK(K,k.K$,R,x);var T=d.$_(R,x,c),D=T.rect;D.x=Math.floor(D.x*c);D.y=Math.floor(D.y*c);g=Q[F];d.WK(T.AX,T.rect,g.AX,g.rect)}else g=d.$_(K,k.K$,c)}this.Hh[F]=g}};
cJ.prototype.jh=function(){clearTimeout(this.ava)};cJ.prototype.Zi=function(){if(this.Dc==null||!E.rm(this.GP))return;
var x=this.av5,Q=this.GP.width,c=this.GP.height,T,D;if(x==null||x.width!=Q||x.height!=c){x=this.av5=this.Yt.createImageData(Q,c);
console.log("creating image data")}var $=this.Dc[this.yM],z=this.Hh[this.yM],j=this.Q,U=j.Ta,i=j.yY,b=i.m,e=i.e,k=U.m*j.W,K=U.e*j.W,g=Math.round((b-k)/2+j.z.x),R=Math.round((e-K)/2+j.z.y);
if(j.W<=1){D=z.rect.clone();D.x=g;D.y=R;k=D.m;K=D.e;T=z.AX}else{var a=1/j.W,_=new gh(Math.floor((i.x-g)*a),Math.floor((i.y-R)*a),Math.ceil(i.m*a)+1,Math.ceil(i.e*a)+1),I=new gh(0,0,_.m*j.W,_.e*j.W);
I.x=_.x*j.W+g;I.y=_.y*j.W+R;if(j.EB==null||j.EB.length!=_.P()*4){j.EB=d.R(_.P()*4)}if(j.BC==null||j.BC.length!=I.P()*4){j.BC=d.R(I.P()*4)}d.h4(j.EB,0);
d.WK(z.AX,z.rect,j.EB,_);d.scale.hR(j.EB,_.m,_.e,j.BC,I.m,I.e,j.W);T=j.BC;D=I}var f=new Uint8Array(x.data.buffer);
d.ma(f,b,e,8,-g,-R);d.l.UY("norm",T,D,f,i,i,1);var y=this.Yt;y.setTransform(1,0,0,1,0,0);y.putImageData(x,0,0);
y.clearRect(g-4e3,R,4e3,K);y.clearRect(g+k,R,4e3,K);y.clearRect(g-4e3,R-4e3,k+8e3,4e3);y.clearRect(g-4e3,R+K,k+8e3,4e3);
var Z=cJ.abh(j.W,"#ffffff");y.putImageData(Z,0,j.yY.e-Z.height);var v=this.Av,j=this.Q;if(v){var G=fN.Ij([.1,.5,1,1]),q=fN.Ij([1,0,0,1]),h=fN.Ij([1,1,1,1]),r=fN.Ij([0,0,0,1]),H=j.FG(!1);
H.HQ();y.save();y.setTransform(H.V,H.J,H.dC,H.xq,H.DX,H.ti);y.strokeStyle=q;if(v.akf){fN.op(v.akf,null,y);
y.lineWidth=1/j.W;y.stroke()}y.strokeStyle=h;if(v.anD){fN.op(v.anD,null,y);y.lineWidth=1/j.W;y.stroke();
y.strokeStyle=r;y.setLineDash([4/j.W,4/j.W]);y.stroke();y.setLineDash([])}y.strokeStyle=G;y.fillStyle=fN.Ij([1,1,1,1]);
if(v.LV){fN.op(v.LV,null,y);y.lineWidth=1/j.W;y.stroke()}if(v.SE){fN.r6(v.SE,y,j,.5);y.lineWidth=2/j.W;
y.stroke();y.fill()}if(v.IN){y.font=16/j.W+"px sans-serif";var o=1/j.W;for(var F=0;F<v.IN.length;F++){var P=v.IN[F],O=P[0],p=P[1]+6/j.W,C=P[2];
y.fillStyle="black";y.fillText(C,O-o,p);y.fillText(C,O+o,p);y.fillStyle="white";y.fillText(C,O,p)}}y.restore()}y.getImageData(0,0,1,1)};
cJ.ayC="";cJ.afB=null;cJ.abh=function(x,Q,c,$){if(c==null){c=0;$=0}var z=c+" \xD7 "+$,j="z"+x+","+Q+","+c+","+$;
if(j==cJ.ayC)return cJ.afB;var U=Math.round(50*E.q_()),i=Math.round(18*E.q_()),b=c==0?0:Math.round((z.length+2)*i*.35),e=E.p("canvas"),k=e.getContext("2d");
e.width=U+b;e.height=i;k.fillStyle="rgba(1,1,1,1)";k.fillRect(0,0,U,i);if(c!=0)k.fillRect(U+2,0,b,i);
k.font=Math.round(11*E.q_())+"px monospace";k.fillStyle=Q;var g=x*100;if(g<100)g=g.toFixed(2);else g=Math.round(g);
g=g+"%";var R=k.measureText(g).width;k.fillText(g,(U-R)/2,Math.round(i*.7));if(c!=0){var T=k.measureText(z).width;
k.fillText(z,U+(b-T)/2+1,Math.round(i*.7))}var D=k.getImageData(0,0,U+b,i);cJ.ayC=j;cJ.afB=D;return D};
cJ.prototype.ah0=function(){var x=this.Dc,Q=x.length,c=this.yM,$=this.Dc[c],z=(c+1)%Q;this.Zi();var j=Date.now();
if(Q!=1&&x[z].K$.HM($.K$)){var U=$.rF?parseInt($.rF.split(",").pop()):30;if(U==0)U=16;if(z==0)this.sQ++;
if(this.qT==0||this.sQ<this.qT)this.ava=setTimeout(this.axV,U)}this.yM=z;this.am8=j};cJ.prototype.oN=function(x,Q){if(x<=0||Q<=0)return;
var c=Math.floor(x*E.q_()),$=Math.floor(Q*E.q_());this.Q.yY=new gh(0,0,c,$);this.GP.width=c;this.GP.height=$;
this.GP.setAttribute("style","width:"+c/E.q_()+"px; height:"+$/E.q_()+"px; display:block;");this.Zi()};
cJ.prototype.ys=function(x){var Q=-1,c=this.eL;for(var F=0;F<c.length;F++)if(c[F].pointerId==x.pointerId)Q=F;
return Q};cJ.prototype.Nn=function(x){var Q=this.ys(x),c=this.eL;if(Q!=-1)c[Q]=x;else c.push(x);if(c.length==1){this.ig=x.target;
E.d3(window,this.a5_);E.AU(window,this.ahb);this.cW=E.GK(x,this.GP);this.cW.x*=E.q_();this.cW.y*=E.q_();
this.Ah=this.cW;this.oH=this.Q.z.clone();if(this.bZ&&this.ig==this.GP&&!this.Ns)this.T(new jO("mousedown"))}else this.aaU=this.tp=bC.Xc(E.GK(c[0],this.GP),E.GK(c[1],this.GP))};
cJ.prototype.G3=function(x){var Q=this.ys(x),c=this.eL;if(Q!=-1)c[Q]=x;var $=this.Q,z=this.Ns,j=this.Dc[this.yM].K$.clone();
j.m*=$.W;j.e*=$.W;var U=E.GK(x,this.GP);U.x*=E.q_();U.y*=E.q_();this.Ah=U;if(this.bZ&&this.ig==this.GP&&!z)this.T(new jO("mousemove"));
else if(z=="grab"||z==null){if(c.length>1){var i=E.GK(c[0],this.GP),b=E.GK(c[1],this.GP),e=new bC(E.q_()*(i.x+b.x)/2,E.q_()*(i.y+b.y)/2),k=bC.Xc(i,b),K=null;
if(k>this.tp+50){this.tp+=50;K=!0}if(k<this.tp-50){this.tp-=50;K=!1}if(K!=null)this.GE(e,K);return}else{var g=U.x-this.cW.x,R=U.y-this.cW.y;
$.z.x=this.oH.x+Math.round(g);$.z.y=this.oH.y+Math.round(R)}this.T(new jO("viewchange"))}};cJ.prototype.zc=function(x){var Q=this.ys(x),c=this.eL;
c.splice(Q,1);if(c.length==0){E.hY(window,this.a5_);E.Wr(window,this.ahb);var $=this.Ns;if(x.detail>1){this.Q.W=1;
this.Q.z.r$(0,0);this.Zi()}if(this.bZ&&this.ig==this.GP&&!this.Ns)this.T(new jO("mouseup"));else{if($=="zoom-in"||$=="zoom-out")this.GE(this.Ah,$=="zoom-in")}}else{var z=this.cW=E.GK(c[0],this.GP);
z.x*=E.q_();z.y*=E.q_()}};cJ.prototype.s_=function(x){var Q=this.Ah;if(x){Q=E.GK(x,this.GP);Q.x*=E.q_();
Q.y*=E.q_()}return this.Q.$X(Q.x,Q.y)};function hQ(){kw.call(this);this.fq=null;this.Ie=null;this.Gn=null;
this.cq=null;this.afI="";this.h$=[];this.N_=0;this.T2=[];this.mU=0;this.n$=null;var x=this.n=E.p("div",""),Q=this.at7=E.p("div","form");
Q.setAttribute("style","line-height:0; margin-bottom:0.5em;");x.appendChild(Q);var c=this.Su=E.p("span");
Q.appendChild(c);c.setAttribute("style","font-size:1.2em; font-weight:bold; margin-right:3em;");var $=this.asw=new f2([25,2,0]);
$.U(!0);Q.appendChild($.n);$.k(u.E.t,this.Og,this);var z=this.Tk=new f2([25,2,1]);z.U(!0);Q.appendChild(z.n);
z.k(u.E.t,this.Og,this);var j=new jz(" ");Q.appendChild(j.n);var U=this.X6=new el([25,1,1]);Q.appendChild(U.n);
U.k(u.E.t,this.Og,this);this.mo=new jf(14);this.mo.a2q(3);Q.appendChild(this.mo.n);this.mo.parent=this;
this.mo.k(u.E.t,this.a7v,this);var i=this.a6i=new j7([25,1,2],null,null,!0);Q.appendChild(i.n);i.k("click",this.xI,this);
var b=new j7("?",null,null,!0);Q.appendChild(b.n);b.addEventListener("click",function(){alert("All our images come from Pixabay.com and are free to use for commercial purposes.")});
this.adp=this.aox.bind(this);this.ot=E.p("div","svggallery scrollable");x.appendChild(this.ot);this.ot.addEventListener("scroll",this.acZ.bind(this))}hQ.prototype=new kw;
hQ.prototype.Fy=function(x){this.anW=x};hQ.prototype._=function(){this.Su.textContent=ah.get([25,0]);
this.mo._();this.asw._();this.Tk._();this.X6._();this.a6i._()};hQ.prototype.oN=function(x,Q){this.fq=new bC(x,Q);
this.at7.setAttribute("style","width:"+x+"px");var c=this.at7.getBoundingClientRect();Q-=c.height;this.ot.setAttribute("style","width:"+x+"px; height:"+Q+"px");
if(E.rm(this.n))this.Og()};hQ.prototype.U=function(x){this.Ie=x;this.Og()};hQ.prototype.acZ=function(x){var Q=this.ot;
if(Q.scrollTop+Q.clientHeight+10>=Q.scrollHeight){this.Og(!0)}};hQ.prototype.a7v=function(x){this.Gn=null;
this.Og()};hQ.prototype.aox=function(x){if(Date.now()-this.mU<2e3)return;this.mU=Date.now();this.N_=this.T2.indexOf(x.currentTarget);
var Q=this.u9(this.Ie.x,this.Ie.y);if(Q[1]){var c=Q[1].largeImageURL,$=new XMLHttpRequest;$.responseType="arraybuffer";
$.open("GET",c,!0);$.onload=this.aqw.bind(this);$.send();return}this.a4n(Q)};hQ.prototype.aqw=function(x){var Q=x.target.response,c=ar.HB(Q),$=ar.pz(c),z=$.fk(Q),j=this.u9(this.Ie.x,this.Ie.y,[Q,z[0].K$.m,z[0].K$.e]);
this.a4n(j)};hQ.prototype.a4n=function(x){var Q=x[0],c=ar.HB(Q),$=ar.pz(c),z=new hf("template.psd");
$.fk(Q,z);var j=new jO("tempready",!0);j.data={Ta:z};this.T(j)};hQ.prototype.xI=function(x){var Q=x.target;
this.h$=[];this.Gn=null;this.Og()};hQ.prototype.ar6=function(x){var Q=JSON.parse(x.target.response),c=this.cq=Q.hits;
for(var F=0;F<c.length;F++)if(c[F].user_id==6314823)c.splice(F,1);this.Og()};hQ.prototype.Og=function(x){if(this.Ie==null||this.fq==null||this.anW==null)return;
if(this.fq.x<=0)return;var Q=this.Ie.x,c=this.Ie.y;if(Math.min(Q,c)<50)return;if(x!=!0){this.T2=[];E.Os(this.ot);
this.ot.scrollTop=0}if(this.T2.length>300)return;var $=Math.min(1,300/Math.max(Q,c)),z=this.fq.clone();
z.x-=20;var j=Math.max(1,Math.floor(z.x/(Q*$))),U=Math.max(1,Math.ceil(z.y/(c*$)));$=z.x/j/Q;var i=j*U;
if(this.Gn==null){var b=this.anW.Dn.mW(),e=[];for(var k in b){var K=b[k],g=K[3];if(!this.mo.Hr(K))continue;
if(K[5]==null||K[5].slice(0,2)=="gf")continue;e.push(K)}if(e.length==0)e.push(b.DejaVuSans);var R=e.length;
for(var F=0;F<R*10;F++){var T=Math.floor(Math.random()*R),D=Math.floor(Math.random()*R),a=e[T];e[T]=e[D];
e[D]=a}e=e.slice(0,10);this.Gn=e}var _=this.Tk.h(),I=this.X6.h().trim();this.X6.vz(_);if(_&&(this.cq==null||I!=this.afI)){var f=new XMLHttpRequest,y="https://pixabay.com/api/?image_type=photo"+(I==""?"":"&q="+encodeURIComponent(I))+"&per_page=200&page=1&key=10554583-a5eacb61c2e61105fdfb6eb88&safesearch=true";
if(I=="")y="plugins/gallery.json";f.open("GET",y,!0);f.onload=this.ar6.bind(this);f.onerror=function(r){console.log(r.target.response)};
f.send();this.afI=I;return}$*=(Q*$-5)/(Q*$);var Z=this.T2.length;for(var F=0;F<i;F++){var v=this.N_=Z+F;
if(this.h$[v]==null)this.h$[v]=Math.floor(Math.random()*4294967295);var G=this.u9(Math.round(Q*$),Math.round(c*$)),q=G[0];
q=w.IV(new Uint8Array(q));var h=E.p("span");h.innerHTML=q;this.T2.push(h);this.ot.appendChild(h);h.addEventListener("click",this.adp,!1)}};
hQ.prototype.u9=function(x,Q,c){var $=this.Tk.h(),z=this.asw.h(),j=$&&this.cq.length!=0?this.cq:null;
if(z&&!$)j=null;if(z&&$&&(this.N_&1)==0)j=null;return dZ.JE(x,Q,this.h$[this.N_],this.Gn,c?c:j)};function j4(){kw.call(this);
this.n=E.p("div");this.EU=null;this.a5k=null;this.Wt=-1;this.E2={JPG:[{nX:new bv([12,52,0],0,100,"%",null,null,!0),vW:70},{nX:new f2("attach metadata"),vW:!1}],TIFF:[{nX:new f2("attach metadata"),vW:!1}],WEBP:[{nX:new bv([12,52,0],0,100,"%",null,null,!0),vW:70},{nX:new f2("attach metadata"),vW:!1}],GIF:[{nX:new bv([12,52,0],0,100,"%",null,null,!0),vW:100},{nX:new f2([12,23,3]),vW:!1}],PNG:[{nX:new bv([12,52,0],0,100,"%",null,null,!0),vW:100},{nX:new f2("don't use palettes"),vW:!1}],BMP:[{nX:new f2("don't use palettes"),vW:!1}],PDF:[{nX:new el([12,52,1]),vW:""},{nX:new bv([12,52,0],0,100,"%",null,null,!0),vW:100},{nX:new f2("reverse pages"),vW:!1},{nX:new f2("rasterize all"),vW:!1},{nX:new f2("vectorize text"),vW:!1},{nX:new bv("Add Margin",0,5,"in",2),vW:0},{nX:new f2("add crop marks"),vW:!1}],EMF:[{nX:new el([12,52,1]),vW:""},{nX:new bv([12,52,0],0,100,"%",null,null,!0),vW:100},{nX:new f2("reverse pages"),vW:!1},{nX:new f2("rasterize all"),vW:!1},{nX:new f2("vectorize text"),vW:!1},{nX:new bv("Add Margin",0,5,"in",2),vW:0}],SVG:[{nX:new f2("add raster graphics"),vW:!0},{nX:new f2("add hidden layers"),vW:!1},{nX:new f2("vectorize text"),vW:!1},{nX:new f2("rasterize text"),vW:!1},{nX:new f2("minify"),vW:!1}],RAW:[{nX:new c_([12,72],["1","3","4"]),vW:2},{nX:new c_([12,34],["8 Bits","16 Bits"]),vW:0},{nX:new c_("Byte Order",["12-34","34-12"]),vW:0}],DDS:[{nX:new c7("Compression",["8x | BC1","4x | BC3","4x | BC7","None"]),vW:0},{nX:new f2("Add Mipmaps"),vW:!0}],MP4:[{nX:new bv([12,52,0],0,100,"%",null,null,!0),vW:50}],anim:[{nX:new bv("Speed",10,1e3,"%",null,!0,!0),vW:100},{nX:new f0("Repeat (0 = Forever)",0,10," \xD7",0,!1,!0),vW:0},{nX:new f2("reverse frames"),vW:!1},{nX:new f2("boomerang"),vW:!1}],slcs:[{nX:new f2([8,11,0]),vW:!0}],artb:[{nX:new f2([1,16,1]),vW:!0}],hicc:[{nX:new f2("convert to sRGB"),vW:!0}]};
for(var x in this.E2){var Q=this.E2[x];for(var F=0;F<Q.length;F++){Q[F].nX.U(Q[F].vW);Q[F].nX.k(u.E.t,this.IE,this)}}}j4.prototype=new kw;
j4.prototype.a6f=function(){this.Wt=-1};j4.prototype._=function(){for(var x in this.E2)for(var F=0;F<this.E2[x].length;
F++)this.E2[x][F].nX._()};j4.prototype.IE=function(){this.Og();this.T(new jO(u.E.t,!1))};j4.prototype.Og=function(){var x=this.EU,Q=x[0],c=x[1],$=x[2],z=x[3],j=x[4],U=this.E2[Q];
if(U==null)U=[];else U=U.slice(0);if(c)U=U.concat(this.E2.anim);if(["GIF","PNG","JPG"].indexOf(Q)!=-1&&$)U=U.concat(this.E2.slcs);
else if(["GIF","PNG","JPG","SVG"].indexOf(Q)!=-1&&z)U=U.concat(this.E2.artb);if(j)U=U.concat(this.E2.hicc);
var i=x.join(",");if(i!=this.Wt){this.Wt=i;E.Os(this.n);for(var F=0;F<U.length;F++){if(Q=="PDF"&&!z&&(F==0||F==2))continue;
this.n.appendChild(U[F].nX.n);E._X(this.n)}}var b=this.a5k=[];for(var F=0;F<U.length;F++)b.push(U[F].nX.h())};
j4.prototype.zE=function(x,Q,c,$,z){this.EU=[x,Q,c,$,z];this.Og()};j4.prototype.h=function(){return this.a5k.slice(0)};
j4.prototype.U=function(x,Q){var c=this.EU,$=c[0],z=this.E2[$],j=Math.min(z.length,x.length);for(var F=0;
F<j;F++)z[F].nX.U(x[F]);this.Og();if(Q!=!0)this.IE()};function iG(){kw.call(this);this.n=E.p("span","fitem");
this.wa=!1;this.Sp=new j7("No",!1,"Cancel");this.CH=new j7("Yes",!1,"Confirm");this.n.appendChild(this.Sp.n);
this.n.appendChild(this.CH.n);this.Sp.k("click",this.Px,this);this.CH.k("click",this.Px,this);this._()}iG.prototype=new kw;
iG.prototype._=function(){this.Sp.UG(E.Qk("cross",null,"autoscale"));this.CH.UG(E.Qk("checkmark",null,"autoscale"))};
iG.prototype.Px=function(x){this.wa=x.target==this.CH;this.T(new UIEvent("click"))};iG.prototype.h=function(){return this.wa};
function bW(x){kw.call(this);this.n=E.p("span","fitem");this.Jq=new j7("\u25BC",null,"Auto Options",!0);
E.KH(this.Jq.n,this.aD9.bind(this));this.n.appendChild(this.Jq.n);this.IU=new j7("Auto",null,null,!0);
this.IU.k("click",this.Z9,this);this.n.appendChild(this.IU.n);this.Sn=new cT("Algorithms",["Enhance Monochromatic Contrast","Enhance Per Channel Contrast","Find Dark & Light Colors","Enhance Brightness And Contrast"],null,null,!0);
this.Sn.k(u.E.t,this.Z9,this);this.Sn.U([!1,!1,!1,!0]);this.CU=new kw;var Q=this.CU.n=E.p("div","floatcont form");
Q.setAttribute("style","width: 250px;");this.CU.parent=this;Q.appendChild(this.Sn.n);this.Oo=[];for(var F=0;
F<2;F++){var c=new f0((F==0?"Shadows":"Highlights")+" Clip",0,9.99,"%",2,!1,!0);c.U(.1);c.k(u.E.t,this.Z9,this);
this.Oo.push(c);Q.appendChild(c.n)}}bW.prototype=new kw;bW.prototype.Z9=function(x){this.T(new jO(u.E.t,!1))};
bW.prototype._=function(){};bW.prototype.h=function(){return[this.Sn.h().indexOf(!0),this.Oo[0].h(),this.Oo[1].h()]};
bW.prototype.aD9=function(x){if(E.rm(this.CU.n))return;x.stopPropagation();var Q=this.Jq.n.getBoundingClientRect(),c=new jO(u.E.M,!0);
c.data={d:u.H.A_,G7:this.CU,x:Q.left,y:Q.top+Q.height+4};this.T(c)};function iT(){kw.call(this);var x=this.n=E.p("div","fitem");
this._4=new c7([12,46],[[13,1,8],[13,1,10],[13,1,9],[12,47]]);this._4.k(u.E.t,this.G1,this);x.appendChild(this._4.n);
this.Ik=new hc(!1);this.Ik.parent=this;this.Ik.wC(16777215);this.Ik.k(u.E.t,this.G1,this);x.appendChild(this.Ik.n)}iT.prototype=new kw;
iT.prototype._=function(){this._4._();this.Ik._()};iT.prototype.aqM=function(x){var Q=[x.artboardBackgroundType.v-1];
if(x.Clr)Q.push(x.Clr.v);this.U(Q)};iT.prototype.ac0=function(){var x=this.h();return{classID:"artboard",Clr:{t:"Objc",v:x[1]},artboardBackgroundType:{t:"long",v:x[0]+1}}};
iT.prototype.U=function(x){this._4.U(x[0]);if(x[1])this.Ik.U(x[1])};iT.prototype.h=function(){return[this._4.h(),this.Ik.h()]};
iT.prototype.G1=function(x){if(x.target==this.Ik)this._4.U(3);this.T(new jO(u.E.t,!1))};function j9(x){kw.call(this);
this.ac=x;this.avj=0;this.aaD=!1;this.hs=x?new j9.J8:null;this.n=E.p("div","flexrow storageset");this.n.style.background="var(--bg-panel)";
this.uD=E.p("div");this.n.appendChild(this.uD);this.BL=E.p("div");this.n.appendChild(this.BL);this.Aw=[];
var Q=Storage.list.length;if(x)Q=Q+1+j9.em.length;var c=this.af.bind(this);for(var F=0;F<Q;F++){var $=E.p("div");
this.Aw.push($);this.uD.appendChild($);$.addEventListener("click",c,!1)}this.af(null,0)}j9.prototype=new kw;
j9.aF=[];j9.Mh=function(x){j9.aF.push(x);x._I()};j9.Zc=function(){var x=j9.aF;x.pop();x[x.length-1]._I()};
j9.prototype._I=function(){this.af(null,this.avj)};j9.prototype.Fy=function(x,Q){if(!x.Lk&&!this.aaD){var c=this.ac?2:1;
for(var F=c;F<this.Aw.length;F++)this.uD.removeChild(this.Aw[F]);this.aaD=!0;if(this.ac)this.hs.Fy(x,Q)}if(this.qh)this.qh.Fy(x,Q)};
j9.prototype._=function(){if(this.ac)this.hs._();if(this.qh)this.qh._()};j9.prototype.af=function(x,Q){var c=this.Aw,$;
if(Q==null)Q=c.indexOf(x.currentTarget);this.avj=Q;for(var F=0;F<c.length;F++)E.WP(c[F],"active");E.ZW(c[Q],"active");
if(this.ac)Q--;E.Os(this.BL);var z=Storage.list.length;if(Q==-1)$=this.hs;else if(Q<z)$=Storage.Ph(Q);
else{var j=j9.em[Q-z];$=new j9.xP(j[1])}this.qh=$;$.parent=this;this.BL.appendChild($.n);this.oN(this.ww,this.R0);
this._()};j9.prototype.oN=function(x,Q){this.ww=x;this.R0=Q;var c=x<850,$=c?50:200,z=Storage.list;if(this.ac)z=[["Home",null,"strg/home"]].concat(z.concat(j9.em));
for(var F=0;F<z.length;F++){var j=this.Aw[F],U="padding: 8px "+(c?13:36)+"px; cursor:pointer;";j.setAttribute("style",U);
var i=z[F][2],b=i.indexOf(".")!=-1;i=b?i:PIMG[i];j.innerHTML="<img style=\"margin:0 10px -6px 0; width:22px;\" class=\""+(b?"":"gsicon")+"\" src=\""+i+"\" /> "+(c?"":z[F][0])}this.n.style.width=x+"px";
this.n.style.height=Q+"px";this.uD.style.width=$+"px";this.uD.style.paddingTop="32px";if(this.qh)this.qh.oN(x-$,Q)};
j9.em=[["Design contest","code/storages/wows.html","img/wows_logo.png",!0,"Join the contenst!",1686144664]];
for(var F=0;F<j9.em.length;F++)if(j9.em[F][5]*1e3<Date.now()){j9.em.splice(F,1);F--}j9.J8=function(){this.yy=null;
var x=this.n=E.p("div");x.style.background="var(--bg-canvas)";var Q=this.Ca=E.p("div");x.appendChild(Q);
var c=E.p("style");x.appendChild(c);c.textContent=" .bhover       { transition: background 0.2s ease-in-out;  background:rgba(255,255,255,0   );} "+" .bhover:hover { transition: background 0.2s ease-in-out;  background:rgba(255,255,255,0.05);}";
for(var F=0;F<2;F++){var $=E.p("div"),c="filter: drop-shadow(4px 6px 4px rgba(0,0,0,0.25)); ";Q.appendChild($);
if(F==0)c+="padding: 12px 0px";if(F==1)c+="position:absolute;  bottom:0;";$.setAttribute("style",c);
var z=E.p("img");$.appendChild(z);z.setAttribute("src",PIMG[F==0?"l"+"o"+"g"+"o":"b"+"o"+"t"+"t"+"o"+"m"]);
if(F==0)this.$d=z;else this.ad1=z;if(F==0)this.agp=$;else this.a5A=$}this.Aw=[];c="display:inline-block;  font-size:1.25em; border:1px solid #aaa;  border-radius:6px;  margin:20px 0 0 20px;";
var j=this.od.bind(this),U=E.p("div");Q.appendChild(U);U.setAttribute("style","width:min(80%,556px);  margin:0px 0 0 10px;  text-align:center");
for(var F=0;F<4;F++){var i=E.p("span","bhover");this.Aw.push(i);i.setAttribute("style",c+"cursor:pointer; padding:12px;");
i.addEventListener("click",j,!1);U.appendChild(i)}E._X(Q);var $=E.p("div");$.setAttribute("style",c+"width:min(80%,556px);  padding:60px 0;  text-align:center; opacity:0.3;");
$.textContent="Drop any files here";Q.appendChild($);this.GP=E.p("canvas");this.GP.setAttribute("style","position:absolute;top:0;pointer-events:none; mix-blend-mode: screen;");
this.Yt=this.GP.getContext("2d");this.and=d.R(4);x.appendChild(this.GP);var b=new Date().getDate(),e=new Date().getMonth();
if(e==11&&b>20||e==0&&b<10){var k=Math.random()<.5,K={Z:255,r:255,J:255};if(!k){K=d.Us(Math.random(),Math.random()*.7,1);
K.Z*=255;K.r*=255;K.J*=255}this.QX=[Math.round(1048575*Math.random()),k?.05:.02,Math.round(4+Math.random()*8),1,k?3:15,K,0,!0,k,k?1:.2,3];
this.aDi=k?.1:.2;this.LE=this.xF.bind(this);window.requestAnimationFrame(this.LE)}};j9.J8.prototype=new kw;
j9.J8.prototype.xF=function(){window.requestAnimationFrame(this.LE);if(!E.rm(this.n))return;var x=this.and,Q=this.GP,c=this.Yt,$=Q.width,z=Q.height;
this.QX[6]=Date.now()*.001*this.aDi;d.rv.Jg(x,$,z,this.QX,!0);c.putImageData(new ImageData(new Uint8ClampedArray(x.buffer),$,z),0,0)};
j9.J8.prototype.od=function(x){var F=this.Aw.indexOf(x.currentTarget),Q=new jO(u.E.M,!0);if(F==0)Q.data={d:u.H.LL,AD:"newproject"};
if(F==1)Q.data={d:u.H.OD};if(F==2)Q.data={d:u.H.LL,AD:"res0"};if(F==3)Q.data={d:u.H.Ic};this.T(Q)};j9.J8.prototype._=function(){var x=this.Aw,Q=[[11,7],[1,6],[25,0],[0,17,6]],c=["\u2605","\uD83E\uDC7F","\u25A3"],c=["lrs/newlayer","strg/tdevice","pix_layer","lrs/clipping"];
for(var F=0;F<x.length;F++)x[F].innerHTML="<span style=\"vertical-align:middle\">"+E.Qk(c[F],null,"autoscale")+"</span>\u2000"+ah.get(Q[F]);
var $="l"+"o"+"g"+"o",z=$+"_"+["pp","vp"][i9],j=new Date;if(j.getMonth()==3&&j.getDate()==1)z="lo"+"go_cuc"+"umber";
if(PIMG[$])z=$;this.$d.setAttribute("src",PIMG[z]);this.ad1.setAttribute("src",PIMG["b"+"o"+"t"+"t"+"o"+"m"])};
j9.J8.prototype.oN=function(x,Q){var c=Math.min(Q*1.5,Math.min(x,600));E.qr(this.GP,x,c*.26);var $=this.GP.width,z=this.GP.height;
this.and=d.R($*z*4);this.n.style.width=x+"px";this.n.style.height=Q+"px";this.a5A.style.width=x+"px";
this.Ca.style.marginLeft=Math.max(0,Math.round((x+200-600)/2)-200)+"px";this.$d.style.width=c+"px";this.ad1.style.width=c+"px"};
j9.J8.prototype.Fy=function(x,Q){var c=x;if(x==null)x=this.n$;this.n$=x;if(!x.Lk&&this.Aw[2].parent){this.Ca.removeChild(this.Aw[2]);
this.Ca.removeChild(this.Aw[3])}this.Aw[3].style.display=x.t0?"inline-block":"none";if(c)this.yy=setTimeout(this.Fy.bind(this),100)};
j9.xP=function(x){var Q=this.n=E.p("iframe");Q.style.background="var(--bg-canvas)";Q.setAttribute("src",x)};
j9.xP.prototype=new kw;j9.xP.prototype.oN=function(x,Q){var c=this.n;c.style.width=x+"px";c.style.height=Q+"px"};
j9.xP.prototype.Fy=function(){};function Storage(x){kw.call(this);var Q=this.n=E.p("div","storage");
E.e5(Q);Q.addEventListener("drop",this.azg.bind(this),!1);var c=this.aeJ=E.p("style");Q.appendChild(c);
Q.setAttribute("tabindex","0");Q.style.outline="none";Q.addEventListener("keydown",this.aa5.bind(this),!1);
this.gY=this.ae8.bind(this);this.du=0;this.Cb=0;var $=E.p("div");Q.appendChild($);var z=this.a2e.bind(this);
this.LG=E.p("div","bar");$.appendChild(this.LG);this.wt=E.p("div","fls scrollable");$.appendChild(this.wt);
this.cF=E.p("div");$.appendChild(this.cF);this.cF.setAttribute("style","position:absolute; bottom:0;  background-color:white; padding: 2px 8px 0px 8px;");
this.$z=E.p("div","bar");this.$z.textContent="Name: ";var j=this.hf=E.p("input");j.setAttribute("type","text");
this.$z.appendChild(j);var U=this.dB=E.p("div","btn");U.textContent="Save";this.$z.appendChild(U);E.AU(U,z);
E.KH(this.wt,this.gY);this.Xv=0;this.ci=x;var i=this.a89.bind(this),b=this.atk=E.p("div");b.setAttribute("style","text-align:center; font-size:1.6em");
var e=E.p("img");b.appendChild(e);E._X(b);e.setAttribute("src",PIMG[Storage.list[this.ci][2]]);e.setAttribute("style","opacity:0.5;  width:25%; cursor:pointer;");
E.AU(e,i);this.Vt=E.p("div","btn");b.appendChild(this.Vt);E.AU(this.Vt,i);this.rO=new ev([{name:[6,20]},{name:[5,2],KR:[fM.qP,fM.UE],w:function(){return{w:Storage.pF!=null}}}]);
this.rO.parent=this;this.rO.k("select",this.f5,this);this.wt.addEventListener("contextmenu",this.gY);
this.agG=E.p("span");this.ZN=E.p("span");this.ZN.setAttribute("style","position:absolute; right:0; top:5px;");
this.qe=[];this.Ii=[];for(var F=0;F<3;F++){var k=E.p("div","btn");this.qe.push(k);this.agG.appendChild(k);
E.AU(k,z);k.textContent=["\u2B9C","\u2B9E","\uD83E\uDC09"][F]}for(var F=0;F<5;F++){var k=E.p("div","btn");
this.Ii.push(k);this.ZN.appendChild(k);E.AU(k,z)}window.addEventListener("message",this.aq3.bind(this),!1);
this.auS=!1;this.HZ=0;setInterval(this.axx.bind(this),300);this.pp();var K=this.az1=document.createElement("input");
K.setAttribute("type","file");K.addEventListener("change",this.azg.bind(this),!1);document.body.appendChild(K);
K.setAttribute("style","display:none");K.setAttribute("multiple","")}Storage.prototype=new kw;Storage.wx=!1;
Storage.prototype.azg=function(x){x.stopPropagation();x.preventDefault();var Q=x.dataTransfer?x.dataTransfer.files:x.target.files;
this.ad8=Q.length;Storage.pF={};for(var F=0;F<Q.length;F++){var c=Q[F],$=new FileReader;$.Qr=c;$.onload=this.a7u.bind(this);
$.readAsArrayBuffer(c)}};Storage.prototype.a7u=function(x){var Q=Storage.pF;Q[x.target.Qr.name]=x.target.result;
this.ad8--;if(this.ad8==0)this.gQ()};Storage.prototype.Fy=function(x,Q){var c=Storage.list[this.ci][3],$=dQ.rf();
if(c){if(this.HZ==1&&E.rm(this.n)&&$!=null){this.pp()}if(this.HZ==2&&$==null){this.HH("forget","")}}};
Storage.prototype.axx=function(){var x=E.rm(this.n),Q=this.auS;if(x&&!Q){history.pushState(null,null,location.href);
window.onpopstate=function(){history.go(1)}}if(!x&&Q){window.onpopstate=function(){};history.go(-1)}this.auS=x};
Storage.prototype.pp=function(){if(this.U8)document.body.removeChild(this.U8);this.mE=[[]];this.$C=0;
this.asa={"/":[]};this.a4z="";this.Bx=null;this.Gp=[];this.wG=[];this.aBJ=[];this.ahi=null;var x="code/storages/"+Storage.list[this.ci][1],Q=this.U8=E.p("iframe");
Q.setAttribute("src",x);Q.setAttribute("style","display:none");document.body.appendChild(Q)};Storage.prototype.Tv=function(){return this.asa[this.JX()]};
Storage.prototype.BH=function(x){this.asa[this.JX()]=x};Storage.Ph=function(F){var x=Storage.cJ[F];if(x==null)x=Storage.cJ[F]=new Storage(F);
return x};Storage.cJ=[];Storage.iV=0;Storage.a3h="";Storage.VW=function(x,Q){Storage.iV=x;Storage.a3h=Q;
var c=Storage.cJ;for(var F=0;F<c.length;F++)if(c[F])c[F]._I()};Storage.a9N=[500*(1<<20),5e3*(1<<20)];
Storage.$M=0;Storage.hC=2;Storage.DO=0;Storage.list=[["This Device","deviceStorage.html","strg/tdevice",!1,"Give Photopea a direct access to a specific folder in your device."],["PeaDrive","peadriveStorage.html","strg/peadrive",!0,"A cloud storage system from Photopea."],["Dropbox","dropboxStorage.html","strg/dropbox",!1,"Give Photopea a direct access to your DropBox."],["OneDrive","onedriveStorage.html","strg/onedrive",!1,"Give Photopea a direct access to your OneDrive."],["Google Drive","googledriveStorage.html?mode=0","strg/gdrive",!1,"Give Photopea a direct access to your Google Drive."],["Shared Drives","googledriveStorage.html?mode=1","strg/gdrive",!1,"Give Photopea a direct access to Shared Drives in your Google Drive."],["Private Folder","googledriveStorage.html?mode=3","strg/gdrive",!1,"Let's make a folder \"Photopea\" in your Google Drive (we will have access only to that folder)."]];
Storage.aqp=function(x){for(var F=0;F<Storage.cJ.length;F++){if(Storage.cJ[F]&&Storage.cJ[F].U8.contentWindow==x)return!0}return!1};
Storage.prototype.aa5=function(x){if(x.target.tagName=="INPUT")return;var Q=fM;if(Q.Ma(x.code,Q.Hm)&&this.JX().length!=0)this.aer();
else if(x.ctrlKey){if(Q.Ma(x.code,Q.H)){var c=[];this.BH(c);for(var F=0;F<this.Bx.length;F++)c.push(F);
this.Mt()}if(Q.Ma(x.code,Q.tt))this.KB(2);if(Q.Ma(x.code,Q.UE))this.gQ()}else if(Q.Ma(x.code,Q.ln)){var $=this.Tv();
if($.length!=0)this.a4J($[0])}else if(Q.Ma(x.code,Q.Z1)){this.$C=Math.max(this.$C-1,0);this.sa()}else{var z=0;
for(var F=65;F<=90;F++)if(x.code=="Key"+String.fromCharCode(F))z=F;if(z!=0){var j=String.fromCharCode(z).toLowerCase(),U=[],i=this.Bx,b;
for(var F=0;F<i.length;F++)if(i[F][0][0].toLowerCase()==j)U.push(F);if(U.length==0)return;var $=this.Tv();
if($.length==0)b=U[0];else{var e=U.indexOf($[0]);if(e==-1){b=U[0];for(var F=0;F<U.length;F++)if(U[F]>$[0]){b=U[F];
break}}else b=U[(e+1)%U.length]}this.BH([b]);this.Mt(!0)}}};Storage.prototype.oN=function(x,Q){this.ww=x;
this.R0=Q;this.n.style.width=x+"px";this.n.style.height=Q+"px";var c=x-30,$=Math.floor(c/230),c=Math.floor(c/$)-70;
this.aeJ.textContent=".storage .tile .name {  width:"+c+"px;  }";this.hf.style.width=x-140+"px";this.wt.style.width=this.LG.style.width=x-20+"px";
this.wt.style.height=Q-70-(Storage.iV==0?0:45)+"px"};Storage.prototype.a89=function(){this.sa()};Storage.prototype.sa=function(){this.Cb=1;
this.HH("show",this.JX())};Storage.prototype.JX=function(x){var Q=this.mE[this.$C],c="/"+Q.join("/");
if(x&&Q.length!=0)c+="/";return c};Storage.prototype.a2e=function(x){var Q=x.currentTarget,c=this.$C,$=this.qe.indexOf(Q),z=this.Ii.indexOf(Q);
if($>=0&&!this.axm($))return;if($==0){this.$C=Math.max(c-1,0);this.sa()}if($==1){this.$C=Math.min(c+1,this.mE.length-1);
this.sa()}if($==2){var j=this.mE[c+1]=this.mE[c].slice(0);j.pop();this.$C++;this.mE=this.mE.slice(0,this.$C+1);
this.sa()}if(z==0){var U=document.createEvent("MouseEvents");U.initMouseEvent("click",!0,!0,document.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null);
this.az1.dispatchEvent(U)}if(z==1){Storage.$M=(Storage.$M+1)%2;this._I()}if(z==2){Storage.hC=(Storage.hC+1)%3;
this._I()}if(z==3){Storage.DO=(Storage.DO+1)%3;this._I()}if(z==4){this.HH("forget","")}if(Q==this.dB){var i=this.hf.value.trim(),b=this.Bx,e=-1;
if(!i.toLowerCase().endsWith("psd")){alert("File Name has to end with \".psd\".");return}for(var F=0;
F<b.length;F++)if(b[F][0]==i)e=F;if(e!=-1){this.eK("Do you really want to replace \""+i+"\"?",this.a5d.bind(this))}else this.a5d()}};
Storage.prototype.a5d=function(){var x=this.hf.value.trim(),Q=[this.ci,this.JX(!0)+x];this.Pc({d:u.H.anz,Hn:Q});
this.T(new jO("canclose",!0))};Storage.prototype.gQ=function(){if(Storage.pF==null)return;this.Pc({d:u.H.Tb,xx:ah.get("Uploading ...")});
this.du=4;dd.Ph(2,this.U8,[this.JX(),Storage.pF,this.Bx],null,this.a4f.bind(this))};Storage.prototype.a4f=function(x){this.du=0;
this.Pc({d:u.H.MM,xx:ah.get("Uploading ...")});this.sa()};Storage.prototype.f5=function(x){var Q=x.target.Vk();
if(x.target==this.rO){if(Q[0]==0){var c=[ah.get([6,20]),-1,0];this.Bx.push(c);this._I();var F=this.Bx.indexOf(c),$=this.Gp[F].querySelector(".name");
console.log($);var z=new cC.qb($,function(K){this.Pc({d:u.H.Tb,xx:ah.get([1,2])+" ..."});var g=this.JX(!0)+K+"/";
console.log(g);this.HH("save",g)}.bind(this),!0)}else this.gQ()}else{if(Q[0]==0){this.KB(2)}else if(Q[0]==1){var F=this.Tv()[0],j=this.Bx[F],$=this.Gp[F].querySelector(".name");
console.log($);$.innerHTML=j[0];var z=new cC.qb($,function(K){K=K.trim();var g=this.Bx;for(var F=0;F<g.length;
F++)if(g[F][0]==K){alert("Item with such name already exists.");this._I();return}var R=this.JX(!0)+j[0]+":"+K;
console.log(R);this.HH("rename",R)}.bind(this))}else if(Q[0]==2){this.KB(3)}else if(Q[0]==3)this.aer();
else if(Q[0]==4){this.KB(1)}else{var U=this.Bx[this.Tv()[0]],i=Storage.pU(U),b=i[Q[1]],e=b[0],k=this.bT().pop()[1];
if(Storage.aqD(U,e)!=-1){this.HH("share",k+":"+e+":-1");alert("Unshared.")}else{this.HH("share",k+":"+e+":"+Q[2]);
alert("Shared.")}}}};Storage.aqD=function(x,Q){var c=x[4];if(c==null)return-1;if(c.indexOf(Q+":0")!=-1)return 0;
if(c.indexOf(Q+":1")!=-1)return 1;return-1};Storage.prototype.aer=function(){var x=this.Tv();this.eK("Do you really want to delete "+(x.length==1?"\""+this.Bx[x[0]][0]+"\"":"these files")+"?",this.Gg.bind(this))};
Storage.prototype.eK=function(x,Q){var c={d:u.H.LL,AD:"confirm",b:x,ka:Q};this.Pc(c)};Storage.prototype.KB=function(x){this.du=x;
if(1<x)this.Pc({d:u.H.Tb,xx:ah.get("Downloading ...")});else this.Pc({d:u.H.Tb,xx:ah.get("Getting info ...")});
dd.Ph(0,this.U8,this.JX(),this.bT(!0),this.avy.bind(this))};Storage.prototype.avy=function(x){if(this.du==1){var Q=0,c=0;
for(var $ in x){var z=x[$];Q+=z[1];c++}this.eK(c+" files, "+cI.dc(Q)+" in total.",function(){});this.Pc({d:u.H.MM,xx:ah.get("Getting info ...")});
this.du=0}if(1<this.du)dd.Ph(1,this.U8,x,null,this.ah6.bind(this))};Storage.prototype.ah6=function(x){if(1<this.du){if(1<this.du)this.Pc({d:u.H.MM,xx:ah.get("Downloading ...")});
var Q={},c=this.JX(!0);for(var $ in x)Q[$.slice(c.length)]=x[$];if(this.du==2){Storage.pF=Q;alert("Copied to a clipboard")}if(this.du==3){var z=Object.keys(x);
if(z.length==1)hF.save(x[z[0]].buffer,z[0].split("/").pop());else hF.save(UZIP.encode(Q),c=="/"?"files.zip":this.JX().split("/").pop()+".zip")}}this.du=0};
Storage.pF=null;Storage.prototype.Gg=function(){this.Pc({d:u.H.Tb,xx:ah.get([5,4])+" ..."});this.wG=this.bT();
this.Iq()};Storage.prototype.Iq=function(){if(this.wG.length==0){this.Pc({d:u.H.MM,xx:ah.get([5,4])+" ..."});
this.BH([]);this.sa()}else this.HH("delete",this.wG.pop()[1])};Storage.prototype.bT=function(x){var Q=[],c=this.JX(!0),$=this.Tv();
for(var F=0;F<$.length;F++){var z=this.Bx[$[F]];if(x)Q.push(z[0]);else Q.push([this.ci,c+z[0]])}return Q};
Storage.prototype.HH=function(x,Q){E.ZW(this.n,"disabled");this.a4z=x;if(Storage.wx)console.log(Math.floor(Date.now()/1e3),"{\"code\": \""+x+"\", \"prm\": "+JSON.stringify(Q)+"  }");
this.U8.contentWindow.postMessage("{\"code\": \""+x+"\", \"prm\": "+JSON.stringify(Q)+"  }","*")};Storage.prototype.aq3=function(x){if(x.source!=this.U8.contentWindow||this.du!=0)return;
E.WP(this.n,"disabled");if(typeof x.data=="string"){if(Storage.wx)console.log("==",Math.floor(Date.now()/1e3),x.data);
var Q=JSON.parse(x.data),c=Q.code,$=Q.prm,z=this.a4z,j=Storage.list[this.ci][3];if(c=="ready"){if(j&&!$){var U=dQ.rf();
console.log(U);var i=dQ.JO(),b=i.acc;if(U==null){this.HZ=1;alert("Log in to use this storage (press Account at the top).");
this.D$();return}var e=[],k=U.wantToJoin;for(var K in k)e.push(parseInt(K.slice(1)));var g=[],R=U.inTeams;
for(var F=0;F<R.length;F++)g.push(R[F][2]);var T={uid:U.id,limit:Storage.a9N[dQ.OT()?1:0],inTeams:g,myTeams:e};
T.secret=b&&b.pds?b.pds:"";this.HH("login",T);return}if(j)this.HZ=2;if(j&&Q.secret){var i=dQ.JO(),b=i.acc;
if(b==null)b=i.acc={};b.pds=Q.secret;dQ._J(i)}if($)this.sa();else this.D$()}else if(c!="0"){if(z=="save")this.Pc({d:u.H.MM,xx:ah.get([1,2])+" ..."});
if(z=="delete")this.Iq();alert($);this._I()}else if(z=="show"){this.Cb=0;this.Bx=$;this._I()}else if(z=="save"){this.Cb=0;
this.Pc({d:u.H.MM,xx:ah.get([1,2])+" ..."});this.sa()}else if(z=="delete"){this.Iq()}else if(z=="forget"){if(j)this.D$();
else this.pp()}else if(z=="rename"||z=="share"){this.sa()}else throw c}else{if(Storage.wx)console.log(Math.floor(Date.now()/1e3,"==","ArrayBuffer[]"));
this.Pc({d:u.H.a6W,Hn:this.bT()[0],aJ:x.data});this.Pc({d:u.H.MM,xx:"Opening ..."})}};Storage.prototype.D$=function(){E.Os(this.LG);
E.Os(this.wt);E.Os(this.cF);this.wt.appendChild(this.atk)};Storage.prototype.axm=function(F){if(F==0)return this.$C>0;
if(F==1)return this.$C<this.mE.length-1;if(F==2)return this.JX()!="/"};Storage.prototype._I=function(){var x=Storage.list[this.ci][3],Q=this.Bx,c=Storage.hC,$=Storage.$M,z=Storage.DO;
if(Q==null)return;Q.sort(function(P,O){var p=P[1]==-1?1:5,C=O[1]==-1?1:5,W=0;if(Math.min(p,C)==1&&p!=C)return p-C;
else if(p==1||c==0)W=P[0].toLowerCase()<O[0].toLowerCase()?-1:1;else if(c==1)W=P[1]-O[1];else if(c==2)W=P[2]-O[2];
if($==1)W=-W;if(P[0]=="Shared")W=-1;if(O[0]=="Shared")W=1;return W});var j=this.wt,U=this.LG,i=this.mE[this.$C];
E.Os(j);E.Os(U);this.Gp=[];for(var F=0;F<3;F++)if(this.axm(F))E.WP(this.qe[F],"disabled");else E.ZW(this.qe[F],"disabled");
U.appendChild(this.agG);U.appendChild(this.ZN);var b=E.p("span");b.textContent="/";U.appendChild(b);
for(var F=0;F<i.length;F++){var b=E.p("span");b.textContent=i[F];U.appendChild(b);var b=E.p("span");
b.textContent="/";U.appendChild(b)}var e=["tile","icon","litm"][z];for(var F=0;F<Q.length;F++){var k=Q[F],K=k[1]==-1,g=K?"":cI.dc(k[1]),R=E.p("div","cont "+e),G=!1;
j.appendChild(R);this.Gp.push(R);R.setAttribute("title",k[0]+(K?"":"\nSize: "+g+"\nDate Modified: "+new Date(k[2]*1e3).toLocaleString().replaceAll(". ",".")));
var T=E.p("img");T.setAttribute("src",K?Storage.auD:k[3]?k[3]:Storage.Qr);if(!K&&k[3])T.setAttribute("style","box-shadow: 1px 1px 2.5px rgba(0,0,0, .4);");
var D=E.p("span","name"),a=k[0];if(e=="icon"&&a.length>30)a=a.slice(0,24)+".."+a.slice(a.length-5);if(x&&i.length==1&&i[0]=="Shared"){var _=Storage.pU(),I=parseInt(a.slice(5));
for(var f=0;f<_.length;f++)if(_[f][0]==I)a=_[f][1]}D.textContent=a;R.appendChild(T);R.appendChild(D);
if(e!="icon"&&!K){if(e=="tile")E._X(D);var y=E.p("span");y.textContent=g;y.style.opacity="0.8";(e=="tile"?D:R).appendChild(y)}var Z=k[0].split("."),v=(Z.length==1?"":Z.pop()).toUpperCase();
if(x&&k[0]=="Shared"&&i.length==0){G=!0;v="\u21E7"}if(e!="litm"&&(!K&&k[3]==null||G)){var q=E.p("span","ext");
q.textContent=v;var h=Storage.y5[v];q.style.backgroundColor=h?h:Storage.a9g(v);R.appendChild(q)}E.KH(R,this.gY);
R.addEventListener("contextmenu",this.gY)}this.Mt();var r=this.$z.parentNode!=null,H=Storage.iV,o=this.n;
if(r&&H==0)o.removeChild(this.$z);if(!r&&H==1)o.appendChild(this.$z);this.oN(this.ww,this.R0);this._()};
Storage.prototype.Mt=function(x){var Q=this.Gp,c=this.Bx,$=this.Tv(),z=!1,j=0;for(var F=0;F<Q.length;
F++){var U=c[F],i=U[1]==-1,b=Q[F];if(Storage.iV==1&&!i&&!U[0].toLowerCase().endsWith(".psd"))b.style.display="none";
else b.style.display="auto";if($.indexOf(F)==-1)E.WP(b,"active");else{if(i)z=!0;else j+=U[1];E.ZW(b,"active");
if(x)b.scrollIntoView({block:"center",behavior:"smooth"})}}var e=z?"":cI.dc(j);this.cF.textContent=$.length==0?"":$.length+" item"+($.length==1?"":"s")+" selected\u2001"+e;
this.hf.value=$.length==1&&!z?c[$[0]][0]:Storage.a3h};Storage.prototype.a4J=function(F){var x=this.Bx[F];
if(x[1]==-1){var Q=this.mE[this.$C].slice(0);Q.push(x[0]);this.$C++;this.mE[this.$C]=Q;this.mE=this.mE.slice(0,this.$C+1);
this.BH([]);this.sa()}else if(Storage.iV==0){this.Pc({d:u.H.Tb,xx:"Opening ..."});this.T(new jO("canclose",!0));
var c=this.JX(!0)+x[0];this.HH("load",c)}};Storage.prototype._=function(){var x=Storage.hC,Q=Storage.$M,c=Storage.DO;
this.Ii[0].textContent="Upload";this.Ii[1].textContent=["\uD83E\uDC0B","\uD83E\uDC09"][Q];this.Ii[2].textContent=ah.get([[12,48],[12,14,0],"Date"][x]);
this.Ii[3].textContent=ah.get(["Tiles","Icons",[25,3,1]][c]);this.Ii[4].textContent="\u2716";this.Vt.innerHTML=ah.get([[23,6],Storage.list[this.ci][0]])+"<br/><small><small>"+Storage.list[this.ci][4]+"</small></small>";
this.Fy()};Storage.prototype.ae8=function(x){this.Pc({d:u.H.ih});if(E.rm(this.atk))return;if(x.button==3||x.button==4){if(Date.now()-this.aza>50){var Q=this.$C;
if(x.button==3)this.$C=Math.max(Q-1,0);else this.$C=Math.min(Q+1,this.mE.length-1);this.sa()}this.aza=Date.now();
return}x.stopPropagation();var F=this.Gp.indexOf(x.currentTarget);if(x.type=="contextmenu"){if(this.Bx==null)return;
x.preventDefault();var c=this.rO;if(F!=-1){var $=[{name:[5,1],KR:[fM.qP,fM.tt]},{name:[6,37]},{name:"Download",P$:!0},{name:[5,4],KR:[fM.Hm]},{name:[9,2]}];
if(Storage.list[this.ci][3]){var z=this.Bx[F],j=Storage.pU(z);if(j.length!=0){var U=[];for(var i=0;i<j.length;
i++){var b=[],e=j[i],k=Storage.aqD(z,e[0]);if(k!=-1)b.push({name:"Unshare"});else b.push({name:"Allow Read"},{name:"Allow Read & Write"});
U.push({name:e[1]+[""," (R)"," (R,W)"][k+1],sub:b})}$.push({name:"Share With",sub:U})}}c=new ev($);c.parent=this;
c.k("select",this.f5,this)}c.parent=this;c._();c.update();this.Pc({d:u.H.A_,G7:c,x:x.clientX+4,y:x.clientY});
return}var K=this.Tv(),g=K.indexOf(F);if(x.button!=0&&g!=-1)return;if(x.target==this.wt)this.BH([]);
else{if(x.ctrlKey){if(g==-1)K.push(F);else K.splice(g,1)}else if(x.shiftKey&&K.length!=0){var i=K[0];
if(i<F){var R=F;F=i;i=R}K=[];this.BH(K);for(var T=F;T<=i;T++)K.push(T)}else{this.BH([F]);if(Date.now()-this.Xv<300&&K.length!=0&&K[0]==F){this.a4J(F);
this.Xv=0}}}this.Xv=Date.now();this.Mt()};Storage.prototype.Pc=function(x){var Q=new jO(u.E.M,!0);Q.data=x;
this.T(Q)};Storage.pU=function(x){var Q=[],c=[],$=dQ.JO(),z=$.acc.tstart;if(z)for(var F=0;F<z.length;
F++){Q.push([z[F][2],z[F][0]]);c.push(z[F][2])}var j=dQ.rf();z=j.inTeams;if(z)for(var F=0;F<z.length;
F++){Q.push([z[F][2],z[F][0]]);c.push(z[F][2])}if(x&&x[4]){for(var F=0;F<x[4].length;F++){var U=parseInt(x[4][F].split(":")[0]);
if(c.indexOf(U)==-1)Q.push([U,"Team "+U])}}return Q};Storage.prototype.ak8=function(x,Q){if(this.Cb!=0)return 1;
this.Cb=2;this.Pc({d:u.H.Tb,xx:ah.get([1,2])+" ..."});this.HH("save",x);if(Storage.wx)console.log(Math.floor(Date.now()/1e3),"ArrayBuffer[]");
this.U8.contentWindow.postMessage(Q,"*")};Storage.y5={PDF:"#ff2222",PSD:"#005599",PSB:"#005599"};Storage.a9g=function(x){x=x.toLowerCase();
var Q=0;for(var F=0;F<x.length;F++)Q+=x.charCodeAt(F)*613<<8*F;return"#"+d.vg(Q&16777215)};Storage.auD="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjIiIGJhc2VQcm9maWxlPSJ0aW55LXBzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0ODggNDEwIiB3aWR0aD0iNDg4IiBoZWlnaHQ9IjQxMCI+PHRpdGxlPmZvbGRlci1zdmc8L3RpdGxlPjxzdHlsZT50c3BhbiB7IHdoaXRlLXNwYWNlOnByZSB9LnNocDAgeyBmaWxsOiAjZGJiMDY1IH0gLnNocDEgeyBmaWxsOiAjOTY3YTQ0IH0gLnNocDIgeyBmaWxsOiAjZjVjZTg1IH0gPC9zdHlsZT48cGF0aCBjbGFzcz0ic2hwMCIgZD0iTTcuMiA0MDMuNEw3LjIgNi42TDEzOC45NSA2LjZMMTc3LjM1IDQ1TDQ4MC44IDQ1TDQ4MC44IDQwMy40TDcuMiA0MDMuNFoiIC8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGFzcz0ic2hwMSIgZD0iTTE0MS42IDAuMkwxODAgMzguNkw0ODcuMiAzOC42TDQ4Ny4yIDQwOS44TDAuOCA0MDkuOEwwLjggMC4yTDE0MS42IDAuMlpNMTMuNiAxM0wxMy42IDM5N0w0NzQuNCAzOTdMNDc0LjQgNTEuNEwxNzQuNyA1MS40TDEzNi4zIDEzTDEzLjYgMTNaIiAvPjxnID48cGF0aCBjbGFzcz0ic2hwMiIgZD0iTTcuMiA0MDMuNEw3LjIgNzAuNkwxNDMuNTMgNzAuNkwxODEuOTMgNDVMNDgwLjggNDVMNDgwLjggNDAzLjRMNy4yIDQwMy40WiIgLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsYXNzPSJzaHAxIiBkPSJNNDg3LjIgMzguNkw0ODcuMiA0MDkuOEwwLjggNDA5LjhMMC44IDY0LjJMMTQxLjYgNjQuMkwxODAgMzguNkw0ODcuMiAzOC42Wk0xODMuODggNTEuNEwxNDUuNDggNzdMMTMuNiA3N0wxMy42IDM5N0w0NzQuNCAzOTdMNDc0LjQgNTEuNEwxODMuODggNTEuNFoiIC8+PC9nPjwvc3ZnPg==";
Storage.Qr="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjIiIGJhc2VQcm9maWxlPSJ0aW55LXBzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggNDI0IiB3aWR0aD0iMzQ4IiBoZWlnaHQ9IjQyNCI+PHRpdGxlPmZpbGUtc3ZnPC90aXRsZT48c3R5bGU+dHNwYW4geyB3aGl0ZS1zcGFjZTpwcmUgfS5zaHAwIHsgZmlsbDogI2ZmZmZmZiB9IC5zaHAxIHsgZmlsbDogI2M3ZDdlMiB9IC5zaHAyIHsgZmlsbDogIzQ1NGI1NCB9IDwvc3R5bGU+PHBhdGggY2xhc3M9InNocDAiIGQ9Ik0yOTYgNDEyTDUyIDQxMkMzMCA0MTIgMTIgMzk0IDEyIDM3MkwxMiA1MkMxMiAzMCAzMCAxMiA1MiAxMkwyOTYgMTJDMzE4IDEyIDMzNiAzMCAzMzYgNTJMMzM2IDM3MkMzMzYgMzk0IDMxOCA0MTIgMjk2IDQxMloiIC8+PHBhdGggY2xhc3M9InNocDEiIGQ9Ik01MiA1MkwyOTYgNTJMMjk2IDExMkw1MiAxMTJMNTIgNTJaTTI3MiAxOTJMNjggMTkyQzYxLjIgMTkyIDU2IDE4Ni44IDU2IDE4MEM1NiAxNzMuMiA2MS4yIDE2OCA2OCAxNjhMMjcyIDE2OEMyNzguOCAxNjggMjg0IDE3My4yIDI4NCAxODBDMjg0IDE4Ni44IDI3OC44IDE5MiAyNzIgMTkyWk0yNzIgMjUyTDY4IDI1MkM2MS4yIDI1MiA1NiAyNDYuOCA1NiAyNDBDNTYgMjMzLjIgNjEuMiAyMjggNjggMjI4TDI3MiAyMjhDMjc4LjggMjI4IDI4NCAyMzMuMiAyODQgMjQwQzI4NCAyNDYuOCAyNzguOCAyNTIgMjcyIDI1MlpNMTc0IDMxMkw2OCAzMTJDNjEuMiAzMTIgNTYgMzA2LjggNTYgMzAwQzU2IDI5My4yIDYxLjIgMjg4IDY4IDI4OEwxNzQgMjg4QzE4MC44IDI4OCAxODYgMjkzLjIgMTg2IDMwMEMxODYgMzA2LjggMTgwLjggMzEyIDE3NCAzMTJaIiAvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xhc3M9InNocDIiIGQ9Ik0yOTYgNDI0TDUyIDQyNEMyMy4yIDQyNCAwIDQwMC44IDAgMzcyTDAgNTJDMCAyMy4yIDIzLjIgMCA1MiAwTDI5NiAwQzMyNC44IDAgMzQ4IDIzLjIgMzQ4IDUyTDM0OCAzNzJDMzQ4IDQwMC44IDMyNC44IDQyNCAyOTYgNDI0Wk01MiAyNEMzNi40IDI0IDI0IDM2LjQgMjQgNTJMMjQgMzcyQzI0IDM4Ny42IDM2LjQgNDAwIDUyIDQwMEwyOTYgNDAwQzMxMS42IDQwMCAzMjQgMzg3LjYgMzI0IDM3MkwzMjQgNTJDMzI0IDM2LjQgMzExLjYgMjQgMjk2IDI0TDUyIDI0WiIgLz48L3N2Zz4=";
var dd=function(){var x,Q,c,$,z,j,U,i;function b(R,T,D,a,_){Q=T;$=a;U=_;x=R;j={};if(x==0){c=[D]}if(x==1){c=[];
for(var I in D)c.push(I)}if(x==2){var f=D[0],y=D[1],Z=D[2],v={};for(var F=0;F<Z.length;F++)v[Z[F][0]]=!0;
var G={};for(var I in y){var q=I.split("/"),h=q[0],r=h.split("."),H="";if(r.length!=1){H="."+r.pop();
h=r.join(".")}while(v[h+H])h+=" - Copy";q[0]=h+H;G[q.join("/")]=y[I]}var o={};c=[];for(var I in G){var q=I.split("/");
for(var F=0;F<q.length-1;F++){var P=f+q.slice(0,F+1).join("/")+"/";if(o[P]==null){o[P]=!0;c.push([P])}}var O=f.endsWith("/")||I.startsWith("/")?"":"/";
c.push([f+O+I,G[I]])}}window.addEventListener("message",k,!1);i=Date.now();e()}function e(){if(c.length==0){g();
return}z=c.shift();if(x==0)K("show",z);if(x==1)K("load",z);if(x==2){K("save",z[0]);if(z.length==2)Q.contentWindow.postMessage(z[1],"*")}}function k(R){if(R.source!=Q.contentWindow)return;
if(x==0){var T=JSON.parse(R.data),D=T.code,a=T.prm;for(var F=0;F<a.length;F++){var _=a[F];if($&&$.indexOf(_[0])==-1)continue;
var I=z+(z=="/"?"":"/"),f=I+_[0];if(_[1]==-1)c.push(f);else j[f]=_}$=null}else if(x==1){j[z]=new Uint8Array(R.data)}e()}function K(R,T){var D=R=="show"?", \"nothumbs\": true":"",a="{\"code\": \""+R+"\", \"prm\": "+JSON.stringify(T)+D+"  }";
Q.contentWindow.postMessage(a,"*")}function g(){console.log(Date.now()-i);window.removeEventListener("message",k,!1);
U(j)}return{Ph:b}}();function du(x){kw.call(this);var Q=this.n=E.p("div","form scrollable padded label12");
this.fX=x;this.nk=null;var c=[],$=du.Db[x];this.Ow=[];for(var z in $){var j=parseInt(z.slice(1)),U=j%10==0?"":"\u2800\u2800- ";
c.push(U+$[z]);this.Ow.push(j)}this.Qj=[new el("Name",null,30),new el("Description",null,30,4),x==0?new el("File"," www.Photopea.com#i...",17):new jR("File",!1,!1),new el("Thumbnail URL","* Use Imgur.com etc.",17),new c7("Category",c),new f2("Make Public"),new j7("<< Back",null,null,!0),new j7("Save",null,null,!0)];
if(x==0)this.Qj.push(new jz("Publish your PSD: File - Publish Online - PSD. Use that URL as \"File\"."),new jz("Get a Thumbnail URL: File - Publish Online - JPG. At Imgur.com, right-click your image and choose \"Copy Image Address\"."));
if(x==1)this.Qj.push(new jz("\"File\" - select a .JSON file of a plugin from your computer. The content must be: {\"name\": ..., \"url\":..., \"icon\":... }"));
if(x!=0)this.Qj.push(new jz("Do not load any file to preserve the old version."));for(var F=0;F<this.Qj.length;
F++){var i=this.Qj[F];Q.appendChild(i.n);i.parent=this;if(F!=4&&F!=6)E._X(Q);if(i instanceof j7)i.k("click",this.ao4,this);
if(x!=0&&F==2)i.k(u.E.t,this.a6w,this)}}du.prototype=new kw;du.prototype.a6w=function(x){var Q=this.Qj[2],c=Q.h(),$=Object.keys(c),z=c[$[0]].buffer,j=ar.HB(z),U=" json atn abr grd asl pat csh icc".split(" ")[this.fX];
if(j!=U){alert("This is a wrong file"+(j?" ("+j.toUpperCase()+")":"")+". You need to upload the "+U.toUpperCase()+" file.");
Q.U({})}};du.prototype.ao4=function(x){if(x.target==this.Qj[6]){this.T(new jO("back"));return}var Q=this.Qj[3].h().trim(),c=Q.startsWith("http")&&(Q.endsWith(".jpeg")||Q.endsWith(".jpg")||Q.endsWith(".png")||Q.endsWith(".gif"));
if(!c){alert("Thumbnail URL is incorrect.");return}var $=new XMLHttpRequest,z=(Q);
$.open("GET",z);$.responseType="arraybuffer";$.onload=this.aec.bind(this);$.send()};du.prototype.aec=function(x){var Q=x.target.response,c=Q.byteLength;
if(c>2e5&&ar.HB(Q)!="gif"){alert("Thumbnail is too large ("+cI.dc(c)+"). Make it under 200 kB.");return}var $=this.Qj[2].h(),z=Object.keys($);
if(this.fX!=0&&z.length==0&&(this.nk==null||this.nk.file==null||this.nk.file=="")){alert("You need to select a file.");
return}if(this.fX!=0&&z.length!=0){console.log($);hF.EU.agc($[z[0]].buffer,z[0],this.a0e.bind(this),"pp-resources");
return}this.a0e()};du.prototype.a0e=function(x){var Q=this.fX,c="name desc file thmb catg publ".split(" "),$=this.nk;
for(var F=0;F<6;F++){if(Q!=0&&F==2)continue;var z=this.Qj[F].h();if(F<=3){z=z.trim();if(z.length==0){alert("One of values is empty.");
return}}if(F==2){var j=z.split("#i");if(j.length!=2||j[1].length!=8){alert("File ID is incorrect.");
return}z=j.pop()}if(F==4)z=this.Ow[z];$[c[F]]=z}if(Q!=0){if(x)$.file=x;else if($.file==null){alert("Select a file from your computer.");
return}}if($.utme.length==0)$.utme=""+Math.round(Date.now()/1e3);$.type=Q;this.T(new jO("save"))};du.prototype._=function(){};
du.prototype.U=function(x){var Q=this.nk=JSON.parse(JSON.stringify(x)),c=this.fX,$="name desc file thmb catg publ".split(" ");
for(var F=0;F<6;F++){if(c!=0&&F==2)continue;var z=Q[$[F]];if(z!=""&&F==2)z="https://photopea.com#i"+z;
if(F==4)z=this.Ow.indexOf(z);if(F==5&&z==null)z=!0;this.Qj[F].U(z)}};du.prototype.h=function(){return JSON.parse(JSON.stringify(this.nk))};
du.Db=[{c0:"Mockups",c1:"Mobile & Web",c2:"Prints",c3:"Product",c10:"Social Media",c11:"Youtube",c12:"Instagram",c13:"Facebook",c14:"Memes",c15:"Signs",c16:"Animations",c20:"Print",c21:"Cards",c22:"Invitations",c23:"Brochures",c24:"Resumes",c25:"Diploma / Certificate",c30:"Mobile",c40:"Websites",c50:"Presentations",c60:"Other"},{c0:"Resources",c1:"Image Elements",c2:"Fonts",c10:"Effects",c11:"Filters",c12:"Combine Elements",c13:"Text Effects",c20:"Generate Content",c30:"Other Plugins"},{c0:"Default"},{c0:"Default"},{c0:"Default"},{c0:"Default"},{c0:"Default"},{c0:"Default"},{c0:"Default"}];
function jH(x){kw.call(this);this.N5=x;this.n=E.p("div","");this.Ai=[];this.I3=null;this.a0D=[]}jH.prototype=new kw;
jH.prototype.hI=function(x){};jH.prototype.Ct=function(){return!1};jH.prototype.oN=function(x,Q){};jH.prototype.Fy=function(x,Q){};
jH.prototype.HJ=function(x){};jH.prototype.U=function(x,Q,c,$,z,j){var U=[],i=this.Ai,b=0,e=fK.qX["s"+this.N5];
if(this.N5=="Dspl")this.bQ(x,U,j);else e?e(x,U,j):this.bQ(x,U,j);for(var F=0;F<i.length;F++)if(!(i[F]instanceof jz))i[F].U(U[b++]);
if(x.RndS)this.I3=x.RndS.v};jH.prototype.h=function(){var x=fK.$H(this.N5),Q=[],c=this.Ai,$=0;for(var F=0;
F<c.length;F++)if(!(c[F]instanceof jz))Q[$++]=c[F].h();var z=fK.qX["g"+this.N5];if(this.N5=="Dspl")this.v3(x,Q);
else z?z(x,Q):this.v3(x,Q);if(x.RndS)x.RndS.v=this.I3;return x};jH.prototype.sM=function(x){};jH.prototype.bM=function(x){if(x&&x.target instanceof j7){this.I3=Math.floor(Math.random()*4294967295)}var Q=this.a0D;
for(var F=0;F<Q.length;F+=2){var c=this.Ai[Q[F]],$=this.Ai[Q[F+1]],z=c.h(),j=$.h();if(x.target==c)$.U(Math.max(z,j));
else c.U(Math.min(z,j))}this.T(new jO(u.E.t))};jH.prototype._=function(){for(var F=0;F<this.Ai.length;
F++)this.Ai[F]._();var x=this.a1v;if(x)x._()};jH.prototype.bN=function(x){E.ZW(this.n,"form");var Q=this.Ai;
for(var F=0;F<Q.length;F++){var c=Q[F];c.parent=this;c.k(u.E.t,this.bM,this);this.n.appendChild(c.n);
if(c instanceof f2&&Q[F+1]instanceof hc)continue;if(x&&x.indexOf(F)!=-1)E.ix(this.n);else E._X(this.n)}var $=fK.$H(this.N5);
if($.RndS){var z=this.a1v=new j7([25,1,2],null,null,!0);this.n.appendChild(z.n);z.k("click",this.bM,this)}};
jH.prototype.Da=function(x){return!1};jH.prototype.W9=function(){return!1};jH.prototype.Eu=function(x,Q,c,$,z){};
jH.prototype.CK=function(x,Q,c,$,z){};jH.prototype.km=function(x,Q,c,$,z){};jH.prototype.v3=function(x,Q){};
jH.prototype.bQ=function(x,Q){};jH.prototype.Ww=function(x){var Q=x.target.h().indexOf(!0)!=-1,c=new jO(u.E.M,!0);
c.Oe=!0;c.data={d:Q?u.H.ax:u.H.JG,f:X.WL};this.T(c);c=new jO(u.E.v,!0);c.f=X.WL;c.Oe=!0;c.data={d:"supertool",f:Q?this:null};
this.T(c)};jH.af7=function(x){x.W9=function(){return!0};x.Eu=function(Q,c,$,z,j){this.FZ=!0;this.apU(Q,j)};
x.CK=function(Q,c,$,z,j){if(!this.FZ)return;this.apU(Q,j)};x.km=function(Q,c,$,z,j){this.FZ=!1};x.apU=function(Q,c){var $=new gh(0,0,Q.m,Q.e);
if(Q.u)$=Q.u.rect;var z=Q.Q.$X(c.x,c.y);z.x-=$.x;z.y-=$.y;function j(U,i){return Math.round(Math.max(0,Math.min(100,100*U/i)))}this.Ai[2].U(j(z.x,$.m));
this.Ai[3].U(j(z.y,$.e));this.bM()}};jH.Bokh=function(){jH.call(this,"Bokh");this.Ai=[new c7("Depth Map",["A","b"]),new bv("Focal Distance",0,255),new f2([4,11]),new c7([12,76,1],["Triangle (3)",["VAR0 (4)",[12,93,3]],"Pentagon (5)","Hexagon (6)","Heptagon (7)","Octagon (8)"]),new bv([12,56],0,100),new bv([12,15],0,360),new bv([12,2],0,100),new bv([4,13],0,255),new bv([24,6],0,100),new c_([12,58],[[12,59,0],[12,59,1]]),new f2([12,60])];
this.bN([5,7])};jH.Bokh.prototype=new jH;jH.Bokh.prototype.bQ=function(x,Q,c){var $=[[22,5,0],[6,5,3],[6,2]],z=x.BkDi.v.BtDi,j=x.BkDc,U=0;
if(z=="BeIn")U=0;else if(z=="BeIt"&&j.v.BtDc=="BeCt")U=1;else if(z=="BeIt"&&j.v.BtDc=="BeCm")U=2;else U=3+j.v;
for(var F=0;F<c[1].length;F++)$.push(c[1][F].name);this.Ai[0].yJ($,[3]);Q[0]=U;Q[1]=x.BkDp.v;Q[2]=x.BkDs.v;
Q[3]=parseInt(x.BkIs.v.BtIs.slice(3))-3;Q[4]=x.BkIb.v;Q[5]=x.BkIr.v;Q[6]=x.BkSb.v;Q[7]=x.BkSt.v;Q[8]=x.BkNa.v;
Q[9]=x.BkNt.v.BtNt=="BeNu"?0:1;Q[10]=x.BkNm.v};jH.Bokh.prototype.v3=function(x,Q){var c;if(Q[0]==0){c="BeIn";
delete x.BkDc}else if(Q[0]<3){c="BeIt";x.BkDc={t:"enum",v:{BtDc:["BeCt","BeCm"][Q[0]-1]}}}else{c="BeIa";
x.BkDc={t:"long",v:Q[0]-3}}x.BkDi.v.BtDi=c;x.BkDp.v=Q[1];x.BkDs.v=Q[2];x.BkIs.v.BtIs="BeS"+(3+Q[3]);
x.BkIb.v=Q[4];x.BkIr.v=Q[5];x.BkSb.v=Q[6];x.BkSt.v=Q[7];x.BkNa.v=Q[8];x.BkNt.v.BtNt=["BeNu","BeNg"][Q[9]];
x.BkNm.v=Q[10]};jH.oilPaint=function(){jH.call(this,"oilPaint");this.Ai=[new bv([12,56],.1,10,"px",!0),new bv("Cleanliness",0,10,"px",!0),new bv([12,38],.1,10,null,!0),new bv("Bristle Detail",0,10,null,!0),new f2("Lighting"),new bv("Shine",0,10,null,!0),new iF([12,15])];
this.bN()};jH.oilPaint.prototype=new jH;jH.oilPaint.prototype.bQ=function(x,Q){var c="stylization cleanliness brushScale microBrush lightingOn specularity".split(" ");
for(var F=0;F<c.length;F++)Q[F]=x[c[F]].v;Q[6]=[x.LghD.v]};jH.oilPaint.prototype.v3=function(x,Q){var c="stylization cleanliness brushScale microBrush lightingOn specularity".split(" ");
for(var F=0;F<c.length;F++)x[c[F]].v=Q[F];x.LghD.v=Q[6][0]};jH.TrcC=function(){jH.call(this,"TrcC");
this.Ai=[new bv("Level",0,255),new c_([12,69],[[19,4,1],[19,4,0]])];this.bN()};jH.TrcC.prototype=new jH;
jH.TrcC.prototype.bQ=function(x,Q){Q[0]=x.Lvl.v;Q[1]=["Lwr","Upr"].indexOf(x.Edg.v.CntE)};jH.TrcC.prototype.v3=function(x,Q){x.Lvl.v=Q[0];
x.Edg.v.CntE=["Lwr","Upr"][Q[1]]};jH["Dfs "]=function(){jH.call(this,"Dfs ");this.Ai=[new c_([12,36],[[15,10,0],[15,10,6],[15,10,11],"Anisotropic"])];
this.bN()};jH["Dfs "].prototype=new jH;jH["Dfs "].prototype.bQ=function(x,Q){Q[0]=["Nrml","DrkO","LghO","anisotropic"].indexOf(x.Md.v.DfsM)};
jH["Dfs "].prototype.v3=function(x,Q){x.Md.v.DfsM=["Nrml","DrkO","LghO","anisotropic"][Q[0]]};jH.Embs=function(){jH.call(this,"Embs");
this.Ai=[new iF([12,15]),new bv([12,42],1,100,"px"),new bv([12,57],1,500,"%")];this.bN()};jH.Embs.prototype=new jH;
jH.Embs.prototype.bQ=function(x,Q){Q[0]=[x.Angl.v];Q[1]=x.Hght.v;Q[2]=x.Amnt.v};jH.Embs.prototype.v3=function(x,Q){x.Angl.v=Q[0][0];
x.Hght.v=Q[1];x.Amnt.v=Q[2]};jH["Wnd "]=function(){jH.call(this,"Wnd ");this.Ai=[new c_([12,32],["Wind","Blast","Stagger"]),new c_([12,33],["From the Right","From the Left"])];
this.bN()};jH["Wnd "].prototype=new jH;jH["Wnd "].prototype.bQ=function(x,Q){Q[0]=["Wnd","Blst","Stgr"].indexOf(x.WndM.v.WndM);
Q[1]=["Left","Rght"].indexOf(x.Drct.v.Drct)};jH["Wnd "].prototype.v3=function(x,Q){x.WndM.v.WndM=["Wnd","Blst","Stgr"][Q[0]];
x.Drct.v.Drct=["Left","Rght"][Q[1]]};jH.denoise=function(){jH.call(this,"denoise");this.Ai=[new bv([12,64],0,10),new bv([12,65],0,100,"%")];
this.bN()};jH.denoise.prototype=new jH;jH.denoise.prototype.bQ=function(x,Q){var c=x.channelDenoise.v[0].v;
Q[0]=c.Amnt.v;Q[1]=c.EdgF.v};jH.denoise.prototype.v3=function(x,Q){var c=x.channelDenoise.v[0].v;c.Amnt.v=Q[0];
c.EdgF.v=Q[1]};jH.lightFilterGradient=function(){jH.call(this,"lightFilterGradient");this.Ai=[new bv([24,3,1],0,100,"px",1,!0),new bv([12,38],0,200,"%"),new f2([4,11]),new bv("High",0,100,"%"),new bv("Medium",0,100,"%"),new bv("Low",0,100,"%")];
this.bN()};jH.lightFilterGradient.prototype=new jH;jH.lightFilterGradient.prototype.bQ=function(x,Q){Q[0]=x.blur.v;
Q[1]=x.textureScale.v*100;Q[2]=x.Scl.v==-1;var c=x.Dtl.v;Q[3]=c[0].v*100;Q[4]=c[1].v*100;Q[5]=c[2].v*100};
jH.lightFilterGradient.prototype.v3=function(x,Q){x.blur.v=Q[0];x.textureScale.v=Q[1]/100;x.Scl.v=Q[2]?-1:1;
var c=x.Dtl.v;c[0].v=Q[3]/100;c[1].v=Q[4]/100;c[2].v=Q[5]/100};jH.Fbrs=function(){jH.call(this,"Fbrs");
this.Ai=[new bv("Variance",1,64),new bv([12,64],1,64)];this.bN()};jH.Fbrs.prototype=new jH;jH.Fbrs.prototype.bQ=function(x,Q){Q[0]=x.Vrnc.v;
Q[1]=x.Strg.v};jH.Fbrs.prototype.v3=function(x,Q){x.Vrnc.v=Q[0];x.Strg.v=Q[1]};jH.LnsF=function(){jH.call(this,"LnsF");
this.Ai=[new bv([12,2],10,300,"%"),new c_([12,44],["Lens 1","Lens 2","Lens 3","Lens 4"]),new bv("Position X",0,100,"%"),new bv("Position Y",0,100,"%")];
this.bN()};jH.LnsF.prototype=new jH;jH.LnsF.prototype.bQ=function(x,Q){Q[0]=x.Brgh.v;Q[1]=["Zm","Nkn","Nkn1","PnVs"].indexOf(x.Lns.v.Lns);
var c=x.FlrC.v;Q[2]=Math.round(c.Hrzn.v*100);Q[3]=Math.round(c.Vrtc.v*100)};jH.LnsF.prototype.v3=function(x,Q){x.Brgh.v=Q[0];
x.Lns.v.Lns=["Zm","Nkn","Nkn1","PnVs"][Q[1]];var c=x.FlrC.v;c.Hrzn.v=Q[2]/100;c.Vrtc.v=Q[3]/100};jH.af7(jH.LnsF.prototype);
jH.blendOptions=function(){jH.call(this,"blendOptions");this.Ai.push(new c7([12,19,0],cq.o_,cq.nW));
this.Ai.push(new bv([12,0],0,100,"%"));this.bN()};jH.blendOptions.prototype=new jH;jH.blendOptions.prototype.bQ=function(x,Q){Q[0]=cq.hg.indexOf(x.Md.v.BlnM);
Q[1]=x.Opct.v.val};jH.blendOptions.prototype.v3=function(x,Q){x.Md.v.BlnM=cq.hg[Q[0]];x.Opct.v.val=Q[1]};
jH.LnCr=function(){jH.call(this,"LnCr");this.Ai=[new bv([12,57],-100,100),new bv([12,38],10,150,"%")];
this.bN()};jH.LnCr.prototype=new jH;jH.LnCr.prototype.bQ=function(x,Q){Q[0]=x.LnIa.v;Q[1]=x.LnSi.v};
jH.LnCr.prototype.v3=function(x,Q){x.LnIa.v=Q[0];x.LnSi.v=Q[1]};jH.adaptCorrect=function(){jH.call(this,"adaptCorrect");
var x=bf;this.Ai=[new jz([19,6,0]),new x([12,57],0,100,"%"),new x("Tone",0,100,"%"),new x([12,56],0,200,"px"),new jz([19,6,2]),new x([12,57],0,100,"%"),new x("Tone",0,100,"%"),new x([12,56],0,200,"px"),new jz([3]),new x([13,0],-100,100)];
this.bN([3,7])};jH.adaptCorrect.prototype=new jH;jH.adaptCorrect.prototype.bQ=function(x,Q){var c=x.sdwM.v;
Q[0]=c.Amnt.v.val;Q[1]=c.Wdth.v.val;Q[2]=c.Rds.v;var c=x.hglM.v;Q[3]=c.Amnt.v.val;Q[4]=c.Wdth.v.val;
Q[5]=c.Rds.v;Q[6]=x.ClrC.v};jH.adaptCorrect.prototype.v3=function(x,Q){var c=x.sdwM.v;c.Amnt.v.val=Q[0];
c.Wdth.v.val=Q[1];c.Rds.v=Q[2];var c=x.hglM.v;c.Amnt.v.val=Q[3];c.Wdth.v.val=Q[4];c.Rds.v=Q[5];x.ClrC.v=Q[6]};
jH.Flam=function(){jH.call(this,"Flam");var x=this.Ai=[new c7([12,44],"One Flame Along Path,Multiple Flames Along Path,Multiple Flames One Direction,Multiple Flames Path Directed,Multiple Flames Various Angle,Candle Light".split(",")),new bv([12,80,0],20,1e3,"px"),new f2("Randomize Length"),new bv([12,41],5,600,"px"),new bv([12,15],0,360,"\xB0"),new bv("Interval",10,200,"px"),new f2("Adapt Interval for Loops"),new hc(!1),new c7([12,52,0],["1: Draft","2: Low","3: Medium","4: High","5: Fine"]),new bv("Turbulent",0,100),new bv("Jag",0,100),new bv([12,0],0,100),new bv("Lines",2,30),new bv("Bottom",0,100),new c7([12,22],["Normal","Violent","Flat"]),new c7([12,76,1],["Parallel","To the center","Spread","Oval","Pointing"]),new f2("Randomize Shape"),new bv("Random Seed",0,100)];
this.bN();var Q=this.n;E.Os(Q);var c=new c_(null,["Basic","Advanced"]);c.k(u.E.t,this.asy,this);Q.appendChild(c.n);
E.ix(Q);var $=E.p("div"),z=E.p("div");this.a5C=[$,z];Q.appendChild($);for(var F=0;F<x.length;F++){(F<9?$:z).appendChild(x[F].n);
if(F==6)E._X($)}x[0].k(u.E.t,this.a6U,this);this.a6U()};jH.Flam.prototype=new jH;jH.Flam.prototype.a6U=function(x){var Q=this.Ai,F=Q[0].h();
Q[1].vz(F!=0&&F!=5);Q[2].vz(F!=0&&F!=5);Q[4].vz(F!=0&&F!=5&&F!=1);Q[5].vz(F!=0&&F!=5);Q[6].vz(F!=0&&F!=5)};
jH.Flam.prototype.asy=function(x){var F=x.target.h(),Q=this.a5C,c=this.n;c.removeChild(Q[1-F]);c.appendChild(Q[F])};
jH.boxblur=function(){jH.call(this,"boxblur");this.Ai=[new bv([12,56],1,200," px")];this.bN()};jH.boxblur.prototype=new jH;
jH.boxblur.prototype.bQ=function(x,Q){Q[0]=x.Rds.v.val};jH.boxblur.prototype.v3=function(x,Q){x.Rds.v.val=Q[0]};
jH.GsnB=function(){jH.call(this,"GsnB");this.Ai=[new bv([12,56],.1,400,"px",1,!0)];this.bN()};jH.GsnB.prototype=new jH;
jH.Dila=function(){jH.call(this,"Dila");this.Ai=[new bv([11,12,1],0,20,"px",0),new bv([12,56],0,400,"px",0,!0)];
this.bN()};jH.Dila.prototype=new jH;jH.MtnB=function(){jH.call(this,"MtnB");this.Ai=[new iF([12,15]),new bv([12,28],1,100," px")];
this.bN()};jH.MtnB.prototype=new jH;jH.RdlB=function(){jH.call(this,"RdlB");this.Ai=[new bv([12,57],1,100),new c_([12,36],["Spin","Zoom"]),new bv("Position X",0,100,"%"),new bv("Position Y",0,100,"%")];
this.bN()};jH.RdlB.prototype=new jH;jH.RdlB.prototype.bQ=function(x,Q){Q[0]=x.Amnt.v;Q[1]=["Spn","Zm"].indexOf(x.BlrM.v.BlrM);
Q[2]=x.Cntr.v.Hrzn.v*100;Q[3]=x.Cntr.v.Vrtc.v*100};jH.RdlB.prototype.v3=function(x,Q){x.Amnt.v=Q[0];
x.BlrM.v.BlrM=["Spn","Zm"][Q[1]];x.Cntr.v.Hrzn.v=Q[2]/100;x.Cntr.v.Vrtc.v=Q[3]/100};jH.af7(jH.RdlB.prototype);
jH.Dspl=function(){jH.call(this,"Dspl");this.Ai=[new c7([6,36,3],["a","b"]),new bv([22,4,0],-100,100,"px"),new bv([22,4,1],-100,100,"px"),new c7([24,18,0],[[24,18,3],[24,18,2]])];
this.bN()};jH.Dspl.prototype=new jH;jH.Dspl.prototype.bQ=function(x,Q,c){this.a5t=[];this.bw=[];var $=-1,z=c?c[0]:null;
if(z==null)z=this.aao;else this.aao=z;if(z)for(var F=0;F<z.length;F++){var j=z[F];this.a5t.push(j.uo.trim());
this.bw.push(j.P6);if(j.P6==x.DspF.v.pth)$=F}this.Ai[0].yJ(this.a5t);Q[0]=$==-1?0:$;Q[1]=x.HrzS.v;Q[2]=x.VrtS.v;
Q[3]=["WrpA","RptE"].indexOf(x.UndA.v.UndA)};jH.Dspl.prototype.v3=function(x,Q){var c=this.aao;if(this.bw.length==0)return;
x.DspF.v.pth=this.bw[Q[0]];x.HrzS.v=Q[1];x.VrtS.v=Q[2];x.UndA.v.UndA=["WrpA","RptE"][Q[3]];var $=c[Q[0]];
$.VY();var z=$.iw[1],j=z.m,U=z.e,i=d.R(z.P());d._8($.iw[0],i);var b=[j&255,j>>>8,0,0,U&255,U>>>8,0,0,3,0];
for(var e=0;e<2;e++)for(var F=0;F<i.length;F++)b.push(i[F]);for(var F=0;F<1e3;F++)b.push(0);x.DspD={t:"tdta",v:b};
x.EmbF={t:"bool",v:!0}};jH.Pnch=function(){jH.call(this,"Pnch");this.Ai=[new bv([12,57],-100,100,"%")];
this.bN()};jH.Pnch.prototype=new jH;jH["Plr "]=function(){jH.call(this,"Plr ");this.Ai=[new c_(null,["Rect to Polar","Polar to Rect"])];
this.bN()};jH["Plr "].prototype=new jH;jH.Rple=function(){jH.call(this,"Rple");this.Ai=[new bv([12,57],-999,999),new c7([12,14,0],[[19,8,0],[19,8,1],[19,8,2]])];
this.bN()};jH.Rple.prototype=new jH;jH["Shr "]=function(){jH.call(this,"Shr ");this.Ai=[new ii(!0,!0),new c7([24,18,0],[[24,18,3],[24,18,2]])];
this.bN()};jH["Shr "].prototype=new jH;jH["Shr "].prototype.bQ=function(x,Q){var c=new bI(0,255/127,255/127,0,-2,128),$=JSON.parse(JSON.stringify(x.ShrP.v));
d.eu.i($,c);Q[0]=$;Q[1]=["WrpA","RptE"].indexOf(x.UndA.v.UndA)};jH["Shr "].prototype.v3=function(x,Q){var c=new bI(0,255/127,255/127,0,-2,128);
c.HQ();d.eu.i(Q[0],c);x.ShrP.v=Q[0];x.ShrE.v=Q[0].length-1;x.UndA.v.UndA=["WrpA","RptE"][Q[1]]};jH.Sphr=function(){jH.call(this,"Sphr");
this.Ai=[new bv([12,57],-100,100),new c7([12,36],[[15,10,0],[22,4,0],[22,4,1]])];this.bN()};jH.Sphr.prototype=new jH;
jH.Sphr.prototype.bQ=function(x,Q){Q[0]=x.Amnt.v;Q[1]=["Nrml","HrzO","VrtO"].indexOf(x.SphM.v.SphM)};
jH.Sphr.prototype.v3=function(x,Q){x.Amnt.v=Q[0];x.SphM.v.SphM=["Nrml","HrzO","VrtO"][Q[1]]};jH.Dthr=function(){jH.call(this,"Dthr");
this.Ai=[new c7("Palette",[[4,7],"RGB 2x2x2","RGB 4x4x4","RGB 8x8x4"]),new c_("Method",["None","Floyd-Steinberg","Bayer 4x4"])];
this.bN()};jH.Dthr.prototype=new jH;jH.Dthr.prototype.bQ=function(x,Q){Q[0]=x.Plte.v;Q[1]=x.Mthd?x.Mthd.v:1};
jH.Dthr.prototype.v3=function(x,Q){x.Plte.v=Q[0];x.Mthd.v=Q[1]};jH.Part=function(){jH.call(this,"Part");
this.Ai=[new bv([15,5,1],0,100,"%"),new bv([12,14,0],1,50,"px"),new bv([12,34],0,100,"%"),new bv([12,2],10,1e3,"%"),new hc(!0),new bv("Time",0,1,null,3),new bv("Turbulence",0,100,"%"),new f2("Blink"),new f2("Fall")];
this.bN([4])};jH.Part.prototype=new jH;jH.Part.prototype.bQ=function(x,Q){Q[0]=x.Cont.v;Q[1]=x.Size.v;
Q[2]=x.Dpth.v;Q[3]=x.Brgh.v;Q[4]=x.Clr.v;Q[5]=x.Time.v;Q[6]=x.Turb.v;Q[7]=x.Blnk.v;Q[8]=x.Fall.v};jH.Part.prototype.v3=function(x,Q){x.Cont.v=Q[0];
x.Size.v=Q[1];x.Dpth.v=Q[2];x.Brgh.v=Q[3];x.Clr.v=Q[4];x.Time.v=Q[5];x.Turb.v=Q[6];x.Blnk.v=Q[7];x.Fall.v=Q[8]};
jH.Twrl=function(){jH.call(this,"Twrl");this.Ai=[new bv([12,15],-999,999)];this.bN()};jH.Twrl.prototype=new jH;
jH.Wave=function(){jH.call(this,"Wave");this.a0D=[1,2,3,4];this.Ai=[new bv("Number of Generators",1,100),new bf("Min Length",1,999),new bf("Max Length",1,999),new bf("Min Ampl.",1,999),new bf("Max Ampl.",1,999),new bf("Scale X",1,100,"%"),new bf("Scale Y",1,100,"%"),new c_([12,44],["Sine","Triangle",[12,93,3]]),new c7([24,18,0],[[24,18,3],[24,18,2]])];
this.bN()};jH.Wave.prototype=new jH;jH.ZgZg=function(){jH.call(this,"ZgZg");this.Ai=[new bv([12,57],-100,100),new bv("Ridges",0,20),new c7([12,22],["Around Center","Out From Center","Pond Ripples"])];
this.bN()};jH.ZgZg.prototype=new jH;jH.surfaceBlur=function(){jH.call(this,"surfaceBlur");this.Ai=[new bv([12,56],1,200," px"),new bv([4,13],1,255," px")];
this.bN()};jH.surfaceBlur.prototype=new jH;jH.surfaceBlur.prototype.bQ=function(x,Q){Q[0]=x.Rds.v.val;
Q[1]=x.Thsh.v};jH.surfaceBlur.prototype.v3=function(x,Q){x.Rds.v.val=Q[0];x.Thsh.v=Q[1]};jH.AdNs=function(){jH.call(this,"AdNs");
this.Ai=[new bv([12,57],0,200," %"),new c7([12,58],[[12,59,1],[12,59,0]]),new f2([12,60])];this.bN()};
jH.AdNs.prototype=new jH;jH.DstS=function(){jH.call(this,"DstS");this.Ai=[new bv([12,56],1,200," px"),new bv([4,13],1,255," px")];
this.bN()};jH.DstS.prototype=new jH;jH["Mdn "]=function(){jH.call(this,"Mdn ");this.Ai=[new bv([12,56],1,200," px")];
this.bN()};jH["Mdn "].prototype=new jH;jH["Mdn "].prototype.bQ=function(x,Q){Q[0]=x.Rds.v.val};jH["Mdn "].prototype.v3=function(x,Q){x.Rds.v.val=Q[0]};
jH.ClrH=function(){jH.call(this,"ClrH");this.Ai=[new bv([12,56],4,100," px")];for(var F=1;F<4;F++)this.Ai.push(new bv("Angle "+F,0,90," \xB0"));
this.bN()};jH.ClrH.prototype=new jH;jH.ClrH.prototype.bQ=function(x,Q){Q[0]=x.Rds.v;for(var F=1;F<4;
F++)Q[F]=x["Ang"+F].v};jH.ClrH.prototype.v3=function(x,Q){x.Rds.v=Q[0];for(var F=1;F<4;F++)x["Ang"+F].v=Q[F]};
jH.ClrH.prototype._=function(){var x=this.Ai;x[0]._();for(var F=1;F<4;F++)x[F].UG(ah.get([12,15])+" "+F)};
jH.Crst=function(){jH.call(this,"Crst");this.Ai=[new bv([12,61],3,100," px")];this.bN()};jH.Crst.prototype=new jH;
jH.Crst.prototype.bQ=function(x,Q){Q[0]=x.ClSz.v};jH.Crst.prototype.v3=function(x,Q){x.ClSz.v=Q[0]};
jH.Mztn=function(){jH.call(this,"Mztn");this.Ai.push(new c7([12,44],"Fine Dots,Medium Dots,Grainy Dots,Coarse Dots,Short Lines,Medium Lines,Long Lines,Short Strokes,Medium Strokes,Long Strokes".split(","),[4,3,3]));
this.bw="FnDt MdmD GrnD CrsD ShrL MdmL LngL ShSt MdmS LngS".split(" ");this.bN()};jH.Mztn.prototype=new jH;
jH.Mztn.prototype.bQ=function(x,Q){Q[0]=this.bw.indexOf(x.MztT.v.MztT)};jH.Mztn.prototype.v3=function(x,Q){x.MztT.v.MztT=this.bw[Q[0]]};
jH["Msc "]=function(){jH.call(this,"Msc ");this.Ai=[new bv([12,61],2,200," px")];this.bN()};jH["Msc "].prototype=new jH;
jH["Msc "].prototype.bQ=function(x,Q){Q[0]=x.ClSz.v.val};jH["Msc "].prototype.v3=function(x,Q){x.ClSz.v.val=Q[0]};
jH.Pntl=function(){jH.call(this,"Pntl");this.Ai=[new bv([12,61],3,100," px")];this.bN()};jH.Pntl.prototype=new jH;
jH.Pntl.prototype.bQ=function(x,Q){Q[0]=x.ClSz.v};jH.Pntl.prototype.v3=function(x,Q){x.ClSz.v=Q[0]};
jH.smartSharpen=function(){jH.call(this,"smartSharpen");this.Ai=[new bv([12,57],1,200,"%"),new bv([12,56],0,200,"px",1,!0)];
this.bN()};jH.smartSharpen.prototype=new jH;jH.smartSharpen.prototype.bQ=function(x,Q){Q[0]=x.Amnt?x.Amnt.v.val:200;
Q[1]=x.Rds?x.Rds.v.val:1};jH.smartSharpen.prototype.v3=function(x,Q){x.Amnt.v.val=Q[0];x.Rds.v.val=Q[1]};
jH.UnsM=function(){jH.call(this,"UnsM");this.Ai=[new bv([12,57],1,200," %"),new bv([12,56],.1,400,"px",1,!0),new bv([4,13],0,255," ")];
this.bN()};jH.UnsM.prototype=new jH;jH.HghP=function(){jH.call(this,"HghP");this.Ai=[new bv([12,56],.1,400,"px",1,!0)];
this.bN()};jH.HghP.prototype=new jH;jH.HsbP=function(){jH.call(this,"HsbP");this.Ai=[new c_("Input",["RGB","HSB","HSL"]),new c_("Output",["RGB","HSB","HSL"])];
this.bN()};jH.HsbP.prototype=new jH;jH["Mxm "]=function(){jH.call(this,"Mxm ");this.Ai=[new bv([12,56],.1,200," px",1,!0),new c7([12,76,1],[[12,93,3],"Circle"])];
this.bN()};jH["Mxm "].prototype=new jH;jH["Mnm "]=function(){jH.call(this,"Mnm ");this.Ai=[new bv([12,56],.1,200," px",1,!0),new c7([12,76,1],[[12,93,3],"Circle"])];
this.bN()};jH["Mnm "].prototype=new jH;jH.Ofst=function(){jH.call(this,"Ofst");this.Ai=[new bv([22,4,0],-1024,1024," px"),new bv([22,4,1],-1024,1024," px"),new c7([24,18,0],[[24,18,2],[24,18,1],[24,18,3]])];
this.bN()};jH.Ofst.prototype=new jH;jH.Kale=function(){jH.call(this,"Kale");this.Ai=[new bf("Mirrors",2,20),new bf([12,15],0,360,"\xB0")];
this.bN()};jH.Kale.prototype=new jH;jH.Kale.prototype.bQ=function(x,Q){Q[0]=x.Mirr.v;Q[1]=x.MRot.v};
jH.Kale.prototype.v3=function(x,Q){x.Mirr.v=Q[0];x.MRot.v=Q[1]};jH.Rept=function(){jH.call(this,"Rept");
this.Ai=[new bf([12,38],1,300," %"),new bf("Row Shift",-50,50," %"),new bf("Space X",-99,200," %"),new bf("Space Y",-99,200," %"),new f2([4,16,2]),new iF([12,15])];
this.bN()};jH.Rept.prototype=new jH;jH.Rept.prototype.bQ=function(x,Q){Q[0]=x.Scl.v.val;Q[1]=x.Rsft.v.val;
Q[2]=x.SpcX.v.val;Q[3]=x.SpcY.v.val;Q[4]=x.SpcC.v;Q[5]=[x.Angl.v]};jH.Rept.prototype.v3=function(x,Q){x.Scl.v.val=Q[0];
x.Rsft.v.val=Q[1];x.SpcX.v.val=Q[2];x.SpcY.v.val=Q[3];x.SpcC.v=Q[4];x.Angl.v=Q[5][0];return x};jH.Ctoa=function(){jH.call(this,"Ctoa");
this.Ai=[new jz([13,0]),new hc(!0),new bv(["VAR0 VAR1","Transparency",[4,13]],0,100," %"),new bv(["VAR0 VAR1",[12,0],[4,13]],0,100," %")];
this.bN()};jH.Ctoa.prototype=new jH;jH.Ctoa.prototype.bQ=function(x,Q){Q[0]=x.Clr.v;Q[1]=x.Trsp.v.val;
Q[2]=x.Opct.v.val};jH.Ctoa.prototype.v3=function(x,Q){x.Clr.v=Q[0];x.Trsp.v.val=Q[1];x.Opct.v.val=Q[2]};
jH.LqFy=function(){jH.call(this,"LqFy");this.Vu=!1;this.oo=!1;this.IQ=null;this.av_=null;this.f=0;this.zq=-1;
this.s={eh:[[{f:{id:0,name:[24,1,0,1,0],Ga:"liq/smudge"}}],[{f:{id:1,name:[24,1,0,1,1],Ga:"liq/reconstruct"}}],[{f:{id:2,name:[24,1,0,1,2],Ga:"liq/smooth"}}],[{f:{id:3,name:[24,1,0,1,3],Ga:"liq/twirl"}}],[{f:{id:4,name:[24,1,0,1,4],Ga:"liq/shrink"}}],[{f:{id:5,name:[24,1,0,1,5],Ga:"liq/blow"}}],[{f:{id:6,name:[24,1,0,1,6],Ga:"liq/pleft"}}],[{f:{id:7,name:"Hand",Ga:"tools/hand"}}],[{f:{id:8,name:"Zoom In",Ga:"zoomIn"}}],[{f:{id:9,name:"Zoom Out",Ga:"zoomOut"}}]],keys:[]};
this.D7=new ea(this.s,!1);this.D7.jM(0);this.D7.k(u.E.M,this.Ei,this);this.te=d1.Bk();this.xg=null;this.sp=[];
this.WM=-1;this.I$=null;this.aAg=null;this.c6=null;this.bo=null;this.zu=null;var x=E.p("div","flexrow");
this.VL=x;this.n.appendChild(x);x.appendChild(this.D7.n);this.view=new cJ(!0);this.view.oN(100,100);
this.view.k("mousedown",this.Nn,this);this.view.k("mousemove",this.G3,this);this.view.k("mouseup",this.zc,this);
this.view.k("zoom",this.Rv,this);x.appendChild(this.view.n);var Q=E.p("div","form");x.appendChild(Q);
this.a3=Q;Q.style.width="230px";this.cn=[new bv([12,14,0],0,1e3,null,!1,!0),new bv([12,74],0,100,null,!1,!1),new bv([12,84],0,100,null,!1,!1),new f2([12,46]),new bv([12,0],0,100,null,!1,!1),new f2([24,18,5])];
var c=this.te.Brsh.v;c.Dmtr.v.val=100;var $=[100,50,100,!1,100,!0];for(var F=0;F<this.cn.length;F++){var z=this.cn[F];
z.U($[F]);if(F==4)z.hp();z.k(u.E.t,this.a2L,this);Q.appendChild(z.n)}var j=this.a1k=new j7([1,12,2],!0,null,!0);
j.k("click",this.xI,this);Q.appendChild(j.n);this.atm=this.X0.bind(this);this.g1=new kw;this.g1.n=E.p("div","floatcont");
this.E6=new j7("Menu",!1,null,!0);var U=this.E6.n;U.setAttribute("style","position:absolute; right:13px; top:47px");
E.KH(U,this.acs.bind(this))};jH.LqFy.prototype=new jH;jH.LqFy.prototype.Ct=function(){return!0};jH.LqFy.prototype.hI=function(x){this.a3.appendChild(x)};
jH.LqFy.prototype.acs=function(x){if(E.rm(this.g1.n))return;x.stopPropagation();var Q=this.E6.n.getBoundingClientRect();
this.g1.n.appendChild(this.a3);var c=new jO(u.E.M,!0);c.data={d:u.H.A_,G7:this.g1,x:Q.right+Q.width-290,y:Q.top+Q.height};
this.T(c)};jH.LqFy.prototype.sM=function(x){this.Vu=x.S(fM.Al);var Q=X.x7.cI(this.te,x);if(Q!=null){this.te=Q;
this.Rv();this.cn[0].U(Q.Brsh.v.Dmtr.v.val)}else if(x.S(fM.qP)&&x.S(fM.hy)){var c=this.sp;if(x.S(fM.FT)){if(this.WM+1<c.length)this.WM++}else if(this.WM>0)this.WM--;
this.xg.map=c[this.WM].slice(0);this._I(null)}else if(this.f<=6)this.view.sM(x);var $=this.f,z=-1,j=x.S(fM.Al);
if(j&&this.zq==-1){if($==0)z=1;if($==4)z=5;if($==5)z=4;if(z!=-1)this.zq=$}if(!j&&this.zq!=-1){z=this.zq;
this.zq=-1}if(z!=-1){this.f=z;this.D7.jM(this.f)}};jH.LqFy.prototype.Ei=function(x){if(x.data.d==u.H.ax){var Q=this.f=x.data.f;
this.D7.jM(this.f);this.view.sM(Q>6?cJ.A1(Q-7):new fM)}};jH.LqFy.prototype.a2L=function(x){var Q=x.currentTarget,F=this.cn.indexOf(Q),c=this.te.Brsh.v;
if(F==0){c.Dmtr.v.val=Q.h();this.Rv()}this.cn[4].vz(this.cn[3].h());if(F>2)this._I(null)};jH.LqFy.prototype.VD=function(){var x=this.sp;
this.WM++;x[this.WM]=this.xg.map.slice(0);while(x.length>this.WM+1)x.pop();while(x.length>50){x=x.slice(1);
this.WM--}};jH.LqFy.prototype.Nn=function(x){this.IQ=this.view.s_();this.av_=new bC(0,0);this.oo=!0;
window.requestAnimationFrame(this.atm)};jH.LqFy.prototype.G3=function(x){var Q=this.view.s_(),c=new bC(Q.x-this.IQ.x,Q.y-this.IQ.y);
if(this.f==0||this.f==6)this.aw$(c);this.IQ=Q};jH.LqFy.prototype.zc=function(x){this.VD();this.oo=!1};
jH.LqFy.prototype.X0=function(x){if(this.f!=0&&this.f!=6)this.aw$(new bC(0,0));if(this.oo)window.requestAnimationFrame(this.atm)};
jH.LqFy.prototype.aw$=function(x){var Q=this.xg,c=Q.ww/this.I$.m,$=this.IQ,z=this.te.Brsh.v,j=z.Dmtr.v.val,U=Date.now(),i=Q.ww,b=Q.R0,e=Math.sqrt(x.x*x.x+x.y*x.y),k=Math.max(1,Math.ceil(e/2)),K=x.x/k,g=x.y/k,R=$.clone(),T=this.f,D=this.cn[1].h()/100,a=this.cn[2].h()/100,_=[.005,.015,0,0,.2,.2,.01,.01,.05,.35,.1,.1,.005,.015],I=_[T*2],f=_[T*2+1],y=(1-D)*I+D*f,Z=j*c/2;
for(var F=0;F<k;F++){var v=[];R.x+=K;R.y+=g;d.pX.auV(Q.map,i,b,T,R.x*c,R.y*c,Z,D,a,K*c,g*c,v,this.Vu);
d.pX.arQ(i,b,Q.map,v,2*y*a)}var G=new gh(0,0,i,b),q=new gh($.x*c,$.y*c,0,0);q.ss(j*c*.5,j*c*.5);var h=q.clone();
h.offset(x.x*c,x.y*c);q=q.iO(h);var r=new gh(q.x/c,q.y/c,q.m/c,q.e/c);r=d.A.Yc(r).y_(this.I$);this.cn[5].U(!0);
this._I(r)};jH.LqFy.prototype.Rv=function(){var x=cG.$a(this.te,null,this.view.m1().W);this.view.vM(x)};
jH.LqFy.prototype.U=function(x,Q,c,$,z){c=c.clone();if(Q==null)return;if(!$.HM(c)){var j=c.iO($),U=d.R(j.P()*4);
d.WK(Q,c,U,j);Q=U;c=j;var i=d.R(j.P()*4);d.WK(z,$,i,j);z=i}c.x=c.y=0;this.c6=Q;this.aAg=z;this.zu=Q.slice(0);
this.bo=Q.slice(0);this.I$=c;this.xg=id.s5(new Uint8Array(x.LqMe.v).buffer);var b=c.m,e=c.e;if(this.xg.ww/b<.22){this.xg={ww:Math.floor(b/4),R0:Math.floor(e/4)};
this.xg.map=new Float32Array(this.xg.ww*this.xg.R0*2)}this.sp=[];this.WM=-1;this.VD();this._I(null);
this.view.MR(!0);this.Rv()};jH.LqFy.prototype.h=function(){var x=fK.$H("LqFy"),Q=new Uint8Array(id.o5(this.xg)),c=[];
for(var F=0;F<Q.length;F++)c.push(Q[F]);x.LqMe.v=c;return x};jH.LqFy.prototype.oN=function(x,Q){this.D7.oN(x,Q);
var c=this.E6.n,$=this.a3;this.VL.appendChild($);this.VL.appendChild(c);if(x>450&&x-Q>200){$.style.marginLeft="1em";
this.VL.removeChild(c);this.view.oN(x-238-45,Q)}else{$.style.marginLeft="";this.VL.removeChild($);this.view.oN(x-40,Q)}};
jH.LqFy.prototype._=function(){this.D7._();this.a1k._();for(var F=0;F<this.cn.length;F++)this.cn[F]._()};
jH.LqFy.prototype.xI=function(){this.xg.map.fill(0);this.VD();this._I(null)};jH.LqFy.prototype._I=function(x){var Q=this.I$,c=this.c6,$=this.zu,z=this.xg;
if(this.cn[5].h())d.pX.rz(c,this.bo,Q.m,Q.e,x,z.map,z.ww,z.R0,0);else this.bo.set(c);if(this.cn[3].V$()){d.WK(this.aAg,Q,$,Q,x?x:Q);
d.l.UY("norm",this.bo,Q,$,Q,x?x:Q,this.cn[4].h()/100)}else d.SO(this.bo,$);this.view.U([{K$:Q,data:$.buffer}])};
jH.GEfc=function(){jH.call(this,"GEfc");this.cM=0;this.zV=0;this.c6=null;this.zu=null;this.I$=null;this.n$=null;
this.nk=null;this.vh=0;this.H$=null;this.EI=null;var x=E.p("div","flexrow");this.VL=x;this.n.appendChild(x);
this.view=new cJ(null);this.view.oN(100,100);x.appendChild(this.view.n);this.Jd="";this.wi=270;var Q=this.V2=E.p("div","form scrollable");
x.appendChild(Q);Q.setAttribute("style","width:"+this.wi+"px;");var c=this.ZN=E.p("div","form");x.appendChild(c);
c.setAttribute("style","width:230px;  margin:0 10px");this.Ek={};for(var $ in ag.names){var z=new jH.GEfc.ny($);
z.parent=this;this.Ek[$]=z;z.k(u.E.t,this.ak$,this)}this.Es=!0;this.E6=new j7("Menu",null,null,!0);this.E6.k("click",this.aqX,this);
x.appendChild(this.E6.n);this.WR=new j7(">>",null,null,!0);this.WR.k("click",this.apx,this);c.appendChild(this.WR.n);
this.pY=E.p("div");this.pY.setAttribute("style","margin-bottom:1.5em;  display:inline-block;  width:calc(100% - 40px);");
c.appendChild(this.pY);this.sF=E.p("div");this.sF.style.minHeight="14em";this.sF.style.marginBottom="1em";
c.appendChild(this.sF);this.cv=E.p("div","lpbody scrollable");this.Tx=E.p("div","lpfoot");c.appendChild(this.cv);
c.appendChild(this.Tx);this.k("click",this.awO,this);this.fp=[];iM.Oy([[5,3],[5,4]],this.fp,this.Tx,this.bD.bind(this))};
jH.GEfc.prototype=new jH;jH.GEfc.prototype.Ct=function(){return!0};jH.GEfc.prototype.hI=function(x){this.pY.appendChild(x)};
jH.GEfc.prototype.Fy=function(x,Q){this.n$=x;if(x.Gj==x.QI)alert("Your foreground and a background color are identical.",4e3)};
jH.GEfc.prototype.apx=function(x){var Q=this.V2.style.display!="none";this.V2.style.display=Q?"none":"";
this.WR.UG(Q?"<<":">>");this.oN()};jH.GEfc.prototype.aqX=function(x){this.Es=!this.Es;this.oN()};jH.GEfc.prototype.oN=function(x,Q){var c=this.V2.style.display!="none";
if(x!=null){this.cM=x;this.zV=Q;if(x<1e3&&c||x>=1e3&&!c){this.apx();c=!c}this.Es=x>600}else{x=this.cM;
Q=this.zV}var $=this.Es?250+(c?this.wi:0):0;if(E.rm(this.ZN)&&!this.Es){this.VL.removeChild(this.V2);
this.VL.removeChild(this.ZN)}if(!E.rm(this.ZN)&&this.Es){this.VL.appendChild(this.V2);this.VL.appendChild(this.ZN)}this.V2.style.height=Q+"px";
this.view.oN(x-$,Q);this.cv.style.height=Q-Math.max(this.sF.getBoundingClientRect().height,186)-96+"px";
this.E6.n.setAttribute("style","position:absolute; top:46px;  right:"+($+16)+"px")};jH.GEfc.prototype.axM=function(){var x=ar.dy.get("img/beach",!0)[0],Q=x.K$,c=this.V2,$=Math.floor(E.q_()*(this.wi-40)/3),z=~~($*.7),j=new gh(0,0,$,z),U=d.R($*z*4),i=U.slice(0),b=Math.round(10*E.q_()),e=new ImageData(new Uint8ClampedArray(i.buffer),$,z);
d.WK(new Uint8Array(x.data),Q,U,new gh(Math.round((Q.m-$)/2),Math.round((Q.e-z)/2),$,z));var k=E.p("canvas"),K=k.getContext("2d");
k.width=$;k.height=z+Math.round(b*1.5);K.font=b+"px sans-serif";this.H$={};E.Os(c);var g=this.aey.bind(this);
for(var F=0;F<ag.Db.length;F++){var R=ag.Db[F],T=E.p("div");c.appendChild(T);T.setAttribute("style","background-color:rgba(0,0,0,0.2); padding:0px 8px; margin-bottom:8px");
T.textContent=ah.get(R);for(var D in ag.names){var a=ag.names[D];if(a[0]!=F)continue;ag.NH(D,{rect:j,buffer:U},ag.$H(D),{Z:0,r:0,J:0},{Z:255,r:255,J:255},{rect:j,buffer:i},{});
K.fillStyle="black";K.fillRect(0,0,500,500);K.putImageData(e,0,0);var _=ah.get(a[1]);K.fillStyle="white";
K.fillText(_,($-K.measureText(_).width)/2,z+Math.round(b*1.1));var I=E.p("div");c.appendChild(I);I.setAttribute("style","display:inline-block; cursor:pointer; padding: 5px 5px 0 5px; margin-bottom:5px");
I.addEventListener("click",g,!1);var T=E.p("img");I.appendChild(T);T.setAttribute("src",k.toDataURL());
T.setAttribute("style","width:"+$/E.q_()+"px; margin-bottom:0px;");this.H$[D]=I}}};jH.GEfc.prototype.aey=function(x){var Q;
for(var c in this.H$)if(this.H$[c]==x.currentTarget)this.Jd=c;this.ak$()};jH.GEfc.prototype.bD=function(x){var Q=iM.B$(this.fp,x),c=this.nk.GEfs.v,$=c[this.vh].v;
if(Q==0){c.push(JSON.parse(JSON.stringify(c[this.vh])));this.vh=c.length-1}else if(c.length>1){c.splice(this.vh,1);
if(this.vh==c.length)this.vh--}this.ZT();this._I()};jH.GEfc.prototype.ak$=function(x){var Q=this.Jd,c;
if(x==null)c=ag.$H(Q);else c=this.Ek[Q].h();this.nk.GEfs.v[this.vh].v=c;this.ZT();this._I()};jH.GEfc.prototype.U=function(x,Q,c,$,z){var j=ah.get([24,0]);
if(this.H$==null||j!=this.EI)this.axM();this.EI=j;x=this.nk=JSON.parse(JSON.stringify(x));if(x.GEfs==null)x=this.nk={__name:"Filter Gallery",classID:"GEfc",GEfs:{t:"VlLs",v:[{t:"Objc",v:x}]}};
var U=x.GEfs.v;for(var F=0;F<U.length;F++)if(U[F].v.GELv==null)U[F].v.GELv={t:"bool",v:!0};this.vh=U.length-1;
this.ZT();c=c.clone();if(Q==null)return;if(!$.HM(c)&&ag.xs(x).x!=0){var i=c.iO($),b=d.R(i.P()*4);d.WK(Q,c,b,i);
Q=b;c=i}c.x=c.y=0;this.c6=Q;this.zu=Q.slice(0);this.I$=c;this._I();this.view.MR()};jH.GEfc.prototype.awO=function(x){var Q=x.data,F=Q.xR,c=this.nk.GEfs.v;
if(Q.qB){c[F].v.GELv.v=!c[F].v.GELv.v;this._I()}else this.vh=F;this.ZT()};jH.GEfc.prototype.ZT=function(){var x=this.nk.GEfs.v,Q=x[this.vh].v,c=Q.GEfk.v.GEft,$=this.sF;
if(ag.names[c]==null){alert("Unsupported gallery filter");E.Os($)}else{this.Jd=c;for(var z in this.H$)E.WP(this.H$[z],"selected");
E.ZW(this.H$[c],"selected");var j=this.Ek[c];j.U(Q);if($.firstChild!=j.n){E.Os($);$.appendChild(j.n)}}var U=[];
for(var F=0;F<x.length;F++){var i=x[F].v,b=ag.names[i.GEfk.v.GEft],e=new h$(F,!0,!0,null,b?b[1]:"Filter",F==this.vh,i.GELv.v);
e.parent=this;U.push(e.n)}E.Os(this.cv);U.reverse();for(var F=0;F<U.length;F++)this.cv.appendChild(U[F]);
this.oN()};jH.GEfc.prototype.h=function(){return JSON.parse(JSON.stringify(this.nk))};jH.GEfc.prototype._I=function(x){var Q=this.I$,c=this.c6,$=this.zu,z=this.Jd,j=this.nk,U=this.n$;
function i(b){return{Z:b>>>16,r:b>>>8&255,J:b&255}}fK.NH("GEfc",{rect:this.I$,buffer:this.c6},j,i(U.Gj),i(U.QI),{rect:this.I$,buffer:this.zu},null);
this.view.U([{K$:Q,data:$.buffer}])};jH.GEfc.prototype._=function(){for(var x in this.Ek)this.Ek[x]._();
iM.fK(this.fp,["lrs/newlayer","lrs/bin"])};jH.GEfc.ny=function(x){kw.call(this);this.R7=x;this.n=E.p("div");
this.Xg={};var Q=ag.$H(x);for(var c in Q){var $=null;if(c=="__name"||c=="classID"||c=="GEfk"||c=="GELv"||["FlRs"].indexOf(c)!=-1)continue;
else if(c=="EdgW")$=new bv("Edge Width",1,14);else if(c=="EdgB")$=new bv("Edge Brightness",0,x=="AccE"?50:20);
else if(c=="Smth")$=new bv([19,3,3],1,x=="Stmp"?50:15);else if(c=="ClSz")$=new bv([12,61],3,100);else if(c=="BrdT")$=new bv([7,9],1,20);
else if(c=="HghS")$=new bv([12,64],0,20);else if(c=="HlSz")$=new bv([12,14,0],1,15);else if(c=="Cntr")$=new bv([12,3,0],0,x=="WtrP"?100:50);
else if(c=="Shrp")$=new bv("Sharpness",0,40);else if(c=="SprR")$=new bv("Spray Radius",0,25);else if(c=="LgDr")$=new bv("Light/Dark Balance",0,x=="Stmp"?50:100);
else if(c=="Drkn")$=new bv("Darkness",1,50);else if(c=="Dstr")$=new bv("Distortion",0,20);else if(c=="Scln")$=new bv([12,38],50,200);
else if(c=="Rlf")$=new bv("Relief",0,x=="Ptch"||x=="NtPr"?25:50);else if(c=="ChAm")$=new bv("Thickness",1,7);
else if(c=="Pncl")$=new bv([19,2,5],1,30);else if(c=="StrP")$=new bv("Stroke Pressure",0,15);else if(c=="PprB")$=new bv("Paper Brightness",0,50);
else if(c=="BrsS")$=new bv("Brush Size",0,10);else if(c=="BrsD")$=new bv("Brush Detail",0,10);else if(c=="Txtr")$=new bv([12,67],1,3);
else if(c=="Grn")$=new bv("Grain",0,20);else if(c=="HghA")$=new bv("Highlight Area",0,20);else if(c=="Intn")$=new bv("Intensity",0,10);
else if(c=="Brgh")$=new bv("Glow Brightness",0,x=="WtrP"?100:50);else if(c=="StrS")$=new bv("Stroke Size",1,50);
else if(c=="StDt")$=new bv("Stroke Detail",1,3);else if(c=="Sftn")$=new bv("Softness",0,10);else if(c=="EdgT")$=new bv("Edge Thickness",0,10);
else if(c=="EdgI")$=new bv("Edge Intensity",0,10);else if(c=="Pstr")$=new bv("Posterization",0,6);else if(c=="Dfnt")$=new bv("Definition",0,25);
else if(c=="TxtC")$=new bv("Texture Coverage",0,50);else if(c=="ShdI")$=new bv("Shadow Intensity",0,10);
else if(c=="DrcB")$=new bv("Direction Balance",0,100);else if(c=="Strg")$=new bv([12,64],1,3);else if(c=="Blnc")$=new bv("Balance",0,10);
else if(c=="BlcI")$=new bv("Black Intensity",0,10);else if(c=="WhtI")$=new bv("White Intensity",0,10);
else if(c=="DrkI")$=new bv("Dark Intensity",0,50);else if(c=="LghI")$=new bv("Light Intensity",0,50);
else if(c=="StrW")$=new bv("Stroke Width",3,15);else if(c=="Grns")$=new bv("Graininess",0,x=="NtPr"?20:10);
else if(c=="GlwA")$=new bv("Glow Amount",0,20);else if(c=="ClrA")$=new bv("Clear Amount",0,20);else if(c=="ChrA")$=new bv("Charcoal Area",0,20);
else if(c=="ChlA")$=new bv("Chalk Area",0,20);else if(c=="FrgL")$=new bv("Foreground Level",1,15);else if(c=="BckL")$=new bv("Background Level",1,15);
else if(c=="WhtL")$=new bv("Background Level",0,50);else if(c=="BlcL")$=new bv("Foreground Level",0,50);
else if(c=="ImgB")$=new bv("Image Balance",0,50);else if(c=="Dnst")$=new bv([12,74],0,50);else if(c=="FbrL")$=new bv("Fiber Length",3,50);
else if(c=="CrcS")$=new bv("Crack Spacing",2,100);else if(c=="CrcD")$=new bv("Crack Depth",0,10);else if(c=="CrcB")$=new bv("Crack Brightness",0,10);
else if(c=="TlSz")$=new bv("Tile Size",2,100);else if(c=="GrtW")$=new bv("Grout Width",1,15);else if(c=="LghG")$=new bv("Lighten Grout",0,10);
else if(c=="SqrS")$=new bv("Square Size",0,10);else if(c=="RplS")$=new bv("Ripple Size",1,15);else if(c=="RplM")$=new bv("Ripple Magnitude",0,20);
else if(c=="NmbL")$=new bv("Number of Levels",2,8);else if(c=="EdgS")$=new bv("Edge Simplicity",0,10);
else if(c=="EdgF")$=new bv("Edge Fidelity",1,3);else if(c=="Sz")$=x=="NGlw"?new bv("Glow Size",-24,24):new bv("Brush Size",1,50);
else if(c=="Dtl")$=x=="Chrc"?new bv("Detail",0,5):new bv("Detail",1,15);else if(c=="StrL")$=x=="InkO"?new bv("Stroke Length",1,50):new bv("Stroke Length",0,20);
else if(c=="TxtT")$=new c7([12,67],"Blocks,Canvas,Frosted,Tiny Lens,Bricks,Burlap,Sandstone".split(","));
else if(c=="BrsT")$=new c7("Brush Type","Simple,Light Rough,Dark Rough,Wide Sharp,Wide Blurry,Sparkle".split(","));
else if(c=="Grnt")$=new c7("Grain Type","Regular Soft Sprinkles Clumped Contrasty Enlarged Stippled Horizontal Vertical Speckle".split(" "));
else if(c=="SDir")$=new c7([12,33],["Right Diagonal","Horizontal","Left Diagonal","Vertical"]);else if(c=="ScrT")$=new c7([12,62],["Circle","Dot",[10,35]]);
else if(c=="LghD"||c=="LghP")$=new c7("Light","Bottom,Bottom Left,Left,Top Left,Top,Top Right,Right,Bottom Right".split(","));
else if(c=="Clr")$=new hc("Glow Color");else if(c=="InvT")$=new f2([4,11]);else console.log(c);$.k(u.E.t,this.Z9,this);
$.parent=this;this.Xg[c]=$;this.n.appendChild($.n)}};jH.GEfc.ny.prototype=new kw;jH.GEfc.ny.prototype.Z9=function(x){this.T(new jO(u.E.t,!1))};
jH.GEfc.aka="Sz Dtl Shrp EdgW EdgB Smth ClSz BrdT HghS HlSz Cntr SprR StrL LgDr Drkn Dstr Scln Rlf ChAm InvT RplS RplM Pncl StrP PprB BrsS BrsD Txtr Grn HghA Intn Brgh Clr StrS StDt Sftn EdgT EdgI Pstr Dfnt TxtC ShdI DrcB Strg Blnc BlcI WhtI DrkI LghI StrW Grns GlwA ClrA ChrA ChlA FrgL BckL WhtL BlcL ImgB Dnst FbrL CrcS CrcD CrcB TlSz GrtW LghG SqrS NmbL EdgS EdgF".split(" ");
jH.GEfc.ny.prototype.U=function(x){for(var Q in this.Xg){var c;if(jH.GEfc.aka.indexOf(Q)!=-1)c=x[Q].v;
else if(Q=="TxtT")c=ag.d5.indexOf(x[Q].v[Q]);else if(Q=="BrsT")c=ag.ax1.indexOf(x[Q].v[Q]);else if(Q=="LghD")c=ag.GU.indexOf(x[Q].v[Q]);
else if(Q=="LghP")c=ag.iJ.indexOf(x[Q].v[Q]);else if(Q=="Grnt")c=ag.MH.indexOf(x[Q].v[Q]);else if(Q=="ScrT")c=ag.i5.indexOf(x[Q].v[Q]);
else if(Q=="SDir")c=ag.O4.indexOf(x[Q].v.StrD);this.Xg[Q].U(c)}};jH.GEfc.ny.prototype.h=function(){var x=ag.$H(this.R7);
for(var Q in this.Xg){var c=this.Xg[Q].h();if(jH.GEfc.aka.indexOf(Q)!=-1)x[Q].v=c;else if(Q=="TxtT")x[Q].v[Q]=ag.d5[c];
else if(Q=="BrsT")x[Q].v[Q]=ag.ax1[c];else if(Q=="LghD")x[Q].v[Q]=ag.GU[c];else if(Q=="LghP")x[Q].v[Q]=ag.iJ[c];
else if(Q=="Grnt")x[Q].v[Q]=ag.MH[c];else if(Q=="ScrT")x[Q].v[Q]=ag.i5[c];else if(Q=="SDir")x[Q].v.StrD=ag.O4[c]}return x};
jH.GEfc.ny.prototype._=function(){for(var x in this.Xg)this.Xg[x]._()};jH["Adobe Camera Raw Filter"]=function(x){jH.call(this,"Adobe Camera Raw Filter");
var Q=this.n;this.aCW=x;this.za=null;this.W3=null;this.FK=1e3;this.w2=null;this.$d=null;E.ZW(Q,"flexrow");
var c=E.p("div"),$=E.p("div","padded");Q.appendChild(c);Q.appendChild($);this.pq=new cJ;this.pq.k("zoom",this._I,this);
c.appendChild(this.pq.n);this.wL=new jh(225);this.wL.VW(4);$.appendChild(this.wL.n);this.n5=E.p("div");
this.n5.setAttribute("style","width:18em;");$.appendChild(this.n5);this.anF=new jz("Hi",!0);this.n5.appendChild(this.anF.n);
this.eX=E.p("div","scrollable");this.n5.appendChild(this.eX);this.Xg=[new bv("Temperature",-100,100),new bv("Tint",-100,100),new bv([4,3],-4,4,null,!0),new bv([12,3,0],-100,100),new bv([4,4],-100,100),new bv([12,9],-100,100)];
this.JA="Temp Tint Ex12 Cr12 Vibr Strt".split(" ");for(var F=0;F<this.Xg.length;F++){var z=this.Xg[F];
z.U(0);z.k(u.E.t,this._I,this);this.eX.appendChild(z.n);if(F==1||F==3)this.eX.appendChild(E.p("hr"))}};
jH["Adobe Camera Raw Filter"].prototype=new jH;jH["Adobe Camera Raw Filter"].prototype.Ct=function(){return!0};
jH["Adobe Camera Raw Filter"].prototype.hI=function(x){this.n5.appendChild(x)};jH["Adobe Camera Raw Filter"].prototype.Fy=function(x,Q){this.wL.wC(bN.ua[x.b4]["--text-color"])};
jH["Adobe Camera Raw Filter"].prototype.U=function(x,Q,c,$,z){this.nk=x;var j=c.m,U=c.e,i=j*U;this.anF.U(j+" x "+U+", "+(j*U/1e6).toFixed(1)+" MPx");
this.I$=c;this.w2=new Float32Array(j*U*3);this.$d=new Uint8Array(j*U*4);this.$d.fill(255);if(Q instanceof Float32Array)this.za=Q;
else{var b=this.za=new Float32Array(j*U*3);for(var F=0;F<i;F++){var e=F*3,k=F*4;b[e+0]=Q[k+0]*(1/255);
b[e+1]=Q[k+1]*(1/255);b[e+2]=Q[k+2]*(1/255)}}this.W3=[{AX:this.za,rect:c.clone()}];this.FK=1e3;var K=this.za;
while(j>1&&U>1){var g=j,R=g*3;j=j>>>1;U=U>>>1;var T=K,K=new Float32Array(j*U*3);this.W3.push({AX:K,rect:new gh(0,0,j,U)});
for(var D=0;D<U;D++)for(var a=0;a<j;a++){var e=(D*j+a)*3,_=(D*2*g+a*2)*3,I=_+R;K[e]=.25*(T[_]+T[_+3]+T[_+R]+T[_+R+3]);
K[e+1]=.25*(T[_+1]+T[_+4]+T[_+R+1]+T[_+R+4]);K[e+2]=.25*(T[_+2]+T[_+5]+T[_+R+2]+T[_+R+5])}}var f=this.JA;
for(var F=0;F<f.length;F++){var y=f[F];this.Xg[F].U(x[y]?x[y].v:0)}this.pq.U([{K$:c,data:this.$d.buffer}]);
this.pq.MR();this._I(null)};jH["Adobe Camera Raw Filter"].prototype.h=function(x){if(x){this._I(null,!0);
return this.$d}return JSON.parse(JSON.stringify(this.nk))};jH["Adobe Camera Raw Filter"].prototype.ak0=function(){this.za=null;
this.w2=null;this.W3=null;this.$d=null};jH["Adobe Camera Raw Filter"].prototype._I=function(x,Q){if(x&&this.Xg.indexOf(x.target)!=-1){this.FK=1e3;
var c=this.JA;for(var F=0;F<c.length;F++){var $=c[F];this.nk[$]={t:$=="Ex12"?"doub":"long",v:this.Xg[F].h()}}}var z=this.pq.m1().W,j=0;
while(z*2<=1&&!Q){z*=2;j++}if(this.FK<=j)return;this.FK=j;var U=this.I$,i=this.aor(this.za,U,this.w2,this.nk,this.aCW,this.$d,j);
this.wL.U(i);this.pq.U([{K$:U,data:this.$d.buffer}])};jH["Adobe Camera Raw Filter"].prototype.aor=function(x,Q,c,$,z,j,U){var i=x,b=c,e=j,k=Q.m,K=Q.e,g=U!=0;
if(g){var R=this.W3[U];i=R.AX;k=R.rect.m;K=R.rect.e;b=new Float32Array(k*K*3);e=d.R(k*K*4)}cc(i,k,K,b,$,z);
var T=Date.now(),D=k*K;for(var F=0;F<D;F++){var a=F*3,_=F*4;e[_+0]=~~(.5+b[a+0]*255);e[_+1]=~~(.5+b[a+1]*255);
e[_+2]=~~(.5+b[a+2]*255);e[_+3]=255}console.log(Date.now()-T,"integer conversion");T=Date.now();var I=d.q9(e,Math.max(1,Math.floor(D/2e5)));
console.log(Date.now()-T,"histogram done");T=Date.now();if(g){var f=new Uint32Array(e.buffer),y=new Uint32Array(j.buffer),Z=Q.m,v=Q.e;
for(var G=0;G<v;G+=2)for(var q=0;q<Z;q+=2){var a=G*Z+q,h=f[(G>>>U)*k+(q>>>U)];y[a]=h;y[a+1]=h;y[a+Z]=h;
y[a+Z+1]=h}console.log(Date.now()-T,"upscale");T=Date.now()}return I};jH["Adobe Camera Raw Filter"].prototype.oN=function(x,Q){this.a27=x-248;
this.a1B=Q;this.pq.oN(this.a27,this.a1B);this.eX.style.height=Q-236+"px"};jH["Adobe Camera Raw Filter"].prototype._=function(){for(var F=0;
F<this.Xg.length;F++)this.Xg[F]._()};jH.VaPo=function(){jH.call(this,"VaPo");this.f=-1;this._s=null;
this.FZ=!1;this.KX=null;this.Q4=null;this.VR=null;this.Na=null;this.Me=null;this.am=null;this.Cv=null;
this.U7=null;this.Pm=null;this.BO=null;this.E3=null;this.sp=[];this.WM=-1;this.g=null;this.s={eh:[[{f:{id:0,name:"Move",Ga:"tools/move"}}],[{f:{id:1,name:"Create Plane",Ga:"tools/pcrop"}}],[{f:{id:2,name:"Marquee",Ga:"tools/rselect"}}],[{f:{id:3,name:"Stamp",Ga:"tools/clone"}}],[{f:{id:4,name:"Brush",Ga:"tools/brush"}}],[{f:{id:5,name:"Transform",Ga:"tools/transform"}}],[{f:{id:6,name:"Hand",Ga:"tools/hand"}}],[{f:{id:7,name:"Zoom In",Ga:"zoomIn"}}],[{f:{id:8,name:"Zoom Out",Ga:"zoomOut"}}]],keys:[fM.UE,fM.tt,fM.dm,fM.RO,fM.HK,fM.ft,fM.FI,fM.hy]};
this.D7=new ea(this.s,!1);this.D7.k(u.E.M,this.Ei,this);this.A0=null;this.I$=null;this.c6=null;this.an8=null;
this.zu=null;this.TU=null;var x=E.p("div","flexrow"),$=0;this.VL=x;this.n.appendChild(x);x.appendChild(this.D7.n);
var Q=E.p("div");x.appendChild(Q);var top=E.p("div","form");Q.appendChild(top);top.setAttribute("style","padding-left:8px; height:30px;");
this.xr=E.p("span");top.appendChild(this.xr);this.nR=[[new f0([12,80,5],1,1e3)],[new f0([7,6],0,30)],[new f0([12,14],1,200),new f0([12,17],0,100),new f0([12,0],0,100),new f2([12,75])],[new f0([12,14],1,200),new f0([12,17],0,100),new f0([12,0],0,100),new hc],[new f2("Flip"),new f2("Flop")],[]];
var c=[100,0,100,100,100,!1,100,100,100,JSON.parse(aF.Q5.nH.slice(6)).v];this.sG=[];for(var F=0;F<6;
F++){var z=E.p("span"),j=this.nR[F];this.sG.push(z);for(var U=0;U<j.length;U++){var i=j[U];i.parent=this;
i.U(c[$++]);i.k(u.E.t,this.a9B,this);z.appendChild(i.n)}}this.tB=E.p("div");this.tB.setAttribute("style","display:inline-block;float:right; width:100px;");
top.appendChild(this.tB);this.view=new cJ(!0);this.view.oN(100,100);this.view.vM("auto");this.view.k("mousedown",this.Nn,this);
this.view.k("mousemove",this.G3,this);this.view.k("mouseup",this.zc,this);E.d3(this.view.GP,this.hm.bind(this));
Q.appendChild(this.view.n)};jH.VaPo.prototype=new jH;jH.VaPo.prototype.Ct=function(){return!0};jH.VaPo.prototype.hI=function(x){this.tB.appendChild(x)};
jH.VaPo.prototype.a9B=function(x){if(x.target==this.nR[0][0]){var Q=this.AH(),c=x.target.h();for(var F=0;
F<this.g.length;F++)if(this.g[F].length!=0&&Q[F])Q[F][0]=c;this.yo(Q)}if(this.f==5){this.A0=this.YC();
this._I(!0)}this._I()};jH.VaPo.prototype.sM=function(x){var Q=this.f,c=this.Q4;if(Q==3||Q==4){var $=this.nR[Q-1],z=d1.Bk(),j=z.Brsh.v;
j.Dmtr.v.val=$[0].h();j.Hrdn.v.val=$[1].h();z=X.x7.cI(z,x);if(z){j=z.Brsh.v;$[0].U(j.Dmtr.v.val);$[1].U(j.Hrdn.v.val)}this.Rv()}if(Q==1&&c&&(x.S(fM.Hm)||x.S(fM.Z1))){c.pop();
c.pop();if(c.length==0)c=this.Q4=null;this._I()}function U(k,F,T){d.WK(k[F],k[0],T.c6,T.I$);T.VO(k[0])}this.KX=x;
if(Q<6)this.view.sM(x);var i=x.S(fM.qP);if(i){var b=this.WM,e=0;if(x.S(fM.hy)){if(x.S(fM.FT))e=1;else e=-1}else if(x.S(fM.qG))e=1;
if(e!=0&&Q!=5){console.log(this.WM,e,this.sp);var k=this.sp[this.WM],K=!1;if(k.length==3&&e==-1){U(k,1,this);
K=!0}b+=e;this.WM=Math.max(0,Math.min(this.sp.length-1,b));k=this.sp[this.WM];if(k.length==3&&e==1){U(k,2,this);
K=!0}this._I(K)}if(x.S(fM.UE)){if(E.jA())hF.aB$(this.z7.bind(this))}if(x.S(fM.MC)){this.Me=null;this._I()}}else{var g=this.s.keys;
for(var F=0;F<g.length;F++)if(x.S(g[F]))this.jM(F)}if(x.S(fM.Z1)||x.S(fM.Hm)){var R=this.AH();R=d.rs.atI(R,this.g);
this.g=[];for(var F=0;F<R.length;F++)this.g[F]=[];this.yo(R);this._I()}};jH.VaPo.prototype.z7=function(x){if(x=="granted")hF._x(this,this.lq.bind(this))};
jH.VaPo.prototype.lq=function(x,Q){if(this.Na==null)this.Na=[0,0];if(this.f==5)this.jM(0);this.jM(5,{aJ:x,W4:Q})};
jH.VaPo.prototype.Ei=function(x){if(x.data.d==u.H.ax){this.jM(x.data.f)}};jH.VaPo.prototype.aCH=function(x){var Q=this.view.s_(x),c=d.rs.hZ(this.AH(),this.g),$=1e9,z=0;
for(var F=0;F<c.length;F++){var j=c[F][0],U=Q.x-j[0],i=Q.y-j[1],b=Math.sqrt(U*U+i*i);if(b<$){$=b;z=F}}if($>4*E.q_()/this.view.m1().W)return null;
return c[z]};jH.VaPo.prototype.hm=function(x){var Q=this.f,c=this.Q4;if(Q<2&&!this.FZ){var $=this._s=this.aCH(x),z=this.AH(),j="auto";
if(Q==0&&d.rs.uP(z,$)){var U=z[$[1]][1][$[2]],i=U[5+{1:0,5:1,7:2,3:3}[$[3]]],b=i[0],e=i[1];j=aH.a6y(b[1]-e[1],-b[0]+e[0])}if(d.rs.ai8(z,$))j="crosshair";
this.view.vM(j)}if(c){var k=this.view.s_(x),K=c.slice(0);c[c.length-2]=k.x;c[c.length-1]=k.y;this._I()}this.Rv(x);
if(Q==5&&!this.FZ&&this.B5){var k=this.view.s_(x),z=this.AH(),g=d.rs.Ka(z,k.x,k.y,this.IW());if(g){var R=new bC(g[2][0],g[2][1]),T=d.rs.XI(z,z[g[0]][1][g[1]],this.IW()),D=T[1],a=d.D.u_(T[0],D),_=[D.x+D.m/2,D.y+D.e/2];
d.D.i(a,_);var I=k.x-_[0],f=k.y-_[1],y=this.B5.o7(R,this.view.m1().W,null,null,Math.atan2(-f,-I));this.view.vM(y?y:"default")}}};
jH.VaPo.prototype.Rv=function(x){var Q=this.f,c=this.KX;if((Q==3||Q==4)&&!this.FZ){var $=x?this.view.s_(x):this.Uv,z=this.AH();
this.Uv=$;if($==null)return;var j=d.rs.Ka(z,$.x,$.y,this.IW());if(j){if(Q==3&&this.E3&&this.nR[2][3].h()){var U=new bC(j[2][0],j[2][1]);
this.BO=U.HY(this.E3);this._I()}if(Q==3&&(this.BO==null||c&&(c.S(fM.Al)||c.S(fM.ui)))){if(this.A0){this.TU=null;
this.VO(this.A0);this._I(!0,this.A0)}return}this.asx(j,this.A0)}}};jH.VaPo.prototype.IW=function(){return[this.I$.m/2,this.I$.e/2]};
jH.VaPo.prototype.Nn=function(x){this.FZ=!0;var Q=this.f,c=this.Q4,$=this.AH(),z=this.KX,j=this._s=this.aCH(null),U=this.view.s_(),i=d.rs.Ka($,U.x,U.y,this.IW()),b=i?new bC(i[2][0],i[2][1]):null;
if(d.rs.ai8($,j)){var e=$[j[1]][1][j[2]];$.splice(j[1],1);this.g.splice(j[1],1);c=d.rs.aib(e);var k=-1,U=j[0];
for(var F=0;F<8;F+=2){var K=c[F]-U[0],g=c[F+1]-U[1];if(K*K+g*g<1e-5)k=F}k=k+2&7;c=this.Q4=c.slice(k).concat(c.slice(0,k));
this.yo($)}else if(d.rs.uP($,j)){if(Q==1||z&&z.S(fM.qP)){$=d.rs.aCZ($,j,this.IW());this.yo($);j[2]=$[j[1]][1].length-1;
j[3]=8+(j[3]+4&7);this.g[j[1]].push(j[2]);this.yo($,!0);this.jM(0)}else this.yo(this.AH($))}else if(Q==0){var R=[];
for(var F=0;F<$.length;F++)R.push([]);if(i){if(z&&z.S(fM.FT))R=this.g;var T=R[i[0]].indexOf(i[1]);if(T==-1)R[i[0]].push(i[1]);
else R[i[0]].splice(T,1)}this.g=R;this.yo($,!0);this._I()}else if(Q==2){if(i){var D=this.Me;if(D&&D.Wl(b)){if(z)if(z.S(fM.Al)||z.S(fM.qP)){this.jM(5);
this.Nn(x);return}this.am=new bC(b.x-D.x,b.y-D.y)}else{this.VR=i[2].concat(i[2]);this.Na=i}}}else if(Q==3||Q==4){if(Q==3){if(z&&(z.S(fM.Al)||z.S(fM.ui))){if(i){this.BO=b;
this.U7=b.clone();this.E3=null;this.Pm=i;this._I()}else alert("You must click into a plane");this.FZ=!1;
return}else if(this.BO==null){alert(ah.get([15,7,0]));this.FZ=!1;return}else if(i){var a=this.E3=b.HY(this.BO)}}if(i){this.asx(i)}}else if(Q==5){if(i){var _=new bC(i[2][0],i[2][1]),I=this.B5.Eu({Q:this.view.m1()},{},z,_)}}};
jH.VaPo.prototype.asx=function(x,Q){var c=this.TU;if(c==null)this.TU=c=d.R(this.I$.P()*4);else c.fill(0);
var $=this.f;this.Na=x;var z=this.nR[$-1],j=d.a3d.aok(z[0].h(),z[1].h()/100,1),U=d.R(j[1].P()*4);d.Dm(j[0],U,3);
if($==4){var i=d.I.Du(z[3].h());d.h4(U,Math.round(i.J)<<16|Math.round(i.r)<<8|Math.round(i.Z)<<0,4278190080)}this.Cv={ayV:j[0],aJ:U,W4:j[1]};
var b=this.A0=this.Mo(x[2],x[2]),e=Q?Q.iO(b):b;this.VO(e);this._I(!0,e)};jH.VaPo.prototype.G3=function(x){var Q=this._s,c=this.f,$=this.AH();
if(c==0&&d.rs.uP($,Q)){$=d.rs.ahx($,Q,this.view.s_());this.yo($,!0);this._I()}var z=this.am;if(c==2&&this.FZ&&(this.VR||z)){var j=this.view.s_(),U=d.rs.Ka($,j.x,j.y,this.IW());
if(U){this.Na=U;if(z){this.Me.x=U[2][0]-z.x;this.Me.y=U[2][1]-z.y}else{this.VR=this.VR.slice(0,2).concat(U[2]);
this.Me=d.A.cl(this.VR)}this._I()}}if((c==3||c==4)&&this.FZ){var j=this.view.s_(),U=d.rs.Ka($,j.x,j.y,this.IW());
if(U){if(c==3){var i=this.E3;this.BO=new bC(U[2][0]-i.x,U[2][1]-i.y)}var b=this.Mo(this.Na[2],U[2]);
this.A0=this.A0.iO(b);this.Na=U;this.VO(b);this._I(!0,b)}}if(c==5&&this.FZ){var j=this.view.s_(),U=d.rs.Ka($,j.x,j.y,this.IW(),this.Na);
if(U){var e=new bC(U[2][0],U[2][1]);this.B5.CK({Q:this.view.m1()},{},this.KX,e);this.Na=U;var b=this.A0;
if(b)this.VO(b);else b=new gh;this.A0=this.YC(null,null,!0);this._I(!0,b.iO(this.A0))}}};jH.VaPo.prototype.Mo=function(x,Q){x=new bC(x[0],x[1]);
Q=new bC(Q[0],Q[1]);var c=Math.max(1e-5,bC.Xc(x,Q)),$=this.Cv.W4.m*.2,z=new gh;for(var j=0;j<c;j+=$){var U=1-j/c,i=U*x.x+(1-U)*Q.x,b=U*x.y+(1-U)*Q.y,e=this.Cv.W4.clone();
e.x=Math.round(i-e.m/2);e.y=Math.round(b-e.e/2);if(this.f==3){var k=this.E3;if(k==null)k=new bC(i,b).HY(this.BO);
var K=this.Me=e.clone();K.x=Math.round(K.x-k.x);K.y=Math.round(K.y-k.y);var g=this.Cv.ayV;this.Cv=this.aqr(this.Pm);
this.Me=null;d.nb(g,this.Cv.aJ);this.Cv.ayV=g}var R=this.YC(this.TU,e);z=z.iO(R)}return z};jH.VaPo.prototype.zc=function(x){var Q=this._s;
if(Q&&Q[3]>=8){var c=d.rs.acM(this.AH(),Q,this.IW());this.yo(c,!0);this._I();alert("new plane added")}var $=this.f,z=this.Q4;
if(z||$==1){var j=this.view.s_();if(z==null)z=this.Q4=[j.x,j.y];if(z.length==8&&aH.pM(z)){var c=this.AH();
c.push([100,[d.rs.adx(z,this.IW())]]);this.g.push([0]);this.yo(c,!0);z=this.Q4=null;this.jM(0);this._I()}else if(z.length<8){z.push(j.x,j.y);
if(z.length==8&&!aH.pM(z)){var U=z[0],i=z[1];z[0]=z[4];z[1]=z[5];z[4]=U;z[5]=i}}}var b=this.VR;if($==2&&b&&b[0]==b[2]&&b[1]==b[3]){this.Me=null;
this._I()}if(($==3||$==4)&&this.FZ){if($==3&&!this.nR[2][3].h()&&this.U7){this.BO=this.U7.clone();this._I()}this.yo();
this.TU=null}if(!this.nR[2][3].h())this.E3=null;this.FZ=!1;this.am=null;this.VR=null};jH.VaPo.prototype.jM=function(x,Q){if(x==this.f)return;
var c=this.A0,z=6;if(this.f==5){this.yo();this.VO(c);this.B5=null;this._I()}if(this.f==3||this.f==4){this.TU=null;
if(c)this.VO(c);this._I(!0,c)}if(x==5){if(Q==null&&this.Me==null){alert("Select the area to be transformed");
return}this.a3J(Q)}if(x>1){var $=this.AH();this.f5();this.yo($,!0);this._I()}this.view.sM(x>=z?cJ.A1(x-z):new fM);
if(x<z)this.view.vM("auto");this.f=x;this.D7.jM(x);E.Os(this.xr);var j={0:0,1:0,2:1,3:2,4:3,5:4,6:5,7:5,8:5}[x];
this.xr.appendChild(this.sG[j])};jH.VaPo.prototype.AH=function(){var F=this.WM,x=this.sp;while(x[F].length==3)F--;
var Q=x[F];this.g=JSON.parse(Q[1]);return JSON.parse(Q[0])};jH.VaPo.prototype.yo=function(x,Q){if(x==null&&this.A0==null)return;
var c=this.sp,$=this.WM,F=$;while(F>=0&&c[F].length==3)F--;if(Q==null)this.WM=$=$+1;if(x!=null)c[Q?F:$]=[JSON.stringify(x),JSON.stringify(this.g)];
else{var z=this.I$,j=this.A0,U=d.R(j.P()*4),i=d.R(j.P()*4);c[$]=[j,U,i];d.WK(this.c6,z,U,j);if(this.TU)d.l.UY("norm",this.TU,z,this.c6,z,z,this.aur());
else this.YC(this.c6);d.WK(this.c6,z,i,j);this.A0=null}while(c.length!=$+1)c.pop()};jH.VaPo.prototype.aur=function(){return this.nR[this.f-1][2].h()/100};
jH.VaPo.prototype.f5=function(x,Q){if(x==null)x=this.AH();this.g=[];for(var F=0;F<x.length;F++){var c=[];
this.g.push(c);if(Q)for(var $=0;$<x[F][1].length;$++)c.push($)}};jH.VaPo.prototype.U=function(x,Q,c,$,z,j){var U=JSON.parse(JSON.stringify(j[2].rs));
this.WM=-1;this.f5(U);this.yo(U);var i=d.R($.P()*4);d.WK(Q,c,i,$);this.a9f=new gh;this.I$=$;this.an8=z;
this.c6=i;this.zu=z.slice(0);this.VO($);this._I(!0);this.view.MR();this.jM(0)};jH.VaPo.prototype.a3J=function(x){this.Cv=x?x:this.aqr();
var Q=d.A.Hg(this.Cv.W4).j;if(x){var c=this.AH(),$=d.rs.XI(c,c[0][1][0],this.IW()),z=$[1],j=Math.min(z.m/x.W4.m,z.e/x.W4.e)*.9;
if(j<1)d.A.i(Q,new bI(j,0,0,j,0,0),Q)}this.B5=new aH(Q,!0,!0);this.Me=null;this.A0=this.YC();this._I(!0)};
jH.VaPo.prototype.aqr=function(x){var Q=this.I$,c=d.A.Yc(this.Me),$=this.AH(),z=d.R(c.P()*4);if(x==null)x=this.Na;
var j=$[x[0]][1],U=d.rs.Bh($[x[0]][1],x[1],c,this.IW());for(var i=0;i<U.length;i++){var b=j[U[i]],e=d.rs.XI($,b,this.IW()),k=e[0],K=e[1],g=K.y_(c);
if(g._6())continue;g=d.A.Yc(g);var R=d.R(g.P()*4),T=d.D.u_(k,K);T=d.D.Vi([1/Q.m,0,0,0,1/Q.e,0,0,0],T);
T=d.D.HQ(T);d.D.drawImage(T,this.zu,Q.m,Q.e,R,g);d.WK(R,g,z,c)}var D=this.nR[1][0].h(),a=Math.round(D*1.4),_=c.clone();
_.ss(-a,-a);var I=d.R(_.P());I.fill(255);var f=d.R(c.P());d.L2(I,_,f,c);var y=d.R(c.P());d.yg.ZA(f,y,c,D);
d.GS(z,f,3);d.NE.y_(f,y,y);d.Dm(y,z,3);return{aJ:z,W4:c}};jH.VaPo.prototype.VO=function(x,Q){var c=this.I$;
d.WK(this.an8,c,this.zu,c,x);d.l.UY("norm",this.c6,c,this.zu,c,x,1);if(this.TU)d.l.UY("norm",this.TU,c,this.zu,c,x,this.aur())};
jH.VaPo.prototype.YC=function(x,Q,c){var $=this.Cv,z=$.W4,j=this.I$,U,i=Q?d.A.Hg(Q).j:this.B5.hZ(),b=d.A.pA(i),U=d.D.u_(i,z),e=this.nR[4],k=new bI;
if(e[0].h()){k.V=-1;k.DX=2*z.x+z.m}if(e[1].h()){k.xq=-1;k.ti=2*z.y+z.e}U=d.D.Vi(U,d.D.Gr(k));function K(p,C){p.beginPath();
p.moveTo(C[0],C[1]);for(var F=1;F<4;F++)p.lineTo(C[F*2],C[F*2+1]);p.closePath()}var g=this.AH(),R=d.rs.Bh(g[this.Na[0]][1],this.Na[1],b,this.IW()),T=g[this.Na[0]][1],D=new gh;
for(var a=0;a<R.length;a++){var _=T[R[a]],I=d.rs.XI(g,_,this.IW()),f=I[0],y=I[1],Z=y.y_(b);if(this.Me)Z=Z.y_(this.Me);
if(Z._6())continue;var v=d.D.u_(f,y),G=d.A.Hg(Z).j;d.D.i(v,G);var q=i.slice(0);d.D.i(v,q);var h=d.A.cl(q).y_(d.A.cl(G)),r=h.m,H=h.e;
if(h._6())continue;v=d.D.Vi(d.D.Vi(v,U),[z.m,0,z.x,0,z.e,z.y,0,0]);var o=d.R(h.P()*4);d.D.drawImage(v,$.aJ,z.m,z.e,o,h,c);
if(Z.P()!=b.P()){var P=d.nc(r,H);P.save();P.clearRect(0,0,r,H);P.translate(-h.x,-h.y);K(P,G);P.clip();
K(P,q);P.fill();P.restore();var O=new Uint8Array(P.getImageData(0,0,r,H).data.buffer);for(var F=3;F<o.length;
F+=4)if(O[F]<o[F])o[F]=O[F]}d.l.UY("norm",o,h,x?x:this.zu,j,h,1);D=D.iO(h)}return D};jH.VaPo.prototype.h=function(){return JSON.parse(JSON.stringify(this.AH()))};
jH.VaPo.prototype.a2n=function(){if(this.f==5)this.jM(0);var x=new gh,Q=this.sp;for(var F=0;F<=this.WM;
F++)if(Q[F].length==3)x=x.iO(Q[F][0]);var c=d.R(x.P()*4);d.WK(this.c6,this.I$,c,x);return[c,x]};jH.VaPo.prototype.oN=function(x,Q){this.D7.oN(x,Q);
this.view.oN(x-40,Q-30)};jH.VaPo.prototype._=function(){this.D7._();for(var F=0;F<this.nR.length;F++)for(var x=0;
x<this.nR[F].length;x++)this.nR[F][x]._()};jH.VaPo.prototype._I=function(x,Q){var c=this.I$,$=[],z=[],j=[],U=this.AH(),i=d.rs.hZ(U,this.g),b=0,e=null,a=null,_=null,I=null;
for(var F=0;F<i.length;F++)j.push(i[F][0][0],i[F][0][1]);for(var F=0;F<U.length;F++){var k=this.g[F].length;
b+=k;if(k!=0)e=[F,this.g[F][0]]}var K=this.nR[0][0];K.vz(b!=0);if(b!=0)K.U(Math.round(U[e[0]][0]));if(b==1){var g=U[e[0]][1]}var R=[];
if(this.Me&&U[this.Na[0]])R=d.rs.Bh(U[this.Na[0]][1],this.Na[1],this.Me,this.IW());var T=[];if(this.B5){T=this.B5.acT();
T[4]=this.B5.a5()}var D=[];if(this.B5&&U[this.Na[0]])D=d.rs.Bh(U[this.Na[0]][1],this.Na[1],d.A.cl(this.B5.hZ()),this.IW());
for(var f=0;f<U.length;f++){var y=U[f][0],g=U[f][1],Z=this.g[f];for(var v=0;v<g.length;v++){var e=g[v],G=d.rs.XI(U,e,this.IW()),q=G[0],c=G[1],h=d.D.u_(q,c);
if(c._6()){if(_==null)_={G:[],j:[]};d.A.concat(_,{G:["M","L","L","L","Z"],j:q});continue}var r=d.A.Hg(c),H=r.j,o=r.G,P=this.BO;
if(P&&c.Wl(P)&&this.Pm&&this.Pm[0]==f){a=[P.x,P.y];d.D.i(h,a)}if(R.indexOf(v)!=-1){var O=this.Me.y_(c);
if(f==this.Na[0]&&!O._6()){if(I==null)I={j:[],G:[]};var p=d.A.Hg(O);d.D.i(h,p.j);d.A.concat(I,p)}}if(D.indexOf(v)!=-1&&f==this.Na[0]){var C=[];
for(var F=0;F<T.length;F++)if(c.Wl(T[F]))C.push(T[F].x,T[F].y);if(C.length!=0){d.D.i(h,C);j=j.concat(C)}}if(Z&&Z.indexOf(v)!=-1){var W=Math.ceil(c.x/y)*y,J=c.x+c.m,t=Math.ceil(c.y/y)*y,Y=c.y+c.e;
for(var l=W;l<J;l+=y){H.push(l,c.y,l,Y);o.push("M","L")}for(var m=t;m<Y;m+=y){H.push(c.x,m,J,m);o.push("M","L")}}d.D.i(h,H);
$=$.concat(o);z=z.concat(H)}if(a&&this.f==3){var l=a[0],m=a[1],B=10/this.view.m1().W;z.push(l-B,m,l+B,m);
z.push(l,m-B,l,m+B);$.push("M","L","M","L")}}var q=this.Q4,c=this.I$;if(q){var L=["M"];for(var F=0;F<q.length-2;
F+=2)L.push("L");L.push("Z");var A=X.r7.DE(q,c.m/2,c.e/2);if(isNaN(A)||A==Infinity||A==-Infinity||!aH.pM(q)){if(_==null)_={G:[],j:[]};
d.A.concat(_,{G:L,j:q})}else{z=z.concat(q);$=$.concat(L)}}var S={LV:{G:$,j:z},akf:_,anD:I,SE:j,IN:null};
if(x){this.view.U([{K$:c,data:this.zu.buffer}],null,S,Q)}else this.view.a2x(S)};jH.blnc=function(){jH.call(this);
var x=this.n;this.wa=null;this.hi=new c7([12,12],[[19,6,0],[19,6,1],[19,6,2]]);this.hi.k(u.E.t,this._I,this);
x.appendChild(this.hi.n);this.qR=[];for(var F=0;F<3;F++){var Q=new bv(["VAR0 - VAR1",k5.aj_[F],k5.v4[F]],-100,100);
Q.k(u.E.t,this.bM,this);this.qR.push(Q);x.appendChild(Q.n)}this.ik=new f2([13,4]);this.ik.k(u.E.t,this.bM,this);
x.appendChild(this.ik.n)};jH.blnc.prototype=new jH;jH.blnc.prototype._=function(){this.hi._();for(var F=0;
F<3;F++)this.qR[F]._();this.ik._()};jH.blnc.prototype.U=function(x){this.wa=JSON.parse(JSON.stringify(x));
this._I()};jH.blnc.prototype.h=function(x){var Q=["ShdL","MdtL","HghL"],c=this.wa[Q[this.hi.h()]].v;
for(var F=0;F<3;F++)c[F].v=this.qR[F].h();this.wa.PrsL.v=this.ik.h();return JSON.parse(JSON.stringify(this.wa))};
jH.blnc.prototype._I=function(x){var Q=["ShdL","MdtL","HghL"],c=this.wa[Q[this.hi.h()]].v;for(var F=0;
F<3;F++)this.qR[F].U(c[F].v);this.ik.U(this.wa.PrsL.v)};jH.brit=function(){jH.call(this,"brit");this.Ai.push(new bv([12,2],-150,150,""));
this.Ai.push(new bv([12,3,0],-100,100,""));this.Ai.push(new f2([12,3,1]));this.bN()};jH.brit.prototype=new jH;
jH.curv=function(){jH.call(this);this.value=null;this.NT=null;this.n$=null;var x=this.n;this.ob=new c7("Preset",["basic","advanced"]);
this.ob.k(u.E.t,this.abf,this);x.appendChild(this.ob.n);E._X(x);this.or=new c7([12,4],["RGB",[13,1,1],[13,1,4],[13,1,5]]);
this.or.k(u.E.t,this.Zi,this);x.appendChild(this.or.n);this.Vl=new c7(null,["Spline","Sketch"]);this.Vl.k(u.E.t,this.abf,this);
x.appendChild(this.Vl.n);this.IU=new bW;this.IU.parent=this;this.IU.k(u.E.t,this.D2,this);x.appendChild(this.IU.n);
E._X(x);this.XB=new ii;this.XB.k(u.E.t,this.J5,this);x.appendChild(this.XB.n);this.Hf=null;this.a6H=0;
this.mi=0;E._X(x);this.BV=new cT("Sample from image",c_.GV(["-\u2195","#000000","#888888","#ffffff"]),!0,null,!0);
this.BV.k(u.E.t,this.Ww,this);this.BV.n.style.marginRight="0";x.appendChild(this.BV.n)};jH.curv.prototype=new jH;
jH.curv.prototype.Fy=function(x,Q){if(Q==ke.m6||Q==ke.rD){var c=x.jF,$=["Default"];for(var F=0;F<c.length;
F++)$.push(c[F].presetFileName.v);$.push("Custom");this.ob.yJ($,[1,c.length,1]);this.n$=x}};jH.curv.prototype.oN=function(x,Q){this.XB.oN(x,Q)};
jH.curv.prototype._=function(){this.or._();this.XB._()};jH.curv.prototype.Qg=function(){this.ob.U(this.n$.jF.length+1)};
jH.curv.prototype.abf=function(x){if(x.target==this.ob){var Q=this.ob.h(),c=this.n$.jF,$;if(Q==0)$=fK.$H("curv");
else if(Q-1<c.length)$=JSON.parse(JSON.stringify(c[Q-1]));else return;this.U($);this.bM();return}this.Qg();
var z=jq.Hb(this.value,0),j=z.length==256?1:0,U=this.Vl.h();if(j==U)return;var $=fK.$H("curv");if(U==1){var i=[];
for(var F=0;F<256;F++)i.push(F);jq.SU($,0,i)}this.U($);this.bM()};jH.curv.prototype.J5=function(){this.Qg();
jq.SU(this.value,this.or.h(),this.XB.h());this.bM()};jH.curv.prototype.Zi=function(){var x=this.or.h(),Q=jq.Hb(this.value,x),c=Q.length==256?1:0;
this.Vl.U(c);if(this.NT)this.XB.HJ(this.NT[x],this.NT[4]*[1,.33,.33,.33][x],["#ccc","#fcc","#cfc","#ccf"][x]);
this.XB.U(Q)};jH.curv.prototype.W9=function(){return!0};jH.curv.prototype.Eu=function(x,Q,c,$,z){var j=this.value;
this.value=fK.$H("curv");this.bM();var U=X.vt.VM(x,z,1,null,!0),i=this.Hf=[U>>>16&255,U>>>8&255,U&255];
this.a6H=z.y;var b=this.BV.h().indexOf(!0);if(b==0){var e=(i[0]+i[1]+i[2])/3,k=this.or.h(),K=jq.Hb(j,k),g=k==0?e:i[k-1],R=-1;
for(var F=0;F<K.length;F++)if(K[F].v.Hrzn.v==g)R=F;if(R==-1){var T=JSON.parse(JSON.stringify(K[0]));
T.v.Hrzn.v=g;T.v.Vrtc.v=g;K.push(T);K.sort(function(D,a){return D.v.Hrzn.v-a.v.Hrzn.v});jq.SU(j,k,K);
this.mi=K.indexOf(T)}else this.mi=R}this.U(j);this.bM()};jH.curv.prototype.CK=function(x,Q,c,$,z){if(this.Hf==null)return;
if(this.BV.h().indexOf(!0)==0){var j=this.value,U=this.or.h(),i=jq.Hb(j,U),b=i[this.mi];b.v.Vrtc.v=Math.max(0,Math.min(255,Math.round(b.v.Hrzn.v+(this.a6H-z.y))));
jq.SU(j,U,i);this.U(j);this.bM()}};jH.curv.prototype.km=function(x,Q,c,$,z){var j=this.value,U=this.Hf,i=(U[0]+U[1]+U[2])/3,b=this.BV.h().indexOf(!0)-1;
if(b<=-1){}else for(var F=0;F<3;F++){var e=jq.Hb(j,1+F);if(b==0)e[0].v.Hrzn.v=U[F];if(b==1){var k=Math.log(U[F]/255)/Math.log(i/255),K=Math.min(999,Math.max(10,Math.round(100*k)));
if(e.length==2)e.splice(1,0,JSON.parse(JSON.stringify(e[0])));e[1].v.Hrzn.v=127-Math.log(K/100)*127;
e[1].v.Vrtc.v=127}if(b==2)e[e.length-1].v.Hrzn.v=U[F];jq.SU(j,1+F,e)}this.U(j);this.bM();this.Qg();this.Hf=null};
jH.curv.prototype.U=function(x){this.value=x;this.Zi()};jH.curv.prototype.HJ=function(x){this.NT=x;this.Zi()};
jH.curv.prototype.h=function(x){return JSON.parse(JSON.stringify(this.value))};jH.curv.prototype.D2=function(){var x=this.IU.h(),Q=this.NT,c=this.value,$=d.a9K(x,Q);
for(var F=0;F<4;F++){var z=$[F][0],j=$[F][1],U=$[F][2],i=[d.eu.UW(z,0,!0),d.eu.UW(j,255,!0)];if(U!=null)i.splice(1,0,d.eu.UW(128,U,!0));
jq.SU(c,F,i)}this.Zi();this.bM()};jH.expA=function(){jH.call(this,"expA");this.Ai.push(new bv([12,5],-20,20,null,2,!0));
this.Ai.push(new bv([12,6],-.5,.5,null,2));this.Ai.push(new bv([12,7],.01,9.99,null,2,!0));this.bN()};
jH.expA.prototype=new jH;jH.expA.prototype.bQ=function(x,Q){Q[0]=x.Exps.v;Q[1]=x.Ofst?x.Ofst.v:0;Q[2]=x.gammaCorrection?x.gammaCorrection.v:1};
jH.expA.prototype.v3=function(x,Q){x.Exps={t:"doub",v:Q[0]};x.Ofst={t:"doub",v:Q[1]};x.gammaCorrection={t:"doub",v:Q[2]}};
jH.grdm=function(){jH.call(this,"grdm");this.Ai.push(new eF(!0,null,!0));this.Ai.push(new f2([12,23,0]));
this.bN()};jH.grdm.prototype=new jH;jH.grdm.prototype.bQ=function(x,Q){Q[0]=x.Grad.v;Q[1]=x.Rvrs?x.Rvrs.v:!1};
jH.grdm.prototype.v3=function(x,Q){x.Grad.v=Q[0];x.Rvrs={t:"bool",v:Q[1]}};jH.grdm.prototype.Fy=function(x,Q){this.Ai[0].uq(x.Gj,x.QI);
if(Q==ke.m6||Q==ke.$s||Q==ke.L7)this.Ai[0].RN(x.Op)};jH.selc=function(){jH.call(this);var x=this.n;this.vK=[];
this.jo=null;this.hi=new c7([12,82],k5.uZ.concat([[13,1,8],[13,1,13],[13,1,10]]));this.hi.k(u.E.t,this.Z9,this);
x.appendChild(this.hi.n);E._X(x);for(var F=0;F<4;F++){var Q=new bv(k5.aj_[F],-100,100,"%");Q.k(u.E.t,this.Z9,this);
this.vK.push(Q);x.appendChild(Q.n)}this.n9=new f2([13,3]);x.appendChild(this.n9.n);this.n9.k(u.E.t,this.Z9,this)};
jH.selc.prototype=new jH;jH.selc.prototype._=function(){this.hi._();this.n9._();for(var F=0;F<4;F++)this.vK[F]._()};
jH.selc.prototype.U=function(x){this.jo=JSON.parse(JSON.stringify(x));this._I()};jH.selc.prototype.h=function(x){return JSON.parse(JSON.stringify(this.jo))};
jH.selc.prototype.Z9=function(x){if(x.target!=this.hi){var Q=this.jo,c=[];for(var F=0;F<4;F++)c[F]=this.vK[F].h();
cP.SU(Q,this.hi.h(),c);Q.Mthd={t:"enum",v:{CrcM:this.n9.h()?"Absl":"Rltv"}}}this._I();this.bM()};jH.selc.prototype._I=function(){var x=this.jo,Q=cP.Hb(x,this.hi.h());
for(var F=0;F<4;F++)this.vK[F].U(Q[F]);this.n9.U(x.Mthd?x.Mthd.v.CrcM=="Absl":!1)};jH.blwh=function(){jH.call(this,"blwh");
this.Ai.push(new f2([12,11]));this.Ai.push(new hc(!0));for(var F=0;F<6;F++)this.Ai.push(new bv(k5.uZ[F],-200,300));
this.bN()};jH.blwh.prototype=new jH;jH.blwh.prototype.bQ=function(x,Q){Q[0]=x.useTint.v;Q[1]=x.tintColor.v;
var c="Rd Yllw Grn Cyn Bl Mgnt".split(" ");for(var F=0;F<6;F++)Q[2+F]=x[c[F]].v};jH.blwh.prototype.v3=function(x,Q){x.useTint.v=Q[0];
x.tintColor.v=Q[1];var c="Rd Yllw Grn Cyn Bl Mgnt".split(" ");for(var F=0;F<6;F++)x[c[F]].v=Q[2+F]};
jH.hue2=function(){jH.call(this);this.value=null;this.cH=null;this.a9S=null;this.XL=[[0,0,0],[0,50,0]];
var x=this.n;this.BV=new cT(null,["\u2194"],!0,["Click and drag in image to change saturation"],!0);
this.BV.k(u.E.t,this.ann,this);this.BV.k(u.E.t,this.Ww,this);x.appendChild(this.BV.n);var Q=this.Ai=[new c7([12,12],["Master"].concat(k5.uZ)),new bv([12,8],-180,180),new bv([12,9],-100,100),new bv([12,10],-100,100),new f2([12,11])];
for(var F=0;F<Q.length;F++){var c=Q[F];c.k(u.E.t,F==0?this.Zi:this.ab9,this);x.appendChild(c.n)}this.hi=Q[0];
this.Dk=Q[1];this.x_=Q[2];this.Jc=Q[3];this.U4=Q[4];this.bG=new cT("Sample Hue",["<img src=\""+PIMG["tools/eyedropper"]+"\" class=\"autoscale gsicon\" />","+","-"],!0,null,!0);
this.bG.k(u.E.t,this.ann,this);this.bG.k(u.E.t,this.Ww,this);this.bG.n.style.marginLeft="20px";x.appendChild(this.bG.n);
this.Sv=E.p("div");x.appendChild(this.Sv);this.wW=this.TA.bind(this);this.m7=this.wY.bind(this);this.GP=E.p("canvas");
this.Yt=this.GP.getContext("2d");this.uu=null;E.J1(this.GP);E.qr(this.GP,282,18);x.appendChild(this.GP);
E.KH(this.GP,this.VU.bind(this))};jH.hue2.prototype=new jH;jH.hue2.prototype.oN=function(x,Q){E.qr(this.GP,Math.round(x),18);
if(this.value)this.Zi()};jH.hue2.prototype.ann=function(x){var Q=x.target.h().indexOf(!0);if(Q==-1)return;
if(x.target==this.BV)this.bG.U([!1,!1,!1]);else this.BV.U([!1,!1,!1])};jH.hue2.prototype.VU=function(x){if(this.hi.h()==0||this.U4.h())return;
var Q=E.GK(x,this.GP).x/(this.GP.width/E.q_()),j=1e6;function c(K,g,R){return K<g&&g<R||R<K&&(K<g||g<R)}var $=this.ws(),z=-1;
for(var F=0;F<4;F++){var U=Math.abs(Q-($[F]+F*1e-5));if(U<j){j=U;z=F}}if(j>.025){z=-1;var i=$[0],b=$[1],e=$[2],k=$[3];
if(c(i,Q,b))z=4;if(c(b,Q,e))z=5;if(c(e,Q,k))z=6}if(z==-1)return;this.uu=z;E.d3(document.body,this.wW);
E.AU(document.body,this.m7)};jH.hue2.prototype.TA=function(x){var Q=E.GK(x,this.GP).x/(this.GP.width/E.q_()),c=this.ws(),$=this.uu;
for(var F=1;F<4;F++)if(c[F]<c[F-1]){c[F]+=1}if($<4){var z=1e6,j=0;for(var F=-20;F<20;F++){var U=Math.abs(c[$]-(Q+F));
if(U<z){z=U;j=F}}Q+=j;c[$]=Q;for(var F=$+1;F<4;F++)if(c[F]<c[F-1]){c[F]=c[F-1]}for(var F=$-1;F>=0;F--)if(c[F]>c[F+1]){c[F]=c[F+1]}}else{var i=Q-(c[$-4]+c[$-3])/2;
if(i<-.5)i+=1;if($==4){c[0]+=i;c[1]+=i;c[2]=Math.max(c[1],c[2]);c[3]=Math.max(c[1],c[3])}if($==5)for(var F=0;
F<4;F++)c[F]+=i;if($==6){c[2]+=i;c[3]+=i;c[0]=Math.min(c[0],c[2]);c[1]=Math.min(c[1],c[2])}}for(var F=1;
F<4;F++)if(c[F]<c[F-1])throw"e";this.adC(c);this.Zi();this.bM()};jH.hue2.prototype.wY=function(x){E.hY(document.body,this.wW);
E.Wr(document.body,this.m7)};jH.hue2.prototype._=function(){for(var F=0;F<this.Ai.length;F++)this.Ai[F]._()};
jH.hue2.prototype.ab9=function(x){var Q=this.value.Clrz.v=this.U4.h();if(Q)this.hi.U(0);if(x&&x.target==this.U4){var c=Q?1:0;
this.XL[1-c]=hu.Hb(this.value,0);var $=this.XL[c];hu.SU(this.value,0,$);if(this.hi.h()==0){this.Dk.U($[0]);
this.x_.U($[1]);this.Jc.U($[2])}}var z=this.hi.h(),j=hu.Hb(this.value,z),$=z==0?j:j.qR;$[0]=this.Dk.h();
var U=this.x_.h();$[1]=Q?Math.max(0,U):U;$[2]=this.Jc.h();hu.SU(this.value,z,j);this.Zi();this.bM()};
jH.hue2.prototype.Zi=function(){var x=this.hi.h(),Q=this.value.Clrz?this.value.Clrz.v:!1;this.U4.U(Q);
this.hi.vz(!Q);this.bG.vz(!Q&&x!=0);var c=hu.Hb(this.value,x),$=x==0?c:c.qR;this.Dk.U($[0]);this.x_.U($[1]);
this.Jc.U($[2]);var z=this.GP.width,j=this.GP.height,U=this.Yt;U.clearRect(0,0,z,j);if(Q||x==0){this.Sv.innerHTML="";
return}var i=c.XS;this.Sv.innerHTML=i[0]+"\xB0 / "+i[1]+"\xB0<span style=\"float:right\">"+i[2]+"\xB0 \\ "+i[3]+"\xB0</span>";
var b=d.R(z*4);jl.a5E(b,1,z,-1,.5);var e=new ImageData(new Uint8ClampedArray(b.buffer),z,1),k=Math.round(j/4);
for(var F=0;F<k;F++)U.putImageData(e,0,F);function K(_,I,f){U.fillStyle=f;var y=k*2;if(_<=I)U.fillRect(_*z,y,(I-_)*z,k);
else{U.fillRect(0,y,I*z,k);U.fillRect(_*z,y,(1-_)*z,k)}}var g=this.ws();K(g[0],g[1],"#888888");K(g[1],g[2],"#cccccc");
K(g[2],g[3],"#888888");U.fillStyle="#ffffff";U.lineWidth=1;U.beginPath();var R=k+.5,T=4*k+.5;for(var F=0;
F<4;F++){var D=Math.floor(z*g[F])+.5,a=(F<2?-1:1)*k*(F==1||F==2?1:2);U.moveTo(D,R);U.lineTo(D,T);U.lineTo(D+a,T);
U.lineTo(D+a,k+k+.5);U.closePath()}U.fill();U.stroke()};jH.hue2.prototype.ws=function(){var x=this.hi.h(),Q=hu.Hb(this.value,x).XS;
for(var F=0;F<4;F++)Q[F]=(1000.5+Q[F]/360)%1;return Q};jH.hue2.prototype.adC=function(x){var Q=this.hi.h(),c=hu.Hb(this.value,Q);
for(var F=0;F<4;F++)c.XS[F]=Math.round(36e3+(x[F]-.5)*360)%360;hu.SU(this.value,Q,c)};jH.hue2.prototype.W9=function(){return!0};
jH.hue2.prototype.aev=function(){var x=this.BV.h().indexOf(!0),Q=this.bG.h().indexOf(!0);return x!=-1?x:Q!=-1?Q+1:-1};
jH.hue2.prototype.Eu=function(x,Q,c,$,z){var j=this.aev();if(j==-1)return;var U=this.value;this.value=fK.$H("hue2");
this.bM();var i=X.vt.VM(x,z,1,null,!0);this.U(U);var b=[i>>>16&255,i>>>8&255,i&255],e=d.a$(b[0]/255,b[1]/255,b[2]/255);
if(j==0){this.hi.U(1+Math.round(e.R0*6)%6)}else{var k=this.ws(),K=.5+e.R0,g=1/12,R=k[1],T=k[2];if(T<R){T++;
if(K<R&&K+1-T<R-K)K++}var D=R<=K&&K<=T;if(j==1){R=K-g/2;T=K+g/2}else if(j==2&&!D){R=Math.min(K,R);T=Math.max(K,T)}else if(j==3&&D){if(K-R<T-K)R=K;
else T=K}k=[R-g,R,T,T+g];this.adC(k)}this.bM();this.cH=z.x;this.a9S=this.x_.h()};jH.hue2.prototype.CK=function(x,Q,c,$,z){var j=this.aev();
if(j==-1)return;if(j==0){if(this.cH!=null){var U=z.x-this.cH;U=Math.max(-100,Math.min(100,this.a9S+.5*U));
this.x_.U(U);this.ab9()}}};jH.hue2.prototype.km=function(x,Q,c,$,z){this.cH=null};jH.hue2.prototype.U=function(x){this.value=JSON.parse(JSON.stringify(x));
var Q=this.value.Clrz?this.value.Clrz.v:!1;this.XL[Q?1:0]=hu.Hb(this.value,0);this.Zi()};jH.hue2.prototype.h=function(x){return JSON.parse(JSON.stringify(this.value))};
jH.levl=function(){function x(){jH.call(this);this.value=null;this.NT=null;this.CR=[new bC(0,0),new bC(0,0),new bC(0,0),new bC(0,0),new bC(0,0)];
this.t2=-1;this.wW=this.TA.bind(this);this.m7=this.wY.bind(this);var Q=this.n;this.or=new c7([12,4],["RGB",[13,1,1],[13,1,4],[13,1,5]]);
this.or.k(u.E.t,this.Zi,this);Q.appendChild(this.or.n);this.IU=new bW;this.IU.parent=this;this.IU.k(u.E.t,this.D2,this);
Q.appendChild(this.IU.n);var c=E.p("div","");Q.appendChild(c);var $=E.p("div","");Q.appendChild($);this.GP=E.p("canvas");
c.appendChild(this.GP);this.Yt=this.GP.getContext("2d");this.lE=new bC(256,120);this.GP.setAttribute("style","display:block");
E.J1(this.GP);E.KH(this.GP,this.VU.bind(this));this.Jy=E.p("canvas","");$.appendChild(this.Jy);this.n2=this.Jy.getContext("2d");
this.aH=new bC(this.lE.x,40);this.Jy.setAttribute("style","display:block");E.J1(this.Jy);E.KH(this.Jy,this.aBs.bind(this));
var z=this.HA=[];for(var F=0;F<5;F++){var j=new el(null,null,3);z.push(j);j.k(u.E.t,this.azU,this);(F<2||F==4?c:$).appendChild(j.n)}c.appendChild(z[1].n);
this.BV=new cT("Sample from image",c_.GV(["#000000","#888888","#ffffff"]),!0,null,!0);this.BV.k(u.E.t,this.Ww,this);
Q.appendChild(this.BV.n);this.oN(250,100)}x.prototype=new jH;x.prototype.D2=function(){var Q=this.IU.h(),c=this.NT,$=this.value,z=d.a9K(Q,c);
for(var F=0;F<4;F++){var j=z[F][0],U=z[F][1],i=z[F][2],b=[d.eu.UW(j,0,!0),d.eu.UW(U,255,!0)];if(i!=null)b.splice(1,0,d.eu.UW(128,i,!0));
var e=[~~j,~~U,0,255,i==null?100:~~(100+.75*100*(i-128)/128)];bV.SU($,F,e)}this.Zi();this.bM()};x.prototype.oN=function(Q,c){Q+=6;
this.lE.x=this.aH.x=Q;E.qr(this.GP,Q,this.lE.y,this.Yt);E.qr(this.Jy,Q,this.aH.y,this.n2);var $=this.HA;
$[3].n.setAttribute("style","margin-left: "+(Q-104)+"px");$[4].n.setAttribute("style","margin: 0 "+(Q/2-74)+"px");
if(this.value)this.Zi()};x.prototype._=function(){this.or._()};x.prototype.azU=function(Q){var c=[];
for(var F=0;F<5;F++){var $=255,z=1;if(F==4){$=999;z=100}var j=parseFloat(this.HA[F].h());c[F]=Math.max(0,Math.min($,j*z))}bV.SU(this.value,this.or.h(),c);
this.Zi();this.bM()};x.prototype.Zi=function(Q){var c=this.lE.x,$=this.lE.y,z=this.or.h(),j=this.Yt;
j.clearRect(0,0,c,$);j.fillStyle="#cccccc";j.fillRect(8,8,c-16,$-16-8);if(this.NT){var U=this.NT[0].slice(0),T=0;
if(z==0){U.fill(0);var i=JSON.parse(JSON.stringify(this.value));bV.SU(i,0,[0,255,0,255,100]);var b=k5.hd("levl",i),e=[b.mX,b.Cq,b.iu];
for(var k=0;k<3;k++){var K=this.NT[1+k],g=e[k];for(var F=0;F<256;F++)U[g[F]]+=K[F]}}var R=z==0?U:this.NT[z];
for(var F=0;F<R.length;F++)T+=R[F];j.fillStyle="#333333";j.beginPath();j.moveTo(8,$-16);for(var F=0;
F<256;F++){var D=55*R[F]/T;j.lineTo(8+F/256*(c-16),Math.max(8,$-16-$*D))}j.lineTo(c-8,$-16);j.closePath();
j.fill()}var a=bV.Hb(this.value,z);for(var F=0;F<5;F++)this.HA[F].U(a[F]/(F==4?100:1));this.CR[0].r$(8+a[0]/255*(c-16),$-14);
this.CR[1].r$(8+a[1]/255*(c-16),$-14);var _=Math.log(a[4]/100)/Math.log(9.99);_=.5-_/2;this.CR[4].r$(this.CR[0].x+_*(this.CR[1].x-this.CR[0].x),$-14);
this.uf(j,this.CR[0],"#000000");this.uf(j,this.CR[1],"#ffffff");this.uf(j,this.CR[4],"#777777");var c=this.aH.x,$=this.aH.y;
j=this.n2;j.clearRect(0,0,c,$);var I=j.createLinearGradient(0,0,c-16,0);I.addColorStop(0,"black");I.addColorStop(1,"white");
j.fillStyle=I;j.fillRect(8,8,c-16,16);this.CR[2].r$(8+a[2]/255*(c-16),$-14);this.CR[3].r$(8+a[3]/255*(c-16),$-14);
this.uf(j,this.CR[2],"#000000");this.uf(j,this.CR[3],"#ffffff")};x.prototype.uf=function(Q,c,$){Q.fillStyle=$;
Q.fillRect(c.x-5,c.y,10,10)};x.prototype.VU=function(Q){var c=E.GK(Q,this.GP),$=this.a2v([0,1,4],c);
if($!=-1)this.t2=$;this.aiT()};x.prototype.aBs=function(Q){var c=E.GK(Q,this.Jy),$=this.a2v([2,3],c);
if($!=-1)this.t2=$;this.aiT()};x.prototype.a2v=function(Q,c){var $=-1,z=1e9;for(var F=0;F<Q.length;F++){var j=Math.abs(this.CR[Q[F]].x-c.x);
if(j<z){z=j;$=Q[F]}}return z<16?$:-1};x.prototype.aiT=function(Q){if(this.t2==-1)return;E.d3(document.body,this.wW);
E.AU(document.body,this.m7)};x.prototype.TA=function(Q){var c=bV.Hb(this.value,this.or.h()),$=E.GK(Q,this.t2==2&&this.t2==3?this.Jy:this.GP),z=255*($.x-8)/(this.lE.x-16);
z=Math.max(0,Math.min(255,z));if(this.t2==0)z=Math.min(z,c[1]-2);if(this.t2==1)z=Math.max(z,c[0]+2);
if(this.t2!=4)c[this.t2]=Math.round(z);else{var j=(z-c[0])/(c[1]-c[0]);j=1-2*j;j=Math.pow(9.99,j);c[4]=Math.min(999,Math.max(10,Math.round(j*100)))}bV.SU(this.value,this.or.h(),c);
this.Zi();this.bM()};x.prototype.wY=function(Q){E.hY(document.body,this.wW);E.Wr(document.body,this.m7);
this.t2=-1};x.prototype.W9=function(){return!0};x.prototype.km=function(Q,c,$,z,j){var U=this.value,i=this.BV.h().indexOf(!0);
if(i==-1)return;this.value=fK.$H("levl");this.bM();var b=X.vt.VM(Q,j,1,null,!0),e=[b>>>16&255,b>>>8&255,b&255];
for(var F=0;F<3;F++){var k=bV.Hb(U,1+F);if(i==0)k[0]=e[F];if(i==1){var K=Math.log(e[F]/255)/Math.log((e[0]+e[1]+e[2])*.333/255);
k[4]=Math.min(999,Math.max(10,Math.round(100*K)))}if(i==2)k[1]=e[F];bV.SU(U,1+F,k)}this.U(U);this.bM()};
x.prototype.U=function(Q){this.value=Q;this.Zi()};x.prototype.HJ=function(Q){this.NT=Q;this.Zi()};x.prototype.h=function(Q){return JSON.parse(JSON.stringify(this.value))};
return x}();jH.phfl=function(){jH.call(this,"phfl");this.Ai.push(new hc);this.Ai.push(new bv([12,74],0,100,"%"));
this.Ai.push(new f2([13,4]));this.bN()};jH.phfl.prototype=new jH;jH.phfl.prototype.bQ=function(x,Q){Q[0]=x.Clr.v;
Q[1]=x.Dnst.v;Q[2]=x.PrsL.v};jH.phfl.prototype.v3=function(x,Q){var c=d.I.Du(Q[0]),$=x.Clr.v,z=d.eC(c.Z,c.r,c.J);
$.Lmnc.v=z.xv;$.A.v=z.V;$.B.v=z.J;x.Dnst.v=Q[1];x.PrsL.v=Q[2]};jH.vibA=function(){jH.call(this,"vibA");
this.Ai.push(new bv([12,13],-100,100,null));this.Ai.push(new bv([12,9],-100,100,null));this.bN()};jH.vibA.prototype=new jH;
jH.vibA.prototype.bQ=function(x,Q){Q[0]=x.vibrance?x.vibrance.v:0;Q[1]=x.Strt?x.Strt.v:0};jH.vibA.prototype.v3=function(x,Q){x.vibrance.v=Q[0];
x.Strt.v=Q[1]};jH.thrs=function(){jH.call(this,"thrs");this.Ai.push(new bv([4,13],1,255,null));this.bN()};
jH.thrs.prototype=new jH;jH.thrs.prototype.bQ=function(x,Q){Q[0]=x.Lvl.v};jH.thrs.prototype.v3=function(x,Q){x.Lvl.v=Q[0]};
jH.mixr=function(){jH.call(this);var x=this.n;this.vK=[];this.jo=null;this.hi=new c7([12,4],[[13,1,1],[13,1,4],[13,1,5]]);
this.anr=!1;this.hi.k(u.E.t,this.Z9,this);x.appendChild(this.hi.n);E._X(x);this.Xw=new f2([12,60]);x.appendChild(this.Xw.n);
this.Xw.k(u.E.t,this.Z9,this);for(var F=0;F<4;F++){var Q=new bv([[13,1,1],[13,1,4],[13,1,5],[13,2]][F],-200,200,"%");
Q.k(u.E.t,this.Z9,this);this.vK.push(Q);x.appendChild(Q.n)}};jH.mixr.prototype=new jH;jH.mixr.prototype._=function(){this.hi._();
this.Xw._();for(var F=0;F<4;F++)this.vK[F]._()};jH.mixr.prototype.U=function(x){this.jo=JSON.parse(JSON.stringify(x));
this._I()};jH.mixr.prototype.h=function(x){return JSON.parse(JSON.stringify(this.jo))};jH.mixr.prototype.Z9=function(x){if(x.target!=this.hi){var Q=k5.Le(this.jo);
if(x.target==this.Xw){Q.Xw=this.Xw.h();if(Q.Xw)Q.b=[40,40,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];else Q.b=[100,0,0,0,0,0,100,0,0,0,0,0,100,0,0,0,0,0,0,0]}else{var c=(Q.Xw?0:this.hi.h())*5,F=this.vK.indexOf(x.target);
Q.b[c+(F<3?F:4)]=x.target.h()}this.jo=k5.aBw(Q)}this._I();this.bM()};jH.mixr.prototype._I=function(){var x=k5.Le(this.jo);
if(x.Xw!=this.anr)this.hi.yJ(x.Xw?[[13,1,7]]:k5.v4);this.anr=x.Xw;this.Xw.U(x.Xw);var Q=(x.Xw?0:this.hi.h())*5;
for(var F=0;F<4;F++)this.vK[F].U(x.b[Q+(F<3?F:4)])};jH.post=function(){jH.call(this,"post");this.Ai.push(new bv([4,1],2,255,null));
this.bN()};jH.post.prototype=new jH;jH.post.prototype.bQ=function(x,Q){Q[0]=x.Lvls.v};jH.post.prototype.v3=function(x,Q){x.Lvls.v=Q[0]};
jH.clrL=function(){jH.call(this,"clrL");this.Ai.push(new bX("LUTs"));this.bN()};jH.clrL.prototype=new jH;
jH.clrL.prototype.bQ=function(x,Q){Q[0]=x};jH.clrL.prototype.v3=function(x,Q){var c=Q[0];for(var $ in c)x[$]=c[$]};
jH.clrL.prototype.Fy=function(x,Q){if(Q==ke.m6||Q==ke.oy)this.Ai[0].RN(x.a6a)};jH.rplc=function(){jH.call(this,"rplc");
this.Ai.push(new bv([12,92],0,200));this.Ai.push(new hc);this.Ai.push(new bv([12,8],-180,180));this.Ai.push(new bv([12,9],-100,100));
this.Ai.push(new bv([12,10],-100,100));this.bN()};jH.rplc.prototype=new jH;jH.rplc.prototype.bQ=function(x,Q){Q[0]=x.Fzns.v;
Q[1]=x.Mxm.v;Q[2]=x.H.v;Q[3]=x.Strt.v;Q[4]=x.Lght.v};jH.rplc.prototype.v3=function(x,Q){function c(z,j){j.Lmnc.v=z.xv;
j.A.v=z.V;j.B.v=z.J}x.Fzns.v=Q[0];x.H.v=Q[2];x.Strt.v=Q[3];x.Lght.v=Q[4];var $=d.I.Du(Q[1]),z=d.eC($.Z,$.r,$.J);
c(z,x.Mnm.v);c(z,x.Mxm.v)};jH.fade=function(){jH.call(this,"fade");this.Ai.push(new bv([12,0],0,100,"%"));
this.Ai.push(new c7([12,19,0],cq.o_,cq.nW));this.bN()};jH.fade.prototype=new jH;jH.fade.prototype.bQ=function(x,Q){Q[0]=x.Opct.v.val;
Q[1]=cq.hg.indexOf(x.Md.v.BlnM)};jH.fade.prototype.v3=function(x,Q){x.Opct.v.val=Q[0];x.Md.v.BlnM=cq.hg[Q[1]]};
jH.aply=function(){var x=cq.hg.concat(["Add","Sbtr"]);x.splice(21,1);var Q=cq.o_.concat([[15,10,28],[15,10,21]]);
Q.splice(21,1);var c=cq.nW.slice(0);c[4]--;function $(){jH.call(this,"aply");this.Ai.push(new c7([0,3],[]));
this.Ai.push(new c7([12,4],["RGB"].concat(k5.v4).concat(["Transparency"])));this.Ai.push(new f2([4,11]));
this.Ai.push(new c7([12,19,0],Q,c));this.Ai.push(new bv([12,0],0,100,"%"));this.Ai.push(new f0([12,38],1,2,null,2));
this.Ai.push(new f0([12,6],-255,255));this.Ai.push(new f2([13,5]));this.bN([2]);this.ZX=null}$.prototype=new jH;
$.prototype.bQ=function(z,j,U){if(U){var i=U[2].B,b=this.ZX=[];for(var F=0;F<i.length;F++){var e=i[F].getName();
b.push(e.length<30?e:e.slice(0,27)+"...")}b.reverse();this.Ai[0].yJ([[5,7]].concat(b),[1,b.length])}else var b=this.ZX;
z=z.With.v;var k=z.T.v;j[0]=k[1].t=="name"?1+b.indexOf(k[1].v.val):0;j[1]=["RGB","Rd","Grn","Bl","Trsp"].indexOf(k[0].v.enum);
j[2]=z.Invr.v;var K=z.Clcl.v.Clcn;j[3]=x.indexOf(K);j[4]=z.Opct.v.val;j[5]=z.Scl.v;j[6]=z.Ofst.v;j[7]=z.PrsT.v};
$.prototype.v3=function(z,j){z=z.With.v;var U=z.T.v;if(j[0]==0)U[1]={t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Mrgd"}};
else U[1]={t:"name",v:{classID:"Lyr",val:this.ZX[j[0]-1]}};U[0].v.enum=["RGB","Rd","Grn","Bl","Trsp"][j[1]];
z.Invr.v=j[2];var i=z.Clcl.v.Clcn=x[j[3]];z.Opct.v.val=j[4];z.Scl.v=j[5];z.Ofst.v=j[6];z.PrsT.v=j[7];
var b=i=="Add"||i=="Sbtr";this.Ai[5].vz(b);this.Ai[6].vz(b)};return $}();jH.matc=function(){var x,Q,c=0;
function $(){jH.call(this,"matc");this.Ai.push(new bv("Luminance",1,200));this.Ai.push(new bv("Color Intensity",1,200));
this.Ai.push(new bv([2,11],0,100,"%"));this.Ai.push(new f2("Neutralize"));this.Ai.push(new c7([12,70],[]));
this.Ai.push(new c7([0,3],[]));this.bN([2])}function z(j,U){j.Ai[5].yJ([[5,7]].concat(U),[1,U.length])}$.prototype=new jH;
$.prototype.bQ=function(j,U,i){c=0;U[0]=j.Lght.v;U[1]=j.ClrR.v;U[2]=j.Fade.v;U[3]=j.neutralizeColor?j.neutralizeColor.v:!1;
U[4]=U[5]=0;var b=j.Srce;if(b)b=b.v;if(i){x=[];Q=[];var e=i[2],k=i[3];for(var F=0;F<k.length;F++){var K=k[F];
x.push(K.name);var g=K.B,R=[];Q.push(R);for(var T=0;T<g.length;T++)R.push(g[T].getName());R.reverse()}this.Ai[4].yJ([[13,1,0]].concat(x),[1,x.length]);
var D=k.indexOf(e);if(b)D=x.indexOf(b[1].v.val);z(this,Q[D])}if(b){var a=x.indexOf(b[1].v.val);U[3]=c=1+a;
if(b[0].t=="name")U[4]=1+Q[a].indexOf(b[0].v.val)}};$.prototype.v3=function(j,U){j.Lght.v=U[0];j.ClrR.v=U[1];
j.Fade.v=U[2];j.neutralizeColor.v=U[3];if(U[4]==0){j.noReference={t:"bool",v:!0};delete j.Srce}else{if(U[4]!=c){c=U[4];
z(this,Q[U[4]-1])}delete j.noReference;var i={t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Mrgd"}},b=Q[U[4]-1];
if(U[5]!=0)i={t:"name",v:{classID:"Lyr",val:b[U[5]-1]}};j.Srce={t:"obj ",v:[i,{t:"name",v:{classID:"Dcmn",val:x[U[4]-1]}}]}}};
return $}();function j0(x,Q){kw.call(this);if(x==null)return;this.id=Q;this.MW=x;this.mb=null;this.n=E.p("div","window "+Q);
this.a2w=null;this.DI=E.p("div","whead");this.a5f=E.p("span","wname");this.DI.appendChild(this.a5f);
this.abr=!1;this.n.appendChild(this.DI);this.Z_=this.apq.bind(this);this.mw=this.auA.bind(this);this.P9=this.ajd.bind(this);
E.J1(this.DI);E.KH(this.DI,this.Z_);this.abC=E.p("span","cross gsicon");this.DI.appendChild(this.abC);
j0.prototype._.call(this);E.AU(this.abC,this.a0I.bind(this));this.body=E.p("div","body");this.n.appendChild(this.body)}j0.prototype=new kw;
j0.prototype.sD=function(){return!1};j0.prototype.W9=function(){return!1};j0.prototype._=function(){if(this.MW==null)return;
this.a5f.textContent=ah.get(this.MW)};j0.prototype.Eu=function(x,Q,c,$,z){};j0.prototype.Ys=function(x,Q,c,$,z){};
j0.prototype.CK=function(x,Q,c,$,z){};j0.prototype.km=function(x,Q,c,$,z){};j0.prototype.x1=function(x,Q,c,$,z){};
j0.prototype.sM=function(x,Q,c,$){if($.S(fM.ln)&&this.K6)this.K6();if($.S(fM.qP)){var z=new jO(u.E.v);
z.Oe=!0;X.nF.a06($,z);if(z.data)Q.T(z)}};j0.prototype.Da=function(x){return!1};j0.prototype.OL=function(x,Q){return!0};
j0.prototype.BM=function(x,Q,c,$){};j0.prototype.Fy=function(x,Q){};j0.prototype.$O=function(x,Q){return null};
j0.prototype.ay3=function(x){return this.a2w};j0.prototype.oN=function(){};j0.prototype.close=function(){this.T(new jO(u.E.ZY))};
j0.prototype.apq=function(x){this.mb=E.GK(x,this.n);E.d3(window,this.mw);E.AU(window,this.P9)};j0.prototype.auA=function(x){var Q=this.n.parentNode,c=E.GK(x,Q),$=Math.round(c.x-this.mb.x),z=Q.offsetTop+Math.max(0,Math.min(window.innerHeight-36,Math.round(c.y-this.mb.y)));
this.a2w=new bC($,z);this.n.style.left=$+"px";this.n.style.top=z+"px"};j0.prototype.ajd=function(x){E.hY(window,this.mw);
E.Wr(window,this.P9)};j0.prototype.a0I=function(x){if(this.abr){this.K6();return}this.T(new jO("closebtn"));
this.close()};function fV(){j0.call(this,"About Photopea","aboutpp");var x=E.p("div","flexrow");this.body.appendChild(x);
var Q=this.aDc=E.p("img");x.appendChild(Q);this.body.setAttribute("style","margin:0; padding:0");var c=this.sG=E.p("div");
c.innerHTML=fV.Ca;x.appendChild(c);var $=this.EG=E.p("span");$.innerHTML="<big style=\"text-shadow: 2px 2px 3px #000000;\">Ivan holding Photopea in Prague</big>";
this.body.appendChild($)}fV.prototype=new j0;fV.prototype.$O=function(x,Q){return new bC(0,0)};fV.prototype.oN=function(x,Q){var c=this.aDc,$=this.sG,z=this.EG,j=(x+Q-42-42)/110;
j=Math.sqrt((x-42)*(Q-42))/50;c.setAttribute("style","width:"+x/2+"px; height:"+Q+"px; display:block; object-fit:cover;");
$.setAttribute("style","width:"+(x/2-42)+"px; height:"+(Q-42)+"px; padding:20px; font-size:"+j+"px;");
z.setAttribute("style","position:absolute;  bottom:10px; right:"+(x/2+10)+"px")};fV.prototype._=function(){};
fV.prototype.BM=function(x,Q,c,$){this.aDc.setAttribute("src","promo/ivan_pp.webp")};fV.Ca="\t<h1>Hi There!</h1>\t<p>My name is <b>Ivan Kutskir</b> and I'm the creator of Photopea.</p>\t<p>I'm a 30-year-old computer programmer. I was born in Ukraine, but I live in the Czech Republic most of my life (in <b>Prague</b> since 2009).</p>\t<p>I started developing Photopea back in 2012. I intended to call it <b>Photo Hammer</b>, \tbut I didn't register the .com domain right away, and when I tried to do so six months later, it was already taken.</p>\t\t<p>My friends and my family did not know about Photopea during the first four years of development.\tI was spending a lot of time building it, without making any money or learning new skills. So nothing to be proud of, \tbut the project was fun and I enjoyed working on it.\t</p>\t<p>\tNow, it's heartwarming to know that millions around the world use Photopea as their creative medium. \tTo this day I work on Photopea, driven by the positive impact of my creation.\t</p>\t\t<!--<p>You can not be completely sure if something is a good or a bad idea, until you actually try to do it.</p>-->\t\t<p style=\"text-align:right;\"><i><big>Ivan Kutskir</big><br/>support@photopea.com</i></p>\t";
function dW(){j0.call(this,[0,13,0],"account");this.n5=E.p("div","form scrollable");this.body.appendChild(this.n5);
this.body.style.padding="0";this.xi=[new dW.Ak,new dW.Jm("::privacy.html"),new dW.Jm(dW.a9l)];for(var F=0;
F<this.xi.length;F++)this.xi[F].parent=this;this.k("showpage",this.a61,this)}dW.prototype=new j0;dW.prototype.OL=function(x,Q){var c=navigator.onLine;
if(!c)alert("Go online first");return c};dW.prototype.oN=function(x,Q){this.n5.setAttribute("style","width:"+Math.min(x-40,740)+"px;  height:"+(Q-38)+"px;  padding:1.5em;");
this.xi[0].oN(x,Q)};dW.prototype.$O=function(x,Q){return new bC(Math.max(0,Math.min(150,(x-740)/2)),Math.max(0,Math.min(100,(Q-500)/2)))};
dW.prototype.a61=function(x){E.Os(this.n5);this.n5.scrollTop=0;this.n5.appendChild(this.xi[x.data.xR].n)};
dW.prototype._=function(){j0.prototype._.call(this);for(var F=0;F<this.xi.length;F++)this.xi[F]._()};
dW.prototype.BM=function(x,Q,c){if(!navigator.onLine)return;E.Os(this.n5);var $=this.xi[0];this.n5.appendChild($.n);
$.BM();this._()};dW.prototype.Fy=function(x,Q){this.BM(null,null,null)};dW.Ak=function(){kw.call(this);
this.n=E.p("div");var x=this.n,i,b,k="font-size:1.25em;",K="text-align:center;",R="style=\"list-style-type: none; padding:0;  margin:0; font-size:1.15em;\"",T="style=\"font-weight:bold; color:#00aa00; padding-right:4px;\"",D="style=\"width:50%; vertical-align:top; padding:10px 20px;\"",I=12;
this.Vw=E.p("div");x.appendChild(this.Vw);this.ED=new j7([0,11],!1,null,!0);this.ED.n.setAttribute("style","background-color: rgba(200,0,0,1); color:#ffffff; margin:4px 6px 4px 0;");
this.ED.k("click",this.e9,this);x.appendChild(this.ED.n);this.BA=new j7([0,13,1],!1,null,!0);this.BA.k("click",this.awP,this);
x.appendChild(this.BA.n);this.i_=new j7("Business Terms",!1,null,!0);this.i_.k("click",this.aw9,this);
x.appendChild(this.i_.n);var Q=E.p("div");Q.style.margin="20px 0";x.appendChild(Q);var c=["Account Types","Go Premium","Team Settings","Distributors"],$=this.Kw=[],z=this.avF=[],j=this.yY=E.p("div");
x.appendChild(j);for(var F=0;F<c.length;F++){var U=E.p("span");U.textContent=c[F];Q.appendChild(U);$.push(U);
U.setAttribute("style","font-weight:bold; display:inline-block;  margin-right:2em; font-size:1.1em; cursor:pointer;");
U.addEventListener("click",this.R2.bind(this));z.push(E.p("div"))}this.R2(0);var e=this.a8R="background-color: #00aa00;  text-shadow:none; padding:3px 7px; font-size:1.2em; color:#ffffff; cursor:pointer; margin:4px 0; width:100%;";
x=z[0];var b=E.p("table"),g="style=\" "+K+k+" padding-bottom:20px;\"";b.innerHTML="\t\t\t<tr>\t\t\t\t<th>FREE</th><th>PREMIUM</th>\t\t\t</tr>\t\t\t<tr>\t\t\t\t<td "+D+">\t\t\t\t\t<div "+g+">\t\t\t\t\t\t<sup>$</sup><big><big><b>0</b></big></big>/mo\t\t\t\t\t</div>\t\t\t\t\t<div>\t\t\t\t\t\t<ul>\t\t\t\t\t\t\t<li><span "+T+">\u2713</span> All Features</li>\t\t\t\t\t\t\t<li><span "+T+">\u2713</span> PeaDrive 0.5 GB</li>\t\t\t\t\t\t</ul>\t\t\t\t\t</div>\t\t\t\t</td>\t\t\t\t<td "+D+">\t\t\t\t\t<div "+g+" title=\"Order 90 days for $15, to get a cost of $5 per month.\">\t\t\t\t\t\tFrom <sup>$</sup><big><big><b>5</b></big></big>/mo\t\t\t\t\t</div>\t\t\t\t\t<div>\t\t\t\t\t\t<ul>\t\t\t\t\t\t\t<li><span "+T+">\u2713</span> All Features</li>\t\t\t\t\t\t\t<li><span "+T+">\u2713</span> PeaDrive 5 GB</li>\t\t\t\t\t\t\t<li><span "+T+">\u2713</span> No Ads <a href=\"//www.photopea.com/promo/no_ads.png\" target=\"_blank\">\uD83D\uDC41</a></li>\t\t\t\t\t\t\t<li><span "+T+">\u2713</span> 2\xD7 more steps in history</li> \t\t\t\t\t\t\t<li><span "+T+">\u2713</span> quick <a href=\"mailto:support@photopea.com\">email support</a></li> \t\t\t\t\t\t</ul>\t\t\t\t\t\t<span style=\"margin:10px 0 12px 0; font-size:0.75em;\">* No subscription, just one-time payments</span> \t\t\t\t\t\t\t\t\t\t\t</div>\t\t\t\t</td>\t\t\t</tr>\t\t";
x.appendChild(b);var U=new j7("Go Premium");U.n.setAttribute("style",e+"padding:10px 0;");U.k("click",function(Z){this.R2(1)},this);
b.children[0].children[1].children[1].appendChild(U.n);this._v=E.p("div");x.appendChild(this._v);x=z[1];
var a=this.arG=[[8,30,1],[15,90,1],[50,365,1],[20,30,5],[45,90,5],[150,365,5],[70,30,20],[150,90,20],[500,365,20],[150,30,50],[300,90,50],[999,365,50],[60,30,1e3],[120,90,1e3],[450,365,1e3],[150,30,5e3],[300,90,5e3],[1e3,365,5e3],[300,30,2e4],[600,90,2e4],[2e3,365,2e4]];
this.Fj=[];for(var F=0;F<a.length;F++)this.Fj.push(new j7("Buy: $"+a[F][0],!1,null,!0));for(var F=0;
F<this.Fj.length;F++){this.Fj[F].k("click",this.acV,this)}this.uU=new j7("...",!0);this.uU.n.setAttribute("style",e);
x.appendChild(this.uU.n);b=this.a46(4,["Single user",this.Fj[0],this.Fj[1],this.Fj[2],"Team of 5",this.Fj[3],this.Fj[4],this.Fj[5],"Team of 20",this.Fj[6],this.Fj[7],this.Fj[8],"Team of 50",this.Fj[9],this.Fj[10],this.Fj[11]]);
x.appendChild(b);var _=E.p("div");x.appendChild(_);_.textContent="Premium lasts for X days: after X days, you are switched back to a free version (with ads).";
this.a5R=new f2("I accept",!0,"");x.appendChild(this.a5R.n);this.oi=new j7([0,13,1],!1,null,!0);this.oi.k("click",this.awP,this);
x.appendChild(this.oi.n);this.kd=new j7("I have a key",!1,null,!0);this.kd.n.setAttribute("style",e+" float:right; width:inherit;");
this.kd.k("click",this.acV,this);x.appendChild(this.kd.n);x=z[2];this.yy=new fF;this.yy.parent=this;
this.yy.k(u.E.t,this.c2,this);x.appendChild(this.yy.n);x=z[3];this.L9=new j7("...",!0);this.L9.n.setAttribute("style",e);
x.appendChild(this.L9.n);b=this.a46(3,["1000 views/mo",this.Fj[I++],this.Fj[I++],this.Fj[I++],"5000 views/mo",this.Fj[I++],this.Fj[I++],this.Fj[I++],"20000 views/mo",this.Fj[I++],this.Fj[I++],this.Fj[I++]]);
x.appendChild(b);var f=E.p("p");f.innerHTML="Insert Photopea into your webpage, with no ads, under your own brand \t\t... <a href=\"https://www.photopea.com/api/accounts#distributors\" target=\"_blank\" style=\"color:inherit;\">More</a>";
x.appendChild(f);this.$b=new el("Domain name (e.g. domain.com)",null,14);x.appendChild(this.$b.n);var y=new j7("Save Domain Settings",!1,null,!0);
y.Lm();x.appendChild(y.n);y.k("click",this.ags,this)};dW.Ak.prototype=new kw;dW.Ak.prototype.R2=function(x){var Q=typeof x=="number"?x:this.Kw.indexOf(x.target);
for(var F=0;F<4;F++)this.Kw[F].style.opacity=.6;this.Kw[Q].style.opacity=1;E.Os(this.yY);this.yY.appendChild(this.avF[Q])};
dW.Ak.prototype.oN=function(x,Q){var c=x<600?"d":" days",$=["30 days","90 days","365 days"];if(x<600)$=["30d","90d","365d"];
var z=this.arG;for(var F=0;F<z.length;F++){this.Fj[F].UG("<span>"+$[F%3]+": <sup>$</sup><big><b>"+z[F][0]+"</b></big>"+"</span>");
this.Fj[F].n.setAttribute("style",this.a8R)}};dW.Ak.prototype.awP=function(x){var Q=new jO("showpage",!0);
Q.data={xR:1};this.T(Q)};dW.Ak.prototype.aw9=function(x){var Q=new jO("showpage",!0);Q.data={xR:2};this.T(Q)};
dW.Ak.prototype._=function(){this.ED.UG(dQ.dP()?ah.get([0,11]):ah.get([0,10]));this.oi._();this.BA._();
this.i_._()};dW.Ak.prototype.as4=function(x){var Q=new jO(u.E.M,!0);Q.data={d:u.H.H_,link:"https://www.photopea.com/api/accounts#"+(x.target==this.aAZ?"teams":"distributors")};
this.T(Q)};dW.Ak.prototype.asv=function(x){var Q=x.currentTarget==this.avY;this.avY.U(Q);this.amQ.U(!Q)};
dW.Ak.prototype.an9=function(x){var Q=this.avY.h(),c=this.aAQ.h().trim().toLowerCase(),$=this.aaA.value.trim().toLowerCase();
if(c.length>60){alert("Too long email address");return}if($.length>600){alert("Too many team members");
return}$=$.split(",").join(" ").trim();$=$.replace(/\s+/g," ");if($=="")$=[];else $=$.split(" ");var z=dQ.JO();
if(z==null)z={};if(z.acc==null)z.acc={};z.acc.team={jin:Q,ldr:c,mmb:$};dQ._J(z,this.c2.bind(this));alert("Saved!");
this.BM()};dW.Ak.prototype.ags=function(x){var Q=this.$b.h().trim();if(!dQ.dP()){alert("You have to log in first.");
return}if(dQ.zF()==0){alert("Order a distributor account first.");return}var c=dQ.JO();if(c==null)c={};
if(c.acc==null)c.acc={};if(Q=="")delete c.acc.dname;else c.acc.dname=Q;dQ._J(c,this.c2.bind(this));alert("Saved!");
this.BM()};dW.Ak.prototype.a2T=function(x){var Q=dQ.rf(),F=this.Dw,c=dQ.JO();if(c==null)c={};if(c.acc==null)c.acc={};
c.acc.bto=x;dQ._J(c,function(){});var $=dW.ar4(x.split("\n"),Q.pmnts[F]);hF.save($,"photopea_invoice.pdf")};
dW.Ak.prototype.a92=function(x){var Q=dQ.rf(),c=dQ.JO(),$=c.acc?c.acc.bto:null;if($==null)$=Q.name+"\n"+Q.email;
var F=-1,z=x.target.n.parentNode;while((z=z.previousSibling)!=null)F++;this.Dw=F;var j=new jO(u.E.M,!0);
j.data={d:u.H.LL,AD:"billto",ZR:$,ka:this.a2T.bind(this)};this.T(j)};dW.Ak.prototype.BM=function(){this.Vw.innerHTML="";
E.Os(this._v);if(dQ.dP()){var x=dQ.rf(),Q=x.pmnts;if(x==null)return;this.Vw.innerHTML="<span style=\"font-size:1.5em; margin-right:0.7em;\">"+x.name+"</span> "+x.email+" <br/>";
if(Q){var c="<h2>Payments</h2>";for(var F=0;F<Q.length;F++){var $=Q[F],z=new Date($[0]*1e3);c+="<div style=\"font-size:1.2em\">"+z.getDate()+". "+(z.getMonth()+1)+". "+z.getFullYear()+" - "+dW.apg($)+"</div>"}this._v.innerHTML=c;
for(var F=0;F<Q.length;F++){var j=new j7("Get Invoice",!1,null,!0);j.n.setAttribute("style","float:right");
j.k("click",this.a92,this);this._v.children[F+1].appendChild(j.n)}}}else{}var U=dQ.dP()&&dQ.OT();this.uU.n.style.display=U?"block":"none";
if(U){var i,b,e=U;if(e[0]==0){i=dQ.Bu(e[1])-Date.now()*(1/1e3);b=e[1][2]==1?"Single User":"Team Of "+e[1][2]}else{i=e[1][1]-Date.now()*(1/1e3);
b="Member of \""+e[1][0]+"\""}this.uU.UG("Premium active for "+Math.round(i/(60*60*24))+" more days! ("+b+")")}var k=dQ.dP()&&dQ.zF()*1e3>Date.now();
this.L9.n.style.display=k?"block":"none";if(k){var i=dQ.zF()-Date.now()/1e3;this.L9.UG("Distributor active for "+Math.round(i/(60*60*24))+" more days!")}var K=dQ.JO();
this.yy.BM();if(K&&K.acc&&K.acc.dname)this.$b.U(K.acc.dname);else this.$b.U("")};dW.Ak.prototype.a46=function(x,Q){var c=E.p("table");
if(!0){var $="<table><tr>";for(var F=0;F<x;F++)$+="<th>"+Q[F*4]+"</th>";$+="</tr></table>";c.innerHTML=$;
for(var F=0;F<3;F++){var z=E.p("tr"),j;c.appendChild(z);for(var U=0;U<x;U++){j=E.p("td");j.style.width=Math.round(100/x)+"%";
z.appendChild(j);j.appendChild(Q[U*4+1+F].n)}}}return c};dW.Ak.prototype.acV=function(x){var Q=this.Fj.indexOf(x.currentTarget),$=30,z=1;
if(!dQ.dP()){this.e9();return}if(this.a5R.h()==!1&&Q<12){alert("You must accept Terms of Service");return}var c=dQ.dP()&&dQ.OT();
if(Q!=-1){var j=this.arG[Q];$=j[1];z=j[2]}if(c&&z<1e3){alert("You already have premium.");return}console.log(j,$,z);
if(Q==-1){var U=prompt("Please enter your key");if(U!=null){dQ.a12(U,this.c2.bind(this));this.I2()}return}if($==30&&z==1){var i=confirm("You can have 90 days for $15. Do you still want a 30 days version for $8?");
if(!i)return}dQ.order($,z,this.c2.bind(this));this.I2()};dW.Ak.prototype.c2=function(x){this.BM();this.I2()};
dW.Ak.prototype.e9=function(x){if(dQ.dP()){dQ.aBF();this.I2();this.BM(null,null,null)}else dQ.e9(this.aaP.bind(this))};
dW.Ak.prototype.aaP=function(){var x=new jO(u.E.M,!0);x.data={d:u.H.ax2};this.T(x)};dW.Ak.prototype.I2=function(){var x=new jO(u.E.M,!0);
x.data={d:u.H.a5S};this.T(x)};dW.Jm=function(x){kw.call(this);this.n=E.p("div");var Q=this.n,c=this.aqm=new j7([0,13,2],!1,null,!0),$;
c.k("click",this.ata,this);Q.appendChild(c.n);if(x.startsWith("::")){$=E.p("iframe");$.setAttribute("style","width:100%;height:1700px; background-color:white;");
$.setAttribute("src",x.slice(2))}else{$=E.p("div");$.innerHTML=x}Q.appendChild($)};dW.Jm.prototype=new kw;
dW.Jm.prototype.ata=function(x){var Q=new jO("showpage",!0);Q.data={xR:0};this.T(Q)};dW.Jm.prototype._=function(){this.aqm._()};
dW.a9l="\t\t<h1>Contact</h1>\t\t<p>Photopea.com is operated by Ivan Kuckir (IČ 04498411, Tax ID CZ9011014309).</p>\t\t<ul>\t\t\t<li><b>Address</b>: Hálkova 483, 517 41 Kostelec nad Orlicí, Czech Republic</li>\t\t\t<li><b>E-mail</b>: support@photopea.com, <b>Phone number</b>: +420 604 592 737</li>\t\t</ul>\t\t<h1>Refund Policy</h1>\t\t<p>You can ask for a refund by writing us an email to support@photopea.com and. \t\tWe offer only one kind of service, and if you have been refunded in the past, you can not get another refund.\t\t</p>\t\t<h1>Terms of Delivery</h1>\t\t<p>You can pay with a debit or a credit card. Payments are processed instantly, your Premium account will be activated instantly.</p>\t\t<h1>Payment Provider</h1>\t\t<p>Payments are provided by <a style=\"color:white\" href=\"https://www.comgate.cz/cz/platebni-brana\">ComGate pamyments, a.s</a>.</p>\t\t<ul>\t\t\t<li>ComGate Payments, a.s.</li>\t\t\t<li>Gočárova třída 1754 / 48b, Hradec Králové</li>\t\t\t<li>E-mail: platby-podpora@comgate.cz, Tel:  +420 228 224 267</li>\t\t</ul>\t\t<img src=\"https://www.comgate.cz/files/platebni-brana-comgate-paticka-e-shopu.png\" loading=\"lazy\" />\t";
dW.apg=function(x){var Q=x[1]+" days, ";if(x[2]<1e3)return"Photopea Premium ("+Q+x[2]+" user"+(x[2]==1?"":"s")+")";
else return"Photopea Distributor ("+Q+x[2]+" views/month)"};dW.ar4=function(x,Q){x=["Bill To:"].concat(x);
var c=new ToPDF,$=595,z=842,j=40,U=18,i=12,b=500,e=100,k=400,D=0;function K(r,H,o,P,O){R.font.Tf=O?"Helvetica-Bold":"Helvetica";
R.ctm=[1,0,0,1,H,o];R.font.Tfs=P?P:i;c.PutText(R,r,0)}function g(r,H,o,P){for(var F=0;F<r.length;F++){K(r[F],H,o-F*P,null,F==0)}}var R=UDOC.getState();
c.StartPage(0,0,$,z);K("INVOICE",$-j-140,z-j-30,30,!0);g(["Bill From:","Ivan Kuckir","Hálkova 483, 517 41 Kostelec nad Orlicí","Tax ID: CZ9011014309"],j,z-j-40,U);
var T=new Date(Q[0]*1e3);g(["Date: "+T.getDate()+". "+(T.getMonth()+1)+". "+T.getFullYear(),"Transaction ID: "+Q[4]],$-j-140,z-j-40-U*2,U);
var a=x.join("");for(var F=0;F<a.length;F++)D=Math.max(D,a.charCodeAt(F));if(D>256){var _=4,I=E.p("canvas"),f=I.getContext("2d"),y=0;
f.font=i*_+"px sans-serif";for(var F=0;F<x.length;F++)y=Math.max(y,f.measureText(x[F]).width);var Z=Math.round(y)+20,v=x.length*_*U+20;
I.width=Z;I.height=v;f.font=i*_+"px sans-serif";for(var F=0;F<x.length;F++){f.font=(F==0?"bold ":"")+i*_+"px sans-serif";
f.fillText(x[F],10,(F+1)*_*U)}document.body.appendChild(I);var G=new Uint8Array(f.getImageData(0,0,Z,v).data.buffer);
R.ctm=[Z/_,0,0,v/_,j-10/_,z-j-40-100-v/_];c.PutImage(R,G,Z,v);R.ctm=[1,0,0,1,0,0]}else g(x,j,z-j-40-100,U);
R.colr=[.8,.8,.8];R.pth={cmds:["M","L","L","L","Z"],crds:[j,b,$-j,b,$-j,b-U,j,b-U]};c.Fill(R);R.colr=[0,0,0];
var q=[j,b,$-j,b,j,b-U,$-j,b-U,j,b-e,$-j,b-e,j,b,j,b-e,$-j,b,$-j,b-e,k,b,k,b-e],h=[];for(var F=0;F<q.length;
F+=4)h.push("M","L");R.pth={cmds:h,crds:q};c.Stroke(R);K("Order details",j+4,b-14);K(dW.apg(Q),j+4,b-U-14);
K("TOTAL:",j+4,b-e-14,null,!0);K("Price",$-j-50,b-14);K(Q[3]+" USD",$-j-60,b-U-14);K(Q[3]+" USD",$-j-60,b-e-14,null,!0);
K("www.Photopea.com",j,j);K("support@photopea.com",$-j-130,j);c.ShowPage();c.Done();return c.buffer};
function jc(){j0.call(this,[11,14],"addguides");this.D9;this.n$={Zo:{IM:0}};this.q8=null;var x=E.p("div","form");
this.body.appendChild(x);this.zw=[];this.zS=new c_(null,["Hi"]);x.appendChild(this.zS.n);E._X(x);this.zS.k(u.E.t,this.Og,this);
this.ZJ=new el([22,4,0],null,16);this.ZJ.k(u.E.t,this.JL,this);this.ej=new el([22,4,1],null,16);this.ej.k(u.E.t,this.JL,this);
this.Dz=new c7(null,d.fR.$P);this.Dz.k(u.E.t,this.JL,this);x.appendChild(this.ZJ.n);x.appendChild(this.Dz.n);
E._X(x);x.appendChild(this.ej.n);this.CH=E.wb(this,x);this.k("closebtn",this.lW,this)}jc.prototype=new j0;
jc.prototype.OL=function(x,Q){return x!=null};jc.prototype.sD=function(){return!0};jc.prototype._=function(){j0.prototype._.call(this);
this.ZJ._();this.ej._();this.Dz._();this.CH._()};jc.prototype.Fy=function(x,Q){var c=x.Zo.IM;this.n$.Zo.IM=c;
this.Dz.U(c)};jc.prototype.BM=function(x,Q){this.D9=x;this.q8=JSON.stringify(x.wZ());this.zw=[-1];var c=["Global"],$=x.root.children,z=x.lG();
for(var F=0;F<$.length;F++){var j=$[F].a;if(j.add.artb){c.push(j.getName());this.zw.push($[F].index)}}this.zS.yJ(c);
this.zS.U(this.zw.indexOf(z));this.Og()};jc.prototype.Og=function(){var x=this.D9,Q=x.wZ(),c=this.zw[this.zS.h()],$=[0,0];
if(c!=-1){var z=x.B[c].Dd();$=[z.x,z.y]}var j=function(U,i,x,b,e){var k=U[0],K=[];for(var F=0;F<k.length;
F++)if(U[1][F]==c&&k[F][0]==i)K.push(d.fR.Z0(k[F][1]-$[i],x.cQ,b,e));K.sort(function(g,R){return g-R});
return K.join(", ")};this.ZJ.U(j(Q,1,x,this.n$,x.e));this.ej.U(j(Q,0,x,this.n$,x.m))};jc.prototype.JL=function(x){if(x&&x.currentTarget==this.Dz)this.n$.Zo.IM=this.Dz.h();
else{var Q=this.a5$(),c=this.D9;c.tF(Q);c.vu=!0}this.Og()};jc.prototype.a5$=function(){var x=this.D9,Q=x.wZ(),c=this.zw[this.zS.h()],$=[0,0];
if(c!=-1){var z=x.B[c].Dd();$=[z.x,z.y]}var j=[];for(var U=0;U<2;U++){var i=U==0?this.ej:this.ZJ,b=U==0?x.m:x.e,e=i.h().replace(/,/g," ").replace(/  +/g," ").trim(),k=e==""?[]:e.split(" ");
for(var F=0;F<k.length;F++)j.push([U,d.fR.avS(k[F],x.cQ,this.n$,b)+$[U]])}for(var F=0;F<Q[0].length;
F++)if(Q[1][F]==c){Q[0].splice(F,1);Q[1].splice(F,1);F--}for(var F=0;F<j.length;F++){Q[0].push(j[F]);
Q[1].push(c)}return Q};jc.prototype.lW=function(x){var Q=this.D9;Q.tF(JSON.parse(this.q8));Q.vu=!0;this.D9=null};
jc.prototype.K6=function(x){this.JL(x);var Q=new jO(u.E.v,!0);Q.f=X.kU;Q.data={d:"gids",HN:JSON.parse(this.q8),Gv:this.D9.wZ()};
this.D9=null;this.close();this.T(Q)};function dE(x){j0.call(this,{pdfpres:"PDF Presentation",cformat:"Convert Formats",batch:"Batch",mockups:"Generate Mockups"}[x],x);
this.n$=null;this.D9=null;var Q=E.p("div","form");this.body.appendChild(Q);Q.setAttribute("style","width:300px");
this.Wa=new jR("Source Images",!0,!0);Q.appendChild(this.Wa.n);this.J$=new c7([12,14,0],["A4 Portrait","A4 Landscape",[12,93,3],"Adapt to images"]);
this.TI=new f2("Order images by name");this.TI.U(!0);var c=this.aqy=ar.c8();for(var F=0;F<c.length;F++)if(ar.pz(c[F]).f6){c.splice(F,1);
F--}c.push("SVG","PDF");this.B6=new c7([12,50],c);this.fL=new j4;this.B6.k(u.E.t,this.eJ,this);this.hG=new c7("Action Set",[]);
this.hG.k(u.E.t,this.Fy,this);this.Ip=new c7("Action",[]);if(x=="pdfpres"){Q.appendChild(this.J$.n);
Q.appendChild(this.TI.n)}else{if(x=="batch"){Q.appendChild(this.hG.n);E._X(Q);Q.appendChild(this.Ip.n);
E.ix(Q)}Q.appendChild(this.B6.n);Q.appendChild(this.fL.n)}var $=["VAR0 PDF",[1,8]];if(x=="cformat")$="Convert Images";
if(x=="batch")$="Process Images";if(x=="mockups")$="Generate";var z=new j7($,!0,null,!0);z.k("click",this.u1,this);
Q.appendChild(z.n);this.eJ()}dE.prototype=new j0;dE.prototype.eJ=function(x){var Q=this.aqy[this.B6.h()];
this.fL.zE(Q)};dE.prototype.u1=function(x){var Q=this.Wa.h(),c=[],j=595,U=842,T;for(var $ in Q)c.push($);
if(c.length==0){alert("No images selected");return}if(this.TI.h())c.sort();var z=this.J$.h(),i=new ToPDF,b=UDOC.getState(),e=this.aqy[this.B6.h()],k=ar.pz(e),K=this.fL.h(),g={},R=this.D9;
if(this.id=="mockups"){if(R==null){alert("Open a document with smart objects");return}var D=R.B[R.g[0]];
if(D.add.SoLd==null){D=null;for(var F=0;F<R.B.length;F++)if(R.B[F].add.SoLd)D=R.B[F];if(D==null){alert("There are no smart objects in a current document.");
return}}R.g=[R.B.indexOf(D)];T=D.add.SoLd.Sz.v}for(var a=0;a<c.length;a++){var $=c[a],_=Q[$],I=_[0]==255,f=ar.HB(_.buffer),y=ar.pz(f),Z=[{K$:new gh,data:new ArrayBuffer(0)}],v=null;
if(f=="psd"&&!k.f6)Z=cz.am3(_.buffer);else if(y.f6){v=new hf("file.psd");y.fk(_.buffer,v);v.jf();if(!k.f6){if(v.RS)aE.kM(v,this.n$.Dn,this);
v.c();v.eB();Z=[{K$:new gh(0,0,v.m,v.e),data:v.VY().buffer}]}}else Z=y.fk(_.buffer);if(this.id=="batch"){var G=new jO(u.E.M,!0),q=this.n$,h=q.Q$,r=h[this.hG.h()];
for(var F=0;F<Z.length;F++){v=ar.$E($,[Z[F]]);G.data={d:u.H.th,Ta:v};this.T(G);if(v.B.length==3)v.g=[1];
ep.av9(v,h,r.yY[this.Ip.h()].LX,r.LX,this);v.c();v.eB();Z[F].K$=new gh(0,0,v.m,v.e);Z[F].data=v.VY().buffer;
Z[F].cQ=v.cQ;Z[F].Xo=v.Xo;G.data={d:u.H.AF,yn:v};this.T(G)}}if(this.id=="mockups"){var G=new jO(u.E.G2,!0);
G.data={q4:"placedLayerEditContents",dx:{classID:"placedLayerEditContents"}};this.T(G);var H=new Uint8Array(Z[0].data),o=Z[0].K$,P=X.Y.rN([H,o],new bI(T.Wdth.v/o.m,0,0,T.Hght.v/o.e,0,0)),O=new jO(u.E.v,!0);
O.f=X.Mf;O.data={d:eM.Ap,sn:{buffer:P.buffer,rect:P.rect}};this.T(O);var G=new jO(u.E.M,!0);G.data={d:u.H.E9};
this.T(G);G.data={d:u.H.AF};this.T(G);Z=[{data:R.VY().buffer,K$:new gh(0,0,R.m,R.e)}];O.data={d:"h_stepbck"};
O.f=X.RZ;this.T(O)}var p=Z[0].K$,C=new Uint8Array(Z[0].data),W=p.m,J=p.e;if(this.id=="pdfpres"){var t=[[595,842],[842,595],[595,595],[595,0]][z];
if(z==3)t[1]=Math.round(t[0]*J/W);var j=t[0],U=t[1],Y=Math.min(j/W,U/J);i.StartPage(0,0,j,U);b.ctm=[W*Y,0,0,J*Y,(j-W*Y)/2,(U-J*Y)/2];
i.PutImage(b,I?_:C,W,J);i.ShowPage()}else{var l=$.split("."),m;l.pop();l.push(e.toLowerCase());if(k.f6){if(v==null){v=ar.$E($,Z);
v.jf()}m=k.YU(v,v.m,v.e,K,this.n$)}else{var B=[];for(var F=0;F<Z.length;F++){var L=Z[F],A=L.rF,S=0;if(A){A=A.split(",");
if(A[1])S=parseInt(A[1])}B.push([L.data,S,L.cQ,L.hD,null,L.Xo])}m=k.YU(B,W,J,K)}g[l.join(".")]=new Uint8Array(m)}}if(this.id=="pdfpres"){i.Done();
hF.save(i.buffer,"file.pdf")}else{hF.save(UZIP.encode(g),"images.zip")}};dE.prototype.BM=function(x,Q,c,$){this.D9=x};
dE.prototype.Fy=function(x,Q){if(Q!=null){this.n$=x;var c=x.Q$,$=[];for(var F=0;F<c.length;F++)$.push(c[F].LX);
this.hG.yJ($)}else x=this.n$;var c=x.Q$.length==0?[]:x.Q$[this.hG.h()].yY,$=[];for(var F=0;F<c.length;
F++)$.push(c[F].LX);this.Ip.yJ($)};dE.prototype._=function(){j0.prototype._.call(this);this.Wa._();this.J$._();
this.TI._()};function ew(x){var Q=fK.names[x];if(Q==null)Q=k5.names[x];if(x=="aply")Q=[2,12];if(x=="fade")Q=[2,11];
if(x=="matc")Q=[4,18];if(x=="blendOptions")Q=[14,10];j0.call(this,Q,"afw_"+x);this.PU=x;this.nS=null;
this.RU=null;this.XB=new jH[x];this.XB.k(u.E.t,this.bM,this);this.XB.parent=this;this.body.appendChild(this.XB.n);
this.AV=new f2([24,18,5]);this.AV.U(!0);this.AV.k(u.E.t,this.bM,this);this.pR=new j7([1,12,2],!0,null,!0);
this.pR.k("click",this.xI,this);this.CH=E.wb(this);if(this.vU())this.XB.hI(this.CH.n);else{E.ZW(this.XB.n,"form");
E.ZW(this.body,"flexrow");this.XB.n.setAttribute("style","width:312px");var c=E.p("div");this.body.appendChild(c);
c.setAttribute("style","width:8em; margin-left:1em; line-height:2.3em");c.appendChild(this.CH.n);c.appendChild(this.pR.n);
c.appendChild(this.AV.n)}this.k("closebtn",this.lY,this)}ew.prototype=new j0;ew.prototype.sD=function(){return!0};
ew.prototype.vU=function(){return this.XB!=null&&this.XB.Ct()};ew.prototype.$O=function(){return this.vU()?new bC(0,0):j0.prototype.$O()};
ew.prototype.Da=function(x){return this.XB.Da(x)};ew.prototype.W9=function(){return this.XB.W9()};ew.prototype.Eu=function(x,Q,c,$,z){this.XB.Eu(x,Q,c,$,z)};
ew.prototype.CK=function(x,Q,c,$,z){this.XB.CK(x,Q,c,$,z)};ew.prototype.km=function(x,Q,c,$,z){this.XB.km(x,Q,c,$,z)};
ew.prototype.OL=function(x,Q){if(this.PU=="fade")return ew.au6(x);return!0};ew.prototype.xI=function(x){this.XB.U(fK.$H(this.PU));
this.bM()};ew.prototype.bM=function(x){this.MX({d:"edit",_B:this.XB.h(),NQ:!this.AV.h()})};ew.prototype.lY=function(x){this.MX({d:"cancel"})};
ew.prototype.K6=function(x){if(!this.AV.h()){this.AV.U(!0);this.bM()}this.RU=this.XB.h();if(this.vU())this.bM();
this.MX({d:"confirm"});this.close()};ew.prototype._=function(){j0.prototype._.call(this);this.AV._();
if(this.XB)this.XB._();this.CH._()};ew.prototype.Fy=function(x,Q){if(this.XB)this.XB.Fy(x,Q)};ew.prototype.sM=function(x,Q,c,$){if(this.vU())this.XB.sM($);
else j0.prototype.sM.call(this,x,Q,c,$)};ew.prototype.BM=function(x,Q,c,$){this.nS=Q.nS;var z=x.add.lnk2?x.add.lnk2:[],j,U,i=new gh(0,0,x.m,x.e),b=x.B[x.g[0]],k=null;
j=b.buffer;U=b.rect;var e=x.u&&this.PU=="LqFy"&&Q.nS==null;if(e){U=x.u.rect.clone();j=d.R(U.P()*4);d.WK(b.buffer,b.rect,j,U)}if(this.vU()){k=x.VY(x.g[0]-1);
if(e){var K=d.R(U.P()*4);d.WK(k,i,K,U);i=U.clone();k=K}}var g=fK.$H(this.PU),R=[z,x.fG,x,c];if(Q.nS==null){this.XB.U(g,j,U,i,k,R);
if(k5.names[this.PU]){if($.S(fM.Al)&&this.RU)this.XB.U(this.RU);var T=X.vD.getData(x),D=d.q9(T[0].aJ);
this.XB.HJ(D)}}else{var a=!1,b=x.B[this.nS.a];if(b.Oz()){var _=b.U5(x);j=_.buffer;U=_.rect;var I=b.add.SoLd.filterFX.v.filterFXList.v;
if(I[this.nS.index]){var f=I[this.nS.index].v;this.XB.U(this.PU=="blendOptions"?f.blendOptions.v:f.Fltr.v,j,U,i,k,R);
this.XB.HJ(d.q9(j));a=!0}}if(!a){this.XB.U(g,j,U,i,k,R);this.XB.HJ(d.q9(j))}}if(!this.vU()){this.bM();
var y=this.XB;if(y&&y.Ai&&y.Ai[0]&&y.Ai[0]._N&&Math.min(window.innerWidth,window.innerHeight)>500)y.Ai[0]._N()}};
ew.prototype.MX=function(x){var Q=new jO(u.E.v,!0);x.PU=this.PU;x.nS=this.nS;if(this.PU=="VaPo"){x.b=this.XB.h();
x.QK=this.XB.a2n()}Q.data=x;Q.f=fK.names[this.PU]||this.nS?X.iT:X.FQ;Q.Oe=!0;this.T(Q)};ew.prototype.oN=function(x,Q){if(!this.XB.Ct()){}else{this.body.style.padding="0";
this.XB.oN(x,Q)}};ew.au6=function(x){if(x==null)return!1;var Q=x.O2();if(Q==null||!(Q.data instanceof Array)||Q.data.length!=x.g.length)return!1;
for(var F=0;F<Q.data.length;F++){var c=Q.data[F];if(c.a<0&&x.fG[-1-c.a])return!0;if(c.a==null||x.B[c.a]==null||x.B[c.a].kk!=c.y2)return!1;
if(x.g.indexOf(c.a)==-1)return!1}return!0};function j1(){j0.call(this,[11,0],"camera");this.data=null;
this.yf=new bC(1,1);this.a9b=[];var x=E.p("div","form hbar");this.body.appendChild(x);this.axr=new c7(null,[]);
this.kt=new c7([21,0],[[21,2],[21,1]]);x.appendChild(this.kt.n);this.uy=new c7(null,[]);this.uy.k(u.E.t,this.aBZ,this);
x.appendChild(this.uy.n);this.sX=new j7([11,0],!1,null,!0);this.sX.k("click",this.aCy,this);x.appendChild(this.sX.n);
this.mG=new jz("");x.appendChild(this.mG.n);this.stream=null;this.UF=E.p("video","");this.UF.setAttribute("autoplay","true");
this.body.appendChild(this.UF);this.az3=this.ahO.bind(this);this.at0=this.azH.bind(this);this.aAl=this.a2W.bind(this);
this.k("closebtn",this.au$,this)}j1.prototype=new j0;j1.prototype._=function(){j0.prototype._.call(this);
this.kt._();this.sX._();this.oN(this.ww,this.R0)};j1.prototype.VY=function(){var x=this.UF.videoWidth,Q=this.UF.videoHeight,c=E.p("canvas","");
c.width=x;c.height=Q;var $=c.getContext("2d");$.drawImage(this.UF,0,0,x,Q);var z=$.getImageData(0,0,x,Q);
return{K$:new gh(0,0,x,Q),data:z.data.buffer}};j1.prototype.aCy=function(x){if(this.kt.h()==0)this.az_();
else this.a7r()};j1.prototype.a7r=function(){var x=this.VY(),Q={buffer:new Uint8Array(x.data),rect:x.K$},c=new jO(u.E.v,!0);
c.Oe=!0;c.f=X.Mf;c.data={d:eM.Ap,sn:Q};this.T(c);alert(ah.get([21,4]))};j1.prototype.az_=function(){var x=this.VY(),Q=ar.$E("camera",[x]),c=new jO(u.E.M,!0);
c.data={d:u.H.th,Ta:Q};this.T(c);alert(ah.get([21,5]))};j1.prototype.BM=function(x,Q,c){navigator.mediaDevices.enumerateDevices().then(this.adN.bind(this))};
j1.prototype.adN=function(x){var Q=this.a9b=[],c=[];for(var F=0;F<x.length;F++)if(x[F].kind=="videoinput"){Q.push(x[F]);
c.push("Camera "+Q.length)}this.uy.yJ(c);this.uy.U(0);this.aBZ()};j1.prototype.aBZ=function(x){this.au$();
var Q={video:{deviceId:this.a9b[this.uy.h()].deviceId,width:{ideal:8e3},height:{ideal:8e3}}};if(navigator.mediaDevices.getUserMedia)navigator.mediaDevices.getUserMedia(Q).then(this.az3).catch(this.at0);
else navigator.webkitGetUserMedia(Q,this.az3,this.at0)};j1.prototype.ahO=function(x){this.stream=x;this.UF.srcObject=x;
this.UF.addEventListener("loadedmetadata",this.aAl,!1)};j1.prototype.a2W=function(x){this.UF.play();
this.oN(this.ww,this.R0)};j1.prototype.$O=function(x,Q){return new bC(0,0)};j1.prototype.oN=function(x,Q){var c=this.UF.videoWidth,$=this.UF.videoHeight;
this.mG.U(c+" x "+$+" px");this.mG.n.setAttribute("style","position:absolute;  left:14px; bottom:10px; z-index:1;");
this.yf.r$(c,$);this.ww=x;this.R0=Q;var z=x-28,j=Q-28-30,U=this.yf.x/this.yf.y;if(z/j>U)z=j*U;else j=z/U;
this.UF.setAttribute("style","display: block; width: "+Math.round(z)+"px; height:"+Math.round(j)+"px;")};
j1.prototype.azH=function(x){console.log("error",x);alert(ah.get([21,6]));this.close()};j1.prototype.au$=function(x){if(this.stream!=null){var Q=this.stream.getTracks();
for(var F=0;F<Q.length;F++)Q[F].stop();this.stream=null}};function f9(){j0.call(this,[7,8],"crange");
this.D9=null;this.YY={xv:73,V:4.45,J:4};this.m3={xv:73,V:4.45,J:4};this.body.style.width="20em";this.iV=new c7([0,5],["Sampled Colors",[19,6,0],[19,6,1],[19,6,2]]);
this.iV.k(u.E.t,this.avs,this);this.body.appendChild(this.iV.n);this.Ca=E.p("div","form");this.body.appendChild(this.Ca);
var x=this.ajR=2,Q=this.Gp=[new bv([12,92],0,200),new c_([12,36],[[18,0],"\uFF0B","-"]),new bv([12,92],0,100,"%"),new f0("Min",0,255),new f0("Max",0,255)];
Q[0].U(40);Q[x].U(40);for(var F=0;F<Q.length;F++){Q[F].k(u.E.t,this._I,this);Q[F].parent=this}this.GP=E.p("canvas");
this.body.appendChild(this.GP);this.CH=E.wb(this,this.body)}f9.prototype=new j0;f9.prototype.OL=function(x,Q){return x!=null};
f9.prototype.W9=function(){return!0};f9.prototype.sD=function(){return!0};f9.prototype.avs=function(x){var Q=this.iV.h(),c=this.Gp,$=this.Ca,z=0,j=c.length,U=this.ajR;
if(Q==0)j=U;else{z=U;c[z+1].U([0,100,190][Q-1]);c[z+1].vz(Q!=1);c[z+2].U([60,150,255][Q-1]);c[z+2].vz(Q!=3)}E.Os($);
for(var F=z;F<j;F++){$.appendChild(c[F].n)}this._I()};f9.prototype._=function(){j0.prototype._.call(this);
this.CH._();this.iV._();for(var F=0;F<this.Gp.length;F++)this.Gp[F]._()};f9.prototype.Eu=function(x,Q,c,$,z){var j=x.Q.$X(z.x,z.y);
this.auK(j.x,j.y)};f9.prototype.auK=function(x,Q){var c=Math.min,$=Math.max,z=this.D9,j=$(0,c(z.m-1,Math.floor(x))),U=$(0,c(z.e-1,Math.floor(Q))),i=z.VY(),b=(U*z.m+j)*4,e=i[b],k=i[b+1],K=i[b+2],g=d.eC(e,k,K),R=this.Gp[1].h(),T=this.YY,D=this.m3;
if(R==0){this.YY=JSON.parse(JSON.stringify(g));this.m3=g}else if(R==1){T.xv=c(T.xv,g.xv);T.V=c(T.V,g.V);
T.J=c(T.J,g.J);D.xv=$(D.xv,g.xv);D.V=$(D.V,g.V);D.J=$(D.J,g.J)}else if(R==2){var a=(T.xv+D.xv)/2,_=(T.V+D.V)/2,I=(T.J+D.J)/2;
if(g.xv<a)T.xv=$(T.xv,g.xv+10);else D.xv=c(D.xv,g.xv-10);if(g.V<_)T.V=$(T.V,g.V+1);else D.V=c(D.V,g.V-1);
if(g.J<I)T.J=$(T.J,g.J+1);else D.J=c(D.J,g.J-1)}this._I()};f9.prototype.K6=function(x){var Q=this.iV.h(),c=this.Gp,$={__name:"Color Range",classID:"ClrR",colorModel:{t:"long",v:0}};
if(Q==0){var z=this.YY,j=this.m3;$.Mnm={t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:z.xv},A:{t:"doub",v:z.V},B:{t:"doub",v:z.J}}};
$.Mxm={t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:j.xv},A:{t:"doub",v:j.V},B:{t:"doub",v:j.J}}};$.Fzns={t:"long",v:c[0].h()}}else{Q--;
var U=["shadows","midtones","highlights"][Q];$.Clrs={t:"enum",v:{Clrs:["Shdw","Mdtn","Hghl"][Q]}};if(0<Q)$[U+"LowerLimit"]={t:"long",v:c[3].h()};
if(Q<2)$[U+"UpperLimit"]={t:"long",v:c[4].h()};$[U+"Fuzziness"]={t:"long",v:c[2].h()}}this.close();var i=new jO(u.E.G2,!0);
i.data={q4:"colorRange",dx:$};this.T(i)};f9.prototype.BM=function(x,Q){this.D9=x;this.auK(0,0);this.avs()};
f9.prototype._I=function(){var x=this.D9,Q=this.iV.h(),c=this.YY,$=this.m3,z=this.Gp,j=z[0].h()/200,U=!1;
if(Q>0){c=z[3].h();$=z[4].h();if(c>=$)c=$-1;U=!0;j=z[2].h()/100}var i=X.U_.Ti(x,c,$,j,U),b=i.rect,e=i.channel,k=this.GP,K=k.getContext("2d"),g=Math.floor(230*E.q_()),R=Math.floor(g*(b.e/b.m));
k.width=g;k.height=R;E.qJ(k,g,R);var T=d.R(e.length*4);d.h4(T,4294967295);for(var F=0;F<3;F++)d.Dm(e,T,F);
var D=X.Y.rN([T,b],new bI(g/b.m,0,0,R/b.e,0,0)),a=D.rect,_=new ImageData(new Uint8ClampedArray(D.buffer.buffer),a.m,a.e);
K.putImageData(_,0,0)};function d5(){j0.call(this,[12,76,1],"createshape");this.NZ=null;var x=E.p("div","form");
x.setAttribute("style","width:20em");this.body.appendChild(x);this.jq=new hh(!0,!0,null,!0,!0);this.jq.U(new bC(100,100));
x.appendChild(this.jq.n);this.hU=new f2([19,5,3]);x.appendChild(this.hU.n);this.CH=E.wb(this,x)}d5.prototype=new j0;
d5.prototype.K6=function(x){var Q=this.jq.h();this.NZ.axg(this.NZ.aBb,Q.x,Q.y,this.hU.h());this.close()};
d5.prototype._=function(){if(this.NZ)this.MW=ah.get([5,3])+": "+ah.get(this.NZ.adE);j0.prototype._.call(this);
this.CH._();this.jq._();this.hU._()};d5.prototype.BM=function(x,Q){this.NZ=Q;this._();this.jq.U(this.jq.h(),x.cQ)};
function fX(){j0.call(this,[11,1],"colorpicker");this.uj=null;this.Fo=null;this.E5=null;this.fh=!1;this.z4=!1;
this.aba=[.9642,1,.8249];var x=E.p("div","flexrow"),U,i;this.body.appendChild(x);this.Ku=new jl(256,!0);
this.Ku.k(u.E.t,this.Mz,this);x.appendChild(this.Ku.n);var Q=E.p("div","form");Q.setAttribute("style","width:14.5em; margin-left:1em;");
x.appendChild(Q);var c=E.p("div","flexrow");Q.appendChild(c);var $=E.p("div");c.appendChild($);$.style="width:95px; margin-right:14px";
this.anT=E.p("div","full");$.appendChild(this.anT);this.aaE=E.p("div","full");$.appendChild(this.aaE);
var $=E.p("col");c.appendChild($);$.style.width="80px";this.CH=E.wb(this,$);var c=E.p("div","flexrow");
Q.appendChild(c);var z=E.p("div"),j=E.p("div");c.appendChild(z);c.appendChild(j);z.style=j.style="margin-left:14px; max-width:80px;";
U=["H","S","B"];i=z;this.n1=[];for(var F=0;F<3;F++){var b=0,e=360,k="\xB0";if(F!=0){e=100;k="%"}var K=new f0(U[F],b,e,k,0,!1,!0);
this.n1.push(K);K.k(u.E.t,this.akk,this);i.appendChild(K.n);if(F==2)K.n.style.marginBottom="8px"}U=["R","G","B"];
i=z;this._T=[];for(var F=0;F<3;F++){var K=new f0(U[F],0,255,null,0,!1,!0);this._T.push(K);K.k(u.E.t,this.aqF,this);
i.appendChild(K.n)}U=["L","a","b"];i=j;this.ME=[];for(var F=0;F<3;F++){var b=[0,-128,-128][F],e=[100,127,127][F],K=new f0(U[F],b,e,null,0,!1,!0);
K.U(0);this.ME.push(K);K.k(u.E.t,this.abj,this);i.appendChild(K.n);if(F==2)K.n.style.marginBottom="8px"}U=["C","M","Y","K"];
i=j;this.K5=[];for(var F=0;F<4;F++){var K=new f0(U[F],0,100,"%",0,!1,!0);K.U(0);this.K5.push(K);K.k(u.E.t,this.apl,this);
i.appendChild(K.n);if(F==3)K.n.style.marginBottom="8px"}this.ZJ=new el("#",null,4.5);this.ZJ.k(u.E.t,this.FD,this);
z.appendChild(this.ZJ.n);this.ZJ.n.style.marginRight="0";this.q7=E.p("input","fitem");this.q7.setAttribute("type","color");
this.q7.setAttribute("style","width:59px;  margin-left:19px;");this.q7.addEventListener("change",this.FD.bind(this),!1);
this.Ji=new gx(9);this.Ji.k(u.E.t,this.FD,this);Q.appendChild(this.Ji.n);this.k("closebtn",this.lY,this);
this.Sm=!1}fX.prototype=new j0;fX.prototype.W9=function(){return!0};fX.prototype.$O=function(x,Q){if(Math.min(x,Q)>500)return null;
return new bC(Math.max(0,Math.min(150,(x-484)/2)),Math.max(0,Math.min(150,(Q-316)/2)))};fX.prototype.oN=function(x,Q){this.Ku.oN(Math.min(256,x-226),Q)};
fX.prototype._=function(x,Q){j0.prototype._.call(this);for(var F=0;F<3;F++){this._T[F]._();this.n1[F]._();
this.ME[F]._()}for(var F=0;F<4;F++)this.K5[F]._();this.CH._()};fX.prototype.Mz=function(x){this.Fo=this.Ku.h();
this.update()};fX.prototype.Eu=function(x,Q,c,$,z){this.Sm=!0;this.ajG(x,z)};fX.prototype.CK=function(x,Q,c,$,z){if(!this.Sm)return;
this.ajG(x,z)};fX.prototype.km=function(x,Q,c,$,z){this.Sm=!1};fX.prototype.ajG=function(x,Q){this.Fo=d.RD(X.vt.VM(x,Q,1),1);
this.update()};fX.prototype.aqF=function(x){var Q=this._T,c=this.H9(parseInt(Q[0].h())),$=this.H9(parseInt(Q[1].h())),z=this.H9(parseInt(Q[2].h()));
this.Fo={Z:c/255,r:$/255,J:z/255};this.update()};fX.prototype.akk=function(x){var Q=this.n1,c=this.a_(parseInt(Q[0].h())/360),$=this.a_(parseInt(Q[1].h())/100),z=this.a_(parseInt(Q[2].h())/100);
this.Fo=d.Us(c,$,z);this.update()};fX.prototype.apl=function(x){var Q=this.K5,c=[];for(var F=0;F<4;F++){var $=this.afA(parseInt(Q[F].h()));
Q[F].U($);c.push($/100)}var z=d.i2(c);this.Fo={Z:z[0],r:z[1],J:z[2]};this.update(!0)};fX.prototype.abj=function(x){var Q=this.ME,c=parseInt(Q[0].h()),$=parseInt(Q[1].h()),z=parseInt(Q[2].h()),j=d.Ay(c,$,z);
this.Fo={Z:j.Z/255,r:j.r/255,J:j.J/255};this.update()};fX.prototype.FD=function(x){var Q;if(x.currentTarget==this.Ji)Q=this.Ji.h();
else{Q=x.currentTarget==this.ZJ?this.ZJ.h():this.q7.value;if(Q.charAt(0)=="#")Q=Q.slice(1);if(Q.length==3)Q=Q[0]+Q[0]+Q[1]+Q[1]+Q[2]+Q[2];
Q=d.az4(Q)}this.Fo=d.RD(Q,1);this.update()};fX.prototype.K6=function(x){this.ans();var Q=d.SD(this.Fo,1);
this.E5(Q);this.close();this.z4=!1;this.Fo=null};fX.prototype.lY=function(x){this.ans();if(this.fh)this.E5(d.SD(this.uj,1));
this.z4=!1;this.Fo=null};fX.prototype.ans=function(x){var Q=new jO(u.E.M,!0);Q.data={d:u.H.a10};this.T(Q)};
fX.prototype.Fy=function(x,Q){var c=dx.sc(x,Q);if(c!=null)this.Ji.U(c);if(Q!=ke.$s)return;if(this.Fo!=null){this.Fo=d.RD(c,1);
this.update()}};fX.prototype.BM=function(x,Q){var c=d.RD(Q.aW,1);if(this.Fo==null){var $=new jO(u.E.M,!0);
$.data={d:u.H.aK,Wu:"crosshair",push:!0};this.T($);this.Sm=!1;this.E5=Q._k;this.fh=!1;this.z4=Q.sh;this.uj=JSON.parse(JSON.stringify(c));
this.aaE.setAttribute("style","height:2.3em;background-color:#"+d.vg(Q.aW)+";")}this.Fo=c;this.update()};
fX.prototype.update=function(x){var Q=this.Fo,c=d.SD(Q,1);this.ZJ.U(d.vg(c));this.q7.value="#"+d.vg(c);
this.anT.setAttribute("style","height:2.3em;background-color:#"+d.vg(c)+";");var $=this._T;$[0].U(Math.round(Q.Z*255));
$[1].U(Math.round(Q.r*255));$[2].U(Math.round(Q.J*255));var z=d.a$(Q.Z,Q.r,Q.J);$=this.n1;$[0].U(Math.round(z.R0*360));
$[1].U(Math.round(z.ks*100));$[2].U(Math.round(z._B*100));var j=d.eC(Q.Z*255,Q.r*255,Q.J*255,this.aba);
$=this.ME;$[0].U(Math.round(j.xv));$[1].U(Math.round(j.V));$[2].U(Math.round(j.J));if(x==null){var U=d.ru([Q.Z,Q.r,Q.J]);
$=this.K5;$[0].U(Math.round(U[0]*100));$[1].U(Math.round(U[1]*100));$[2].U(Math.round(U[2]*100));$[3].U(Math.round(U[3]*100))}this.Ku.U(Q);
if(this.z4){this.E5(d.SD(this.Fo,1));this.fh=!0}};fX.prototype.afA=function(x){return Math.max(0,Math.min(100,x))};
fX.prototype.H9=function(x){return Math.max(0,Math.min(255,x))};fX.prototype.a_=function(x){return Math.max(0,Math.min(1,x))};
function fL(){j0.call(this,[11,2],"contoureditor");this.amo=null;this.yS=null;this.response=null;this.BN=E.p("div","cell");
this.body.appendChild(this.BN);this._1=E.p("div","cell padded");this.body.appendChild(this._1);var x=E.p("div","bordered padded vmargin");
this.BN.appendChild(x);this.XB=new ii(null,null,!0);this.XB.k(u.E.t,this.J5,this);x.appendChild(this.XB.n);
this.CH=E.wb(this,this._1);this.k("closebtn",this.ce,this)}fL.prototype=new j0;fL.prototype.K6=function(){this.close()};
fL.prototype._=function(){j0.prototype._.call(this);this.CH._();this.XB._()};fL.prototype.J5=function(x){this.yS.Crv.v=this.XB.h();
this.response(this.yS)};fL.prototype.ce=function(x){this.response(this.amo)};fL.prototype.BM=function(x,Q){this.amo=JSON.parse(JSON.stringify(Q.yY));
this.yS=Q.yY;this.response=Q.response;this.XB.U(this.yS.Crv.v)};function gG(){j0.call(this,[11,4],"duplinto");
this.yn=null;this.fD=null;this.$F=null;var x=E.p("div","form");x.setAttribute("style","max-width:26em");
this.body.appendChild(x);this.g9=new c7([12,43],["abc","def"]);this.g9.k(u.E.t,this.Z9,this);x.appendChild(this.g9.n);
E._X(x);this.O7=new c7([1,16,0],["abc","def"]);this.O7.k(u.E.t,this.Z9,this);x.appendChild(this.O7.n);
E._X(x);this.gB=new el([12,48],null,14);x.appendChild(this.gB.n);this.CH=E.wb(this,x)}gG.prototype=new j0;
gG.prototype.sD=function(){return!0};gG.prototype._=function(){j0.prototype._.call(this);this.CH._();
this.g9._();this.gB._()};gG.prototype.Z9=function(x){if(x&&x.target==this.O7)return;var Q=this.g9.h(),c=this.fD[Q],$=this.yn,z=c!=null&&c.add.artd!=null;
for(var F=0;F<$.g.length;F++)if($.B[$.g[F]].add.artb)z=!1;this.gB.vz(Q==this.fD.length);this.O7.vz(z);
if(z){var j=c.root.children,U=[],i=this.$F=[];for(var F=0;F<j.length;F++){var b=j[F].a;if(b.add.artb)U.push(b.getName());
i.push(j[F].index)}this.O7.yJ(U);this.O7.U(0)}else this.$F=null};gG.prototype.BM=function(x,Q,c){this.yn=x;
this.fD=c;this.gB.U(x.g.length==0?"Layer":x.B[x.g[0]].getName());var $=[];for(var F=0;F<c.length;F++){var z=c[F].name;
$.push(z.length<30?z:z.slice(0,27)+"...")}$.push([11,7]);this.g9.yJ($);this.g9.U(c.indexOf(x));this.Z9(null)};
gG.prototype.K6=function(x){var Q=this.g9.h();if(Q==this.fD.length){var c=new hf(this.gB.h()+".psd"),$=this.yn.m,z=this.yn.e,j=this.yn.lG();
if(j!=-1){var U=this.yn.B[j].Dd();$=U.m;z=U.e}c.m=$;c.e=z;c.buffer=d.R(c.m*c.e*4);var i=c.Xh();i.gF("Background");
c.Bd([i]);var b=new jO(u.E.M,!0);b.Oe=!0;b.data={d:u.H.th,Ta:c};this.T(b)}var k=this.yn.oU(null,this.yn!=this.fD[Q]),b=new jO(u.E.v,!0);
b.data={d:eM.nK,B:k,ov:this.yn,et:this.fD[Q]};if(this.$F)b.data.Mi=this.$F[this.O7.h()];b.f=X.Mf;b.Oe=!0;
this.T(b);this.close()};function kz(){j0.call(this,[1,9],"eassets");this.n$=null;this.w4=null;var x=this.body;
E.ZW(x,"form");x.style.width="32em";this.iV=new c_(null,["Layers","Combinations"]);this.iV.k(u.E.t,this.Og,this);
x.appendChild(this.iV.n);E.ix(x);this.xx=E.p("span");x.appendChild(this.xx);this.Lq=E.p("div");x.appendChild(this.Lq);
var Q=E.p("div"),c=E.p("div","flexrow");this.a5a=[Q,c];this.ng=[new f2("Only layers / folders, whose name starts with \"-e-\""),new f2("Remove parts outside the canvas"),new f2("Trim transparent parts")];
for(var F=0;F<3;F++){var $=this.ng[F];$.U(!0);$.k(u.E.t,this.Og,this);Q.appendChild($.n);E._X(Q)}this.JD=new cT([12,14,0],["1x","2x","3x","4x"]);
this.JD.U([!0,!1,!1,!1]);Q.appendChild(this.JD.n);var z=E.p("div");c.appendChild(z);var j=E.p("img");
j.setAttribute("src","img/nft.png");j.style.width="150px";c.appendChild(j);var U=E.p("span");U.textContent="File Names:";
z.appendChild(U);this.Qi=new cT(null,["1-0-1.XYZ","head1-eyes0-mouth1.XYZ","red-green-brown.XYZ"],!1,null,!0);
z.appendChild(this.Qi.n);this.Qi.U([!0,!1,!1]);E.ix(x);this.Fw=["PNG","JPG","SVG","TIFF","TGA"];this.m_=new c7([12,50],this.Fw);
this.m_.k(u.E.t,this.eJ,this);x.appendChild(this.m_.n);this.fL=new j4;x.appendChild(this.fL.n);this.CH=new j7([1,9],!0,null,!0);
this.CH.k("click",this.K6,this);x.appendChild(this.CH.n);this.k("closebtn",this.Mv,this)}kz.prototype=new j0;
kz.prototype.eJ=function(x){this.fL.zE(this.Fw[this.m_.h()],!1,!1,!1,this.w4.dV()!=null)};kz.prototype.Mv=function(x){this.w4=null};
kz.prototype._=function(){j0.prototype._.call(this);this.m_._();this.JD._();this.CH._();this.fL._()};
kz.prototype.BM=function(x,Q,c){this.w4=x;this.Og()};kz.prototype.Og=function(x){var Q=this.iV.h(),c;
E.Os(this.Lq);this.Lq.appendChild(this.a5a[Q]);if(Q==0){var $=this.acl();c=$.length+" exportable layers"}else{var $=this.a0S();
c=$[1]+" combinations ("+$[0].join(" \xD7 ")+")"}this.xx.textContent="- - - "+c;this.eJ(null)};kz.prototype.acl=function(){var x=this.ng[0].h(),Q=[],c=this.w4;
for(var F=0;F<c.B.length;F++){var $=c.B[F],z=$.getName();if(!x&&!$.Uy()&&!$.rect._6()||z.startsWith("-e"))Q.push(F)}return Q};
kz.prototype.a0S=function(){var x=this.w4,Q=x.root.children,c=[],$=1,z=[];for(var F=0;F<Q.length;F++){var j=Q[F],U=j.a;
if(U.Uy()){var i=j.children.length;c.push(i);$*=i;z.push(j.index)}U}return[c,$,z]};kz.prototype.Fy=function(x,Q){this.n$=x};
kz.prototype.K6=function(x){var Q=this.w4,c=this.iV.h(),$=[this.Fw[this.m_.h()]],z=[this.fL.h()],j={};
if(c==0){var U=this.JD.h(),i={},b=this.acl();if(b.length==0){alert("No layers to export.");return}var e=[this.ng[1].h(),this.ng[2].h()];
for(var F=0;F<b.length;F++){var k=b[F],K=Q.B[k],g=K.getName();if(i[g]!=null){i[g]++;g+=" "+i[g]}else i[g]=1;
var R=K.M5();K.KW(!0);for(var T=0;T<U.length;T++){if(!U[T])continue;var D=T+1,a=X.qV.ad_(Q,$,D,this.n$,k,z,e);
for(var _=0;_<$.length;_++){var I=$[_],f=g.slice(g.startsWith("-e-")?3:0)+(D==1?"":"@"+D+"x")+"."+I.toLowerCase();
if(a[_])j[f]=new Uint8Array(a[_])}}K.KW(R)}}else{var R=[];for(var F=0;F<Q.B.length;F++)R.push(Q.B[F].M5());
var y=this.a0S(),Z=y[0],b=y[2],v=[];function G(H,k,o,P){if(k==H.length){P.push(o.slice(0));return}var O=H[k];
for(var F=0;F<O;F++){o.push(F);G(H,k+1,o,P);o.pop(F)}}G(Z,0,[],v);var q=this.Qi.h().indexOf(!0);this.wm=[v,j,b,$,z,R,q,this.aAF.bind(this),0,0];
this.aAF();return}var h=UZIP.encode(j),r=new jO(u.E.M,!0);r.data={d:u.H.lm,data:h,name:"assets.zip"};
this.T(r)};kz.prototype.aAF=function(){var x=this.wm,Q=x[0],c=x[1],$=this.w4,z=x[2],j=x[3],U=x[4],i=x[5],b=x[6],e=x[7],k=0;
while(Q.length!=0&&k<1e3){var K=Date.now(),g=Q.shift(),R=[];for(var F=0;F<g.length;F++){var T=$.root.FV(z[F]);
for(var D=0;D<T.children.length;D++)T.children[D].a.KW(!1);var a=T.children[g[F]].a;R.push(b==2?a.getName():T.a.getName()+g[F]);
a.KW(!0)}$.c();$.eB();var _=(b==0?g:R).join("-")+"."+j[0].toLowerCase();c[_]=new Uint8Array(ar.jd($,j[0],$.m,$.e,U[0],this.n$));
x[8]++;x[9]+=c[_].length;k+=Date.now()-K}if(Q.length!=0){alert(x[8]+" done, "+cI.dc(x[9])+".",800);setTimeout(e,35);
return}for(var F=0;F<$.B.length;F++)$.B[F].KW(i[F]);$.c();var I=UZIP.encode(c),f=new jO(u.E.M,!0);f.data={d:u.H.lm,data:I,name:"assets.zip"};
this.T(f)};function a_(){j0.call(this,"Export Color Lookup Tables","exlut");this.n$=null;this.w4=null;
var x=E.p("div","form");x.setAttribute("style","width:20em");this.body.appendChild(x);this.ng=[new f0("Grid Points",1,256),new c_([12,50],[".CUBE"])];
var Q=[16,0];for(var F=0;F<this.ng.length;F++){var c=this.ng[F];c.U(Q[F]);c.parent=this;c.k(u.E.t,this.Og,this);
x.appendChild(c.n);E._X(x)}this.CH=E.wb(this,x);this.k("closebtn",this.Mv,this)}a_.prototype=new j0;
a_.prototype.OL=function(x,Q){if(Math.min(x.m,x.e)<16){alert("The document must be at least 16 x 16 pixels.",3200);
return!1}if(x.B.length<2){alert("There must be a background layer and some adjustment layers.",3200);
return!1}return!0};a_.prototype.Mv=function(x){this.w4=null};a_.prototype.Fy=function(x,Q){this.n$=x};
a_.prototype.BM=function(x,Q,c){this.w4=x};a_.prototype.K6=function(){var x=this.w4,Q=this.ng[0].h(),c=[],$=new gh(0,0,x.m,x.e),z=d.R(Q*Q*4),j=z.slice(0),U=new gh(x.m-Q>>>1,x.e-Q>>>1,Q,Q),i=x.B[0],b=i.buffer,e=i.rect;
i.rect=U;i.buffer=z;for(var k=0;k<Q;k++){this.a4$(Q,k,z);i.c(U);x.c(U);var K=x.VY();d.WK(K,$,j,U);for(var g=0;
g<Q;g++)for(var R=0;R<Q;R++){var T=g*Q+R<<2;c.push(j[T]/255,j[T+1]/255,j[T+2]/255)}}var D=hm.akE(c,Q,x.name);
hF.save(D,x.name.split(".")[0]+".CUBE");i.buffer=b;i.rect=e;i.c();x.c()};a_.prototype.a4$=function(x,Q,c){var $=255/(x-1),z=Math.round(Q*$);
for(var j=0;j<x;j++)for(var U=0;U<x;U++){var i=j*x+U<<2;c[i]=Math.round(U*$);c[i+1]=Math.round(j*$);
c[i+2]=z;c[i+3]=255}};a_.prototype._=function(){j0.prototype._.call(this);for(var F=0;F<this.ng.length;
F++)this.ng[F]._();this.CH._()};function kO(){j0.call(this,[1,14],"finfo");this.cK=null;this.xg=null;
this.eE=null;this.n5=E.p("div","form scrollable label12");this.n5.setAttribute("style","width:35em;  height:38em;  margin-bottom:8px");
this.body.appendChild(this.n5);var x=E.p("div","form");this.body.appendChild(x);this._c=new c7(null,["Hello"]);
x.appendChild(this._c.n);this.aAi=new j7("Add Parameter",!1,null,!0);x.appendChild(this.aAi.n);this.aAi.k("click",this._4,this);
this.dB=new j7("=== S A V E ===",!1,null,!0);x.appendChild(this.dB.n);this.dB.k("click",this.tc,this);
this.aw5=""}kO.prototype=new j0;kO.prototype.$O=function(x,Q){return x<450||Q<450?new bC(0,0):new bC(150,100)};
kO.prototype._4=function(x){if(this.eE.length==0)return;var Q=this.eE[this._c.h()],c=this.ct();c[Q]=be.sx[Q][0];
this.e0(c);this.xg[Q].n.scrollIntoView();this.xg[Q]._N()};kO.prototype.oI=function(x){var Q=this.ct();
delete Q[x.currentTarget.avn];this.e0(Q)};kO.prototype.tc=function(x){var Q=this.ct(),c=this.cK,$=!0;
for(var z in c)if(JSON.stringify(c[z])!=JSON.stringify(Q[z]))$=!1;for(var z in Q)if(JSON.stringify(c[z])!=JSON.stringify(Q[z]))$=!1;
if($)return;var j=new jO(u.E.v,!0);j.f=X.Mf;j.data={d:eM.yp,MV:Q};this.T(j);this.cK=Q;this.e0(Q)};kO.aBx=function(x){function Q(z){var j=z.toLowerCase();
return z==j}var c=x.split(":").pop();for(var $=1;$<c.length-1;$++){if(c[$]==c[$].toUpperCase()&&(Q(c[$+1])||Q(c[$-1]))){c=c.slice(0,$)+" "+c.slice($);
$++}}return c};kO.prototype.BM=function(x,Q){this.cK=x.hD;this.e0(x.hD)};kO.prototype.e0=function(x){var Q=this.n5,z=0;
E.Os(Q);var c=this.xg={},$=["tiff","exif","exif:GPS"],j=this.eE=[],U=[];for(var i in be.sx){var b=kO.aBx(i),e=0,k=15,K=null;
if(x[i]==null){if(be.sx[i].length!=1||i=="photoshop:Credit"||i=="photoshop:Source"){j.push(i);U.push(b)}continue}for(var F=0;
F<$.length;F++)if(i.startsWith($[F]))e=F;if(e!=z){E.ix(Q);z=e}if(i=="tiff:ImageDescription"||i=="dc:Keywords"){k=18.5;
K=3}var g=new el(b,null,k,K);c[i]=g;var R=x[i];if(R instanceof Array)R=R[1]==0?"---":R[0]+"/"+R[1];var T=new j7("\u2716",null,ah.get([5,4]));
Q.appendChild(T.n);T.k("click",this.oI,this);T.avn=i;g.U(R);Q.appendChild(g.n);E._X(Q);if(i=="exif:GPSLongitude"&&x["exif:GPSLatitude"]){this.aw5=kO.a70(x["exif:GPSLatitude"])+","+kO.a70(x["exif:GPSLongitude"]);
var D=new j7("Show on map",!1,null,!0);Q.appendChild(D.n);E._X(Q);D.k("click",this.a5L,this)}}this._c.yJ(U);
this._c.U(0)};kO.prototype.ct=function(){var x=this.xg,Q=be.sx,c={};for(var $ in Q){var z=Q[$][0],j=typeof z;
if(z==null||x[$]==null)continue;var U=x[$].h(),i="The value of \""+kO.aBx($)+"\" must ";if(j=="number"){U=parseFloat(U);
if(isNaN(U)){alert(i+"be a number.");U=z}}else if(z instanceof Array&&z.length==2){if(U.indexOf("/")==-1){alert(i+"be a fraction.");
U=z.slice(0)}else{U=U.split("/").map(parseFloat);if(isNaN(U[0])||isNaN(U[1])){U=z.slice(0)}}}c[$]=U}return c};
kO.a70=function(x){var Q=x.length,c=x.slice(0,Q-1).split(",").map(parseFloat),$=x.slice(Q-1),z=c[0]+c[1]/60+c[2]/3600;
if($!="N"&&$!="E")z=-z;return z};kO.prototype.a5L=function(x){window.open("https://maps.google.com?q="+this.aw5,"Map")};
function eI(){j0.call(this,[11,5],"gradienteditor");this.uj=null;this.Fo=null;this.b7=null;this.E5=null;
this.fh=!1;this.z4=!1;this.gT=null;this.RX=null;this.e2=-1;this.gJ=-1;this.jx=0;this.wW=this.TA.bind(this);
this.m7=this.wY.bind(this);this.GP=E.p("canvas");this.Yt=this.GP.getContext("2d");this.GP.setAttribute("style","display:block");
this.zj=null;E.J1(this.GP);E.KH(this.GP,this.VU.bind(this));this.zB=E.p("div","form");this.Pj=E.p("div");
this.eo=E.p("div","form");this.kG=E.p("div");this.fX=new c7([12,44],[[15,10,0],[24,6]]);this.fX.k(u.E.t,this.Aa,this);
this.body.appendChild(this.fX.n);E.ix(this.body);var x=this.zB;this.mf=new f0([19,3,3],0,100,"%");this.mf.k(u.E.t,this.Aa,this);
this.mf.parent=this;x.appendChild(this.mf.n);E._X(x);this.oR=new jz([12,0]);x.appendChild(this.oR.n);
this.ve=E.p("div","bordered padded noalign");x.appendChild(this.ve);this.j_=new f0([12,0],0,100,"%");
this.j_.parent=this;this.j_.k(u.E.t,this.Aa,this);this.ve.appendChild(this.j_.n);this.im=new f0([12,40],0,100,"%");
this.im.parent=this;this.im.k(u.E.t,this.Aa,this);this.ve.appendChild(this.im.n);this.rh=new j7([5,4],!1,null,!0);
this.rh.k("click",this.a36,this);this.ve.appendChild(this.rh.n);x.appendChild(this.Pj);this.aBi=new jz([13,0]);
x.appendChild(this.aBi.n);this._9=E.p("div","bordered padded noalign");x.appendChild(this._9);this.og=new c7([12,44],[[12,45],[12,46],[12,47]]);
this.og.k(u.E.t,this.Aa,this);this._9.appendChild(this.og.n);this.Gk=new hc(!0);this.Gk.parent=this;
this.Gk.k(u.E.t,this.Aa,this);this._9.appendChild(this.Gk.n);this.NY=new f0([12,40],0,100,"%");this.NY.parent=this;
this.NY.k(u.E.t,this.Aa,this);this._9.appendChild(this.NY.n);this.bE=new j7([5,4],!1,null,!0);this.bE.k("click",this.ari,this);
this._9.appendChild(this.bE.n);var x=this.eo;this.gP=new f0("Roughness",0,100,"%");this.gP.k(u.E.t,this.Aa,this);
this.gP.parent=this;x.appendChild(this.gP.n);x.appendChild(this.kG);this.Tr=new j7([25,1,2],!1,null,!0);
this.Tr.k("click",this.Aa,this);x.appendChild(this.Tr.n);this.CH=E.wb(this);this.k("closebtn",this.lY,this)}eI.prototype=new j0;
eI.prototype.lY=function(x){if(this.fh)this.E5(this.uj)};eI.prototype._=function(){j0.prototype._.call(this);
this.CH._();this.mf._();this.oR._();this.aBi._();this.rh._();this.bE._();this.j_._();this.im._();this.og._();
this.NY._();this.Tr._()};eI.prototype.Fy=function(x,Q){this.b7=x};eI.prototype.BM=function(x,Q){this.Fo=JSON.parse(JSON.stringify(Q.I));
this.uj=JSON.parse(JSON.stringify(Q.I));this.gT=this.RX=null;this.E5=Q._k;this.fh=!1;this.z4=Q.sh;this.Zi();
this.hT()};eI.prototype.K6=function(x){var Q=this.Fo;this.E5(Q);this.close()};eI.prototype.Da=function(x){return x==fM.Hm||x==fM.Z1};
eI.prototype.sM=function(x,Q,c,$){if($.S(fM.Hm)||$.S(fM.Z1)){if(this.RX)this.a36();if(this.gT)this.ari()}};
eI.prototype.a36=function(x){var Q=this.Fo.Trns.v;if(this.RX==null||Q.length==1)return;Q.splice(Q.indexOf(this.RX),1);
this.RX=null;this.Zi();this.hT()};eI.prototype.ari=function(x){var Q=this.Fo.Clrs.v;if(this.gT==null||Q.length==1)return;
Q.splice(Q.indexOf(this.gT),1);this.gT=null;this.Zi();this.hT()};eI.prototype.Zi=function(){var x=this.GP,Q=this.Yt,c=E.q_();
x.width=Math.floor(410*c);x.height=Math.floor(70*c);E.qJ(x,x.width,x.height);x.style.marginTop="8px";
this.zj=new gh(0,0,Math.floor(380*c),Math.floor(32*c));this.zj.x=Math.floor((x.width-this.zj.m)/2);this.zj.y=Math.floor((x.height-this.zj.e)/2);
var $=this.zj,z=$.m,j=$.e,U=$.x,i=$.y,b=new gh(0,0,z,j),e=Q.getImageData(0,0,z,j),k=new Uint8Array(e.data.buffer);
d.ma(k,z,j,8);var K=d.R(z*j*4);d.I.yV(this.Fo,K,b,[1/z,0,0,1/j],z/2,j/2,!1,0,this.b7.Gj,this.b7.QI);
d.l.UY("norm",K,$,k,$,$,1);Q.clearRect(0,0,x.width,x.height);Q.putImageData(e,U,i);var g=this.Fo;if(g.Clrs){var R=g.Trns.v,T=g.Clrs.v,D=d.I.rr(g,this.b7.Gj,this.b7.QI),a=Math.round(6*E.q_()),_=Math.round(14*E.q_()),I=this.RX?this.RX.v:null,f=this.gT?this.gT.v:null;
for(var F=0;F<R.length;F++){var y=R[F].v,Z=Math.round(255-255*y.Opct.v.val/100);if((y==I||R[F-1]&&R[F-1].v==I||F==this.gJ)&&F!=0){Q.fillStyle="#000000";
Q.fillRect(U-3+z*(R[F-1].v.Lctn.v+(y.Lctn.v-R[F-1].v.Lctn.v)*y.Mdpn.v/100)/4096,i-6-2,6,6)}if(y==I){Q.fillStyle="#ffffff";
Q.fillRect(U-a+z*(y.Lctn.v/4096)-2,i-2-_-2,2*a+4,_+4)}Q.fillStyle="rgb("+Z+","+Z+","+Z+")";Q.fillRect(U-a+z*(y.Lctn.v/4096),i-2-_,2*a,_)}for(var F=0;
F<T.length;F++){var v=T[F].v,G=D[0][F][0];if((v==f||T[F-1]&&T[F-1].v==f||F==this.e2)&&F!=0){Q.fillStyle="#000000";
Q.fillRect(U-3+z*(T[F-1].v.Lctn.v+(v.Lctn.v-T[F-1].v.Lctn.v)*v.Mdpn.v/100)/4096,i+j+2,6,6)}if(v==f){Q.fillStyle="#ffffff";
Q.fillRect(U-a+z*(v.Lctn.v/4096)-2,i+j+2-2,2*a+4,_+4)}Q.fillStyle="rgb("+Math.round(G.Z)+", "+Math.round(G.r)+","+Math.round(G.J)+")";
Q.fillRect(U-a+z*(v.Lctn.v/4096),i+j+2,2*a,_)}}if(this.z4){this.E5(this.Fo);this.fh=!0}};eI.prototype.hT=function(){var x=this.Fo,Q=x.Clrs?0:1;
this.fX.U(Q);if(E.rm(this.zB))this.body.removeChild(this.zB);if(E.rm(this.eo))this.body.removeChild(this.eo);
(Q==0?this.Pj:this.kG).appendChild(this.GP);if(Q==0){this.body.appendChild(this.zB);this.mf.U(Math.round(100*x.Intr.v/4096));
var c=x.Trns.v,$=x.Clrs.v,z=this.RX!=null,j=this.gJ!=-1;this.j_.vz(z);this.im.vz(z||j);this.rh.vz(z);
if(z){this.ve.setAttribute("style","");var U=this.RX.v;this.im.U(Math.round(100*U.Lctn.v/4096));this.j_.U(U.Opct.v.val)}if(j)this.im.U(c[this.gJ].v.Mdpn.v);
var z=this.gT!=null,j=this.e2!=-1;this.og.vz(z);this.Gk.vz(z);this.NY.vz(z||j);this.bE.vz(z);if(z){this._9.setAttribute("style","");
var i=this.gT.v;this.NY.U(Math.round(100*i.Lctn.v/4096));var b=i.Type.v.Clry;this.og.U(["FrgC","BckC","UsrS"].indexOf(b));
if(b=="FrgC")this.Gk.wC(this.b7.Gj);if(b=="BckC")this.Gk.wC(this.b7.QI);if(b=="UsrS")this.Gk.U(i.Clr.v)}if(j)this.NY.U($[this.e2].v.Mdpn.v)}else{this.body.appendChild(this.eo);
this.gP.U(Math.round(100*x.Smth.v/4096))}this.body.appendChild(this.CH.n)};eI.prototype.Aa=function(x){var Q=this.Fo,c=Q.Clrs?0:1;
if(x.target==this.fX){var $=c==0?JSON.parse(aF.Q5.aCQ).v:fK.$H("grdm").Grad.v;this.Fo=$;this.hT();this.Zi();
return}if(c==0){Q.Intr.v=Math.round(4096*this.mf.h()/100);var z=Q.Trns.v,j=Q.Clrs.v;if(this.RX!=null){var U=this.RX.v;
U.Lctn.v=Math.round(4096*(this.im.h()/100));U.Opct.v.val=this.j_.h()}if(this.gT!=null){var i=this.gT.v;
i.Lctn.v=Math.round(4096*(this.NY.h()/100));if(x.target==this.Gk)this.og.U(2);var b=this.og.h();i.Type.v.Clry=["FrgC","BckC","UsrS"][b];
if(b==2)i.Clr={t:"Objc",v:this.Gk.h()};else if(i.Clr)delete i.Clr}if(this.gJ!=-1)z[this.gJ].v.Mdpn.v=this.im.h();
if(this.e2!=-1)j[this.e2].v.Mdpn.v=this.NY.h()}else{Q.Smth.v=Math.round(4096*this.gP.h()/100);if(x.target==this.Tr)Q.RndS.v=Math.floor(Math.random()*4294967295)}this.Zi()};
eI.prototype.VU=function(x){var Q=E.GK(x,this.GP),c=this.zj,$=(Q.x*E.q_()-c.x)/c.m,z=(Q.y*E.q_()-c.y)/c.e,j=this.Fo.Trns.v,U=this.Fo.Clrs.v,i=null,b=null,e=-1,k=-1;
if(z<1)for(var F=0;F<j.length;F++){var K=j[F].v;if(Math.abs(K.Lctn.v/4096-$)<.02)i=j[F];if(F>0)if(Math.abs((j[F-1].v.Lctn.v+(K.Lctn.v-j[F-1].v.Lctn.v)*K.Mdpn.v/100)/4096-$)<.01)e=F}if(z>0)for(var F=0;
F<U.length;F++){var g=U[F].v;if(Math.abs(g.Lctn.v/4096-$)<.02)b=U[F];if(F>0)if(Math.abs((U[F-1].v.Lctn.v+(g.Lctn.v-U[F-1].v.Lctn.v)*g.Mdpn.v/100)/4096-$)<.01)k=F}if(b==null&&i==null&&e==-1&&k==-1){if(z<0){var K={t:"Objc",v:{classID:"TrnS",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Lctn:{t:"long",v:0},Mdpn:{t:"long",v:50}}};
K.v.Lctn.v=Math.round($*4096);j.push(K);j.sort(this.iY);i=K}if(z>1){var U=this.Fo.Clrs.v,R=d.I.rr(this.Fo,this.b7.Gj,this.b7.QI),T=d.I.uw(this.Fo,R,$),g={t:"Objc",v:{classID:"Clrt",Clr:{t:"Objc",v:d.I.lV({Z:T&255,r:T>>8&255,J:T>>16&255})},Type:{t:"enum",v:{Clry:"UsrS"}},Lctn:{t:"long",v:0},Mdpn:{t:"long",v:50}}};
g.v.Lctn.v=Math.round($*4096);U.push(g);U.sort(this.iY);b=g}}if(b!=null)k=-1;if(i!=null)e=-1;if(b!=null||i!=null||e>-1||k>-1){this.RX=i;
this.gT=b;this.gJ=e;this.e2=k;this.hT();this.Zi();E.d3(window,this.wW);E.AU(window,this.m7)}};eI.prototype.TA=function(x){var Q=E.GK(x,this.GP),c=this.zj,$=(Q.x*E.q_()-c.x)/c.m,z=(Q.y*E.q_()-c.y)/c.e;
$=Math.max(0,Math.min(1,$));var j=this.Fo.Trns.v,U=this.Fo.Clrs.v;if(this.RX!=null){var i=this.RX.v;
i.Lctn.v=Math.round(4096*$);var b=j.indexOf(this.RX);if(b!=-1&&z<-1&&j.length>1)j.splice(b,1);if(b==-1&&z>-1)j.push(this.RX);
j.sort(this.iY)}if(this.gT!=null){var e=this.gT.v;e.Lctn.v=Math.round(4096*$);var k=U.indexOf(this.gT);
if(k!=-1&&z>2&&U.length>1)U.splice(k,1);if(k==-1&&z<2)U.push(this.gT);U.sort(this.iY)}if(this.gJ>-1){var i=j[this.gJ].v;
i.Mdpn.v=Math.max(5,Math.min(95,Math.round(100*($*4096-j[this.gJ-1].v.Lctn.v)/(i.Lctn.v-j[this.gJ-1].v.Lctn.v))))}if(this.e2>-1){var e=U[this.e2].v;
e.Mdpn.v=Math.max(5,Math.min(95,Math.round(100*($*4096-U[this.e2-1].v.Lctn.v)/(e.Lctn.v-U[this.e2-1].v.Lctn.v))))}if(this.RX!=null||this.gT!=null||this.gJ>-1||this.e2>-1){this.hT();
this.Zi()}};eI.prototype.wY=function(x){E.hY(window,this.wW);E.Wr(window,this.m7);if(Date.now()-this.jx<300){if(this.e2!=-1||this.gJ!=-1){var Q=(this.e2!=-1?this.Fo.Clrs.v[this.e2]:this.Fo.Trns.v[this.gJ]).v;
Q.Mdpn.v=50;this.hT();this.Zi()}else if(this.gT!=null)this.Gk.Oc()}this.jx=Date.now()};eI.prototype.iY=function(x,Q){return x.v.Lctn.v-Q.v.Lctn.v};
function ic(x){j0.call(this,x=="isize"?[11,10]:[11,3],x);this.a3Y=x;var Q=E.p("div","form");Q.setAttribute("style","width:20em; margin-bottom:1em; margin-top:-1em;");
this.body.appendChild(Q);var c=x=="csize";this.abz=new jz("Hi");Q.appendChild(this.abz.n);E._X(Q);this.jq=new hh(!0,!0,c,c,!0);
if(c)this.jq.axe(!1);Q.appendChild(this.jq.n);this.rZ=new f2([12,25,3]);this.rZ.U(!0);this.rZ.k(u.E.t,this.amq,this);
this.Vl=new c7(null,[[12,14,2],[12,14,3],[12,14,4]]);this.Vl.U(1);this.RB=new iS([12,23,2],41);this.RB.U(4);
if(x=="isize"){Q.appendChild(this.rZ.n);Q.appendChild(this.Vl.n)}else Q.appendChild(this.RB.n);this.CH=E.wb(this,this.body)}ic.prototype=new j0;
ic.prototype.OL=function(x,Q){return x!=null};ic.prototype.sD=function(){return!0};ic.prototype.Da=function(x){return this.a3Y=="isize"?!1:[fM.h3,fM.Eq,fM.xc,fM.Cn].indexOf(x)!=-1};
ic.prototype.sM=function(x,Q,c,$){if($.S(fM.ln))this.K6();this.RB.avf($.um())};ic.prototype._=function(){j0.prototype._.call(this);
this.jq._();this.rZ._();this.Vl._();this.RB._();this.CH._()};ic.prototype.K6=function(x){var Q=this.jq.h(),c=Q.x,$=Q.y,z=new jO(u.E.G2,!0),j=this.jq.Ir.h();
if(this.a3Y=="csize"){if(j){var U=this.jq.l3,i=this.jq.nk;c=i.x-U.x;$=i.y-U.y}z.data=X.r7.an2(c,$,this.RB.h(),j)}else{var b=this.Vl.h();
if(!this.rZ.h())b=null;z.data=X.r7.axP(c,$,this.jq.ne(),b)}this.close();this.T(z)};ic.prototype.BM=function(x,Q){this.jq.U(new bC(x.m,x.e),x.cQ);
this.jq._N();this.abz.U(ah.get(this.MW)+": "+(x.m*x.e/1e6).toFixed(2)+" MPx")};ic.prototype.amq=function(x){var Q=this.rZ.h(),c=this.jq,$=this.Vl;
if(Q)$.bJ();else $.hp();c.aAy(Q)};function fl(){j0.call(this,"Import RAW","importraw");var x=E.p("div","flexrow"),Q=E.p("div");
Q.setAttribute("style","margin-bottom: 1em");this.body.appendChild(x);this.body.appendChild(Q);var c=E.p("div","form");
c.setAttribute("style","width:18em");x.appendChild(c);var $=E.p("div","form");$.setAttribute("style","width:15em");
x.appendChild($);this.NZ=null;this.hf=null;this.dr=null;this.DB=null;this.aCU=[];var z=[];for(var F=0;
F<fl.y$.length;F++)z.push(fl.y$[F]+" Bits");var j=this.wm=[new hh(!0,null,null,!0),new f0([12,72],1,8),new f2("Last one is Transparency"),new c_([12,34],z),new c_("Byte Order",["12-34","34-12"]),new c7("Guesses",[])];
for(var F=0;F<j.length;F++){var U=j[F];U.parent=this;U.k(u.E.t,F==5?this.at9:this.Z9,this);var i=F==0?c:F==5?Q:$;
i.appendChild(U.n)}this.GP=E.p("canvas");this.Yt=this.GP.getContext("2d");this.body.appendChild(this.GP);
this.CH=E.wb(this,this.body)}fl.prototype=new j0;fl.prototype._=function(){j0.prototype._.call(this);
var x=this.wm;this.CH._();for(var F=0;F<x.length;F++)x[F]._()};fl.prototype.K6=function(x){this.close();
var Q=this.wm[0].h(),c=ar.$E(this.hf,[{data:this.dr,K$:new gh(0,0,Q.x,Q.y)}]);if(this.DB)c.fG=this.DB;
var $=new jO(u.E.M,!0);$.data={d:!0?u.H.th:u.H.Wk,Ta:c};this.T($)};fl.y$=[8,16];fl.prototype.BM=function(x,Q){this.NZ=new Uint8Array(Q.Xp);
this.hf=Q.uo;var c=this.NZ.length,$=[1,3,4],z=0,j=0,U=1,i=1,b=this.aCU=[],e=Math.round(Math.sqrt(c)*2);
e=Math.max(e,4e3);for(var k=0;k<3;k++){for(var K=0;K<2;K++){var g=fl.y$[K],R=$[k],T=R*g,D=Math.round(c*8/T);
if(D!=c*8/T)continue;for(var a=0;a<=e;a++)for(var _=0;_<=e;_++)if(a*_==D){var I=0;if(a==_)I+=64;if(Math.round(a/100)==a/100&&Math.round(_/100)==_/100)I+=32;
if(Math.round(a/10)==a/10&&Math.round(_/10)==_/10)I+=16;if(Math.round(a/2)==a/2&&Math.round(_/2)==_/2)I+=8;
b.push([a,_,R,g,I])}}}var f=function(G,q){if(q[4]!=G[4])return q[4]-G[4];var h=Math.max(G[0],G[1])/Math.min(G[0],G[1]),r=Math.max(q[0],q[1])/Math.min(q[0],q[1]);
if(h!=r)return h-r;return q[0]-G[0]};b.sort(f);var y=this.wm,Z=[];for(var F=0;F<b.length;F++){var v=b[F];
Z.push(v[0]+" x "+v[1]+", "+v[2]+"ch, "+v[3]+"-bit")}y[5].yJ(Z);y[5].U(0);this.at9(null)};fl.prototype.at9=function(x){var Q=this.wm,c=this.aCU[this.wm[5].h()];
Q[0].U(new bC(c[0],c[1]),72);Q[1].U(c[2]);Q[3].U(fl.y$.indexOf(c[3]));this.Z9()};fl.prototype.Z9=function(x){var Q=this.wm,c=Q[0].h(),$=c.x,z=c.y,j=fl.y$[Q[3].h()],U=this.NZ;
if(j==16&&Q[4].h()==1){U=U.slice(0);for(var F=0;F<U.length;F+=2){var i=U[F];U[F]=U[F+1];U[F+1]=i}}var b=this.dr=this.fk(U,$,z,Q[1].h(),j,Q[2].h()),e=this.GP,k=this.Yt,K=[b,new gh(0,0,$,z)];
d.gk(K);for(var F=0;F<K.length;F+=2)if(K[F+1].e<300){b=K[F];$=K[F+1].m;z=K[F+1].e;break}e.width=$;e.height=z;
E.qJ(e,$,z);var g=new ImageData(new Uint8ClampedArray(b.buffer),$,z);k.putImageData(g,0,0)};fl.prototype.fk=function(x,Q,c,$,z,j){this.DB=null;
var U=[],i=Q*c;for(var b=0;b<$;b++){var e=d.R(i);U.push(e);if(z==8)for(var F=0;F<i;F++)e[F]=x[F*$+b];
else if(z==16)for(var F=0;F<i;F++)e[F]=Math.round((x[(F*$+b)*2]<<8|x[(F*$+b)*2+1])*(255/65535))}var k=d.R(i*4);
new Uint32Array(k.buffer).fill(4278190080);if(j){d.Dm(U.pop(),k,3);$--}if($==0){}else if($==1)d.ZM(U[0],k);
else{d.Dm(U[0],k,0);d.Dm(U[1],k,1);if($>2){d.Dm(U[2],k,2);if($>3){this.DB=[];for(var F=3;F<$;F++){var K=new eM.zM;
K.name="Alpha "+(F-2);K.rect=new gh(0,0,Q,c);K.channel=U[F];this.DB.push(K)}}}}return k};function kI(x,Q,c){kw.call(this);
this.n=E.p("div","");this.hg=x;this.no=null;this.KM=Q==null?!1:Q;this.Id=null;this.Dj=c;this.Mw=[];this.C1=[];
this.bR=[];this.cN=[];this.sj=0;this.no=this.akZ(kI.cN[x]);this.bN();this.OY=null;this.ae5;this.ak4}kI.prototype=new kw;
kI.prototype.Eu=function(x,Q,c,$,z){this.OY=z;this.ae5=JSON.parse(JSON.stringify(this.Id));if(this.no.lagl)this.ak4=this.no.lagl.h()[0]};
kI.prototype.CK=function(x,Q,c,$,z){var j=this.OY,U=this.hg,i=this.ae5;if(j==null)return;var b=(z.x-j.x)/x.Q.W,e=(z.y-j.y)/x.Q.W;
if(U=="GrFl"){var k=JSON.parse(JSON.stringify(i.Ofst.v));k.Hrzn.v.val+=b*.5;k.Vrtc.v.val+=e*.5;this.no.Ofst.U(k,!0)}if(U=="patternFill"){var k=JSON.parse(JSON.stringify(i.phase.v));
k.Hrzn.v+=b;k.Vrtc.v+=e;this.no.phase.U(k,!0)}if(U=="DrSh"||U=="IrSh"||U=="ChFX"){var K=i.Dstn.v.val,g=this.ak4*Math.PI/180,R=-Math.cos(g)*K+b,T=Math.sin(g)*K+e;
this.no.Dstn.U(Math.sqrt(R*R+T*T),!0);this.no.lagl.U([Math.atan2(T,-R)*180/Math.PI],!0)}};kI.prototype.km=function(x,Q,c,$,z){this.OY=null};
kI.prototype.ajZ=function(){for(var F=0;F<this.cN.length;F++){E.WP(this.cN[F],"selected");if(this.bR[F]instanceof f2)this.bR[F].U(!1)}};
kI.prototype.awd=function(x){var Q=this.a9C.bind(this);for(var F=0;F<this.bR.length;F++){var c=E.p("div","listitem");
this.cN.push(c);if(F>0)c.textContent="\u2003";c.appendChild(this.bR[F].n);if(aF.atS.indexOf(this.hg)!=-1){var $=new j7("+");
$.Lm();$.n.style.float="right";c.appendChild($.n);var z=new j7("\u2B0D");z.Lm();z.n.style.float="right";
z.n.style["margin-right"]="2px";c.appendChild(z.n)}c.addEventListener("click",Q,!1);x.appendChild(c)}};
kI.By=function(x,Q){var c=Q.getBoundingClientRect();return(x.clientY-c.top)/c.height};kI.prototype.a9C=function(x){var Q=x.target.tagName.toLowerCase();
if(Q=="input"){return}if(Q=="button"){var c=new jO(u.E.v,!0),$=x.target.textContent=="+",z=$?0:kI.By(x,x.target)<.5?-1:1;
if($)c.data={d:"st_dupsingle",a:this.parent.data.a,qM:this.Dj};else c.data={d:"st_movsingle",a:this.parent.data.a,qM:this.Dj,agi:z};
c.f=X.vR;c.Oe=!0;this.T(c);c=new jO("redrawall",!0);c.data={agi:z};this.T(c);return}E.ce(x);this.c$();
this.sj=this.cN.indexOf(x.currentTarget);this.T(new jO("showme"))};kI.prototype.c$=function(){if(this.no.enab&&this.no.enab.h()==!1)this.MX({Wm:"enab",b:!0})};
kI.prototype.awp=function(){var x=this.cN[this.sj];if(x)E.ZW(x,"selected");return this.C1[this.sj]};
kI.prototype.akZ=function(x){var Q={};for(var F=0;F<x.length;F++){var c=x[F],$=null;if(c=="----")$={n:E.p("hr")};
if(c=="\n")$={n:E.p("br")};if(c=="blOptions")$=new jz([14,10]);if(c=="brst")$=new cT([12,72],["R","G","B"]);
if(c=="knko")$=new c7("Knockout",[[13,1,0],"Shallow","Deep"]);if(c=="enab")$=new f2(aF.names[aF.order.indexOf(this.hg)]);
if(c=="lrMd"||c=="Md")$=new c7([12,19,0],cq.o_,cq.nW);if(c=="Opct")$=new bf([12,0],0,100,"%");if(c=="iOpa")$=new bf([12,26],0,100,"%");
if(c=="blIf")$=new km;if(c=="ShdN")$=new bf([12,68],0,100,"%");var z=this.hg=="St3D"&&c=="lagl";if(c=="lagl"||c=="Angl")$=new iF(z?"Light":[12,15],this.hg=="ebbl"||z);
if(c=="uglg")$=new f2([12,27]);if(c=="Dstn")$=new bf([12,28],0,200,"px");if(c=="Ckmt")$=new bf([12,29],0,100,"%");
if(c=="Srnk")$=new bf("Shrink",0,100,"%");if(c=="Drkn")$=new bf("Darken",0,100,"%");if(c=="blur")$=new bf([12,14,0],0,200,"px");
if(c=="TrnS"||c=="MpgS")$=new db([12,21]);if(c=="Nose")$=new bf([12,30],0,100,"%");if(c=="layerConceals")$=new f2([12,31]);
if(c=="Cntn")$=new f2([12,25,4]);if(c=="AntA"||c=="antialiasGloss")$=new f2([12,25,1]);if(c=="GlwT")$=new c7([12,32],aF.mJ.names);
if(c=="glwS")$=new c7([12,70],aF.mJ.ay_);if(c=="Inpr")$=new bf([12,12],1,100,"%");if(c=="bvlS")$=new c7([12,22],aF.W6.style);
if(c=="bvlT")$=new c7([12,32],aF.W6.abi);if(c=="bvlD")$=new c7(null,aF.W6.dir);if(c=="srgR")$=new bf([12,34],0,1e3,"%");
if(c=="Sftn")$=new bf([12,35],0,20,"px");if(c=="Lald")$=Q.lagl;if(c=="hglM"||c=="sdwM")$=new c7([12,36],cq.o_,cq.nW);
if(c=="hglC"||c=="sdwC")$=new hc;if(c=="hglO"||c=="sdwO")$=new bf([12,0],0,100,"%");if(c=="Invr"||c=="InvT")$=new f2([4,11]);
if(c=="overprint")$=new f2("Overprint");if(c=="Sz")$=new bf([12,14,0],1,200,"px");if(c=="Styl")$=new c7([12,40],aF.stroke.names);
if(c=="PntT")$=new c7([12,66],aF.stroke.aoK);if(c=="Clr")$=new hc(!0);if(c=="Grad"){$=new eF(!0,[12,37],!0);
$.U(JSON.parse(aF.Q5.a9Q).v)}if(c=="Rvrs")$=new f2([12,23,0]);if(c=="Dthr")$=new f2([12,23,3]);if(c=="Type")$=new c7([12,22],aF.I.names.slice(0,this.hg=="FrFX"?6:5));
if(c=="Ptrn")$=new bh([12,62]);if(c=="Scl")$=new bf([12,38],5,500,"%",0,!0);if(c=="Algn")$=new f2([12,39]);
if(c=="Ofst")$=new eq(!0);if(c=="phase")$=new eq(!1);if(c=="useShape")$=new f2([12,21]);if(c=="useTexture")$=new f2([12,67]);
if(c=="textureDepth")$=new bf([12,34],-300,300,"%");var j=c=="----"||c=="\n"?c+F:c;if($!=null)Q[j]=$}return Q};
kI.prototype.aqg=function(x){var Q=this.C1[this.sj];for(var F=0;F<x.length;F++){var c=this.no[x[F]];
if(c&&Q.contains(c.n))Q.removeChild(c.n)}};kI.prototype.ayR=function(x){var Q=this.C1[this.sj];for(var F=0;
F<x.length;F++){var c=this.no[x[F]];if(c&&!Q.contains(c.n))Q.appendChild(c.n)}};kI.prototype.Fy=function(x,Q){if(this.no==null)return;
var c=Q==ke.m6;if(this.no.Grad){this.no.Grad.uq(x.Gj,x.QI);if(c||Q==ke.$s||Q==ke.L7)this.no.Grad.RN(x.Op)}if(this.no.Ptrn){if(c||Q==ke.qL)this.no.Ptrn.RN(x.Yf)}if(this.no.TrnS){if(c||Q==ke.qY)this.no.TrnS.RN(x.fc)}if(this.no.MpgS){if(c||Q==ke.qY)this.no.MpgS.RN(x.fc)}};
kI.prototype._=function(){for(var F=0;F<this.Mw.length;F++)this.Mw[F]._();for(var x in this.no)if(this.no[x]instanceof kw)this.no[x]._()};
kI.prototype.bN=function(){for(var x in this.no){var Q=this.no[x];Q.parent=this;if(Q instanceof kw)Q.k(u.E.t,this.aBK,this);
if(this.C1.length==0||x=="useShape"||x=="useTexture"){var c=new jz(Q.am6()),$=E.p("div","bordered padded");
if(this.KM==!1){$.appendChild(c.n);$.appendChild(E.p("hr",""))}this.Mw.push(c);this.C1.push($);this.bR.push(Q)}else this.C1[this.C1.length-1].appendChild(Q.n)}};
kI.prototype.update=function(x,Q){if(this.no==null)return;this.Id=JSON.parse(JSON.stringify(Q));for(var c in Q){if("Opct iOpa hglO sdwO Dstn Ckmt Srnk Drkn blur Nose Scl Sz Inpr srgR Sftn textureDepth ShdN".split(" ").indexOf(c)!=-1)this.no[c].U(Q[c].v.val);
if("enab brst knko Clr hglC sdwC uglg Grad TrnS MpgS Rvrs Dthr Algn Invr InvT overprint Ptrn layerConceals Cntn useShape useTexture Ofst phase blIf".split(" ").indexOf(c)!=-1){this.no[c].U(Q[c].v,x)}if(["Md","hglM","sdwM"].indexOf(c)!=-1)this.no[c].U(cq.hg.indexOf(Q[c].v.BlnM));
if(c=="lrMd"){var $=(Q.Uy?[[15,10,27]]:[]).concat(cq.o_),z=(Q.Uy?[1]:[]).concat(cq.nW);this.no[c].yJ($,z);
this.no[c].U(Q[c].v)}if(c=="Angl")this.no[c].U([Q[c].v.val]);if(c=="lagl"){var j=Q.uglg&&Q.uglg.v?x.FO():Q.lagl.v.val;
this.no[c].U([j])}if(c=="Lald"){var j=Q.uglg&&Q.uglg.v?x.dG():Q.Lald.v.val;this.no[c].U([null,j])}if(c=="Type")this.no[c].U(aF.I.types.indexOf(Q.Type.v.GrdT));
if(c=="Styl")this.no[c].U(aF.stroke.types.indexOf(Q.Styl.v.FStl));if(c=="PntT"){var U=aF.stroke.v7.indexOf(Q.PntT.v.FrFl);
this.no[c].U(U);if(!this.KM){this.aqg(aF.ZS.concat(aF.ul.concat(aF.qK)));this.ayR([aF.ZS,aF.ul,aF.qK][U])}}if(c=="GlwT")this.no[c].U(aF.mJ.types.indexOf(Q.GlwT.v.BETE));
if(c=="glwS")this.no[c].U(aF.mJ.att.indexOf(Q.glwS.v.IGSr));if(c=="bvlS")this.no[c].U(aF.W6.types.indexOf(Q.bvlS.v.BESl));
if(c=="bvlT")this.no[c].U(aF.W6.ao3.indexOf(Q.bvlT.v.bvlT));if(c=="bvlD")this.no[c].U(["In","Out"].indexOf(Q.bvlD.v.BESs))}};
kI.prototype.aBK=function(x){for(var Q in this.no){if(this.no[Q]!=x.target)continue;var c=null,$=!1;
if("Opct iOpa Srnk Drkn hglO Nose Scl sdwO Inpr srgR textureDepth ShdN".split(" ").indexOf(Q)!=-1)c={type:"#Prc",val:x.target.h()};
if(["Dstn","Ckmt","blur","Sz","Sftn"].indexOf(Q)!=-1)c={type:"#Pxl",val:x.target.h()};if(["Angl","lagl"].indexOf(Q)!=-1)c={type:"#Ang",val:x.target.h()[0]};
if("enab brst knko Clr hglC sdwC Grad TrnS MpgS Rvrs Dthr Algn Invr InvT overprint Ptrn layerConceals Cntn lrMd useShape useTexture AntA antialiasGloss Ofst phase blIf".split(" ").indexOf(Q)!=-1)c=x.target.h();
if(["Md","hglM","sdwM"].indexOf(Q)!=-1)c={BlnM:cq.hg[x.target.h()]};if(Q=="uglg"){c=x.target.h();$=!0}if(Q=="PntT"){c={FrFl:aF.stroke.v7[x.target.h()]};
$=!0}if(Q=="Lald")c={type:"#Ang",val:x.target.h()[1]};if(Q=="Type")c={GrdT:aF.I.types[x.target.h()]};
if(Q=="Styl")c={FStl:aF.stroke.types[x.target.h()]};if(Q=="GlwT")c={BETE:aF.mJ.types[x.target.h()]};
if(Q=="glwS")c={IGSr:aF.mJ.att[x.target.h()]};if(Q=="bvlS")c={BESl:aF.W6.types[x.target.h()]};if(Q=="bvlT")c={bvlT:aF.W6.ao3[x.target.h()]};
if(Q=="bvlD")c={BESs:["In","Out"][x.target.h()]};this.MX({Wm:Q,b:c});if($){if(this.KM)this.update(null,this.Id);
else{var z=this.parent,j=z.Ta,U=this.Dj,i=j.B[z.data.a].add.lmfx[aF.mh[U[0]]].v[U[1]].v;this.update(j,i)}}}};
kI.prototype.MX=function(x){if(this.Id&&this.Id[x.Wm])this.Id[x.Wm].v=x.b;if(this.KM){this.T(new jO(u.E.t))}else{x.d="changeprop";
x.a=this.parent.data.a;x.xR=this.Dj;var Q=new jO(u.E.v,!0);Q.data=x;Q.f=X.vR;Q.Oe=!0;this.T(Q);this.T(new jO("afterchange",!0))}};
kI.prototype.h=function(){return JSON.parse(JSON.stringify(this.Id))};kI.cN={bops:"blOptions lrMd Opct ---- iOpa brst ---- blIf".split(" "),DrSh:"enab Md Clr Opct lagl uglg Dstn Ckmt blur TrnS Nose layerConceals Cntn".split(" "),St3D:"enab Md Clr Opct Angl Dstn Srnk ---- lagl Lald uglg Drkn".split(" "),IrSh:"enab Md Clr Opct lagl uglg Dstn Ckmt blur TrnS Nose".split(" "),OrGl:["enab","Md","Opct","Nose","\n","Clr","Grad","----","GlwT","Ckmt","blur","TrnS","Inpr","ShdN"],IrGl:["enab","Md","Opct","Nose","\n","Clr","Grad","----","GlwT","glwS","Ckmt","blur","TrnS","Inpr","ShdN"],ebbl:["enab","bvlS","bvlT","bvlD","srgR","blur","Sftn","----","lagl","Lald","uglg","TrnS","\n","hglM","hglC","hglO","sdwM","sdwC","sdwO","useShape","MpgS","Inpr","useTexture","Ptrn","Scl","textureDepth","InvT","Algn","phase"],SoFi:["enab","Md","Opct"].concat(aF.ZS),GrFl:["enab","Md","Opct"].concat(aF.ul),patternFill:["enab","Md","Opct"].concat(aF.qK),ChFX:"enab Md Clr Opct lagl Dstn blur MpgS Invr".split(" "),FrFX:["enab","Sz","Styl","\n","Md","Opct","overprint","\n","PntT","\n"].concat(aF.ZS.concat(aF.ul.concat(aF.qK)))};
function kF(){j0.call(this,[11,6],"layerstyle");this.a0t=-1;this.data={};this.Ta=null;this.n$=null;this.o9=[];
this.ON=[];E.ZW(this.body,"flexrow");this.BN=E.p("div","bordered");this.BN.setAttribute("style","min-width:13em;");
this.body.appendChild(this.BN);this.ue=E.p("div","");this.ue.setAttribute("style","width:25em; padding-left: 1em;");
this.body.appendChild(this.ue);this._1=E.p("div","form");this._1.setAttribute("style","padding-left: 1em; width:7em;");
this.body.appendChild(this._1);this.CH=E.wb(this,this._1);this.dF=new j7([12,87],!0,null,!0);this.dF.k("click",this.alz,this);
this._1.appendChild(this.dF.n);this.J9=new jV;this.J9.parent=this;this.J9.k(u.E.t,this.arx,this);this._1.appendChild(this.J9.n);
this.k("closebtn",this.lY,this);this.k("redrawall",this.agC,this)}kF.prototype=new j0;kF.prototype.sD=function(){return!0};
kF.prototype.W9=function(){return!0};kF.prototype.Eu=function(x,Q,c,$,z){var j=this.Uq();if(j)j.Eu(x,Q,c,$,z)};
kF.prototype.CK=function(x,Q,c,$,z){var j=this.Uq();if(j)j.CK(x,Q,c,$,z)};kF.prototype.km=function(x,Q,c,$,z){var j=this.Uq();
if(j)j.km(x,Q,c,$,z)};kF.prototype.Uq=function(x){if(x==null)x=this.data.index;return x==null?null:x==0?this.o9[0]:this.ON[x[0]][x[1]]};
kF.prototype.arx=function(x){var Q=this.J9.h();this.MX({d:"setstl",b:Q.Ry});this.agC(null)};kF.prototype.alz=function(x){var Q=this.Ta,c=this.data.a;
if(c==null)c=Q.g[0];var $=this.Ta.B[c],z=en.aja($),j=new jO(u.E.M,!0);j.data={d:u.H.hW,_g:"add",hF:ke.ZO,jn:[JSON.parse(JSON.stringify(z))]};
this.T(j)};kF.prototype.aoc=function(x){this.data.index=x.currentTarget.Dj;this.pn(x.currentTarget.Dj)};
kF.prototype.agC=function(x){this.BM(this.Ta,this.data)};kF.prototype.pn=function(x,Q){E.Os(this.ue);
for(var F=0;F<this.o9.length;F++)this.o9[F].ajZ();var c=this.Uq(x);this.ue.appendChild(c.awp());if(Q)c.c$();
var $=this.Ta;if($){var z=$.B[this.data.a];this.o9[0].update($,X.so.h6($,z));var j=z.add.lmfx;if(j==null)return;
for(var F=0;F<aF.order.length;F++){var U=j[aF.mh[F]].v;for(var i=0;i<U.length;i++)this.ON[F][i].update($,U[i].v)}}if(Q)c.c$()};
kF.prototype._=function(){j0.prototype._.call(this);this.dF._();this.J9._();this.CH._();for(var F=0;
F<this.o9.length;F++)this.o9[F]._()};kF.prototype.BM=function(x,Q){var c=Q.a==null;this.data.a=Q.a;this.data.index=Q.index;
Q=this.data;this.Ta=x;if(c)Q.a=x.g.length==0?x.B.length-1:x.g[0];E.Os(this.BN);var $=x.B[Q.a].add.lmfx;
this.lg();this.o9=[new kI("bops",!1,0)];this.ON=[];for(var F=0;F<aF.order.length;F++){this.ON.push([]);
var z=$==null?[]:$[aF.mh[F]].v;for(var j=0;j<z.length;j++){var U=new kI(aF.order[F],!1,[F,j]);this.o9.push(U);
this.ON[F].push(U)}if(z.length==0){var U=new kI(aF.order[F],!1,[F,0]);this.o9.push(U);this.ON[F].push(U)}}this._();
this.aCh(this.n$,ke.m6);for(var F=0;F<this.o9.length;F++){this.o9[F].parent=this;this.o9[F].awd(this.BN);
this.o9[F].k("showme",this.aoc,this)}if(Q.index==null||Q.index==0||!c&&$[aF.mh[Q.index[0]]].v.length==0){this.pn(0)}else this.pn(Q.index,c);
this.k("afterchange",this.lg,this)};kF.prototype.lg=function(x){var Q=this.Ta,c=this.data.a;if(c==null)c=Q.g[0];
var $=this.Ta.B[c],z=en.aja($);this.J9.U(z,Q.add.Patt?Q.add.Patt:[],Q.FO(),Q.dG())};kF.prototype.Fy=function(x,Q){this.n$=x;
this.aCh(x,Q);if(Q==ke.ZO||Q==ke.m6){this.J9.RN([x.Xe,x.Yf])}if(Q==ke.fB){}};kF.prototype.aCh=function(x,Q){for(var F=0;
F<this.o9.length;F++)this.o9[F].Fy(x,Q)};kF.prototype.lY=function(x){this.MX({d:"cancel"})};kF.prototype.K6=function(x){this.MX({d:"confirm"});
this.close()};kF.prototype.MX=function(x){x.a=this.data.a;var Q=new jO(u.E.v,!0);Q.data=x;Q.f=X.vR;Q.Oe=!0;
this.T(Q);this.lg()};kF.aDv=function(){var x=function(Q){if(Q==null||Q.g.length==0)return{w:!1};var c=Q.B[Q.g[0]];
return{w:c.add.lmfx!=null}};return{name:[11,6],P$:!0,sub:[{name:[5,1],w:x},{name:[5,2]},{name:[2,2],w:x}]}};
kF.a22=function(){return{sub:[{K:u.E.v,f:X.vR,C:{d:"st_copy"}},{K:u.E.v,f:X.vR,C:{d:"st_paste"}},{K:u.E.v,f:X.vR,C:{d:"st_clear"}}]}};
kF._l=function(x){var Q=[{name:[14,10],P$:!0}];for(var F=0;F<aF.names.length;F++)Q.push({name:aF.names[F]});
if(x){Q[Q.length-1].P$=!0;Q.push(kF.aDv());Q.push({name:[6,30,1],w:function(c){return{w:c!=null&&c.g.length!=0&&c.B[c.g[0]].g6()}}});
Q.push({name:["VAR0 VAR1",[12,49],[9,1]],w:function(c){return{w:c!=null&&c.g.length!=0&&c.B[c.g[0]].add.lmfx!=null}}})}return Q};
kF.eq=function(x){var Q=[{K:u.E.M,C:{d:u.H.LL,AD:"layerstyle"}}];for(var F=0;F<aF.names.length;F++)Q.push({K:u.E.M,C:{d:u.H.LL,AD:"layerstyle",index:[F,0]}});
if(x){Q.push(kF.a22());Q.push({K:u.E.M,C:{d:u.H.LL,AD:"scaleeffects",ZR:100,r5:{K:u.E.v,f:X.vR,C:{d:"scaleeffects"}}}});
var c={classID:"Mk",null:ep.QP("Lyr"),Usng:{t:"obj ",v:[{t:"prop",v:{classID:"Prpr",keyID:"Lefx"}},{t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Trgt"}}]}};
Q.push({K:u.E.G2,C:{q4:"make",dx:c}})}return Q};kF.aDO=function(x){var Q=[];if(x)Q.push({name:[6,48,0,0],Q2:!0},{name:[6,48,0,1],Q2:!0},{name:[6,48,0,2],Q2:!0,P$:!0});
for(var c in k5.names)Q.push({name:k5.names[c],P$:k5.apr.indexOf(c)!=-1,Q2:jH[c]!=null});return Q};kF.Hj=function(x){var Q=[];
if(x){Q.push({K:u.E.v,f:X.J7,C:{d:"newfill",Iz:0}});for(var F=1;F<3;F++)Q.push({K:u.E.G2,C:X.Rp.YJ(F)})}for(var c in k5.names){var $=fK.$H(c);
if($==null)$={};for(var z in k5.HD)if(k5.HD[z]==c)$.classID=z;var j={q4:"make",dx:{classID:"Mk",null:ep.QP("AdjL"),Usng:{t:"Objc",v:{classID:"AdjL",Type:{t:"Objc",v:$}}}}};
Q.push({K:u.E.G2,C:j})}return Q};function jI(){j0.call(this,"Merge Channels","mergechannels");this.UB=null;
var x=E.p("div","form");this.body.appendChild(x);this.wm=[];for(var F=0;F<3;F++){var Q=new c7(k5.v4[F],[]);
this.wm.push(Q);x.appendChild(Q.n);E._X(x)}this.CH=E.wb(this,x)}jI.prototype=new j0;jI.prototype._=function(){j0.prototype._.call(this);
this.CH._();for(var F=0;F<3;F++)this.wm[F]._()};jI.prototype.BM=function(x,Q,c,$){this.UB=c;var z=[];
for(var F=0;F<c.length;F++)z.push(c[F].name);for(var F=0;F<3;F++){var j=this.wm[F];j.yJ(z);j.U(Math.min(F,c.length-1))}};
jI.prototype.K6=function(x){var Q=this.UB,c=Q[0],$=new jO(u.E.G2,!0);$.data=hf.uV(c.m,c.e,c.cQ,"Merged Document","Wht",!1);
this.T($);var z=[];for(var F=0;F<3;F++)z.push(Q[this.wm[F].h()].VY());var c=Q[Q.length-1],j=c.B[0],U=j.buffer;
for(var F=0;F<U.length;F+=4){U[F]=z[0][F];U[F+1]=z[1][F];U[F+2]=z[2][F]}j.c();c.c();this.close()};function ca(){j0.call(this,[1,10],"script");
var x=E.p("div","form");x.setAttribute("style","width:44em");this.body.appendChild(x);this.n$=null;this.Aw=[];
this.PB=[];this.awX;var Q=this.dB=new j7([1,2],!1,null,!0);Q.k("click",this.tc,this);x.appendChild(Q.n);
var c=new j7("JS Reference",!1,null,!0);c.k("click",this.aou,this);x.appendChild(c.n);x.appendChild(new jz("Demos:").n);
this.a5J=[];var $=ca.kw;for(var F=0;F<$.length;F++){var z=new j7($[F].Qw,!1,null,!0);this.a5J.push(z);
x.appendChild(z.n);z.k("click",this.aga,this)}this.Qq=E.p("textarea");E.e5(this.Qq);this.Qq.setAttribute("rows",16);
this.Qq.setAttribute("style","display:block;tab-size:4; font-family:monospace;width:100%;");x.appendChild(this.Qq);
var j=new j7("Run",!0,null,!0);j.k("click",this.K6,this);x.appendChild(j.n);this.gz=E.p("div");x.appendChild(this.gz)}ca.prototype=new j0;
ca.prototype._=function(){this.dB._()};ca.prototype.tc=function(){var x=this.awX;if(x==null)x="script.jsx";
var Q=new jO(u.E.M,!0);Q.data={d:u.H.LL,AD:"namewindow",ZR:x.slice(0,x.length-4),ka:this.anH.bind(this)};
this.T(Q)};ca.prototype.anH=function(x){var Q=this.Qq.value,c=w.nT(Q),$=new jO(u.E.M,!0);$.data={d:u.H.Ol,Xp:c.buffer,if:x+".jsx",azc:!0};
this.T($)};ca.prototype.asV=function(x){var F=this.Aw.indexOf(x.target),Q=this.awX=this.PB[F],c=this.n$.dE.rG[Q],$=new Uint8Array(c),z=w.IV($,0,$.length);
this.Qq.value=z};ca.prototype.BM=function(x,Q,c){this.Qq.value=ca.kw[0].jP;this.ajJ()};ca.prototype.ajJ=function(){var x=this.n$.dE,Q=this.gz;
E.Os(Q);this.Aw=[];this.PB=[];Q.textContent="Saved scripts: ";for(var c in x.rG){if(c.endsWith(".jsx")){var $=new j7(c,!1,null,!0);
this.Aw.push($);this.PB.push(c);$.k("click",this.asV,this);Q.appendChild($.n)}}};ca.prototype.Fy=function(x,Q){this.n$=x;
if(Q==ke.P5)this.ajJ()};ca.prototype.aou=function(x){var Q=new jO(u.E.M,!0);Q.data={d:u.H.H_,link:"https://github.com/Adobe-CEP/CEP-Resources/blob/master/Documentation/Product%20specific%20Documentation/Photoshop%20Scripting/photoshop-javascript-ref-2020.pdf"};
this.T(Q)};ca.prototype.K6=function(x){var Q=this.Qq.value,c=this.n$.dE.rG;Q=ca.afW(Q,c);var $=new jO(u.E.M,!0);
$.data={d:u.H.kv,rq:Q};this.T($)};ca.afW=function(x,Q){var c=x.split("\n");for(var F=0;F<c.length;F++){var $=c[F].trim();
if($.startsWith("#include")){var z=$.slice($.indexOf("\"")+1,$.lastIndexOf("\"")),j=Q[z];if(j==null)alert("\""+z+"\" not found in the Local Storage");
c[F]=ca.afW(w.IV(new Uint8Array(j)),Q)}}return c.join("\n")};ca.prototype.aga=function(x){var Q=this.a5J.indexOf(x.currentTarget);
this.Qq.value=ca.kw[Q].jP};ca.kw=[{Qw:"Hello",jP:"\nalert(\"Hello Photopea!\");\n"},{Qw:"Process Layers",jP:"\nvar lays = app.activeDocument.layers;\n\nfor(var i=0; i<lays.length; i++)\n{\n"+"\t//lays[i].visible = false;\n"+"\t//lays[i].opacity = 50;\n"+"\tlays[i].name = \"My Layer \"+i;\n}"},{Qw:"Clone Layers",jP:"\nvar orig = app.activeDocument.activeLayer;\n"+"var cnt = 12;\n"+"var angle = Math.floor(360 / cnt);\n"+"\n"+"for(var i=1; i<cnt; i++)\n"+"{\n"+"\tvar nlay = orig.duplicate();\n"+"\t//nlay.translate(30*i, 20*i);\n"+"\tnlay.rotate(angle * i, AnchorPosition.BOTTOMCENTER);\n"+"}"}];
function hN(){j0.call(this,[11,7],"newproject");this.data=null;this.UB=null;this.V9=0;var x=E.p("div","flexrow");
this.Ca=x;this.body.appendChild(x);var Q=E.p("div","form");this.n5=Q;x.appendChild(Q);this.gB=new el([12,48],null,10);
Q.appendChild(this.gB.n);E._X(Q);this.jq=new hh(!0,null,null,null,!0);this.jq.U(new bC(1280,720),72);
this.jq.aAy(!0,!0);this.jq.k(u.E.t,this.QD,this);Q.appendChild(this.jq.n);this.VN=new iT;this.VN.parent=this;
Q.appendChild(this.VN.n);this.rc=new j7("\u02C5",null,[0,14],!0);this.rc.k("click",this.EZ,this);Q.appendChild(this.rc.n);
var c=this.iX=E.p("span");Q.appendChild(c);c.style.display="none";this.auG=new c7([13,6],["sRGB","Adobe RGB","ProPhoto RGB","Display P3"]);
c.appendChild(this.auG.n);this.rl=new f2([1,16,1]);c.appendChild(this.rl.n);this.CH=new j7([12,49],!0,null,!0);
this.CH.k("click",this.K6,this);Q.appendChild(this.CH.n);var $=hN.NZ,z=[];for(var F=0;F<$.length;F++)z.push($[F].name);
this.V8=new c_(null,z);this.V8.k(u.E.t,this.au0,this);Q.appendChild(this.V8.n);this.V8.n.style["margin-top"]="1em";
this.fw=new jn(!0);this.fw.k(u.E.t,this.axc,this);Q.appendChild(this.fw.n);this.au0();this.Zm=new hQ;
this.Zm.parent=this;this.Zm.n.setAttribute("style","margin-left:1em");this.Zm.k("tempready",this.a8O,this)}hN.prototype=new j0;
hN.prototype.EZ=function(x){var Q=this.iX,c=Q.style.display!="none";Q.style.display=c?"none":"";this.rc.UG(c?"\u02C5":"\u02C4");
this.oN(this.ww,this.R0)};hN.prototype.Fy=function(x,Q){this.Zm.Fy(x)};hN.prototype.$O=function(x,Q){return new bC(Math.max(0,Math.min(70,(x-690)/2)),x>Q?Math.max(0,Math.min(50,(Q-400)/2)):0)};
hN.prototype.oN=function(x,Q){this.ww=x;this.R0=Q;this.n5.setAttribute("style","width:"+Math.min(x-24,338)+"px");
this.fw.n.style.height=Q-248-(this.iX.style.display=="none"?0:28)+"px";var c=this.Zm.n,$=c.parentNode;
if(x<500){if($!=null)this.Ca.removeChild(c)}else{if($==null)this.Ca.appendChild(c);this.Zm.oN(x-378,Q-28)}};
hN.prototype.QD=function(){this.Zm.U(this.jq.h())};hN.prototype.axc=function(x){var Q=this.fw.h()[0],c=hN.NZ[this.V8.h()].qR[Q],$=c[4];
if($==0)$=72;var z=c[1],j=c[2],U=["px","%","mm","in"].indexOf(c[3]),i=[1,1,25.4/$,1/$][U];z/=i;j/=i;
this.jq.U(new bC(Math.round(z),Math.round(j)),$);this.jq.aaR(U);this.QD();if(Date.now()-this.V9<300)this.K6();
this.V9=Date.now()};hN.prototype.au0=function(x){var Q=hN.NZ[this.V8.h()].qR,c=[],$=[],z=Math.round(106*E.q_()),j=Math.round(106*E.q_()),U=0;
for(var F=0;F<Q.length;F++)U=Math.max(U,Q[F][1],Q[F][2]);for(var F=0;F<Q.length;F++){var i=Q[F],b=i[1]+" x "+i[2]+" "+i[3];
if(i[3]=="in")b=(i[1]*25.4).toFixed(0)+" x "+(i[2]*25.4).toFixed(0)+" mm";if(i[3]=="mm")b=(i[1]/25.4).toFixed(1)+" x "+(i[2]/25.4).toFixed(1)+" in";
if(i[4])b=b+" @ "+i[4]+" ppi";$.push(b);c.push(hN.Zh(i,z,j,U))}this.fw.SY(c,$,z,j)};hN.Zh=function(x,Q,c,$){var z=E.p("canvas",""),j=z.getContext("2d");
z.width=Q;z.height=c;var U=Math.round(Q/8),i=Math.floor(11*E.q_()),b=x[1],e=x[2];j.fillStyle="#000000";
j.font=Math.round(i*.9)+"px \"Open Sans\", Sans-Serif";var k=b+" x "+e+" "+x[3],K=j.measureText(k);j.fillText(k,Math.round((Q-K.width)/2),c-Math.round(U/2));
if(x[0]!=null){j.font="bold "+i+"px \"Open Sans\", Sans-Serif";var k=x[0],K=j.measureText(k);j.fillText(k,Math.round((Q-K.width)/2),c-Math.round(U/2)-Math.round(i*1.3))}c-=Math.round(2.5*i);
var g=Math.min((Q-U)/b,(c-U)/e);g*=.5+.5*(Math.max(b,e)/$);var R=(Q-b*g)/2,T=(c-e*g)/2;j.strokeRect(Math.round(R)+.5,Math.round(T)+.5,Math.round(b*g),Math.round(e*g));
return z.toDataURL()};hN.prototype._=function(){j0.prototype._.call(this);this.jq._();this.gB._();this.VN._();
this.CH._();this.gB.U(ah.get([11,7]));this.V8._();this.rl._();this.rc._();this.Zm._()};hN.prototype.K6=function(x){var Q=this.jq.h(),c=Q.x,$=Q.y;
this.close();var z=this.VN.h(),j=["sRGB IEC61966-2.1","Adobe RGB (1998)","ProPhoto RGB","image P3"][this.auG.h()],U=new jO(u.E.G2,!0);
U.data=hf.uV(c,$,this.jq.ne(),this.gB.h(),["Wht","Blck","Trns","Clr"][z[0]],this.rl.h(),z[1],j);this.T(U);
this.ayB()};hN.prototype.a8O=function(x){var Q=x.data.Ta;Q.cQ=this.jq.ne();var c=new jO(u.E.M,!0);c.data={d:u.H.th,Ta:Q};
this.T(c);this.close();this.ayB()};hN.prototype.ayB=function(){var x=this.UB[this.UB.length-1],Q=this.data.acD;
if(Q)iN.eM(function(){var c=new XMLHttpRequest,$="https://www.googleapis.com/drive/v3/files?"+iN.eU();
c.open("POST",$,!0);c.setRequestHeader("Content-Type","application/json");c.addEventListener("load",function(z){var j=JSON.parse(z.target.response);
x.uA={file:j,Kf:"psd"};alert(x.name+" created in Google Drive")});c.send(JSON.stringify({name:x.name,agV:[Q]}))})};
hN.prototype.BM=function(x,Q,c,$){this.UB=c;if(x!=null&&x.u!=null){var z=new gh(0,0,x.m,x.e).y_(x.u.rect);
this.jq.U(new bC(z.m,z.e))}this.data=Q;this.QD();if(E.jA())hF.aB$(this.z7.bind(this))};hN.prototype.z7=function(x){if(x=="granted")hF._x(this,this.lq.bind(this))};
hN.prototype.lq=function(x,Q){this.jq.U(new bC(Q.m,Q.e))};hN.NZ=[{name:"Social",qR:[["FB Page Cover",1640,664,"px",0],["FB Shared Image",1200,630,"px",0],["FB Event Image",1920,1080,"px",0],["FB Group Header",1640,856,"px",0],["Instagram",1080,1080,"px",0],["Insta Story",1080,1920,"px",0],["Youtube Thumbnail",1280,720,"px",0],["Youtube Profile",800,800,"px",0],["Youtube Cover",2560,1440,"px",0],["Twitter Profile",400,400,"px",0],["Twitter Header",1500,500,"px",0]]},{name:[12,88,4],qR:[["A3",297,420,"mm",300],["A4",210,297,"mm",300],["A5",148,210,"mm",300],["B3",353,500,"mm",300],["B4",250,353,"mm",300],["B5",176,250,"mm",300],["Letter",8.5,11,"in",300],["Ledger",11,17,"in",300],["Business Card",3.5,2,"in",300]]},{name:[12,88,0],qR:[["Wallet",2,3,"in",300],["Enprint",3.5,5,"in",300],[null,5,7,"in",300],[null,8,12,"in",300],[null,12,18,"in",300],[null,16,24,"in",300],[null,20,30,"in",300],[null,24,36,"in",300]]},{name:[12,88,1],qR:[["VGA",640,480,"px",0],["XGA",1024,768,"px",0],["HD",1280,720,"px",0],[null,1366,768,"px",0],[null,1600,900,"px",0],["Full HD",1920,1080,"px",0],["2K",2048,1080,"px",0],["UHD",3840,2160,"px",0],["4K",4096,2160,"px",0]]},{name:[12,88,2],qR:[["iPhone 4",640,900,"px",326],["iPhone 5",640,1136,"px",326],["iPhone 6 7 8",750,1334,"px",326],["iPhone 6+ 7+ 8+",1080,1920,"px",401],["iPhone X",1125,2436,"px",458],["Samsung A5",720,1280,"px",0],["Samsung S5",1080,1920,"px",0],["Samsung S6",1440,2560,"px",0],["Samsung S8+",1440,2560,"px",0],["Google Pixel",1080,1920,"px",0],["iPad Mini 4",1536,2048,"px",0],["iPad Air 2",1536,2048,"px",0],["iPad Pro 9.7\"",1536,2048,"px",0],["iPad Pro 10.5\"",1668,2224,"px",0],["iPad Pro 12.9\"",2048,2732,"px",0]]},{name:[12,88,3],qR:[["Small Square",200,200,"px",0],["Square",250,250,"px",0],["Medium Rect",300,250,"px",0],["Large Rect",336,280,"px",0],["Mobile Leaderboard",320,50,"px",0],["Large Mobile",320,100,"px",0],["Banner",468,60,"px",0],["Leaderboard",728,90,"px",0],["Large Leaderboard",970,90,"px",0],["Billboard",970,250,"px",0],["Vertical Rect",240,400,"px",0],["Skyscraper",120,600,"px",0],["Wide Skyscraper",160,600,"px",0],["Half Page",300,600,"px",0],["Portrait",300,1050,"px",0]]},{name:"2ᴺ",qR:[[null,16,16,"px",0],[null,32,32,"px",0],[null,64,64,"px",0],[null,128,128,"px",0],[null,256,256,"px",0],[null,512,512,"px",0],[null,1024,1024,"px",0],[null,2048,2048,"px",0],[null,4096,4096,"px",0]]}];
function fg(x,Q,c){j0.call(this,Q,"sel_"+x);this.d=x;var $=E.p("div","form");this.body.appendChild($);
this.gB=new f0(Q,0,255,null,0,!1,!0);$.appendChild(this.gB.n);this.gB.U(1);var z=E.p("span");z.textContent=c;
$.appendChild(z);E._X($);this.aw6=new f2("Apply at canvas bounds");if(x!="border")$.appendChild(this.aw6.n);
this.CH=E.wb(this,$)}fg.prototype=new j0;fg.prototype.OL=function(x,Q){if(x==null)return;if(x.u==null)alert("No selection!");
return x.u!=null};fg.prototype.K6=function(x){var Q=new jO(u.E.G2,!0);Q.data=X.U_.mg(this.d,this.gB.h(),this.aw6.h());
Q.Oe=!0;this.T(Q);this.close()};fg.prototype._=function(){j0.prototype._.call(this);this.CH._();if(this.gB)this.gB._()};
fg.prototype.BM=function(x,Q){this.gB._N()};function al(x,Q,c,$,z,j){j0.call(this,c,Q);this.ahm=j;this.z4=z;
this.NZ=null;this.n5=E.p("div","form");this.body.appendChild(this.n5);this.aa6=E.p("div");this.n5.appendChild(this.aa6);
var U=500;if($){var i=$.split(",");$=i[0];if(i[1])U=parseFloat(i[1])}this.gB=x==0?new el(c,null,10):x==1?new bf(c,0,U,$,1):new el(c,null,24,5);
this.gB.k(u.E.t,this.IE,this);this.n5.appendChild(this.gB.n);this.CH=E.wb(this,this.n5);this.k("closebtn",this.lY,this)}al.prototype=new j0;
al.prototype.$O=function(x,Q){return new bC(Math.max(0,Math.min(150,(x-250)/2)),Math.max(0,Math.min(150,(Q-120)/2)))};
al.prototype.sD=function(){return this.ahm};al.prototype.IE=function(x){var Q=this.gB.h();if(this.z4)this.b_(Q)};
al.prototype.lY=function(x){if(this.z4)this.b_("cancel")};al.prototype.K6=function(x){if(this.z4)this.b_("confirm");
else this.b_(this.gB.h());this.close()};al.prototype.b_=function(x){if(this.NZ.ka)this.NZ.ka(x);else if(this.NZ.r5){var Q=this.NZ.r5,c=new jO(Q.K,!0);
c.f=Q.f;c.data=Q.C;c.data.b=x;c.Oe=!0;this.T(c)}};al.prototype._=function(){j0.prototype._.call(this);
this.CH._();if(this.gB)this.gB._()};al.prototype.BM=function(x,Q){this.NZ=Q;this.gB.U(Q.ZR);this.gB._N();
this.aa6.innerHTML=Q.ai0?Q.ai0:"";this.IE(null)};function aY(){j0.call(this,[1,5],"open_from_url");this.Dw=null;
var x=E.p("div","form");this.body.appendChild(x);this.So=new el("URL",null,22);x.appendChild(this.So.n);
E._X(x);this.Mk=new c_([21,0],[[21,2],[21,1]]);x.appendChild(this.Mk.n);this.CH=E.wb(this,x)}aY.prototype=new j0;
aY.prototype._=function(){j0.prototype._.call(this);this.CH._();this.Mk._()};aY.prototype.BM=function(x,Q,c){this.So._N();
this.Dw=null;if(x&&c.indexOf(x)!=-1)this.Dw=c.indexOf(x)};aY.prototype.K6=function(x){var Q=new jO(u.E.M,!0),c=this.So.h();
Q.data={d:u.H.a0,hF:{url:c,l_:!0,Dw:this.Mk.h()==1?this.Dw:null}};this.T(Q);this.close()};function ga(){j0.call(this,[12,79],"preferences");
this.n$=null;var x=E.p("div","form");this.body.appendChild(x);this.cN=[new f2([8,2]),new hc,new f2([8,4]),new hc,new c7([12,80,3],[[12,93,3],[12,80,4]]),new bf([12,80,5],.02,100,null,2),new c7(null,d.fR.$P),new c7([12,80,6],d.fR.$P),new f2("Remind me to save"),new f2("Glass Menus"),new bf("Cursor Offset",0,200)];
for(var F=0;F<this.cN.length;F++){var Q=this.cN[F];Q.parent=this;Q.k(u.E.t,this.JL,this);if(F==8)continue;
x.appendChild(Q.n);if(F!=0&&F!=2&&F!=3&&F!=5)E._X(x)}}ga.prototype=new j0;ga.prototype._=function(){j0.prototype._.call(this);
for(var F=0;F<this.cN.length;F++)this.cN[F]._()};ga.prototype.BM=function(x,Q,c){};ga.prototype.Fy=function(x,Q){this.n$=x;
var c=x.Zo;this.cN[0].U(c.Bo);this.cN[1].wC(c.$y);this.cN[2].U(c.bI);this.cN[3].wC(c.WO);this.cN[4].U(c.ut);
this.cN[5].U(c.ZD);this.cN[6].U(c.PK);this.cN[7].U(c.IM);this.cN[8].U(x.Fn==1);var z=window.locStor.getItem("__glm");
this.cN[9].U(z=="1");this.cN[10].U(x.Yg)};ga.prototype.JL=function(x){var Q=this.cN;if(x.target==Q[8])this.n$.Fn=1-this.n$.Fn;
var c=JSON.parse(JSON.stringify(this.n$.Zo));c.Bo=Q[0].h();c.$y=Q[1].as();c.bI=Q[2].h();c.WO=Q[3].as();
c.ut=Q[4].h();c.ZD=Q[5].h();c.PK=Q[6].h();c.IM=Q[7].h();window.locStor.setItem("__glm",Q[9].h()?"1":"0");
this.n$.Yg=Q[10].h();var $=new jO(u.E.M,!0);$.data={d:u.H.hW,hF:ke.sT,j7:c};this.T($)};function cI(){j0.call(this,[11,8],"saveforweb");
this.aDV="";this.k("closebtn",function(){this.pe.jh()},this);this.Ta=null;this.he=null;this.aeh=null;
this.n$=null;E.ZW(this.body,"flexrow");this.body.style.padding="0";var x=E.p("div");x.setAttribute("style","position:relative;");
var Q=E.p("div");this.body.appendChild(x);this.body.appendChild(Q);this._9=E.p("div","imgcont");x.appendChild(this._9);
this.pe=new cJ;this.pe.oN(512,512);var c=this.RY=E.p("video");c.setAttribute("controls","");c.setAttribute("preload","auto");
c.setAttribute("loop","");this.pO=E.p("div");this.pO.setAttribute("style","position:absolute;  right:0px; bottom:0px; padding: 3px 6px;  background-color:black;");
x.appendChild(this.pO);var $=this.n5=E.p("div","form cell");$.setAttribute("style","width:195px; padding:9px 13px;");
Q.appendChild($);this.Qi=new el([12,48],null,7.6);this.Qi.vl();$.appendChild(this.Qi.n);var z=ar.c8();
z[z.indexOf("WEBP")]="webP";this.Lh=new c7([12,50],z);this.Lh.n.style.marginRight="0";this.Lh.vl();$.appendChild(this.Lh.n);
this.Lh.k(u.E.t,this.Og,this);E._X($);this.jq=new hh(!0,!0,!1,!0);this.jq.vl();this.jq.k(u.E.t,this.Og,this);
this.jq.gw.n.style.paddingBottom="8px";$.appendChild(this.jq.n);this.fL=new j4;this.fL.k(u.E.t,this.Og,this);
$.appendChild(this.fL.n);this.Tf=new j7([1,2],!0,null,!0);this.Tf.k("click",this.K6,this);$.appendChild(this.Tf.n)}cI.prototype=new j0;
cI.prototype.OL=function(x,Q){return x!=null};cI.prototype._=function(){j0.prototype._.call(this);this.jq._();
this.Qi._();this.Lh._();this.fL._();this.Tf._()};cI.prototype.K6=function(x){var Q=this.Qi.h().trim(),c=ar.c8()[this.Lh.h()],$=c=="JPG"||c=="PNG"||c=="GIF"||c=="SVG",z=ar.pz(c),j="."+c.toLowerCase(),U=this.he,i=Q+j,b=this.Ta,e=b.p9,k=this.fL.h();
if(b.dV())k.pop();if(e.length!=0&&$&&k.pop()){var K="<!DOCTYPE html>\n<html>\n<style>div {position:absolute;}</style>\n<head></head>\n<body>\n",g=[],R={},T=new gh(0,0,b.m,b.e),D=b.VY();
for(var F=0;F<e.length;F++)g.push(X.x5.YA(e,F));g.reverse();var a=d.rect.atp([0,0,b.m,b.e],g);for(var F=0;
F<a.length;F++){var _=a[F],I=new gh(_[0],_[1],_[2]-_[0],_[3]-_[1]),f=_.length==5?e[_[4]].v:null,y=d.R(I.P()*4);
d.WK(D,T,y,I);var Z="img/img"+(F+1)+j;R[Z]=new Uint8Array(z.YU([[y.buffer,0,b.cQ,b.hD]],I.m,I.e,k));
K+="<div style=\"background-image:url('"+Z+"'); left:"+I.x+"px; top:"+I.y+"px; width:"+I.m+"px; height:"+I.e+"px\">";
if(f&&f.url.v!="")K+="\n\t<a href=\""+f.url.v+"\" target=\""+f.null.v+"\" style=\"display:block;width:100%;height:100%;\"></a>\n";
K+="</div>\n"}K+="</body>\n</html>\n";var v=d.R(Math.round(K.length*1.5)),G=w.A9(K,v,0);R["index.html"]=v.slice(0,G);
U=UZIP.encode(R);i=Q+".zip"}else if(b.add.artd&&b.add.artd.Cnt.v>1&&$&&k.pop()){var R={},T=new gh(0,0,b.m,b.e),D=b.VY(),q=b.root.children;
for(var F=0;F<q.length;F++){var h=q[F].a,H;if(h.add.artb==null||!h.M5())continue;var r=h.Dd();if(c=="SVG")H=new Uint8Array(z.YU(b,r.m,r.e,k,this.n$,F));
else{var o=d.R(r.P()*4);d.WK(D,T,o,r);H=new Uint8Array(z.YU([[o.buffer,0,b.cQ,b.hD]],r.m,r.e,k))}R[h.getName()+j]=H}U=UZIP.encode(R);
i=Q+".zip"}var P=function(){if(b.lO)hF.pd("act=1&id="+b.lO);this.pe.jh();this.close();var p=new jO(u.E.M,!0);
p.data={d:u.H.lm,data:U,name:i};this.T(p)}.bind(this);if(!this.n$.Lk||dQ.OT()){P();return}if(e_.rJ==0){e_.SX(P);
return}var O=e_.Bb()!=0;P();var p=new jO(u.E.M,!0),C=jk.jW("3UMe\\ORYBB@EVG9* 08{\"\",-;#a|gfbeVvg^QT[<7AO?/437#:xx%.zv%vgaxh\\WU^fWJB@W6@3K<;30,,+3`uy{sqc\\7"),W=jk.jW(";QJXQ_*II9"),J=function(){p.data={d:u.H.LL,AD:"account"};
this.T(p)}.bind(this);if(O){C=jk.jW("0^Ne\\ORYLG:<2G&0>\\|W~~otku?|J_ce][MFaVKNB7O;9;C&6$+)1wq(jxdnreaUlNPH`UC9IQH;>E'/J9f un}l0!u\\lXZn[^XbAAMd");
J=function(){};W=null}p.data={d:u.H.LL,AD:jk.L5,b:C,ka:J,ank:W};if(Math.random()<.1||O)this.T(p)};cI.prototype.BM=function(x,Q){if(Q.mN!=null)this.Lh.U(Q.mN);
this.Ta=x;var c=this.Ta.name,$=c.lastIndexOf("."),c=$==-1?c:c.slice(0,$);this.Qi.U(c);var z=x.m+","+x.e;
if(z!=this.aDV){this.aDV=z;this.jq.U(new bC(x.m,x.e),x.cQ)}this.fL.a6f();if(Q.acz){this.jq.aaR(3);this.fL.E2.PDF[2].nX.U(!0)}this.Og(null,!0)};
cI.prototype.auH=function(x,Q){return x<Q&&x<660};cI.prototype.$O=function(x,Q){return this.auH(x,Q)?new bC(0,0):new bC(Math.max(0,Math.min(150,(x-770)/2)),Math.max(0,Math.min(150,(Q-590)/2)))};
cI.prototype.oN=function(x,Q,c){this.ww=x;this.R0=Q;if(this.Ta==null)return;var $=this.Tf.n,z=this.auH(x,Q),j,U,g="<span style=\"width:",R="display:inline-block; text-align:right;\">";
if(z){var i=this.n5.getBoundingClientRect().height;j=x;U=Q-Math.max(i,252);E.WP(this.body,"flexrow")}else{j=Math.min(512,x-195-2*13);
U=Math.min(512,Q-24);E.ZW(this.body,"flexrow")}var b=z?x-2*13:195;this.n5.style.width=b+"px";this.Qi.NX.style.width=b-77+"px";
this.jq.oN(b);var e=ar.c8()[this.Lh.h()],k=ar.pz(e);if(k.f6||k.NQ)this._9.firstChild.setAttribute("style","display:block; width:"+j+"px; height:"+U+"px;");
else{this.pe.oN(j,U);this.RY.width=j;this.RY.height=U}var K=this.he.byteLength,T=g+64+"px;"+R+cI.dc(K)+"</span>";
if(j>400)T+=g+90+"px; opacity:"+.5+";"+R+K.toLocaleString()+" B</span>";this.pO.innerHTML=T;if(c)setTimeout(function(){this.oN(this.ww,this.R0)}.bind(this),20)};
cI.dc=function(x){var Q=x.toString(2),c=0;while(c+10<Q.length)c+=10;var $=(x/Math.pow(2,c)).toFixed(1);
if($.endsWith(".0"))$=$.slice(0,-2);var z="B KB MB GB TB PB".split(" ")[Math.floor(c/10)];return $+" "+z};
cI.prototype.Fy=function(x,Q){this.n$=x};cI.prototype.Og=async function(x,Q){var c=this.Ta,$=this.jq.h(),z=$.x,j=$.y,U=this.Lh.h(),i=ar.c8()[U],b=ar.b6(c)[0].length,e=["GIF","PNG","WEBP","MP4"].indexOf(i)!=-1&&b>1,_="";
if(e&&i!="MP4"&&Q&&(b>4&&z*j>1024*1024||z*j*b>800*800*50)){var k=1;while(Math.max(z>>>k,j>>>k)>800)k++;
var K=window.confirm("Your animation is large ("+z+" x "+j+" px). Press \"OK\" to scale it to "+(100>>>k)+"%. Press \"Cancel\" to keep the size.");
if(K){this.jq.U(new bC(z>>>k,j>>>k),null,!0);z=z>>>k;j=j>>>k}}var g=c.add.artd,R=g!=null&&g.Cnt.v>1,T=c.dV();
this.fL.zE(i,e,c.p9.length!=0,R,T!=null);var D=window.locStor.getItem("sfwPrms");if(D==null)D={};else{D=JSON.parse(D);
if(D.MP4&&D.MP4[0]==100)D.MP4[0]=50}var a=this.fL.h();if(x&&x.target==this.fL){D[i]=a;window.locStor.setItem("sfwPrms",JSON.stringify(D))}else if(D[i]){this.fL.U(D[i],!0);
a=this.fL.h()}this.he=await ar.jd(c,i,z,j,a,this.n$);if(this.he==null){this.Ta=null;return}E.Os(this._9);
this.pe.jh();var I=ar.pz(i);if(I.NQ){this._9.innerHTML="<div></div>"}else if(I.f6){var f=z,y=j,Z;if(i=="PDF"||i=="AI"){Z=URL.createObjectURL(new Blob([this.he],{type:"application/pdf"}))}else{Z=URL.createObjectURL(new Blob([this.he],{type:"image/svg+xml"}))}this._9.innerHTML="<iframe src=\""+Z+"\"></iframe>"}else if(i=="MP4"){var Z=URL.createObjectURL(new Blob([this.he]));
this.RY.setAttribute("src",Z);this._9.appendChild(this.RY)}else{var v=this.aeh=I.fk(this.he),G=v[0],q=G.K$,f=q.m,y=q.e;
if(G.Xo){var h=ICC.R(G.Xo.buffer),r=17,H=ICC.U.sampleLUT(h,r);for(var F=0;F<v.length;F++){var o=new Uint8Array(v[F].data);
ICC.U.applyLUT(H,r,o,o)}}this.pe.U(v,v.length>1?a[a.length-3]:0);this._9.appendChild(this.pe.n);_="background: rgba(0,0,0,0);"}this._9.setAttribute("style","display:block; "+(I.NQ?"background:rgba(0,0,0,0);":"background-size:"+16/E.q_()+"px;")+_);
this.oN(this.ww,this.R0,Q)};function e8(){j0.call(this,[11,13],"shortcuts");this.n$=null;var x=this.Ca=E.p("div","scrollable");
x.setAttribute("style","min-width:700px; max-height:500px; padding:1.5em");this.body.appendChild(x);
this.tb()}e8.prototype=new j0;e8.prototype._=function(){j0.prototype._.call(this);this.tb()};e8.prototype.Fy=function(x,Q){this.n$=x};
e8.prototype.BM=function(x,Q,c,$){if(E.rm(this.n))this.tb()};e8.prototype.tb=function(){var x="<div style=\"line-height:1.4em; column-count:3; column-gap:3em; column-rule-width:1px;\" class=\"\">",Q="",c=fM,$=c.qP,z=c.FT,j=c.Al;
Q+="<h2 style=\"margin-top:0;\">Main Menu</h2>";Q+=x;Q+=this.VK([[0,0],"---",[1,0],[$,c.Kx],[1,2],[$,c.RO],[1,3],[z,$,c.RO],[1,8],[j,z,$,c.RO],[0,1],"---",[2,0],[z,$,c.hy],[2,1],[$,c.hy],[5,0],[$,c.S3],[5,1],[$,c.tt],[5,2],[$,c.UE],[2,2],"Delete",[2,3],[j,c.Z1],[10,16],[j,$,c.ft],[12,79],[$,c.ui],[3],"---",[4,1],[$,c.xv],[4,2],[$,c.dm],[4,5],[$,c.q3],[4,11],[$,c.Wd],[0,3],"---",[6,13],[z,$,c.sE],[6,49,0],[$,c.Wv],[6,6,0],[j,$,c.Gh],[6,9],[$,c.Gh],[6,10],[$,c.E],[0,5],"---",[7,0],[$,c.H],[7,1],[$,c.MC],[7,2],[z,$,c.Wd],[0,7],"---",[8,0],[$,c.LJ],[8,1],[$,c.m8],[8,3],[$,c.Pn],[8,2],[$,c.KQ],[8,4],[$,c.hr],[11,13],"?"]);
Q+="</div>";Q+="<h2 style=\"margin-top:1.5em;\">Navigation</h2>";Q+=x;Q+=this.VK(["Vertical scroll","Wheel","Horizontal scroll",[$,"Wheel"],"Zooming",[j,"Wheel"]]);
Q+="</div>";Q+="<h2 style=\"margin-top:1.5em;\">Quick tools (press to enable, release to disable)</h2>";
Q+=x;Q+=this.VK([[10,11],[$],[10,7],"Space",[10,17],[$,c.r_]]);Q+="</div>";Q+="<h2 style=\"margin-top:1.5em;\">Tools</h2>";
Q+=x;var U=[],i=this.n$;if(i==null)return;var b=i.s;for(var F=0;F<b.eh.length;F++){var e=b.eh[F],k=b.keys[F];
for(var K=0;K<e.length;K++)U.push(e[K].f.name,k?k.Qw:null)}U=U.concat([[24,16],"---",[22,7,1],"D",[22,7,0],"X",[6,6,1],"Q","Decrease Brush Size","[","Increase Brush Size","]","Decrease Hardness","{","Increase Hardness","}",[12,86],[$,c.ff]]);
Q+=this.VK(U);Q+="</div>";this.Ca.innerHTML=Q};e8.prototype.VK=function(x){var Q="",c=!0;for(var F=0;
F<x.length;F+=2){var $=x[F],z=fM.es(x[F+1]);if(z==null){c=!1;continue}var j=E.iF(ah.get($));if(z=="---"){if(!c)Q+="<br/>";
Q+="<div style=\"font-weight:bold; border-bottom: 1px solid;\">"+j+"</div>"}else Q+="<div>"+j+" <span style=\"float:right; font-weight:bold;\">"+z+"</span> </div>";
c=!1}return Q};function bJ(){j0.call(this,[8,11,1],"soptions");this.nk=null;var x=E.p("div","form");
x.style.width="20em";this.body.appendChild(x);this.$U={Nm:[12,48],url:"URL",null:[12,71]};this.cN={};
for(var Q in this.$U){var c=new el(this.$U[Q],null,15);this.cN[Q]=c;x.appendChild(c.n)}this.ap0=new jz([12,14,0]);
x.appendChild(this.ap0.n);this.AG=new cM(0,!0);x.appendChild(this.AG.n);this.CH=E.wb(this,x)}bJ.prototype=new j0;
bJ.prototype.BM=function(x,Q,c){var $=Q.b;this.nk=JSON.stringify($);for(var z in this.$U){if($[z])this.cN[z].U($[z].v)}var j=$.bounds.v,U=j.Left.v,i=j.Top.v;
this.AG.U([U,i,j.Rght.v-U,j.Btom.v-i])};bJ.prototype.K6=function(x){var Q=JSON.parse(this.nk);for(var c in this.$U){var $=this.cN[c].h();
Q[c]={t:"TEXT",v:$}}var z=this.AG.h();console.log(z);var j=Q.bounds.v,U=z[0],i=z[1];j.Left.v=U;j.Top.v=i;
j.Rght.v=U+z[2];j.Btom.v=i+z[3];var b=new jO(u.E.v,!0);b.f=X.bb;b.data=Q;b.Oe=!0;this.T(b);this.close()};
bJ.prototype._=function(){j0.prototype._.call(this);this.CH._();this.ap0._();this.AG._()};function aG(){j0.call(this,[2,3],"fill");
this.n$=null;this.D9=null;var x=E.p("div","form padded");x.style.width="22em";this.body.appendChild(x);
this.zz="FrgC BckC Clr Blck Gry Wht contentAware Ptrn".split(" ");this.VX=new c7([2,3],[[12,45],[12,46],[12,47],[13,1,10],[13,1,7],[13,1,8],[6,48,0,3],[12,62]],[3,3,2]);
this.VX.k(u.E.t,this.aAq,this);x.appendChild(this.VX.n);this._9=E.p("span");x.appendChild(this._9);this.nH=new hc;
this.nH.parent=this;this.nH.wC(0);this.Rk=new bh;this.Rk.parent=this;this.tr=new c7([12,19,0],cq.o_,cq.nW);
x.appendChild(this.tr.n);this.Iy=new bf([12,0],0,100,"%",0,!1);this.Iy.U(100);x.appendChild(this.Iy.n);
this.tM=new f2([13,5]);this.tM.U(!1);x.appendChild(this.tM.n);this.CH=E.wb(this,this.body)}aG.prototype=new j0;
aG.prototype.OL=function(x,Q){return x!=null};aG.prototype.sD=function(){return!0};aG.prototype.aAq=function(){var x=this.VX.h(),Q=this.nH.n,c=this.Rk.n,$=this._9;
if(x==2)$.appendChild(Q);else if($.contains(Q))$.removeChild(Q);if(x==7)$.appendChild(c);else if($.contains(c))$.removeChild(c)};
aG.prototype._=function(){j0.prototype._.call(this);this.VX._();this.tr._();this.Iy._();this.tM._();
this.CH._()};aG.prototype.K6=function(x){if(!this.D9.hS())return;var Q=new jO(u.E.G2,!0),c=this.VX.h();
Q.data=X.x7.YJ(this.zz[c],cq.X$[this.tr.h()],this.Iy.h()/100,this.nH.h(),this.tM.h(),this.Rk.h());this.close();
this.T(Q)};aG.prototype.BM=function(x,Q){this.D9=x};aG.prototype.Fy=function(x,Q){this.n$=x;if(Q==ke.m6||Q==ke.qL){this.Rk.RN(x.Yf);
this.Rk.U({classID:"Ptrn",Nm:{v:"orangeslices",t:"TEXT"},Idnt:{v:"b4d43394-d71c-11e5-b1ae-a548a96e5f9f",t:"TEXT"}})}};
function fk(){j0.call(this,[14,9],"stroke");this.n$=null;this.n5=E.p("div","form");this.n5.setAttribute("style","width:24em");
this.body.appendChild(this.n5);this.Xz=new kI("FrFX",!0);this.Xz.parent=this;var x=["Sz","Styl","Md","Opct"].concat(aF.ZS);
for(var F=0;F<x.length;F++){var Q=this.Xz.no[x[F]].n;this.n5.appendChild(Q)}this.xX=!1;this.CH=E.wb(this,this.body)}fk.prototype=new j0;
fk.prototype.OL=function(x,Q){return x!=null};fk.prototype.sD=function(){return!0};fk.prototype._=function(){j0.prototype._.call(this);
this.CH._();this.Xz._()};fk.prototype.K6=function(x){var Q=this.Xz.h(),c={classID:"Strk"};c.Md=Q.Md;
c.Opct=Q.Opct;c.Clr=Q.Clr;c.Wdth={t:"long",v:Q.Sz.v.val};var $=aF.stroke.types.indexOf(Q.Styl.v.FStl);
c.Lctn={t:"enum",v:{StrL:["Insd","Cntr","Otsd"][$]}};var z=new jO(u.E.G2,!0);z.data={q4:"stroke",dx:c};
this.close();this.T(z)};fk.prototype.BM=function(x,Q){if(!this.xX){var c=aF.lF[aF.order.indexOf("FrFX")];
c=JSON.parse(c);this.Xz.update(x,c);this.xX=!0}var c=this.Xz.h(),$=this.n$.Gj;c.Clr.v=d.I.lV({Z:$>>16&255,r:$>>8&255,J:$&255});
this.Xz.update(x,c)};fk.prototype.Fy=function(x,Q){this.n$=x};function ba(){j0.call(this,[11,9],"textwarp");
this.cN=new kL;this.cN.k(u.E.t,this.bM,this);this.cN.parent=this;this.n5=E.p("div","form");this.n5.setAttribute("style","width:20em");
this.body.appendChild(this.n5);this.n5.appendChild(this.cN.Uh.n);this.n5.appendChild(this.cN.PE.n);this.n5.appendChild(this.cN.Nf.n);
this.n5.appendChild(this.cN.v2.n);this.n5.appendChild(this.cN.Nq.n);this.CH=E.wb(this,this.n5);this.k("closebtn",this.lY,this)}ba.prototype=new j0;
ba.prototype.sD=function(){return!0};ba.prototype._=function(){j0.prototype._.call(this);this.CH._();
this.cN._()};ba.prototype.bM=function(x){var Q=this.cN.h();this.b_({d:"warp",fr:Q})};ba.prototype.b_=function(x){var Q=new jO(u.E.v,!0);
Q.f=X.gr;Q.data=x;Q.Oe=!0;this.T(Q)};ba.prototype.lY=function(x){this.b_({d:"warpCancel"})};ba.prototype.K6=function(x){this.b_({d:"warpConfirm"});
this.close()};ba.prototype.BM=function(x,Q){var c=x.B[x.g[0]];this.cN.U(c.add.TySh.f2)};function ei(){j0.call(this,[11,12,0],"trim");
var x=this.n5=E.p("div","form");this.n5.setAttribute("style","width:22em");this.body.appendChild(this.n5);
var Q=new jz("Color To Trim:");x.appendChild(Q.n);this.iV=new cT(null,["Top Left Pixel Color","Bottom Right Pixel Color",[13,1,9]],null,null,!0);
this.iV.U([!0]);this.n5.appendChild(this.iV.n);var Q=new jz("Sides:");x.appendChild(Q.n);this.K8=new cT(null,["Top","Left","Bottom","Right"]);
this.K8.U([!0,!0,!0,!0]);this.n5.appendChild(this.K8.n);this.CH=E.wb(this,this.body)}ei.prototype=new j0;
ei.prototype.OL=function(x,Q){return x!=null};ei.prototype.sD=function(){return!0};ei.prototype._=function(){j0.prototype._.call(this);
this.iV._();this.K8._();this.CH._()};ei.prototype.K6=function(x){var Q=this.iV.h().indexOf(!0),c=this.K8.h(),$=new jO(u.E.G2,!0);
$.data=X.r7.ro(Q,c);this.close();this.T($)};function da(){j0.call(this,"Raw Photopea","rawpea");this.dr=null;
this.Hk=null;this.body.style.padding="0";var x=this.Af=new jH["Adobe Camera Raw Filter"](!0),Q="<svg  class=\"autoscale gsicon\" viewBox=\"0 0 14 18\" width=\"14\" height=\"18\" fill=\"black\"><path d=\"M14,6 L10,6 L10,0 L4,0 L4,6 L0,6 L7,13 L14,6 L14,6 Z M0,14 L0,16 L14,16 L14,14 Z\" /></svg>";
this.body.appendChild(x.n);this.CH=new j7([1,0],!0,null,!0);this.CH.k("click",this.K6,this);this.wv=new j7(Q+" JPG",!0,null,!0);
this.wv.k("click",this.a4e,this);this.wv.n.style.marginTop="6px";x.hI(this.CH.n);x.hI(this.wv.n)}da.prototype=new j0;
da.prototype.$O=function(){return new bC(0,0)};da.prototype.oN=function(x,Q){this.Af.oN(x,Q)};da.prototype._=function(){j0.prototype._.call(this);
this.Af._()};da.prototype.a4e=function(x){var Q=this.dr,c=this.Hk,$=ar.pz("JPG").YU([[this.Af.h(!0).buffer]],c.ni,c.UL,[85]),z=new jO(u.E.M,!0);
z.data={d:u.H.lm,data:$,name:"photo.jpg"};this.T(z)};da.prototype.K6=function(x){var Q=this.dr,c=this.Hk,$=be.tC(Q),Q={K$:new gh(0,0,c.ni,c.UL),data:this.Af.h(!0).buffer,hD:$},z=ar.$E("Raw Photo",[Q]),j=new jO(u.E.M,!0);
j.data={d:u.H.th,Ta:z};this.T(j);this.SJ();this.close()};da.prototype.SJ=function(){this.dr=null;this.Hk=null;
this.Af.ak0()};da.prototype.BM=function(x,Q,c,$){this.dr=Q.QK;var z=this.Hk=d.raw.al0(this.dr),j=d.raw.apR(Q.QK),U=f5.a5c(j);
d.raw.Zd(z.AX,z.AX,Q.QK,[U.Ud,U.OG]);var i=fK.$H("Adobe Camera Raw Filter");this.Af.U(i,z.AX,new gh(0,0,z.ni,z.UL))};
function a9(x){j0.call(this,x?[11,11,0]:[11,11,1],x?"vbitmap":"rcolors");this.NZ=null;this.J3=null;this.O5=null;
this.f9=null;this.ke=null;this.a32=null;this.w4=null;this.n$=null;this.wm="";this.k4=x;this.vZ=this.Zi.bind(this);
this.Ab=!1;this.body.style.padding="0";this.n5=E.p("div","form hbar padded");this.body.appendChild(this.n5);
this.Z2=new cT(null,["Fill","Stroke","Labels"]);this.Z2.k(u.E.t,this.Zi,this);var Q=E.p("span","rangecontFloat form padded"),b=16;
Q.appendChild(this.Z2.n);Q.setAttribute("style","position:absolute; width:120px; z-index:2;  padding-right:0px; ");
var c=new kw;c.n=Q;var $=this.AZ={cnum:new f0([12,82],2,50,null),nois:new f2([12,81]),mode:new c7(null,["Cartoon","Photo"]),segm:new f2("Segmentize"),cbok:new f2("Coloring book"),poly:new f2("Polygon"),merg:new f2("Merge colors"),polE:new f0("Roughness",2,30,null),dthr:new f2([12,23,3]),vprm:new j7("\u2026",!1,null,!0),ok:E.wb(this,null,!1)},z=this;
for(var j in $){var U=$[j];U.parent=this;if(j=="ok"){}else if(j=="vprm"){U.k("click",function(k){var K=$.vprm.n.getBoundingClientRect(),g=new jO(u.E.M,!0);
g.data={d:u.H.A_,G7:c,x:K.left,y:K.top+20};z.T(g)})}else U.k(u.E.t,this.Zi,this)}var i=this.KA=E.p("div","flexrow");
this.body.appendChild(i);i.setAttribute("style","background-color:var(--bg-canvas)");this.rU=new cJ;
this.rU.k("viewchange",this.Mc,this);this.sb=new cJ;this.GP=E.p("canvas");this.GP.setAttribute("style","margin:0 0 0 1px; padding:0; cursor:grab;");
this.Yt=this.GP.getContext("2d");var e=d.R(16*16*4);d.ma(e,b,b,8);this.xb=d.scale.nz(e,b,b);this.rU.a9v(this.GP);
this.rU.dN(this.sb);this.sb.dN(this.rU);i.appendChild(this.rU.n);if(x)i.appendChild(this.GP);else i.appendChild(this.sb.n)}a9.prototype=new j0;
a9.prototype.$O=function(){return new bC(0,0)};a9.prototype.sD=function(){return!0};a9.prototype.oN=function(x,Q){this.ww=x;
this.R0=Q;Q=Q-44;if(x<600)Q-=29;if(this.NZ==null)return;var c=this.NZ.K$,$=gS.ai6(x,Q,c.m,c.e);if($==1)Q-=3;
if($==0){x=Math.floor(x/2);E.ZW(this.KA,"flexrow")}else{Q=Math.floor(Q/2);E.WP(this.KA,"flexrow")}E.qr(this.GP,x,Q);
this.rU.oN(x,Q);if(this.k4)this.Mc();else this.sb.oN(x,Q)};a9.prototype.sM=function(x,Q,c,$){this.rU.sM($)};
a9.prototype._=function(){j0.prototype._.call(this);for(var x in this.AZ)this.AZ[x]._()};a9.prototype.BM=function(x,Q){this.w4=x;
this.ke=null;var c=x.B[x.g[0]],$=d.w9.afv(c.buffer.buffer,c.rect.m,c.rect.e).abR,z=$/((c.rect.m-2)*(c.rect.e-2)),j=this.AZ;
j.cnum.U(20);j.nois.U(z<.75);j.mode.U(z<.75?1:0);j.segm.U(!1);j.cbok.U(!1);j.poly.U(!1);j.merg.U(!0);
j.polE.U(1);j.dthr.U(!1);var U=c.rect.clone();U.x=U.y=0;this.NZ={K$:U,data:c.buffer.buffer.slice(0)};
this.J3=null;this.oN(this.ww,this.R0);this.rU.U([this.NZ]);this.rU.MR();this.Ab=!0;this.Z2.U([!0,!1,!1]);
setTimeout(this.vZ,20)};a9.prototype.Zi=function(){var x=!0,Q=Date.now(),c=this.NZ,$=this.AZ,z=$.cnum.h(),j=$.nois.h(),U=$.mode.h(),i=$.segm.h(),b=$.cbok.h(),e=$.poly.h(),k=$.merg.h(),K=$.polE.h(),r=null;
if(U==0)i=e=b=!1;var g=$.dthr.h(),R=["cnum","nois","mode"];if(U==1){R.push("cbok");if(this.k4){R.push("poly");
if(e)R.push("polE");R.push("vprm")}}if(this.k4)R.push("merg");else R.push("dthr");R.push("ok");E.Os(this.n5);
for(var F=0;F<R.length;F++)this.n5.appendChild($[R[F]].n);if(x)console.log("---------------------------------------");
var T=j||i,D=j+","+i;if(T&&(this.J3==null||this.wm!=D)){this.wm=D;var a=new Uint8Array(c.data),_=c.K$.m,I=c.K$.e;
if(j){if(this.ke==null){this.ke=a.slice(0);d.Zt.St=35;d.Zt.fO(this.ke,this.ke,_,I,15,1);if(x){console.log("denoise",Date.now()-Q);
Q=Date.now()}}a=this.ke.slice(0)}else a=a.slice(0);if(i){var f=d.w9.ew(a,_,I,40,10),y=f.ui,Z=new Uint8Array(y*4);
for(var F=0;F<y;F++){var v=F*4,G=F*6,q=1/f.f8[G+5];Z[v]=f.f8[G]*q;Z[v+1]=f.f8[G+1]*q;Z[v+2]=f.f8[G+2]*q}for(var F=0;
F<a.length;F+=4){var h=f.AJ[F>>>2]*4;a[F]=Z[h];a[F+1]=Z[h+1];a[F+2]=Z[h+2]}if(x){console.log("segm",Date.now()-Q);
Q=Date.now()}}this.J3={K$:c.K$.clone(),data:a.buffer}}if(T)c=this.J3;var a=new Uint8Array(c.data),_=c.K$.m,I=c.K$.e;
for(var F=0;F<a.length;F+=4){if(a[F+3]<10)a[F]=a[F+1]=a[F+2]=a[F+3]=0}if(U==0){r=d.w9.a5I(a,_,I,z,T?.1:2e-4);
if(x){console.log("quantize",Date.now()-Q);Q=Date.now()}}if(U!=0||r&&r.cA.length<2){r=ag.a1e(a.buffer,z,_,I,null,b)}if(this.k4){var H=r.AJ.slice(0);
for(var F=0;F<H.length;F++)H[F]++;this.k8=d.w9.a8w(r.AJ,_,I);var o=new Uint8Array((_+2)*(I+2));d.L2(H,new gh(1,1,_,I),o,new gh(0,0,_+2,I+2));
if(!e){var P=Math.round((_+2)*(I+2)/1e4),O=iw.a6(o.slice(0),_+2,I+2,Math.min(12,P)),p=iw.zo(O);if(x){console.log("trace smooth",Date.now()-Q);
Q=Date.now()}}else{var p=d.A.aeY(o,_+2,I+2,K,x)}var C=p.length,W=new bI(1,0,0,1,-1,-1);for(var F=0;F<C;
F++)d.A.i(p[F].path.j,W,p[F].path.j);this.f9=p;this.O5=r;for(var F=0;F<C;F++){var J=p[F];for(var t=F+1;
t<C;t++){var Y=p[t];if(Y.parent==F&&r.cA[Y.color-1].est.q[3]<.05){var l=Y.path.G.slice(1),m=l.pop();
if(m!="Z")l.push(m);l.reverse();l=["M"].concat(l);if(m=="Z")l.push("Z");var B=[],O=Y.path.j.length;for(var L=0;
L<O;L+=2){B[L]=Y.path.j[O-2-L];B[L+1]=Y.path.j[O-2-L+1]}d.A.concat(J.path,{j:B,G:l})}}}if(x){console.log("finding holes",Date.now()-Q);
Q=Date.now()}for(var F=0;F<p.length;F++){var A=p[F];if(A.parent!=-1){var S=p[A.parent];A.parent=S;if(S.RT==null)S.RT=[];
S.RT.push(A)}A.depth=A.parent==-1?0:A.parent.depth+1}if(k){function M(gJ,V){var dR={},fO=0,ko=0;for(var F=0;
F<gJ.length;F++){var n=gJ[F].color,L="c"+n;if(n==V)throw n;if(dR[L]==null)dR[L]=0;dR[L]++;if(dR[L]>fO){fO=dR[L];
ko=n}}return ko}var N=[],s=[],V=-1,g8=!0;for(var F=0;F<p.length;F++)if(p[F].parent==-1)s.push(p[F]);
while(s.length!=0){var n=M(s,V);V=n;for(var F=0;F<s.length;F++)if(s[F].color==n){var cQ=s[F];N.push(cQ);
s.splice(F,1);F--;if(cQ.RT)for(var t=0;t<cQ.RT.length;t++){s.push(cQ.RT[t]);if(cQ.RT[t].color!=n)g8=!1}}}if(g8)p=N;
else{var hk=[];for(var eG=0;eG<500;eG++){var ie=[],O=hk[eG-1];hk.push(ie);for(var F=0;F<p.length;F++){var A=p[F],S=A.parent;
if(eG==0&&S==-1||eG!=0&&O.indexOf(S)!=-1){ie.push(A);p.splice(F,1);F--}}ie.sort(function(gJ,dR){return gJ.color-dR.color});
if(p.length==0)break}for(var F=0;F<hk.length;F++)p=p.concat(hk[F])}}else{var N=[],eN=[];while(p.length!=0){eN.push(p.shift());
while(eN.length!=0){var gr=eN.pop();N.push(gr);if(gr.RT)for(var F=0;F<gr.RT.length;F++){var A=gr.RT[F];
p.splice(p.indexOf(A),1);eN.push(A)}}}p=N}this.f9=p;for(var F=0;F<p.length;F++){var J=p[F],ek=r.cA[J.color-1].est.q;
if(ek[3]<=.05){p.splice(F,1);F--;continue}}for(var F=1;F<p.length;F++){var jK=p[F-1],J=p[F];if(jK.color==J.color&&(k||jK.parent==J.parent&&jK.depth>=2)){d.A.concat(jK.path,J.path);
p.splice(F,1);F--;continue}}if(x){console.log("reordering layers",Date.now()-Q,C,p.length);Q=Date.now()}this.Mc()}else{var iE=new Uint32Array(_*I),e9=_*I,dm=this.a32=new Uint8Array(iE.buffer);
if(g){var kD=[];for(var F=0;F<r.cA.length;F++)kD.push(r.cA[F].est.rgba);var h=d.R(_*I);UPNG.encode.dither(new Uint8Array(c.data),_,I,kD,dm,h)}else{for(var F=0;
F<e9;F++){var n=r.cA[r.AJ[F]];iE[F]=n.est.rgba}}this.sb.U([{K$:c.K$,data:iE.buffer}]);if(this.Ab){this.sb.MR();
this.Ab=!1}}};a9.prototype.Mc=function(x){if(this.f9==null)return;var Q=this.Z2.h(),c=this.NZ.K$.m,$=this.NZ.K$.e,z=this.f9,j=this.O5.cA,U=this.GP,i=this.Yt,b=this.rU.m1(),k="rgba(0,0,0,0.3)";
i.setTransform(1,0,0,1,0,0);i.clearRect(0,0,U.width,U.height);i.translate(U.width/2,U.height/2);i.scale(b.W,b.W);
i.translate(b.z.x/b.W-c/2,b.z.y/b.W-$/2);i.scale(1/b.W,1/b.W);i.fillStyle=this.xb;i.fillRect(0,0,c*b.W,$*b.W);
i.scale(b.W,b.W);i.lineWidth=(c+$)*5e-4;var e=this.kF();i.strokeStyle=k;for(var K=0;K<2;K++){if(!Q[K])continue;
for(var F=0;F<z.length;F++){var g=z[F],R=e[g.color-1];if(R.V==0)continue;i.fillStyle=R.Ij;i.beginPath();
Typr.U.pathToContext({crds:g.path.j,cmds:g.path.G},i);if(K==0)i.fill();else i.stroke()}}if(Q[2])this.ac$(i,c,$)};
a9.prototype.kF=function(){var x=this.O5.cA,Q=[];for(var F=0;F<x.length;F++){var c=x[F].est.q,$={Z:Math.round(255*c[0]),r:Math.round(255*c[1]),J:Math.round(255*c[2]),V:Math.round(255*c[3])};
$.Ij="rgba("+$.Z+","+$.r+","+$.J+","+$.V/255+")";Q.push($)}return Q};a9.prototype.ac$=function(x,Q,c){var $=this.kF(),z=this.a4w(Q,c,$);
function j(e,k,K,g){x.font=g+"px sans-serif";e++;var R=x.measureText(e);x.fillText(e,k-R.width/2,K+g*.25)}x.fillStyle="rgba(0,0,0,0.5)";
var U=this.k8;for(var F=0;F<U.length;F++){var i=U[F];if(i[3]<Q*c*5e-4)continue;j(i[2],i[0],i[1],(Q+c)*.008)}x.fillStyle="rgba(255,255,255,1)";
x.fillRect(0,0,z,z*$.length);for(var F=0;F<$.length;F++){var b=$[F];x.fillStyle=b.Ij;x.fillRect(z,z*F,z,z);
x.fillStyle="black";j(F,z*.5,z*(F+.5),z*.65)}};a9.prototype.a4w=function(x,Q,c){var $=c.length*(x+Q)/70;
return Math.min(Q,$)/c.length};a9.prototype.K6=function(x){var Q=this.w4,c=Q.g[0],$=Q.B[c],z=new jO(u.E.v,!0);
z.Oe=!0;z.f=X.Mf;var j=this.n$.Dn,U=this;if(this.k4){var i=this.kF(),K=0,R=!1;function b(I,a){var _=Q.Xh();
_.opacity=a.V;_.H2|=16;_.add.SoCo={classID:"null",Clr:{t:"Objc",v:d.I.lV(a)}};_.add.vmsk=new eM.hn;_.add.vstk=aF.XM.$H(!0);
_.add.vmsk.$=I;_.jz();_.kT(Q);return _}var k=this.Z2.h();for(var F=0;F<3;F++)if(k[F])K++;if(K==0){alert("Enable Fill, Stroke or Labels");
return}var g=this.f9;if(K==1&&k[0]&&g.length==1)R=!0;var T=Q.B.slice(0,c);if(!R)T.push(Q.x6());if(k[0])for(var F=0;
F<g.length;F++){var D=g[F],a=i[D.color-1];d.A.i(D.path.j,new bI(1,0,0,1,$.rect.x,$.rect.y),D.path.j);
var _=b(d.A.tf(D.path,!1),a);_.gF("Path "+F);T.push(_)}if(k[1]){var _=Q.Xh();_.gF("Stroke");T.push(_);
_.opacity=128;_.H2|=16;_.add.SoCo={classID:"null",Clr:{t:"Objc",v:d.I.lV({Z:0,r:0,J:0})}};_.add.vmsk=new eM.hn;
_.add.vstk=aF.XM.$H(!1,!0);var I=[];for(var F=0;F<g.length;F++){var D=g[F],f=d.A.tf(D.path,!1);if(F==0)I=f;
else I=I.concat(f.slice(2))}_.add.vmsk.$=I;_.jz();_.kT(Q)}if(k[2]){var y=this.NZ.K$,Z=y.m,v=y.e,G=this.a4w(Z,v,i);
T.push(Q.x6());function q(O,p,C,W){O=1+O+"";var _=Q.Xh();T.push(_);_.opacity=W;_.add.lnsr="rend";var J=_.add.TySh=dU.Y7(p-G*.2,C+G*.25),t=_.add.TySh.HW,Y=dU.zl(t,0,0);
Y.VA.FontSize=Math.round(G*.6);dU.G4(t,0,0,Y);dU.U3(t,0,O);_.cS();if(aE.$B(J,j,U)){aE.Wz(_,j,Q);Q.c()}}var h=this.k8;
for(var F=0;F<h.length;F++){var r=h[F];if(r[3]<Z*v*5e-4)continue;q(r[2],r[0],r[1],128)}var _=b(d.o.JE.Rect(0,0,G,G*i.length),{Z:255,r:255,J:255,V:255});
_.gF("white");T.push(_);for(var F=0;F<i.length;F++){var a=i[F],_=b(d.o.JE.Rect(G,G*F,G,G),a);_.gF("color");
T.push(_);q(F,G/2,G*(F+.5),255)}var _=Q.Xh();_.gF("Labels");_.add.lsct=hA.H3;_.s3="pass";_.H2=24;T.push(_)}var H=T[T.length-1];
if(!R){var _=Q.Xh();_.gF($.getName());_.add.lsct=hA.DJ;_.s3="pass";_.H2=24;T.push(_);H=_}var o=$.add.lmfx;
if(o)H.add.lmfx=JSON.parse(JSON.stringify(o));var P=T.length;for(var F=c+1;F<Q.B.length;F++)T.push(Q.B[F]);
z.data={d:eM.ty,Yo:T,UI:[P-1],LX:[11,11,0]}}else{var T=Q.B.slice(0),_=Q.Xh();_.gF($.getName());T.splice(Q.g[0]+1,0,_);
_.rect=$.rect.clone();_.buffer=this.a32;_.c();z.data={d:eM.ty,Yo:T,UI:[Q.g[0]+1],LX:[11,11,1]}}this.T(z);
this.close();Q.RS=!0};a9.prototype.Fy=function(x,Q){this.n$=x};function gS(x){j0.call(this,[[7,11],[7,13]][x],["redge","magiccut"][x]);
this.iV=x;this.NZ={};this.Vr=null;this.B4=null;this.w4=null;this.KX=null;this.If=null;this.body.style.padding="0";
this.sp=[];this.WM=-1;this.n5=E.p("div","form hbar padded");this.body.appendChild(this.n5);this.zS=new aJ;
this.zS.parent=this;this.zS.k(u.E.t,this.Rv,this);this.n5.appendChild(this.zS.n);var Q=x==0?["#ffffff","#888888","#000000"]:["#00dd00","#888888","#ff0000"];
Q=Q.concat("tools/hand","zoomIn","zoomOut");var c=x==0?[[12,45],"Unknown",[12,46]]:[[12,45],"Erase",[12,46]];
this.VF=new az(null,Q,c,28);this.VF.k(u.E.t,this.sM,this);this.n5.appendChild(this.VF.n);this.PL=new f0([7,9],0,50,null);
this.PL.parent=this;this.PL.k(u.E.t,[this.adn,this.Zi][x],this);this.n5.appendChild(this.PL.n);var $=this.at6=new j7([2,2],!1,null,!0);
$.k("click",this.SJ,this);this.n5.appendChild($.n);var z=this.BL=E.p("span","form");this.n5.appendChild(z);
var j=this.avC=new j7([12,90],!1,null,!0);j.k("click",function(b){alert(x==0?ah.get([15,7,1]):"Mark the object with Green, background with Red. The majority of the area should stay unpainted. Two colors should never touch.",5e3)},this);
z.appendChild(j.n);var U=new j7("Tutorial",!1,null,!0);U.k("click",this.akU,this);z.appendChild(U.n);
this.nM=new az([12,46],["checker","#ffffff","#000000"]);this.nM.k(u.E.t,this.ah4,this);z.appendChild(this.nM.n);
this.Wh=new c7(null,[[6,13],[6,2],[17,2]]);z.appendChild(this.Wh.n);this.CH=E.wb(this,z,!1);var i=this.KA=E.p("div","flexrow");
this.body.appendChild(i);this.n7=new cJ(!0);this.SZ=new cJ;this.n7.dN(this.SZ);this.SZ.dN(this.n7);this.n7.k("mousedown",this.Nn,this);
this.n7.k("mousemove",this.G3,this);this.n7.k("mouseup",this.zc,this);this.n7.k("zoom",this.Rv,this);
this.SZ.k("zoom",this.Rv,this);i.appendChild(this.n7.n);i.appendChild(this.SZ.n)}gS.prototype=new j0;
gS.prototype.OL=function(x,Q){var c=x!=null&&!x.B[x.g[0]].rect._6();if(!c)alert("The layer is empty.");
return c};gS.prototype.$O=function(){return new bC(0,0)};gS.prototype.sD=function(){return!0};gS.prototype.oN=function(x,Q){this.ww=x;
this.R0=Q;Q=Q-12-33;if(x<900){this.BL.setAttribute("style","display:block;  text-align:right;");Q-=29}else{this.BL.setAttribute("style","position:absolute;  right:0px")}this.nM.UG(x<440?null:[12,46]);
this.PL.UG(x<470?null:[7,9]);var c=this.NZ.rect;if(c){var $=gS.ai6(x,Q,c.m,c.e);if($==0){x=Math.floor(x/2);
E.ZW(this.KA,"flexrow")}else{Q=Math.floor(Q/2);E.WP(this.KA,"flexrow")}this.n7.oN(x,Q);this.SZ.oN(x,Q)}};
gS.ai6=function(x,Q,c,$){var z=x/2,j=Q/2,U=Math.min(z/c,Q/$),i=Math.min(x/c,j/$);return U>i?0:1};gS.prototype._=function(){j0.prototype._.call(this);
this.zS._();this.PL._();this.CH._();this.nM._();this.Wh._();this.at6._();this.avC._()};gS.prototype.akU=function(x){window.open("//www.photopea.com/"+["learn/refine-edge","tuts/magic-cut-remove-image-background-online"][this.iV],"_blank")};
gS.prototype.Fy=function(x,Q){this.B4=x;if(Q==ke.gN||Q==ke.m6){this.zS.RN(x.bX);this.zS.U(d1.Bk(),x.bX.Dq,x.bX.Rk)}};
gS.prototype.sM=function(x,Q,c,$){var z=this.VF.h();if($==null){this.n7.sM(cJ.A1(z-3));return}this.KX=$;
var j=X.x7.cI(this.zS.h(),$);if(j!=null){this.zS.U(j);this.Rv()}else if($.S(fM.qP)&&$.S(fM.hy)){var U=this.sp,i=0;
if($.S(fM.FT)){if(this.WM+1<U.length)i=1}else if(this.WM>0)i=-1;if(i!=0){this.WM+=i;var b=this.WM,e=this.NZ;
if(i==1)d.WK(U[b][2],U[b][0],e.IK,e.rect);else d.WK(U[b+1][1],U[b+1][0],e.IK,e.rect);e.p2=e.rect;this.Zi()}}else if(z<3)this.n7.sM($)};
gS.prototype.VD=function(x){var Q=this.NZ,c=this.sp,$=d.R(x.P()*4);d.WK(Q.d7,Q.rect,$,x);Q.d7=null;var z=d.R(x.P()*4);
d.WK(Q.IK,Q.rect,z,x);this.WM++;c[this.WM]=[x.clone(),$,z];while(c.length>this.WM+1)c.pop();while(c.length>50){c=c.slice(1);
this.WM--}};gS.prototype.Rv=function(){var x=this.B4,Q=cG.$a(this.zS.h(),x.bX.Dq,this.n7.m1().W);this.n7.vM(Q)};
gS.prototype.Nn=function(x){var Q=this.B4,c=this.NZ,$=this.KX,z=this.zS.h(),j=this.n7.s_(),U=[16777215,8421504,0][this.VF.h()];
this.Vr=new cG(z,Q.bX.Dq,Q.bX.Rk,{j_:1,CM:!0},U,Q.QI,c.rect);c.d7=c.IK.slice(0);if($!=null&&$.S(fM.FT)&&this.If){this.Vr.moveTo(this.If.x,this.If.y);
this.Vr.lineTo(j.x,j.y)}else this.Vr.moveTo(j.x,j.y);this.ahJ()};gS.prototype.G3=function(x){var Q=this.NZ,c=this.n7.s_();
this.Vr.lineTo(c.x,c.y);this.ahJ()};gS.prototype.zc=function(x){this.If=this.n7.s_();this.VD(this.Vr.vJ());
this.Zi()};gS.prototype.ahJ=function(){var x=this.NZ,Q=this.Vr,c=Q.BB();if(c._6())return;x.p2=c;d.l.UY("norm",Q.GM(),Q.Pe(),x.IK,x.rect,c,1);
this.ae1()};gS.prototype.SJ=function(x){var Q=this.NZ;Q.d7=Q.IK.slice(0);Q.p2=Q.rect;d.h4(Q.IK,[4278190080,4292730333][this.iV]);
this.VD(Q.rect);this.Zi()};gS.prototype.BM=function(x,Q){this.w4=x;var c=x.B[x.g[0]],$=c.rect.clone(),z=$.m,j=$.e,b;
this.PL.U(this.iV==0?3:z*j<3e6?3:0);this.VF.U(x.u==null?0:1);this.PL.hp();if(this.iV==0&&x.u!=null||this.iV==1)this.PL.bJ();
var U=this.iV,i=d.R($.P());if(U==0&&x.u){d.L2(x.u.channel,x.u.rect,i,$);var e=d.R($.P());for(var k=0;
k<j;k++)for(var K=0;K<z;K++){var F=k*z+K,g=i[F];if(K>0&&i[F-1]!=g||K<z-1&&i[F+1]!=g||k>0&&i[F-z]!=g||k<j-1&&i[F+z]!=g)e[F]=255}b=d.style.Jw(e,b,z,j)}else{b=new Float32Array($.P());
b.fill(1e9)}$.x=$.y=0;this.NZ={rect:$,AX:c.buffer,Cj:i,j0:b,Pd:d.R($.P()*4),rP:d.R($.P()*4),IK:d.R($.P()*4),d7:null,JK:null,p2:$,aeC:{}};
if(U==0)this.adn();else{this.NZ.aeC=X.v_.alH(x);var R=this.NZ.IK;d.h4(R,4287137928);var T=d.hA.getSelection(c.buffer,z,j),D=Math.round(z/60),a=Math.round(.7*j);
for(var k=0;k<j;k++)for(var K=0;K<z;K++){var _=(k*z+K)*4,I=T[_>>>2];I=I>128?255:128;if(k<D||k<a&&(K<D||K>z-1-D))I=0;
R[_]=R[_+1]=R[_+2]=I}this.Zi()}this.sp=[1];this.WM=0;var f=this.zS.h();f.Brsh.v.Dmtr.v.val=Math.round($.m/(U==0?10:20));
this.zS.U(f);this.Rv();this.oN(this.ww,this.R0);this.n7.MR()};gS.prototype.adn=function(){var x=this.NZ,Q=x.rect.P(),c=this.PL.h(),$=x.Cj.slice(0);
for(var F=0;F<Q;F++)if(x.j0[F]<c)$[F]=128;d.h4(x.IK,4294967295);d.Dm($,x.IK,0);d.Dm($,x.IK,1);d.Dm($,x.IK,2);
x.p2=x.rect;this.Zi()};gS.prototype.Zi=function(){var x=this.NZ,z,i,b=0,e=0,k=0;this.ae1();var Q=x.rect,c=Q.m,$=Q.e,j=d.R(Q.P()),U=x.AX;
d.GS(x.IK,j,0);for(var F=0;F<j.length;F++){if(U[(F<<2)+3]!=255)continue;var K=j[F];if(K==0)b++;else if(K==255)e++;
else k++}if(b*e*k!=0){if(this.iV==0)i=d.GQ.GQ(Q,U,j);else{var g=this.VF.h();for(var R=1;R<$;R++)for(var T=1;
T<c;T++){var F=R*c+T,D=j[F],a=j[F-1];if(D==0&&a==255||D==255&&a==0){z="The Red and Green should never touch! Erase it with Grey.";
break}}var _=Date.now(),I=this.NZ.aeC;d.SO(j,I.qa);X.v_.Fd(I,!0,this.w4);var f=Math.ceil(this.PL.h()/2);
if(f==0){i=U.slice(0);d.Dm(I.u,i,3)}else{var y=I.u.slice(0),Z=I.u.slice(0);for(var v=0;v<f;v++){for(var R=1;
R<$-1;R++)for(var T=1;T<c-1;T++){var F=R*Q.m+T,G=y[F];if(y[F-c]!=G||y[F-1]!=G||y[F+1]!=G||y[F+c]!=G)Z[F]=128;
else Z[F]=G}var q=y;y=Z;Z=q}for(var R=0;R<$;R++)for(var T=0;T<c;T++){var F=R*c+T;if(j[F]==0||j[F]==255)y[F]=j[F]}i=d.GQ.GQ(Q,U,y,20,!1)}}}else{i=U.slice(0);
d.Dm(j,i,3)}for(var F=3;F<i.length;F+=4)if(i[F]>U[F])i[F]=U[F];if(Q.HM(x.rect))x.JK=i;else d.WK(i,Q,x.JK,x.rect);
this.ah4();if(z)alert(z,4e3)};gS.prototype.ae1=function(x){var Q=this.NZ,c=Q.p2;d.WK(Q.AX,Q.rect,Q.Pd,Q.rect,c,!0);
var $=Q.IK,z=Q.rect,j=Date.now();if(this.iV==1){var U=new Uint32Array(256);U[0]=4278190335;U[255]=4278255360;
var i=d.R(c.P()*4),b=c.P();d.WK($,z,i,c);$=i;z=c;var e=new Uint32Array($.buffer);for(var F=0;F<b;F++)e[F]=U[e[F]&255]}console.log(Date.now()-j);
d.l.UY("norm",$,z,Q.Pd,Q.rect,c,.3);this.n7.U([{K$:Q.rect,data:Q.Pd.buffer}],null,null,c)};gS.prototype.ah4=function(x){var Q=this.NZ;
d.h4(Q.rP,[0,4294967295,4278190080][this.nM.h()]);d.l.UY("norm",Q.JK,Q.rect,Q.rP,Q.rect,Q.rect,1);this.SZ.U([{K$:Q.rect,data:Q.rP.buffer}])};
gS.prototype.K6=function(x){var Q=this.w4,c=this.NZ,$=this.Wh.h(),z=Q.B[Q.g[0]],j=new jO(u.E.v,!0);j.Oe=!0;
var U=z.rect.clone();if($==0&&z.M5()||$!=0&&!z.M5()){j.f=X.Mf;j.data={d:eM.Ul,a:Q.g[0]};this.T(j)}if(Q.u!=null){j.f=X.kJ;
j.data={d:"fromAction",fe:X.U_.sd()};this.T(j)}if($==0){var i=Q.B.slice(0),b=Q.Xh();b.gF(z.getName());
i.splice(Q.g[0]+1,0,b);b.rect=U;b.buffer=c.JK;b.c();j.f=X.Mf;j.data={d:eM.ty,Yo:i,UI:[Q.g[0]+1],LX:[7,11]};
this.T(j)}if($==1){var k=z.Rz();j.f=X.Mf;j.data={d:eM.zP,apf:!0};this.T(j);var K=z.Rz();K.channel=d.R(U.P());
K.rect=U;K.color=0;K.ha=!0;d.GS(c.JK,K.channel,3);if(k){var g=K.Vi(k);K.rect=g.rect;K.channel=g.channel;
K.color=g.color}K.NK();z.kT()}if($==2){var R={rect:U,channel:d.R(U.P())};d.GS(c.JK,R.channel,3);j.f=X.kJ;
j.data={d:"setsel",u:R,LX:this.MW};this.T(j)}this.close()};function cV(){j0.call(this,[1,13],"locstor");
this.n$=null;this.Vp=[];var x=this.body,Q=E.p("p");Q.textContent="These files are loaded every time you start Photopea.";
x.appendChild(Q);this.aBz=0;this.Y4=E.p("span");x.appendChild(this.Y4);this.Y4.setAttribute("style","display:inline-block;  width:12em;  font-weight:bold;");
var c=E.p("span","form");x.appendChild(c);this.oI=new j7([5,4],!1,null,!0);this.oI.k("click",this.Gg,this);
c.appendChild(this.oI.n);this.m9=new j7("Get all as ZIP",!1,null,!0);this.m9.k("click",this.tc,this);
c.appendChild(this.m9.n);this.gs=new jn(!0);this.gs.parent=this;this.gs.VW(1);x.appendChild(this.gs.n);
this.gs.n.setAttribute("style","width: 40em; height: 25em")}cV.prototype=new j0;cV.prototype._=function(){j0.prototype._.call(this);
this.Y4.textContent=ah.get([13,2])+": "+cI.dc(this.aBz);this.oI._()};cV.prototype.Fy=function(x,Q){this.n$=x;
if(Q==ke.P5)this.BM()};cV.prototype.BM=function(x,Q){var c=this.n$.dE.rG,b=0;this.Vp=[];for(var $ in c)this.Vp.push($);
this.Vp.sort(function(k,K){k=k.split(".");K=K.split(".");return k[1]==K[1]?k[0]<K[0]?-1:1:k[1]<K[1]?-1:1});
var z=Math.floor(100*E.q_()),j=Math.floor(16*E.q_()),U=[],i=[];for(var F=0;F<this.Vp.length;F++){var $=this.Vp[F],e=cV.Zh($,c[$],z,j);
U.push(e);i.push($);b+=c[$].byteLength}this.gs.SY(U,i,z,j);this.aBz=b;this._()};cV.prototype.Gg=function(x){var Q=this.gs.h();
if(Q.length==0){alert("Select a file first.");return}this.gs.U([]);var c=this.n$.dE.rG;for(var F=0;F<Q.length;
F++)delete c[this.Vp[Q[F]]];var $=new jO(u.E.M,!0);$.data={d:u.H.hW,hF:ke.P5};this.T($)};cV.prototype.tc=function(x){var Q=this.n$.dE.rG,c={};
for(var $ in Q)c[$]=new Uint8Array(Q[$]);var z=UZIP.encode(c);hF.save(z,"resources.zip")};cV.Zh=function(x,Q,c,$){var z=E.p("canvas"),i=0;
z.width=c;z.height=$;var j=z.getContext("2d"),U=x.split(".").pop().toLowerCase();for(var F=0;F<U.length;
F++)i+=U.charCodeAt(F)*613<<8*F;j.fillStyle="#"+d.vg(i&16777215);j.fillRect(0,0,20,$);var b=Math.floor(14*E.q_());
j.fillStyle="#000000";j.font="bold "+b+"px sans-serif";var e=($-b)/2,k=cI.dc(Q.byteLength),K=j.measureText(k);
j.fillText(k,c-12-K.width,$-e);return z.toDataURL()};function gk(){j0.call(this,[1,15],"pmanager");this.n$=null;
this.fl=new c7([12,44],[[9,3],[12,37],[12,62],[11,6],[12,77],[12,21]]);this.fl.k(u.E.t,this.BM,this);
this.body.appendChild(this.fl.n);var x=E.p("div","flexrow");this.body.appendChild(x);var Q=this.ajU=E.p("div");
x.appendChild(Q);var c=E.p("div","form");x.appendChild(c);c.setAttribute("style","width:140px; margin-left:12px");
this.atu=[ke.gN,ke.L7,ke.qL,ke.ZO,ke.fB,ke.qY];this.Aw=[new aJ,new eF,new bh,new jV,new gT,new db];for(var F=0;
F<this.Aw.length;F++)this.Aw[F].parent=this;this.uD=[];for(var F=0;F<4;F++){var $=new j7("Hello",!0,null,!0);
$.k("click",this.Di,this);this.uD.push($);c.appendChild($.n)}this.BM()}gk.prototype=new j0;gk.prototype.Da=function(x){return x==fM.Hm||x==fM.Z1};
gk.prototype.Di=function(x){var F=this.uD.indexOf(x.target);this.Aw[this.fl.h()].To(F)};gk.prototype._=function(){j0.prototype._.call(this);
this.fl._();for(var F=0;F<this.Aw.length;F++)this.Aw[F]._();var x=this.uD,Q=this.fl.h(),c=ke.dO[this.atu[Q]],$=c[0].toUpperCase();
x[0].UG([[23,6],"."+$]);x[1].UG(["VAR0 ."+$,[1,8]]);x[2].UG([6,37]);x[3].UG([5,4])};gk.prototype.Fy=function(x,Q){this.n$=x;
this.BM()};gk.prototype.BM=function(x,Q){if(!E.rm(this.n))return;this._();E.Os(this.ajU);this.ajU.appendChild(this.Aw[this.fl.h()].tg);
var c=this.Aw,$=this.n$;if($==null)return;c[0].RN($.bX);c[1].uq($.Gj,$.QI);c[1].RN($.Op);c[2].RN($.Yf);
c[3].RN([$.Xe,$.Yf]);c[4].RN($.jS);c[5].RN($.fc)};function is(x,Q,c){j0.call(this,Q,"cwindow");this.agR=new bC(c[0],c[1]-33);
this.n5=E.p("div","form");this.n5.setAttribute("style","width:"+(c[2]-c[0])+"px; height:"+(c[3]-c[1])+"px");
this.body.appendChild(this.n5)}is.prototype=new j0;is.prototype.$O=function(x,Q){return this.agR.clone()};
function gV(x){var Q=gV.aBY(x);j0.call(this,Q,"res"+x);var c=this.amE.bind(this);window.addEventListener("message",function(z){if(typeof z.data=="string"&&z.data.startsWith("--et ")){console.log(z.data);
var j=this.aoF=z.data.slice(5).split(",");j[0]=parseFloat(j[0]);dQ.n6(j[0],j[1],c)}}.bind(this));this.Qi=Q;
this.fX=x;this.adc=null;this.ot=null;this.nu=0;this.WQ=null;this.xJ=null;this.aoF=null;this.n$=null;
this.body.setAttribute("style","padding:0");this.Yi=new j7("",null,null,!0);this.body.appendChild(this.Yi.n);
this.Yi.k("click",this.Hd,this);this.Yi.n.setAttribute("style","position:absolute; margin-top: -28px;  margin-left:150px");
this.FZ=new j7("\u25BC",null,null,!0);this.FZ.n.setAttribute("style","position:absolute; margin-top: -28px;  margin-left:270px");
this.FZ.k("click",this.aiF,this);this.body.appendChild(this.FZ.n);this.iM=E.p("span","form");this.body.appendChild(this.iM);
this.uD=[];for(var F=0;F<9;F++){var $=new j7(gV.aBY(F));this.uD.push($);if(F==x)$.U(!0);this.iM.appendChild($.n);
$.k("click",this.ay0,this)}this.o6=new j7([5,3],null,null,!0);this.o6.k("click",this.ad3,this);this.aob=new j7("Upload Current Document as a Template",null,null,!0);
this.aob.k("click",this.a20,this);this.vL=new el("Creator / Brand name");this.Tf=new j7([1,2],null,null,!0);
this.Tf.k("click",this.tc,this);this.bW=E.p("iframe","scrollable");this.bW.setAttribute("style","border:none; margin:0; padding:0;");
this.NA=E.p("div","form scrollable padded");this.XB=new du(x);this.XB.k("back",this.SJ,this);this.XB.k("save",this.a2B,this);
this.body.appendChild(this.bW)}gV.prototype=new j0;gV.aBY=function(x){var Q;if(x==0)Q=[25,0];else if(x==1)Q="Plugins";
else for(var c in ke.dO)if(ke.dO[c][4]==x)Q=ke.dO[c][3];return Q};gV.prototype.aiF=function(x){this.iM.style.display=this.iM.style.display=="none"?"":"none"};
gV.prototype.ay0=function(x){var F=this.uD.indexOf(x.target);if(F==this.fX)return;this.close();var Q=new jO(u.E.M,!0);
Q.data={d:u.H.LL,AD:"res"+F};this.T(Q)};gV.prototype.amE=function(x){this.Hd();this.xJ=JSON.parse(x.target.response);
this.rw()};gV.prototype.$O=function(x,Q){return new bC(0,0)};gV.prototype.oN=function(x,Q){this.ww=x;
this.R0=Q;this.D9=null;Q=Q-4;x=x;var c=x>820,$="position:absolute; margin-top: -30px;  margin-left:270px;  margin-right:20px;",z="position:absolute; margin-top:   0px;  padding:10px;  display:none;  background-color: var(--base);  width:100%;  text-align:center;";
this.iM.setAttribute("style",c?$:z);this.iM.style.marginTop=(c?-31:0)+"px";this.FZ.n.style.display=c?"none":"";
var j=this.NA;j.style.width=x-12+"px";j.style.height=Q-12+"px";var j=this.XB.n;j.style.width=x-12+"px";
j.style.height=Q-12+"px";var j=this.bW;j.style.width=x+"px";j.style.height=Q+"px";this.GJ()};gV.prototype.Fy=function(x,Q){this.n$=x};
gV.prototype._=function(){j0.prototype._.call(this);for(var F=0;F<this.uD.length;F++)this.uD[F]._();
this.o6._()};gV.prototype.BM=function(x,Q,c,$){this.D9=x;this.Hd(null,!1)};gV.prototype.Hd=function(x,Q){var c=Q!=null?Q:E.rm(this.bW);
if(c){if(!dQ.dP()){alert("You need to log in first!");return}var $=dQ.JO();this.ot=$.tpl?$.tpl.list:[];
this.vL.U($.tpl&&$.tpl.brnd?$.tpl.brnd:"");this.GJ()}else{this.bW.setAttribute("src","");this.bW.setAttribute("src","templates/index.html?type="+this.fX+""+this.n$.jn.join(","))}this.body.removeChild(this.body.children[this.body.children.length-1]);
this.body.appendChild(c?this.NA:this.bW);var z=ah.get(this.Qi);this.Yi.UG(c?"All "+z:"Add "+z)};gV.prototype.GJ=function(){var x=ah.get(this.Qi),Q=this.ot,c=this.fX,i=450;
if(Q==null)return;var $=this.NA;E.Os($);var z=E.p("h1");$.appendChild(z);z.textContent="Share your "+x+" with the world!";
var j=E.p("ul");$.appendChild(j);var U=E.p("li");j.appendChild(U);U.textContent="By publishing your "+x+", you agree to let others use them for all kinds of purposes, even commercially.";
$.appendChild(this.o6.n);if(c==0)$.appendChild(this.aob.n);E._X($);$.appendChild(this.vL.n);$.appendChild(this.Tf.n);
E._X($);i=(this.ww-20)/Math.max(1,Math.floor(this.ww/i))-42;var b="display:inline-block; width:"+i+"px; height:140px;  overflow:hidden; background-color:rgba(255,255,255,0.2);  margin:10px 20px 0px 0; line-height:1.5em; padding:10px;";
for(var F=Q.length-1;F>=0;F--){var e=Q[F];if(e.type==null)e.type=0;if(e.type!=c)continue;var k=E.p("div");
$.appendChild(k);k.setAttribute("style",b);var K=E.p("img");k.appendChild(K);K.setAttribute("src",e.thmb);
K.setAttribute("style","float:left; height:10em; width:10em;  object-fit: contain; margin-right: 1em; margin-bottom:1em;");
var g=E.p("h3");k.appendChild(g);g.textContent=e.name;g.setAttribute("style","margin:0 0 10px 0");var R=E.p("p");
k.appendChild(R);R.textContent=e.desc;R.setAttribute("style","height:76px;  overflow:hidden; margin-bottom: 6px;");
for(var T=0;T<2;T++){var D=new j7(T==0?"Edit":"Delete",null,null,!0);D.a4u=F;D.rw=T==0;D.k("click",this.a9t,this);
k.appendChild(D.n)}}};gV.prototype.a20=function(x){if(this.D9==null){alert("No document opened.");return}var Q=confirm("Your document will be uploaded to Photopea.com and a preview to Imgur.com. Proceed?");
if(!Q)return;var c=new jO(u.E.M,!0);c.data={d:u.H.gl,mN:"psd",qF:this.abP.bind(this)};this.T(c)};gV.prototype.abP=function(x){this.aes=x;
var Q=new jO(u.E.M,!0);Q.data={d:u.H.gl,mN:"jpg",qF:this.ast.bind(this),aco:1400};this.T(Q)};gV.prototype.ast=function(x){this.WQ={type:0,catg:0,desc:"",file:this.aes,name:this.D9.name.split(".")[0],thmb:x,publ:!0,utme:""};
this.rw()};gV.prototype.ad3=function(x){this.WQ={type:0,catg:0,desc:"",file:"",name:"",thmb:"",publ:!0,utme:""};
this.rw()};gV.prototype.a9t=function(x){this.nu=x.target.a4u;if(!x.target.rw){if(!window.confirm("Are you sure you want to delete your template?"))return;
this.ot.splice(this.nu,1);this.tc();this.GJ();return}this.rw()};gV.prototype.rw=function(){if(E.rm(this.NA))this.body.removeChild(this.NA);
this.body.appendChild(this.XB.n);var x=this.WQ?this.WQ:this.xJ?this.xJ:this.ot[this.nu];if(x.type==null)x.type=0;
this.XB.U(x)};gV.prototype.a2B=function(x){var Q=this.XB.h();if(this.WQ)this.ot.push(Q);else if(this.xJ){var c=this.aoF;
dQ.n6(c[0],c[1],this.SJ.bind(this),JSON.stringify(Q));return}else this.ot[this.nu]=Q;this.tc();this.SJ()};
gV.prototype.SJ=function(){var x=this.xJ;this.WQ=null;this.xJ=null;this.body.removeChild(this.XB.n);
this.body.appendChild(this.NA);this.GJ();if(x)this.Hd()};gV.prototype.tc=function(){var x=dQ.JO();if(this.ot.length==0)delete x.tpl;
else{x.tpl={list:JSON.parse(JSON.stringify(this.ot))};var Q=this.vL.h().trim();if(Q!="")x.tpl.brnd=Q}dQ._J(x,function(){alert("Saved.")})};
function aU(){j0.call(this,"Make Selection","makesel");this.n$=null;var x=E.p("div","form");this.body.appendChild(x);
this.bL=new f2([12,25,1]);this.bL.U(!0);x.appendChild(this.bL.n);E._X(x);this.L3=new fC(!0);x.appendChild(this.L3.n);
this.CH=E.wb(this,this.body)}aU.prototype=new j0;aU.prototype._=function(){j0.prototype._.call(this);
this.L3._();this.bL._();this.CH._()};aU.prototype.K6=function(x){var Q=new jO(u.E.v,!0);Q.f=X.kJ;Q.data={d:"frompath",b3:[null,0,this.L3.h(),this.bL.h()]};
this.close();this.T(Q)};function bw(){j0.call(this,["VAR0 PSD/PSB",[1,2]],"savepsb");this.D9=null;this.Q5=null;
this.Rq=null;var x=this.a5z=E.p("div","form");x.setAttribute("style","width:20em");this.body.appendChild(x);
this.B6=new c_([12,50],["PSD","PSB"]);this.B6.k(u.E.t,this.Og,this);x.appendChild(this.B6.n);E.ix(x);
var Q=new jz("Minify the file");x.appendChild(Q.n);E._X(x);var c=["Blank preview image","ZIP for pixel data","Remove Smart Object pixels","Put the file into ZIP"];
this.Nm=[];for(var F=0;F<c.length;F++){var $=new f2(c[F]);this.Nm.push($);x.appendChild($.n);$.k(u.E.t,this.Og,this)}E.ix(x);
this.rE=new jz("aa.psd");this.gc=new jz("10 kB");x.appendChild(this.gc.n);this.al4=new jz("1000 B");
x.appendChild(this.al4.n);this.CH=new j7([1,2],!0,null,!0);this.CH.k("click",this.K6,this);x.appendChild(this.CH.n);
this.cL=new j7(["VAR0 (Google Drive)",[1,2]],!0,null,!0);this.cL.k("click",this.K6,this);x.appendChild(this.cL.n);
this.k("closebtn",this.lY,this)}bw.prototype=new j0;bw.prototype.BM=function(x,Q,c,$){var z=E.rm(this.cL.n),j=x.uA!=null&&x.uA.Kf=="psd";
if(j&&!z)this.a5z.appendChild(this.cL.n);if(!j&&z)this.a5z.removeChild(this.cL.n);for(var F=0;F<this.Nm.length;
F++)this.Nm[F].U(!1);this.D9=x;this.Og()};bw.prototype.K6=function(x){if(x.target==this.CH)hF.save(this.Q5,this.Rq);
else{if(this.Nm[3].h()){alert("You should not save a ZIP as a PSD to Google Drive.");return}d9.ard(this.D9,this.Q5)}};
bw.prototype.lY=function(){this.D9=null;this.Q5=null};bw.prototype.Og=function(){var x=this.D9,Q=[!1,!1,!1,!1];
for(var F=0;F<3;F++)Q[F]=this.Nm[F].h();var c=this.Nm[3].h(),$=Q[3]=this.B6.h()==1,z=x.name.slice(0,x.name.length-3),j=this.Q5=ar.pz("PSD").YU(x,0,0,Q),jF=this.Rq=z+"ps"+($?"b":"d");
if(c){var U={};U[jF]=new Uint8Array(j);j=this.Q5=UZIP.encode(U);jF=this.Rq=z+"zip"}this.rE.U(jF);this.gc.U(cI.dc(j.byteLength));
this.gc.n.style["font-size"]="2em";this.al4.U(" \u2001 "+j.byteLength+" B");this.CH.UG(ah.get([1,2])+" \""+jF+"\"")};
bw.prototype._=function(){j0.prototype._.call(this);this.B6._();this.CH._();this.cL._()};function di(){j0.call(this,"Confirm","confirm");
this.ka=null;var x=E.p("div");x.setAttribute("style","margin-bottom:1em");this.body.appendChild(x);this.gB=E.p("div");
this.gB.textContent="Hello";x.appendChild(this.gB);this.CH=E.wb(this,this.body)}di.prototype=new j0;
di.prototype.K6=function(x){if(this.ka==null)return;console.log("okconfirm");this.close();this.ka();
this.ka=null};di.prototype._=function(){j0.prototype._.call(this);this.CH._()};di.prototype.BM=function(x,Q){if(Q.avI||Q.aCG)this.gB.innerHTML=Q.b;
else this.gB.textContent=Q.b;if(Q.ank)this.CH.UG(Q.ank);this.ka=Q.ka;this.CH.n.focus();if(Q.avI!=null)this.n.style.top=Math.random()*(window.innerHeight-150)+"px";
this.abr=Q.avI!=null};di.prototype.$O=function(x,Q){return new bC(Math.max(0,(x-500)/2),Math.max(0,Math.min(60,(Q-100)/2)))};
di.prototype.oN=function(x,Q){this.gB.style.width=x-30+"px"};function eX(){j0.call(this,[1,16,2],"newartb");
this.iV=0;this.jm=null;var x=E.p("div","form");x.style.width="260px";this.body.appendChild(x);this.gs=new hh;
x.appendChild(this.gs.n);this.CH=E.wb(this,x)}eX.prototype=new j0;eX.prototype.OL=function(x,Q){return x!=null};
eX.prototype.K6=function(x){var Q=this.gs.h();this.jm.m=Q.x;this.jm.e=Q.y;var c=new jO(u.E.v,!0);c.f=X.TC;
c.data={afZ:this.jm,AW:this.iV};this.T(c);this.close()};eX.prototype._=function(){j0.prototype._.call(this);
this.gs._();this.CH._()};eX.prototype.BM=function(x,Q){this.iV=Q.AW;var c=new gh(0,0,x.m,x.e);if(x.g.length!=0){var $=x.B[x.g[0]];
if($.add.artb){c=$.Dd();c.x+=c.m+100}if(Q.AW==1)c=X.Y.Pe(x)}this.jm=c;this.gs.U(new bC(c.m,c.e))};function gD(){j0.call(this,"Storage","storwindow");
this.body.setAttribute("style","padding:0");this.FK=null;this.k("closebtn",this.lW,this);this.k("canclose",this.lW,this)}gD.prototype=new j0;
gD.prototype.Fy=function(x,Q){if(this.FK)this.FK.Fy(x,Q)};gD.prototype.$O=function(x,Q){return new bC(Math.max(0,Math.min(150,(x-980)/2)),Math.max(0,Math.min(150,(Q-590)/2)))};
gD.prototype.oN=function(x,Q){this.ww=x;this.R0=Q;x=Math.min(x,980);Q=Math.min(Q,590);if(this.FK)this.FK.oN(x,Q)};
gD.prototype._=function(){j0.prototype._.call(this);if(this.FK)this.FK._()};gD.prototype.BM=function(x,Q,c,$){this.MW=Q.AW==0?"Open from Storage":"Save to Storage";
this._();if(this.FK==null){this.FK=new j9;this.FK.parent=this;this.body.appendChild(this.FK.n);this._();
this.oN(this.ww,this.R0)}Storage.VW(Q.AW,x?x.name:"");j9.Mh(this.FK)};gD.prototype.lW=function(x){Storage.VW(0);
j9.Zc();if(x.type=="canclose")this.close()};function kd(){j0.call(this,[2,14],"varsdats");var x=this.n5=E.p("div","form");
x.setAttribute("style","width:300px");this.body.appendChild(x);this.D9=null;this.iS=0;this.n$=null;this.SF=new c_(null,[[2,14],"Data Sets",[1,8]]);
this.SF.k(u.E.t,this.abB,this);this.wk=new kd.V5;this.bq=new kd.cd;this.cs=new kd.o4;this.bq.k("activate",this.fb,this);
this.cs.k("export",this.u1,this);this.CH=E.wb(this)}kd.prototype=new j0;kd.prototype.abB=function(x){var Q=this.SF.h(),c=this.n5;
E.Os(c);c.appendChild(this.SF.n);E.ix(c);c.appendChild([this.wk,this.bq,this.cs][Q].n);c.appendChild(this.CH.n)};
kd.prototype.K6=function(x){var Q=new jO(u.E.v,!0);Q.f=X.Mf;Q.data={d:eM.gh,b:JSON.stringify([this.wk.h(),this.bq.h()])};
this.T(Q);this.close()};kd.prototype._=function(){j0.prototype._.call(this);this.CH._();this.cs._()};
kd.prototype.BM=function(x,Q){this.D9=x;this.cs.D9=x;if(x==null)return;this.wk.BM(x,Q);this.bq.BM(x,Q);
this.SF.U(0);this.abB();this.iS=0;this.cs.amY()};kd.prototype.Fy=function(x,Q){this.n$=x};kd.prototype.u1=function(x){var Q=this.wk.h(),c=this.bq.h(),$=this.cs.h();
if(Q.length==0){alert("There are no variables.");return}if(c.length==0){alert("There are no data sets.");
return}var z=ar.aBX(this.D9,Q,c,this.bq.auO(),$[0],$[1],$[2],this.n$,this);if(z!=null)hF.save(z,"images.zip")};
kd.prototype.fb=function(x){var Q=this.bq.g,c=this.wk.h(),$=this.bq.h();if(c.length==0){alert("There are no variables.");
return}if($.length==0){alert("There are no data sets.");return}this.QV();this.iS+=ar.ow(this.D9,this,c,$,this.bq.auO(),Q)};
kd.prototype.QV=function(){var x=new jO(u.E.v,!0);x.f=X.RZ;x.data={d:"h_stepbck"};while(this.iS>0){this.T(x);
this.iS--}};kd.o4=function(){kw.call(this);var x=this.n=E.p("div");this.lK=new el("Variable for file names");
x.appendChild(this.lK.n);E.ix(x);this.D9=null;this.m_=["JPG","PNG","PDF"];this.B6=new c_([12,50],this.m_);
this.B6.k(u.E.t,this.amY,this);x.appendChild(this.B6.n);this.fL=new j4;x.appendChild(this.fL.n);this.m9=new j7("Export all items",!0,null,!0);
this.m9.k("click",this.u1,this);x.appendChild(this.m9.n)};kd.o4.prototype=new kw;kd.o4.prototype._=function(x){this.lK._();
this.B6._();this.m9._();this.fL._()};kd.o4.prototype.amY=function(x){if(this.D9==null)return;var Q=this.m_[this.B6.h()],c=this.D9,$=c.add.artd;
this.fL.zE(Q,null,null,$!=null&&$.Cnt.v>1)};kd.o4.prototype.u1=function(x){this.T(new jO("export"))};
kd.o4.prototype.h=function(){var x=this.m_[this.B6.h()];return[x,this.fL.h(),this.lK.h().trim()]};kd.cd=function(){kw.call(this);
this.pQ=null;this.Y2=[];this.g=0;var x=this.n=E.p("div","form");this.C2=new jR("Import a CSV file");
x.appendChild(this.C2.n);this.C2.k(u.E.t,this.abb,this);this.gz=E.p("div","scrollable");this.gz.setAttribute("style","overflow:scroll;  height:234px;");
x.appendChild(this.gz);this.a75=new jR("Source Images",!0);x.appendChild(this.a75.n)};kd.cd.prototype=new kw;
kd.cd.prototype.abb=function(x){var Q=this.C2.h();for(var c in Q){Q=Q[c];break}this.pQ=a8.s5(w.IV(Q));
this._I()};kd.cd.prototype.auO=function(){return this.a75.h()};kd.cd.prototype.BM=function(x,Q){var c=this.pQ=JSON.parse(JSON.stringify(x.x8));
this._I()};kd.cd.prototype.h=function(){return this.pQ};kd.cd.prototype._I=function(){var x=this.O9.bind(this),Q=this.pQ,$="max-width: 100px; overflow:hidden; white-space: nowrap; border: 1px solid; padding:0px 5px;";
this.Y2=[];var c=E.p("table");c.setAttribute("style","border-collapse: collapse;");for(var F=0;F<Q.length;
F++){var z=E.p("tr"),j=Q[F],U=F==0?"th":"td";c.appendChild(z);var i=E.p(U);z.appendChild(i);i.setAttribute("style",$+"cursor:pointer;");
if(F!=0)i.textContent="\u2713";this.Y2.push(i);i.addEventListener("click",x,!1);for(var b=0;b<j.length;
b++){var i=E.p(U);i.textContent=j[b];z.appendChild(i);i.setAttribute("style",$);i.setAttribute("title",j[b])}}E.Os(this.gz);
this.gz.appendChild(c)};kd.cd.prototype.O9=function(x){this.g=this.Y2.indexOf(x.currentTarget);this.T(new jO("activate"))};
kd.V5=function(){kw.call(this);var x=this.n=E.p("div","form marged");this.y8=null;this.D6=[];this.PB=[];
this.tm=null;this.LR=new c7([0,3],[]);this.LR.k(u.E.t,this.au_,this);x.appendChild(this.LR.n);this.V_=[];
var Q=["Visibility","Text Content","Pixel Content"];for(var F=0;F<Q.length;F++){E.ix(x);var c=new f2(Q[F]);
c.k(u.E.t,this.Z9,this);x.appendChild(c.n);E._X(x);var $=new el("Variable Name");$.k(u.E.t,this.Z9,this);
x.appendChild($.n);this.V_.push(c,$)}};kd.V5.prototype=new kw;kd.V5.prototype.Z9=function(x){var Q=this.LR.h(),c=this.tm[Q],$=this.D6[Q],z=this.y8["l"+c],j=this.V_;
if(z==null)this.y8["l"+c]=z=[];while(z.length!=0)z.pop();for(var F=0;F<3;F++){var U=j[2*F+1].h().trim();
if(!j[2*F].h())continue;if(U.indexOf(" ")!=-1){alert("Variable names can not contain spaces. But you can use \".\", \":\", \"-\" or \"_\".",4e3)}U=U.replaceAll(" ","");
var i={varName:U,trait:["visibility","textcontent","fileref"][F]};z.push(i);if(F==2){i.align="center";
i.clip="false";i.placementMethod="fit";i.valign="middle"}}if(z.length==0)delete this.y8["l"+c];this.BM()};
kd.V5.prototype.au_=function(x){var Q=this.LR.h(),c=this.tm[Q],$=this.D6[Q],z=this.y8["l"+c],j=this.V_;
if(z==null)z=[];for(var F=0;F<3;F++){var U=F==0||F==1&&$==0||F==2&&$==1;j[2*F].vz(U);j[2*F].U(!1);j[2*F+1].vz(U);
if(!U)j[2*F+1].U("")}for(var F=0;F<z.length;F++){var i=z[F],b=i.trait,e=["visibility","textcontent","fileref"].indexOf(b);
j[e*2].U(!0);j[e*2+1].U(i.varName)}};kd.V5.prototype.BM=function(x,Q){if(x){var c=JSON.parse(JSON.stringify(x.vB)),$=this.y8={};
for(var F=0;F<c.length;F++){var z=c[F],j=z.docRef;j="l"+j.slice(4,j.length-2);if($[j]==null)$[j]=[];
$[j].push(z)}this.tm=[];this.D6=[];this.PB=[];for(var F=x.B.length-1;F>=0;F--){var U=x.B[F],j=U.add.lyid;
if(U.add.lsct==hA.oA)continue;this.tm.push(j);this.D6.push(U.add.TySh?0:1);this.PB.push(U.getName())}}var i=[],b=this.PB;
for(var F=0;F<b.length;F++){i.push(b[F]+(this.y8["l"+this.tm[F]]?" *":""))}var e=this.LR.h();this.LR.yJ(i);
this.LR.U(e);this.au_()};kd.V5.prototype.h=function(){var x=this.y8,Q=[];for(var c in x){var $=x[c];
for(var z=0;z<$.length;z++){$[z].docRef="id('"+c.slice(1)+"')";Q.push($[z])}}return Q};function fR(){j0.call(this,["VAR0 VAR1",[15,10,22],[8,11,0]],"divslice");
this.wq=!1;var x=this.Wb=[],Q=E.p("div","form");Q.setAttribute("style","width:20em");this.body.appendChild(Q);
for(var F=0;F<2;F++){var c=new f2([22,4,2+F]);Q.appendChild(c.n);E._X(Q);var $=new c_(null,[["N equal parts"],["N pixels per part"]]);
Q.appendChild($.n);E._X(Q);var z=new f0("N",0,1e3);z.U(4);z.parent=this;Q.appendChild(z.n);E._X(Q);if(F==0)E.ix(Q);
x.push(c,$,z)}for(var F=0;F<x.length;F++)x[F].k(u.E.t,this.G1,this);x.push(E.wb(this,Q));this.k("closebtn",this.QV,this)}fR.prototype=new j0;
fR.prototype.QV=function(){if(this.wq){var x=new jO(u.E.v,!0);x.f=X.RZ;x.data={d:"h_stepbck"};this.T(x)}};
fR.prototype.G1=function(x){this.QV();this.wq=!0;var Q=[];for(var F=0;F<6;F++)Q.push(this.Wb[F].h());
var c={__name:"Divide",classID:"divide",null:{t:"obj ",v:[{t:"Enmr",v:{classID:"slice",typeID:"Ordn",enum:"Trgt"}}]}};
for(var $=0;$<2;$++){if(!Q[$*3])continue;var z=Q[$*3+1],j=Q[$*3+2];c[["slices","pixels"][z]+["Across","Down"][$]]={t:"long",v:j}}var U=new jO(u.E.G2,!0);
U.data={q4:"divide",dx:c};this.T(U)};fR.prototype.K6=function(x){this.close()};fR.prototype._=function(){j0.prototype._.call(this);
var x=this.Wb;for(var F=0;F<x.length;F++)x[F]._()};fR.prototype.BM=function(x,Q){this.wq=!1};function hn(){j0.call(this,"Stroke Path","strokepath");
this.n$=null;this.Py=null;this.UO=null;this.CH=null;this.M_=[X.fx,X.gN,X.tH,X.NB,X.nJ,X.$r,X.bp,X.Y6,X.W7,X.EJ,X.BP,X.He,X.vk,X.fa,X.Lr]}hn.prototype=new j0;
hn.prototype._=function(){j0.prototype._.call(this);if(this.CH){this.Py._();this.CH._()}};hn.prototype.K6=function(x){var Q=this.M_[this.Py.h()],c=null;
for(var $ in X.GR)if(X.GR[$]==Q)c=$;var z=new jO(u.E.G2,!0);z.data=X.qW.Un(c,this.UO.h());this.close();
this.T(z)};hn.prototype.Fy=function(x,Q){if(this.n$==null){var c=[];for(var F=0;F<this.M_.length;++F){c.push(x.s.map[this.M_[F]].f.name)}var $=E.p("div","form");
this.body.appendChild($);this.Py=new c7("Tool",c);this.Py.U(1);$.appendChild(this.Py.n);this.UO=new f2("Simulate Pressure");
E._X($);$.appendChild(this.UO.n);this.CH=E.wb(this,this.body)}this.n$=x};function jg(){j0.call(this,[1,18],"linkview");
E.ZW(this.body,"form");var x=this.AZ=[new el(null,null,17),new j7([5,1],!1,null,!0),new j7([1,0],!1,null,!0)];
for(var F=0;F<3;F++){var Q=x[F];this.body.appendChild(Q.n);if(F!=0)Q.k("click",this.alk,this);if(F==0)E._X(this.body)}}jg.prototype=new j0;
jg.prototype.BM=function(x,Q){var c=Q.a8F;if(c.startsWith("https://"))c=c.slice(8);this.AZ[0].U(c)};
jg.prototype.alk=function(x){var Q=this.AZ,c=Q[0].h(),$=x.target==this.AZ[1];if($){navigator.clipboard.writeText(c);
alert("Copied to a clipboard!")}else window.open("https://"+c,"Shared")};function gt(x){j0.call(this,x==0?[[23,6],[17,2]]:["VAR0 VAR1",[1,2],[17,2]],["loadsel","savesel"][x]);
this.yn=null;this.fD=null;this.awU=x;var Q=E.p("div","form label8");Q.setAttribute("style","max-width:26em");
this.body.appendChild(Q);this.g9=new c7("Document",["abc","def"]);this.g9.k(u.E.t,this.Z9,this);Q.appendChild(this.g9.n);
E._X(Q);this.or=new c7([12,4],["abc","def"]);this.or.k(u.E.t,this.Z9,this);Q.appendChild(this.or.n);
this.ac7=new f2([4,11]);this.gB=new el([12,48]);this.gB.U("Alpha");if(x==0){}else{Q.appendChild(this.gB.n)}this.M8=new fC(!0);
Q.appendChild(this.M8.n);this.CH=E.wb(this,Q)}gt.prototype=new j0;gt.prototype.sD=function(){return!0};
gt.prototype._=function(){j0.prototype._.call(this);this.CH._();this.g9._();this.or._();this.gB._();
this.ac7._();this.M8._()};gt.prototype.Z9=function(x){var Q=this.awU;if(x==null||x==this.g9){var c=this.g9.h(),$=this.fD[c],z=[];
if(Q==0)z.push($.B[$.g[0]].getName()+" Transparency");else z.push([5,3]);for(var F=0;F<$.fG.length;F++)z.push($.fG[F].name);
this.or.yJ(z)}if(Q==0)return;var j=this.or.h();this.gB.vz(j==0);this.M8.vz(j!=0)};gt.prototype.BM=function(x,Q,c){this.yn=x;
this.fD=c;var $=[];for(var F=0;F<c.length;F++){var z=c[F].name;$.push(z.length<30?z:z.slice(0,27)+"...")}this.g9.yJ($);
this.g9.U(c.indexOf(x));this.Z9(null)};gt.prototype.K6=function(x){var Q=this.awU,c=this.or.h(),$=this.g9.h(),z=this.fD[$],j=this.M8.h(),U;
if(c==0){U=new jO(u.E.G2,!0);if(Q==0)U.data=X.U_.FF(j,"Trsp",z.B[z.g[0]].getName());else U.data={q4:"duplicate",dx:{classID:"null",Nm:{t:"TEXT",v:this.gB.h()},null:{t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]}}}}else{U=new jO(u.E.v,!0);
if(Q==0){U.f=X.kJ;U.data={d:"fromchannel",b3:[-4-c,0,j]}}else{U.f=X.Mf;U.data={d:eM.Rd,Zq:"seltochannel",b3:[c-1,j]}}}this.close();
this.T(U)};function cC(x,Q,c,$){kw.call(this);this.name=x;this.azt=c;this.UH=$;this.SQ=E.p("div","");
this.SQ.setAttribute("draggable","true");this.UN=E.p("div","pbody");this.Yn=new j7("",!1,"");this.Yn.parent=this;
this.apB=E.p("span","cross gsicon");this.A4=E.p("span","label");var z=this.ay9.bind(this);this.SQ.addEventListener("mousedown",this.a0J.bind(this),!1);
this.SQ.addEventListener("contextmenu",z,!1);this.Yn.n.addEventListener("contextmenu",z,!1);this.apB.addEventListener("mousedown",this.Mv.bind(this),!1);
this.SQ.appendChild(this.A4);if(Q)this.SQ.appendChild(this.apB);this.dS=!1;this.A4.textContent=x}cC.prototype=new kw;
cC.prototype.t5=function(){return null};cC.prototype._=function(){var x=ah.get(this.name),Q=!1,c=this.ww==0?22:Math.round(2+this.ww/50);
if(x.endsWith(" *")){Q=!0;x=x.slice(0,x.length-2);c-=2}var $=x.length>c;this.A4.textContent=$?x.slice(0,c-2):x;
if($)for(var z=0;z<2;z++){var j=E.p("span");j.textContent=x.charAt(c-2+z);j.setAttribute("style","opacity:"+(.6-z*.4));
this.A4.appendChild(j)}if(Q){var j=E.p("span");j.textContent=" *";this.A4.appendChild(j)}var U=x.split(" "),i=U.length==2?U[0].substring(0,2)+U[1][0]:x.substring(0,3);
if(i.charCodeAt(0)>=11776)i=i.substring(0,1);var b=this.azt;if(b==null)this.Yn.UG(i,x);else{var e;if(b.startsWith("---"))e="<img src=\""+PIMG[b.slice(3)]+"\" class=\"autoscale gsicon\" style=\"margin:2px 4px;\"/>";
else if(b.startsWith("==="))e="<img src=\""+b.slice(3)+"\" class=\"autoscale gsicon\" style=\"margin:2px 4px;\"/>";
else if(b.indexOf("\"")==-1)e="<img src=\""+b+"\" alt=\""+E.iF(x).replace(/"/g,"&quot;")+"\" height=\"18\" width=\"18\" loading=\"lazy\" style=\"margin:1px 3px;\" />";
this.Yn.UG(e,x)}};cC.prototype.enable=function(){this.UN.className="pbody"};cC.prototype.disable=function(){this.UN.className="pbody disabled"};
cC.prototype.Fy=function(x,Q){};cC.prototype.BM=function(x,Q,c){};cC.prototype.Za=function(x){};cC.prototype.oN=function(x,Q){};
cC.prototype.ki=function(x){this.name=x;this._()};cC.prototype.Yr=function(){};cC.prototype.a0J=function(x){if(x.button==0)this.T(new jO("select",!1));
if(x.button==1)this.TB()};cC.prototype.ay9=function(x){E.ce(x);if(this.UH!=null&&isNaN(this.UH))return;
var Q=E.GK(x,document.body),c=this.kP;if(c==null){c=this.kP=new ev([{name:[1,12,0]}]);this.kP.k("select",this.Mv,this)}c.update(null);
c._();c.parent=this;var $=new jO(u.E.M,!0);$.data={d:u.H.A_,G7:c,x:Q.x+1,y:Q.y+1};this.T($)};cC.prototype.TB=function(){this.Mv({})};
cC.prototype.Mv=function(x){if(x.stopPropagation)x.stopPropagation();if(this.UH!=null&&!isNaN(this.UH)){var Q=new jO(u.E.M,!0);
Q.data={d:u.H.s$,G7:this.kP};this.T(Q);Q.data={d:u.H.hW,hF:ke.NF,b:parseFloat(this.UH),_g:"del"};this.T(Q)}else if(this.aig())this.T(new jO(u.E.ZY,!1))};
cC.prototype.aig=function(x){return!0};cC.prototype.Eu=function(x,Q,c,$,z){};cC.prototype.CK=function(x,Q,c,$,z){};
cC.prototype.km=function(x,Q,c,$,z){};cC.qb=function(x,Q,c){if(x.childElementCount!=0)return;var $=x.textContent;
this.pD=this.auJ.bind(this);this.aca=this.ah7.bind(this);this.zY=Q;this.ak7=c;this.EL=x;this.aCs=$;var z=E.p("input","");
z.setAttribute("type","text");z.setAttribute("size","10");z.setAttribute("value",$);E.Os(x);x.appendChild(z);
z.select();z.focus();E.e5(x);x.addEventListener("keyup",this.pD,!1);document.body.addEventListener("mousedown",this.aca,!1)};
cC.qb.prototype.auJ=function(x){var Q=fM.Ma,c=Q(x.code,fM.ln);if(Q(x.code,fM.En)||c)this.aCI(c)};cC.qb.prototype.ah7=function(x){var Q=x.target;
if(Q.tagName&&Q.tagName.toLowerCase()=="input")return;this.aCI(!0)};cC.qb.prototype.aCI=function(x){var Q=this.EL,c=Q.firstChild.value;
Q.removeEventListener("keyup",this.pD);document.body.removeEventListener("mousedown",this.aca);if(this.ak7||x&&c!=""&&c!=this.aCs){this.zY(c)}else{E.Os(Q);
Q.textContent=this.aCs}};cC.Pn={RZ:"0",a2b:"1",Mf:"2",axo:"3",aoE:"4",E7:"5",CSS:"6",gN:"7",arO:"8",a8g:"9",az0:"10",aqu:"11",amw:"12",$s:"13",Uf:"14",as9:"15",asI:"16",TM:"17",apN:"18",a9o:"19",aBn:"20",ZO:"21",aoZ:"22",aCO:"23",amg:"24",aaj:"25"};
function dI(){cC.call(this,[9,9],!1,"---panels/actions",cC.Pn.aqu);this.n$=null;this.Fh=[0,0]}dI.prototype=new cC("");
dI.prototype.pp=function(){if(!E.rm(this.UN)||this.EU)return;this.EU=E.p("div","padded scrollable");
this.EU.setAttribute("style","width:260px;  height:260px");this.UN.appendChild(this.EU);this.k(u.E.t,this.IE,this);
this.Tx=E.p("div","lpfoot");this.UN.appendChild(this.Tx);this.Aw=[];var x="<svg  class=\"miniscale gsicon\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\" fill=\"black\">",Q="</svg>",c=x+"<path d=\"M14,6 L10,6 L10,0 L4,0 L4,6 L0,6 L7,13 L14,6 L14,6 Z M0,14 L0,16 L14,16 L14,14 Z\" />"+Q,$=x+"<path d=\"M0,0 L15,7.5 L0,15 Z\" />"+Q;
this.a6G=x+"<circle cx=\"7.5\" cy=\"7.5\" r=\"7.5\" />"+Q;this.a6g=x+"<path d=\"M1,1 L14,1 L14,14 L1,14 Z\" />"+Q;
var z=[this.a6G,$,"lrs/folder","lrs/newlayer","lrs/bin",c],j=[[15,8,0],[5,8],[15,8,1],[15,8,2],[5,4],[1,2]];
for(var F=0;F<z.length;F++){var U=z[F];if(1<F&&F!=z.length-1)U="<img src=\""+PIMG[z[F]]+"\" class=\"miniscale gsicon\" />";
var i=new j7(U,!1,j[F]);i.k("click",this.a51,this);this.Tx.appendChild(i.n);this.Aw.push(i)}this._I()};
dI.prototype._=function(){cC.prototype._.call(this);if(this.EU==null)return;for(var F=0;F<this.Aw.length;
F++)this.Aw[F]._()};dI.prototype.a51=function(x){var F=this.Aw.indexOf(x.currentTarget),Q=this.Fh,c=this.n$,$=c.Q$;
if(F==0){var z,j=c.dR;if($.length==0){alert("Create an Action Set first.");return}if(Q.length<2){alert("Select a target action first.");
return}if(j==null){z=this.a6g;j=this.Fh}else{z=this.a6G;j=null}this.Aw[0].UG(z);c.dR=j}else if(F==1)this.afH();
else if(F==2||F==3){var U={LX:"Action Set "+$.length,yY:[],exp:!0};if(F==2||$.length==0){Q=[$.length];
$.push(U)}if(F==3){var i=$[Q[0]].yY;Q=[Q[0],i.length];i.push({LX:"Action "+i.length,color:0,yY:[],axO:!1,shift:!1,exp:!0,xR:i.length})}this.Fh=Q;
this._I()}else if(F==4){var b;if(Q.length==1)b=$;else if(Q.length==2)b=$[Q[0]].yY;else b=$[Q[0]].yY[Q[1]].yY;
var e=Q.length-1;b.splice(Q[e],1);if(b.length==0)Q.pop();else while(Q[e]>=b.length)Q[e]--;if(Q.length==0)Q.push(0);
this._I()}else if(F==5){if($.length==0){alert("No Actions Present.");return}var k=new jO(u.E.M,!0);k.data={d:u.H.j6,aff:ke.v,qM:Q[0]};
this.T(k)}};dI.prototype.IE=function(x){var Q=this.n$.Q$,c=x.data.d,$=x.data.Kg;if(c=="sel")this.Fh=$;
if(c=="fold"){if($.length==1)Q[$[0]].exp=!Q[$[0]].exp;else Q[$[0]].yY[$[1]].exp=!Q[$[0]].yY[$[1]].exp}if(c=="enab"){var z=Q[$[0]].yY[$[1]].yY[$[2]];
z.w=!z.w}if(c=="nchange"){if($.length==1)Q[$[0]].LX=x.data.BW;else Q[$[0]].yY[$[1]].LX=x.data.BW}this._I()};
dI.prototype.BM=dI.prototype.Yr=function(){this.pp()};dI.prototype.Fy=function(x,Q){this.n$=x;if(this.EU==null)return;
if(Q==ke.v||Q==ke.m6)this._I()};dI.prototype._I=function(){if(this.n$==null)return;E.Os(this.EU);var x=this.n$.Q$;
if(x.length==0)return;var Q=JSON.stringify(this.Fh);for(var F=0;F<x.length;F++){var c=x[F],$=new dI.Fx([F],Q,c.exp,c.LX.split("=").pop());
$.parent=this;this.EU.appendChild($.n);if(!c.exp)continue;for(var z=0;z<c.yY.length;z++){var j=c.yY[z],$=new dI.Fx([F,z],Q,j.exp,j.LX.split("=").pop());
$.parent=this;this.EU.appendChild($.n);if(!j.exp)continue;for(var U=0;U<j.yY.length;U++){var i=j.yY[U],$=new dI.Fx([F,z,U],Q,null,ah.get(ep.arN(i)),i.w);
$.parent=this;this.EU.appendChild($.n)}}}};dI.prototype.afH=function(){var x=this.n$.Q$,Q=this.Fh;if(x.length==0){alert("No Actions Present");
return}if(Q.length==1){alert("Select an Action first");return}if(this.n$.dR!=null){alert("You can not apply actions while recording actions");
return}if(Q.length==1)Q.push(0);var c=x[Q[0]],$=c.yY[Q[1]],z=new jO(u.E.M,!0);z.data={d:u.H.Zr,b3:[$.LX,c.LX]};
this.T(z)};dI.Fx=function(x,Q,c,$,z){kw.call(this);this.Kg=x;var j=this.Kg.length-1;this.n=E.p("div","layeritem"+(JSON.stringify(x)==Q?" selected":""));
this.DI=E.p("div","head");this.n.appendChild(this.DI);this.DI.setAttribute("style","height:24px");this.jr=E.p("div","headL");
this.DI.appendChild(this.jr);if(j!=0){var U=E.p("div");U.style.width=j*20+"px";this.jr.appendChild(U)}if(c!=null){var i=this.aeR=E.p("div",c?"open":"closed");
this.jr.appendChild(i)}else{var b=this.a0R=E.p("div","cmark");b.setAttribute("style","background-size:12px 12px; opacity:"+(z?1:.3));
this.jr.appendChild(b)}if(j==0){var e=E.p("div","folder");this.jr.appendChild(e)}var k=this.A4=E.p("div","label");
k.textContent=$;this.jr.appendChild(k);this.n.addEventListener("mouseup",this.fb.bind(this),!1)};dI.Fx.prototype=new kw;
dI.Fx.prototype.fb=function(x){if(x.detail==1&&x.target.tagName.toLowerCase()!="input"){var Q="sel";
if(x.target==this.aeR)Q="fold";if(x.target==this.a0R)Q="enab";var c=new jO(u.E.t,!0);c.data={d:Q,Kg:this.Kg};
this.T(c)}else if(this.Kg.length<3)var $=new cC.qb(this.A4,this.zY.bind(this))};dI.Fx.prototype.zY=function(x){var Q=new jO(u.E.t,!0);
Q.data={d:"nchange",BW:x,Kg:this.Kg};this.T(Q)};function fc(){cC.call(this,[3],!1,"---lrs/adj",cC.Pn.apN)}fc.prototype=new cC("");
fc.prototype.pp=function(){if(!E.rm(this.UN)||this.Aw)return;this.UN.setAttribute("style","text-align:center;  padding:6px; min-width:220px");
this.Aw=[];var F=0;for(var x in k5.names){var Q=new j7("<img src=\""+PIMG["adj/"+x]+"\" class=\"autoscale gsicon\" style=\"margin:4px 4px;\"/>",!1,k5.names[x]);
Q.k("click",this.Np,this);this.Aw.push(Q);this.UN.appendChild(Q.n);if(F==4||F==10)E._X(this.UN);F++}this._()};
fc.prototype.BM=function(){this.pp()};fc.prototype.Yr=function(){this.pp()};fc.prototype._=function(){cC.prototype._.call(this);
if(this.Aw==null)return;for(var F=0;F<this.Aw.length;F++)this.Aw[F]._()};fc.prototype.Np=function(x){var Q=this.Aw.indexOf(x.target),c=kF.Hj()[Q],$=new jO(c.K,!0);
$.data=c.C;this.T($)};function ky(){cC.call(this,[12,22],!1,null,cC.Pn.ZO);this.EU=E.p("div","padded");
this.n$=null;this.UN.appendChild(this.EU);this.J9=new jV(null,17.7,10);this.J9.parent=this;this.J9.k(u.E.t,this.G1,this);
this.EU.appendChild(this.J9.tg)}ky.prototype=new cC("");ky.prototype.G1=function(x){var Q=this.J9.h(),c=new jO(u.E.v,!0);
c.data={d:"setstl",b:Q.Ry};c.f=X.vR;this.T(c);c.data={d:"confirm"};this.T(c)};ky.prototype.Fy=function(x,Q){this.n$=x;
this._I()};ky.prototype._I=function(){var x=this.n$;if(x==null)return;this.J9.RN([x.Xe,x.Yf]);this.J9.oN()};
ky.prototype.BM=function(){this._I()};ky.prototype.Yr=function(){this._I()};var hW=function(){function x(){cC.call(this,[9,3],!1,"---panels/brush",cC.Pn.gN);
this.I6=null;this.n$=null}x.prototype=new cC("");x.prototype.pp=function(){var z=E.p("div","");this.UN.appendChild(z);
this.BN=E.p("div","bordered cell");this.BN.setAttribute("style","width:10em; height:28.5em;");z.appendChild(this.BN);
this.cN=[];this.Se=null;this.Nk=[];var j=this.aus.bind(this);this.o9=[new c("basic"),new c("useTipDynamics"),new c("useScatter"),new c("useColorDynamics"),new c("usePaintDynamics")];
for(var F=0;F<this.o9.length;F++){var U=E.p("div","listitem"),i=this.o9[F],e=null;i.parent=this;i.k("brushchange",this.ao6,this);
var b=i.yU;if(F==0){this.Se=new jz(b);U.appendChild(this.Se.n)}else{e=new f2(b,!1);e.k(u.E.t,this.ayh,this);
U.appendChild(e.n)}this.Nk.push(e);this.BN.appendChild(U);this.cN.push(U);U.addEventListener("click",j,!1)}this.ue=E.p("div","cell padded");
z.appendChild(this.ue);this.setItem(0);this.GP=E.p("canvas");this.GP.height=10;z.appendChild(this.GP);
this.Yt=this.GP.getContext("2d");this.Zi()};x.prototype.oN=function(z,j){if(this.ww==z)return;this.ww=z;
this.R0=j;this.Zi()};x.prototype.Yr=function(){if(!E.rm(this.UN))return;if(this.BN){this.Zi();return}this.pp();
this._();this.Fy(this.n$,ke.m6)};x.prototype._=function(){cC.prototype._.call(this);if(this.BN==null)return;
this.Se._();for(var F=1;F<this.Nk.length;F++)this.Nk[F]._();for(var F=0;F<this.o9.length;F++)this.o9[F]._()};
x.prototype.ao6=function(z){var j=this.o9.indexOf(z.currentTarget),U=JSON.parse(JSON.stringify(this.o9[j].I6)),i=new jO(u.E.M,!0);
i.data={d:u.H.hW,hF:ke.TV,I6:U};this.T(i)};x.prototype.ayh=function(z){this.a7b(this.Nk.indexOf(z.currentTarget),z.currentTarget.V$())};
x.prototype.aus=function(z){var F=this.cN.indexOf(z.currentTarget);if(z.target.tagName.toLowerCase()=="input")return;
if(this.Nk[F]&&!this.Nk[F].V$()){this.Nk[F].Lm();this.a7b(F,!0)}this.setItem(F)};x.prototype.a7b=function(z,j){this.o9[z].aDA(j)};
x.prototype.setItem=function(z){for(var F=0;F<this.o9.length;F++)this.cN[F].className="listitem";if(this.ue.firstChild)this.ue.removeChild(this.ue.firstChild);
this.cN[z].className="listitem selected";this.ue.appendChild(this.o9[z].n)};x.prototype.Fy=function(z,j){this.n$=z;
if(this.BN==null)return;for(var F=0;F<this.o9.length;F++)this.o9[F].Fy(z,j);if(j==ke.TV||j==ke.m6){this.I6=z.bX.eT;
this.Zi()}if(j==ke.$s)this.Zi()};x.prototype.Zi=function(){if(this.I6)this.enable();else{this.disable();
return}if(!E.rm(this.UN))return;var z=this.n$;for(var F=0;F<this.o9.length;F++){this.o9[F].U(this.I6);
if(this.Nk[F])this.Nk[F].U(this.o9[F].V$())}var j=JSON.parse(JSON.stringify(this.I6));j.Brsh.v.Dmtr.v.val=Math.min(j.Brsh.v.Dmtr.v.val,50);
E.qr(this.GP,this.ww,80);var U=new gh(0,0,this.GP.width,this.GP.height),i=this.n$.bX,b=new cG(j,i?i.Dq:null,i?i.Rk:null,{j_:1},z.Gj,z.QI,U,null,0),e=U.e/2,k=U.m-e*2;
b.moveTo(e,e);for(var F=0;F<=k;F+=10)b.lineTo(e+F,e+20*Math.sin(2*Math.PI*F/k));b.finish();var K=this.Yt.createImageData(U.m,U.e);
d.WK(b.GM(),b.Pe(),K.data,U);this.Yt.putImageData(K,0,0)};function Q(z){kw.call(this);z=z.split(".")[0];
this.Ut=z;var j=this.n=E.p("span"),U=["Off","Fade"];U.push(z=="angleDynamics"?"Direction":"Pen Pressure");
var i=this.fl=new c7("Control",U);i.k(u.E.t,this.Z9,this);j.appendChild(i.n);var b=this.aml=new f0(null,0,100,null,null,null,!0);
b.U(50);b.k(u.E.t,this.Z9,this)}Q.prototype=new kw;Q.prototype.U=function(z){z=z<2?z:2;this.fl.U(z);
this._I()};Q.prototype.h=function(){var z=this.fl.h(),j=this.Ut;z=z<=1?z:j=="angleDynamics"?6:2;return z};
Q.prototype.Z9=function(z){this._I();z.target=z.currentTarget=this;this.T(z)};Q.prototype._I=function(z){this.aml.vz(this.fl.h()==1)};
function c(z){kw.call(this);this.n=E.p("div");this.I6=null;var j=["basic","useTipDynamics","useScatter","useColorDynamics","usePaintDynamics"].indexOf(z);
this.yU=[[15,0],[15,1],[15,2],[15,3],"Transfer"][j];this.iV=z;this.no={};this.agA=null;var U=["--br Brsh.Dmtr Brsh.Angl Brsh.Rndn Brsh.Hrdn Brsh.Spcn".split(" "),"szVr.jitter szVr.bVTy szVr.fStp minimumDiameter angleDynamics.jitter angleDynamics.bVTy angleDynamics.fStp roundnessDynamics.jitter minimumRoundness".split(" "),["scatterDynamics.jitter","Cnt","countDynamics.jitter"],["clVr.jitter","H","Strt","Brgh"],"opVr.jitter opVr.bVTy opVr.fStp prVr.jitter prVr.bVTy prVr.fStp".split(" ")][j];
for(var F=0;F<U.length;F++){var i=U[F],b;if(i=="--br"){b=new aJ;this.n.appendChild(b.tg.firstChild)}else if(i=="Brsh.Dmtr")b=new bv([12,14,0],1,1e3," px",0,!0);
else if(i=="Brsh.Angl")b=new bv([12,15],0,359," \xB0");else if(i=="Brsh.Rndn")b=new bv([12,16],0,100," %");
else if(i=="Brsh.Hrdn")b=new bv([12,17],0,100," %");else if(i=="Brsh.Spcn")b=new bv([12,18],1,300," %");
else if(i=="szVr.jitter")b=new bv([15,4,0],0,100,"%");else if(i=="minimumDiameter")b=new bv([15,4,1],0,100,"%");
else if(i=="angleDynamics.jitter")b=new bv([15,4,2],0,100,"%");else if(i.endsWith("bVTy"))b=new Q(i);
else if(i.endsWith("fStp"))b=new f0(null,0,100,null,null,null,!0);else if(i=="roundnessDynamics.jitter")b=new bv([15,4,3],0,100,"%");
else if(i=="minimumRoundness")b=new bv([15,4,4],1,100,"%");else if(i=="scatterDynamics.jitter")b=new bv([15,5,0],0,1e3," %");
else if(i=="Cnt")b=new bv([15,5,1],1,20);else if(i=="countDynamics.jitter")b=new bv([15,5,2],0,100," %");
else if(i=="clVr.jitter")b=new bv([15,6,0],0,100," %");else if(i=="H")b=new bv([15,6,1],0,100," %");
else if(i=="Strt")b=new bv([15,6,2],0,100," %");else if(i=="Brgh")b=new bv([15,6,3],0,100," %");else if(i=="opVr.jitter")b=new bv("Opacity Jitter",0,100," %");
else if(i=="prVr.jitter")b=new bv("Flow Jitter",0,100," %");else throw i;this.no[i]=b;b.parent=this;
b.k(u.E.t,this.Z9,this)}}c.prototype=new kw;c.prototype.amj=function(){this.T(new jO("brushchange"))};
c.prototype.U=function(z){this.I6=JSON.parse(JSON.stringify(z));this.n.className=this.V$()?"":"disabled";
this.Zi()};c.prototype._=function(){for(var z in this.no)this.no[z]._()};c.prototype.V$=function(){return!0};
c.prototype.Fy=function(z,j){if(j==ke.gN||j==ke.m6){var U=this.no["--br"];if(U)U.RN(z.bX)}};c.prototype.Z9=function(z){var j=z.target,U=this.no,i;
for(var b in U)if(U[b]==j)i=b;if(i=="--br"){var e=new jO(u.E.M,!0);e.data={d:u.H.hW,hF:ke.TV,I6:j.h()};
this.T(e)}else{var k=$(this.I6,i),K=j.h();if(k){if(i.endsWith("bVTy")||i.endsWith("fStp")||i=="Cnt")k.v=K;
else k.v.val=K;this.amj()}}};c.prototype.Zi=function(){var z=this.I6,j=z.Brsh.v.classID,U=this.no,i=j!=this.agA;
this.agA=j;if(i){E.Os(this.n);for(var b in U){if(j!="computedBrush"&&j!="sampledBrush"&&b=="Brsh.Rndn")continue;
if(j!="computedBrush"&&b=="Brsh.Hrdn")continue;var e=U[b],k=e.n;if(b=="--br"){k=e.uI.n;k.style.width="auto"}this.n.appendChild(k)}}for(var b in U){if(b=="--br")continue;
var K=$(z,b),g;if(K){if(b.endsWith("bVTy")||b.endsWith("fStp")||b=="Cnt")g=K.v;else g=K.v.val;U[b].U(g);
if(b.endsWith("fStp"))U[b].vz($(z,b.split(".")[0]+".bVTy").v==1)}}};c.prototype.V$=function(){var z=this.iV;
return z=="basic"?!0:this.I6[z].v};c.prototype.aDA=function(z){var j=this.iV;if(j=="basic")return;this.I6[j].v=z;
d1.H9.a7C(this.I6);this.amj()};function $(z,j){var U=j.split(".");z=z[U[0]];for(var F=1;F<U.length;F++){if(z==null)return z;
z=z.v[U[F]]}return z}return x}();function bQ(){cC.call(this,[9,0],!1,"---panels/history",cC.Pn.RZ);this.UN.setAttribute("style","min-width:200px;");
this.VL=E.p("div","hpbody scrollable");this.VL.style.height="160px";this.UN.appendChild(this.VL);this.ajr=-1;
this.oQ=[];this.xk="";this.Q1=new ev([{name:"Clear History"}],[{K:u.E.v,f:X.RZ,C:{d:"h_clear"}}])}bQ.prototype=new cC("");
bQ.prototype.t5=function(){return this.Q1};bQ.prototype.oN=function(x,Q){this.Yr()};bQ.prototype.BM=function(x){if(x==null){E.Os(this.VL);
this.xk="";return}E.Os(this.VL);var Q=0;for(var F=0;F<x.history.length;F++)if(F<=x.FS&&!x.history[F].do)Q=F;
for(var F=0;F<x.history.length;F++){var c=x.history[F];if(c.do)continue;var $=new eP(c,F,Q);$.parent=this;
this.VL.appendChild($.n);this.oQ.push($)}if(x.FS==x.history.length-1)this.Yr()};bQ.prototype.Yr=function(){this.VL.scrollTop=this.VL.scrollHeight};
bQ.prototype._=function(){cC.prototype._.call(this);for(var F=0;F<this.oQ.length;F++)this.oQ[F]._()};
function eP(x,F,Q){kw.call(this);this.index=F;this.n=E.p("div",F==Q?"listitem selected":"listitem");
this.Qi=x.name;this._();if(F>Q)this.n.style.opacity=.4;this.n.addEventListener("click",this.Eu.bind(this),!1)}eP.prototype=new kw;
eP.prototype._=function(){this.n.textContent=ah.get(this.Qi)};eP.prototype.Eu=function(x){if(this.index==this.parent.ajr)return;
this.MX({d:"h_itemchange",index:this.index})};eP.prototype.MX=function(x){var Q=new jO(u.E.v,!0);Q.data=x;
Q.f=X.RZ;this.T(Q)};function bM(){cC.call(this,[9,10],!1,"---panels/histogram",cC.Pn.aoE);var x=E.p("div","padded");
this.UN.appendChild(x);this.wL=new jh(256,!0);x.appendChild(this.wL.n);this.D9=null}bM.prototype=new cC("");
bM.prototype.BM=function(x){this.D9=x;this._I()};bM.prototype._I=function(){var x=this.D9;if(!E.rm(this.UN))return;
if(x==null||x.g.length==0){this.wL.U(d.q9(d.R(4)));return}var Q=x.VY(),c=new gh(0,0,x.m,x.e),$=c.P();
if(x.u){var z=x.u.rect,j=d.R(z.P()*4);d.WK(Q,c,j,z);d.nb(x.u.channel,j);Q=j;c=z;var U=x.u.channel;$=0;
for(var F=0;F<U.length;F++)$+=U[F];$=Math.round($/255)}var i=d.q9(Q);i[0][255]+=3*($-i[5]);for(var F=1;
F<4;F++)i[F][255]+=$-i[5];this.wL.U(i,$)};bM.prototype.Fy=function(x,Q){this.wL.wC(bN.ua[x.b4]["--text-color"])};
bM.prototype._=function(){cC.prototype._.call(this);this.wL._()};bM.prototype.Yr=function(){this._I()};
function dx(){cC.call(this,[9,8],!1,"---adj/clrL",cC.Pn.a2b);this.EU=E.p("div","padded");this.UN.appendChild(this.EU);
this.GH=new gx(10);this.EU.appendChild(this.GH.n);this.m2=new gK;this.m2.parent=this;this.EU.appendChild(this.m2.tg);
this.m2.tg.style.marginTop="6px";this.GH.k(u.E.t,this.ako,this);this.m2.k(u.E.t,this.ako,this)}dx.prototype=new cC("");
dx.prototype.ako=function(x){var Q;if(x.target==this.GH)Q=this.GH.h();else{var c=this.m2.h();Q=Math.round(c.Z)<<16|Math.round(c.r)<<8|Math.round(c.J)}var $=new jO(u.E.M,!0);
$.data={d:u.H.hW,hF:ke.$s,Zq:0,b:Q};this.T($)};dx.sc=function(x,Q){var c=Q==ke.m6,$=x.gd,z=x.T6,j=z.strokeStyleContent.v,U=null;
if((Q==ke.u$||c)&&$.bf==1){U=d.I.Du($.WB.Clr.v);U=U.Z<<16|U.r<<8|U.J}if((Q==ke.Rc||c)&&z.strokeEnabled.v&&j.classID=="solidColorLayer"){U=d.I.Du(j.Clr.v);
U=U.Z<<16|U.r<<8|U.J}if(Q==ke.$s||c)U=x.Gj;return U};dx.prototype.Fy=function(x,Q){var c=x.Gj,$=Q==ke.m6,z=dx.sc(x,Q);
if(z!=null){this.GH.U(z);this.m2.U({Z:z>>>16&255,r:z>>>8&255,J:z>>>0&255,J4:"Color #"+d.vg(z)})}if(Q==ke.oY||$){var j=x.awl;
this.m2.RN(j)}};function iM(){cC.call(this,[12,72],!1,"---adj/mixr",cC.Pn.asI);this.lX=null;this.Sf=null;
this.VL=E.p("div","lpbody scrollable");this.VL.style.marginTop="4px";this.Tx=E.p("div","lpfoot");this.UN.appendChild(this.VL);
this.UN.appendChild(this.Tx);this.RL=[];this.k("click",this.lA,this);this.fp=[];iM.Oy([[17,2],"Save Selection as Channel",[5,3],[5,4]],this.fp,this.Tx,this.bD.bind(this),this.O0.bind(this));
this.Q1=new ev([{name:"Merge Channels",Q2:!0}],[{K:u.E.M,C:{d:u.H.LL,AD:"mergechannels"}}])}iM.prototype=new cC("");
iM.prototype.t5=function(){return this.Q1};iM.Oy=function(x,Q,c,$,z){for(var F=0;F<x.length;F++){var j=new j7("W",!1,x[F]);
Q.push(j);E.KH(j.n,$);c.appendChild(j.n);var U=j.n;U.addEventListener("drop",z,!1);U.addEventListener("dragover",function(i){i.preventDefault()},!1);
U.addEventListener("dragenter",E.ce,!1)}};iM.B$=function(x,Q){for(var F=0;F<x.length;F++)if(x[F].n==Q.currentTarget)return F};
iM.prototype.bD=function(x){var Q=iM.B$(this.fp,x);if(Q==0)this.T(h$._f(!0,null,x));else{Q--;var c=new jO(u.E.G2,!0),$={classID:"null"};
if(Q==0)$.null={t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]};else if(Q==1)$.Nw={t:"Objc",v:{classID:"Chnl",ClrI:{t:"enum",v:{MskI:"SlcA"}},Opct:{t:"long",v:50}}};
else $.null=ep.QP("Chnl",!0);c.data={q4:["duplicate","make","delete"][Q],dx:$};this.T(c)}};iM.prototype.O0=function(x){var Q=iM.B$(this.fp,x);
if(Q==2){var c=new jO(u.E.G2,!0),$={classID:"null"};$.null=ep.QP("Chnl",!0);c.data={q4:"duplicate",dx:$};
this.T(c)}else this.bD(x)};iM.prototype.Kv=function(F){var x=this.RL,Q=x[F];if(Q==null){var c=E.p("canvas");
Q=c.getContext("2d");x.push(Q)}return Q};iM.prototype.lA=function(x){var Q=this.lX.slice(0),c=x.data.xR,$=Q[0]+Q[1]+Q[2],z=this.Sf;
if(-5<c&&c<0){var j=-c-1;if(x.data.qB){if(j==0)Q=$==3?[0,0,0]:[1,1,1];else{if(Q[j-1]==0)Q[j-1]=1;else if(!0)Q[j-1]=0}}else{if(j==0)Q=[1,1,1];
else{Q=[0,0,0];Q[j-1]=1}for(var F=0;F<z.fG.length;F++)z.fG[F].fd=!1;z.oW=[]}var U=new jO(u.E.v,!0);U.f=X.Oi;
U.data={d:"setcls",O:Q};this.T(U);return}if(-1<c){var i=z.B[c],b=i.kk==1?i.Rz():i.U5(z).F;if(x.data.qB)b.fd=!b.fd;
else{for(var F=0;F<z.fG.length;F++)z.fG[F].fd=!1;z.oW=[]}}else{var k=-c-5,b=z.fG[k];if(x.data.qB)b.fd=!b.fd;
else{for(var F=0;F<z.fG.length;F++)z.fG[F].fd=!1;b.fd=!0;z.oW=[k];if($!=0){var U=new jO(u.E.v,!0);U.f=X.Oi;
U.data={d:"setcls",O:[0,0,0]};this.T(U)}}}z.vu=z.Fq=!0};iM.prototype.Yr=function(){this.Og()};iM.prototype.BM=function(x){this.Sf=x;
this.Og()};iM.prototype.Og=function(){var x=this.Sf,Q=this.VL,R=4;E.Os(Q);if(x==null||!E.rm(Q))return;
var c=x.m,$=x.e,z=new gh(0,0,c,$),j=this.lX=x.Q.O.slice(0),U=j[0]+j[1]+j[2],i=Math.round(34*E.q_()),b=i;
if(c>$)b=Math.round(b*$/c);else i=Math.round(i*c/$);var e=["RGB"].concat(k5.v4);for(var F=0;F<4;F++){var k=this.Kv(F);
d.k5.PO(k,i,b,z,x.VY(),z,!1,F==0?null:F-1);var K=F==0?U==3:j[F-1]==1,g=new h$(-1-F,!0,!0,k,e[F],K,K);
g.parent=this;Q.appendChild(g.n);E.a7(k.canvas)}for(var F=0;F<x.g.length;F++){var T=x.B[x.g[F]],D=T.kk;
if(D!=1&&D!=3)continue;var a=D==1?T.Rz():T.U5(x).F,k=this.Kv(R+F);R++;d.k5.wI(k,i,b,z,a);var g=new h$(x.g[F],!0,!0,k,T.getName()+(D==1?"":" Filter")+" Mask",!0,a.fd);
g.parent=this;Q.appendChild(g.n);E.a7(k.canvas)}for(var F=0;F<x.fG.length;F++){var a=x.fG[F],k=this.Kv(R+F);
d.k5.wI(k,i,b,z,a);var g=new h$(-5-F,!0,a.name=="Quick Mask",k,a.name,x.oW.indexOf(F)!=-1,a.fd,X.Mf,{d:eM.Rd,Zq:"rnm",xR:F});
g.parent=this;Q.appendChild(g.n);E.a7(k.canvas)}};iM.prototype.oN=function(x,Q){this.VL.style.height=Q-30-4+"px";
this.VL.style.width=x+"px"};iM.prototype._=function(){cC.prototype._.call(this);this.Og();iM.fK(this.fp,["lrs/makesel","lrs/mask","lrs/newlayer","lrs/bin"])};
iM.fK=function(x,Q,c){var Q=c_.GV(Q,null,"miniscale");for(var F=0;F<x.length;F++)x[F].UG(Q[F],c?c[F]:null)};
function h$(x,Q,c,$,z,j,U,i,b){kw.call(this);this.n=E.p("div");this.aqj=x;this.arK=Q;this.Yt=$;this.aB9=i;
this.a7e=b;this.DI=E.p("div",j?"head selected":"head");this.DI.setAttribute("style","height: "+40+"px");
var e=E.p("div","headL"),k=E.p("div","headR"),K=15;this.n.appendChild(this.DI);this.DI.appendChild(e);
this.DI.appendChild(k);this.Bv=E.p("div","eye");if(1<E.q_()&&E.q_()<1.5)K=K/E.q_();this.Bv.setAttribute("style","background-size: "+K+"px "+K+"px;");
this.Bv.style.opacity=U?1:.2;if(Q)e.appendChild(this.Bv);this.ZG=E.p("div","thumb");if($)this.ZG.appendChild($.canvas);
e.appendChild(this.ZG);this.CS=E.p("div","label");if(c)this.CS.style.fontStyle="italic";this.CS.textContent=ah.get(z);
e.appendChild(this.CS);var g=this.DI;g.setAttribute("draggable","true");g.addEventListener("dragstart",function(R){R.stopPropagation();
R.dataTransfer.setData("Text","hello")},!1);g.addEventListener("drop",E.ce,!1);E.KH(this.DI,this.atD.bind(this));
if(!c)this.DI.addEventListener("mouseup",this.ayj.bind(this),!1)}h$.prototype=new kw;h$.prototype.zY=function(x){var Q=new jO(u.E.v,!0);
Q.f=this.aB9;Q.data=this.a7e;Q.data.name=x;this.T(Q)};h$.prototype.atD=function(x){var Q=x.ctrlKey||x.metaKey,c=this.aqj;
if(Q&&x.target==this.Yt.canvas){this.T(h$._f(this.arK,c,x))}else{var $=new jO("click",!0);$.data={xR:c,qB:x.target==this.Bv,yO:Q};
this.T($)}};h$.prototype.ayj=function(x){if(x.detail==2&&x.target==this.CS){var Q=new cC.qb(this.CS,this.zY.bind(this))}};
h$._f=function(x,Q,c){var $=0;if(c.shiftKey)$++;if(c.altKey)$+=2;var z=new jO(u.E.v,!0);z.f=X.kJ;if(x){if(-5<Q&&Q<0){z=new jO(u.E.G2,!0);
z.data=X.U_.FF($,["RGB","Rd","Grn","Bl"][-1-Q])}else z.data={d:"fromchannel",b3:[Q,0,$]}}else z.data={d:"frompath",b3:[Q,0,$]};
return z};function hE(){cC.call(this,[8,9],!1,"---panels/paths",cC.Pn.TM);this.lX=null;this.Sf=null;
this.VL=E.p("div","lpbody scrollable");this.VL.style.marginTop="4px";this.Tx=E.p("div","lpfoot");this.UN.appendChild(this.VL);
this.UN.appendChild(this.Tx);this.UN.addEventListener("click",this.afm.bind(this),!1);this.RL=[];this.k("click",this.lA,this);
this.fp=[];iM.Oy(["Fill Path","Stroke Path with Brush",[17,2],"Selection to Path",[5,3],[5,4]],this.fp,this.Tx,this.bD.bind(this),this.O0.bind(this))}hE.prototype=new cC("");
hE.prototype.bD=function(x,Q){var c=iM.B$(this.fp,x),$;if(c<2){if(c==1&&x.altKey){$=new jO(u.E.M,!0);
$.data={d:u.H.LL,AD:"strokepath"}}else{$=new jO(u.E.G2,!0);$.data=X.qW.Un(c==0?null:"PbTl")}}else if(c==2)$=h$._f(!1,null,x);
else if(c==3){$=new jO(u.E.G2,!0);$.data={q4:"make",dx:{classID:"null",null:{t:"obj ",v:[{t:"Clss",v:{classID:"Path"}}]},From:{t:"obj ",v:[{t:"prop",v:{classID:"csel",keyID:"fsel"}}]},Tlrn:{t:"UntF",v:{type:"#Pxl",val:2}}}}}else if(c>3){var $=new jO(u.E.v,!0);
$.f=X.T3;$.data={d:"pathedit",Zq:["new","del"][c-4],a6E:Q}}this.T($)};hE.prototype.O0=function(x){this.bD(x,!0)};
hE.prototype.Kv=function(F){var x=this.RL,Q=x[F];if(Q==null){var c=E.p("canvas");Q=c.getContext("2d");
x.push(Q)}return Q};hE.prototype.afm=function(x){if(x.target==this.VL){var Q=this.Sf;Q.IH=[];Q.ZQ=[];
Q.Fq=!0;Q.vu=!0}};hE.prototype.lA=function(x){var Q=x.data.xR,c=this.Sf,$=x.data.yO,z=Q,j=c.ZQ,U=c.IH;
if(Q<0){z=-1-Q;j=c.IH;U=c.ZQ}if($){var i=j.indexOf(z);if(i==-1)j.push(z);else j.splice(i,1)}else{while(j.length!=0)j.pop();
while(U.length!=0)U.pop();j.push(z)}c.Fq=!0;c.vu=!0};hE.prototype.Yr=function(){this.Og()};hE.prototype.BM=function(x){this.Sf=x;
this.Og()};hE.prototype.Og=function(){var x=this.Sf,Q=this.VL;E.Os(Q);if(x==null||!E.rm(Q))return;var c=x.m,$=x.e,z=new gh(0,0,c,$),j=this.lX=x.Q.O.slice(0),U=j[0]+j[1]+j[2],i=Math.round(34*E.q_()),b=i;
if(c>$)b=Math.round(b*$/c);else i=Math.round(i*c/$);var e=x.zo(),k=e[0];for(var F=0;F<k.length;F++){var K=k[F],g=this.Kv(F);
d.k5.anl(g,i,b,z,K.add.vmsk);var R=new h$(K.xR,!1,K.xR>=0,g,K.name,e[1].indexOf(F)!=-1,!1,X.T3,{d:"pathedit",Zq:"rnm",xR:K.xR});
R.parent=this;Q.appendChild(R.n);E.a7(g.canvas)}};hE.prototype.oN=function(x,Q){this.VL.style.height=Q-30-4+"px";
this.VL.style.width=x+"px"};hE.prototype._=function(){cC.prototype._.call(this);this.Og();iM.fK(this.fp,"-\u2B24 -\u25EF lrs/makesel lrs/makepath lrs/newlayer lrs/bin".split(" "))};
function cj(x){cC.call(this,[9,x?4:5],!1,"---panels/"+(x?"character":"paragraph"),x?cC.Pn.a8g:cC.Pn.az0);
this.UN.setAttribute("style","min-width:240px;");this.TF=x;this.gL=null;this.n$=null}cj.prototype=new cC("");
cj.prototype.pp=function(){this.gL=new ed;var x=this.gL,Q=this.UN;x.parent=this;if(this.TF){var c=E.p("div","marged");
Q.appendChild(c);c.appendChild(x.Gm.n);Q.appendChild(E.p("hr"));var $=E.p("div","marged");Q.appendChild($);
$.appendChild(x.$I.n);$.appendChild(x.c3.n);var z=E.p("div","marged");Q.appendChild(z);z.appendChild(x.p1.n);
z.appendChild(x.uO.n);Q.appendChild(E.p("hr"));var j=E.p("div","marged");Q.appendChild(j);j.appendChild(x.PA.n);
j.appendChild(x.Vd.n);var U=E.p("div","marged");Q.appendChild(U);U.appendChild(x.yQ.n);U.appendChild(x.zN.n);
U.appendChild(x.U$.n);Q.appendChild(E.p("hr"));var i=E.p("div","marged");Q.appendChild(i);i.appendChild(x.kK.n);
i.appendChild(x.Uc.n);i.appendChild(x.c1.n);i.appendChild(x.JH.n);i.appendChild(x.XV.n);i.appendChild(x.u6.n);
i.appendChild(x.HV.n);i.appendChild(x.NR.n)}else{var c=E.p("div","marged");Q.appendChild(c);c.appendChild(x.j2.n);
c.appendChild(x.NV.n);c.appendChild(x.Az.n);c.appendChild(x.aE7.n);c.appendChild(x.ae9.n);c.appendChild(x.a6K.n);
c.appendChild(x.a95.n);Q.appendChild(E.p("hr"));var $=E.p("div","marged");Q.appendChild($);$.appendChild(x.I7.n);
$.appendChild(x.Zf.n);$.appendChild(x.XF.n);Q.appendChild(E.p("hr"));var z=E.p("div","marged");Q.appendChild(z);
z.appendChild(x.jl.n);z.appendChild(x.uN.n);z.appendChild(x.FJ.n);z.appendChild(x.ed.n)}};cj.prototype.Yr=function(){if(!E.rm(this.UN))return;
if(this.gL==null){this.pp();var x=this.n$;if(x)this.gL.U(x._M,x.Dn,x.M0);this.gL._()}};cj.prototype._=function(){cC.prototype._.call(this);
if(this.gL)this.gL._()};cj.prototype.Fy=function(x,Q){this.n$=x;if(Q!=ke.m6&&Q!=ke.kg&&Q!=ke.Be&&Q!=ke.jw)return;
if(this.gL)this.gL.U(x._M,x.Dn,x.M0)};function dw(x){cC.call(this,x?"Character Styles":"Paragraph Styles",!1,null,x?cC.Pn.amg:cC.Pn.aaj);
this.UN.setAttribute("style","min-width:240px;");var Q=this.aF=E.p("div","scrollable");this.UN.appendChild(Q);
Q.setAttribute("style","max-height:400px;");this.LS=null;this.ax6=null;this.Wb=null;this.TF=x?0:1;this.D9=null;
this.n$=null;this.ath=dw.prototype.od.bind(this)}dw.prototype=new cC("");dw.prototype.BM=function(x,Q,c){this.D9=x;
this.n$=c;this.Og()};dw.prototype.Og=function(){var x=this.aF,Z=null;E.Os(x);if(!E.rm(this.UN))return;
var Q=this.D9,c=this.n$;if(Q==null||c==null)return;var $=c._M,z=this.LS=[],j={},U=this.ax6=[],i=this.Wb=[],b={},e=this.TF,k=e==0?"Style":"Paragraph";
for(var F=0;F<Q.B.length;F++){var K=Q.B[F].add.TySh;if(K==null)continue;var g=K.HW,R=K.i.c0(),T=g.ResourceDict.FontSet,D=g.EngineDict[k+"Run"],a=D.RunArray;
for(var _=0;_<a.length;_++){var I=dw.aar(a[_][k+"Sheet"][e==0?"StyleSheetData":"Properties"],e,T,U,b,R),f=JSON.stringify(I);
if(j[f]==null){j[f]=!0;z.push(I)}}}var y=e==0?function(g8,n){return n.FontSize-g8.FontSize}:function(g8,n){return g8.Justify-n.Justify};
z.sort(y);if(e==0){var v=[[1,.28,.28,.28],[1,1,1,1],[1,.85,.95,1],[1,.95,.85],[1,0,0,.3],[1,.3,0,0]],G=v.length,q=new Array(G),h=1e9,r=0,W=0;
q.fill(1e9);for(var F=0;F<z.length;F++){var H=z[F],T=H.FontSize;h=Math.min(h,T);r=Math.max(r,T);var o=H.FillColor.Values;
for(var _=0;_<G;_++){var P=v[_],O=o[1]-P[1],p=o[2]-P[2],C=o[3]-P[3];q[_]=Math.min(q[_],O*O+p*p+C*C)}}for(var _=0;
_<G;_++)if(q[_]>W){W=q[_];Z=v[_]}}var J=dw.aar(e==0?$.VA:$.SW,e,$._t,U,b,1),t=JSON.stringify(J);for(var F=0;
F<z.length;F++){var Y=E.p("div");x.appendChild(Y);i.push(Y);Y.addEventListener("click",this.ath,!1);
var H=z[F],l=JSON.stringify(H)==t;if(e==0){var m=U[H.Font].Name,B=m.toLowerCase(),L=B.indexOf("bold")!=-1||B.indexOf("-black")!=-1,A=B.indexOf("italic")!=-1||B.indexOf("oblique")!=-1||B.endsWith("-it"),S=B.indexOf("light")!=-1,T=H.FontSize,o=H.FillColor.Values,M=Z;
if(l){M=M.slice(0);for(var _=1;_<4;_++)M[_]*=.8}var N=r==h?.5:(T-h)/(r-h),$=10+16*N,s="overflow:hidden; white-space:nowrap; height:38px;  font-size:"+$+"px; color:"+CSS.Au({Z:o[1]*255,r:o[2]*255,J:o[3]*255})+"; border-bottom:1px solid grey; line-height:"+38+"px; background-color:"+CSS.Au({Z:M[1]*255,r:M[2]*255,J:M[3]*255})+";";
if(L)s+=" font-weight:bold;";if(A)s+=" font-style:italic;";if(S)s+=" font-weight:lighter;";Y.setAttribute("style",s);
var V=E.p("span");Y.appendChild(V);V.setAttribute("style","display:inline-block;  width:"+(r>99?50:40)+"px;  text-align:right;  margin-right:5px;");
V.textContent=Math.round(T);V=E.p("span");Y.appendChild(V);V.setAttribute("style","display:inline-block;  width:130px; ");
V.textContent=m}}};dw.prototype.od=function(x){var Q=JSON.parse(JSON.stringify(this.n$._M)),F=this.Wb.indexOf(x.currentTarget),c=this.LS[F];
for(var $ in c)if($!="Font")Q.VA[$]=c[$];dU.gD(Q,this.ax6[c.Font].Name);console.log(Q);var z=new jO(u.E.M,!0);
z.data={d:u.H.hW,hF:ke.kg,_M:Q};this.T(z);var z=new jO(u.E.v,!0);z.f=X.gr;z.data={d:"updateStyles"};
this.T(z)};dw.aar=function(x,Q,c,$,z,j){var U=Q==0?["Font","FontSize","FillColor"]:[],i={};for(var b=0;
b<U.length;b++)i[U[b]]=x[U[b]];if(Q==0){if(i.Font!=null){var e=c[i.Font].Name;if(z[e]==null){z[e]=$.length;
$.push(c[i.Font])}i.Font=z[e]}i.FontSize=i.FontSize*j}return i};dw.prototype.Yr=function(){if(!E.rm(this.UN))return};
dw.prototype._=function(){cC.prototype._.call(this)};dw.prototype.Fy=function(x,Q){this.n$=x;this.Og()};
function iK(){cC.call(this,[9,13],!1,"---panels/glyphs",cC.Pn.a9o);this.n$=null}iK.prototype=new cC("");
iK.prototype.pp=function(){this.gL=new ed;this.gL.parent=this;this.al7=null;this.aiy=null;this.fW=null;
this.aAC=null;this.IF=Math.round(290*E.q_());this.IP=45;this.aDD=4;this.a8V=this._I.bind(this);this.aqb=0;
this.NW=new c7(null,["Hi","Hello"]);this.NW.k(u.E.t,this._I,this);var x=this.b$=new j7("-",null,null,!0);
x.k("click",this.arm,this);var Q=this.asN=new j7("+",null,null,!0);Q.k("click",this.arm,this);this.uI=new jn(!1);
this.uI.k(u.E.t,this.WG,this);this.uI.n.style.height=250+"px";var c=this.P3=E.p("div","form padded");
this.UN.appendChild(c);c.appendChild(this.gL.Gm.n);E._X(c);c.appendChild(this.NW.n);c.appendChild(x.n);
c.appendChild(Q.n);this.UN.appendChild(this.uI.n)};iK.prototype.oN=function(x,Q){if(this.ww==x||this.gL==null)return;
this.ww=x;this.IF=Math.floor((x-13)*E.q_());this.P3.setAttribute("style","width:"+this.IF/E.q_()+"px;");
this.uI.n.style.height=Q-73+"px";this._I()};iK.prototype.WG=function(x){var Q=this.aj9(),c=Math.round(this.IF/Q);
Q/=E.q_();var $=this.uI.h()[0]*c*this.aDD,z=this.uI.anu();$+=Math.floor(z.y/Q)*c;$+=Math.floor(z.x/Q);
var j=this.fW[this.NW.h()];if($>=j.length)return;var U=j[$],i=this.aAC[U],b=new jO(u.E.v,!0);b.f=X.gr;
if(i.Rx.length==0)b.data={d:"insertGlyph",b:$+1};else b.data={d:"insertText",b:String.fromCodePoint(i.Rx[0])};
this.T(b)};iK.prototype.arm=function(x){var Q=1.2;if(x.target==this.b$){if(this.IP>20)this.IP/=Q}else{if(this.IP<100)this.IP*=Q}this._I()};
iK.prototype.Yr=function(){this.Fy(this.n$)};iK.prototype.Fy=function(x,Q){this.n$=x;if(!E.rm(this.UN))return;
if(this.gL==null)this.pp();this.gL.U(x._M,x.Dn,x.M0);var c=x._M,$=c.VA.Font,b=0;if($==null)return;var z=c._t[$].Name;
if(this.al7==z)return;var $=x.Dn.WY(z);if($==null)return;var j=$.maxp.numGlyphs,U=this.aAC=new Array(j);
for(var F=0;F<j;F++)U[F]={Rx:[]};var i=Date.now(),e=new Uint8Array(1048575);for(var F=0;F<1048575;F++){var k=Typr.U.codeToGlyph($,F);
if(k!=0&&k<j){e[F]=1;if(U[k].Rx.length==0)b++;U[k].Rx.push(F)}}var K=iK.Db,g=[];for(var F=0;F<K.length;
F++)g.push([]);for(var k=1;k<j;k++){g[0].push(k);var R=U[k].Rx[0];if(R==null){continue}for(var T=1;T<K.length;
T++){var D=K[T].lh;for(var F=0;F<D.length;F+=2)if(D[F]<=R&&R<=D[F+1]){g[T].push(k);break}}}this.fW=g;
var a=[];for(var F=0;F<K.length;F++)a.push(K[F].Qw+" ("+g[F].length+")");var _=this.NW.h();this.NW.yJ(a);
this.NW.U(_);this.al7=z;this.aiy=$;this._I()};iK.prototype.aj9=function(x){var Q=Math.floor(this.IF/this.IP);
return Math.floor(this.IF/Q)};iK.prototype._I=function(x){if(!E.rm(this.UN)||this.fW==null)return;var Q=this.fW[this.NW.h()],c=Q.length,$=this.aiy,z=Typr.U,j=this.aj9(),U=j,i=U*.8,b=U*.8/$.head.unitsPerEm,e=[],k=Math.floor(this.IF/j),K=Math.ceil(c/k),g=this.aDD,R=Date.now();
for(var T=0;T<K;T+=g){var D=E.p("canvas"),a=D.getContext("2d");D.width=j*k;D.height=U*g;a.fillStyle="white";
a.fillRect(0,0,k*j,U*g);for(var _=0;_<g;_++){for(var I=0;I<k;I++){var F=Q[(T+_)*k+I];if(F==null)break;
var f=z.glyphToPath($,F),y=d.A.pA(f.crds);a.fillStyle="#252525";if(y._6()){var Z=$.hmtx,v=[],H=170;for(var G in Z)v.push(G);
var q=Z[v[0]][F],h=Z[v[1]][F],r=Math.max(q,h);f={cmds:"M L M L M L".split(" "),crds:[0,0,r,0,0,-H,0,H,r,-H,r,H]};
y.m=r;y.x=0;a.strokeStyle="rgba(0,255,0,1)"}a.beginPath();var o=I*j+(j-y.m*b)*.5-y.x*b,P=_*U+i;a.translate(o,P);
a.scale(b,-b);z.pathToContext(f,a);a.scale(1/b,-1/b);a.translate(-o,-P);y._6()?a.stroke():a.fill()}}a.beginPath();
for(var I=0;I<k;I++){var O=I*j+j+.5;a.moveTo(O,0);a.lineTo(O,U*g)}for(var _=0;_<g;_++){var p=_*U+U+.5;
a.moveTo(0,p);a.lineTo(k*j,p)}a.strokeStyle="rgba(0,0,0,0.3)";a.stroke();e.push(D)}this.uI.SY(e,null,j*k,U*g)};
iK.Db=[{Qw:"All Glyphs"},{Qw:"Basic Latin, Latin 1",lh:[0,127,128,143]},{Qw:"Latin Extended-A",lh:[256,383]},{Qw:"Latin Extended-B",lh:[384,591]},{Qw:"Punctuations",lh:[33,35,37,39,42,42,44,44,46,47,58,59,63,63,64,64,92,92,161,161,167,167,182,183,191,191,894,894,903,903,1370,1375,1417,1417,8192,8303,11776,11903]},{Qw:"Greek",lh:[880,1023]},{Qw:"Cyrillic",lh:[1024,1279]},{Qw:"Hebrew",lh:[1424,1535]},{Qw:"Arabic",lh:[1536,1791]},{Qw:"Emoji",lh:[9728,10095,127744,129535]}];
function bA(){cC.call(this,[13,0],!1,null,cC.Pn.$s);this.c7=0;this.a8E=0;this.n$=null}bA.prototype=new cC("");
bA.prototype.pp=function(){if(!E.rm(this.UN)||this.Y0)return;var x=E.p("div","flexrow padded");this.UN.appendChild(x);
var Q=E.p("div");x.appendChild(Q);this.Y0=[];for(var F=0;F<2;F++){var c=new hc;this.Y0.push(c);c.k("click",this.alX,this);
Q.appendChild(c.n)}this.Ku=new jl(192);console.log("hsb picker");this.Ku.k(u.E.t,this.Mz,this);this._H=new an;
this._H.parent=this;x.appendChild(this.Ku.n);this.Fy(this.n$,ke.m6)};bA.prototype.alX=function(x){var Q=x.currentTarget,c=this.Y0.indexOf(Q);
if(c==this.c7){this._H.Oc(c)}else{this.c7=c;this._I()}};bA.prototype.Mz=function(x){var Q=this.Ku.h();
this.Ku.U(Q);var c=Math.round(Q.Z*255)<<16|Math.round(Q.r*255)<<8|Math.round(Q.J*255),$=new jO(u.E.M,!0);
$.data={d:u.H.hW,hF:ke.$s,Zq:this.c7,b:c};this.T($);this.a8E=Date.now()};bA.prototype._I=function(){if(this._H==null)return;
var x=this.n$,Q=this.c7,c=[x.Gj,x.QI];for(var F=0;F<2;F++){var $=this.Y0[F],z=$.n.style;$.wC(c[F]);if(F==Q)z.filter="drop-shadow(0 0 1px #000000)"}var j=c[Q];
if(Date.now()-this.a8E>100)this.Ku.U({Z:(j>>>16)/255,r:(j>>>8&255)/255,J:(j&255)/255})};bA.prototype.Fy=function(x,Q){this.n$=x;
if(this._H==null)return;if(Q==ke.m6||Q==ke.$s){this._H.avv(x.Gj,x.QI);this._I()}};bA.prototype.BM=function(){this.pp()};
bA.prototype.Yr=function(){this.pp();this._I()};function gB(){cC.call(this,"CSS",!1,"---panels/css",cC.Pn.CSS);
this.D9=null;var x=E.p("div","padded");this.UN.appendChild(x);this.Qq=E.p("textarea");E.e5(this.Qq);
x.appendChild(this.Qq)}gB.prototype=new cC("");gB.prototype.oN=function(x,Q){if(this.ww==x)return;this.ww=x;
this.Qq.setAttribute("style","display:block;tab-size:4;  margin:0; font-family:monospace; width:"+(x-10)+"px; height:"+(Q-10)+"px")};
gB.prototype.BM=function(x){this.D9=x;this._I()};gB.prototype.Fy=function(x,Q){if(Q==ke.Be)this._I()};
gB.prototype._I=function(){var x=this.D9;if(x==null||x.g.length==0)return;if(!E.rm(this.UN))return;var Q=x.B[x.g[0]],c=CSS.afy(Q,x);
if(c.length!=0)this.Qq.value=c.join(";\n")+";";else this.Qq.value=""};gB.prototype.Yr=function(){this._I()};
function bc(){cC.call(this,"Text to Image",!1,null,cC.Pn.aCO);this.D9=null;var x=this.a9O=E.p("div","form padded labfxd");
this.UN.appendChild(x);this.asZ=["512x512","1024x1024"];this.Dw=0;this.uF={};this._L=[];this.P4=[];this.GA=null;
var Q=["API Key","Generate"],c=this.Wb=[[new jz("Stable Diffusion"),new c_(null,["Our key","Your own key"]),new el],[new el("Prompt",null,null,4),new f2("Inpaint the selection"),new j7([12,49],!0,null,!0)]];
c[1][0].U("goat riding a bike");for(var F=0;F<2;F++){var $=new j7(Q[F]);this._L.push($);x.appendChild($.n);
$.k("click",this.a6Q,this);var z=E.p("div");this.P4.push(z);var j=c[F];for(var U=0;U<j.length;U++){j[U].parent=this;
z.appendChild(j[U].n);if(F==0)j[U].k(u.E.t,this.afS,this);if(F==1&&U==2)j[U].k("click",this.avR,this)}}E.ix(x);
this.Ca=E.p("div");x.appendChild(this.Ca);this.wL=E.p("div","scrollable");this.P4[1].appendChild(this.wL);
var i=window.locStor.getItem("dezgo_api_key");if(i){i=i.split(",");c[0][1].U(parseInt(i[0]));c[0][2].U(i[1])}else c[0][2].U("your_api_key");
this.afS();this.a6Q(null,1);bc.aa1=bc.prototype.ao0.bind(this)}bc.prototype=new cC("");bc.prototype.avR=function(){var x=this.Wb,Q=x[0],c=x[1],$=Q[1].h()==0,z=Q[2].h().trim(),j=c[0].h().trim(),U=c[1].h(),i=bc.alE($,z,j,U?this.D9:null);
if(i==1)E.ZW(this.UN,"disabled")};bc.aa1=null;bc.GH=0;bc.avk=null;bc.n8=!1;bc.g3=function(x){if(!dQ.OT()){var Q=Math.round((Date.now()-bc.GH)/1e3),c=0;
if(Q<c){window.confirm("Wait "+(c-Q)+" seconds or get a Premium account for the unlimited access. Or enter your own API Key.");
return!1}}if(x&&bc.IG(x)==null){alert("Your area is too big, we support only smaller areas.");return!1}return!0};
bc.IG=function(x){var Q=x.B[x.g[0]].rect,c=x.u.rect.y_(Q),j=7;if(!bc.n8&&c.P()>1024*1024)return null;
var $=c.P()>512*512,z=512*512;if($){z=1024*1024;j=15}while(!0){var U=c.clone();U.ss(1,1);U=U.y_(Q);if(U.P()>c.P()&&U.P()<=z&&(!bc.n8||Math.max(U.m,U.e)<=1080))c=U;
else break}var i=c.m&j;c.m-=i;c.x+=i>>>1;var b=c.e&j;c.e-=b;c.y+=b>>>1;return c};bc.alE=function(x,Q,c,$,z,j){if(!navigator.onLine){alert("Get online to use this feature.");
return}if(x&&!bc.g3())return;var U=bc.n8,i=$?bc.IG($).P()>512*512:!0,b,e;if(U)i=!1;var k=JSON.parse(jk.MB("l6(--.4;KXQHFL?@NJivodh\\jp\"/(v{sw\":G@59)-:68@@CUVOXZN[ch\\goxf</<5*.}\"/+-558JKDMOCxI}O('+lw$1*s#&%+TLO%73Z48P@KlETUyo|uk_ut5ovmvw7D=(05)4<E=EA^kdOWUcQ^e\\ef&3,zq'\"x&-$-.MZS-d~C[KVv8UlwV")),K=jk.MB("UYqalMih`cpkf~knry{,$2(:3.A48@BEXG^QPdeicnahzzqu'(\" %5&(.5G4KP>GV[[MOUkm]acll|"),g={};
g[k[11]]=x?K:Q;var R={};R[k[0]]=c;R[k[1]]=i?2:1;R[k[2]]=30;R[k[3]]=$?k[4]:k[5];if(j)for(var T in j)R[T]=j[T];
var D=k[6]+($==null?k[7]:k[8]);if(U){D="https://stablediffusionapi.com/api/v1/enterprise/controlnet"}var a=new XMLHttpRequest;
a.open("POST",D,!0);if(!U)for(var _ in g)a.setRequestHeader(_,g[_]);if(z==null)z=bc.aa1;a.onload=z;a.responseType="arraybuffer";
if($==null){a.setRequestHeader("content-type","application/x-www-form-urlencoded");var I=[];for(var T in R)I.push(encodeURIComponent(T)+"="+encodeURIComponent(R[T]));
a.send(I.join("&"));b=e=512}else{var f=bc.IG($),y=$.B[$.g[0]],Z=$.u,v=d.R(f.P()*4);d.WK(y.buffer,y.rect,v,f);
var G=d.R(f.P());d.L2(Z.channel,Z.rect,G,f);if(i){console.log("downscaling");var q=d.t1(v,f);v=q.AX;
var h=d.hq(G,f);G=h.AX;f=h.rect}var r=UPNG.encode([v.buffer],f.m,f.e);d.round(G);var H=d.R(f.P()*4);
H.fill(255);d.ZM(G,H);var o=UPNG.encode([H.buffer],f.m,f.e,null,null,null,!0);if(U){var R={key:"odi5etd8luya65",controlnet_model:"inpaint",controlnet_type:"inpaint",model_id:"midjourney",auto_hint:"yes",guess_mode:"no",prompt:c,negative_prompt:"((out of frame)), ((extra fingers)), mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), (((tiling))), ((naked)), ((tile)), ((fleshpile)), ((ugly)), (((abstract))), blurry, ((bad anatomy)), ((bad proportions)), ((extra limbs)), cloned face, (((skinny))), glitchy, ((extra breasts)), ((double torso)), ((extra arms)), ((extra hands)), ((mangled fingers)), ((missing breasts)), (missing lips), ((ugly face)), ((fat)), ((extra legs)), anime",init_image:ar.al(r),mask_image:ar.al(o),width:""+f.m,height:""+f.e,samples:"1",scheduler:"UniPCMultistepScheduler",num_inference_steps:"30",safety_checker:"no",base64:"yes",enhance_prompt:"yes",guidance_scale:9,strength:.8,seed:null,webhook:null,track_id:null};
console.log(f);a.setRequestHeader("Content-Type","application/json");a.send(JSON.stringify(R))}else{var P=new FormData;
P.append(k[9],new Blob([r],{type:"image/png"}));P.append(k[10],new Blob([o],{type:"image/png"}));for(var T in R)P.append(T,R[T]);
a.send(P)}b=f.m;e=f.e}bc.avk=[b,e,i,x];return 1};bc.Xj=function(x){bc.GH=Date.now();var Q=this.avk,c=Q[0],$=Q[1],z=Q[2],j=Q[3],i=30;
if(!j)return;var U=dQ.OT()?"Premium":"Free",b=Math.max(c*$,512*512),e=(b*6849e-9-1.133)*Math.max(i,10);
if(z==2)e+=b*49278e-9;for(var F=0;F<e;F++)dQ.event("dez"+"go_De"+"zgo "+U+(x?" "+x:""))};bc.prototype.ao0=function(x){var Q=this.Wb;
E.WP(this.UN,"disabled");var c={created:Math.round(Date.now()/1e3),data:[{b64_json:ar.al(x.target.response)}]},$=this.uF,z=Q[1][0].h().trim();
if($[z]==null)$[z]=[];$[z].push(c);bc.Xj();this._I()};bc.prototype.afS=function(x){var Q=this.Wb,c=[Q[0][1].h(),Q[0][2].h().trim()];
window.locStor.setItem("dez"+"go_ap"+"i_key",c.join(","));Q[0][2].vz(c[0]==1)};bc.prototype.a6Q=function(x,F){E.Os(this.Ca);
if(F==null)F=this._L.indexOf(x.target);for(var Q=0;Q<2;Q++)this._L[Q].U(Q==F);this.Ca.appendChild(this.P4[F])};
bc.prototype.oN=function(x,Q){if(this.ww==x)return;this.ww=x;this.a9O.style.width=x-16+"px";this.wL.style.height=Q-190+"px"};
bc.prototype.BM=function(x,Q){this.D9=x;if(x)this.Dw=Q.indexOf(x);this._I()};bc.prototype.Fy=function(x,Q){};
bc.prototype._=function(x,Q){cC.prototype._.call(this);var c=this.Wb,z=" target=\"_blank\" style=\"color:inherit;\">";
for(var F=0;F<2;F++){this._L[F]._();for(var $=0;$<c[F].length;$++)this.Wb[F][$]._()}c[0][0].n.innerHTML="Stable Diffusion"};
bc.prototype._I=function(){var x=this.wL,Q=this.uF;E.Os(x);var c=[];for(var $ in Q){Q[$].sort(function(R,T){return T.created-R.created});
c.push([$,Q[$]])}c.sort(function(R,T){return T[1][0].created-R[1][0].created});var z=this.ap8.bind(this),j=this.GA=[[],[]];
for(var F=0;F<c.length;F++){var $=c[F][0],U=c[F][1],i=E.p("div");i.textContent=$;x.appendChild(i);for(var b=0;
b<U.length;b++){var e=U[b].data;for(var k=0;k<e.length;k++){var K=e[k].b64_json,g=E.p("img");g.setAttribute("src","data:image/png;base64,"+K);
g.onclick=z;g.style.width=128/E.q_()+"px";g.style.marginRight="4px";g.style.cursor="pointer";x.appendChild(g);
j[0].push(g);j[1].push(e[k])}}}};bc.prototype.ap8=function(x){var F=this.GA[0].indexOf(x.target),Q=this.GA[1][F].b64_json,c=ar.KG(Q);
hF.nn({url:"file",Dw:this.Dw},c,this)};bc.prototype.Yr=function(){this._I()};function bn(){cC.call(this,[9,6],!1,"---panels/info",cC.Pn.axo);
this.UN.setAttribute("style","min-width:240px;");this.D9=null;this.n$=null;this.wj=null;var x=this.cn=[];
for(var Q=0;Q<3;Q++){var c=E.p("div","marged row");this.UN.appendChild(c);var $=E.p("div","cell");$.setAttribute("style","width:10em");
c.appendChild($);var z=E.p("div","cell");z.setAttribute("style","width:10em");c.appendChild(z);var j=[8,4,3][Q];
for(var F=0;F<j;F++){var U=new jz("");x.push(U);U.U(0);U.n.style.padding="0";var i=F<(Q==1?2:4)?$:z;
i.appendChild(U.n);E._X(i)}if(Q<2)E.ix(this.UN)}this.u8=x[8];this.h5=x[9];this.gw=x[10];this.ZJ=x[11];
E.ix(this.UN);this.wj=E.p("div");this.wj.setAttribute("style","min-width:240px;display:flex;flex-direction:row;flex-wrap:wrap;");
this.UN.appendChild(this.wj)}bn.prototype=new cC("");bn.prototype.CK=function(x,Q,c,$,z){if(!E.rm(this.UN)||x==null)return;
var j=x.Q.$X(z.x,z.y),U=new bC(Math.floor(j.x),Math.floor(j.y));if(!z.TZ){var i=0,b=0,e=0,k=0,K=this.cn;
if(!z.TZ&&!x.a8Z()&&new gh(0,0,x.m-1,x.e-1).Wl(U)){var g=x.VY(),F=x.m*U.y+U.x<<2;i=g[F+0];b=g[F+1];e=g[F+2];
k=g[F+3]}var R=d.ru([i/255,b/255,e/255]);K[0].U("R: "+i);K[1].U("G: "+b);K[2].U("B: "+e);K[3].U("A: "+k);
K[4].U("C: "+Math.round(R[0]*100)+"%");K[5].U("M: "+Math.round(R[1]*100)+"%");K[6].U("Y: "+Math.round(R[2]*100)+"%");
K[7].U("K: "+Math.round(R[3]*100)+"%");var T=d.aks(i,b,e);K[12].U("H: "+Math.round(T.R0*360)+"\xB0");
K[13].U("S: "+Math.round(T.ks*100)+"%");K[14].U("B: "+Math.round(T.J*100/255)+"%")}var D=x.Q.W>1?new bC(j.x,j.y):U;
this.u8.U("X: "+d.fR.Z0(D.x,x.cQ,c,x.m));this.h5.U("Y: "+d.fR.Z0(D.y,x.cQ,c,x.e));this.se()};bn.prototype.se=function(){var x=this.D9,Q=this.n$,c=0,$=0;
if(x&&Q){if(x.Q._u){c=x.Q._u.m;$=x.Q._u.e}else if(x.u){c=x.u.rect.m;$=x.u.rect.e}c=d.fR.Z0(Math.abs(c),x.cQ,Q,x.m);
$=d.fR.Z0(Math.abs($),x.cQ,Q,x.e)}this.gw.U(ah.get([12,41]).charAt(0)+": "+c);this.ZJ.U(ah.get([12,42]).charAt(0)+": "+$)};
bn.prototype._=function(){cC.prototype._.call(this);this.se()};bn.prototype.Yr=function(){this.BM(this.D9,null,this.n$)};
bn.prototype.BM=function(x,Q,c){this.D9=x;this.n$=c;if(!E.rm(this.UN))return;console.log("update");this.se();
if(x&&x.g.length!=0){var $=x.g[0],z=x.B[$],j=k5.get(z.add)!=null,U=j&&x.g[0]>0;this.wj.innerHTML="";
for(var F=0;F<x.Vv.length;F++){var i=x.Vv[F],z=x.Q.wu(i.x,i.y),b=X.vt.VM(x,z,1,U?1:2),e={Z:b>>>16&255,r:b>>>8&255,J:b&255},D="<span style=\"display:inline-block; width:25px; text-align:right\">",a="</span>";
if(U){var k=x.g[0];x.g[0]=$-1;var K=X.vt.VM(x,z,1,1),g={Z:K>>>16&255,r:K>>>8&255,J:K&255};x.g[0]=k}var R=E.p("div");
R.setAttribute("style","padding: 0.5em 0.5em; width: 40%");var T="<b>#"+(F+1)+"</b>",_=[e.Z,e.r,e.J],I=U?[g.Z,g.r,g.J]:null,f=["R","G","B"];
for(var y=0;y<3;y++)T+="<br/>"+D+f[y]+a+": "+(U?D+I[y]+a+" /":"")+D+_[y]+a;R.innerHTML=T;this.wj.appendChild(R)}}};
function cr(){cC.call(this,[9,1],!1,"---panels/layers",cC.Pn.Mf);this.$e=null;this.HE=[];this.Ta=null;
this.fD=null;this.DI=E.p("div","lphead");this.VL=E.p("div","lpbody scrollable");this.VL.addEventListener("scroll",this.adT.bind(this),!1);
this.Tx=E.p("div","lpfoot");var x=this.a0n=E.p("span");x.setAttribute("style","display:inline-block; height:26px");
this.DI.appendChild(x);this.mT=new c7(null,cq.o_,cq.nW);this.mT.k(u.E.t,this.a7o,this);this.DI.appendChild(this.mT.n);
this.me=new f0([12,0],0,100,"%",0);this.me.k(u.E.t,this.acu,this);this.me.parent=this;this.DI.appendChild(this.me.n);
this.b1=new cT([6,57,2],["<img src=\""+PIMG.trsp3+"\" class=\"miniscale gsicon\" />","<img src=\""+PIMG["tools/brush"]+"\" class=\"miniscale gsicon\" />","<img src=\""+PIMG.pos+"\" class=\"miniscale gsicon\" />","<img src=\""+PIMG["lrs/lock"]+"\" class=\"miniscale gsicon\" />"],!0,["Transparency",[12,76,2],[12,40],[7,0]]);
this.b1.k(u.E.t,this.aCj,this);this.DI.appendChild(this.b1.n);this.Qb=new f0([12,26],0,100,"%",0);this.Qb.k(u.E.t,this.auR,this);
this.Qb.parent=this;this.DI.appendChild(this.Qb.n);this.fp=[];this.Oy();this.UN.appendChild(this.DI);
this.UN.appendChild(this.VL);this.VL.addEventListener("dragover",function(z){z.preventDefault()},!1);
this.VL.addEventListener("dragenter",E.ce,!1);this.VL.addEventListener("drop",this.avQ.bind(this),!1);
this.UN.appendChild(this.Tx);this.UN.addEventListener("contextmenu",E.ce,!1);this.k("rclick",this.auF,this);
var Q=function(z,j,F){return{H5:this.jI[F]==1}}.bind(this);this.a5j=new ev([{name:[0,6],w:Q},{name:[14,10],w:Q},{name:[6,57,2],w:Q,P$:!0},{name:"Long-tap as a right click",w:Q,P$:!0},{name:"\u2796 Thumbnail Size"},{name:"\u2795 Thumbnail Size"},{name:"Thumbnails by Layer",w:function(){return{H5:bb.mx==0,w:!0}}},{name:"Thumbnails by Document",w:function(){return{H5:bb.mx==1,w:!0}}}]);
this.a5j.k("select",this.apd,this);this.jI=[0,1,1,0];var c=window.locStor;if(c){var $=c.getItem("lpOpt");
if($){$=JSON.parse($);this.jI=$[0];bb.$Z=$[1];bb.mx=$[2]}}this.apd()}cr.prototype=new cC("");cr.prototype.Vf=function(){if(this.aA7)return;
var x=kF._l(!0),Q=kF.eq(!0);this.aA7=new ev(x,Q);var x=[{name:[14,10]},{name:[14,11],P$:!0},{name:[6,0]},{name:[11,4]},{name:[5,4],P$:!0},{name:[6,7,0]},{name:"New Smart Obj. via Copy",w:function(c){return{w:c.B[c.g[0]].add.SoLd!=null}},P$:!0},{name:[6,8],w:cr.alx},{name:[6,34],w:function(c){var $=c.B[c.g[0]];
return{w:$.add.lmfx!=null&&!$.Uy()}}},{name:[6,40],P$:!0,w:function(c){var $=c.B[c.g[0]];return{w:$.add.TySh!=null}}},{name:"",P$:!0,w:function(c){var $=c.B[c.g[0]],z=$.add.TySh,j=z?z.HW:null;
return{w:z!=null&&j.Curve==null,LT:ah.get(z&&dU.SI(j)==0?[16,3,1]:[16,3,0])}}},cr.a2a(!1),kF.aDv(),{name:[6,12,0],w:function(c){var $=c==null?0:c.g.length;
return{w:$!=0&&($!=1||c.g[0]!=0),LT:ah.get($>1||$==1&&c.B[c.g[0]].Uy()?[6,12,0]:[6,10])}}},{name:[6,12,1],P$:!0},{name:[13,0],sub:function(){var c=[];
for(var F=0;F<b9.AT.length;F++)c.push({name:[13,1,F],k5:"#"+d.vg(b9.AT[F])});return c}()}],Q=[{K:u.E.M,C:{d:u.H.LL,AD:"layerstyle"}},{K:u.E.v,f:X.kJ,C:{d:"fromlayer",b3:[null,0,0]}},{K:u.E.v,f:X.Mf,C:{d:eM.DN}},{K:u.E.M,C:{d:u.H.LL,AD:"duplinto"}},{K:u.E.v,f:X.Mf,C:{d:eM.bU}},{K:u.E.G2,C:{q4:"newPlacedLayer"}},{K:u.E.v,f:X.Mf,C:{d:eM.NJ}},{K:u.E.G2,C:{q4:"rasterizeLayer",dx:{classID:"rasterizeLayer",null:ep.QP("Lyr",!0)}}},{K:u.E.G2,C:{q4:"rasterizeLayer",dx:{classID:"rasterizeLayer",null:ep.QP("Lyr",!0),What:{t:"enum",v:{rasterizeItem:"layerStyle"}}}}},{K:u.E.v,f:X.Mf,C:{d:eM.ax9}},{K:u.E.v,f:X.gr,C:{d:"switchPntPrgr"}},{K:u.E.v,f:X.Mf,C:{d:eM.DF}},kF.a22(),{K:u.E.G2,C:{q4:"mergeLayersNew",dx:{__name:"Merge Layers",classID:"Mrg2"}}},{K:u.E.G2,C:{q4:"flattenImage"}},{sub:function(){var c=[];
for(var F=0;F<8;F++)c.push({K:u.E.v,f:X.Mf,C:{d:eM.rb,aDo:F}});return c}()}];this.ue=new ev(x,Q);var x=[{name:[6,45],w:function(c){var $=c.B[c.g[0]];
return{w:$.U5(c).F==null}}},{name:[6,47]}],Q=[{K:u.E.v,f:X.Mf,C:{d:eM.XE}},{K:u.E.v,f:X.Mf,C:{d:eM.Hy}}];
this.a00=new ev(x,Q);var x=[{name:"enab/disab",w:function(c){return{LT:ah.get(c.B[c.g[0]].Rz().isEnabled?[6,15]:[6,14])}}},{name:[6,22]},{name:[5,8],w:function(c){return{w:c.hS(!1,!0)}}}],Q=[{K:u.E.v,f:X.Mf,C:{d:eM.wr}},{K:u.E.v,f:X.Mf,C:{d:eM.zb}},{K:u.E.v,f:X.Mf,C:{d:eM.Bc}}];
this.a14=new ev(x,Q);var x=[{name:"enab/disab",w:function(c){return{LT:ah.get(c.B[c.g[0]].U5(c).F.isEnabled?[6,42]:[6,41])}}},{name:[6,46]}],Q=[{K:u.E.v,f:X.Mf,C:{d:eM.mS}},{K:u.E.v,f:X.Mf,C:{d:eM.aq}}];
this.azM=new ev(x,Q);var x=[{name:"enab/disab",w:function(c){return{LT:ah.get(c.B[c.g[0]].add.vmsk.isEnabled?[6,17]:[6,16])}}},{name:[6,24]},{name:[6,8]}],Q=[{K:u.E.v,f:X.Mf,C:{d:eM.TK}},{K:u.E.v,f:X.Mf,C:{d:eM.T7}},{K:u.E.v,f:X.Mf,C:{d:eM.ld}}];
this.a6I=new ev(x,Q);this.acx=new ev(kF.aDO(!0),kF.Hj(!0));this.agX=new ev(kF._l(),kF.eq())};cr.prototype.adT=function(x){var Q=this.VL.scrollTop-600;
for(var F=0;F<this.HE.length;F++){var c=this.HE[F],$=c.k0;if(Q<c.k0)c.a7a();if(c.k0>Q+this.R0+600)break}};
cr.prototype.t5=function(){return this.a5j};cr.prototype.apd=function(x){var Q=this.jI;if(x){var c=x.target.Vk(),F=c[0];
if(F<4)Q[F]=1-Q[F];else if(F<6){if(F==4&&bb.$Z-10>=10)bb.$Z-=10;if(F==5&&bb.$Z+10<=200)bb.$Z+=10;if(this.Ta)this.Ta.tP=!0}else{if(F==6)bb.mx=0;
if(F==7)bb.mx=1;if(this.Ta)this.Ta.tP=!0}var $=window.locStor;if($)$.setItem("lpOpt",JSON.stringify([Q,bb.$Z,bb.mx]))}if(Q[0]==1)this.alw();
var z=[[{n:this.a0n}],[this.mT,this.me],[this.b1,this.Qb]];for(var F=0;F<3;F++)for(var j=0;j<z[F].length;
j++)z[F][j].n.style.display=Q[F]==1?"inline-block":"none";this.oN(this.ww,this.R0)};cr.prototype.a1X=function(){var x=this.n_;
if(x==null)return!1;if(x.h()){var Q=this.qU.h(),c=this.yq[Q].h();if(Q==0)return c.indexOf(!0)!=-1;if(Q==1)return c!=""}return!1};
cr.a2a=function(x){var Q=function($){var z=$!=null&&$.g.length!=0&&$.B[$.g[0]].cG;return{H5:z,w:$!=null&&$.XR($.g[0]),C:{K:u.E.G2,C:{q4:z?"ungroup":"groupEvent",dx:{classID:z?"Ungr":"GrpL",null:ep.QP("Lyr",!0)}}}}},c={name:[6,6,0],P$:!0,w:Q};
if(x)c.KR=[fM.Al,fM.qP,fM.Gh];return c};cr.alx=function(x,Q){if(x)for(var F=0;F<x.g.length;F++){var c=x.B[x.g[F]];
if(c.add.TySh||c.add.SoLd||c.add.SoCo||c.add.GdFl||c.add.PtFl)return{w:!0}}return{w:!1}};cr.prototype.avQ=function(x){E.ce(x);
var Q=x.dataTransfer.getData("Text"),c=1,$=0;if(Q==""){E.NN(x,this,this.fD.indexOf(this.Ta),$+(c>.5?0:1))}else if(Q!="--panel"){var Q=JSON.parse(Q),z=Q.Iz;
if(z=="l")this.MX({d:eM.Eg,source:Q.qM,target:$,aX:c})}};cr.prototype.auF=function(x){var Q=this.Ta,c=x.data,z;
if(Q.g.indexOf(c.a)==-1){var $={d:eM.zp,a:x.target.EL.index,eN:c.kk};this.MX($)}if(Q.g.indexOf(c.a)==-1)return;
this.Vf();if(c.kk==1){z=this.a14}else if(c.kk==2){z=this.a6I}else if(c.kk==3){z=this.azM}else if(c.kk==4){z=this.a00}else if(c.kk==5){z=this.aA7}else{z=this.ue}z._();
z.update(Q);z.parent=this;var j=new jO(u.E.M,!0);j.data={d:u.H.A_,G7:z,x:c.JC.x+1,y:c.JC.y+1};this.T(j)};
cr.prototype._=function(){cC.prototype._.call(this);this.mT._();this.me._();this.b1._();this.Qb._();
if(this.n_){this.n_._();this.yq[0]._()}if(this.Ta)this.BM(this.Ta);var x="lrs/link lrs/fx lrs/mask lrs/adj lrs/folder lrs/newlayer lrs/bin".split(" ");
for(var F=0;F<this.fp.length;F++){var Q=this.fp[F];Q.UG(E.Qk(x[F],null,"miniscale"));if(F==1||F==3){Q.n.style.position="relative";
var c=E.p("img","gsicon");c.setAttribute("src",PIMG["tools/corner"]);c.setAttribute("style","position:absolute; right:0;  bottom:0; width:100%;  height:100%;");
Q.n.appendChild(c)}}};cr.prototype.BM=function(x,Q){if(x&&!x.tP)return;if(x==null)E.ZW(this.UN,"disabled");
else E.WP(this.UN,"disabled");this.Ta=x;this.fD=Q;if(this.$e!=null){E.Os(this.VL);this.$e=null;this.HE=[]}if(x==null)return;
var c=!1;for(var F=0;F<x.fG.length;F++)if(x.fG[F].fd)c=!0;this.$e=new b9(x.root,this,x,{aW:0,pw:!1},{aj3:c,aCn:this.a1X()},this.HE,0,new gh(0,0,x.m,x.e));
if(x.g.length==0||x.B[x.g[0]]==null)E.ZW(this.DI,"disabled");else{E.WP(this.DI,"disabled");if(x.g.length==1&&x.Rr){var $=x.g[0];
for(var F=0;F<this.HE.length;F++){var z=this.HE[F];if(z.EL.index==$&&z.DI.scrollIntoView)z.DI.scrollIntoView({block:"nearest"})}}var j=x.B[x.g[0]];
if(j.Uy()){this.mT.yJ([[15,10,27]].concat(cq.o_),[1].concat(cq.nW));var U=cq.X$.indexOf(j.s3);this.mT.U(U+1)}else{this.mT.yJ(cq.o_,cq.nW);
var U=cq.X$.indexOf(j.s3);this.mT.U(U)}this.me.U(Math.round(100*j.opacity/255));this.b1.U([j.e6(0),j.e6(1),j.e6(2),j.e6(31)]);
var i=x.w5();this.mT.vz(!i);this.Qb.vz(!i);this.me.vz(!i);this.b1.vz(!(i&&!j.e6(31)));this.Qb.U(Math.round(100*(j.add.iOpa!=null?j.add.iOpa/255:1)));
this.fp[2].ayd(ah.get(j.Rz()?[6,23]:[6,21]))}this.adT(null)};cr.prototype.oN=function(x,Q){this.ww=x;
this.R0=Q;var c=this.DI.getBoundingClientRect().height;if(55<c&&c<56)c=60.2;var $=this.Tx.getBoundingClientRect().height,z=Q-(c+$+3);
this.VL.style.height=z+"px";this.VL.style.width=x+"px"};cr.prototype.a7o=function(x){this.MX({d:eM.BT,j7:this.mT.h()})};
cr.prototype.acu=function(x){this.MX({d:eM.ML,j7:Math.round(255*this.me.h()/100)})};cr.prototype.aCj=function(x){this.MX({d:eM.HC,j7:[this.b1.h(),[0,1,2,31]]})};
cr.prototype.auR=function(x){this.MX({d:eM.tZ,j7:Math.round(255*this.Qb.h()/100)})};cr.prototype.gt=function(x){if(x.target==this.qU)this.alw();
var Q=this.n_.h();if(Q)E.WP(this.sK,"disabled");else E.ZW(this.sK,"disabled");this._();this.Ta.tP=!0;
this.BM(this.Ta);this.Ta.tP=!1};cr.prototype.alw=function(){var x=this.sK;if(x==null){var Q=this.a0n,c=this.n_=new f2([0,6]);
c.k(u.E.t,this.gt,this);Q.appendChild(c.n);x=this.sK=E.p("span","disabled");Q.appendChild(x);this.qU=new c7(null,["Kind",[12,48]],[]);
this.qU.k(u.E.t,this.gt,this);var $=this.yq=[new cT(null,["<img src=\""+PIMG.pix_layer+"\" class=\"miniscale gsicon\" />","<img src=\""+PIMG["lrs/adj"]+"\" class=\"miniscale gsicon\" />","<img src=\""+PIMG["tools/htype"]+"\" class=\"miniscale gsicon\" />","<img src=\""+PIMG.shape_layer+"\" class=\"miniscale gsicon\" />","<img src=\""+PIMG.so_layer+"\" class=\"miniscale gsicon\" />"],!0,[[12,76,2],[3,0],[12,44],[12,77],[6,7,1]]),new el(null,null,8)];
$[0].k(u.E.t,this.gt,this);$[1].k("input",this.gt,this)}E.Os(x);x.appendChild(this.qU.n);x.appendChild(this.yq[this.qU.h()].n)};
cr.prototype.ahY=function(x){this.Vf();this.auT(x,this.acx)};cr.prototype.aeB=function(x){this.Vf();
this.auT(x,this.agX)};cr.prototype.auT=function(x,Q){var c=x.currentTarget;if(E.rm(Q.n))return;x.stopPropagation();
var $=c.getBoundingClientRect();Q._();Q.update(this.Ta);Q.parent=this;var z=new jO(u.E.M,!0);z.data={d:u.H.A_,G7:Q,x:$.left,y:$.top,aA3:!0};
this.T(z)};cr.prototype.aeg=function(x){this.MX({d:eM.axR})};cr.prototype.aj$=function(x){this.MX({d:this.Ta.g.length>1?eM.xt:eM.jK})};
cr.prototype.ayS=function(x){this.MX({d:eM.Hx})};cr.prototype.aqZ=function(x){var Q=this.Ta;if(Q.g.length==0)return;
var c=Q.B[Q.g[0]],$=c.kk;this.MX({d:$<=0?c.Et?eM.T7:eM.bU:$==3?eM.aq:eM.zb})};cr.prototype.ab1=function(x){this.MX({d:eM.v6})};
cr.prototype.MX=function(x){var Q=new jO(u.E.v,!0);Q.data=x;Q.f=X.Mf;this.T(Q)};cr.prototype.Oy=function(){var x=[[6,54,0],[11,6],[6,21],[6,1],[6,20],[6,13],[5,4]],Q=[this.ab1,this.aeB,this.aeg,this.ahY,this.aj$,this.ayS,this.aqZ],c=this.aB6.bind(this);
for(var F=0;F<x.length;F++){var $=new j7("W",!1,x[F]);this.fp.push($);E.KH($.n,Q[F].bind(this));this.Tx.appendChild($.n);
if(F>=x.length-3){var z=$.n;z.addEventListener("drop",c,!1);z.addEventListener("dragover",function(j){j.preventDefault()},!1);
z.addEventListener("dragenter",E.ce,!1)}}};cr.prototype.aB6=function(x){E.ce(x);var Q=0,c=this.fp;while(c[Q].n!=x.currentTarget)Q++;
c[Q].xE();var $=x.dataTransfer.getData("Text");if($=="")return;var $=JSON.parse($);if($.Iz=="l"){var z={d:[eM.xt,eM.DN,eM.bU][Q-4]};
if(this.Ta.g.indexOf($.qM)==-1)z.a=$.qM;this.MX(z)}if(Q!=6)return;if($.Iz=="sm"||$.Iz=="s"){var j=new jO(u.E.v,!0);
j.f=X.vR;j.data={d:$.Iz=="sm"?"st_clear":"st_delsingle",a:$.qM,qM:$.Pa};this.T(j)}if($.Iz=="fm"||$.Iz=="f"){this.MX({d:$.Iz=="fm"?eM.Hy:eM.nq,src:$.qM,Pa:$.Pa})}if($.Iz=="m"||$.Iz=="vm"){this.MX({d:$.Iz=="m"?eM.zb:eM.T7,a:$.qM})}};
function b9(x,Q,c,$,z,j,U,i){kw.call(this);this.parent=Q;this.k0=U;this.EL=x;j.push(this);this.w4=c;
this.OI=$;var b=Q.VL,e=x.a,k=c.g.indexOf(x.index)!=-1,T=null;this.DI=E.p("div",k?"head selected":"head");
if(e.add.artb!=null){E.ZW(this.DI,"artb");i=e.Dd()}var K=this.aui=Math.floor(10+e.aiA/E.q_()),g="height: "+K+"px;";
if(k&&z.aj3)g+="background-color:rgba(255,50,50,0.4);";this.DI.setAttribute("style",g);this.pq=i;var R=this.azT=this.a83.bind(this),D=z.aCn&&!this.a8p();
if(!D){if(x.depth!=0){b.appendChild(this.DI);U+=K-.3}if(e.g6()||e.Oz())if(e.lo()){T=this.amp=E.p("div","lpineck");
b.appendChild(T);if(e.g6()){T.addEventListener("contextmenu",R,!1);var a=new cr.QO(ah.get([12,1]),"sm","layerstyle",x.depth,0,null);
U+=21;a.parent=this;T.appendChild(a.n);var _=e.add.lmfx,I=_.masterFXSwitch.v;a.KW(I);for(var F=0;F<aF.order.length;
F++){var f=_[aF.mh[F]].v;if(f.length==0)continue;for(var y=0;y<f.length;y++){var a=new cr.QO(ah.get(aF.names[F]),"s","layerstyle",x.depth,1,[F,y]);
U+=21;a.KW(I&&f[y].v.enab.v);a.parent=this;T.appendChild(a.n)}}}if(e.Oz()){var Z=e.U5(c).F;if(Z)this.S5=E.p("div","thumb");
var a=new cr.QO(ah.get([12,55]),"fm",null,x.depth,0,-1,Z?this.S5:null,K);U+=Z?K:21;a.parent=this;T.appendChild(a.n);
this.a8Y=a.n;this.a8Y.addEventListener("contextmenu",R,!1);var _=e.add.SoLd.filterFX.v,v=_.filterFXList.v,I=_.enab.v;
a.KW(I);for(var F=v.length-1;F>=0;F--){var G=v[F].v,q=fK.hB(G);if(k5.WZ[q])q=k5.WZ[q];var h=G.Nm.v;if(fK.names[q])h=ah.get(fK.names[q]);
if(k5.names[q])h=ah.get(k5.names[q]);var r="afw_"+q,a=new cr.QO(h,"f",r,x.depth,1,F);U+=21;a.KW(I&&G.enab.v);
a.parent=this;T.appendChild(a.n)}}}}var H=e.add.lclr;if(H==null)H=0;H=H==0?$.aW:b9.AT[H];this.akN=H;
if(e.Uy()&&(e.add.lsct==hA.DJ||z.aCn)){var o={aW:H,pw:$.pw||e.e6(31)};for(var F=x.children.length-1;
F>=0;F--){var P=new b9(x.children[F],Q,c,o,z,j,U,i);U=P.a4P}}this.a4P=U}b9.prototype=new kw;b9.AT=[16777215,16711680,16748544,16763904,4513024,22015,11141375,7829367];
b9.prototype.a7a=function(){if(this.ri)return;var x=this.EL,Q=x.a,c=this.w4,$=this.OI,K=!0,o=!1;x.Zh(c,this.pq,!0);
var z=E.p("div","headL"),j=E.p("div","headR");this.DI.appendChild(z);this.DI.appendChild(j);var U=this.DI;
U.setAttribute("draggable","true");U.addEventListener("dragstart",this.O8.bind(this),!1);U.addEventListener("drop",this.H6.bind(this),!1);
U.addEventListener("dragover",this.AS.bind(this),!1);U.addEventListener("dragenter",E.ce,!1);U.addEventListener("dragleave",this.k$.bind(this),!1);
var i=[],b=[null,null,null,null],e=Q.M5(),k=x;while(k.parent){k=k.parent;e=e&&k.a.M5()}if(Q.cG){for(var F=x.index-1;
F>=0;F--){var g=c.B[F];if(!g.cG){K=g.M5();break}}}var R=Q.M5()?e&&K?2:1:0;this.ri=E.p("div");var T=E.p("div",R==0?"sqr":"eye");
this.ri.appendChild(T);T.style.opacity=[.12,.33,1][R];var D=E.p("div","space");this.CS=E.p("div","label");
this.CS.setAttribute("style","max-width:calc(100% - "+(96+x.depth*20)+"px); margin-top:"+(this.aui-19)/2+"px;"+(Q.Qc?"text-decoration:underline;":""));
this.CS.textContent=Q.getName();this.gV=E.p("div","lock");this.ahQ=E.p("div","lrfx");this.FA=E.p("div","arfx");
var a=this.azT,_=this.aBM.bind(this);this.DI.addEventListener("click",_,!1);this.DI.addEventListener("contextmenu",a,!1);
var I=this.akN;if(I!=0){var f=[I>>16,I>>8&255,I&255];for(var F=0;F<3;F++){f[F]="calc("+f[F]+"*0.7 + (var(--absc)) * 255 * 0.3)"}this.ri.setAttribute("style","background-color:rgba("+f.join(",")+",1);")}var y=this.ad$.bind(this);
this.ri.addEventListener("mousedown",y,!1);this.ri.addEventListener("mouseover",y,!1);this.FA.addEventListener("click",this.axE.bind(this),!1);
i[0]=this.ri;i[1]=D;i[10]=this.CS;if(Q.Uy()){var Z=E.p("div","arrow"),v=E.p("div","folder");this.K9(v);
Z.addEventListener("click",this.avU.bind(this),!1);i[2]=Z;i[3]=v;Z.className=Q.add.lsct==hA.DJ?"open":"closed"}else{this.ZG=E.p("div","thumb");
i[5]=this.ZG;b9.JZ(this.ZG,Q.GY);this.K9(this.ZG);if(k5.get(Q.add))E.ZW(Q.GY.canvas,"gsicon")}var G=Q.Rz();
if(G){this.Wj=E.p("div","chain");this.aL=E.p("div","thumb");b9.JZ(this.aL,Q.in,!0);this.Wj.style.opacity=G.uz?1:0;
this.Wj.addEventListener("click",this.aq4.bind(this),!1)}var q=Q.Z6()&&Q.add.vmsk;if(Q.add.vmsk&&!q){this.vH=E.p("div","chain");
this.yZ=E.p("div","thumb");b9.JZ(this.yZ,Q.wD,!0);this.vH.style.opacity=Q.add.vmsk.uz?1:0;this.vH.addEventListener("click",this.afr.bind(this),!1)}if(Q.Oz()&&Q.lo()&&Q.U5(c).F){b9.JZ(this.S5,Q.Zv,!1);
this.K9(this.S5);this.S5.addEventListener("click",_,!1);this.S5.addEventListener("contextmenu",a,!1)}if(x.index==c.g[0]){var h=Q.kk,r;
if(h<=0)r=this.ZG;else if(h==1)r=this.aL;else if(h==3)r=this.S5;if(r)r.className="thumb active";if(Q.Et&&this.yZ)this.yZ.className="thumb active"}D.setAttribute("style","width:"+Math.max(0,x.depth-1)*18+"px");
var H=Q.add.lspf!=null&&Q.add.lspf!=0||$.pw;this.gV.style.opacity=Q.e6(31)?1:.5;i[4]=Q.cG?E.p("div","clipp"):null;
i[6]=G?this.Wj:null;i[7]=G?this.aL:null;i[8]=Q.add.vmsk&&!q?this.vH:null;i[9]=Q.add.vmsk&&!q?this.yZ:null;
var P=Q.to,O=c.g;if(P!=0)for(var F=0;F<O.length;F++)if(c.B[O[F]].to==P){o=!0;break}if(o){b[0]=E.p("div",Q.Rm?"link":"linkX");
b[0].addEventListener("click",this.abY.bind(this),!1)}b[1]=H?this.gV:null;b[2]=Q.g6()?this.ahQ:null;
b[3]=Q.g6()||Q.Oz()?this.FA:null;this.FA.className=Q.lo()?"arfx open  gsicon":"arfx closed  gsicon";
var p=i;for(var F=0;F<p.length;F++)if(p[F])z.appendChild(p[F]);p=b;for(var F=0;F<p.length;F++)if(p[F])j.appendChild(p[F])};
b9.JZ=function(x,Q,c){var $=Q.canvas;E.a7($);if(c)x.setAttribute("draggable","true");x.appendChild($);
$.setAttribute("style",$.getAttribute("style")+"; pointer-events:none")};b9.prototype.K9=function(x){E.KH(x,function(Q){if(this.parent.jI[3]==0)return;
E.Ew(Q);E.AU(document.body,function(){clearTimeout(this.ays)}.bind(this));this.ays=setTimeout(function(){var c=new jO("rclick",!0);
c.data={a:this.EL.index,kk:this.kk(Q),JC:E.GK(Q,document.body)};this.T(c)}.bind(this),600)}.bind(this))};
b9.By=function(x,Q){var c=Q.getBoundingClientRect();return(x.clientY-c.top)/c.height};b9.prototype.O8=function(x){x.stopPropagation();
var Q=x.target==this.aL?"m":x.target==this.yZ?"vm":"l";x.dataTransfer.setData("Text",JSON.stringify({Iz:Q,qM:this.EL.index}))};
b9.prototype.k$=function(x){E.ce(x);this.l4()};b9.prototype.H6=function(x){E.ce(x);this.l4();var Q=x.dataTransfer.getData("Text"),c=this.parent.Ta,$=b9.By(x,this.DI),z=this.EL.index;
if($>.8){var j=!0,U=c.root.FV(z);while(U.parent!=null){var i=U.parent,b=i.children;if(b.indexOf(U)!=0)j=!1;
U=U.parent}if(j){z=0;$=1}}if(Q==""){E.NN(x,this,this.parent.fD.indexOf(c),z+($>.5?0:1))}else if(Q!="--panel"){var Q=JSON.parse(Q),e=Q.Iz;
if(e=="l")this.MX({d:eM.Eg,source:Q.qM,target:z,aX:$});else if(e=="m"||e=="vm")this.MX({d:e=="m"?eM.a7W:eM.Gu,src:Q.qM,qC:z});
else b9.awA(x,Q,this)}};b9.awA=function(x,Q,c,$){var z=Q.Iz,j=c.EL.index,U=Q.qM;if(z=="s"||z=="sm")c.MX({d:eM.E1,src:U,qC:j,Pa:Q.Pa});
if(z=="f"||z=="fm")c.MX({d:eM.aw8,src:U,qC:j,Pa:Q.Pa,m4:$==null?0:$})};b9.prototype.AS=function(x){E.ce(x);
var Q=b9.By(x,this.DI),c=this.EL.a.Uy()&&.5<Q&&Q<.8;this.l4();var $="inset 0 "+(c?0:Q>.5?-3:3)+"px "+(c?"5px black":"0 rgba(0,0,0,0.5)");
this.DI.style.boxShadow=$};b9.prototype.l4=function(x){this.DI.style.boxShadow=""};b9.azq=-1;b9.B8=!1;
b9.au5=function(x){b9.B8=!1;document.body.removeEventListener("mouseup",b9.au5)};b9.prototype.ad$=function(x){if(x.button!=0)return;
if(x.type=="mousedown"){b9.B8=!0;document.body.addEventListener("mouseup",b9.au5,!1)}if(x.type=="mouseover"&&(!b9.B8||b9.azq==this.EL.index))return;
E.ce(x);this.MX({d:eM.Ul,a:this.EL.index});b9.azq=this.EL.index};b9.prototype.avU=function(x){E.ce(x);
this.MX({d:eM.a0A,a:this.EL.index})};b9.prototype.aq4=function(x){this.MX({d:eM.$R,a:this.EL.index})};
b9.prototype.afr=function(x){this.MX({d:eM.YL,a:this.EL.index})};b9.mU=0;b9.prototype.zY=function(x){this.MX({d:eM.ZH,a:this.EL.index,name:x})};
b9.prototype.axE=function(x){this.MX({d:eM.awR,a:this.EL.index})};b9.prototype.abY=function(x){this.MX({d:eM.wN,a:this.EL.index})};
b9.prototype.a83=function(x){if(x.button!=2&&!E.aef(x)&&!(x.ctrlKey&&fM.kB()))return;var Q=this.kk(x);
if(Q!=3&&x.currentTarget==this.a8Y)Q=4;if(x.target==this.ahQ||x.currentTarget==this.amp)Q=5;var c=new jO("rclick",!0);
c.data={a:this.EL.index,kk:Q,JC:E.GK(x,document.body)};this.T(c)};b9.prototype.kk=function(x){var Q=x.target,c=Q;
return c==this.yZ?2:c==this.aL?1:c==this.ZG?0:c==this.S5?3:-1};b9.prototype.aBM=function(x){var Q=x.target,R;
if(Q==this.ri.firstChild||Q==this.FA||Q==this.Wj||Q==this.vH||Q.tagName&&Q.tagName.toLowerCase()=="input")return;
var c=this.kk(x),$=this.parent.Ta,z=this.EL.index,j=$.B[z];if(Q==this.gV){this.MX({d:eM.HC,a:z,j7:[[!1,!1,!1,!1,!1],[0,1,2,3,31]]});
return}var U=b9.mU,i=Date.now()-U<300;b9.mU=Date.now();if(Q==this.CS){if(i){this.DI.setAttribute("draggable","false");
var b=new cC.qb(this.CS,this.zY.bind(this))}else this.MX({d:eM.zp,a:z,eN:c,EE:!0});return}if(x.button==0&&i){if(Q==this.CS)return;
var e=new jO(u.E.v,!0),k=new jO(u.E.M,!0),K=new jO(u.E.G2,!0);if(c==0&&j.add.SoCo){var g=d.I.Du(j.add.SoCo.Clr.v);
k.data={d:u.H.LL,AD:"colorpicker",aW:g.Z<<16|g.r<<8|g.J,_k:function(a){var _=d.I.lV({J:a&255,r:a>>>8&255,Z:a>>16&255});
_={classID:"null",Clr:{t:"Objc",v:_}};var I=new jO(u.E.v,!0);I.f=X.Mf;I.data={d:eM.KE,PG:[z],jJ:!0,b:{bf:1,WB:_}};
this.T(I)}.bind(this),sh:!0}}else if(c==0&&(k5.get(j.add)||j.add.SoCo||j.add.GdFl||j.add.PtFl))k.data={d:u.H.cR,AD:cC.Pn.E7};
else if(c!=0&&c!=-1)k.data={d:u.H.cR,AD:cC.Pn.E7};else if(c==0&&j.add.SoLd)K.data={q4:"placedLayerEditContents",dx:{classID:"placedLayerEditContents"}};
else if(c==0&&j.add.TySh){e.f=X.gr;e.data={d:"editCurr",fU:z}}else k.data={d:u.H.LL,AD:"layerstyle",a:z};
this.T(K.data?K:k.data?k:e);return}if(x.button!=0)return;if(c==1||c==3){var T=c==3?j.U5($).F:j.Rz();
R=T.fd?$.Q.O.join("")=="111"?1:2:0}var D={d:eM.zp,a:z,eN:c,a1_:R,EE:!0};this.MX(D)};b9.prototype.MX=function(x){var Q=new jO(u.E.v,!0);
Q.data=x;Q.f=X.Mf;this.T(Q)};b9.prototype.a8p=function(){var x=this.EL.a,Q=x.add,c=this.parent.qU.h(),$=this.parent.yq[c].h();
if(c==0){if($[0]&&Q.SoLd==null&&Q.TySh==null&&x.nd())return!0;if($[1]&&k5.get(Q)!=null)return!0;if($[2]&&Q.TySh!=null)return!0;
if($[3]&&Q.vstk!=null)return!0;if($[4]&&Q.SoLd!=null)return!0;return!1}if(c==1)return x.getName().toLowerCase().indexOf($.toLowerCase())!=-1};
cr.QO=function(x,Q,c,$,z,j,U,i){kw.call(this);this.afG=Q;this.EI=c;this.index=j;this.n=E.p("div","styleitem");
this.DI=E.p("div","head");this.aux=null;if(Q=="f"){var b=this.aux=E.p("div","headR");b.textContent="\u2699";
this.DI.appendChild(b)}this.ri=E.p("div","eye gsicon");this.CS=E.p("div","label");this.n.appendChild(this.DI);
this.DI.appendChild(this.ri);if(U){this.aL=U;this.DI.appendChild(U);this.DI.setAttribute("style","height: "+i+"px")}this.CS.innerHTML=x;
this.n.setAttribute("style","margin-left: "+(24+$*16+z*22)+"px");this.DI.appendChild(this.CS);this.ri.addEventListener("click",this.afC.bind(this),!1);
var e=this.n;e.setAttribute("draggable","true");e.addEventListener("dragstart",this.O8.bind(this),!1);
if(!0){e.addEventListener("drop",this.H6.bind(this),!1);e.addEventListener("dragover",this.AS.bind(this),!1);
e.addEventListener("dragenter",E.ce,!1);e.addEventListener("dragleave",this.k$.bind(this),!1)}this.n.addEventListener("click",this.km.bind(this),!1)};
cr.QO.prototype=new kw;cr.QO.prototype.O8=function(x){x.stopPropagation();x.dataTransfer.setData("Text",JSON.stringify({Iz:this.afG,qM:this.parent.EL.index,Pa:this.index}))};
cr.QO.prototype.k$=function(x){E.ce(x);this.l4()};cr.QO.prototype.H6=function(x){E.ce(x);this.l4();var Q=x.dataTransfer.getData("Text");
if(Q=="")return;var Q=JSON.parse(Q);b9.awA(x,Q,this.parent,this.index+(b9.By(x,this.DI)>.5?0:1))};cr.QO.prototype.AS=function(x){E.ce(x);
var Q=b9.By(x,this.DI)>.5;this.l4();var c="border-"+(Q?"bottom":"top");this.DI.style[c]="0.2em solid rgba(0,0,0,0.5)"};
cr.QO.prototype.l4=function(x){this.DI.style.border="none"};cr.QO.prototype.KW=function(x){this.ri.style.opacity=x?1:.2};
cr.QO.prototype.km=function(x){var Q=b9.mU,c=Date.now()-Q<300;b9.mU=Date.now();if(x.target==this.ri)return;
var $=this.parent.EL.index;if(c&&this.EI!=null){var $=this.parent.EL.index,z=new jO(u.E.M,!0);if(this.EI.indexOf("afw_")==0){var j=this.EI.slice(4),U=jH[j]||fK.s[j],i=x.target==this.aux;
if(!i&&!U)return;z.data=X.LC.an$(i?"blendOptions":j,{a:$,index:this.index})}else z.data={d:u.H.LL,AD:this.EI,a:$,index:this.index};
this.T(z)}else{if(x.target.className!="thumb")this.parent.MX({d:eM.zp,a:$,eN:0})}};cr.QO.prototype.afC=function(x){var Q={fm:eM.l9,f:eM.z6,sm:eM.sJ,s:eM.IB}[this.afG];
this.parent.MX({d:Q,a:this.parent.EL.index,index:this.index})};function je(){cC.call(this,"Guide Guy",!1,"---panels/guideguy",cC.Pn.as9);
this.D9=null;this.fl=new c7(null,d.fR.$P)}je.prototype=new cC("");je.prototype.pp=function(){this.cn=[];
var x=E.p("div","form padded");this.UN.appendChild(x);x.setAttribute("style","width:200px");this.UN.appendChild(x);
var Q=E.p("canvas"),c=Q.getContext("2d");Q.width=Q.height=160;var $=[32,0,16,160,0,32,160,16,0,112,160,16],z="Margin Left,Margin Top,Margin Right,Margin Bottom,Column Count,Row Count,Column Width,Row Height,Column Gap,Row Gap".split(","),j=[0,0,0,0,0,0,0,0,0,0];
x.appendChild(this.fl.n);for(var F=0;F<10;F++){c.clearRect(0,0,160,160);c.setTransform(1,0,0,1,80,80);
c.rotate((F&3)*Math.PI/2);c.translate(-80,-80);c.fillStyle="rgba(0,0,0,0.3)";if(F<4){for(var U=0;U<12;
U+=4){c.fillStyle=U==0?"#000000":"rgba(0,0,0,0.3)";c.fillRect($[U],$[U+1],$[U+2],$[U+3])}}else if(F<6){var i=8*6;
c.fillRect(0,0,i,160);c.fillRect(8*7,0,i,160);c.fillStyle="#000000";c.fillRect(8*14,0,i,160)}else if(F<8){c.fillRect(0,0,16,160);
c.fillRect(160-16,0,16,160);c.fillRect(32,0,160-64,160);c.fillStyle="#000000";c.fillRect(32,80-8,160-64,8*1)}else{c.fillRect(0,0,8*7,160);
c.fillRect(8*13,0,160,160);c.fillStyle="#000000";c.fillRect(8*7,80-8,8*6,8*1)}var b="<img src=\""+Q.toDataURL()+"\" class=\"autoscale gsicon\" /> ",e=new f0(b,0,200,null,F==4||F==5?0:2,null,null,4,z[F]);
e.parent=this;e.k(u.E.t,this.aeA,this);e.U(j[F]);e._();this.cn.push(e);x.appendChild(e.n)}var k=[[11,14],[11,15,0]];
this.Aw=[];for(var F=0;F<k.length;F++){var K=new j7(k[F],!0,null,!0);this.Aw.push(K);K.k("click",this.Di,this);
x.appendChild(K.n)}for(var F=0;F<6;F++){c.setTransform(1,0,0,1,80,80);c.rotate(Math.floor(F/3)*Math.PI/2);
c.translate(-80,-80);c.clearRect(0,0,160,160);c.fillStyle="rgba(0,0,0,0.3)";c.fillRect(0,0,160,160);
c.clearRect(16,16,128,128);c.fillStyle="#000000";var g=F%3;c.fillRect([0,9,18][g]*8,0,16,160);var b="<img src=\""+Q.toDataURL()+"\" class=\"autoscale gsicon\" /> ",K=new j7(b,!1,null,!1);
this.Aw.push(K);K.k("click",this.Di,this);x.appendChild(K.n)}};je.prototype._=function(){cC.prototype._.call(this);
this.fl._();if(this.cn==null)return;for(var F=0;F<this.Aw.length;F++)this.Aw[F]._()};je.prototype.aeA=function(x){var Q=this.cn,c=Q.indexOf(x.target),$=Math.floor(c/2),z=c&1,j=[];
for(var F=0;F<4;F++)j.push(Q[2*F+z].h());var U=-1;if($==2&&j[2]!=0&&j[3]!=0&&j[4]!=0)U=4;if($==3&&j[3]!=0&&j[2]!=0&&j[4]!=0)U=4;
if($==4&&j[4]!=0&&j[2]!=0&&j[3]!=0)U=3;if(U!=-1)Q[2*U+z].U(0)};je.prototype.Di=function(x){var Q=this.D9,c=this.Aw.indexOf(x.target),$=[[],[]];
if(Q==null)return;var z=Q.u?Q.u.rect:new gh(0,0,Q.m,Q.e),j=z.m,U=z.e;if(c==0){var i=[[],[]],b=this.fl.h();
for(var F=0;F<this.cn.length;F++){var e=this.cn[F].h();e=d.fR.X_(e,Q.cQ,Q.m,b);i[F&1].push(e)}var k=[je.aul(i[0],z.x,z.x+j),je.aul(i[1],z.y,z.y+U)];
$=je.J6(k);X.qV.ia($,Q.wZ())}else if(c==1){}else{c-=2;var K=Math.floor(c/3),k=[[],[]];k[K].push([z.x,z.x+j/2,z.x+j,z.y,z.y+U/2,z.y+U][c]);
$=je.J6(k);X.qV.ia($,Q.wZ())}this.aCD($)};je.J6=function(x){var Q=[],c=[];for(var $=0;$<2;$++)for(var F=0;
F<x[$].length;F++){Q.push([$,x[$][F]]);c.push(-1)}return[Q,c]};je.prototype.aby=function(x){var Q=this.a6M.indexOf(x.target)};
je.prototype.aCD=function(x){var Q=new jO(u.E.v,!0);Q.f=X.kU;Q.data={d:"gids",Gv:x};this.T(Q)};je.aul=function(x,Q,c){var $=[],z=x[2],j=x[3],U=x[4],i=0;
if(z==0)i++;if(j==0)i++;if(U==0)i++;if(i>1&&z==0&&j==0){if(x[0]!=0)$.push(Q+x[0]);if(x[1]!=0)$.push(c-x[1]);
return $}var b=c-Q-x[0]-x[1];if(z==0){if(U==0){z=Math.floor(b/j);U=(b-z*j)/(z-1)}else{z=1;while(j*z+U*(z-1)+j+U<=b)z++}}else if(z!=0&&j!=0){if(z*j>b)z=Math.floor(b/j);
U=(b-z*j)/(z-1)}$.push(Q+x[0],c-x[1]);var j=(b-U*(z-1))/z;for(var F=1;F<z;F++){if(U==0)$.push(Q+x[0]+F*j);
else $.push(Q+x[0]+F*j+(F-1)*U,Q+x[0]+F*j+F*U)}return $};je.prototype.BM=function(x,Q,c){this.D9=x};
je.prototype.Yr=function(){if(E.rm(this.UN)&&this.cn==null)this.pp();this._()};je.prototype.Fy=function(x){this.fl.U(x.Zo.IM)};
function bS(){cC.call(this,[9,2],!1,"---panels/properties",cC.Pn.E7);this.arw=null;this.w4=null;this.n$=null;
this.aiZ=-1;this.EU=null}bS.prototype=new cC("");bS.prototype.oN=function(x,Q){this.ww=x;this.R0=Q;x=x-16;
Q=Q-30;var c=this.EU;if(c){c.style.width=x+"px";c.style.height=Q+"px";for(var F=0;F<3;F++)this.Vz[F].oN(x-12,Q)}};
bS.prototype.pp=function(){this.EU=E.p("div","padded scrollable");this.UN.appendChild(this.EU);var x=E.p("span");
this.EU.appendChild(x);this.YH=[new j7([0,3]),new j7([12,73]),new j7([12,91,0])];for(var F=0;F<this.YH.length;
F++){var Q=this.YH[F];Q.k("click",this.afO,this);x.appendChild(Q.n);if(F==2)Q.n.style.marginRight="0"}this.EU.appendChild(E.p("hr"));
this.xZ=new bS.Bp;this.xZ.parent=this;this.Ke=new bS.U0;this.Ke.parent=this;this.h_=new bS.CO;this.h_.parent=this;
this.Vz=[this.xZ,this.Ke,this.h_];this.EU.appendChild(this.xZ.n);this.Tx=E.p("div","lpfoot");this.UN.appendChild(this.Tx);
this.fp=[];for(var F=0;F<3;F++){var Q=new j7("W");Q.k("click",this.bD,this);this.fp.push(Q);this.Tx.appendChild(Q.n)}this.oN(this.ww,this.R0)};
bS.prototype.bD=function(x){var F=this.fp.indexOf(x.target),Q=new jO(u.E.v,!0);Q.f=X.Mf;if(F==0)Q.data={d:eM.DF};
if(F==1)Q.data={d:eM.Ul};if(F==2)Q.data={d:eM.bU};this.T(Q)};bS.prototype.afO=function(x){var F=this.YH.indexOf(x.currentTarget);
this.h0(F);this.aaa(F==1?this.Ke.lZ:-1)};bS.prototype.h0=function(x){for(var F=0;F<3;F++){this.YH[F].xE();
var Q=this.Vz[F].n;if(Q.parentNode==this.EU&&F!=x)this.EU.removeChild(Q);if(Q.parentNode!=this.EU&&F==x)this.EU.appendChild(Q)}this.YH[x].Lm()};
bS.prototype.aaa=function(x){var Q=this.w4.g[0],c=this.w4.B[Q],$=x+1;if(x==1&&c.Et)return;var z=new jO(u.E.v,!0);
z.f=X.Mf;if(x!=1&&c.Et){z.data={d:eM.zp,a:Q,eN:2};this.T(z)}z.data={d:eM.zp,a:Q,eN:$};this.T(z)};bS.prototype._=function(){cC.prototype._.call(this);
if(this.EU==null)return;this.BM(this.w4);for(var F=0;F<3;F++){this.YH[F]._();this.Vz[F]._()}iM.fK(this.fp,["lrs/clipping","lrs/eye","lrs/bin"],[[6,6,0],[5,5],[6,31]])};
bS.prototype.Yr=function(){if(!E.rm(this.UN))return;if(this.EU==null){this.pp();this.Fy(this.n$,ke.m6);
this.BM(this.arw);this._()}};bS.prototype.BM=function(x){this.arw=x;if(this.EU==null)return;this.xZ.BM(x);
this.Ke.BM(x);this.h_.BM(x);if(x==null||x.g.length==0||x.B[x.g[0]]==null){E.ZW(this.UN,"disabled");this.w4=null;
return}else E.WP(this.UN,"disabled");var Q=x.g[0],c=x.B[Q];this.fp[0].U(c.cG);this.fp[1].U(c.M5());var $=x.zo(),z=$[0],j=$[1];
if(j.length!=0){var U=z[j[0]],i=U.add.vogk,b=!1;if(i)for(var F=0;F<i.length;F++){var e=i[F].v;if(!d.eV.Sc(e))continue;
b=!0;Q=U.xR}}Q+=","+b;if(x!=this.w4||this.aiZ!=Q){this.w4=x;this.aiZ=Q;if(b)this.h0(2);else if(c.kk<1&&!c.Et||k5.get(c.add))this.h0(0);
else this.h0(1)}this.YH[1].vz(this.Ke.lZ!=-1);this.YH[2].vz(b)};bS.prototype.Fy=function(x,Q){this.n$=x;
if(this.xZ)this.xZ.Fy(x,Q);if(this.h_)this.h_.Fy(x,Q)};bS.Bp=function(){kw.call(this);this.n=E.p("div","form");
this.a7m=new jz("Hello");this.pR=new j7([1,12,2],null,null,!0);this.pR.n.style.acB="right";this.pR.k("click",this.xI,this);
this.n.appendChild(this.a7m.n);this.n.appendChild(this.pR.n);this.Qs=null;this.D1=null;this.w4=null;
this.n$=null;this.amM=-1;this.aab=null;this.UK=null;this.zS=new cM(0,!0,!0);this.zS.parent=this;this.zS.k(u.E.t,this.a8c,this);
this.n.appendChild(this.zS.n);this.UC=new hc(!0);this.UC.parent=this;this.UC.k(u.E.t,this.av$,this);
this.Gs=E.p("div","marged hiline");this.Gs.appendChild(this.UC.n);this.Cp=new kI("GrFl",!0);this.Cp.parent=this;
this.Cp.k(u.E.t,this.abG,this);this.OU=E.p("div","marged hiline");var x="Grad Rvrs Type Algn Angl Dthr Scl Ofst".split(" ");
for(var F=0;F<x.length;F++){var Q=this.Cp.no[x[F]].n;this.OU.appendChild(Q)}this.ya=new kI("patternFill",!0);
this.ya.parent=this;this.ya.k(u.E.t,this.ayq,this);this.HF=E.p("div","marged hiline");var x=["Ptrn","Angl","Scl","Algn","phase"];
for(var F=0;F<x.length;F++){var Q=this.ya.no[x[F]].n;this.HF.appendChild(Q)}this.kc={};for(var c in k5.names){if(jH[c]==null)continue;
this.kc[c]=new jH[c];this.kc[c].k(u.E.t,this.adS,this);this.kc[c].parent=this}var $=this.apH=E.p("div","marged hiline");
this.cx=new cM(0,!0);$.appendChild(this.cx.n);this.cx.k(u.E.t,this.Ua,this);this.aut=null;this.Ik=new iT;
this.Ik.parent=this;this.Ik.k(u.E.t,this.Ua,this);$.appendChild(this.Ik.n)};bS.Bp.prototype=new kw;bS.Bp.prototype.a8c=function(x){var Q=this.zS.h(),c=this.UK,$=new gh(Q[0],Q[1],Q[2],Q[3]);
if($.HM(c))return;this.UK=$;var z=new jO(u.E.v,!0);if(c.m==$.m&&c.e==$.e){z.f=X.kU;z.data={d:"trsl",RM:$.x-c.x,Bi:$.y-c.y}}else{z.f=X.va;
z.data={d:"scl",LX:[2,4],b:new bC($.m/c.m,$.e/c.e),gy:0}}this.T(z)};bS.Bp.prototype.oN=function(x,Q){var c=this.kc;
for(var $ in c)c[$].oN(x,Q)};bS.Bp.prototype.xI=function(x){var Q=this.w4,c=Q.B[Q.g[0]],$=k5.get(c.add);
this.D1.U(fK.$H($));this.adS()};bS.Bp.prototype._=function(){for(var x in this.kc)this.kc[x]._();this.Cp._();
this.ya._();this.Ik._();this.cx._();this.pR._();this.zS._()};bS.Bp.prototype.Ua=function(x){var Q=new jO(u.E.v,!0),c=this.cx.h(),$=this.aut;
if(x.target==this.cx&&c[2]==$[2]&&c[3]==$[3]){Q.f=X.kU;Q.data={d:"trsl",RM:c[0]-$[0],Bi:c[1]-$[1]}}else{var z=eM.YF(new gh(c[0],c[1],c[2],c[3])),j=this.Ik.ac0();
j.artboardRect={t:"Objc",v:z};var U=this.w4,i=U.B[U.g[0]],b=i.add.artb.guideIndeces;if(b)j.guideIndeces=JSON.parse(JSON.stringify(b));
Q.f=X.Mf;Q.data={d:eM.MU,xz:j}}this.T(Q)};bS.Bp.prototype.av$=function(x){var Q=this.w4,c=Q.g[0];if(Q.B[c].add.SoCo==null)return;
var $=JSON.parse(JSON.stringify(Q.B[c].add.SoCo));$.Clr.v=this.UC.h();this.ZI({bf:1,WB:$})};bS.Bp.prototype.abG=function(x){var Q=this.w4,c=Q.g[0];
if(Q.B[c].add.GdFl==null)return;this.ZI({bf:2,WB:this.Cp.h()})};bS.Bp.prototype.ayq=function(x){this.ZI({bf:3,WB:this.ya.h()})};
bS.Bp.prototype.ZI=function(x){this.a1S(X.Mf,{d:eM.KE,PG:[this.w4.g[0]],jJ:!0,b:x})};bS.Bp.prototype.adS=function(x){this.a1S(X.FQ,{d:"edit_layer",b:this.D1.h()})};
bS.Bp.prototype.a1S=function(x,Q){var c=new jO(u.E.v,!0);c.f=x;c.data=Q;this.T(c)};bS.Bp.prototype.BM=function(x,Q){var c=ah.get([0,3]),$=!1,z=!1,j=null;
this.w4=x;if(x&&x.B.length>0&&x.g.length!=0&&x.B[x.g[0]]){var U=x.B[x.g[0]],i=k5.get(U.add);if(i!=null&&this.kc[i]!=null){j=this.kc[i].n;
this.D1=this.kc[i];this.kc[i].U(JSON.parse(JSON.stringify(U.add[i])));if(x.g[0]!=this.amM){var b=x.VY(x.g[0]-1);
this.aab=d.q9(b)}this.kc[i].HJ(this.aab);c=ah.get(k5.names[i]);$=!0}if(i==null&&U.add.artb==null){var e=this.UK=d.A.Yc(X.Y.Pe(x));
z=!e._6();var k=x.Wq();e.x-=k.x;e.y-=k.y;this.zS.U([e.x,e.y,e.m,e.e],[x.cQ,x.m,this.n$.Zo.IM])}if(U.add.SoCo){j=this.Gs;
this.UC.U(U.add.SoCo.Clr.v);c=ah.get([6,48,0,0])}if(U.add.GdFl){j=this.OU;this.Cp.update(x,U.add.GdFl);
c=ah.get([6,48,0,1])}if(U.add.PtFl){j=this.HF;this.ya.update(x,U.add.PtFl);c=ah.get([6,48,0,2])}if(U.add.artb){var K=U.add.artb,g=U.Dd();
j=this.apH;this.Ik.aqM(K);var R=this.aut=[g.x,g.y,g.m,g.e];this.cx.U(R,[x.cQ,x.m,this.n$.Zo.IM]);c=ah.get([1,16,0])}this.amM=x.g[0]}if(j!=this.Qs){if(this.Qs)this.n.removeChild(this.Qs);
if(j!=null)this.n.appendChild(j);this.Qs=j}this.a7m.U(c);this.pR.n.style.display=$?"":"none";this.zS.n.style.display=z?"":"none"};
bS.Bp.prototype.Fy=function(x,Q){this.n$=x;this.Cp.Fy(x,Q);this.ya.Fy(x,Q);if(Q==ke.sT)this.BM(this.w4,x);
for(var c in this.kc)this.kc[c].Fy(x,Q)};bS.U0=function(){kw.call(this);this.n=E.p("div","form");this.w4=null;
this.lZ=0;var x=E.p("span","fitem");this.n.appendChild(x);this.YH=[new j7([6,2]),new j7([6,3]),new j7([6,50])];
for(var F=0;F<this.YH.length;F++){var Q=this.YH[F];Q.k("click",this.at4,this);x.appendChild(Q.n)}this.Vn=new bv([12,74],0,255);
this.Vn.k(u.E.t,this.Z9,this);this.n.appendChild(this.Vn.n);this.k1=new bv([7,6],0,500,"px",2,!0);this.k1.k(u.E.t,this.Z9,this);
this.n.appendChild(this.k1.n);this.ZE=new j7([4,11],null,null,!0);this.ZE.k("click",this.acf,this)};
bS.U0.prototype=new kw;bS.U0.prototype.acf=function(){var x=new jO(u.E.v,!0);x.f=X.FQ;x.data={d:"start",wU:"nvrt"};
this.T(x)};bS.U0.prototype.Z9=function(x){var Q=this.Vn.h(),c=this.k1.h(),$=new jO(u.E.v,!0);$.f=X.Mf;
$.data={d:eM.tA,tV:this.w4.g[0],nk:{G$:this.lZ,Vn:Q,k1:c}};this.T($)};bS.U0.prototype._=function(){for(var F=0;
F<this.YH.length;F++)this.YH[F]._();this.Vn._();this.k1._();this.ZE._()};bS.U0.prototype.BM=function(x){this.w4=x;
this.Og()};bS.U0.prototype.at4=function(x){this.Og(this.YH.indexOf(x.currentTarget));this.parent.aaa(this.lZ)};
bS.U0.prototype.Og=function(x){var Q=this.w4,c=this.YH;for(var F=0;F<3;F++){var $=c[F];$.xE();$.hp()}if(Q==null||Q.B.length==0||Q.g.length==0||Q.B[Q.g[0]]==null)return;
var z=-1,j=Q.B[Q.g[0]];if(j.Oz()&&j.U5(Q).F!=null){c[2].bJ();z=2}if(j.add.vmsk){c[1].bJ();z=1}if(j.Rz()){c[0].bJ();
z=0}if(x!=null)z=x;else if(j.Et)z=1;else if(j.kk==3)z=2;else if(j.kk==1)z=0;this.lZ=z;if(z==-1){this.Vn.hp();
this.k1.hp();return}var U=j.qq(z);this.Vn.bJ();this.k1.bJ();this.Vn.U(U.Vn);this.k1.U(U.k1);c[z].Lm();
var i=this.ZE.n;if(z==0)this.n.appendChild(i);else if(i.parentNode==this.n)this.n.removeChild(i)};bS.CO=function(){kw.call(this);
this.n=E.p("div","form");this.D9=null;this.n$=null;this.GH=-1;this.zS=new cM(0,!1);this.t3=new bv([12,15],-180,180,"\xB0",2);
this.Er=new cM(1,!0);this.yK=new bv([12,94,0],0,100,null,2);this.MA=new bv([12,78],3,30);this.dj=new j7(["\u279C  ",[12,76,0]],null,null,!0);
this.zS.k(u.E.t,this.dA,this);this.t3.k(u.E.t,this.dA,this);this.Er.k(u.E.t,this.dA,this);this.yK.k(u.E.t,this.dA,this);
this.MA.k(u.E.t,this.dA,this);this.dj.k("click",this.dA,this)};bS.CO.prototype=new kw;bS.CO.prototype._=function(){this.zS._();
this.t3._();this.Er._();this.yK._();this.MA._()};bS.CO.prototype.dA=function(x){var Q=this.D9,c=d.eV.u_(Q),$=x.target.h(),z=[this.zS,this.t3,this.Er,this.yK,this.MA,this.dj].indexOf(x.target);
if(z==0){var j=Q.Wq(),U=[],i=U[0]=$[0]+j.x,b=U[1]=$[1]+j.y;U[2]=i+$[2];U[3]=b+$[3];$=U}if(z==1)$=$*Math.PI/180;
var e={0:1,1:2,2:3,3:3,4:4}[z];c[e]=$;var k=new jO(u.E.v,!0);k.f=X.Mf;k.data={d:eM.on,b:c,ai$:z==5};
this.T(k)};bS.CO.prototype.BM=function(x){var Q=this.n;this.D9=x;if(x==null)return;var c=this.n$,$=[x.cQ,x.m,c.Zo.IM],z=d.eV.u_(x),j=z[0],U=z[1];
if(U==null)return;var i=j!=this.GH;this.GH=j;if(i)E.Os(Q);if(i)Q.appendChild(this.zS.n);if(i)Q.appendChild(this.t3.n);
var b=x.Wq();this.zS.U([U[0]-b.x,U[1]-b.y,U[2]-U[0],U[3]-U[1]],$);this.t3.U(z[2]*180/Math.PI);if(j==2){if(i)Q.appendChild(this.Er.n);
var e=z[3];this.Er.U(e,$)}if(j==7||j==8){if(i)Q.appendChild(this.yK.n);this.yK.U(z[3])}if(j==8){if(i)Q.appendChild(this.MA.n);
this.MA.U(z[4])}Q.appendChild(this.dj.n)};bS.CO.prototype.Fy=function(x,Q){this.n$=x;this.BM(this.D9)};
function fN(x){cC.call(this,x.name,!0);this.Ta=x;this.B4=null;this.o3=new fh(this.UN);this.o3.parent=this}fN.prototype=new cC;
fN.QL=function(){var x=document.createElement("canvas"),Q=document.createElement("canvas"),c=16,$=d.R(16*16*4);
d.ma($,c,c,8);var z=d.scale.nz($,c,c);return{Ra:x,Dv:Q,yY:x.getContext("2d",{willReadFrequently:!0}),Pq:Q.getContext("2d"),xb:z}}();
fN.prototype.aig=function(){if(this.Ta.tl())return window.confirm(ah.get([22,6,3])+" "+this.Ta.name+". "+ah.get([22,6,4]));
return!0};fN.prototype.Fy=function(x,Q){this.B4=x};fN.prototype.BM=function(x){this.Yr();this._I()};
fN.prototype.oN=function(x,Q){if(x<=0||Q<=0)return;this.ww=x;this.R0=Q;var c=this.Ta,$=fN.QL,z=E.q_();
c.Q.yY.m=Math.floor(x*z);c.Q.yY.e=Math.floor(Q*z);E.qr($.Ra,x,Q);E.qr($.Dv,x,Q);E.qr(eV.nc(),x,Q);if(c.Q.W==0)c.Q.W=X.nF.rK(c.m,c.e,x*z,Q*z);
this._I()};fN.prototype.Yr=function(){var x=this.UN.firstChild,Q=fN.QL,c=eV.Mx&&i9==0;if(!c&&x==eV.nc()||c&&x==Q.Ra)this.UN.removeChild(x);
var $=c?eV.nc():Q.Ra;if(!E.rm($))this.UN.appendChild($)};fN.prototype._I=function(){if(this.B4==null)return;
var x=this.Ta,Q=eV.Mx&&i9==0;if(Q)this.aBN();else this.vZ()};fN.prototype.aBN=function(){if(eV.Mx&&fN.uK==null){var x=fN.uK=[],Q=[0,2,8,32,128];
for(var F=0;F<5;F++)x[F]=[new fN.oC(!1,Q[F],!1),new fN.oC(!0,Q[F],!1)];x.push([new fN.oC(!1,0,!0),new fN.oC(!0,0,!0)])}var c=this.Ta,$=fN.QL,T,_=0,q,h;
if(c.UR==null)return;var z=c.Q,j=z.yY.m,U=z.yY.e,i=eV.Yt;$.yY.clearRect(0,0,j,U);var b=this.avi(c);if(z.Xm==null||z.Xm.m!=j||z.Xm.e!=U)z.Xm=new eV.PT(j,U);
if(b){var e=Date.now(),k=U,K=new Uint8Array($.yY.getImageData(0,0,j,k).data.buffer);z.Xm.set(K,new gh(0,0,j,k));
this.Ix=!0}else if(this.B4.w6){if(this.Ix){eV.qk(z.Xm);eV.sN(1);this.Ix=!1}var g=d.fR.P0,K=new Uint8Array(c.Q.Vq.data.buffer);
z.Xm.set(K,new gh(0,0,g,U));var K=new Uint8Array(c.Q.Wf.data.buffer);z.Xm.set(K,new gh(0,0,j,g));var K=new Uint8Array($.yY.getImageData(0,U-g,j,g).data.buffer);
z.Xm.set(K,new gh(0,U-g,j,g));this.Ix=!0}else if(this.Ix){eV.qk(z.Xm);eV.sN(1);this.Ix=!1}var R=z.wu(0,0);
if(fN.aa$==null)fN.aa$=new Float32Array(4*1024);var D=[0,0,0,0],a=fN.aa$;if(c.add.artd){a.fill(0);D=fN.Bl(c);
var I=c.m,f=c.e,G=0;for(var F=0;F<c.B.length;F++){var y=c.B[F],Z=y.add.artb;if(Z==null||!y.M5())continue;
var v=y.Dd();a[_]=v.x/I;a[_+1]=v.y/f;a[_+2]=v.m/I;a[_+3]=v.e/f;_+=4;if(_==a.length)break}if(_>2*4)G++;
if(_>8*4)G++;if(_>32*4)G++;T=fN.uK[G+1];a=new Float32Array(a.buffer,0,[2,8,32,128][G]*4)}else T=fN.uK[c.d6?5:0];
var r=c.XP();if(r==null)T=T[0];else{T=T[1];h=r[c.add.fcmy==1?6:4];q=r[2]}eV.ac2(j,U);eV.sN(0);eV.ac2(j,U);
T.z3();var H=new bI;H.scale(j,U);H.concat(z.FG(!0));H.scale(1/c.m,1/c.e);var o=[H.V,H.J,0,H.dC,H.xq,0,H.DX,H.ti,1];
T.dX(z.Xm.cm,c.UR.cm,new Float32Array(o),new Float32Array([j/8,U/8,R.x/j,R.y/U]),c.m,c.e,1/c.Q.W,j,U,new Float32Array(D),a,new Float32Array(d.gg.Ny(d.gg.aty(z.O))),h,q);
i.drawArrays(i.TRIANGLES,0,6)};fN.Bl=function(x){return[0,0,0,0]};fN.acm=function(x){var Q=d.I.Du(x.v),c=[Q.Z/255,Q.r/255,Q.J/255,1];
for(var F=0;F<4;F++)c[F]=Math.min(1,c[F]);return c};fN.Ij=function(x,Q){var c=x[2]*255;if(eV.Mx)c=Q?0:Math.max(2,c);
return"rgba("+x[0]*255+","+x[1]*255+","+c+","+x[3]+")"};fN._b=function(x){var Q=x.length;if(eV.Mx)for(var F=0;
F<Q;F+=4){if(x[F+2]==0)x[F+2]=3}};fN.prototype.vZ=function(){var x=this.Ta,Q=fN.QL;if(i9==0&&x.buffer==null)return;
var c=x.Q,$=c.yY,z=$.m,j=$.e,U=new gh(0,0,x.m,x.e);Q.Pq.clearRect(0,0,z,j);Q.yY.clearRect(0,0,z,j);var i=c.FG(!0),b=i.clone();
b.HQ();if(x.add.artd==null){Q.yY.save();var e=b.RE(new bC(0,0));b.translate(-e.x,-e.y);Q.yY.translate(Math.round(e.x),Math.round(e.y));
Q.yY.fillStyle=i9==0?Q.xb:"#ffffff";if(x.d6)Q.yY.fillRect(-5e3,-5e3,2e4,2e4);else{var k=x.add.arts;if(i9==1)for(var F=0;
F<k.length;F++){var K=d.A.pA(k[F].LB);this.vo(d.A.Hg(K),b,Q.yY);Q.yY.fill()}else{this.vo(d.A.Hg(U),b,Q.yY);
Q.yY.fill()}}Q.yY.restore()}else{Q.yY.fillStyle=fN.Ij(fN.Bl(x));Q.yY.fillRect(0,0,z,j);Q.yY.save();Q.yY.setTransform(b.V,b.J,b.dC,b.xq,b.DX,b.ti);
var g=x.root.children;for(var F=0;F<g.length;F++){var R=g[F].a;if(R.add.artb==null||!R.M5())continue;
var T=R.Dd(),D=R.LM();if(D!=0)continue;Q.yY.fillStyle=Q.xb;Q.yY.save();Q.yY.scale(1/c.W,1/c.W);Q.yY.fillRect(c.W*T.x,c.W*T.y,T.m*c.W,T.e*c.W);
Q.yY.restore()}Q.yY.restore()}if(c.Mj.length!=$.P()){c.Mj=d.R($.P());c.Yq=d.R($.P()*4)}c.Yq.fill(0);
if(i9==1){var b=c.FG(!0);b.HQ();Q.yY.save();var a=d.A.Hg(c.yY);d.A.i(a.j,c.FG(!0),a.j);var K=d.A.cl(a.j);
Q.yY.setTransform(b.V,b.J,b.dC,b.xq,b.DX,b.ti);x.root.a8K(x,Q.yY,this.B4,K);Q.yY.restore()}else{d.scale.azx(x.buffer,U,i,c.Yq,$,x.d6);
var _=x.XP();if(_)ICC.U.applyLUT(_[x.add.fcmy==1?5:3],_[2],c.Yq,c.Yq);if(c.O[0]+c.O[1]+c.O[2]!=3)d.gg.acU(c.Yq,c.Yq,d.gg.aty(c.O));
Q.Pq.putImageData(new ImageData(new Uint8ClampedArray(c.Yq.buffer),$.m,$.e),0,0);Q.yY.drawImage(Q.Dv,0,0);
Q.yY.getImageData(0,0,1,1)}this.avi(x)};fN.prototype.avi=function(x){var Q=x.Q,c=Q.O[0]+Q.O[1]+Q.O[2],$=fN.QL,z=!1,j=[];
for(var F=0;F<x.g.length;F++){var U=x.B[x.g[F]];if(U==null)continue;var i=U.kk;if(i!=1&&i!=3)continue;
var b=i==1?U.Rz():U.U5(x).F;if(b.fd)j.push(b)}for(var F=0;F<x.fG.length;F++)if(x.fG[F].fd)j.push(x.fG[F]);
for(var F=0;F<j.length;F++){var b=j[F];this.aky(b,Q,j.length==1&&c==0?2:1,b.color,b.aW);z=!0}var e=this.B4;
z=this.amv(x,$.yY,Q,j.length!=0)||z;if(x.u&&e.Ub&&e.Zo.mR){this.aky(x.u,Q,0,0,null);z=!0}return z};fN.prototype.aky=function(x,Q,c,$,z){var j=0;
if(z)j=Math.round(z.J)<<16|Math.round(z.r)<<8|Math.round(z.Z);var U=Q.FG(!0),i=Q.yY,b=new gh(0,0,Q.Ta.m,Q.Ta.e),e=fN.QL;
if(Q.Yq==null||Q.Yq.length!=i.P()*4){Q.Mj=d.R(i.P());Q.Yq=d.R(i.P()*4)}Q.Mj.fill($);Q.Yq.fill(0);var k=x.channel,K=x.rect;
d.scale.i(k,K,U,Q.Mj,i);if(c==0){var g=new Uint32Array([4278190080,4294967295]);fN._b(new Uint8Array(g.buffer));
d.u.adz(Q.Mj,Q.Yq,i,g,E.q_()>1.9)}else{var R=Date.now();d.u.avr(Q.Mj,Q.Yq,i,c,j);fN._b(Q.Yq)}var T=new ImageData(new Uint8ClampedArray(Q.Yq.buffer),i.m,i.e);
e.Pq.putImageData(T,0,0);e.yY.save();if(c!=0){var D=new gh(0,0,b.m,b.e),a=U.clone();a.HQ();this.vo(d.A.Hg(D),a,e.yY);
e.yY.clip()}e.yY.drawImage(e.Dv,0,0);e.yY.restore()};fN.prototype.amv=function(x,Q,c,$){var z=x.N.Nh!=null||x.N.LV!=null||x.N.hJ!=null||x.N.zZ!=null||x.N.BX.length!=0||x.N.It.length!=0,j=this.B4,U=j.Zo,i=bN.ua[j.b4],b=Math.round(12*E.q_()),e=b/x.Q.W,k=c.FG(!0);
k.HQ();Q.save();Q.setTransform(k.V,k.J,k.dC,k.xq,k.DX,k.ti);var K=fN.Bl(x)[0];K=K<.5?K+.5:K-.5;K=""+Math.round(K*255).toString(16);
while(K.length<2)K="0"+K;Q.font=e+"px sans-serif";if(x.add.artd){Q.fillStyle="#"+K+K+K;for(var F=0;F<x.B.length;
F++){var g=x.B[F];if(g.add.artb==null||!g.M5())continue;var R=g.Dd();Q.save();Q.beginPath();Q.rect(R.x,R.y-2*e,R.m,2*e);
Q.clip();Q.fillText(g.getName(),R.x+2,R.y-e*.7);Q.beginPath();Q.restore();z=!0}}if(x.add.arts&&j.Oj==X.aiR){var T=x.add.arts;
for(var F=0;F<T.length;F++){var R=T[F],D=d.A.pA(R.LB),a=(F+1+"").padStart(2,"0");a+=" - "+R.if;Q.save();
Q.beginPath();Q.fillStyle=R.g?"#cce6ff":"#dddddd";Q.rect(D.x,D.y,Q.measureText(a).width+e,e*1.5);Q.fill();
Q.fillStyle="black";Q.fillText(a,D.x+e/2,D.y+e*1.1);Q.restore()}z=!0}function _(jA){return jA==1||jA==2||jA==4||jA==5}var I=fN.Ij([.3,.5,1,1]),f=fN.Ij([1,1,1,1]);
if(j.Ub&&U.iL){Q.fillStyle=Q.strokeStyle=I;Q.lineWidth=1.5/c.W;var y=x.zo(),Z=y[0],v=y[1];for(var G=0;
G<v.length;G++){var g=Z[v[G]],q=g.add.vmsk,h=q.$,r=d.A.CJ(h);this.vo(r,null,Q);Q.stroke();z=!0;var H=3*E.q_()/c.W;
for(var F=0;F<q.Sr.length;F++){var o=d.o.ar1(h,q.Sr[F]);if(o==null)continue;var P=o.x,O=o.y;Q.beginPath();
var p=F==0;if(q.$S)p=!p;if(p){Q.moveTo(P-H,O-H);Q.lineTo(P+H,O+H);Q.moveTo(P-H,O+H);Q.lineTo(P+H,O-H);
Q.stroke()}else{Q.arc(P,O,H*1,0,2*Math.PI);Q.fill()}z=!0}if(x.g.length!=1)continue;var C=-1,W=-1,J=-1;
for(var F=0;F<h.length;F++){if(h[F].type>5)continue;if(h[F].type==0||h[F].type==3){W=F+1;J=h[F].length;
if(h[F].Kp!=-1)C++;continue}if(q.g.indexOf(C)!=-1){var P=h[F].L.x,O=h[F].L.y;Q.fillRect(P-H*.8,O-H*.8,2*H*.8,2*H*.8)}if(q.xf.indexOf(F)!=-1){var t=h[F],Y=[t.L];
Q.beginPath();Q.moveTo(t.Hw.x,t.Hw.y);Q.lineTo(t.L.x,t.L.y);Q.lineTo(t.Im.x,t.Im.y);var l=W+(F+J-W-1)%J,m=W+(F+J-W+1)%J,B=h[l],L=h[m];
if(B&&_(B.type)&&q.xf.indexOf(l)==-1){Q.moveTo(B.L.x,B.L.y);Q.lineTo(B.Im.x,B.Im.y);Y.push(B.Im)}if(L&&_(L.type)&&q.xf.indexOf(m)==-1){Q.moveTo(L.L.x,L.L.y);
Q.lineTo(L.Hw.x,L.Hw.y);Y.push(L.Hw)}Q.stroke();if(!t.L.HM(t.Hw))Y.push(t.Hw);if(!t.L.HM(t.Im))Y.push(t.Im);
for(var A=0;A<Y.length;A++){var o=Y[A],P=o.x,O=o.y;if(A==0&&(t.type==2||t.type==5))Q.fillRect(P-1.2*H,O-1.2*H,2.4*H,2.4*H);
else{Q.beginPath();Q.arc(P,O,H*1.2,0,2*Math.PI);Q.fill();if(A!=0)Q.fillStyle=f;Q.beginPath();Q.arc(P,O,H*.8,0,2*Math.PI);
Q.fill();Q.fillStyle=I}}}z=!0}}}Q.lineWidth=1/c.W;if(x.N.sw){Q.fillStyle=Q.strokeStyle=I;var L={j:[],G:[]},S=fN.akx;
if(S==null){S=fN.akx={j:[1,0],G:["M"]};for(var F=1;F<30;F++){var M=Math.PI*2*F/30;S.j.push(Math.cos(M),Math.sin(M));
S.G.push("L")}S.G.push("Z","M","L","M","L");S.j.push(-.5,0,.5,0,0,-.5,0,.5)}for(var F=0;F<x.N.sw.length;
F++){var B=X.cj.aBP(x.N.sw[F],c),N=new bI(B[0],0,0,B[0],B[1],B[2]);d.A.concat(L,S,N)}this.vo(L,null,Q);
Q.stroke();z=!0}var s=new bI(1,0,0,1,.5/c.W,.5/c.W);if(x.d6){Q.fillStyle=Q.strokeStyle=I;var L={j:[0,0,x.m,0,x.m,x.e,0,x.e],G:["M","L","L","L","Z"]};
this.vo(L,s,Q);Q.stroke();z=!0}if(x.N.wV){Q.fillStyle=Q.strokeStyle=fN.Ij([0,0,0,.5]);this.vo(x.N.wV,null,Q,!0);
Q.fill("evenodd")}Q.strokeStyle=I;Q.fillStyle=f;if(x.N.hJ){this.vo(x.N.hJ,s,Q);Q.stroke()}var V=fN.r6(x.N.ai,Q,c);
Q.fill();Q.stroke();z=z||V;Q.fillStyle=Q.strokeStyle=fN.Ij([0,0,0,eV.Mx&&i9==0?1:.5],!0);if(x.N.Nh){this.vo(x.N.Nh,null,Q);
Q.fill()}if(x.N.LV){this.vo(x.N.LV,s,Q);Q.stroke()}for(var g8 in x.N.oa)if(x.N.oa[g8].LV){this.vo(x.N.oa[g8].LV,null,Q);
Q.stroke();z=!0}var V=fN.r6(x.N.SE,Q,c);Q.stroke();z=z||V;if(x.N._V.length+x.N.Je.length+x.N.AB.length!=0){z=!0;
Q.fillStyle=f;fN.q5(x.N._V,Q,c,6);Q.fill();fN.q5(x.N.Je,Q,c,6);Q.fill();Q.fillStyle=I;fN.q5(x.N._V,Q,c,4);
Q.fill();fN.q5(x.N.AB,Q,c,4);Q.fill();Q.fillStyle=fN.Ij([.7,.7,.7,1]);fN.q5(x.N.Je,Q,c,4);Q.fill()}if(x.N.BX.length!=0){for(var F=0;
F<x.N.BX.length;F++){var n=x.N.BX[F],cQ=n[1],hk;if($){hk=Q.getImageData(cQ.x,cQ.y,cQ.m,cQ.e);d.l.UY("norm",n[0],cQ,new Uint8Array(hk.data.buffer),cQ,cQ,1)}else hk=new ImageData(new Uint8ClampedArray(n[0].buffer),cQ.m,cQ.e);
Q.putImageData(hk,cQ.x,cQ.y)}}var eG=.5/c.W;Q.lineWidth=1/c.W;if(x.N.j0){z=!0;var ie=x.N.j0,eN=ie.T0,r={G:[],j:[]};
for(var F=0;F<ie.BZ.length;F++)d.A.concat(r,d.A.Hg(ie.BZ[F]));r.j=r.j.concat(eN);for(var F=0;F<eN.length;
F+=4){r.G.push("M","L")}for(var F=0;F<r.j.length;F++){r.j[F]+=eG}Q.strokeStyle=fN.Ij([.9,.2,.2,1]);this.vo(r,null,Q);
Q.stroke();var gr=E.q_(),ek=2/c.W;Q.font=e*.9+"px sans-serif";for(var F=0;F<eN.length;F+=4){var P=eN[F],O=eN[F+1],jK=eN[F+2],iE=eN[F+3],e9=Math.sqrt((iE-O)*(iE-O)+(jK-P)*(jK-P));
e9=d.fR.Z0(e9,x.cQ,j,O==iE?x.m:x.e);var dm=new bC((P+jK)/2,(O+iE)/2);Q.fillStyle=fN.Ij([.9,.2,.2,1]);
var kD=Q.measureText(e9).width;Q.fillRect(dm.x-kD/2-ek*gr,dm.y-3.5*ek*gr,kD+2*ek*gr,7*ek*gr);Q.fillStyle=fN.Ij([1,1,1,1]);
Q.save();Q.translate(dm.x-kD/2,dm.y+2*ek*gr);Q.scale(.1,.1);Q.font=e*9+"px sans-serif";Q.fillText(e9,0,0);
Q.restore()}}if(j.Ub){if(U.l$&&x.Q.W>10&&i9==0){this.ma(x,Q,1,1,.25,U.ut,16777215);z=!0}if(U.bI){var gJ=d.fR.X_(U.ZD,x.cQ,x.m,U.PK),dR=gJ;
if(U.PK==4)dR*=x.e/x.m;this.ma(x,Q,gJ,dR,1,U.ut,U.WO);z=!0}if(U.Bo){var fO=x.wZ(),ko=x.lG(),d8=Math.max(x.Q.yY.m,x.Q.yY.e)/x.Q.W;
d8=Math.max(Math.max(x.m,x.e)*2,d8);for(var F=0;F<fO[0].length;F++){var fj=fO[0][F],ja=fO[1][F];if(ja!=-1&&ja!=ko)continue;
var eD=c.wu(fj[1],fj[1]),d3=c.$X(Math.floor(eD.x)+.5,Math.floor(eD.y)+.5),fP=d.RD(U.$y);fP=[fP.Z/255,fP.r/255,fP.J/255,1];
if(ja!=-1)fP=[0,.5,1,1];Q.beginPath();Q.strokeStyle=fN.Ij(fP);if(fj[0]==0){var jE=d3.x;Q.moveTo(jE,-d8);
Q.lineTo(jE,d8)}else{var cR=d3.x;Q.moveTo(-d8,cR);Q.lineTo(d8,cR)}Q.stroke();z=!0}}var ex=x.Vv;if(ex.length>0&&j.Oj==X.a2J){var cQ=7/x.Q.W,er=cQ/3,cE=cQ*4;
Q.strokeStyle=Q.fillStyle="black";for(var F=0;F<ex.length;F++){var a7=ex[F];Q.fillRect(a7.x-.5*er,a7.y-.5*cE,er,cE);
Q.fillRect(a7.x-.5*cE,a7.y-.5*er,cE,er);Q.lineWidth=2.5/x.Q.W;Q.beginPath();Q.arc(a7.x,a7.y,cQ,0,2*Math.PI);
Q.stroke();Q.font=1.9*cQ+"px serif";Q.lineWidth=1.25/x.Q.W;Q.strokeText(""+(F+1),a7.x+.75*cQ,a7.y+2.5*cQ)}z=!0}var dl=x.p9;
if(U.p9&&dl.length!=0){Q.font=e*.8+"px sans-serif";var hl=[],f4=[];for(var F=0;F<dl.length;F++){var em=X.x5.YA(dl,F);
hl.push(em);if(x.wE.indexOf(F)!=-1)f4.push(em)}hl.reverse();var e$=Date.now();hl=d.rect.atp([0,0,x.m,x.e],hl);
for(var A=0;A<2;A++)for(var F=0;F<hl.length;F++){var iP=hl[F],C=iP[4],J=C!=null?dl[C]:null;if(J&&A==0||J==null&&A==1)continue;
var P=Math.round(iP[0]),O=Math.round(iP[1]),jK=Math.round(iP[2]),iE=Math.round(iP[3]);Q.strokeStyle=Q.fillStyle=fN.Ij(J?[0,.7,.7,1]:[.8,.8,.8,1]);
Q.strokeRect(P+eG,O+eG,jK-P,iE-O);var b2=F+1,k7=Q.measureText(b2),kD=k7.width;Q.fillRect(P,O,kD+e/2,e);
Q.fillStyle=fN.Ij([1,1,1,1]);Q.fillText(b2,P+e/4,O+e*.8)}var ek=2/x.Q.W,at=2*ek;for(var F=0;F<f4.length;
F++){var iP=f4[F],P=Math.round(iP[0]),O=Math.round(iP[1]),jK=Math.round(iP[2]),iE=Math.round(iP[3]);
Q.strokeStyle=Q.fillStyle=fN.Ij([1,.6,0,1]);Q.strokeRect(P+eG,O+eG,jK-P,iE-O);var ju=[P,O,jK,O,jK,iE,P,iE];
for(var jL=0;jL<ju.length;jL+=2){var jE=ju[jL],cR=ju[jL+1],fJ=ju[jL+2&7],h6=ju[jL+3&7];Q.fillRect(jE-ek,cR-ek,at,at);
Q.fillRect(Math.round((jE+fJ)/2)-ek,Math.round((cR+h6)/2)-ek,at,at)}}z=!0}var iq=x.add.Anno;if(iq&&iq.length!=0)for(var F=0;
F<iq.length;F++){var iI=iq[F],fP=iI[2],jE=iI[0]-eG,cR=iI[1]-eG,at=30/c.fi,dM=.4*at,ik=.6*at;Q.beginPath();
Q.moveTo(jE,cR+ik);Q.lineTo(jE,cR);Q.lineTo(jE+at,cR);Q.lineTo(jE+at,cR+at);Q.lineTo(jE+dM,cR+at);Q.closePath();
Q.lineTo(jE+dM,cR+ik);Q.lineTo(jE+dM,cR+at);if(F==x.Q.sI){Q.lineWidth*=5;Q.strokeStyle=fN.Ij([0,0,0,.5]);
Q.stroke();Q.lineWidth/=5}Q.fillStyle=fN.Ij([fP.Z/255,fP.r/255,fP.J/255,1]);Q.fill();Q.strokeStyle=fN.Ij([0,0,0,1]);
Q.stroke()}}Q.strokeStyle=fN.Ij([1,0,0,1]);if(x.N.zZ){this.vo(x.N.zZ,s,Q);Q.stroke()}Q.restore();if(j.w6){if(x.Q.Wf==null||x.Q.Wf.width!=x.Q.yY.m||x.Q.Vq.height!=x.Q.yY.e){x.Q.Wf=Q.createImageData(x.Q.yY.m,d.fR.P0);
x.Q.Vq=Q.createImageData(d.fR.P0,x.Q.yY.e)}var i=bN.ua[j.b4],jp=0,eA=0,k8=x.m,ay=x.e;if(x.lG()!=-1){var R=x.B[x.lG()].Dd();
jp=R.x;eA=R.y;k8=R.m;ay=R.e}jp*=c.W;eA*=c.W;var c=x.Q,bK=[1,x.cQ,x.cQ/2.54,x.cQ/25.4,k8/100][U.IM],a4=c.W*x.m/2,h_=c.W*x.e/2,bj=[c.W*bK,new bC(c.z.x+(jp+a4*bK-a4),c.z.y+(eA+h_*bK-h_))];
if(U.IM==4)bK*=ay/k8;var gs=[c.W*bK,new bC(c.z.x+(jp+a4*bK-a4),c.z.y+(eA+h_*bK-h_))],bs=this.o3.IQ;d.fR.aqN(c,i["--text-color"],i["--bg-input"],Math.floor(bs.x),Math.floor(bs.y),bj,gs);
var e3=cJ.abh(c.W,fN.Ij([1,1,1,1]),x.m,x.e);fN._b(x.Q.Vq.data);fN._b(x.Q.Wf.data);Q.putImageData(x.Q.Vq,0,0);
Q.putImageData(x.Q.Wf,0,0);Q.putImageData(e3,0,x.Q.yY.e-e3.height)}if(x.N.It.length!=0){for(var F=0;
F<x.N.It.length;F++){var n=x.N.It[F],cQ=n[1];Q.putImageData(new ImageData(new Uint8ClampedArray(n[0].buffer),cQ.m,cQ.e),cQ.x,cQ.y)}}return z};
fN.prototype.ma=function(x,Q,c,$,z,j,U){while(c*x.Q.W<4){c*=2;$*=2}var i=x.m,b=x.e,e=.5/x.Q.W;U=d.RD(U);
Q.strokeStyle=fN.Ij([U.Z/255,U.r/255,U.J/255,z],!1);Q.save();Q.rect(0,0,i,b);Q.clip();Q.beginPath();
for(var k=0;k<=i;k+=c){Q.moveTo(k+e,0);Q.lineTo(k+e,b)}if(j==0){for(var K=0;K<=b;K+=$){Q.moveTo(0,K+e);
Q.lineTo(i,K+e)}}else{$*=Math.sqrt(4/3);var g=$*Math.floor(i/$),R=i*($/(2*c));for(var K=-g;K<=b+g;K+=$){Q.moveTo(0,K);
Q.lineTo(i,K-R);Q.moveTo(0,K);Q.lineTo(i,K+R)}}Q.stroke();Q.restore()};fN.q5=function(x,Q,c,$){Q.beginPath();
var z=$*E.q_()/c.W,j=!1;for(var F=0;F<x.length;F+=2){j=!0;var U=x[F],i=x[F+1];Q.moveTo(U+z,i);Q.arc(U,i,z,0,2*Math.PI)}return j};
fN.r6=function(x,Q,c,$){Q.beginPath();var z=($?$:1)*(4*E.q_()+.5)/c.W,j=!1;for(var F=0;F<x.length;F+=2){j=!0;
var U=x[F],i=x[F+1];Q.rect(U-z,i-z,2*z,2*z)}return j};fN.op=function(x,Q,c,$){c.beginPath();if($)c.rect(-1e5,-1e5,1e6,1e6);
var z=x;if(Q){z=d.A.clone(x);d.A.i(z.j,Q,z.j)}Typr.U.pathToContext({cmds:z.G,crds:z.j},c)};fN.prototype.vo=fN.op;
fN.oC=function(x,Q,c){eV.yF.call(this);var $=this.aDj=Q!=0,z=c?"true":"in01(sCoord)",j="\t\t\tprecision mediump float;\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform sampler2D target;\t\t\t"+(x?"uniform sampler2D lut;  uniform float N;  "+eV.ST.agj:"")+"\t\t\tuniform vec3 contSizeZoom;\t\t\tuniform vec2 cnvSize;\t\t\tuniform mat4 ctrn; \t\t\t"+($?"uniform vec4 bgClr;  uniform vec4 ars["+Q+"]; ":"")+"\t\t\t\t\t\tvarying vec2 tCoord;\t\t\tvarying vec2 sCoord;\t\t\tvarying vec2 gCoord;\t\t\t\t\t\t/* This approximates the error function, needed for the gaussian integral */ \t\t\tvec4 erf(vec4 x) { \t\t\t  vec4 s = sign(x), a = abs(x);\t\t\t  x = 1.0 + (0.278393 + (0.230389 + 0.078108 * (a * a)) * a) * a;\t\t\t  x *= x;  \t\t\t  return s - s / (x * x); \t\t\t} \t\t\t/* Return the mask for the shadow of a box from lower to upper */  \t\t\tfloat boxShadow(vec2 lower, vec2 upper, vec2 point, float sigma) { \t\t\t  vec4 query = vec4(point - lower, point-upper); \t\t\t  vec4 integral = 0.5 + 0.5 * erf(query * (sqrt(0.5) / sigma)); \t\t\t  return (integral.z - integral.x) * (integral.w - integral.y); \t\t\t} \t\t\t\t\t\tvec4 simpleBlend(vec4 src, vec4 tgt) {\t\t\t\tfloat na = src.w + tgt.w*(1.0-src.w);\t\t\t\t/* avoid division by zero */ \t\t\t\treturn na==0.0 ? vec4(0,0,0,0) : vec4( (src.xyz*src.w + tgt.w*tgt.xyz*(1.0-src.w))*(1.0/na), na);\t\t\t} \t\t\t\t\t\t"+eV.ST.a6F+"\t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 src = texture2D(source, tCoord); \t\t\t\tvec4 tgt = texture2D(target, sCoord"+(c?"-floor(sCoord)":"")+"); \t\t\t\t"+(x?"tgt.rgb = mapLut(tgt, lut, N).rgb; ":"")+"\t\t\t\ttgt = ctrn * tgt; "+($?"\t\t\t\t\tbool inr = false; vec4 BG = bgClr; \t\t\t\t\tfor(int i=0; i<"+Q+"; i++) { \t\t\t\t\t\tvec4 ar = ars[i]; \t\t\t\t\t\tvec2 nsc = sCoord - ar.xy; \t\t\t\t\t\tif( ar.z!=0.0 && in01(nsc/ar.zw) ){\t\t\t\t\t\tinr=true; BG=mod(floor(gCoord.x) + floor(gCoord.y), 2.0)==1.0 ? vec4(0.784,0.784,0.784,1) : vec4(1,1,1,1); }\t\t\t\t\t}\t\t\t\t":"\t\t\t\t\tfloat shdw = 0.3*boxShadow(vec2(0,0),contSizeZoom.xy, sCoord*contSizeZoom.xy+vec2(0.0,-6.0*contSizeZoom.z) , 10.0*contSizeZoom.z);\t\t\t\t\tvec4 grid = mod(floor(gCoord.x) + floor(gCoord.y), 2.0)==1.0 ? vec4(0.784,0.784,0.784,1) : vec4(1,1,1,1);\t\t\t\t\tvec4 BG = "+z+" ? grid : vec4(0.0,0.0,0.0,shdw); \t\t\t\t")+"\t\t\t\tvec4 outc = "+z+" ?  simpleBlend(tgt,BG) :  BG ;  \t\t\t\tif(src.b == 0.0 && src.a >0.5) gl_FragColor = mix(outc, vec4(vec3(1,1,1)-outc.rgb,1.0), src.w); \t\t\t\telse             gl_FragColor = simpleBlend(src,outc); \t\t\t\t\t\t\t}",U="\t\t\tattribute vec2 verPos;\t\t\tvarying vec2 tCoord;\t\t\tvarying vec2 sCoord;\t\t\tvarying vec2 gCoord;\t\t\t\t\t\tuniform mat3 tmat;\t\t\tuniform vec4 gsize;\t\t\tvoid main(void) {\t\t\t\ttCoord = verPos;\t\t\t\tsCoord = (tmat*vec3(verPos,1.0)).xy;\t\t\t\tgCoord = (verPos-gsize.zw) * gsize.xy ; \t\t\t\tgl_Position = vec4(vec2(-1.0, 1.0) + 2.0*vec2(verPos.x,-verPos.y), 0.0, 1.0);\t\t\t}";
this.bN(j,U)};fN.oC.prototype=new eV.yF;fN.oC.prototype.dX=function(x,Q,c,$,z,j,U,i,b,e,k,K,g,R){this.Oa("tmat gsize source target lut N contSizeZoom cnvSize bgClr ars ctrn".split(" "));
var T=eV.Yt,D=this.q3;T.uniformMatrix3fv(D.tmat,!1,c);T.uniform4fv(D.gsize,$);T.uniform3f(D.contSizeZoom,z,j,U);
T.uniform2f(D.cnvSize,i,b);T.uniformMatrix4fv(D.ctrn,!1,K);if(this.aDj){T.uniform4fv(D.ars,k);T.uniform4fv(D.bgClr,e)}T.uniform1i(D.source,0);
T.uniform1i(D.target,1);T.activeTexture(T.TEXTURE0);T.bindTexture(T.TEXTURE_2D,x);T.activeTexture(T.TEXTURE1);
T.bindTexture(T.TEXTURE_2D,Q);if(g){T.uniform1f(D.N,R);T.uniform1i(D.lut,2);T.activeTexture(T.TEXTURE2);
T.bindTexture(T.TEXTURE_2D,g.cm);var a=T.LINEAR;T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,a);
T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,a)}T.activeTexture(T.TEXTURE0)};function kM(){cC.call(this,[9,7],!1,"---panels/layercomps",cC.Pn.arO);
this.UN.setAttribute("style","min-width:240px;");this.w4=null;this.Kr=-1;this.HE=[];this.VL=E.p("div","scrollable");
this.VL.style.height="160px";this.UN.appendChild(this.VL);this.Tx=E.p("div","lpfoot");this.UN.appendChild(this.Tx);
this.Aw=[];var x=["<svg  class=\"miniscale gsicon\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\" fill=\"black\"><path d=\"M14,6 L10,6 L10,0 L4,0 L4,6 L0,6 L7,13 L14,6 L14,6 Z M0,14 L0,16 L14,16 L14,14 Z\" /></svg>","reload","lrs/newlayer","lrs/bin"],Q=["Layer Comps to Files",[5,10],[5,3],[5,4]];
for(var F=0;F<x.length;F++){var c=x[F];if(F>0)c="<img src=\""+PIMG[x[F]]+"\" class=\"miniscale gsicon\" />";
var $=new j7(c,!1,Q[F]);$.k("click",this.aj1,this);this.Tx.appendChild($.n);this.Aw.push($)}}kM.prototype=new cC("");
kM.prototype.oN=function(x,Q){this.UN.setAttribute("style","width:"+(x-2)+"px;");this.VL.style.height=Q-28+"px"};
kM.prototype.MX=function(x){var Q=new jO(u.E.v,!0);Q.data=x;Q.f=X.yd;this.T(Q)};kM.ar$="var opts = new ExportOptionsSaveForWeb(); opts.format = SaveDocumentType.PNG; opts.PNG8 = false; opts.quality = 100; var doc = app.activeDocument;var lc = doc.layerComps;  if(lc.length==0) alert(\"No layer comps.\"); else { \tvar stat = doc.historyStates.length - 1;\t\tfor(var i=0; i<lc.length; i++) {\t\tlc[i].apply();\t\tpngFile = new File(lc[i].name+\".png\");\t\tapp.activeDocument.exportDocument(pngFile, ExportType.SAVEFORWEB, opts);\t}\t\tdoc.activeHistoryState = doc.historyStates[stat];}";
kM.prototype.aj1=function(x){var F=this.Aw.indexOf(x.currentTarget)-1;if(F==-1){var Q=new jO(u.E.M,!0);
Q.data={d:u.H.kv,rq:kM.ar$};this.T(Q);return}if(F!=1)if(this.Kr==-1)return;this.MX({d:["updLC","addLC","delLC"][F],xR:this.Kr});
if(F==2)this.Kr=-1};kM.prototype._=function(){cC.prototype._.call(this);for(var F=0;F<this.Aw.length;
F++)this.Aw[F]._()};kM.prototype.BM=function(x){if(x==null)E.ZW(this.UN,"disabled");else E.WP(this.UN,"disabled");
this.w4=x;E.Os(this.VL);if(x==null)return;var Q=x.A2.lastAppliedComp?x.A2.lastAppliedComp.v:0,c=x.A2.list.v.slice(0);
c.unshift({v:{Nm:{v:"Last Document State"},compID:{v:0},capturedInfo:{v:0}}});for(var F=0;F<c.length;
F++){var $=c[F].v,z=new gF($.Nm.v,$.compID.v,$.capturedInfo.v,Q,this.Kr);z.k("activate",this.fb,this);
z.parent=this;this.VL.appendChild(z.n);this.HE.push(z)}};kM.prototype.fb=function(x){this.Kr=x.currentTarget.xR;
this.BM(this.w4)};function gF(x,F,Q,c,$){kw.call(this);this.xR=F;this.n=E.p("div","head listitem"+(F==$?" selected":""));
var z=F==c,j=new j7(z?"\u2713":"\u2014");if(z)j.Lm();this.n.appendChild(j.n);j.k("click",this.nG,this);
var U=this.A4=E.p("span");U.textContent=x;this.n.appendChild(U);this.Aw=[];if(F!=0){this.n.addEventListener("mouseup",this.fb.bind(this),!1);
this.aBV=E.p("span","headR");this.n.appendChild(this.aBV);var i=["lrs/eye","pos","lrs/fx"],b=["Visibility","Position","Appearance"];
for(var e=0;e<i.length;e++){var k=new j7("<img src=\""+PIMG[i[e]]+"\" class=\"autoscale gsicon\" />",!1,b[e]);
if((Q>>e&1)==0)k.n.setAttribute("style","opacity:0.3");k.k("click",this.a7p,this);this.aBV.appendChild(k.n);
this.Aw.push(k)}}}gF.prototype=new kw;gF.prototype.fb=function(x){if(x.target!=this.A4&&x.target!=this.n)return;
if(x.detail==1)this.T(new jO("activate",!1));else{var Q=new cC.qb(this.A4,this.zY.bind(this))}};gF.prototype.a7p=function(x){var F=this.Aw.indexOf(x.currentTarget);
this.MX({d:"editLC",avc:F,xR:this.xR})};gF.prototype.zY=function(x){this.MX({d:"editLC",BW:x,xR:this.xR})};
gF.prototype.nG=function(x){this.MX({d:"setLC",xR:this.xR})};gF.prototype.MX=function(x){var Q=new jO(u.E.v,!0);
Q.data=x;Q.f=X.yd;this.T(Q)};function kl(){cC.call(this,[9,11],!1,"---panels/navigator",cC.Pn.amw);var x=this.UN;
E.ZW(x,"padded");x.setAttribute("style","cursor:grab;");this.GP=E.p("canvas");x.appendChild(this.GP);
E._X(x);E.J1(this.GP);E.KH(this.GP,this.Z_.bind(this));this.Ox=new bf(null,2,6400,"%",null,!0);this.Ox.k(u.E.t,this.akt,this);
x.appendChild(this.Ox.n);this.aAu=this.mw.bind(this);this.afF=this.P9.bind(this);this.D9=null;this.W3=null;
this.FZ=!1}kl.prototype=new cC("");kl.prototype.oN=function(x,Q){this.ww=x*1.2;this.R0=Q*1.2;this._I()};
kl.prototype.akt=function(x){var Q=this.Ox.h(),c=this.D9,$=Q/100;if(.8<$&&$<1.2)$=1;else if(1.8<$)$=Math.round($);
var z=new jO(u.E.v,!0);z.f=X.QT;z.data={d:"zoom",W:$};this.T(z)};kl.prototype.Z_=function(x){var Q=this.D9;
if(Q==null)return;this.FZ=!0;E.d3(window,this.aAu);E.AU(window,this.afF)};kl.prototype.mw=function(x){var Q=E.GK(x,this.GP),c=this.D9,$=this.GP.width,z=this.GP.height,j=(Q.x*E.q_()-$/2)/$,U=(Q.y*E.q_()-z/2)/z,i=E.q_()*c.Q.W,b=Math.round(-c.Q.W*c.m*j),e=Math.round(-c.Q.W*c.e*U);
X.Wo.$u(c,b,e)};kl.prototype.P9=function(x){E.hY(window,this.aAu);E.Wr(window,this.afF);this.FZ=!1};
kl.prototype.BM=function(x){if(x==null&&this.D9!=null)this.GP.width=100;this.D9=x;this._I()};kl.prototype.a3v=function(){var x=this.D9,Q=E.q_(),c=X.nF.rK(x.m,x.e,Q*(this.ww-10),Q*(this.R0-36)),$=d.$_(x.VY(),new gh(0,0,x.m,x.e),c);
this.W3=[$.AX,$.rect]};kl.prototype._I=function(){var x=this.D9;if(x==null||x.Q.W==0)return;var Q=x.Q;
if(!E.rm(this.UN))return;this.Ox.U(Q.W*100);if(!this.FZ)this.a3v();var c=this.W3[0],$=this.W3[1],z=$.m,j=$.e,U=this.GP;
U.width=z;U.height=j;E.qJ(U,z,j);var i=this.UN;i.style.width=this.GP.style.width+12+"px";var b=U.getContext("2d"),e=b.createImageData(z,j);
d.SO(c,e.data);b.putImageData(e,0,0);b.getImageData(0,0,1,1);var k=Q.yY,K=Q.$X(k.x,k.y),g=Q.$X(k.x+k.m,k.y+k.e),R=z/x.m;
b.scale(R,R);b.lineWidth=4/R;b.strokeStyle="#ff0000";b.strokeRect(K.x,K.y,g.x-K.x,g.y-K.y)};kl.prototype.Fy=function(x,Q){};
kl.prototype.Yr=function(){this._I()};function aD(x,Q){cC.call(this,x.name,!1,x.icon,Q);this.aCJ=x}aD.prototype=new cC("");
aD.prototype.pp=function(){var x=this.UN,Q=this.aCJ;if(!E.rm(x)||this.zg)return;var c=this.zg=E.p("iframe");
c.setAttribute("src",Q.url);this.UN.appendChild(c)};aD.prototype.Yr=aD.prototype.BM=function(){this.pp()};
aD.prototype.Za=function(x){if(E.rm(this.zg))this.zg.contentWindow.postMessage(x,"*")};aD.prototype.oN=function(x,Q){if(this.zg==null)return;
this.zg.setAttribute("style","width:"+x+"px; height:"+Q+"px")};function aC(){cC.call(this,[9,12],!1,"---panels/tpreset",cC.Pn.Uf);
this.n$=null;this.Ck=new ct(X.gN);this.Ck.parent=this;var x=E.p("div","padded");x.setAttribute("style","width:20em");
this.UN.appendChild(x);x.appendChild(this.Ck.tg)}aC.prototype=new cC("");aC.prototype.Yr=function(){this.Ck.RN(this.n$.R_)};
aC.prototype.Fy=function(x,Q){this.n$=x;if(Q==ke.m6||Q==ke.Uf)this.Ck.RN(x.R_)};aC.prototype.oN=function(x,Q){this.Ck.aq7(this.n$.Oj)};
aC.prototype._=function(){cC.prototype._.call(this);this.Ck._()};var a5=function(){var x=[],Q=null,c=null,$=null,z=[[100,180,255],[100,255,100],[255,200,100],[200,100,255],[255,100,200],[255,100,100]];
function j(){cC.call(this,"Memory",!1,null,cC.Pn.aBn);var g=E.p("div","padded");this.UN.appendChild(g);
c=new j7(["<< VAR0",[0,13,2]],!1,null,!0);c.addEventListener("click",function(R){x.pop();i()});g.appendChild(c.n);
Q=E.p("div","scrollable");Q.setAttribute("style","width:20em;  height:26em; margin-top:8px;");g.appendChild(Q)}j.prototype=new cC("");
j.prototype.BM=function(g,R,T){$=R;this.Yr()};j.prototype.Yr=function(){c.vz(!1);if(!E.rm(Q))return;
var g={if:"Total:",r3:[]};for(var F=0;F<$.length;F++)g.r3.push(e($[F]));K(g);x=[g];i()};j.prototype._=function(){cC.prototype._.call(this);
c._()};function U(g){var R=g.currentTarget,F=0;while((R=R.previousSibling)!=null)F++;x.push(x[x.length-1].r3[F-1]);
i()}function i(){c.vz(x.length>1);var g=x[x.length-1];E.Os(Q);b(g,Q,0);g.r3.sort(function(R,T){return T.L_[0]-R.L_[0]});
for(var F=0;F<g.r3.length;F++)b(g.r3[F],Q,1)}function b(g,R,T){var D=cI.dc,a=T!=0&&g.r3,_="margin-left:"+T*10+"px; margin-bottom:8px; padding:3px 5px;";
if(a)_+="cursor:pointer;";if(g.Iz!=null)_+="background-color:rgba("+z[g.Iz].join(",")+",0.2);";var I=E.p("div");
R.appendChild(I);I.setAttribute("style",_);I.innerHTML=E.iF(g.if)+"<br />"+"RAM: <b>"+D(g.L_[0])+"</b>\u2001GPU: <b>"+D(g.L_[1])+"</b>";
if(a)I.addEventListener("click",U,!1)}function e(g){var R={if:g.name,r3:[],Iz:0},T=eV.Mx?1:0,D=1-T,a={if:"History",r3:[],Iz:5};
R.r3.push(a);for(var F=1;F<g.history.length;F++){var _=g.history[F];a.r3.push({if:ah.get(_.name),Iz:5,L_:[_.Ce(),0]})}K(a);
var a={if:"Final Image",L_:[g.m*g.e*4,T*g.m*g.e*4],Iz:2};R.r3.push(a);for(var F=0;F<g.B.length;F++){var I=k(g.B[F]);
if(I.r3.length!=0)R.r3.push(I)}var f=g.add.lnk2;if(f)for(var F=0;F<f.length;F++){var I=f[F],y={if:I.uo,r3:[],Iz:4},Z=0;
y.r3.push({if:"Raw file",L_:[I.raw.length,0]});if(I.iw)for(var v=0;v<I.iw.length;v+=2)Z+=I.iw[v].length;
if(Z!=0)y.r3.push({if:"Decoded pixels",L_:[Z,0]});K(y);R.r3.push(y)}K(R);return R}function k(g){var R={if:g.getName(),r3:[],Iz:1},T=eV.Mx?1:0,D=1-T,a=g.rect.P();
if(a!=0)R.r3.push({if:"Layer pixels",L_:[a*4,T*a*4]});if(g.add.lmfx&&g.ft.Xe.type){var _=g.ft.Xe.type,Z=0;
for(var I in _){var f=0;for(var y=0;y<_[I].length;y++)if(I=="ebbl"){if(_[I][y].$p)f+=_[I][y].$p.oj.P();
if(_[I][y].yx)f+=_[I][y].yx.oj.P();if(_[I][y].lx)f+=_[I][y].lx.oj.P();if(_[I][y].gX)f+=_[I][y].gX.oj.P()}else f+=_[I][y].oj.P();
if(f!=0)R.r3.push({if:ah.get(aF.names[aF.order.indexOf(I)]),L_:[D*f*4,T*f*4],Iz:3})}if(g.ft.Pd)Z+=a;
if(g.ft.rP)Z+=a;if(g.ft.CV)Z+=a;if(g.ft.CV)Z+=a;if(g.ft.ET)Z+=a;if(g.ft.i3)Z+=a;var v=g.ft.My?g.ft.My.length:0;
if(Z+v!=0)R.r3.push({if:"Additional Blending Data",L_:[D*Z*4+v,T*Z*4]})}var G=g.Rz(),q=G?G.rect.P():0;
if(q!=0){R.r3.push({if:"Raster Mask",L_:[q,0]})}var G=g.add.vmsk,q=G&&G.OE?G.OE.rect.P():0;if(q!=0){R.r3.push({if:"Vector Mask",L_:[q,0]})}K(R);
return R}function K(g){g.L_=[0,0];for(var F=0;F<g.r3.length;F++){g.L_[0]+=g.r3[F].L_[0];g.L_[1]+=g.r3[F].L_[1]}}return j}();
function iu(){cC.call(this,[9,14],!1,"---panels/notes",cC.Pn.aoZ);this.UN.setAttribute("style","min-width:240px;");
var x=E.p("div","padded");this.UN.appendChild(x);this.qx=new el("Author");x.appendChild(this.qx.n);this.Qq=E.p("textarea");
E.e5(this.Qq);x.appendChild(this.Qq);var Q=new j7("<<",null,null,!0);x.appendChild(Q.n);this.arh=Q;var c=new j7(">>",null,null,!0);
x.appendChild(c.n);Q.k("click",this.lc,this);c.k("click",this.lc,this);var $=this.a8i=new jz("");x.appendChild($.n)}iu.prototype=new cC("");
iu.prototype.lc=function(x){var Q=x.target==this.arh?-1:1,c=this.D9,$=c.add.Anno;if($==null)return;var z=$.length,j=c.Q.sI;
c.Q.sI=(j+Q+z)%z;c.Fq=!0;this._I()};iu.prototype._I=function(){var x=this.D9;if(x==null)return;var Q=x.add.Anno;
if(Q==null||Q.length==0)return;var c=x.Q.sI,$=Q[c];this.Qq.value=$[4];this.a8i.U(c+1+" / "+Q.length);
this.qx.U($[3])};iu.prototype.oN=function(x,Q){if(this.ww==x)return;this.ww=x;Q=Math.min(Q,200);this.Qq.setAttribute("style","display:block;tab-size:4;  margin:0; font-family:monospace; width:"+(x-10)+"px; height:"+(Q-66)+"px")};
iu.prototype.BM=function(x,Q,c){this.D9=x;this._I()};function b6(){kw.call(this);this.f=0;this.Ga=null;
this.n=E.p("div","toolconf");this.Ck=null;this.Ft=null;this.body=new E.p("div","body")}b6.prototype=new kw;
b6.prototype.an7=function(x,Q){this.f=x;this.Ga=Q;if(X.hH[x]){var c=this.Ck=new ct(x);this.n.appendChild(c.n);
c.parent=this}else{this.Ft=E.p("div");this.n.appendChild(this.Ft)}this.n.appendChild(this.body);this._()};
b6.prototype.a54=function(x,Q){};b6.prototype.aqs=function(x){};b6.prototype.Fy=function(x,Q){if(Q==ke.m6||Q==ke.Uf)if(this.Ck)this.Ck.RN(x.R_)};
b6.prototype.M$=function(x){};b6.prototype._=function(){if(this.Ck)this.Ck._();else this.Ft.innerHTML=E.Qk(this.Ga,null,"toolicon");
this.Ef()};b6.prototype.Ef=function(){};function d0(){b6.call(this);this.Ik=new iT;this.Ik.k(u.E.t,this.Ua,this);
this.body.appendChild(this.Ik.n)}d0.prototype=new b6;d0.prototype.Ef=function(){this.Ik._()};d0.prototype.Ua=function(x){var Q=new jO(u.E.M,!0);
Q.data={d:u.H.Te,f:this.f,hF:this.Ik.ac0()};this.T(Q)};d0.prototype.M$=function(x){this.Ik.aqM(x.Zz)};
function jG(x){b6.call(this);if(x==null)return;this.n$=null;this.cn={};if(x.indexOf("brush")!=-1&&x.indexOf("prsr")==-1)x.push("prsr");
for(var F=0;F<x.length;F++){var Q=x[F],c=null;if(Q=="brush"){c=new aJ}if(Q=="bmode"){c=new c7([12,19,0],cq.o_,cq.nW)}if(Q=="bmode0"){c=new c7([12,19,0],cq.o_.slice(23))}if(Q=="emode"){c=new c7([12,36],[[9,3],[10,38]])}if(Q=="opacity"){c=new f0([12,0],0,100,"%");
c.U(100)}if(Q=="flow"){c=new f0([12,63],0,100,"%");c.U(100)}if(Q=="smth"){c=new f0([19,3,0],0,100,"%");
c.U(0)}if(Q=="samp"){c=new c7([12,36],[[12,25,4],[12,25,5],[12,46]])}if(Q=="wconf"){c=new kk;c.U([40,!0,!0])}if(Q=="sall"){c=new f2([12,25,2])}if(Q=="smode"){c=new c7([12,36],[[19,7,0],[19,7,1]]);
c.U(1)}if(Q=="pdetail"){c=new f2([12,65]);c.Lm()}if(Q=="rng"){c=new c7([12,12],[[19,6,0],[19,6,1],[19,6,2]]);
c.U(1)}if(Q=="expo"){c=new f0([12,5],0,100,"%");c.U(50)}if(Q=="algnd"){c=new f2([12,75]);c.U(!1)}if(Q=="sfrom"){c=new c7([12,70],[[17,1],[17,3],[17,0]])}if(Q=="alt"){c=new cT(null,["Alt"],!0,["Select Source"])}if(Q=="qsmode"){c=new c_([12,36],["<img src=\""+PIMG["set/front"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.zoomIn+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.zoomOut+"\" class=\"autoscale gsicon\" />"],[[5,3],[18,1],[18,2]])}if(Q=="redge"){c=new j7([7,11],!1,null,!0)}if(Q=="sesu"){c=new j7("Select Subject",!1,null,!0)}if(Q=="setop"){c=new fC}if(Q=="patch"){c=new c_(null,[[12,70],[12,71]])}if(Q=="strn"){c=new f0([12,64],1,100,"%");
c.U(50)}if(Q=="prsr"){c=this.cn.brush.y9}this.body.appendChild(c.n);if(Q=="prsr")continue;c.parent=this;
this.cn[Q]=c;if(Q=="brush")c.k(u.E.t,this.afk,this);else if(Q=="redge"||Q=="sesu")c.k("click",jZ.azI,this);
else c.k(u.E.t,this.Vy,this)}}jG.prototype=new b6;jG.prototype.a54=function(x,Q){x=x[1];var c=this.cn;
if(x.Md)c.bmode.U(cq.hg.indexOf(x.Md.v.BlnM));if(x.Opct)c.opacity.U(x.Opct.v);if(x.flow)c.flow.U(x.flow.v);
if(x.Brsh)c.brush.U(x,Q.bX.Dq,Q.bX.Rk);if(x.FrgC){var $=d.I.Du(x.FrgC.v),z=new jO(u.E.M,!0);z.data={d:u.H.hW,hF:ke.$s,Zq:0,b:$.Z<<16|$.r<<8|$.J};
this.T(z)}this.afk();this.Vy()};jG.prototype.aqs=function(){if(X.hH[this.f]==null)return null;var x=this.cn,Q;
for(var c in X.GR)if(X.GR[c]==this.f)Q=c;var $=JSON.parse(JSON.stringify(x.brush.h()));$.classID=Q;if(x.bmode)$.Md={t:"enum",v:{BlnM:cq.hg[x.bmode.h()]}};
if(x.opacity)$.Opct={t:"long",v:x.opacity.h()};if(x.flow)$.flow={t:"long",v:x.flow.h()};var z=this.n$.Gj;
z={Z:z>>>16,r:z>>>8&255,J:z&255};$.FrgC={t:"Objc",v:d.I.lV(z)};return["Brush Preset "+$.Brsh.v.Dmtr.v.val,$]};
jG.prototype.Ef=function(){for(var x in this.cn)this.cn[x]._()};jG.prototype.M$=function(x){if(x.ahX=="showBrushOpts"){this.cn.brush.are(x.JC.x,x.JC.y)}for(var Q in x.WC){var c=x.WC[Q];
if(Q!="qsmode")c*=100;if(this.cn[Q])this.cn[Q].U(c)}};jG.prototype.Fy=function(x,Q){b6.prototype.Fy.call(this,x,Q);
this.n$=x;var c=this.cn.brush;if(c==null)return;if(Q==ke.m6||Q==ke.gN)c.RN(x.bX);if(Q==ke.TV){c.U(x.bX.eT,x.bX.Dq,x.bX.Rk)}};
jG.prototype.afk=function(){var x=new jO(u.E.M,!0);x.data={d:u.H.hW,hF:ke.TV,I6:this.cn.brush.h()};this.T(x)};
jG.prototype.Vy=function(){var x=new jO(u.E.M,!0);x.data={d:u.H.Te,f:this.f};for(var Q in this.cn){if(Q=="brush"||Q=="redge")continue;
var c=this.cn[Q].h();if(["opacity","flow","smth","expo","strn"].indexOf(Q)!=-1)x.data[Q]=c/100;else if(Q=="bmode")x.data.bmode=cq.X$[c];
else if(Q=="bmode0")x.data.bmode=cq.X$[23+c];else x.data[Q]=c}this.T(x)};function jZ(x,Q){b6.call(this);
if(x)return;this.cn={};for(var F=0;F<Q.length;F++){var c=Q[F],$=null;if(c=="sesu"&&!E.Tw())continue;
if(c=="binop")$=new fC;if(c=="feat"){$=new f0([7,6],0,100,"px");$.U(0)}if(c=="redge")$=new j7([7,11],!1,null,!0);
if(c=="sesu")$=new j7("Select Subject",!1,null,!0);if(c=="wconf")$=new kk;if(c=="cstr")$=new fZ;if(c=="anta"){$=new f2([12,25,1]);
$.U(!0)}if(c=="sall")$=new f2([12,25,2]);if(c=="redge"||c=="sesu")$.k("click",jZ.azI,this);else $.k(u.E.t,this.Vy,this);
$.parent=this;this.body.appendChild($.n);this.cn[c]=$}}jZ.prototype=new b6;jZ.prototype.M$=function(x){if(x.Ym!=null)this.cn.binop.U(x.Ym);
else if(x.h8){for(var Q in x.h8)if(this.cn[Q])this.cn[Q].U(x.h8[Q])}else{var c=jZ.LQ;if(c==null){var $=hV.akR(!0);
c=jZ.LQ=new ev($.items,$.yz)}c._();c.parent=this;c.update(x.rx,x.B4);var z=new jO(u.E.M,!0);z.data={d:u.H.A_,G7:c,x:x.xK.TN+2,y:x.xK.yv+1};
this.T(z)}};jZ.prototype.Ef=function(){for(var x in this.cn)this.cn[x]._()};jZ.azI=function(x){var Q=x.target==this.cn.sesu,c=new jO(Q?u.E.v:u.E.M,!0);
if(Q){c.f=X.kJ;c.data={d:"bgrm",b:2}}else c.data={d:u.H.LL,AD:"redge"};this.T(c)};jZ.prototype.Vy=function(){var x=new jO(u.E.M,!0);
x.data={d:u.H.Te,f:this.f,h8:{}};for(var Q in this.cn)x.data.h8[Q]=this.cn[Q].h();this.T(x)};function go(){jG.call(this,["brush","strn"])}go.prototype=new jG;
function j3(){jG.call(this,"brush bmode opacity flow smth prsr".split(" "))}j3.prototype=new jG;function hH(){jG.call(this,["brush","bmode0","samp","wconf"])}hH.prototype=new jG;
function ej(){jG.call(this,["brush"])}ej.prototype=new jG;function hw(){jG.call(this,["brush","bmode","opacity","smth","prsr"])}hw.prototype=new jG;
function jW(){jG.call(this,["brush","rng","expo"])}jW.prototype=new jG;function e6(){jG.call(this,"brush bmode opacity algnd sfrom alt".split(" "))}e6.prototype=new jG;
function g7(x){b6.call(this);if(x==null)return;this.YH=[];this.xm=new j7("\u2026",!1,null,!0);if(!x)this.body.appendChild(this.xm.n);
this.xm.k("click",this.S$,this);this.CU=new kw;this.CU.parent=this;var Q=this.CU.n=E.p("div","floatcont form"),c=[[17,0],[17,1],[11,12,0],[17,2]];
for(var F=0;F<c.length;F++){var $=new j7(c[F],!1,null,!0);this.YH.push($);$.k("click",this.ahK,this);
if(!x||F==1)Q.appendChild($.n)}this.Bz=new fZ;this.Bz.k(u.E.t,this.nN,this);if(!x)this.body.appendChild(this.Bz.n);
this.MY=new j7([15,7,6],!1,null,!0);this.MY.k("click",this.ahK,this);if(!x)this.body.appendChild(this.MY.n);
this.ms=new f2([15,7,10]);this.ms.k(u.E.t,this.nN,this);if(!x)this.body.appendChild(this.ms.n);this.tI=new f2("Content-Aware");
this.tI.k(u.E.t,this.nN,this);if(!x)this.body.appendChild(this.tI.n);this.vF=new iG;this.vF.k("click",this.Px,this)}g7.prototype=new b6;
g7.prototype.S$=function(x){if(E.rm(this.CU.n))return;var Q=this.xm.n.getBoundingClientRect(),c=new jO(u.E.M,!0);
c.data={d:u.H.A_,G7:this.CU,x:Q.left,y:Q.top+Q.height+4};this.T(c)};g7.prototype.Ef=function(){this.vF._();
for(var F=0;F<this.YH.length;F++)this.YH[F]._();this.Bz._();this.ms._();this.MY._()};g7.prototype.M$=function(x){if(x.RH){this.Bz.a5M(x.RH[0],x.RH[1]);
return}var Q=this.vF.n;if(x._R)this.body.appendChild(Q);else if(this.body.contains(Q))this.body.removeChild(Q);
if(x.Bz)this.Bz.U(x.Bz)};g7.prototype.Px=function(x){var Q={d:u.H.Te,f:this.f,Iu:this.vF.h()?"commit":"cancel"},c=new jO(u.E.M,!0);
c.data=Q;this.T(c)};g7.prototype.ahK=function(x){x.target.n.blur();var Q={d:u.H.Te,f:this.f,Iu:"cropby",a3A:this.YH.indexOf(x.target)};
if(x.target==this.MY)Q.Iu="straighten";var c=new jO(u.E.M,!0);c.data={d:u.H.s$,G7:this.CU};this.T(c);
c.data=Q;this.T(c)};g7.prototype.nN=function(x){var Q={d:u.H.Te,f:this.f,Iu:"config",Xq:{jb:this.Bz.h(),v$:this.ms.h(),iv:this.tI.h()},a3e:x.target==this.Bz},c=new jO(u.E.M,!0);
c.data=Q;this.T(c)};function e2(){g7.call(this,!1)}e2.prototype=new g7;function hZ(){g7.call(this,!0)}hZ.prototype=new g7;
function fp(){jG.call(this,["brush","rng","expo"])}fp.prototype=new jG;function dS(){jG.call(this,"brush emode opacity flow smth prsr".split(" "))}dS.prototype=new jG;
function gW(){jG.call(this,["brush","samp","wconf"])}gW.prototype=new jG;function ku(){jZ.call(this,!1,["binop","feat","anta","redge","cstr"])}ku.prototype=new jZ(!0);
function hJ(){b6.call(this);var x=this.cn=[new c7([12,20,0],["1x1","3x3","5x5","11x11","31x31"]),new c7([12,70],[[17,1],[17,3],[17,0]]),new f2([12,20,1]),new f2([8,0])];
x[1].U(2);x[2].U(!0);for(var F=0;F<x.length;F++){var Q=x[F];Q.k(u.E.t,this.Vy,this);this.body.appendChild(Q.n)}}hJ.prototype=new b6;
hJ.prototype.Vy=function(x){var Q=this.cn,c=[];for(var F=0;F<Q.length;F++)c[F]=Q[F].h();var $=new jO(u.E.M,!0);
$.data={d:u.H.Te,f:this.f,h8:c};this.T($)};hJ.prototype.Ef=function(){for(var F=0;F<this.cn.length;F++)this.cn[F]._()};
function gA(){b6.call(this);this.gO=new eF(!1);this.gO.parent=this;this.gO.k(u.E.t,this.Z9,this);this.body.appendChild(this.gO.n);
this.gO.U(JSON.parse(aF.Q5.aAE).v);this.ag=new c7(null,aF.I.names.slice(0,5));this.ag.k(u.E.t,this.Z9,this);
this.body.appendChild(this.ag.n);this.BE=new c7([12,19,0],cq.o_,cq.nW);this.BE.k(u.E.t,this.Z9,this);
this.body.appendChild(this.BE.n);this.oR=new f0([12,0],0,100,"%");this.oR.parent=this;this.oR.k(u.E.t,this.Z9,this);
this.body.appendChild(this.oR.n);this.oR.U(100);this.Pz=new f2([12,23,0]);this.Pz.k(u.E.t,this.Z9,this);
this.body.appendChild(this.Pz.n);this.bB=new f2([12,23,3]);this.bB.k(u.E.t,this.Z9,this);this.body.appendChild(this.bB.n)}gA.prototype=new b6;
gA.prototype.Ef=function(){this.ag._();this.BE._();this.oR._();this.Pz._();this.bB._()};gA.prototype.Fy=function(x,Q){b6.prototype.Fy.call(this,x,Q);
var c=Q==ke.$s;this.gO.uq(x.Gj,x.QI);if(c||Q==ke.L7||Q==ke.m6)this.gO.RN(x.Op)};gA.prototype.Z9=function(){var x=new jO(u.E.M,!0);
x.data={d:u.H.Te,f:this.f};x.data.hF={I:this.gO.h(),Ry:aF.I.types[this.ag.h()],$S:this.Pz.V$(),Nb:this.bB.V$(),acS:cq.X$[this.BE.h()],j_:this.oR.h()/100};
this.T(x)};function b1(){b6.call(this);this.jp=new f2([8,7,1]);this.body.appendChild(this.jp.n);this.jp.k(u.E.t,this.Vy,this)}b1.prototype=new b6;
b1.prototype.Vy=function(){var x={d:u.H.Te,f:this.f,Tm:this.jp.h()},Q=new jO(u.E.M,!0);Q.data=x;this.T(Q)};
function fd(){b6.call(this);var x=E.p("span","fitem");this.body.appendChild(x);this.YK=[new f0([12,15],-180,180,"\xB0"),new j7([1,12,2],null,null,!0)];
for(var F=0;F<this.YK.length;F++){var Q=this.YK[F];Q.parent=this;x.appendChild(Q.n);Q.k(F==1?"click":u.E.t,this.IE,this)}}fd.prototype=new b6;
fd.prototype.Ef=function(){for(var F=0;F<this.YK.length;F++)this.YK[F]._()};fd.prototype.M$=function(x){this.YK[0].U(x.fN*180/Math.PI)};
fd.prototype.IE=function(x){var Q=this.YK.indexOf(x.target),c=new jO(u.E.M,!0);c.data={d:u.H.Te,f:this.f,fN:Q==1?0:x.target.h()*Math.PI/180};
this.T(c)};function a2(){jG.call(this,["brush","algnd","sfrom","alt"])}a2.prototype=new jG;function jd(){b6.call(this);
this.fJ=new ed;this.fJ.parent=this;this.body.appendChild(this.fJ.Gm.n);this.body.appendChild(this.fJ.$I.n);
this.body.appendChild(this.fJ.zN.n);this.body.appendChild(this.fJ.U$.n);var x=E.p("span","fitem");this.body.appendChild(x);
x.appendChild(this.fJ.j2.n);x.appendChild(this.fJ.NV.n);x.appendChild(this.fJ.Az.n);this.sZ=new c7("Aa",[[22,5,0],[12,95,0],[12,95,1],[12,95,2],[12,95,3]]);
this.sZ.k(u.E.t,this.Px,this);this.body.appendChild(this.sZ.n);this.k2=new c7(null,["\u2B85","\u253F","\u2B87"],null,["VAR0: VAR1",[12,75],[22,4,1]]);
this.k2.k(u.E.t,this.Px,this);this.body.appendChild(this.k2.n);this.pW=new j7([11,9],!1,null,!0);this.pW.k("click",this.avP,this);
this.body.appendChild(this.pW.n);this.vF=new iG;this.vF.k("click",this.Px,this)}jd.prototype=new b6;
jd.prototype.Ef=function(){this.vF._();this.fJ._();this.pW._()};jd.prototype.avP=function(x){var Q={d:u.H.Te,f:this.f,Iu:"showwarp"},c=new jO(u.E.M,!0);
c.data=Q;this.T(c)};jd.prototype.M$=function(x){if(x.Iu=="showactive")this.body.appendChild(this.vF.n);
if(x.Iu=="hideactive")this.body.removeChild(this.vF.n);if(x.Iu=="changeOther"){this.sZ.U(x.bL);this.k2.U([0,2,1][x.pK])}if(x.Iu=="showpan"){var Q=[{name:[0,1],P$:!0}],c=[{K:u.E.v,f:X.gr,C:{d:"editCurr",fU:x.fU}}],$=x.xK;
if(x.aiz){Q=[{name:["VAR0: VAR1",[0,5],[7,0]],P$:!0}];c=[{K:u.E.G2,C:X.U_.sd(!0)}];var z=hV.ad2();Q=Q.concat(z[0]);
c=c.concat(z[1])}Q.push({name:[11,9]});c.push({K:u.E.M,C:{d:u.H.Te,f:this.f,Iu:"showwarp"}});var j=new ev(Q,c);
j.parent=this;j._();j.update(x.rx,x.B4);var U=new jO(u.E.M,!0);U.data={d:u.H.A_,G7:j,x:$.TN+2,y:$.yv+1};
this.T(U)}};jd.prototype.Fy=function(x,Q){b6.prototype.Fy.call(this,x,Q);if(Q!=ke.m6&&Q!=ke.kg&&Q!=ke.Be&&Q!=ke.jw)return;
this.fJ.U(x._M,x.Dn,x.M0)};jd.prototype.Px=function(x){var Q={d:u.H.Te,f:this.f,Iu:this.vF.h()?"commit":"cancel"};
if(x.target==this.sZ||x.target==this.k2){Q.Iu="changeOther";Q.bL=this.sZ.h();Q.pK=[0,2,1][this.k2.h()]}var c=new jO(u.E.M,!0);
c.data=Q;this.T(c)};function bg(){jZ.call(this,!1,["binop","feat","anta","redge"])}bg.prototype=new jZ(!0);
function bT(){b6.call(this);var x=[],c="<svg  class=\"autoscale gsicon\" viewBox=\"0 0 14 18\" width=\"14\" height=\"18\" fill=\"black\"><path d=\"M14,6 L10,6 L10,0 L4,0 L4,6 L0,6 L7,13 L14,6 L14,6 Z M0,14 L0,16 L14,16 L14,14 Z\" /></svg>";
this.YR=new f2([12,85]);this.YR.U(!0);this.YR.k(u.E.t,this.Vy,this);x.push(this.YR.n);this.px=new c7(null,[[0,4],[0,3]]);
this.px.k(u.E.t,this.Vy,this);this.px.U(1);x.push(this.px.n);this.BK=new f2([20,1]);this.BK.k(u.E.t,this.Vy,this);
x.push(this.BK.n);this.CF=new f2([12,83]);this.CF.k(u.E.t,this.Vy,this);x.push(this.CF.n);this.CU=new kw;
this.CU.n=E.p("div","floatcont form");this.CU.n.setAttribute("style","max-width: 200px;");this.CU.parent=this;
var Q=this.CU.n;this.a5x=new c7("Scale for exported files",["1x","2x","3x","4x"]);Q.appendChild(this.a5x.n);
this.mr=new j7(c+" PNG",!1,"Save selected layers as PNG",!0);Q.appendChild(this.mr.n);this.mr.k("click",this.f7,this);
this.agy=new j7(c+" SVG",!1,"Save selected layers as SVG",!0);Q.appendChild(this.agy.n);this.agy.k("click",this.f7,this);
var $=new j7(c,!1,"Save selected layers",!0);x.push($.n);$.k("click",function(b){if(E.rm(this.CU.n))return;
var e=$.n.getBoundingClientRect(),k=new jO(u.E.M,!0);k.data={d:u.H.A_,G7:this.CU,x:e.left,y:e.top+e.height,ez:!0};
this.T(k)},this);var z=E.p("span","fitem");x.push(z);var j=E.p("span","fitem");x.push(j);this.Aw=[];
for(var F=0;F<8;F++){var U=F==3||F==7?[20,4,6]:[20,4,F<3?F:F-1],i=new j7("Hi",!1,U);(F<4?z:j).appendChild(i.n);
i.k("click",this.f7,this);this.Aw.push(i)}for(var F=0;F<x.length;F++)this.body.appendChild(x[F]);this.a3U=x}bT.prototype=new b6;
bT.prototype.M$=function(x){var Q=x.Zz,c=x.avp;this.YR.U(Q.tS);this.BK.U(Q.H8);this.CF.U(Q.j0);if(c){E.Os(this.body);
for(var F=0;F<c.length;F++)if(c[F]==1&&this.a3U[F])this.body.appendChild(this.a3U[F])}};bT.prototype.f7=function(x){var Q=this.Aw.indexOf(x.target),c;
if(Q==-1){c=new jO(u.E.M,!0);c.data={d:u.H.Te,f:this.f,Zq:x.target==this.mr?"getPNG":"getSVG",i8:this.a5x.h()+1}}else{c=new jO(u.E.v,!0);
c.f=X.kU;c.data={d:"algn",b:Q}}this.T(c)};bT.prototype.Vy=function(x){var Q=new jO(u.E.M,!0);Q.data={d:u.H.Te,f:this.f,Zq:"prms",tS:this.YR.V$(),abn:this.px.h(),H8:this.BK.V$(),j0:this.CF.V$()};
this.T(Q)};bT.prototype.Ef=function(){this.YR._();this.px._();this.BK._();this.CF._();var x="h0 h1 h2 hG v0 v1 v2 vG".split(" ");
for(var F=0;F<8;F++){this.Aw[F].UG(E.Qk("align/"+x[F],null,"autoscale"))}};function h5(){jZ.call(this,!1,"binop feat redge sesu wconf sall".split(" "))}h5.prototype=new jZ(!0);
function hL(){jG.call(this,["setop","patch"])}hL.prototype=new jG;function e4(){jG.call(this,["setop"])}e4.prototype=new jG;
function fw(x){var Q=x==X.aC5?[]:["bmode"];jG.call(this,Q.concat(["opacity","wconf","sall"]))}fw.prototype=new jG;
function ae(){jZ.call(this,!1,["binop","feat","anta","redge"])}ae.prototype=new jZ(!0);function jb(){jZ.call(this,!1,["binop","feat","anta","redge"])}jb.prototype=new jZ(!0);
function iJ(){jZ.call(this,!1,["binop","feat","redge","cstr"])}iJ.prototype=new jZ(!0);function h2(){b6.call(this);
this.n$=null;this.OI=null;this.k8=[new el("X",null,3.2,null,!0),new el("Y",null,3.2,null,!0),new el("W",null,3.2,null,!0),new el("H",null,3.2,null,!0),new el([12,15],"\xB0",3.7,null,!0),new el(["VAR0 1",[12,80,0]],null,3.5,null,!0),new el(["VAR0 2",[12,80,0]],null,3.5,null,!0),new j7([15,7,6],!1,null,!0),new j7([2,2],!1,null,!0)];
for(var F=0;F<this.k8.length;F++){var x=this.k8[F];this.body.appendChild(x.n);if(F>6)x.k("click",this.R8,this)}this.eZ=0}h2.prototype=new b6;
h2.prototype.R8=function(x){var Q=this.k8.indexOf(x.target)==7,c=new jO(u.E.v,!0);if(Q){if(this.eZ==0)return;
c.f=X.va;c.data={d:"rot",LX:[2,5],b:-this.eZ}}else{c.f=X.YD;for(var F=0;F<6;F++)this.k8[F].U(null)}this.T(c)};
h2.prototype.M$=function(x){function Q(i,b,e){var k=Math.sqrt(Math.pow(b.x-i.x,2)+Math.pow(b.y-i.y,2)),K=Math.sqrt(Math.pow(b.x-e.x,2)+Math.pow(b.y-e.y,2)),g=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2));
return Math.acos((K*K+k*k-g*g)/(2*K*k))}if(x==null)return;this.OI=x;var c=x.aaZ,$=x.Hv,z=$.x-c.x,j=$.y-c.y;
this.eZ=-Math.atan2(j,z);if(x.zk)this.eZ=Q($,c,x.zk);var U=this.k8;U[0].U(this.EA(x,c.x));U[1].U(this.EA(x,c.y));
U[2].U(this.EA(x,z));U[3].U(this.EA(x,j));U[4].U((this.eZ*180/Math.PI).toFixed(2));U[5].U(this.EA(x,bC.Xc(c,$)));
if(x.zk){U[6].U(this.EA(x,bC.Xc(c,x.zk)))}else U[6].U("")};h2.prototype.EA=function(x,Q){var c=d.fR.Z0(Q,x.cQ,this.n$,x.aii,!1);
return parseFloat(c).toFixed(2)};h2.prototype.Fy=function(x,Q){this.n$=x;this.M$(this.OI)};h2.prototype.Ef=function(){var x=this.k8;
for(var F=0;F<x.length;F++)x[F]._();E.JT(x[2],x[3])};function gN(){jG.call(this,["brush","strn","pdetail"])}gN.prototype=new jG;
function j5(){jG.call(this,["brush","sfrom"]);this.aki=[];var x=[[7,12]];for(var F=0;F<x.length;F++){var Q=new j7(x[F],!1,null,!0);
this.aki.push(Q);Q.parent=this;this.body.appendChild(Q.n);Q.k("click",this.a1G,this)}}j5.prototype=new jG;
j5.prototype.a1G=function(x){var Q=this.aki.indexOf(x.currentTarget),c=new jO(u.E.G2,!0);c.data=X.x7.YJ(Q==0?"contentAware":"aiHeal");
this.T(c)};function ka(){jG.call(this,["brush","strn"])}ka.prototype=new jG;function kG(){jG.call(this,["brush","flow","smode"])}kG.prototype=new jG;
function fi(){b6.call(this);this.HQ=!1;var x=E.p("span","fitem");this.body.appendChild(x);this.aZ=new c_(null,["<img src=\""+PIMG.zoomIn+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.zoomOut+"\" class=\"autoscale gsicon\" />"]);
x.appendChild(this.aZ.n);this.aZ.k(u.E.t,this.Vy,this);this.xQ=new j7([20,2]);this.body.appendChild(this.xQ.n);
this.xQ.k("click",this.aaw,this);this.Ue=new j7([20,3]);this.body.appendChild(this.Ue.n);this.Ue.k("click",this.aaw,this);
this.jp=new f2([8,7,1]);this.body.appendChild(this.jp.n);this.jp.k(u.E.t,this.Vy,this)}fi.prototype=new b6;
fi.prototype.Ef=function(){this.xQ._();this.Ue._()};fi.prototype.Vy=function(){var x={d:u.H.Te,f:this.f,bH:this.aZ.h()==0,Tm:this.jp.h()},Q=new jO(u.E.M,!0);
Q.data=x;this.T(Q)};fi.prototype.M$=function(x){if(this.HQ!=x.HQ)this.aZ.U(1-this.aZ.h());this.HQ=x.HQ};
fi.prototype.aaw=function(x){var Q=new jO(u.E.v,!0);Q.f=X.QT;Q.data={d:"adapt",b:x.target==this.xQ?"pixel":"fitscr"};
this.T(Q)};function hB(x,Q){b6.call(this);if(x==null)return;this.wm=x;this.AZ={};this.aAJ=Q;for(var F=0;
F<x.length;F++){var c=x[F],$=null;if(c=="tmode"){$=new c7(null,[[12,76,1],[12,76,0],[12,76,2]]);$.U(0);
if(Q)$.asR(2)}if(c=="make"){$=new c_("Make",[[17,2],[12,76,1]],null,!0)}if(c=="anta"){$=new f2([12,25,1]);
$.U(!0)}if(c=="binop"){$=new c7(null,[[6,13],[18,1],[18,2],[18,3],[18,4]])}if(c=="pshape")$=new c7(null,[[12,93,0],[12,93,1],[12,93,4],[12,93,2]]);
if(c=="shape")$=new gT([12,76,1]);if(c=="crad"){$=new f0([12,94,0],0,50,"px");$.U(0)}if(c=="cstr"){$=new fZ}if(c=="irad"){$=new f0([12,94,1],0,100,"%");
$.U(40)}if(c=="length"){$=new f0([12,80,0],4,40);$.U(4)}if(c=="sides"){$=new f0([12,78],3,30);$.U(5)}if(c=="width"){$=new f0([12,41],0,100,"px");
$.U(5)}if(c=="tolr"){$=new f0([12,24],0,100);$.U(5)}if(c=="fstyle"){$=new eY([12,26])}if(c=="sstyle"){$=new dL}if(c=="psnap"){$=new f2([8,10])}if(c=="crnr"){$=new j7("\u2312",!1,[12,94,0],!0)}if(c=="aopts"){$=new gv;
$.U([!1,!1,50,60,0])}if(c=="smplp"){$=new j7([12,94,2],!1,["VAR0 (VAR1)",[12,94,2],[8,9]],!0)}$.parent=this;
this.body.appendChild($.n);this.AZ[c]=$;$.k(c=="crnr"||c=="smplp"?"click":u.E.t,this.Vy,this)}}hB.prototype=new b6;
hB.prototype.M$=function(x){if(x.Ym!=null)this.AZ.binop.U(x.Ym);else if(x.Zq=="vals")for(var Q in x.aAD)this.AZ[Q].U(x.aAD[Q]);
else{var c=hB.LQ,$=function(j){return{w:j!=null&&j.hS(!1)}};if(c==null)c=hB.LQ=new ev([{name:"Remove Anchor Point",w:function(j){var U=j?j.zo():null;
return{w:j&&U[1].length!=0&&U[0][U[1][0]].add.vmsk.xf.length!=0}}},{name:"Remove Path",w:function(j){var U=j?j.zo():null;
return{w:j&&U[1].length!=0&&U[0][U[1][0]].add.vmsk.g.length!=0}},P$:!0},{name:"Make Selection"},{name:[2,3],w:$},{name:[14,9],w:$}],[{K:u.E.v,f:X.YW,C:{d:"remove",PS:!0}},{K:u.E.v,f:X.T3,C:{d:"remove"}},{K:u.E.M,C:{d:u.H.LL,AD:"makesel"}},{K:u.E.G2,C:X.qW.Un(null)},{K:u.E.M,C:{d:u.H.LL,AD:"strokepath"}}]);
c.parent=this;c.update(x.rx,x.B4);var z=new jO(u.E.M,!0);z.data={d:u.H.A_,G7:c,x:x.xK.TN+2,y:x.xK.yv+1};
this.T(z)}};hB.prototype.a0C=function(F){return null};hB.prototype.Ef=function(){for(var x in this.AZ){this.AZ[x]._()}};
hB.prototype.Vy=function(x){var Q=new jO(u.E.M,!0),c=this.AZ;if(x.target==c.crnr){Q=new jO(u.E.v,!0);
Q.f=X.YW;Q.data={d:"crnr"}}else if(x.target==c.smplp){Q=new jO(u.E.v,!0);Q.f=X.T3;Q.data={d:"smplp"}}else if(x.target==c.make){var F=x.target.h();
console.log(F);if(F==0)Q.data={d:u.H.LL,AD:"makesel"};else{Q=new jO(u.E.v,!0);Q.f=X.J7;Q.data={d:"newfill",Iz:0}}}else if(x.target==c.fstyle){Q.data={d:u.H.hW,hF:ke.u$,b:c.fstyle.h()}}else if(x.target==c.sstyle){Q.data={d:u.H.hW,hF:ke.Rc,b:c.sstyle.h()}}else if(x.target==c.tmode){Q.data={d:u.H.hW,hF:ke.oP,b:c.tmode.h()}}else{if(c.pshape)this.f$();
Q.data={d:u.H.Te,f:this.f};for(var $ in c)Q.data[$]=c[$].h()}this.T(Q)};hB.prototype.f$=function(){var x=this.AZ,Q=x.tmode.h(),c=x.pshape?this.a0C(x.pshape.h()):this.wm,$;
if(Q==0)$=["anta","make"];if(Q==1)$=["anta","fstyle","sstyle"];if(Q==2)$=["make","binop","fstyle","sstyle"];
var z=x.binop;if(z){var j=z.h();if(Q==0){z.aot(0)}else{z.asR(0);if(j==0){z.U(1);this.Vy({target:z})}}}E.Os(this.body);
for(var F=0;F<c.length;F++){var U=c[F];if($.indexOf(U)!=-1)continue;this.body.appendChild(x[U].n)}};
hB.prototype.Fy=function(x,Q){b6.prototype.Fy.call(this,x,Q);var c=this.AZ.fstyle,$=this.AZ.sstyle,z=this.AZ.tmode;
if(c)c.Fy(x,Q);if($)$.Fy(x,Q);if(Q==ke.m6||Q==ke.fB)if(x.jS.length!=0&&this.AZ.shape){this.AZ.shape.RN(x.jS)}if(Q==ke.m6||Q==ke.u$)if(c)c.U(null,x.gd,x.O1);
if(Q==ke.m6||Q==ke.Rc)if($)$.U(null,x.T6,x.D5);if(Q==ke.m6||Q==ke.oP){var j=x.cb;if(this.aAJ&&j==2)j=0;
if(z){z.U(j);this.f$()}}};function f_(){hB.call(this,["tmode","make","fstyle","sstyle","binop"],!0)}f_.prototype=new hB;
function dy(){hB.call(this,"tmode make anta fstyle sstyle binop".split(" "))}dy.prototype=new hB;function hs(){hB.call(this,["fstyle","sstyle","smplp"]);
this.alv=null;this.agF=null;this.auN=null;this.Kl=new c7([12,76,0],[[18,1],[18,2],[18,3],[18,4],[18,5]],[4]);
this.FZ=new j7("\u25BC");this.FZ.Lm();this.cc=new j7("\u25B2");this.cc.Lm();this.hu=[this.Kl,this.FZ,this.cc];
for(var F=0;F<this.hu.length;F++){var x=this.hu[F];this.body.appendChild(x.n);x.parent=this;x.k(F==0?u.E.t:"click",this.G1,this)}}hs.prototype=new hB;
hs.prototype.M$=function(x){if(x.Iu=="main"){var Q=this.hu,c=x.hk;if(c){this.agF=c.clone();this.auN=JSON.stringify(x.eV);
var $=c.g.slice(0),z=$.length;for(var F=0;F<$.length;F++)$[F]++;$.sort(function(b,e){return b-e});Q[0].bJ();
Q[1].vz(z!=0);Q[2].vz(z!=0);Q[0].UG(z==0?"No Paths":z==1?"Path "+$[0]:"Paths "+$.slice(0,3).join(",")+(z>3?"..":""));
if(z!=0){var j=c.g[0],U=d.o.dQ(c.$,j),i=c.$[U];this.Kl.U([3,0,1,2][i.Kp])}}else for(var F=0;F<Q.length;
F++)Q[F].hp()}else hB.prototype.M$.call(this,x)};hs.prototype.Ef=function(){hB.prototype.Ef.call(this);
this.Kl._()};hs.prototype.G1=function(x){if(x.target==this.Kl||x.target==this.FZ||x.target==this.cc){var Q={},c=this.agF,$=c.$,z=c.g,j=d.o.WV($),U=JSON.parse(this.auN);
z.sort(function(I,f){return I-f});if(x.target==this.Kl){var i=this.Kl.h();if(i<4)for(var F=0;F<z.length;
F++)$[d.o.dQ($,z[F])].Kp=[1,2,3,0][i];else{if(j<=1)return;c.$=d.o.nv($);c.g=c.$.length==2?[]:[0];c.xf=[];
U=[d.eV.rB()]}}else{var b=x.target==this.FZ?-1:1,e=[];for(var F=0;F<j;F++){var k=d.o.dQ($,F),K=k+1+$[k].length;
e.push($.slice(k,K))}var g=z.slice(0);for(var F=0;F<z.length;F++)g[F]=Math.max(F,Math.min(j-1-(z.length-1-F),g[F]+b));
if(z.join(",")==g.join(","))return;var R=JSON.parse(JSON.stringify(U));for(var F=0;F<z.length;F++){var T=b==-1?F:z.length-1-F,k=z[T],K=g[T];
if(k!=K){var D=e[k];e[k]=e[K];e[K]=D;D=R[k];R[k]=R[K];R[K]=D}}var a=$.slice(0,2);for(var F=0;F<e.length;
F++)a=a.concat(e[F]);c.$=a;c.g=g;U=R}Q.hk=c;Q.eV=U;var _=new jO(u.E.M,!0);_.data={d:u.H.Te,f:this.f,b3:Q};
this.T(_)}};function dk(){hB.call(this,["fstyle","sstyle","crnr","psnap"])}dk.prototype=new hB;function fs(){hB.call(this,"tmode make anta fstyle sstyle binop cstr crad".split(" "))}fs.prototype=new hB;
function cg(){hB.call(this,"tmode make anta fstyle sstyle binop cstr".split(" "))}cg.prototype=new hB;
function af(){hB.call(this,"tmode make anta fstyle sstyle binop pshape sides irad crad width aopts length".split(" "));
this.AZ.aopts.U([!1,!0,50,60,0])}af.prototype=new hB;af.prototype.a0C=function(F){var x=[["sides","crad"],["sides","irad","crad"],["width","aopts"],["length"]];
return"tmode make fstyle sstyle binop pshape".split(" ").concat(x[F])};function ey(){hB.call(this,"tmode make anta fstyle sstyle binop width aopts".split(" "))}ey.prototype=new hB;
function kK(){hB.call(this,"tmode make anta fstyle sstyle binop cstr shape".split(" "))}kK.prototype=new hB;
function dt(){jZ.call(this,!1,["binop","feat","redge","sesu"])}dt.prototype=new jZ(!0);function iX(){jG.call(this,["brush","qsmode","redge","sesu"])}iX.prototype=new jG;
function bz(){b6.call(this);this.Gp=[];for(var F=0;F<2;F++){var x=new j7(F==0?[8,11,3]:["VAR0...",[15,10,22]],null,null,!0);
this.Gp.push(x);x.k("click",this.G1,this);this.body.appendChild(x.n)}}bz.prototype=new b6;bz.prototype.G1=function(x){var Q;
if(this.Gp.indexOf(x.target)==0){Q=new jO(u.E.G2,!0);Q.data={q4:"make",dx:{__name:"Make",classID:"Mk",null:{t:"obj ",v:[{t:"Clss",v:{classID:"slice"}}]},Usng:{t:"type",v:{classID:"Gd"}}}}}else{Q=new jO(u.E.M,!0);
Q.data={d:u.H.LL,AD:"divslice"}}this.T(Q)};bz.prototype.Ef=function(x){for(var F=0;F<this.Gp.length;
F++)this.Gp[F]._()};function hY(){b6.call(this);var x=this.Wb=[new j7("\u25BC",null,null,!0),new j7("\u25B2",null,null,!0),new j7([5,4],null,null,!0),new j7(["VAR0...",[15,10,22]],null,null,!0)];
for(var F=0;F<4;F++){var Q=x[F];this.body.appendChild(Q.n);Q.k("click",this.G1,this)}}hY.prototype=new b6;
hY.prototype.G1=function(x){var Q=this.Wb.indexOf(x.target),c;if(Q==3){c=new jO(u.E.M,!0);c.data={d:u.H.LL,AD:"divslice"}}else{c=new jO(u.E.v,!0);
c.f=X.bb;c.data={d:Q==2?"delete":"reorder",dir:Q==0?-1:1}}this.T(c)};hY.prototype._=function(){b6.prototype._.call(this);
for(var F=0;F<4;F++)this.Wb[F]._()};function et(x,Q){b6.call(this);if(window.Typr==null||x)return;this.aAK=Q;
this.PD=null;this.aBr=E.p("span","");this.axv=E.p("span","");var c=1,$=this.uT={gy:new iS(null,24),u8:new f0("X",0,0,"px",0,!1,!0,4),h5:new f0("Y",0,0,"px",0,!1,!0,4),gw:new f0("W",0,0,["%","px"],2,!1,!0,5),Tg:new j7("<img src=\""+PIMG["lrs/link"]+"\" class=\"autoscale gsicon\" />",null,[12,51],null),ZJ:new f0("H",0,0,["%","px"],2,!1,!0,5),age:new f0("\u2221",0,0,"\xB0",c,!1,!0),ayN:new f0("\u25B1 H",-85,85,"\xB0",c,!1,!0),a9W:new f0("\u25B1 V",-85,85,"\xB0",c,!1,!0),Vl:new c7(null,[[12,14,2],[12,14,3],"Bicubic Sharper"]),ad:new c7("Protect",[])};
$.Vl.U(1);$.Tg.U(!0);for(var z in $){var j=$[z],U=!0;if(Q&&(j==$.age||j==$.ayN||j==$.a9W||j==$.Vl))U=!1;
if(!Q&&j==$.ad)U=!1;if(U)this.aBr.appendChild(j.n);var i=j==$.Tg?"click":u.E.t;j.k(i,this.aBH,this)}this.Zs=new c_("Split",c_.GV(["split/vh","split/v","split/h"]),["Crosswise",[22,4,3],[22,4,2]],null,!0);
this.Zs.U(-1);this.Zs.k(u.E.t,this.apj,this);this.IS=new kL(!0,!0,!0);this.IS.k(u.E.t,this.apj,this);
this.IS.parent=this;var b=this.axv,e=this.IS;b.appendChild(this.Zs.n);b.appendChild(e.Uh.n);b.appendChild(e.PE.n);
b.appendChild(e.Nf.n);b.appendChild(e.v2.n);b.appendChild(e.Nq.n);this.pW=new j7([11,9]);this.pW.k("click",this.ak3,this);
this.vF=new iG;this.vF.k("click",this.Px,this)}et.prototype=new b6;et.prototype.M$=function(x){if(x.xK){var Q=et,c=this.LQ;
if(c==null)c=this.LQ=new ev(Q.ary(),Q.aC2(this.f));c._();c.parent=this;c.update(x.rx,x.B4);var $=new jO(u.E.M,!0);
$.data={d:u.H.A_,G7:c,x:x.xK.TN+2,y:x.xK.yv+1};this.T($);return}E.Os(this.body);this.PD=x;if(x.uT){var z=x.uT.W4,j=x.uT.BS.clone(),U=Math.atan2(-j.J,j.V),i=new bI;
i.rotate(-U);j.concat(i);var b=this.uT;b.gy.U(x.uT.o2);b.u8.U(x.uT.pt.x);b.h5.U(x.uT.pt.y);b.gw.U(j.V*(b.gw.mv()=="%"?100:z.m));
b.ZJ.U(j.xq*(b.ZJ.mv()=="%"?100:z.e));b.age.U(-U*180/Math.PI);b.ayN.U(Math.atan(j.dC/j.xq)*180/Math.PI);
b.a9W.U(0*180/Math.PI);this.body.appendChild(this.aBr);this.pW.xE();if(x.uT.OB!=null)b.Tg.U(x.uT.OB)}if(x.JV){if(x.aBa)this.Zs.U(-1);
this.IS.U(x.JV);this.body.appendChild(this.axv);this.pW.Lm()}if(x.fG)b.ad.yJ(x.fG);this.body.appendChild(this.vF.n);
if(x.aDS&&!this.aAK)this.body.appendChild(this.pW.n)};et.prototype.aBH=function(x){var Q=this.uT,c=this.PD.uT.W4;
if(x.target==Q.Tg)Q.Tg.U(!Q.Tg.h());else if(Q.Tg.V$()){var $=Q.ZJ,z=Q.gw,j=c.e,U=c.m;if(x.target==Q.gw){$=Q.gw;
z=Q.ZJ;j=c.m;U=c.e}var i=$.h()/($.mv()=="%"?100:j);i*=z.mv()=="%"?100:U;z.U(i)}var b=[];for(var e in Q)if(Q[e]!=Q.Tg&&Q[e]!=Q.gy){var i=Q[e].h();
if((Q[e]==Q.gw||Q[e]==Q.ZJ)&&i==0){i=.1;Q[e].U(i)}if(Q[e]==Q.gw&&Q[e].mv()=="px")i/=c.m/100;if(Q[e]==Q.ZJ&&Q[e].mv()=="px")i/=c.e/100;
b.push(i)}var k=new bC(b[0],b[1]);if(x.target==Q.gy){this.ef({Iu:"ctyp",o2:Q.gy.h()})}else if(x.target==Q.u8||x.target==Q.h5){this.ef({Iu:"cen",pt:k})}else{var K=this.PD.uT.BS.clone(),g=K.clone(),R=Math.atan2(-K.J,K.V);
g.translate(-k.x,-k.y);g.rotate(-R);var T=new bI(g.V,g.J,g.dC,g.xq,0,0);T.HQ();g.concat(T);var D=b[2]/100,a=b[3]/100;
g.concat(new bI(D,D*Math.tan(b[6]*Math.PI/180),a*Math.tan(b[5]*Math.PI/180),a,0,0));g.rotate(-b[4]*Math.PI/180);
g.translate(k.x,k.y);this.PD.uT.BS=g;this.ef({Iu:"trn",uT:g,G_:Q.Vl.h(),oS:Q.ad.h(),OB:Q.Tg.h()})}};
et.prototype.apj=function(x){var Q=this.Zs;this.ef(x.target==Q?{Iu:"splt",b:Q.h()}:{Iu:"wrp",JV:this.IS.h()})};
et.prototype.ak3=function(x){this.ef({Iu:"switchWarp"})};et.prototype.Px=function(x){this.ef({Iu:this.vF.h()?"commit":"cancel"})};
et.prototype.ef=function(x){x.d=u.H.Te;x.f=this.f;var Q=new jO(u.E.M,!0);Q.data=x;this.T(Q)};et.prototype.Ef=function(){var x=this.uT;
for(var Q in x)x[Q]._();E.JT(x.gw,x.ZJ);this.vF._();this.Zs._();this.IS._();this.pW._()};et.ary=function(){var x=function(Q){var c=!0;
if(Q==null||Q.g.length==0)c=!1;else{var $=Q.g;for(var F=0;F<$.length;F++){if(Q.B[$[F]].add.TySh)c=!1}}return{w:c}};
return[{name:[5,9],KR:"Shift+Alt+Ctrl + T",P$:!0},{name:[12,38]},{name:[2,5]},{name:"Skew"},{name:[24,4],w:x},{name:[2,9],w:x,P$:!0},{name:[11,9],w:function(Q){if(Q==null||Q.g.length!=1)return{w:!1};
var c=Q.B[Q.g[0]];return{w:c.add.TySh==null&&!c.Uy()}},P$:!0},{name:["VAR0 90\xB0 \u21BB",[2,5]]},{name:["VAR0 90\xB0 \u21BA",[2,5]]},{name:["VAR0 180\xB0",[2,5]]},{name:[[2,6],[22,4,2]]},{name:[[2,6],[22,4,3]]}]};
et.aC2=function(x){if(x==null)x=X.va;return[{K:u.E.v,f:x,C:{d:"again"}},{K:u.E.M,C:{d:u.H.ax,f:x,Zz:{AW:3}}},{K:u.E.M,C:{d:u.H.ax,f:x,Zz:{AW:4}}},{K:u.E.M,C:{d:u.H.ax,f:x,Zz:{AW:5}}},{K:u.E.M,C:{d:u.H.ax,f:x,Zz:{AW:2}}},{K:u.E.M,C:{d:u.H.ax,f:x,Zz:{AW:1}}},{K:u.E.M,C:{d:u.H.ax,f:x,Zz:{AW:-1}}},{K:u.E.G2,C:X.Y.Kz(!0,90,!0)},{K:u.E.G2,C:X.Y.Kz(!0,-90,!0)},{K:u.E.G2,C:X.Y.Kz(!0,-180,!0)},{K:u.E.G2,C:X.Y.Kz(!1,"Hrzn",!0)},{K:u.E.G2,C:X.Y.Kz(!1,"Vrtc",!0)}]};
function hP(){et.call(this)}hP.prototype=new et(!0);function i$(){et.call(this)}i$.prototype=new et(!0);
function cm(){et.call(this,!1,!0)}cm.prototype=new et(!0);function aZ(){b6.call(this);var x=this.wm=[new c7([12,36],["Rigid",[15,10,0],[24,4]]),new c7([12,74],[[19,8,0],[19,8,1],[19,8,2]]),new f0([7,4],0,100,"px"),new f2("Show Mesh"),new j7("\u25BC",null,null,!0),new j7("\u25B2",null,null,!0)];
for(var F=0;F<x.length;F++){var Q=x[F];Q.parent=this;this.body.appendChild(Q.n);Q.k(F<4?u.E.t:"click",this.amx,this)}this.vF=new iG;
this.vF.k("click",this.Px,this);this.body.appendChild(this.vF.n)}aZ.prototype=new b6;aZ.prototype.Ef=function(){var x=this.wm;
for(var F=0;F<4;F++)x[F]._();this.vF._()};aZ.prototype.M$=function(x){var x=x.hF;for(var F=0;F<4;F++)this.wm[F].U(x[F])};
aZ.prototype.amx=function(x){var Q=[];for(var F=0;F<4;F++)Q[F]=this.wm[F].h();var c=this.wm.indexOf(x.target);
if(c<4)this.ef({Iu:"prm",hF:Q});else this.ef({Iu:"moveDepth",aht:c==5})};aZ.prototype.Px=function(x){this.ef({Iu:this.vF.h()?"commit":"cancel"})};
aZ.prototype.ef=function(x){x.d=u.H.Te;x.f=this.f;var Q=new jO(u.E.M,!0);Q.data=x;this.T(Q)};function bk(){b6.call(this);
var x=this.cn=[new c7([12,20,0],["1x1","3x3","5x5","11x11","31x31"])];for(var F=0;F<x.length;F++){var Q=x[F];
Q.k(u.E.t,this.Vy,this);this.body.appendChild(Q.n)}}bk.prototype=new b6;bk.prototype.Vy=function(x){var Q=this.cn,c=[];
for(var F=0;F<Q.length;F++)c[F]=Q[F].h();var $=new jO(u.E.M,!0);$.data={d:u.H.Te,f:this.f,h8:c};this.T($)};
bk.prototype.Ef=function(){for(var F=0;F<this.cn.length;F++)this.cn[F]._()};function k9(){jZ.call(this,!1,["binop"]);
this.tG=new j7("Remove",!1,null,!0);this.tG.k("click",this.Np,this);this.tG.n.style.marginRight="2em";
this.aaq=new el("New content");this.iX=new j7("\u2026",!1,null,!0);this.iX.k("click",this.S$,this);this.il=new j7([18,0],!1,null,!0);
this.il.k("click",this.Np,this);this.vv=new j7("Undo",!1,null,!0);this.vv.k("click",this.Np,this);this.body.appendChild(this.tG.n);
this.body.appendChild(this.aaq.n);this.body.appendChild(this.iX.n);this.body.appendChild(this.il.n);
this.body.appendChild(this.vv.n);this.CU=new kw;this.CU.parent=this;var x=this.CU.n=E.p("div","floatcont form label6"),Q=this.FK="euler euler_a ddim dpm k_lms pndm".split(" "),c=this.RA=[new f2("Use default settings"),new el("Neg. prompt",null,13.25),new bf("Guidance",-20,20),new bf("Steps",10,50),new c7("Sampler",Q)];
c[0].k(u.E.t,this._,this);c[0].U(!0);c[2].U(6);c[3].U(20);for(var F=0;F<c.length;F++){x.appendChild(c[F].n);
E._X(x)}}k9.prototype=new jZ(!0);k9.prototype._=function(){b6.prototype._.call(this);this.il._();var x=this.RA;
for(var F=0;F<x.length;F++){x[F]._();if(F>0)x[F].vz(!x[0].h())}};k9.prototype.Np=function(x){if(x.target==this.vv){var Q=new jO(u.E.v,!0);
Q.f=X.RZ;Q.data={d:"h_stepbck"};this.T(Q);return}var c=this.RA,$={},z=["negative_prompt","guidance","steps","sampler"],j=!c[0].h();
if(j){for(var F=1;F<c.length;F++)$[z[F-1]]=c[F].h();$.sampler=this.FK[$.sampler];$.steps=Math.min($.steps,50)}var Q=new jO(u.E.G2,!0);
Q.data=X.x7.YJ("aiHeal");if(x.target==this.il){Q.data.dx.prmt={t:"TEXT",v:this.aaq.h()};if(j)Q.data.dx.hF=$}this.T(Q)};
k9.prototype.S$=function(x){if(E.rm(this.CU.n))return;var Q=this.iX.n.getBoundingClientRect(),c=new jO(u.E.M,!0);
c.data={d:u.H.A_,G7:this.CU,x:Q.left,y:Q.top+Q.height+4,ez:!0};this.T(c)};function cN(){kw.call(this);
this.n=E.p("div","cmanager");window.alert=function($,z){this.ayD($,z);console.log("Alert: "+$)}.bind(this);
window.onblur=function($){var z=this;z.fC()}.bind(this);this.ww=0;this.R0=0;this.Xu=[];this.JR={};this.x9=E.p("div","alertcont");
this.n.appendChild(this.x9);this.ayl=E.p("div","alertcont");this.n.appendChild(this.ayl);this.pl=E.p("div","alertcont");
this.a4Q=0;this.mD=-1;this.a2E=null;this.Gp=null;var x=this.amy=E.p("div","alertpanel");x.setAttribute("style","padding:0.7em 1em 0.1em 1em;");
this.pl.appendChild(x);var Q=this.NX=E.p("input");Q.setAttribute("type","text");E.e5(Q);Q.setAttribute("style","background-color:white; color:black; font-size:1.2em; width:100%;  margin:0;");
Q.addEventListener("input",this.a6_.bind(this),!1);Q.addEventListener("keydown",this.ae2.bind(this),!1);
x.appendChild(Q);var c=this.azk=E.p("div","contextpanel scrollable");c.setAttribute("style","text-align:left; box-shadow:none; margin:0.5em 0 1em 0;color:#888;");
c.addEventListener("click",this.amz.bind(this),!1);x.appendChild(c);E.KH(document.body,this.aAm.bind(this))}cN.prototype=new kw;
cN.prototype.rA=function(){if(E.rm(this.pl))this.n.removeChild(this.pl)};cN.prototype.asO=function(x,Q){var c=this.a2E=[],$=Q.a0z;
for(var F=0;F<hV.data.length;F++){var z=hV.data[F],j=[ah.get(z.name)],U=[F];cN.Lt(z.items,j,U,c,x,Q,$==null?null:$[F]==null?0:$[F])}var i=Q.s;
for(var F=0;F<i.eh.length;F++){var b=i.eh[F],e=i.keys[F];for(var k=0;k<b.length;k++)c.push([["Tools",ah.get(b[k].f.name)],[-1,b[k].f.id],e?e.Qw:null])}this.n.appendChild(this.pl);
var K=this.NX;K.focus();K.select();this._I()};cN.prototype.a6_=function(x){this.mD=-1;this._I()};cN.prototype._I=function(){var x=this.NX.value.toLowerCase().trim().replace(/  +/g," "),Q=this.a2E,c=[],$=[],z=x.split(" ");
if(x!="")for(var F=0;F<Q.length;F++){var j=Q[F][0],U=[],i=0;for(var b=0;b<j.length;b++)U[b]=-1;for(var e=0;
e<z.length;e++)for(var b=0;b<j.length;b++){var k=j[b].toLowerCase().indexOf(z[e]);if(k!=-1){U[b]=[k,k+z[e].length];
i++;break}}if(i==z.length){c.push(Q[F]);$.push(U)}}var K=[],g=this.azk;E.Os(g);for(var F=0;F<c.length;
F++){var R=c[F],T=R[0],k=$[F],D="enab",_="";if(F==this.mD)D+=" active";var a=E.p("div",D);K.push(a);
g.appendChild(a);for(var b=0;b<T.length;b++){var I=k[b],f=z[b],y=T[b];if(I!=-1)y=y.slice(0,I[0])+"<span style=\"color:black\">"+y.slice(I[0],I[1])+"</span>"+y.slice(I[1]);
_+=y;if(b<T.length-1)_+=" \uFE65 "}if(R[2]&&(typeof R[2]!="string"||R[2].length==1))_+=" <span style=\"border:1px solid; margin-left:16px; padding:1px 5px; border-radius:5px; background-color:#f4f4f4;\">"+fM.es(R[2])+"</span>";
a.innerHTML=_}this.Gp=[c,K]};cN.prototype.ae2=function(x){var Q=fM.Ma,c=x.code;if(Q(c,fM.En))this.rA();
var $=Q(c,fM.xc),z=Q(c,fM.Cn),j=Q(c,fM.ln);if($||z){this.mD=Math.max(0,Math.min(this.Gp[0].length-1,this.mD+($?-1:1)));
this._I()}if(j&&this.mD!=-1)this.ayU(this.mD)};cN.Lt=function(x,Q,c,$,z,j,U){if(typeof U=="number"){if(U==0)return;
if(U==1)U=null}for(var F=0;F<x.length;F++){if(U!=null&&(U[F]==0||U[F]==null))continue;var i=x[F],b=Q.slice(0),e=c.slice(0),k=ah.get(i.name);
if(i.w){var K=i.w(z,j,F);if(K.LT)k=K.LT;if(K.w==!1)continue}b.push(k);e.push(F);if(i.sub)cN.Lt(i.sub,b,e,$,z,j,U?U[F]:null);
else $.push([b,e,i.KR])}};cN.prototype.amz=function(x){var Q=x.target;if(Q.tagName.toLowerCase()=="span")Q=Q.parentNode;
var c=this.Gp[1].indexOf(Q);if(c!=-1)this.ayU(c)};cN.prototype.ayU=function(x){var Q=this.Gp[0][x][1];
if(Q[0]==-1){var c=new jO(u.E.M,!0);c.data={d:u.H.ax,f:Q[1]};this.T(c)}else{var $=hV.data[Q[0]].yz[Q[1]];
for(var F=2;F<Q.length;F++)$=$.sub[Q[F]];var z=new jO($.K,!0);z.f=$.f;z.data=$.C;this.T(z)}this.rA()};
cN.prototype.oN=function(x,Q){this.ww=x;this.R0=Q;this.azk.style["max-height"]=Q-120+"px"};cN.prototype.a6d=function(x){var Q=E.p("div","alertpanel");
Q.textContent=ah.get(x);this.x9.appendChild(Q);this.JR[JSON.stringify(x)]=Q};cN.prototype.az7=function(x){var Q=this.JR[JSON.stringify(x)];
this.x9.removeChild(Q);delete this.JR[JSON.stringify(x)]};cN.prototype.ayD=function(x,Q){var c=this.ayl;
for(var F=0;F<c.children.length;F++)if(c.children[F].textContent==x)return;var $=E.p("div","alertpanel tpanel");
$.textContent=x;$.setAttribute("style","opacity:0.5; transform:scale(0.9)\t");c.appendChild($);if(Q==null)Q=1500;
var z=Q,j=Math.max(Date.now()+z,this.a4Q+z);setTimeout(function(){$.setAttribute("style","transform:scale(1); opacity:1;")},10);
setTimeout(function(){c.setAttribute("style","margin-top: -3.6em; transform: translateY(3.6em);")},j-Date.now()-30);
setTimeout(function(){c.removeChild(c.firstChild);c.setAttribute("style","transition: transform 0.7s;  margin-top: 1em;  transform: translateY(0em);")},j-Date.now());
this.a4Q=j};cN.prototype.aAm=function(x){var Q=this.Xu;for(var F=Q.length-1;F>=0;F--){var c=Q[F],$=x.target;
while($!=null){if($==c.n){this.fC(c);return}$=$.parentNode}}this.fC();var z=x.target;while(z!=this.pl&&z!=document.body)z=z.parentNode;
if(z!=this.pl)this.rA()};cN.prototype.fC=function(x){var Q=this.Xu;for(var F=0;F<Q.length;F++){if(x&&x.ahC(Q[F]))continue;
var c=Q[F].n;if(!(Q[F]instanceof ev))E.x3(Q[F],this.n);else this.n.removeChild(c);c.style.height="auto";
E.WP(c,"scrollable");Q.splice(F,1);F--}};cN.prototype.axL=function(x){this.fC(x.G7);var Q=x.G7,c=Q.n;
if(this.Xu.indexOf(Q)!=-1)return;this.Xu.push(Q);this.n.appendChild(c);var $=this.ww,z=this.R0,j=x.x,U=x.y,i=this.n.getBoundingClientRect(),b=Q instanceof ev,e=-1,k=z-2;
if(b||x.ez){var K=Q.y7(),g=Q.adi();if(b)K=Math.min(K,200);var R=$-K-2,T=z-g-2;if(U<T)e=2;else if(j<R)e=1;
else if(0<U-g-2)e=0;else e=3;if(x.aA3)e=0;if(x.awK)e=2;if(e==2){j=Math.min(j,R)}else if(e==1){U=Math.min(U,T)}else if(e==0){U=U-g-2;
j=Math.min(j,R);k=x.y}else if(e==3){j=j-K-2;U=Math.min(U,T)}}U=Math.max(2,U);var top=Math.round(U-i.y+this.n.offsetTop);
c.style.position="absolute";c.style["z-index"]=10;if(U+Q.adi()>k){c.style.height=k-U+"px";E.ZW(c,"scrollable");
if(e==3)j-=10}c.style.left=Math.round(j)+"px";c.style.top=top+"px";if(!(Q instanceof ev))E.KS(Q)};cN.prototype.amD=function(x){var Q=x.G7,c=this.Xu.indexOf(Q);
if(c==-1)return;this.Xu.splice(c,1);var $=Q.n;if(!(Q instanceof ev))E.x3(Q,this.n);else this.n.removeChild(Q.n)};
cN.prototype.sl=function(){var x=this.Xu;return x.length==0?null:x[x.length-1]};cN.prototype.alJ=function(){this.amD({G7:this.sl()})};
function eL(){kw.call(this);this.n=E.p("div","confbar")}eL.prototype=new kw;eL.prototype.aci=function(x){x.parent=this;
E.Os(this.n);this.n.appendChild(x.n)};function hF(x){kw.call(this);hF.EU=this;hF.nn=x;this.n$=null;this.bd=E.p("input","");
this.bd.setAttribute("type","file");this.bd.setAttribute("multiple","");this.bd.addEventListener("change",function(Q){this.cB(Q.target.files,null,this.RJ,null);
this.RJ=null}.bind(this),!1);document.body.appendChild(this.bd);this.bd.setAttribute("style","display:none");
this.ajP=[];this.Ug=!1;this.a38=[];this.Bn=!1;this.ax8={};this.RJ=null}hF.prototype=new kw;hF.nn=null;
hF.At=function(x){try{var Q={};Q[x.type]=x;navigator.clipboard.write([new ClipboardItem(Q)])}catch(dQ){console.error(dQ,dQ.message)}};
hF._x=function(x,Q){navigator.clipboard.read().then(function(c){for(var F=0;F<c.length;F++){try{var $=c[F],z={},j=0,U=0;
for(var i=0;i<$.types.length;i++){var b=$.types[i];j++;$.getType(b).then(function(e){var k=b;new Response(e).arrayBuffer().then(function(K){z[this.Iz]=K;
U++;if(U==j)hF.anj(z,x,Q)}.bind({Iz:this.Iz}))}.bind({Iz:b}))}}catch(dQ){console.error(dQ,dQ.message)}}}).catch(function(c){})};
hF.aB$=function(x){navigator.permissions.query({name:"clipboard-read"}).then(function(Q){x(Q.state)})};
hF.anj=function(x,Q,c){var $=["text/plain","image/png","text/html","text/plain"];for(var z in x)console.log(z,z.startsWith("text")?w.IV(new Uint8Array(x[z])).slice(0,100)+"...":x[z]);
for(var j=0;j<$.length;j++){var U=$[j],i=x[U];if(i==null)continue;if(U=="image/png"){hF.nn({name:"image.png"},i,Q,c);
return}if(U=="text/plain"){var b=w.IV(new Uint8Array(i));if(j==0)if(!b.startsWith("<!--")&&!b.startsWith("<svg"))continue;
if(c&&b.startsWith("<svg"))continue;var e=new jO(u.E.M,!0);e.data={d:u.H.aom,b:b};Q.T(e);return}if(U=="text/html"){var b=w.IV(new Uint8Array(i)),k=b.indexOf("src=\"");
if(k!=-1&&b.slice(k+5,k+9)!="http"){var K=k+10;while(b[K]!="\"")K++;var g=b.slice(k+5,K);hF.nn({name:"chart.png"},ar.DM(g).buffer,Q,c);
return}}}};hF.prototype.MF=function(x){if(x==null)x=[23,5];var Q=JSON.stringify(x),c=this.ax8;if(c[Q]==null)c[Q]=0;
if(c[Q]==0){var $=new jO(u.E.M,!0);$.data={d:u.H.Tb,xx:x};this.T($)}c[Q]++};hF.prototype.DA=function(x){if(x==null)x=[23,5];
var Q=JSON.stringify(x),c=this.ax8;if(c[Q]==null)c[Q]=0;c[Q]--;if(c[Q]==0){var $=new jO(u.E.M,!0);$.data={d:u.H.MM,xx:x};
this.T($)}};hF.prototype.apS=function(x,Q){this.RJ=x;var c=window.showOpenFilePicker;if(c&&window.self==window.top){var $=this;
c({multiple:!0}).then(function(U){var i=[];function b(e){i.push(e);if(i.length==U.length){$.cB(i,null,$.RJ,null,U);
$.RJ=null}else U[i.length].getFile().then(b)}U[i.length].getFile().then(b)});return}var z=this.bd;if(Q)z.setAttribute("accept",Q);
else z.removeAttribute("accept");var j=document.createEvent("MouseEvents");j.initMouseEvent("click",!0,!0,document.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null);
z.dispatchEvent(j)};hF.prototype.fQ=function(x){if(x.url.indexOf("photopea.com#i")!=-1||x.url.indexOf("photopea.com/#i")!=-1){this.kn(x.url.split("#i").pop());
return}this.ajP.push(x);this.amC()};hF.prototype.amC=function(){var x=this.ajP;if(x.length==0||this.Ug)return;
this.Ug=!0;var Q=x.shift();this.MF();if(Q._g==null)Q._g={};var c=new XMLHttpRequest;c.Qr=Q;var $=Q.url;
if(Q.l_&&!$.startsWith("data:image"))$=($);c.open("GET",$);if(Q.un)for(var z in Q.un)c.setRequestHeader(z,Q.un[z]);
c.responseType="arraybuffer";c.onload=this.auL.bind(this);c.send()};hF.prototype.cB=function(x,Q,c,$,z){for(var F=0;
F<x.length;F++){this.MF();var j=x[F],U=new FileReader;U.Qr=j;U.Qr.Dw=c;U.Qr.SS=$;U.a67=Q;if(z)U.Qr.ph=z[F];
U.onload=this.auL.bind(this);U.onerror=function(i){this.DA()}.bind(this);this.a38.push([U,j])}this.bd.value=null;
this.aod()};hF.prototype.aod=function(){var x=this.a38;if(x.length==0||this.Bn)return;this.Bn=!0;var Q=x.shift();
Q[0].readAsArrayBuffer(Q[1])};hF.prototype.a5v=function(x,Q,c){this.MF("Saving ...");this.n$=Q;setTimeout(c.bind({yn:x,caller:this}),50)};
hF.sy=function(x){var Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=new Uint8Array(x),$=c.length,z=$%3,j=$-z,U=[],i=0,b=0,e=0;
for(var F=0;F<j;F+=3){i=c[F];b=c[F+1];e=c[F+2];U.push(Q[i>>2]+Q[(i&3)<<4|b>>4]+Q[(b&15)<<2|e>>6]+Q[e&63])}if(z==1){i=c[j];
U.push(Q[i>>2]+Q[(i&3)<<4]+"==")}if(z==2){i=c[j];b=c[j+1];U.push(Q[i>>2]+Q[(i&3)<<4|b>>4]+Q[(b&15)<<2]+"=")}var k=U.join("");
return k};hF.ant=function(x,Q){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$=new Uint8Array(64),i=0,b=0,e=0,K=0;
for(var F=0;F<64;F++)$[F]=c.charCodeAt(F);var z=new Uint8Array(x),j=Q%3,U=Q-j,k=new Uint8Array(Math.floor(Q/3)*4+(j==0?0:4));
for(var F=0;F<U;F+=3){i=z[F];b=z[F+1];e=z[F+2];k[K]=$[i>>>2];k[K+1]=$[(i&3)<<4|b>>>4];k[K+2]=$[(b&15)<<2|e>>>6];
k[K+3]=$[e&63];K+=4}if(j==1){i=z[U];k[K]=$[i>>2];k[K+1]=$[(i&3)<<4];k[K+2]=61;k[K+3]=61}if(j==2){i=z[U];
b=z[U+1];k[K]=$[i>>2];k[K+1]=$[(i&3)<<4|b>>4];k[K+2]=$[(b&15)<<2];k[K+3]=61}return k};hF.prototype.auL=function(x){var Q,c=x.target.Qr;
if(x.target instanceof XMLHttpRequest)Q=x.target.response;else Q=x.target.result;hF.nn(c,Q,this,x.target.a67);
this.DA();if(x.target instanceof XMLHttpRequest){this.Ug=!1;this.amC()}else{this.Bn=!1;this.aod()}};
hF.a9k=function(x,Q){var c=new XMLHttpRequest;c.open("POST","https://api.imgur.com/3/image",!0);c.qF=Q;
c.setRequestHeader("Authorization","Client-ID 3ad80d2d9969219");c.setRequestHeader("Content-type","application/x-www-form-urlencoded");
c.setRequestHeader("Accept","application/json");c.addEventListener("load",hF.ahz);c.send("type=base64&image="+encodeURIComponent(hF.sy(x)));
alert("Saving to Imgur ...",4e3)};hF.ahz=function(x){var Q=JSON.parse(x.target.response);if(Q.success){if(x.target.qF)x.target.qF(Q.data.link);
else window.open(Q.data.link,"Imgur")}};hF.prototype.kn=function(x,Q,c){this.MF();var $=new XMLHttpRequest;
$.responseType="arraybuffer";$.open("GET","templates/file/"+(c?"pp-resources":"psdshared")+"/"+x);
$.onload=this.a3n.bind(this);$.send();$.OI=[Date.now(),x,Q?x:null,c]};hF.prototype.a3n=function(x){var Q=x.target.OI,c=new Uint8Array(x.target.response);
console.log(c.length+" B,",Date.now()-Q[0]+" ms");for(var F=0;F<c.length;F++)c[F]=255-c[F];c=pako.inflateRaw(c);
var $=JSON.parse(w.IV(c,0,2e3));hF.nn({name:$.name,lO:Q[2]},c.slice(2e3).buffer,this);this.DA();if(!Q[3])hF.pd("act=0&id="+Q[1])};
hF.prototype.agc=function(x,Q,c,$){if(!(x instanceof ArrayBuffer))throw"e";x=new Uint8Array(x);var z=new Uint8Array(x.length+2e3),g="";
for(var F=0;F<2e3;F++)z[F]=32;w.A9(JSON.stringify({name:Q}),z,0);z.set(x,2e3);x=z;x=pako.deflateRaw(x);
for(var F=0;F<x.length;F++)x[F]=255-x[F];x=x.buffer;var j=x.byteLength,U=cI.dc(j),i=~~(609e5/2),b=~~(209e5/2);
if(j>i){confirm("Your file is "+U+". Our limit is "+cI.dc(i)+". Delete some layers and try again.");
return}if(j>b){var e=confirm("Your file is quite large ("+U+"). Opening it will take a lot of time. Do you still want to proceed?");
if(!e)return}var k=sha1(x),K=[];for(var F=0;F<20;F++){var R=parseInt(k.slice(F*2,F*2+2),16);K.push(R);
g+=String.fromCharCode(R)}var T=btoa(g).replace(/\+/g,"-").replace(/\//g,"_").slice(0,8);if(hF.a0v(T,$)){console.log("file already exists");
if(c)c(T);else window.open("https://www.photopea.com#i"+T+".psd");return}this.MF("Publishing ...");var D=new XMLHttpRequest;
D.OI=[x,k,T,c,$];D.open("GET","/papi/img/publish.php?rnd="+Math.random()+"&id="+T+"&size="+j+"&bname="+$);
D.onload=this.a2t.bind(this);D.send()};hF.a0v=function(x,Q){try{var c=new XMLHttpRequest;c.open("HEAD","templates/file/"+Q+"/"+x,!1);
c.send();if(c.status==200)return!0}catch(dQ){return!1}return!1};hF.prototype.a2t=function(x){console.log(x.target.response);
var Q=JSON.parse(x.target.response),c=x.target.OI,$=new XMLHttpRequest;$.open("POST",Q.uploadUrl);$.setRequestHeader("Authorization",Q.authorizationToken);
$.setRequestHeader("X-Bz-File-Name",c[2]);$.setRequestHeader("Content-Type","b2/x-auto");$.setRequestHeader("X-Bz-Content-Sha1",c[1]);
$.send(new Blob([c[0]]));$.onload=this.av8.bind({iZ:this,OI:c})};hF.prototype.av8=function(x){this.iZ.DA("Publishing ...");
if(this.OI[3])this.OI[3](this.OI[2]);else window.open("https://www.photopea.com#i"+this.OI[2]+".psd");
if(this.OI[4]=="psdshared")hF.pd("act=2&id="+this.OI[2]+"&fileId="+JSON.parse(x.target.response).fileId)};
hF.pd=function(x){var Q=new XMLHttpRequest;Q.open("GET","/papi/img/update.php?"+x+"&rnd="+Math.random());
Q.send()};hF.save=function(x,Q){var c=new Uint8Array(x),$=document.createElement("a");if(typeof $.download=="string"){var z=new Blob([c]),j=window.URL.createObjectURL(z);
$.href=j;$.download=Q;document.body.appendChild($);$.click();document.body.removeChild($)}else{var U="data:application/octet-stream;base64,"+hF.sy(x);
window.open(U)}};function ij(){this.size=16;this.data=d.R(16)}ij.prototype.qN=function(x,Q){if(x+Q<=this.size)return;
var c=this.size;while(x+Q>this.size)this.size*=2;var $=d.R(this.size);for(var F=0;F<c;F++)$[F]=this.data[F];
this.data=$};var d9={};d9.Pt=function(x,Q,c,$){var z=Q.split(":"),j=z[0];if(z.length==2){if(j=="jpg")$=[Math.round(100*parseFloat(z[1]))];
if(j=="webp")$=[Math.round(100*parseFloat(z[1])),100,0,!1,!1];if(j=="psd")$=[!0,!0,!1,!1,!1];if(j=="svg")$=z[1].split(",").map(function(i){return i=="true"})}var U=ar.jd(x,j.toUpperCase(),null,null,$,c);
return U};d9.aiV=function(x,Q,c){var $=x.VY(),z=Q[0];return d9.Pt(x,z,c)};d9.ayr=function(){var x=this.yn,Q=this.caller,c=x._g.ux,$=c.formats,z,j;
x.VY();var U=Date.now();if(c.version==1){var i=[],b=0,k=0;for(var F=0;F<$.length;F++){var e=d9.Pt(x,$[F],Q.n$);
i.push(e);b+=e.byteLength}z=new Uint8Array(2e3+b);var K="{ \"source\": "+JSON.stringify(x.No)+", \"versions\": [\n";
for(var F=0;F<$.length;F++){var g=new Uint8Array(i[F]);K+="\t{\"format\": \""+$[F].split(":")[0]+"\", \"start\": "+k+", \"size\": "+g.length+" }"+(F+1<$.length?", ":"")+"\n";
z.set(g,2e3+k);k+=i[F].byteLength}K+="] }";var R=w.A9(K,z,0);for(var F=R;F<2e3;F++)z[F]=32;j="application/octet-stream"}else{var T=new ij,D=0,a="",_=encodeURIComponent;
a="p="+_("{ \"source\": "+JSON.stringify(x.No)+", \"versions\": [");w.RP(T,D,a);D+=a.length;for(var F=0;
F<$.length;F++){a=_(" {\"format\": \""+$[F].split(":")[0]+"\", \"data\": \"");w.RP(T,D,a);D+=a.length;
var e=d9.Pt(x,$[F],Q.n$),I=hF.ant(e,e.byteLength),R=I.length;T.qN(D,R);for(var f=0;f<R;f++){T.qN(D,3);
var y=I[f];if(y==43){T.data[D]=37;T.data[D+1]=50;T.data[D+2]=66;D+=3}else if(y==47){T.data[D]=37;T.data[D+1]=50;
T.data[D+2]=70;D+=3}else if(y==61){T.data[D]=37;T.data[D+1]=51;T.data[D+2]=68;D+=3}else{T.data[D]=y;
D++}}a=_("\" }"+(F+1<$.length?", ":""));w.RP(T,D,a);D+=a.length}a=_("] }");w.RP(T,D,a);D+=a.length;z=T.data.slice(0,D);
j="application/x-www-form-urlencoded"}var Z=new XMLHttpRequest;Z.open("POST",c.url,!0);if(j)Z.setRequestHeader("Content-Type",j);
Z.addEventListener("load",d9.aDs.bind(this));Z.send(new Blob([z.buffer]))};d9.aDs=function(x){this.caller.DA("Saving ...");
var Q=x.target.response;if(Q.charAt(0)=="{"){Q=JSON.parse(Q);if(Q.newSource)this.yn.No=Q.newSource;if(Q.message)alert(Q.message,2e3);
if(Q.script){var c=new jO(u.E.M,!0);c.data={d:u.H.kv,rq:Q.script};this.caller.T(c)}}else alert("Saved. Response: "+Q,1500)};
d9.ayx=function(x){var Q=x.Hn,c=Q[1].split(".").pop(),$=d9.Pt(x,c,null,c=="psd"&&Q[0]==1?[!0,!1,!0,!1]:null),z=Storage.Ph(Q[0]);
return z.ak8(Q[1],$)};d9.ard=function(x,Q){var c=x.uA.Kf;if(Q==null)Q=d9.Pt(x,c);iN.eM(function(){var $=new XMLHttpRequest,z="https://www.googleapis.com/upload/drive/v3/files/"+x.uA.file.id+"?uploadType=media"+"&"+iN.eU();
$.open("PATCH",z,!0);$.addEventListener("load",function(j){var U=JSON.parse(j.target.response);alert(U.name+" updated")});
$.send(Q);alert("Saving \""+x.uA.file.name+"\" to Google Drive ...")})};d9.nn=function(x,Q,c,$){if(window.location.href.indexOf("photopea.com")==-1||window.top!=window.self)d9.ad6(x,Q,c,$);
else{try{d9.ad6(x,Q,c,$)}catch(dQ){if(dQ=="low_ram"){}else{var z="Error. Please, send your file to support@photopea.com and we will solve it.";
if(ar.HB(Q)=="eps")z="We support only basic EPS files. Convert your file into PDF (with an online converter) and open the PDF in Photopea.";
alert(z,1e4)}}}};d9.ad6=function(x,Q,c,$){var z;if(x.name){var j=x.name.lastIndexOf(".");z=j==-1?x.name:x.name.slice(0,j)}else{if(x.url.substring(0,5)=="data:"||x.url.indexOf("googleapis")!=-1)z="image";
else z=x.url.substring(x.url.lastIndexOf("/")+1).split(".")[0];z=z.slice(0,50)}var U=x.name?x.name:x.url,i=new Uint8Array(Q),b=ar.HB(Q),e=window.gtag;
if(Math.random()<.25&&e&&b!=null&&ar.pz(b))e("event",b,{event_category:"Formats"});if(b==null)b=w.mt(i,0,4);
if(U&&U.toLowerCase().endsWith(".raw")&&b!="tiff"){var k=new jO(u.E.M,!0);k.data={d:u.H.LL,AD:"importraw",Xp:Q,uo:U.split("/").pop()};
c.T(k);return}else if(b=="json"){var K="";for(var F=0;F<i.length;F++)K+=String.fromCharCode(i[F]);K=decodeURIComponent(escape(K));
var g=JSON.parse(K);if(g.name&&g.url){var k=new jO(u.E.M,!0);k.data={d:u.H.a5K,b:g};c.T(k)}else{alert("Unknown JSON file opened. See the content in the console.",5e3);
console.log(g)}return}if(b=="html"){var K=w.IV(i,0,i.length),R=new DOMParser,T=R.parseFromString(K,"text/html"),D=T.getElementsByTagName("meta");
for(var F=0;F<D.length;F++){var a=D[F],_=a.getAttribute("property"),I=a.getAttribute("content"),f=null;
if(_=="og:image")f=I;if(_==null&&I&&I.startsWith("0;url=/imgres?")){var y=I.slice(14).split("&");for(var Z=0;
Z<y.length;Z++)if(y[Z].startsWith("imgurl"))f=decodeURIComponent(y[Z].slice(7))}if(f==null)continue;
var k=new jO(u.E.M,!0);k.data={d:u.H.a0,hF:{url:f,l_:!0,Dw:x.Dw}};c.T(k)}return}if(ar.pz(b)){var v,G,q=ar.pz(b);
if(x.Dw!=null&&"jpg png gif pdf svg ai psd".split(" ").indexOf(b)!=-1){var k=new jO(u.E.M,!0);if(0<=x.Dw)k.data={d:u.H.Wk,target:x.Dw,fU:x.SS,Ta:Q,yU:z};
else{k=new jO(u.E.v,!0);k.data={d:eM.aY,data:new Uint8Array(Q),uo:z+"."+b};k.f=X.Mf}c.T(k);return}var h=[z,q,b,x,c,$,Q];
if(q.f6){var r=i9==0?"psd":"ai";v=new hf(z+(b==r?"":"-"+b)+"."+r);q.fk(Q,v,d9.ij,h)}else{G=q.fk(Q,null,d9.ij,h,c)}if(q.rH!=!0)d9.ij(v,G,h);
else c.MF();return}var H=new jO(u.E.M,!0);H.data={d:u.H.Ol,Xp:Q,if:x.name};var o=x instanceof File&&x.yE!=!0,k=new jO(u.E.M,!0);
k.data={d:u.H.hW,_g:"add",hF:null,jn:null,aet:x.yE};if(b=="zip"){var P=Date.now(),O=UZIP.parse(Q),p="xml rels plist iwa db ds_store txt rtf".split(" ");
for(var C in O){var W=!1;for(var F=0;F<p.length;F++)if(C.toLowerCase().endsWith("."+p[F]))W=!0;if(C.startsWith("__MACOSX/")||O[C].length==0)W=!0;
if(W)continue;var J=C.split("/").pop();d9.nn({name:J},O[C].buffer,c,$)}}else if(b=="jsx"||U&&U.toLowerCase().endsWith(".jsx")){if(o)c.T(H);
var K=w.IV(new Uint8Array(Q));k.data={d:u.H.kv,rq:K};c.T(k)}else if(b=="otf"){if(o)c.T(H);var t=Typr.parse(Q);
k.data.hF=ke.Be;for(var F=0;F<t.length;F++){k.data.jn=t[F];c.T(k)}}else if(b=="asl"){if(o)c.T(H);var t=kb.s5(Q,U);
k.data.hF=ke.qL;k.data.jn=t.RI;c.T(k);k.data.hF=ke.ZO;k.data.jn=t.DL;c.T(k)}else if(b=="tpl"){if(o)c.T(H);
var t=k6.s5(Q);k.data.hF=ke.gN;k.data.jn={Dq:t.Dq,Rk:t.Rk,list:[]};c.T(k);if(t.a8L.length!=0){k.data.hF=ke.fB;
k.data.jn=t.a8L;c.T(k)}if(t.DL.length!=0){k.data.hF=ke.ZO;k.data.jn=t.DL;c.T(k)}k.data.hF=ke.Uf;k.data.jn=t.list;
c.T(k)}else{var Y="";for(var l in ke.dO)if(ke.dO[l][0]==b)Y=l;if(Y!=""){if(o)c.T(H);k.data.jn=ke.dO[Y][2].s5(Q,U);
k.data.hF=Y;c.T(k)}else if(Q.byteLength==0)alert("Empty file (0 Bytes)");else alert("Unknown file format: "+JSON.stringify(b))}};
d9.ij=function(x,Q,c){var $=c[0],z=c[1],j=c[2],U=c[3],i=c[4],b=c[5],e=c[6];if(z.rH)i.DA();if(!z.f6){if(Q.length==0)return;
if(Q[0].t33421||Q[0].t50706){d.raw.normalize(Q[0],e);console.log(Q[0]);var k=new jO(u.E.M,!0);k.data={d:u.H.LL,AD:"rawpea",QK:Q[0]};
i.T(k);return}if(b){b(new Uint8Array(Q[0].data),Q[0].K$);return}x=ar.$E($,Q)}x.lO=U.lO;x.ml=j;x._g=U._g;
x.No=U.url;x.QJ=U.QJ;x.uA=U.uA;x.ph=U.ph;x.Hn=U.Hn;if(x.uA)x.uA.Kf=j;if(x.B.length!=0){var k=new jO(u.E.M,!0);
k.data={d:U.Dw==null?u.H.th:u.H.Wk,target:U.Dw,fU:U.SS,Ta:x};i.T(k)}};function hr(x){kw.call(this);this.vn=hr.vn++;
this.K0=x;this.a7K=this.adV.bind(this);this.ah5=this.a2r.bind(this);this.ag6=this.g1.bind(this);this.atU=this.a1H.bind(this);
this.ayY=this.a0F.bind(this);this.aum=this.a2l.bind(this);this.JW=0;this.awL=0;this.aAx=0;this.n=E.p("div","panelblock");
this.d1=E.p("div","block");this.S4=E.p("div","collapsed");this.n.appendChild(this.d1);this.dS=-1;this.ps=!0;
this.jX=E.p("div","panelhead");this.d1.appendChild(this.jX);this.lT(this.jX);this.H7=new j7("\u2261");
this.H7.n.setAttribute("style","position:absolute; right:4px;");this.H7.k("click",this.asW,this);this.VL=E.p("div","body");
this.d1.appendChild(this.VL);this.cN=[];this.VS=null;this.dD=null}hr.vn=0;hr.prototype=new kw;hr.G8=26.1;
hr.prototype.asW=function(x){var Q=this.cN[this.dS].t5(),c=x.currentTarget.n.getBoundingClientRect();
Q._();Q.update();Q.parent=this;var $=new jO(u.E.M,!0);$.data={d:u.H.A_,G7:Q,x:c.left,y:c.top+c.height+2};
this.T($)};hr.prototype.lS=function(x){var Q=this.d1,c=this.jX,$=this.VL;if(E.rm(c))Q.removeChild(c);
if(E.rm($))Q.removeChild($);if(x==0)Q.appendChild(c);Q.appendChild($);this.aAx=x};hr.ce=function(x){x.stopPropagation();
x.preventDefault()};hr.prototype.adV=function(x){var Q=x.dataTransfer.types;if(Q[1]!=null&&Q[1]!=this.vn+"")return;
hr.ce(x);var jF=x.currentTarget;if(x.target==jF)E.ZW(jF,"highlight")};hr.prototype.a2r=function(x){hr.ce(x);
var jF=x.currentTarget;if(x.target==jF)E.WP(jF,"highlight")};hr.prototype.lT=function(x){x.addEventListener("dragenter",this.a7K,!1);
x.addEventListener("dragleave",this.ah5,!1);x.addEventListener("dragover",hr.ce,!1);x.addEventListener("drop",this.ag6,!1);
x.addEventListener("dragstart",function(Q){Q.dataTransfer.setData("Text","--panel");Q.dataTransfer.setData(this.vn+"","")}.bind(this),!1)};
hr.prototype.g1=function(x){this.ah5(x);var Q=null,jF=x.currentTarget,c=this.azf(jF);if(jF==this.VL&&this.dS!=-1)Q=this.dS;
else if(jF==this.jX)Q=null;else if(c!=-1)Q=c;var $=x.dataTransfer.getData("Text");if($==""||$.startsWith("http"))E.NN(x,this,Q);
else if($=="--panel"){var z=E.GK(x,jF),j=this.cN,U=j.slice(0),F=this.dS,i=c==-1?j.length:z.x<jF.getBoundingClientRect().width/2?c:c+1;
if(F==i||F+1==i||jF==this.VL)return;var b=F<i?i-1:i,e=j[F];j.splice(F,1);j.splice(b,0,e);E.Os(this.jX);
for(var k=0;k<j.length;k++)this.jX.appendChild(j[k].SQ);this.Bs(b);var K=[];for(var F=0;F<j.length;F++)K[F]=U.indexOf(j[F]);
var g=new jO("shuffleItems",!1);g.data={a2d:K};this.T(g)}else if(Q!=null&&this instanceof jm){var g=new jO(u.E.M,!0);
g.data={d:u.H.aDx,akz:Q};this.T(g)}};hr.prototype.zL=function(){return null};hr.prototype.aAX=function(){if(this.zL()){this.jX.style.padding="0px";
this.dD=this.zL();this.VL.appendChild(this.dD);this.vp.vz(!1);var x=new jO(u.E.M,!0);x.data={d:u.H.P2,b:1};
this.T(x)}};hr.prototype.ab8=function(){if(this.dD){this.jX.style.padding="";this.VL.removeChild(this.dD);
this.dD=null;this.vp.vz(!0);var x=new jO(u.E.M,!0);x.data={d:u.H.P2,b:0};this.T(x)}};hr.prototype.azf=function(x){var Q=this.cN;
for(var F=0;F<Q.length;F++)if(Q[F].SQ==x)return F;return-1};hr.prototype.Ge=function(){for(var F=0;F<this.cN.length;
F++)this.cN[F].Yn.xE()};hr.prototype.aE=function(){return this.dS};hr.prototype.eY=function(){if(this.ps)return;
this.ps=!0;this.n.removeChild(this.S4);this.n.appendChild(this.d1)};hr.prototype.collapse=function(){if(!this.ps)return;
this.ps=!1;this.n.appendChild(this.S4);this.n.removeChild(this.d1)};hr.prototype.G8=function(){var x=0;
if(this.aAx==0){x=this.jX.getBoundingClientRect().height+1;x=Math.max(x,hr.G8)}return x};hr.prototype.ayM=function(){return this.G8()+this.VL.getBoundingClientRect().height};
hr.prototype.oN=function(x,Q){this.jX.style.maxWidth=x+"px";var c=this.G8();if(this.dS!=-1)this.cN[this.dS].oN(x,Q-c);
return Q-c};hr.prototype.Fy=function(x,Q){if(this.dS!=-1)this.cN[this.dS].Fy(x,Q)};hr.prototype.BM=function(x,Q,c){this.cN[this.dS].BM(x,Q,c)};
hr.prototype.Zy=function(x){this.ab8();if(this.cN.indexOf(x)!=-1){this.Bs(this.cN.indexOf(x));return}x.parent=this;
this.cN.push(x);this.jX.appendChild(x.SQ);x.SQ.addEventListener("mouseover",this.atU,!1);this.lT(x.SQ);
this.S4.appendChild(x.Yn.n);x.Yn.k("click",this.a5Q,this);x.k("select",this.a7h,this);x.k(u.E.ZY,this.aeH,this);
this.Bs(this.cN.length-1)};hr.prototype.a1H=function(x){if(x.buttons==0)return;var Q=x.currentTarget,c=Q,F=0;
while((c=c.previousSibling)!=null)F++;this.awL=F;Q.addEventListener("mouseout",this.ayY,!1);this.JW=setTimeout(this.aum,700)};
hr.prototype.a0F=function(x){var Q=x.currentTarget,c=Q,F=0;while((c=c.previousSibling)!=null)F++;Q.removeEventListener("mouseout",this.ayY);
clearTimeout(this.JW)};hr.prototype.a2l=function(x){this.T(new jO(u.E.a2U,!1))};hr.prototype.aeU=function(x){return this.awL};
hr.prototype.Ej=function(F){var x=new jO(u.E.ZY,!1);x.data={Dt:F};this.T(x);var Q=this.cN[F];this.cN.splice(F,1);
this.jX.removeChild(Q.SQ);this.S4.removeChild(Q.Yn.n);Q.SQ.className="";Q.Yn.removeEventListener("click",this.a5Q,this);
Q.Yn.xE();Q.removeEventListener("activate",this.a7h);Q.removeEventListener(u.E.ZY,this.aeH);var c=this.dS;
if(F<c)c--;else if(F==c&&F==this.cN.length)c--;this.Bs(c);if(this.cN.length==0)this.aAX()};hr.prototype.af5=function(){return this.cN.length};
hr.prototype.TB=function(){if(this.cN.length!=0)this.cN[this.dS].TB()};hr.prototype.Bs=function(x,Q){if(Q==null)Q=!0;
for(var F=0;F<this.cN.length;F++)this.cN[F].SQ.className="";if(this.VS)this.VL.removeChild(this.VS);
this.VS=null;this.dS=x;if(x==-1)return;var c=this.cN[this.dS];this.VS=c.UN;this.VL.appendChild(c.UN);
c.SQ.className="active";if(!this.ps){this.T(new jO("showFloat"));this.cN[x].Yn.Lm()}if(Q)this.T(new jO(u.E.t,!1));
c.Yr();var $=this.H7.n;if($.parentNode)this.jX.removeChild($);if(c.t5())this.jX.appendChild($);var z=new jO(u.E.M,!0);
z.data={d:u.H.B1};this.T(z)};hr.prototype.a7h=function(x){if(this.K0&&!this.K0.aqn())return;var F=this.cN.indexOf(x.currentTarget);
this.Bs(F)};hr.prototype.aeH=function(x){if(this.K0&&!this.K0.aqn())return;var F=this.cN.indexOf(x.currentTarget);
this.Ej(F)};hr.prototype.a5Q=function(x){var Q=this.cN.indexOf(x.currentTarget.parent);if(this.cN[Q].Yn.V$())this.T(new jO("hideFloat"));
else this.Bs(Q)};hr.prototype.amL=function(x){this.T(x)};function jm(x){hr.call(this,x);this.ww=0;this.R0=0;
E.AU(this.jX,this.aiH.bind(this));this.Xl=0;this.a1c=this.aqz.bind(this);this.lT(this.VL);this.N1=["default;"];
this.vp=new E.MZ(this.VL);this.dv=new j9(!0);this.dv.parent=this;this.yR=this.dv.n;j9.Mh(this.dv)}jm.prototype=new hr;
jm.prototype.aiH=function(x){if(x.target!=this.jX)return;var Q=this.Xl;this.Xl=Date.now();if(Date.now()-Q>300)return;
var c=new jO(u.E.M,!0);c.data={d:u.H.LL,AD:"newproject"};this.T(c)};jm.prototype.vM=function(x,Q){if(Q)this.N1.push(x);
else{var c=this.N1.length-1;if(this.N1[c]==x)return;this.N1[c]=x}this.M2()};jm.prototype.a2N=function(){this.N1.pop();
this.M2()};jm.prototype.M2=function(){var x=this.N1[this.N1.length-1];this.vp.BM(x,this.OV)};jm.prototype.Fy=function(x,Q){hr.prototype.Fy.call(this,x,Q);
this.dv.Fy(x,Q);if(!x.Lk){}};jm.prototype._=function(){hr.prototype._.call(this);this.dv._()};jm.prototype.BM=function(x,Q){for(var F=0;
F<Q.length;F++){var c=Q[F];this.cN[F].ki(c.name+(c.tl()?" *":""))}hr.prototype.BM.call(this,x,Q)};jm.prototype.zL=function(){return this.yR};
jm.prototype.oN=function(x,Q){if(this.cN.length==0)Q+=hr.G8-1;this.ww=x;this.R0=Q;Q=hr.prototype.oN.call(this,x,Q);
this.OV="height:"+Q+"px; width:"+x+"px; overflow:hidden; position:relative;";this.M2();this.dv.oN(x,Q)};
jm.prototype.Zy=function(x){hr.prototype.Zy.call(this,x);x.SQ.addEventListener("click",this.a1c,!1)};
jm.prototype.Ej=function(F){var x=this.cN[F];E.Wr(x.SQ,this.a1c);hr.prototype.Ej.call(this,F)};jm.prototype.aqz=function(x){var Q=this.Xl;
this.Xl=Date.now();if(Date.now()-Q>300)return;var c=this.azf(x.currentTarget),$=this.cN[c].Ta.name,z=new jO(u.E.M,!0),j={K:u.E.v,f:X.Mf,C:{d:eM.iz}};
z.data={d:u.H.LL,AD:"namewindow",ZR:$.slice(0,$.length-4),r5:j};this.T(z)};function gg(x){kw.call(this);
if(x)return;bN.a3P(1);this.n=E.p("div","flexrow app");this.cz=E.p("div");this.n.appendChild(this.cz);
setTimeout(function(){var c=window.hideCap;if(c)c()},25e3);this.zs=new fM;window.addEventListener("blur",function(c){this.zs.reset()}.bind(this),!1);
window.addEventListener("resize",this.QM.bind(this),!1);var Q=this.cz;this.ap=new b3;this.ap.parent=this;
Q.appendChild(this.ap.n);this.Md=new cN;this.Md.parent=this;Q.appendChild(this.Md.n);this.Ly=new kB(!0);
this.Ly.parent=this;Q.appendChild(this.Ly.n);this.k(u.E.M,this.Eh,this);this.LE=this.xF.bind(this);window.requestAnimationFrame(this.LE)}gg.prototype=new kw;
gg.prototype.xF=function(x){this.X0();window.requestAnimationFrame(this.LE)};gg.prototype._=function(){};
gg.prototype.QM=function(x){var Q=window.innerWidth,c=window.innerHeight;this.oN(Q,c)};gg.prototype.oN=function(x,Q){this.Md.oN(x,Q);
this.ap.oN(x,Q)};gg.prototype.Eh=function(x){var Q=x.data.d;if(Q==u.H.A_)this.Md.axL(x.data);if(Q==u.H.s$)this.Md.amD(x.data);
if(Q==u.H.Tb)this.Md.a6d(x.data.xx);if(Q==u.H.MM)this.Md.az7(x.data.xx);if(Q==u.H.ih)this.Md.fC()};function dh(){gg.call(this);
this.IQ={x:0,y:0,TZ:!1};this.a9=!1;this.l6=!1;this.Fl=null;this.aBo=0;this.ab2=!1;this.V9=0;window.onmessage=function(k){if(Storage.aqp(k.source))return;
if(k.data instanceof ArrayBuffer){var K=ar.HB(k.data),g=ar.pz(K);hF.nn({url:"file"},k.data,this);if(g==null)this.GB()}else if(k.data instanceof Object||k.data.startsWith("{")||k.data.startsWith("amp-")||k.data.startsWith("0=goog")||k.data.startsWith("3PCoo")||k.data.startsWith("ima://")){}else if(k.data.startsWith("--ur ")){var R=k.data.split(" ").pop(),f=null;
R=R.length==0?[]:R.split(",");console.log(R);var T=this.Pf.jn,D=new jO(u.E.M,!0);D.data={d:u.H.hW,hF:ke.mz,j7:R};
this.T(D);var a=R,_=T;if(_.length>a.length){var I=_;_=a;a=I}for(var F=0;F<a.length;F++)if(_.indexOf(a[F])==-1)f=a[F];
hF.pd("act=3&id="+f+"&dif="+(a==R?1:-1));alert((a==R?"Resource added.":"Resource removed.")+" "+f)}else if(k.data.startsWith("--ot ")){if(this.ap.sl())this.ap.sl().close();
this.cE.kn(k.data.split(" ").pop(),!0)}else if(k.data.startsWith("--et ")){}else{var D=new jO(u.E.M,!0);
D.data={d:u.H.kv,rq:k.data};this.T(D);this.GB()}}.bind(this);window.onbeforeunload=function(k){this.abx();
for(var F=0;F<this.H0.length;F++)if(this.H0[F].tl())return this.H0[F].name}.bind(this);window.setInterval(this.avJ.bind(this),5*60*1e3);
var x=this;if(window.indexedDB&&(!e_.s8()||document.hasStorageAccess==null)){var Q={qN:window.indexedDB.open("pp",1)};
Q.qN.onupgradeneeded=function(k){var K=k.target.result,g=K.createObjectStore("rsrc",{keyPath:"k"})};
Q.qN.onsuccess=function(k){var K=x.Pf.dE.g4=k.target.result,g=K.transaction(["rsrc"],"readwrite").objectStore("rsrc"),R=g.get("fs0");
R.onsuccess=function(k){if(k.target.result){var a=x.Pf.dE.rG=k.target.result.fset;for(var _ in a){if(!_.endsWith(".jsx")&&!_.endsWith(".psd"))hF.nn({url:_,yE:!0},a[_],x)}}};
var T=new BroadcastChannel("pp-tabs"),D=[];T.onmessage=function(k){if(k.data=="id")T.postMessage(x.Pf.dE.id);
else D.push(k.data)};T.postMessage("id");setTimeout(function(){var g=K.transaction(["rsrc"],"readwrite").objectStore("rsrc"),a=g.getAllKeys();
a.onsuccess=function(){var _=a.result,I=[],f=0;for(var F=0;F<_.length;F++){if(_[F]=="fs0")continue;if(D.indexOf(_[F])!=-1)continue;
I.push(_[F])}for(var F=0;F<I.length;F++){var R=g.get(I[F]);R.onsuccess=function(k){if(k.target.result){var y=k.target.result.fset;
for(var Z in y){try{hF.nn({url:Z,yE:!0},y[Z],x);var v=x.TW();v.V7=v.fF=-1}catch(k){console.log(k)}}f++;
if(f==I.length)for(var F=0;F<I.length;F++){var R=g.delete(I[F])}}}}}},200)}}var c=["rwx~#.-(;.]6EF","rx'|#1,6><@87f?NO","\"|'/-&(0><BBDEEMGrVPb"],$=E.SK[jk.GO][jk.pV];
for(var F=0;F<c.length;F++){var z=E.MB(c[F]);if($.indexOf(z)!=-1){var j=E.SK[jk.GO][jk.VL],U=E.MB("M|H:15=3/iQ6EEKQ{\\PTbV/Y[`kjxx\"}vOz( %0b1=?HcMFZH zy#Wby9Sti'~uu3{}&428H-Cm7Ji{X[^w=Xbjhldc3kz{MC K[");
E.Os(j);j[jk.asK]=U;return}}this.s=dh.a6D();this.Pf={s:this.s,agI:!1,Oj:null,y3:0,bX:{Rk:[],Dq:[],list:[],eT:null},R_:[],a6a:[],Op:[],fc:[],jF:[],Yf:[],awl:[],aD2:[],jF:[],jS:[dJ.$H()],Xe:[],Q$:[],dR:null,cb:0,xV:aF.xV.$H(),gd:{bf:1,WB:JSON.parse(JSON.stringify(aF.Y3[0]))},T6:aF.XM.$H(),O1:[null].concat(aF.Y3),D5:[null].concat(aF.Y3),Dn:new hX(function(k){var K=new jO(u.E.M,!0);
K.data={d:u.H.a0,hF:{url:"rsrc/fonts/"+k}};this.T(K)}.bind(this)),_M:{_t:[],VA:null,SW:null},font:null,M0:[],jn:[],arf:{},Gj:0,QI:16777215,w6:!1,Ub:!0,Zo:{Bo:!0,bI:!1,mR:!0,iL:!0,l$:!0,p9:!0,ZD:20,PK:0,ut:0,IM:0,WO:8421504,$y:65535},yC:!0,Cs:[!0,!0,!1,!0,!0],o9:[0,1,2,3,5,6,7,9,10,16,17,100],b4:1,Cg:!0,XG:{},Lk:!0,aan:!1,compact:!1,Fn:1,Yg:0,yR:!0,t0:null,dE:{id:"ts"+Math.round(Math.random()*16777215),ahk:!1,atX:!1,rG:{},vX:{},g4:null},a62:0,a17:null,sn:null,adD:null,XY:null};
hX.xu.bN(this);this.arX={W4:new gh,h1:new bC};this.Pf._M=dU.anw();this.Ok=new hV;this.gf=new eL;this.D7=new ea(this.s,!0);
this.at=new kh;this.LA=new jm(this);this.w0=E.p("div");this.Gf=!1;this.f_=this.a6m.bind(this);E.ZW(this.LA.n,"mainblock");
this.Ly.parent=this.Ok.parent=this.gf.parent=this.D7.parent=this.at.parent=this.LA.parent=this;this.LA.k(u.E.t,this.KK,this);
this.LA.k(u.E.ZY,this.aaf,this);this.LA.k("shuffleItems",this.awm,this);this.LA.k(u.E.a2U,this.a9_,this);
this.k("mouse",this.adG,this);this.k(u.E.v,this.To,this);this.k(u.E.G2,this.aCz,this);document.body.addEventListener("keydown",this.eS.bind(this),!1);
window.addEventListener("keyup",this.pD.bind(this),!1);window.addEventListener("paste",this.a7$.bind(this),!1);
window.addEventListener("copy",this.a4r.bind(this),!1);window.addEventListener("wheel",function(k){if(k.ctrlKey)k.preventDefault()},{passive:!1});
window.addEventListener("beforeinstallprompt",function(k){if(window.innerWidth>400)k.preventDefault();
this.Pf.t0=k}.bind(this));if(window.location.href.indexOf("photopea.com")!=-1&&"serviceWorker"in navigator){navigator.serviceWorker.register("sw.js",{scope:"./"}).then(function(k){if(k.a1D){console.log("Service worker installing")}else if(k.afl){console.log("Service worker installed")}else if(k.active){console.log("Service worker active")}}).catch(function(k){console.log("Registration failed with "+k)})}this.pH=0;
this.H0=[];this.cE=new hF(d9.nn);this.cE.parent=this;var i=this.cz,b=this.Vw=E.p("div");b.appendChild(this.Ok.n);
b.appendChild(this.gf.n);this.Ly.aoX(b);var e=this.a4g=E.p("div","flexrow");i.appendChild(e);e.appendChild(this.D7.n);
e.appendChild(this.LA.n);e.appendChild(this.at.n);this.cE.fQ({url:"rsrc/basic/basic.zip"});this.jM(X.kU);
dQ.bN(this.ac9.bind(this))}dh.prototype=new gg(!0);dh.prototype.GB=function(x){var Q=new jO(u.E.M);Q.data={d:u.H.xy,hF:x?x:"done"};
this.T(Q)};dh.prototype.avJ=function(){var x=this.Pf.dE,c=!1;if(x.g4==null)return;var Q=this.H0;for(var F=0;
F<Q.length;F++){var $=Q[F];if($.fF!=$.FS){var z=Date.now(),j=ar.jd($,"psd",0,0,[!0,!1,!0,!1,!0]);$.fF=$.FS;
x.vX[$.name]=j;c=!0;console.log(Date.now()-z,"saving "+$.name,j.byteLength)}}if(c){var U=new jO(u.E.M);
U.data={d:u.H.hW,hF:ke.P5,ap6:!0};this.T(U)}};dh.prototype.ac9=function(){E.SK[jk.t4](this.an5.bind(this),Math.pow(Math.PI,8)+E.SK[jk.al9][jk.a1m]()*1e4);
var x=dQ.JO();if(x!=null&&x.globals!=null)this._G(x.globals);else{this.ab2=!0;var Q=ah.e4();if(Q&&Q.length!=0){var c=Q[0];
ah.jE(c,this.f_)}}if(!this.qt()){var $=E.anc();if($==0)this.aan=!0;if($==2)this.Pf.Lk=!1;if($!=1&&Math.random()<.002)E.a5O()}if(!e_.s8()||!this.Pf.Lk){this.aDl();
this.Ms()}else{var z=E.iU(E.SK[jk.pm]);z[jk.w8](jk.BI,this.a0s.bind(this));z[jk.oG](E.jW("61="),E.jW("_MYOqDLGJa;A:6"));
z[jk.HH]()}this.a9=!0;this.GB()};dh.prototype.a0s=function(x){var Q=JSON.parse(x.target[jk.E5]),c=E.SK[jk.h2][jk.aay]()/1e3,$=E.SK[jk.GO][jk.pV],z=!1;
for(var j in Q)if(j.indexOf(".")!=-1&&$.indexOf(j)!=-1&&parseInt(Q[j])>c)z=!0;if(z)this.Pf.Lk=!1;this.aDl();
this.Ms()};dh.prototype.Ms=function(x){this.l6=!0;if(!this.Pf.yR)this.LA.yR=null;else if(this.H0.length==0)this.LA.aAX();
this.Yv(ke.m6);this._();this.QM();this.at.BM(this.TW(),this.H0,this.Pf)};dh.prototype._G=function(x){var Q=this.Pf;
if(x.fcolor!=null){Q.Gj=x.fcolor;var c=Q._M.VA.FillColor;if(c){var $=d.RD(Q.Gj);c.Values=[1,$.Z/255,$.r/255,$.J/255]}}if(x.bcolor!=null)Q.QI=x.bcolor;
if(x.rulers!=null)Q.w6=x.rulers;if(x.extras!=null)Q.Ub=x.extras;if(x.favFam!=null)Q.M0=x.favFam;if(x.rsrc!=null)Q.jn=x.rsrc;
if(x.font!=null)Q._M._t[0].Name=x.font;if(x.panels!=null)Q.o9=x.panels;if(x.as!=null)Q.Fn=x.as;if(x.co!=null)Q.Yg=x.co;
if(x.eparams){var z=x.eparams,j=Q.Zo;if(z.guides!=null)j.Bo=z.guides;if(z.grid!=null)j.bI=z.grid;if(z.gsize!=null)j.ZD=z.gsize;
if(z.gunits!=null)j.PK=z.gunits;if(z.gtype!=null)j.ut=z.gtype;if(z.runits!=null)j.IM=z.runits;if(z.gcol!=null)j.WO=z.gcol;
if(z.gucol!=null)j.$y=z.gucol;if(z.sels!=null)j.mR=z.sels;if(z.paths!=null)j.iL=z.paths;if(z.pgrid!=null)j.l$=z.pgrid;
if(z.slices!=null)j.p9=z.slices}if(x.lang!=null)ah.jE(x.lang,this.f_);if(x.theme!=null)Q.b4=x.theme;
if(x.topt||Q.Jr){var U=x.topt?x.topt:{},i=Q.Jr?Q.Jr:{};for(var b in this.s.map){if(b>=103)continue;var e="t"+b;
if(U[e]||i[e])this.s.map[b].f.sr(U[e],i[e],this)}}};dh.prototype.aDl=function(){if(this.Pf.agI)return;
this.Pf.agI=!0;var x=null,Q=window.location.href,c=Q.indexOf("="),$=Q.indexOf("#");if(c!=-1)x=Q.substring(Q.indexOf("?")+1,c);
if($!=-1&&$!=Q.length-1){x="p";c=$}if($!=-1&&Q[$+1]=="i"){this.cE.kn(Q.slice($+2,$+10))}else if(Q.slice($+1).startsWith("goog_rewarded")){}else if($!=-1&&Q[$+1]=="t"){this.cE.kn(Q.slice($+2,$+10).split("").reverse().join(""),!0)}else if(x=="p"||x=="state"){var z=Q.substring(c+1,Q.length);
z=JSON.parse(decodeURI(z));if(x=="p"){if(z.script=="alert(73)")this.Pf.Lk=!1;if(z.script)fQ.akC(this);
if(z.server)this.Fl=z.server;if(z.resources)for(var F=0;F<z.resources.length;F++)this.cE.fQ({url:z.resources[F]});
if(z.files)for(var F=0;F<z.files.length;F++)this.cE.fQ({url:z.files[F],_g:{ux:z.server,ate:z.script}});
var j=z.environment;if(j==null)j={};if(j.plugins!=null)this.at.atT(j.plugins);if(j.localsave!=null)this.Pf.Cg=j.localsave;
if(j.customIO!=null)this.Pf.XG=j.customIO;if(j.vmode!=null){var U=j.vmode;if(U==1)this.Pf.compact=!0;
if(U==2)this.lS(1)}if(j.intro!=null)this.Pf.yR=j.intro;if(j.menus!=null)this.Pf.a0z=j.menus;if(j.tmnu!=null)this.Pf.Jr=j.tmnu;
if(j.panels!=null)this.Pf.o9=j.panels;if(j.showtools!=null){var i=j.showtools,b=i.indexOf(this.Pf.Oj);
this.Pf.LO=i;if(b==-1)this.jM(i[0])}if(j.phrases!=null)ah.awx(j.phrases);if(j.autosave!=null){this.Pf.Fn=0;
window.setInterval(function(){var K=new jO(u.E.M);K.data={d:u.H.E9};this.T(K)}.bind(this),j.autosave*1e3)}if(j.icons!=null){for(var e in j.icons)if(j.icons[e].indexOf("\"")==-1){if((e==jk.ax4||e==jk.a3F)&&this.Pf.Lk)continue;
PIMG[e]=j.icons[e];PIMG["__"+e]=!0}}this._G(j);if(z.files==null&&z.script){jY.Qd(z.script,this);this.GB()}}else if(x=="state"){var k=this.cE;
if(z.action=="create"){var K=new jO(u.E.M);K.data={d:u.H.LL,AD:"newproject",acD:z.folderId};this.T(K)}if(z.action=="open"){for(var F=0;
F<z.ids.length;F++)iN.eM(function(){var R="https://www.googleapis.com/drive/v3/files/"+this.awI,T=new XMLHttpRequest;
T.open("GET",R);T.setRequestHeader("Authorization",iN.aC());T.send();T.onload=function(D){var a=JSON.parse(D.target.response);
k.fQ({url:R+"?alt=media",name:a.name,uA:{file:a,Kf:""},un:{Authorization:iN.aC()}})}}.bind({awI:z.ids[F]}));
alert("Loading files from Google Drive ...")}}}else{var g=window.launchQueue;if(g){var k=this.cE;g.setConsumer(function(R){var T=R.files;
console.log(T);for(var F=0;F<T.length;F++){var D=T[F];D.getFile().then(function(a){k.cB([a],null,null,null,[D])})}})}}};
dh.prototype._=function(){var x=document.getElementById("cap");if(x){var Q=!1,c=x.getElementsByTagName("h1")[0],j=0,i=0,b=0;
c.textContent=Q?"Photopea":ah.get([0,17,0]);var $=x.getElementsByTagName("p"),z=E.iF(ah.get([0,17,1])),U=["PSD","XCF","Sketch","XD","CDR"];
for(var F=0;F<U.length;F++)z=z.replace(U[F],"<b>"+U[F]+"</b>");if(!Q)z+=" (<b>Adobe Photoshop</b>, <b>GIMP</b>, <b>Sketch App</b>,  <b>Adobe XD</b>, <b>CorelDRAW</b>).";
$[0].innerHTML=z;z=ah.get([0,17,2])+" "+ah.get([0,17,3]);for(var F=0;F<z.length;F++){var e=z[F];if(e=="<")i++;
if(e==">")b++}if(!Q&&i*b==9){var k=["//github.com/photopea/photopea/issues","//www.facebook.com/photopea/","//blog.photopea.com/introduction.html"];
for(var F=0;F<3;F++){var K=z.indexOf("<",j),g=z.indexOf(">",j),R=z.slice(0,K)+"<a href=\""+k[F]+"\" target=\"_blank\">"+z.slice(K+1,g)+"</a>";
j=R.length;z=R+z.slice(g+1)}$[1].innerHTML=z}else $[1].innerHTML=ah.get([0,17,2])}var T=document.getElementById("sponsors");
if(T)T.textContent=ah.get([0,17,4]);this.Ly._();this.Ok._();this.at._();this.D7._();this.ap._();this.LA._();
for(var D in this.s.map)if(this.s.map[D].b7)this.s.map[D].b7._()};dh.prototype.qt=function(){var x=E.SK[jk.JM][jk.ara];
if(x&&x[1]){if(x[1].endsWith(jk.jW("UUPSDm@ID")))return!0}return 4<E.SK[jk.JM][jk.el][jk.aBj](jk.jW("'$!|"))||true};
dh.prototype.oN=function(x,Q){x=Math.floor(x);Q=Math.floor(Q);var c=E.jW("WUMK&AM"),$=jk.hg,z=E.SK[jk.GO],j=Math.max(x,window.screen.width),U=Math.max(Q,window.screen.height),K=0;
if(e_.rJ==null)e_.rJ=Math.min(j,U)<500||j<750?0:j<1500?1:2;var i=e_.rJ,b=!this.l6||this.qt()||!this.Pf.Lk||dQ.OT();
if(!b&&e_.s8()){if(this.a4A==null)this.a4A=Math.random()<.5;b=this.a4A}if(b){if(i!=0&&E.SK[c]&&this.l6)E.SK[c]()}else{if(i==0)Q-=84;
else x-=i==1?180:320}gg.prototype.oN.call(this,x,Q);if(b&&this.Gf){this.n[jk.jN](this.w0);E.Os(this.w0);
this.Gf=!1}if(!b&&!this.Gf){var e=function(T){if(Math.random()<.002){dQ.event(e_.Bb()?"gota_0":"gota_1")}this.a77(x,Q);
var D=i==0?z[jk.VL]:this.n;D.appendChild(this.w0);this.w0[jk.II]($,E.jW("_MMJLNDfKCAg")+(i==0?10:10)+E.jW("_d$ebOS?I:==Ba-+# }$M"));
this.w0[$][E.jW("_MMJLND&<:E")]=(i==0?0:19)+E.jW("_d");this.w0[$][E.jW("i5WJHX")]=i==0?0:1}.bind(this);
function k(){e_.agx(e)}setTimeout(k,2300);this.Gf=!0}if(E.rm(this.Ok.n))K+=31;if(E.rm(this.gf.n))K+=32;
this.Ly.abm=this.Pf.Lk&&this.l6;this.Ly.oN(x,K);var g=Q-K,R=E.jW("_d");this.w0[$][jk.ahD]=(i==0?100>>>1:Q-11)+R;
this.w0[$][jk.Eo]=(i==0?x:6*Math.pow(10,2))+R;if(E.rm(this.D7.n))this.D7.oN(x,g);this.at.oN(x,g);this.LA.oN(x-this.D7.y7()-this.at.y7(),g)};
dh.prototype.a77=function(x,Q){var c=function(){var $=new jO(u.E.M);$.data={d:u.H.LL,AD:"account"};this.T($)}.bind(this);
e_.aq8(x,Q,this.w0,c)};dh.prototype.a4r=function(x){console.log("systemCopy")};dh.prototype.a7$=function(x){if(E.jA())return;
console.log("systemPaste");if(!x.clipboardData)return;var Q=x.target.tagName.toLowerCase(),c=x.clipboardData.items;
if(c==null)return;var $=this.a1F.bind(this);for(var F=0;F<c.length;F++){var z=c[F],j=z.getAsFile();if(z.type.indexOf("image")!=-1){if(j.size==this.Pf.a62)return;
this.Pf.a62=j.size;if(j){j.name="image.png";this.cE.cB([j],$)}}}};dh.prototype.a1F=function(x,Q){var c={buffer:x,rect:Q},$=this.Pf;
if(E.jA()){var z=this.arX,j=z.W4;if(j.m==Q.m&&j.e==Q.e){c.rect=j;c.h1=z.h1}}else{if($.sn){var U=new jO(u.E.v,!0);
U.f=X.RZ;U.data={d:"h_stepbck"};this.T(U)}}$.sn=c;var U=new jO(u.E.M,!0);U.data={d:u.H.Nt,aoy:!0};this.T(U)};
dh.prototype.auy=function(){if(this.ap.sl()!=null)alert(ah.get([15,7,8]));else alert("Escape or Confirm the current action (in the top menu).")};
dh.prototype.To=function(x){var Q=this.TW();if(Q==null){alert(ah.get([15,7,7]));return}var c=x.f==X.Oi||x.f==X.QT;
if(this.ap.sD()&&x.Oe!=!0&&!c){this.auy();return}var $=this.s,z=this.Pf.Oj,j=x.f;if(j==X.gr&&z==X.oX)j=X.oX;
if(z!=j&&$.map[z].f.sD()&&!c&&!(z==X.V1&&j==X.iT)){console.log("disabling",z);$.map[z].f.disable(Q,this,this.Pf,this.zs)}var U=this.s.map[j].f;
U.To(x.data,this,Q,this.zs,this.Pf)};dh.prototype.aCz=function(x){var Q=this.Pf;if(x.data.jT!=!0)ep.an4({q4:x.data.q4,dx:x.data.dx},this,Q,this.TW());
var c=Q.dR,$=Q.Q$;if(c==null)return;var z={awJ:!1,R3:"Step",a1t:0,w:!0,exp:!1,q4:x.data.q4};if(c[2]==null)c[2]=$[c[0]].yY[c[1]].yY.length-1;
if(x.data.dx)z.dx=x.data.dx;$[c[0]].yY[c[1]].yY.splice(c[2]+1,0,z);c[2]++;this.Yv(ke.v)};dh.prototype.Eh=function(x){if(this.aan){x.data=0;
return x.type}if(E.SK.__csrf&&!dQ.OT()){var Q=jk.jW("?XNGVEhYC9EM@;D5'+05,~\")ggs|\"x7YOYOJa\"KGI8>AKF3/=/ y1!tomv((xeeoTO[cB]+J:?8A6E$# ),\"%-2)EdajmcfpkJZbTE?VH@>SG&0#;+z~~mm&ShlnfdVOx");
alert(Q,5e3);return}gg.prototype.Eh.call(this,x);var c=x.data.d;if(c==u.H.Zr)ep.av9(this.TW(),this.Pf.Q$,x.data.b3[0],x.data.b3[1],this);
if(c==u.H.aDx){this.a2o(x.data.akz)}if(c==u.H.a5S){this._();this.QM()}if(c==u.H.B1)this.QM();if(c==u.H.Ic)if(this.Pf.t0){this.Pf.t0.prompt();
this.Pf.t0=null}if(c==u.H.aK)this.LA.vM(x.data.Wu,x.data.push);if(c==u.H.a10)this.LA.a2N();if(c==u.H.aiS)this.KK(null,x.data.dir);
if(c==u.H.AF)this.LA.Ej(this.H0.indexOf(x.data.yn?x.data.yn:this.TW()));if(c==u.H.P2){var $=navigator.keyboard;
if(x.data.qO&&$)$.lock(["Escape"]);if(x.data.qO&&document.fullscreenEnabled){if(document.fullscreenElement)document.exitFullscreen();
else document.body.requestFullscreen()}else if(x.data.qO)document.body.webkitRequestFullScreen();if(x.data.b!=null)this.lS(x.data.b)}if(c==u.H.aaQ){if(x.data.TZ)this.zs.kQ(x.data.awt);
else this.zs.ga(x.data.awt);this.sM(x.data.TZ?"down":"up")}if(c==u.H.a5K){var z=x.data.b;this.at.atT([z]);
this._()}if(c==u.H.hK){var j=this.TW(),U=j.VY().slice(0),i=j.B[j.g[0]],b=new gh(0,0,j.m,j.e),e=hf.KN()+"-d71c-11e5-b1ae-a548a96e5f9f",k=new jO(u.E.M,!0);
if(x.data.hF==0){var K={name:"Default/"+j.name.split(".")[0],id:e,GD:[U,b]};k.data={d:u.H.hW,_g:"add",hF:ke.qL,jn:[K]};
this.T(k)}if(x.data.hF==1){var g=d.R(b.P()*4);d.h4(g,4294967295);d.l.UY("norm",U,b,g,b,b,1);var R=d.R(b.P());
d._8(g,R);d.HQ(R);var T=d.qQ(R,b);if(T._6())T=b;var D=d.R(T.P());d.L2(R,b,D,T);T.x=T.y=0;var a={W4:T,id:e,GD:[D,T]},_=d1.Bk(e),I=_.Brsh.v;
I.Dmtr.v.val=Math.max(T.m,T.e);I.Spcn.v.val=10;k.data={d:u.H.hW,_g:"add",hF:ke.gN,jn:{list:[{t:"Objc",v:_}],Dq:[a],Rk:[]}};
this.T(k);k.data={d:u.H.hW,hF:ke.TV,I6:_};this.T(k)}if(x.data.hF==2){var f=j.zo(),y=f[0][f[1][0]],Z={mk:"Default/"+i.getName(),Uz:e,$:y.add.vmsk.clone().$},v=d.o.sP(Z.$),G=new bI(v.m,0,0,v.e,v.x,v.y);
G.HQ();d.o.Of(Z.$,G);v.x=v.y=0;Z.LB=v.clone();k.data={d:u.H.hW,_g:"add",hF:ke.fB,jn:[Z]};this.T(k)}}if(c==u.H.a0)this.cE.fQ(x.data.hF);
if(c==u.H.OD){var q=x.data.amX,h=x.data.cw;if(q!=!0&&h!=!0&&this.Vj("open"))return;var r=this.LA.aE();
if(h)r=-1-r;this.cE.apS(q||h?r:null,x.data.a7U)}if(c==u.H.j6){var H=x.data.aff,o=x.data.AJ,P=this.Ki(H);
if(o){var O=H==ke.gN,p=[];for(var F=0;F<o.length;F++)p.push((O?P.list:P)[o[F]]);P=O?{Rk:P.Rk,Dq:P.Dq,list:p}:p}if(H==ke.ZO){var b=new hf;
for(var F=0;F<P.length;F++){var C=P[F].Ry.Lefx;if(C)en.a7D(C,b,this.Pf.Yf)}P={RI:b.add.Patt?b.add.Patt:[],DL:P}}if(H==ke.Uf){var W=this.Pf.bX;
P={Dq:[],Rk:[],list:P};console.log(P)}if(H==ke.v)P=P[x.data.qM];var J=ke.dO[H],U=J[2].gS(P);hF.save(U,J[1]+"."+J[0])}if(c==u.H.Ol){var t=this.Pf.dE,Y=x.data.azc;
if(t.g4&&!t.ahk&&!Y){t.atX=window.confirm("Load \""+x.data.if+"\" also next time you use the editor?\nManage it in Edit - Local Storage.");
t.ahk=!0}if((t.atX||Y)&&t.g4){t.rG[x.data.if]=x.data.Xp;var k=new jO(u.E.M);k.data={d:u.H.hW,hF:ke.P5};
this.T(k)}}if(c==u.H.a01){var j=this.TW(),B="<!DOCTYPE HTML>";if(j==null)return;var l=ar.mL(j.VY().buffer,j.m,j.e),m=window.open();
B+="<head><script>setTimeout(function() {window.print();}, 10);</script></head>";B+="<body><img src=\""+l+"\" /></body>";
B+="</html>";m.document.write(B)}if(c==u.H.gl){if(this.Vj("publishOnline"))return;var L=x.data.mN!="psd",j=this.TW();
if(j==null)return;if(!L&&j.lO)return;var Q="Your "+(L?"picture":"document")+" will be published at "+(L?"Imgur":"Photopea")+".com under a public URL (known only to you). Proceed?";
if(!L)Q+=" We guarantee 6+ months of storage.";var A=x.data.qF?!0:confirm(Q);if(A){if(!L){var k=new jO(u.E.v,!0);
k.f=X.Mf;k.data={d:eM.sm};this.T(k);var S=new gh(0,0,j.m,j.e);for(var F=0;F<j.B.length;F++){var i=j.B[F];
if(i.rect._6()||i.Uy()||i.Rz()||i.aD()||i.Z6()||i.add.TySh||i.add.vmsk||i.add.SoLd)continue;var M=S.y_(i.rect);
if(!M.HM(i.rect)&&!M._6()){var N=d.R(M.P()*4);d.WK(i.buffer,i.rect,N,M);i.buffer=N;i.rect=M}if(!d.dJ(i.buffer,i.rect.m,i.rect.e))continue;
var s=i.M5(),V=i.opacity,g8=i.s3,n=i.cG;i.KW(!0);i.opacity=255;i.s3="norm";j.g=[F];k.data={d:eM.rQ,mN:"jpg"};
this.T(k);var cQ=j.B[F];i.KW(s);cQ.KW(s);i.opacity=cQ.opacity=V;i.s3=cQ.s3=g8,i.cG=cQ.cG=n}}if(j.NC){j.eB()}var hk=j.m,eG=j.e,ie=x.data.aco,eN;
if(ie)while(Math.max(hk,eG)>ie){hk=hk>>>1;eG=eG>>>1}console.log(hk,eG);if(x.data.mN=="psd")eN=ar.jd(j,"psd",0,0,[!0,!0,!0,!1,!0]);
else if(x.data.mN=="png")eN=ar.jd(j,"png",hk,eG);else{var gr=ar.jd(j,"png",hk,eG),ek=ar.jd(j,"jpg",hk,eG);
eN=gr.byteLength<ek.byteLength?gr:ek}if(x.data.qF==null)x.data.qF=function(jC){var ig=L?jC:"https://www.photopea.com/#i"+jC+".psd",k=new jO(u.E.M);
k.data={d:u.H.LL,AD:"linkview",a8F:ig};this.T(k)}.bind(this);if(L)hF.a9k(eN,x.data.qF);else this.cE.agc(eN,j.name,x.data.qF,"psdshared")}}if(c==u.H.E9){var j=this.TW(),jK=!1;
if(j==null)return;if(j.NC){j.eB()}if(x.data.QA){if(!this.jj(j,x.data.QA))return;var U=d9.aiV(j,x.data.QA,this.Pf);
this.GB(U);jK=!0}else if(j.QJ){if(this.H0.indexOf(j.QJ.ov)!=-1){var U=new Uint8Array(ar.pz("PSD").YU(j,null,null,[!0,!1])),k=new jO(u.E.v,!0);
k.data={d:eM.aY,Ta:j.QJ.ov,data:U,id:j.QJ.a4c,uo:j.name};k.f=X.Mf;this.T(k);alert("Smart Object updated")}jK=!0}else if(this.Vj("save")){jK=!0}else if(j.uA){d9.ard(j);
jK=!0}else if(j.Hn){var iE=d9.ayx(j);if(iE==1){alert("Already saving another file. Try again later.");
return}jK=!0}else if(j._g&&j._g.ux){if(!this.jj(j,j._g.ux.formats))return;this.cE.a5v(j,this.Pf,d9.ayr);
jK=!0}else if(j.ph&&"psd jpg png gif webp svg bmp".split(" ").indexOf(j.ml)!=-1){this.aah();return}if(jK){j.V7=j.FS;
j.$w=Date.now();j.vu=!0}else{var k=new jO(u.E.M,!0);k.data={d:u.H.js};this.T(k)}}if(c==u.H.js){if(!this.Pf.Cg){alert("function is disabled");
return}if(this.Vj("saveAsPSD"))return;var j=this.TW();if(j==null)return;if(!this.jj(j))return;var k=new jO(u.E.v,!0);
k.data={d:eM.sm};k.f=X.Mf;this.T(k);var e9=j.B.length,dm="Your document has "+j.B.length+" layers.";
if(e9>1<<15){alert(dm+" PSD files can have up to "+(1<<15)+" layers.",5e3);return}if(e9>8e3&&!confirm(dm+" Adobe Photoshop has a bug and crashes, when a PSD has more than 8000 layers. Do you want to proceed?"))return;
var kD={_B:[]};j.root.aAp([],kD);var gJ=kD._B;if(gJ.length>11&&!confirm("One layer is nested "+(gJ.length-1)+" times."+" Adobe Photoshop crashes, when a layer in a PSD is nested more than 10 times. Do you want to proceed?\n\nLongest nesting: "+gJ.join(" \uD83E\uDC1A ")+"."))return;
var dR=window.showSaveFilePicker;if(window.parent!=window)dR=null;if(dR&&!x.data.ade){var fO={suggestedName:j.name,types:[{description:"PSD Files",accept:{"image/psd":[".psd"]}}]};
dR(fO).then(function(x){j.ph=x;j.name=x.name;j.Fq=!0;j.ml="psd";this.aah()}.bind(this));return}var ko=window.gtag;
if(j.NL()&&ko)ko("event",j.ml+":"+E.MB(dQ.OT()?"\"'|('61":"w'| "),{event_category:"Formats"});if(j.NC){j.eB()}var d8=i9==0?"PSD":"AI",fj=ar.pz(d8);
if(x.data.ade){var U=j.ml=="psd"?fj.YU(j):d9.Pt(j,j.ml,this.Pf);this.aym(U,j,this)}else{var U=fj.YU(j);
hF.save(U,j.name);j.V7=j.FS;j.$w=Date.now();j.vu=!0}}if(c==u.H.H_)window.open(x.data.link,"_blank");
if(c==u.H.ad9){if(this.ap.sD()){this.auy();return}var j=this.TW(),i=j.B[j.g[0]],z=j.ZL(i.add.SoLd.Idnt.v);
for(var F=0;F<this.H0.length;F++){var ja=this.H0[F].QJ;if(ja!=null&&ja.a4c==z.P6&&ja.ov==j){this.LA.Bs(F);
return}}hF.nn({name:z.uo,QJ:{a4c:i.add.SoLd.Idnt.v,ov:j}},z.raw.buffer,this)}if(c==u.H.atd){var j=this.TW(),i=j.B[j.g[0]],z=j.ZL(i.add.SoLd.Idnt.v);
hF.save(z.raw.buffer,z.uo)}if(c==u.H.a6W){console.log(x.data);hF.nn({name:x.data.Hn[1].split("/").pop(),Hn:x.data.Hn},x.data.aJ,this)}if(c==u.H.anz){var j=this.TW();
j.Hn=x.data.Hn;j.name=j.Hn[1].split("/").pop();var k=new jO(u.E.M);k.data={d:u.H.E9};this.T(k)}if(c==u.H.Xk){this.akT()}if(c==u.H.mH){this.agU(x.data.Qo,x.data.nL,x.data.O3)}if(c==u.H.Nt){this.as2(x.data.aoy,x.data.$l,x.data.O3)}if(c==u.H.aom){var eD=x.data.b;
if(this.Pf.Oj==X.gr&&this.T9().sD()){var k=new jO(u.E.v,!0);k.f=X.gr;k.data={d:"insertText",b:eD};this.T(k);
return}if(eD.startsWith("vcb;")){var d3=JSON.parse(eD.slice(4));d3[0]=dJ.ah8(d3[0]);var k=new jO(u.E.v,!0);
k.f=X.T3;k.data={d:"append",LX:"Paste Paths",adQ:d3};this.T(k)}else if(eD.startsWith("lrs;")){var fP=eD.split(";"),jE=this.H0[parseInt(fP[1])];
if(jE==null)return;var cR=this.TW(),ex=jE.g;jE.g=JSON.parse(fP[2]);var er=jE.oU(null,jE!=cR);jE.g=ex;
var k=new jO(u.E.v,!0);k.data={d:eM.nK,B:er,ov:jE,et:cR};k.f=X.Mf;this.T(k)}else if(eD.startsWith("<!--")||eD.startsWith("<svg")){var a7=w.nT(eD),dl=ar.pz("svg"),b=new hf("image.psd");
dl.fk(a7.buffer,b);if(this.H0.length!=0){var hl=b.B;if(hl.length==3&&hl[0].getName()=="</Layer group>"&&hl[2].Uy())hl=[hl[1]];
var k=new jO(u.E.v,!0);k.f=X.Mf;k.data={d:eM.nK,B:hl,ov:b,et:this.TW()};this.T(k)}else this.atE(b)}}if(c==u.H.kv){jY.Qd(x.data.rq,this)}if(c==u.H.xy){if(window.parent!=window)window.parent.postMessage(x.data.hF,"*");
this.at.Za(x.data.hF)}if(c==u.H.cR){var f4=parseFloat(x.data.AD);if(this.Pf.o9.indexOf(f4)==-1){var k=new jO(u.E.M,!0);
k.data={d:u.H.hW,hF:ke.NF,b:f4,_g:"add"};this.T(k)}this.at.aqf(x.data.AD)}if(c==u.H.xe){this.Md.asO(this.TW(),this.Pf)}if(c==u.H.LL){var em="open_from_url openFromURL camera takePic templates showTemplates newproject new eassets exportLayers".split(" ");
for(var F=0;F<em.length;F+=2)if(x.data.AD==em[F]&&this.Vj(em[F+1]))return;if(!this.Pf.Cg&&x.data.window=="saveforweb"){alert("function is disabled");
return}this.ap.aiP(x.data.AD,this.TW(),x.data,this.H0,this.zs)}if(c==u.H.lm)hF.save(x.data.data,x.data.name);
if(c==u.H.th){if(!this.ap.sD()||x.Oe)this.atE(x.data.Ta)}if(c==u.H.Wk){this.LA.Bs(x.data.target);var k=new jO(u.E.v,!0);
k.data={d:eM.aCS,Ta:x.data.Ta,yU:x.data.yU,fU:x.data.fU};k.f=X.Mf;this.T(k);this.jM(X.va)}if(c==u.H.a0U){eV.Mx=!eV.Mx;
if(this.H0.length>0)this.TW().c()}if(c==u.H.ax2){var e$=dQ.JO();if(e$!=null&&e$.globals!=null)this._G(e$.globals);
this.Ms()}if(c==u.H.mF){this.cE.cB(x.data.data,null,x.data.Dw,x.data.SS,x.data.aue)}if(c==u.H.ax){var iP=this.T9();
if(!this.ap.sl()!=null)this.jM(x.data.f,x.data.Zz);var b2=this.T9();if(b2!=iP&&x.data.aqC)b2.Eu(this.TW(),this,this.Pf,this.zs,this.IQ)}if(c==u.H.JG){if(this.s.tR)this.jM(this.s.tR)}if(c==u.H.Te){var k7=this.s.map[x.data.f].f,j=this.TW();
k7.np(x.data,this,j,this.zs,this.Pf);if(j)j.tP=!0;this.ahs()}if(c==u.H.gR){var at=this.s.map[x.data.f];
this.aqP(at);at.b7.M$(x.data)}if(c==u.H.hW){var j=this.TW(),ju,jL=!(j&&j.g.length!=0&&j.B[j.g[0]].add.TySh),fJ=x.data.hF,h6=x.data.jn,iq=this.Pf;
if(x.data._g=="set"){var b2=X.GR[h6[1].classID];if(iq.Oj!=b2)this.jM(b2);this.s.map[b2].b7.a54(h6,iq)}if(x.data._g=="add"){var J=ke.dO[fJ];
if(fJ==ke.NF){iq.o9.push(x.data.b);iq.o9.sort(function(jC,ig){return jC-ig})}else if(J==null){if(h6)iq.Dn.a3f(h6,x.data.aet);
if(j)j.vu=!0}else{var iI=this.Ki(fJ);if(fJ==ke.gN){iI.Dq=iI.Dq.concat(h6.Dq);iI.Rk=iI.Rk.concat(h6.Rk);
iI=iI.list;h6=h6.list}if(fJ==ke.ZO&&j){for(var F=0;F<h6.length;F++){var C=h6[F].Ry.Lefx;if(C)en.agP(C,j,iq.Yf)}}if(fJ==ke.Uf&&h6==null){var b=this.s.map[iq.Oj].b7.aqs();
if(b==null)return;h6=[b]}for(var F=0;F<h6.length;F++)iI.push(h6[F]);if(fJ==ke.fB){var dM={};for(var F=0;
F<iI.length;F++){var ik=iI[F].mk;while(dM[ik]!=null)ik=iI[F].mk=ik+"X";dM[ik]=!0}}if(x.data.aet!=!0)if(iI.length!=h6.length||fJ==ke.oY||fJ==ke.ZO||fJ==ke.rD||fJ==ke.v)alert(ah.get(J[3])+" "+ah.get([23,1])+".")}}if(x.data._g=="del"){if(fJ==ke.NF){iq.o9.splice(iq.o9.indexOf(x.data.b),1)}else{var J=ke.dO[fJ],o=x.data.AJ,iI=this.Ki(fJ);
if(fJ==ke.gN)iI=iI.list;for(var F=0;F<o.length;F++)iI[o[F]]=null;for(var F=0;F<iI.length;F++)if(iI[F]==null){iI.splice(F,1);
F--}alert(ah.get(J[3])+" deleted.")}}if(x.data._g=="rnm"){var J=ke.dO[fJ],iI=this.Ki(fJ);if(fJ==ke.gN)iI=iI.list;
if(iI[x.data.AJ[0]]==null)return;J[2].ki(iI[x.data.AJ[0]],(x.data.GW?x.data.GW:"")+x.data.b)}if(fJ==ke.u$){var jp=x.data.b;
iq.gd=jp;iq.O1[jp.bf]=jp.WB}if(fJ==ke.Rc){var jp=x.data.b;iq.T6=JSON.parse(JSON.stringify(jp));var eA=aF.XT(jp);
iq.D5[eA.bf]=eA.WB}if(fJ==ke.hV){iq.xV=x.data.b}if(fJ==ke.oP){iq.cb=x.data.b}if(fJ==ke.kg){iq._M=x.data._M;
var k8=iq._M.VA.FillColor;if(jL&&k8){var ay=k8.Values,bK={Z:ay[1]*255,r:ay[2]*255,J:ay[3]*255},a4=d.SD(bK);
if(iq.Gj!=a4){iq.Gj=a4;ju=ke.$s}}}if(fJ==ke.TV){var N=JSON.parse(JSON.stringify(x.data.I6)),h_=N.useBrushSize;
if(h_&&h_.v){N.Brsh.v.Dmtr.v.val=iq.bX.eT.Brsh.v.Dmtr.v.val;h_.v=!1}iq.bX.eT=N;var bj={q4:"select",dx:{__name:"Select",classID:"slct",null:{t:"obj ",v:[{t:"name",v:{classID:"Brsh",val:N.Nm.v.split("/").pop()}}]}}},at=this.T9();
at.iZ=this;at.track(bj)}if(fJ==ke.jw){iq.M0=x.data.j7}if(fJ==ke.mz){iq.jn=x.data.j7}if(fJ==ke.$s){var bj,gs="Clrs";
if(x.data.Zq<2){var bs=x.data.b,e3=x.data.Zq==0;console.log(d.RD(bs),d.RD(iq.Gj));var jA=d.I.lV(d.RD(bs));
if(e3)iq.Gj=bs;else iq.QI=bs;gs=e3?"FrgC":"BckC";bj={q4:"set",dx:{__name:"Set",classID:"setd",T:{t:"Objc",v:jA}}}}if(x.data.Zq==2){var kn=iq.Gj;
iq.Gj=iq.QI;iq.QI=kn;bj={q4:"exchange",dx:{__name:"Exchange",classID:"Exch"}}}if(x.data.Zq==3){iq.Gj=0;
iq.QI=16777215;if(j!=null&&j.g.length!=0&&j.B[j.g[0]].kk==1){var kn=iq.Gj;iq.Gj=iq.QI;iq.QI=kn}bj={q4:"reset",dx:{__name:"Reset",classID:"Rset"}}}if(bj){bj.dx.null={t:"obj ",v:[{t:"prop",v:{classID:"Clr",keyID:gs}}]};
var at=this.T9();at.iZ=this;at.track(bj)}var k8=iq._M.VA.FillColor;if(jL&&k8){var j6=d.RD(iq.Gj),cL=[1,j6.Z/255,j6.r/255,j6.J/255];
if(cL.join(",")!=k8.Values.join(",")){k8.Values=cL;ju=ke.kg}}}if(fJ==ke.ZZ){iq.w6=!iq.w6;this.QM()}if(fJ==ke.eH){iq.Ub=!iq.Ub;
this.QM()}var eb=iq.Zo;if(fJ==ke.S0){eb.mR=!eb.mR;this.QM()}if(fJ==ke.TM){eb.iL=!eb.iL;this.QM()}if(fJ==ke.V4){eb.Bo=!eb.Bo;
this.QM()}if(fJ==ke.F_){eb.bI=!eb.bI;this.QM()}if(fJ==ke.DR){eb.l$=!eb.l$;this.QM()}if(fJ==ke.m$){eb.p9=!eb.p9;
this.QM()}if(fJ==ke.sT){iq.Zo=x.data.j7;this.QM()}if(fJ==ke.a9z){iq.yC=!iq.yC;this.QM()}if(fJ==ke.kq){iq.Cs[x.data.Q6]=!iq.Cs[x.data.Q6];
this.QM()}if(fJ==ke.W$){ah.h7(x.data.lang,this.f_)}if(fJ==ke.Ts){iq.b4=x.data.b4;this._()}if(fJ==ke.P5&&iq.dE.g4){var dY=iq.dE.g4.transaction(["rsrc"],"readwrite").objectStore("rsrc"),aP={k:"fs0",fset:iq.dE.rG};
if(x.data.ap6)aP={k:iq.dE.id,fset:iq.dE.vX};var ks=Object.keys(aP.fset).length==0?dY.delete(aP.k):dY.put(aP);
ks.onerror=function(x){console.log(x);alert("Storing failed. Browser says: "+x.target.error.message,7e3)}}this.Yv(fJ);
if(ju)this.Yv(ju)}};dh.prototype.aah=function(){var x=new jO(u.E.M,!0);x.data={d:u.H.Tb,xx:"Saving ..."};
this.T(x);setTimeout(function(){var x=new jO(u.E.M,!0);x.data={d:u.H.js,ade:!0};this.T(x)}.bind(this),20)};
dh.prototype.aym=function(x,Q){Q.ph.createWritable().then(function(c){c.write(x);return c}).then(function(c){return c.close()}).then(function(c){Q.V7=Q.FS;
Q.$w=Date.now();Q.vu=!0;var $=new jO(u.E.M,!0);$.data={d:u.H.MM,xx:"Saving ..."};this.T($)}.bind(this)).catch(function(c){var $=new jO(u.E.M,!0);
$.data={d:u.H.MM,xx:"Saving ..."};this.T($)}.bind(this))};dh.prototype.agL=function(){var x=this.Pf,Q=x.jn,c=x.arf;
for(var F=0;F<Q.length;F++){var $=Q[F];if(c[$])continue;c[$]=!0;this.cE.kn($,!1,!0)}};dh.prototype.a6m=function(){this._();
this.QM()};dh.prototype.Vj=function(x){var Q=this.Pf.XG[x];if(Q){var c=new jO(u.E.M,!0);c.data={d:u.H.kv,rq:Q};
this.T(c)}return Q!=null};dh.prototype.jj=function(x,Q){var c=!0,U=15;if(Q){c=!1;for(var F=0;F<Q.length;
F++)if(Q[F].startsWith(E.jW("__M")))c=!0}var $=x.NL()||x.QJ&&x.QJ.ov.NL();if(this.qt())$=!1;var z=new E.SK[jk.h2],j=(z[E.MB("xy,b-66:")]()&1)*60+z[E.jW("VQ]3LNRN<G")]();
if($&&!dQ.OT()&&j>U&&c){var i=E.SK[E.MB("}$z{2*35")][E.MB("y'|!")],b=E.jW("C[hMHT\\GFB6GJ.44>+.(2sq koomg\\beyj;PGS?Ad+sL>6Cpp^7w!|\"mwuhkguVQ[iII`SN=9Q>:5?B$2, \"w-~oi!ddjhfn|}ePIKOK9DM0>*48;--\"/tx{us+");
b+="\n\n"+E.jW("6Q]eD_-L<A:C8G&%\"+.$'/4ouu qb\\sf\\WQRKSA=U430/:7II:''1&lqy\"")+(-j+120)+E.jW("nYRTXTBMd");
if(i.indexOf(E.MB("\"|'/-1)(W0?@"))==-1)b=ah.get([0,11+6,3+2]);E.SK._cwY(b);return!1}return!0};dh.prototype.Ki=function(x){var Q=this.Pf,c=[ke.gN,ke.L7,ke.qY,ke.rD,ke.qL,ke.fB,ke.ZO,ke.oY,ke.v,ke.Uf,ke.oy],$=[Q.bX,Q.Op,Q.fc,Q.jF,Q.Yf,Q.jS,Q.Xe,Q.awl,Q.Q$,Q.R_,Q.a6a];
return $[c.indexOf(x)]};dh.prototype.akT=function(){var x=this.agU(),Q=this.TW();if(Q==null||Q.g.length==0)return;
var c=Q.B[Q.g[0]],$=new jO(u.E.v);if(x==1){$.f=X.T3;$.data={d:"remove",LX:"Cut Paths"}}else{$=new jO(u.E.G2);
$.data={q4:"delete"}}this.T($)};dh.prototype.agU=function(x,Q,c){if(x==null)x=!1;var $=this.Pf;console.log("doCopy",x,Q);
var z=this.TW();if($.Oj==X.gr&&this.T9().sD()){var j=new jO(u.E.v,!0);j.f=X.gr;j.data={d:"copyText"};
this.T(j);return}if(z==null||z.g.length==0)return;var U=z.B[Q==null?z.g[0]:Q],i=z.zo(),b=i[0],k=i[1],K=b[k[0]];
if(!x&&K!=null&&K.add.vmsk.g.length!=0){var g=X.qW.an(K.add.vmsk,K.add.vogk);if(E.jA()){g[0]=dJ.a9r(g[0]);
var R="vcb;"+JSON.stringify(g);hF.At(new Blob([R],{type:"text/plain"}))}else $.XY=g;return 1}else if(z.u==null){if(E.jA()){var R="lrs;"+this.H0.indexOf(z)+";"+JSON.stringify(z.g);
hF.At(new Blob([R],{type:"text/plain"}))}}else{var T,D;if(x){var a=new gh(0,0,z.m,z.e);D=a.y_(z.u.rect);
T=d.R(D.P()*4);d.WK(z.VY(),a,T,D);d.Pp(z.u.channel,z.u.rect,T,D)}else if(z.oW.length!=0){D=z.u.rect.clone();
T=d.R(D.P()*4);var _=z.fG[z.oW[0]],I=_.EF(D);d.ZM(I,T);d.Dm(z.u.channel,T,3)}else{var f=U.I0(z,z.u);
if(f==null){alert("Copied area is empty");return}T=f.aJ;D=f.rect}var y=z.Q.O,Z=y[0]+y[1]+y[2];if(Z==1){var v=y.indexOf(1);
for(var F=0;F<T.length;F+=4)T[F]=T[F+1]=T[F+2]=T[F+v]}var G=new bC(z.m,z.e);if(E.jA()&&c!=!0){var q=ar.pz("PNG").a41(T.buffer,D.m,D.e);
hF.At(new Blob([new Uint8Array(q)],{type:"image/png"}));this.arX={W4:D,h1:G}}else $.sn={buffer:T,rect:D,h1:G};
$.a17=D.clone();$.XY=null}};dh.prototype.as2=function(x,Q,c){if(Q)this.aDh=!0;console.log("doPaste");
var $=this.Pf,z=$.sn,b;if(this.H0.length==0){if(!x&&E.jA()){hF._x(this,null);return}if(z){var j=ar.$E("image.psd",[{data:z.buffer.buffer,K$:z.rect}]),U=new jO(u.E.M);
U.data={d:u.H.th,Ta:j};this.T(U)}return}var j=this.TW();if($.Oj==X.gr&&this.T9().sD()){hF._x(this,null);
return}var i=j.B[j.g.length==0?j.B.length-1:j.g[0]];if($.XY){var k=j.zo(!0),K=k[0],g=k[1];b=K[g[0]]}var U=new jO(u.E.v,!0);
if($.XY!=null&&b!=null){U.f=X.T3;U.data={d:"append",LX:"Paste Paths",adQ:$.XY}}else if(!x&&E.jA()&&c!=!0){hF._x(this,this.a1F.bind(this));
return}else{if(z==null)return;if(j.hS(!1)&&(j.Q.O.join("")!="111"||j.oW.length!=0||i.kk>0||i.rect._6())){U.f=X.gN;
U.data={d:"draw",awV:!0,LX:[5,2]}}else{U.f=X.Mf;U.data={d:eM.Ap,$l:this.aDh};this.aDh=!1}U.data.sn=z}this.T(U)};
dh.prototype.a0V=function(){var x=this.Pf.Dn;if(x.apb())return;for(var F=0;F<this.H0.length;F++){var Q=this.H0[F];
if(!aE.R6(Q,x,this))continue;if(Q.RS)aE.kM(Q,x,this);var c=Q.add.lnk2;if(c)for(var $=0;$<c.length;$++){var z=c[$];
if(z.RS)X.de.qZ(Q,z.P6,z.iw[1],z.iw[1],x)}if(Q.a9E)continue;Q.a9E=!0;if(Q._g&&Q._g.ate)jY.Qd(Q._g.ate,this);
this.GB();var j=new jO(u.E.v);j.f=X.Mf;j.data={d:eM.DP};var U=new jO(u.E.M);U.data={d:u.H.cR,AD:cC.Pn.E7}}};
dh.prototype.Yv=function(x){this.agL();var Q=this.Pf,c=Q.Oj,U=!1;if(x==ke.TV){if(this.s.map[c].b7)this.s.map[c].b7.Fy(Q,x)}else for(var $ in this.s.map)if(this.s.map[$].b7)this.s.map[$].b7.Fy(Q,x);
if(x==ke.Be){if(c!=X.gr)this.s.map[X.gr].f.Fy(Q,x);this.a0V()}this.LA.Fy(Q,x);this.D7.Fy(Q,x);this.ap.Fy(Q,x);
if(i9==1&&(x==ke.u$||x==ke.Rc))this.s.map[X.tD].f.Fy(Q,x);else this.T9().Fy(Q,x);this.at.Fy(Q,x);this.Ok.Fy(Q,x);
if(x==ke.Ts||x==ke.m6){bN.a3P(Q.b4);this.update(!0)}var z=Q._M,j=z.VA.Font;if(x==ke.kg&&j!=null&&z._t[j].Name!=Q.font){Q.font=z._t[j].Name;
U=!0}if([ke.NF,ke.jw,ke.mz,ke.$s,ke.ZZ,ke.eH,ke.sT,ke.V4,ke.F_,ke.S0,ke.TM,ke.DR,ke.m$,ke.W$,ke.Ts].indexOf(x)!=-1||U)this.ahs()};
dh.prototype.ahs=function(){if(!this.a9)return;var x={},Q=this.s.map;for(var c in Q){var $=Q[c].f;if($.Jh&&$.Jh()!=null)x["t"+c]=$.Jh()}var z=this.Pf,j=z.Zo,U={guides:j.Bo,grid:j.bI,sels:j.mR,paths:j.iL,pgrid:j.l$,slices:j.p9,gsize:parseFloat(j.ZD.toFixed(2)),gunits:j.PK,gtype:j.ut,runits:j.IM};
if(j.WO!=8421504)U.gcol=j.WO;if(j.$y!=65535)U.gucol=j.$y;var i={fcolor:z.Gj,bcolor:z.QI,rulers:z.w6,extras:z.Ub,favFam:z.M0,rsrc:z.jn,panels:z.o9,eparams:U,lang:ah.yu(),theme:z.b4,as:z.Fn,co:z.Yg,topt:x};
if(z.font!=null)i.font=z.font;var b=dQ.JO();if(b==null)b={};b.globals=i;dQ._J(b)};dh.prototype.Sh=function(x){var Q=this.zs,c=this.IQ,$=this.Pf.Oj,z=this.s.map[$].f,j=null,U=!1;
for(var F=0;F<this.s.alY.length;F++){var i=this.s.alY[F],b=!0;for(var e=0;e<i.KR.length;e++){var k=i.KR[e];
if(!Q.S(k))b=!1}if(b&&(!i.AY||!z.sD())&&(i.zI==null||i.zI.indexOf($)!=-1)){j=i.f;U=i.AY;break}}if((!c.TZ||$==X.k9||x)&&this.s.cX!=j&&(j!=$||!U)){var K=this.TW();
if(this.s.cX!=null&&j==null)this.T9().disable(K,this,this.Pf,Q,!0);this.s.cX=j;this.T9().enable(K,this,this.Pf,Q,j!=null&&j!=$)}};
dh.prototype.Vb=function(x){var Q=this.Pf.Oj,c=this.TW();if(Q!=null){this.s.map[Q].f.disable(c,this,this.Pf,this.zs)}};
dh.prototype.aqP=function(x){if(x.b7==null){x.b7=new x.uM(x.f.id);x.b7.an7(x.f.id,x.f.Ga);x.b7.Fy(this.Pf,ke.m6);
x.b7._()}};dh.prototype.jM=function(x,Q){if(x==X.va&&this.ap.sl())return;var c=this.TW(),$=this.Pf;if(this.s.map[x].f.l1(c,$,Q)){this.Vb();
if(x!=$.Oj)this.s.tR=$.Oj?$.Oj:X.kU;$.Oj=x;this.D7.jM($.Oj);var z=this.s.map[x];this.s.OC[z.na]=z.auq;
this.aqP(z);this.gf.aci(z.b7);var j=z.f;j.enable(c,this,this.Pf,this.zs,!1,Q);if(c)c.tP=!0;this.QM();
this.Ly.atQ()}};dh.prototype.T9=function(x){var Q=this.s,c=Q.EQ,$=Q.cX,z=this.Pf.Oj;if(c)z=c;else if($&&x==null)z=$;
return Q.map[z].f};dh.prototype.atE=function(x){var Q=this.Pf,c=this.H0.indexOf(x);if(c!=-1){this.LA.Bs(c);
return}if(this.Fl&&(x._g==null||x._g.ux==null)){x._g={ux:this.Fl}}if(x.No==null){x.No="local,"+this.aBo+","+x.name;
this.aBo++}x.$w=Date.now();if(i9==1&&x.add.arts==null)x.aw3();if(e_.Bb()!=0&&!this.ab2&&E.SK[E.MB("t$&!'31")].toString().indexOf(E.MB(" u,$4&"))==-1){alert(E.MB("j$--=#66A@5EU`KQaFVjSih\\hpirt2,x&5&+#++A4<8SFOO_FUMQ|"));
return}for(var F=0;F<x.B.length;F++){var $=x.B[F];if($.add.SoLd!=null){var z=Date.now()}}var j=x.B.length,U=jk.Nl(),i=Math.PI*(6550<<14)+(E.Dh(31)?20:10)*7e7;
if(U>i){var j=x.B.length;x.B=[];return j}if(eV.Mx){eV.SV(Math.max(x.m,x.e));for(var F=0;F<x.B.length;
F++){var $=x.B[F];if($.nd())eV.SV(Math.max($.rect.m,$.rect.e))}}x.jf();x.Kn();if(x.aCC)x.afb();else x.c();
x.aCC=!1;this.H0.push(x);this.LA.Zy(new fN(x));x.tP=!0;x.vu=!0;this.a0V();var b=new jO(u.E.v);b.f=X.FQ;
b.data={d:"auto",dw:2}};dh.prototype.TW=function(){return this.H0[this.pH]};dh.prototype.aqn=function(){return this.ap.sl()==null};
dh.prototype.KK=function(x,Q){this.Vb();var c=this.H0.length;if(Q!=null)this.LA.Bs((this.LA.aE()+Q+c)%c);
this.pH=this.LA.aE();var $=this.TW();this.Ok.a8n($,this.Pf);this.at.BM($,this.H0,this.Pf);this.QM();
if($)$.tP=!0};dh.prototype.aaf=function(x){this.Vb();var Q=this.H0,c=Q[x.data.Dt];Q.splice(x.data.Dt,1);
if(Q.length==0){this.KK(x);var $=eV.nc(),z=fN.QL.Ra;if($.parentNode)$.parentNode.removeChild($);if(z.parentNode)z.parentNode.removeChild(z)}this.abx(c.name)};
dh.prototype.abx=function(x){var Q=this.Pf.dE,c=!1;if(Q.g4==null)return;for(var $ in Q.vX){if(x==null||$==x){delete Q.vX[$];
c=!0}}if(c){var z=new jO(u.E.M);z.data={d:u.H.hW,hF:ke.P5,ap6:!0};this.T(z)}};dh.prototype.awm=function(x){var Q=[],c=x.data.a2d;
for(var F=0;F<c.length;F++)Q[F]=this.H0[c[F]];this.H0=Q;this.pH=this.LA.aE()};dh.prototype.a9_=function(x){var Q=this.LA,c=Q.aeU(),$=this.T9(),z=this.TW();
if(c==Q.aE()||!$.ais())return;this.a2o(c,$)};dh.prototype.a2o=function(x,Q){console.log("dup2doc");var c=this.Pf,$=this.LA,z=this.TW(),j=this.H0[x],U,i=new jO(u.E.v,!0);
i.f=X.Mf;if(z.u==null){i.data={d:eM.nK,B:z.oU(null,!0),ov:z,et:j,a3H:Q==null};this.T(i)}else U=z.B[z.g[0]].I0(z,z.u);
var b=this.IQ,k=c.w6;c.w6=!1;b=z.Q.$X(b.x,b.y);if(Q)Q.Lg(z,this,c,this.zs);$.Bs(x);if(z.u){i.data={d:eM.Ap,sn:{buffer:U.aJ,rect:U.rect}};
this.T(i)}b=j.Q.wu(b.x,b.y);if(Q)Q.Eu(j,this,c,this.zs,b);c.w6=k};dh.prototype.adG=function(x){var Q=this.TW(),c=this.zs,$=this.Pf,z=x.Em;
if(z)this.IQ=z;if(z)z.y-=$.Yg;if(this.wn==null)this.wn=0;if(x.action=="multidown"){this.Lq=x.fm.length;
this.wn=Date.now()}if(x.action=="up"&&Date.now()-this.wn<100){var j=new jO(u.E.v);j.f=X.RZ;j.data={d:this.Lq==2?"h_stepbck":"h_stepfwd"};
this.T(j)}if(x.action.startsWith("multi")){var U=new jO(u.E.v,!0);U.data={d:x.action,fm:x.fm};U.f=X.QT;
this.T(U);return}var i=this.s.map[X.kU].f;if((x.action=="down"||x.action=="rdown")&&$.Oj!=X.kU&&this.s.cX!=X.kU&&i.a79(Q,this,$,c,z)){this.s.EQ=X.kU;
i.enable(Q,this,$,c,!0)}if(x.action=="idown"){c.kQ("Space");this.Sh(!0);x.action="down"}var b=this.ap.sl(),k=b!=null&&b.W9()&&this.s.cX==null?b:this.T9();
if(x.action=="scroll"){var K=!c.S(fM.qP)&&x.yO,U=new jO(u.E.v,!0);U.data={d:"scroll",Kj:x.Kj.clone(),Em:z,arb:K};
U.f=c.S(fM.Al)||K?X.QT:X.Oi;this.T(U)}if(b!=null&&k!=b&&this.ap.sD()&&k.id!=X.Oi&&k.id!=X.QT)return;
if(x.action=="down")k.Eu(Q,this,$,c,z);if(x.action=="rdown")k.Ys(Q,this,$,c,z);if(x.action=="move")k.CK(Q,this,$,c,z);
if(x.action=="up"||x.action=="iup"||x.action=="cancellast")k.km(Q,this,$,c,z,x.action=="cancellast");
if(x.action=="rup")k.x1(Q,this,$,c,z);if(x.action=="iup"){c.ga("Space");this.Sh(!0)}if(x.action=="cancellast"){if(Q&&Q.history.length!=0&&Date.now()-Q.history[Q.history.length-1].aoC<200){var j=new jO(u.E.v);
j.f=X.RZ;j.data={d:"h_stepbck"};this.T(j)}}var g=this.at;if(x.action=="down")g.Eu(Q,this,$,c,z);if(x.action=="move")g.CK(Q,this,$,c,z);
if(x.action=="up")g.km(Q,this,$,c,z);if(x.action=="down"||x.action=="up"){this.Sh()}if(x.action=="down"||x.action=="up"||x.action=="ctx"){Q.tP=!0}if((x.action=="up"||x.action=="rup")&&this.s.EQ){this.s.EQ=null;
i.disable(Q,this,$,c)}};dh.prototype.X0=function(x){var Q=this.TW(),c=this.IQ;if(Q&&this.T9().R4(c,this.zs)){var $=Q.Q,z=$.yY.m,j=$.yY.e,U=0,i=0,b=16;
if(c.x<b)U=b-c.x;if(c.x>z-b)U=c.x-(z-b);if(c.y<b)i=b-c.y;if(c.y>j-b)i=c.y-(j-b);var e=this.zs.S(fM.FT)?8:1;
if((U!=0||i!=0)&&(Q.m*$.W>z||Q.e*$.W>j)){U=Math.min(5,U*.5)*e;i=Math.min(5,i*.5)*e;if(c.x>b)U=-U;if(c.y>b)i=-i;
$.z.x+=U;$.z.y+=i;this.adG({Em:this.IQ,action:"move"});Q.Fq=!0}}this.update()};dh.prototype.update=function(x){var Q=this.TW();
if(Q==null)return;if(i9!=0){if(Q.buffer)throw"e"}if(Q.tP){var c=this.s.map;for(var $ in c){if(c[$].f.gb)c[$].f.gb(Q,this,this.Pf,this.zs)}if(i9==1){c[X.tD].f.gb(Q,this,this.Pf,this.zs,!0)}}if(Q.NC&&i9==0)if(eV.Mx)eV.SV(Math.max(Q.m,Q.e));
if(Q.NC&&i9==0){Q.eB()}var z=Q.Q,j=this.V9,U=this.V9=Date.now();if(Q.NC||Q.ox||Q.vu||Q.Fq||x||z.fi!=z.W||!z.yH.HM(z.z)){var i=z.fi;
if(z.fi!=z.W){var b=X.nF.aro(z.W,z.fi>z.W),e=.12;if(z.fi<z.W&&z.fi<b)z.fi=b;if(z.fi>z.W&&z.fi>b)z.fi=b;
var k=Math.abs(z.W-b)*(U-j)*.001/e;if(z.fi<z.W)z.fi=Math.min(z.W,z.fi+k);else z.fi=Math.max(z.W,z.fi-k)}var K=i==z.W?0:(z.fi-z.W)/(i-z.W);
z.yH.x=z.z.x+K*(z.yH.x-z.z.x);z.yH.y=z.z.y+K*(z.yH.y-z.z.y);this.LA.Fy(this.Pf,null);this.LA.BM(Q,this.H0)}if((Q.NC||Q.Fq||Q.tP)&&(!this.IQ.TZ||Q.uH)){if(Q.tP)Q.Kn();
this.at.BM(Q,this.H0,this.Pf);this.D7.abH(Q,this.zs);Q.Rr=!1}Q.uH=!1;Q.tP=!1;Q.NC=null;Q.ox=Q.vu=Q.Fq=!1};
dh.prototype.eS=function(x){var Q=x.target.tagName.toLowerCase(),c=x.target.getAttribute("type"),$=fM,z=$.Ma(x.code,$.ln);
if(!((Q=="input"||Q=="select"||Q=="button")&&$.Ma(x.code,$.TX))){if($.Ri(x)&&Q!="select"){x.preventDefault()}this.zs.kQ($.sk(x));
this.sM("down")}};dh.prototype.pD=function(x){if(x.key==" ")this.zs.vc();if(fM.Ma(x.code,fM.cO))this.zs.reset();
this.zs.ga(fM.sk(x));var Q=x.target.tagName.toLowerCase();if(fM.Ri(x)&&Q!="select"){x.preventDefault()}this.sM("up")};
dh.prototype.sM=function(x){var Q=this.zs,c=this.TW(),$=c!=null&&c.g.length!=0;if(this.Md.sl()!=null){if(Q.S(fM.En)||Q.S(fM.ln)){this.Md.alJ()}return}this.Sh();
var z=this.y1(fM.qP),j=Q.S(fM.Al),U=Q.S(fM.FT);if(z&&Q.S(fM.hy)&&x=="down"){var i=new jO(u.E.v),b=new jO(u.E.M);
i.f=X.RZ;if(U){i.data={d:"h_stepfwd"}}else{i.data={d:"h_stepbck"}}if(this.ap.sl()!=null&&this.ap.sl().sD()){}else this.T(i)}if(z){var i=new jO(u.E.v),e=new jO(u.E.G2),b=new jO(u.E.M);
if(Q.S(fM.Wd)&&Q.S(fM.q3)){b.data={d:u.H.LL,AD:"storwindow"};this.T(b)}if(!j&&x=="down")for(var k in k5.keys){var K=k5.keys[k],g=!0;
for(var F=0;F<K.length;F++)if(!Q.S(K[F]))g=!1;if(g){i.f=X.FQ;if(k=="hue2"&&U&&c.B[c.g[0]].add.SoLd==null)i.data={d:"auto",dw:3};
else i.data={d:"start",wU:k}}}if(Q.S(fM.H)){if(j){e.data={q4:"selectAllLayers",dx:{classID:"null",null:ep.QP("Lyr",!0)}}}else e.data=X.U_.sd(!0)}if(Q.S(fM.tt)){if(j)b.data={d:u.H.LL,AD:"csize"};
else if(c)b.data={d:u.H.mH,Qo:U}}if(Q.S(fM.MC)&&c.u){e.data=X.U_.sd()}if(Q.S(fM.E)&&x=="down"){if(U)e.data={q4:"mergeVisible"};
else e.data={q4:"mergeLayersNew",dx:{__name:"Merge Layers",classID:"Mrg2"}}}if(Q.S(fM.ff)){if(U&&this.Pf.Oj!=X.va)b.data={d:u.H.LL,AD:"afw_fade"};
else if(j){i.f=X.iT;i.data={d:"applylast"}}else b.data={d:u.H.xe}}if(Q.S(fM.Gh)){if(j&&c&&c.XR(c.g[0])){i.f=X.Mf;
i.data={d:eM.DF}}else{i.f=X.Mf;i.data={d:eM.xt,DV:U}}}if(Q.S(fM.FI)){b.data={d:u.H.hW,hF:ke.eH}}if(Q.S(fM.Wd)){if(U){i.data=null;
if(j)b.data={d:u.H.LL,AD:"finfo"};else e.data={q4:"inverse"}}else if(j)b.data={d:u.H.LL,AD:"isize"}}if(Q.S(fM.Wv)){e.data={q4:(U?"cut":"copy")+"ToLayer"}}if(Q.S(fM.ui)){b.data={d:u.H.LL,AD:"preferences"}}if(Q.S(fM.sE)){if(U){i.f=X.Mf;
i.data={d:eM.Hx}}else if(x=="down")b.data={d:u.H.LL,AD:"newproject"}}if(Q.S(fM.Kx)){if(j)b.data={d:u.H.LL,AD:"storwindow",AW:0};
else{b.data={d:u.H.OD};Q.reset()}}if(Q.S(fM.dp)){b.data={d:u.H.a01};Q.reset()}if(Q.S(fM.Pn)){b.data={d:u.H.hW,hF:ke.ZZ}}if(Q.S(fM.RO)&&x=="down"){if(U){if(j)b.data={d:u.H.LL,AD:"saveforweb"};
else b.data={d:u.H.js}}else b.data={d:u.H.E9}}if(Q.S(fM.ft)){if(U){i.f=X.Mf;i.data={d:eM.DN};this.T(i);
i.f=X.va;i.data={d:"again"}}else b.data={d:u.H.ax,f:X.va}}if(Q.S(fM.UE)){b.data={d:u.H.Nt}}if(Q.S(fM.h9)){this.LA.TB()}if(Q.S(fM.S3)&&c&&c.kN()){b.data={d:u.H.Xk}}if(Q.S(fM.$D)||Q.S(fM.Ax)){i.f=X.Mf;
i.data={d:eM.qz,Zq:0};if(Q.S(fM.$D))i.data.Zq=U?3:2;else i.data.Zq=U?0:1}if(Q.S(fM.DK)&&c){i.f=X.Mf;
i.data={d:eM.Ul}}if(Q.S(fM.ln)&&c){var R=0;if(U)R++;if(j)R+=2;i.f=X.kJ;i.data={d:"frompath",b3:[null,0,R]}}if(Q.S(fM.N6)){e.data=X.r7.ro(0)}if(Q.S(fM.TX)){var T=this.H0.length,D=Q.S(fM.FT)?-1:1;
if(T>1)this.LA.Bs((this.LA.aE()+T+D)%T)}if(Q.S(fM.KQ)){b.data={d:u.H.hW,hF:ke.V4}}if(Q.S(fM.hr)){b.data={d:u.H.hW,hF:ke.F_}}X.nF.a06(Q,i);
if(this.ap.sl()!=null&&this.ap.sl().sD()){}else{if(i.data)this.T(i);if(e.data)this.T(e);if(b.data)this.T(b)}}if(!z&&j){var a;
if(Q.S(fM.$D))a="Bckw";if(Q.S(fM.Ax))a="Frwr";if(Q.S(fM.DK))a="Back";if(Q.S(fM.N6))a="Frnt";if(a){var e=new jO(u.E.G2);
e.data={q4:"select",dx:{__name:"Select",classID:"slct",null:{t:"obj ",v:[{t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:a}}]},MkVs:{t:"bool",v:!1}}};
this.T(e)}}if(c&&c.g.length!=0){var _=c.B[c.g[0]],I=_.kk;if(I==1||I==3||z){var i=new jO(u.E.v),f=I==3?_.U5(c).F:_.Rz();
if(f){var y=f.fd?c.Q.O.join("")=="111"?1:2:0;i.f=X.QT;if(f&&Q.S(fM.En)&&y!=0){i.data={d:"mskView",b:0}}if(f&&Q.S(fM.a2k)){i.data={d:"mskView",b:y==1?0:1}}if(f&&Q.S(fM.axs)){i.data={d:"mskView",b:y==2?0:2}}if(i.data)this.T(i)}}}var Z=Q.Ch();
if(c&&z&&2<=Z&&Z<=5){var v=[1,1,1];if(Z>2){v=[0,0,0];v[Z-3]=1}var G=new jO(u.E.v,!0);G.f=X.Oi;G.data={d:"setcls",O:v};
this.T(G)}if(!Q.S(fM.qP)&&!j&&x=="down"){var i=new jO(u.E.v),b=new jO(u.E.M),q=this.s.map[this.Pf.Oj],h=-1;
for(var F=0;F<this.s.keys.length;F++)if(this.s.keys[F]&&this.y1(this.s.keys[F]))h=F;if(h!=-1){var r=null;
if(q.na!=h)r=this.s.OC[h];if(q.na==h&&U)r=(q.auq+1)%this.s.eh[h].length;if(r!=null){var H=this.s.eh[h][r].f.id,o=this.Pf.LO;
if((o==null||o.indexOf(parseInt(H))!=-1)&&!this.IQ.TZ)b.data={d:u.H.ax,f:H}}}if(Q.S(fM.FI))b.data={d:u.H.ax,f:X.Oi};
if(Q.S(fM.Pn))b.data={d:u.H.ax,f:X.aw};if(Q.S(fM.S3))b.data={d:u.H.hW,hF:ke.$s,Zq:2};if(Q.S(fM.MC))b.data={d:u.H.hW,hF:ke.$s,Zq:3};
if(b.data)this.T(b);if(Q.S(fM.aws)&&c&&c.g.length==1){var _=c.B[c.g[0]];i.f=X.Mf;var P=_.e6(0)||_.e6(1)||_.e6(2)||_.e6(31);
i.data={d:eM.HC,j7:P?[[!1,!1,!1,!1],[0,1,2,31]]:[[!0],[31]]};this.T(i)}var Z=Q.Ch();if($&&Z!=-1&&this.y1(fM.bF[Z])){var O=c.g[0],_=c.B[O],p=fM.Q9(Math.round(100*_.opacity/255),Z);
i.f=X.Mf;i.data={d:eM.ML,j7:Math.round(255*p/100)};this.T(i)}var C=this.Pf.y3;if(Q.S(fM.TX)){b.data={d:u.H.P2,b:C==0?1:0};
this.T(b)}if(Q.S(fM.ff)||Q.S(fM.En)&&C==2){var W=document.fullscreenElement!=null==(C==2);b.data={d:u.H.P2,b:C==0?2:0,qO:W};
this.T(b)}if(Q.S(fM.po)&&!this.IQ.TZ){i.f=X.kJ;i.data={d:"qmask"};this.T(i)}}if(!Q.S(fM.qP)&&!j&&U){var i=new jO(u.E.v),b=new jO(u.E.M);
if(Q.S(fM.DK))b.data={d:u.H.LL,AD:"shortcuts"};if(Q.S(fM.Gl))b.data={d:u.H.LL,AD:"fill"};if(Q.S(fM.a6O))b.data={d:u.H.LL,AD:"sel_feather"};
if($&&(Q.S(fM.LJ)||Q.S(fM.m8))){var O=c.g[0],_=c.B[O],J=cq.X$,t=J.length,Y=J.indexOf(_.s3);i.f=X.Mf;
i.data={d:eM.BT,j7:(Y+t+(Q.S(fM.LJ)?1:-1))%t};this.T(i)}if(b.data)this.T(b)}var i=new jO(u.E.v),l=x=="down"&&(this.y1(fM.Hm)||this.y1(fM.Z1));
if((z||j)&&l){i=new jO(u.E.G2);i.data=X.x7.YJ(z?"BckC":"FrgC");this.T(i)}else if(this.ap.sl()==null&&c&&l&&!this.IQ.TZ){if(c.u!=null){i=new jO(u.E.G2);
i.data={q4:"delete"}}else if(c.g.length!=0){var _=c.B[c.g[0]];if(_.kk==1)i.data={d:eM.zb};else if(_.kk==3)i.data={d:eM.aq};
else i.data={d:eM.bU};i.f=X.Mf}this.T(i)}if(this.ap.sl()!=null){if(Q.S(fM.En)){this.ap.sl().a0I()}else{this.ap.sl().sM(c,this,this.Pf,Q)}}if(this.Pf.Oj==null)return;
var q=this.T9();if(this.ap.sl()==null||this.s.cX)q.sM(c,this,this.Pf,Q)};dh.prototype.y1=function(x){var Q=this.zs,c=this.s.map[this.Pf.Oj].f,top=this.ap.sl(),$=this.TW();
return Q.S(x)&&!c.Da(x,$)&&(top==null||!top.Da(x,$))};dh.prototype.lS=function(x){var Q=this.a4g,c=this.cz;
this.Pf.y3=x;var $=E.rm,z=this.Ok.n;if($(z))this.Vw.removeChild(z);var j=this.gf.n;if($(j))this.Vw.removeChild(j);
var U=this.D7.n;if($(U))Q.removeChild(U);var i=this.LA.n;if($(i))Q.removeChild(i);var b=this.at.n;if($(b))Q.removeChild(b);
if(x==0){this.Vw.appendChild(z);this.Vw.appendChild(j);c.appendChild(Q);Q.appendChild(U);Q.appendChild(i);
Q.appendChild(b)}if(x==1){this.Vw.appendChild(z);Q.appendChild(i)}if(x==2){Q.appendChild(i)}this.LA.lS(x==2?1:0);
this.QM()};dh.prototype.an5=function(x){if(this.qt())return 1;if(E.anc()==0){this.Pf={};this.oN=function(Q,c){return Math.sqrt(Q*c)}}return-1};
dh.a6D=function(){var x=i9==0?[[{f:new X.qV,uM:bT},{f:new X.cj,uM:d0}],[{f:new X.Y1,uM:iJ,tU:0},{f:new X.GI,uM:ku,tU:0}],[{f:new X.HP,uM:bg,tU:0},{f:new X.Pk,uM:ae,tU:0},{f:new X.b0,uM:jb,tU:0}],[{f:new X.TH,uM:h5,tU:0},{f:new X.v_,uM:iX,tU:0},{f:new X.Rl,uM:dt,tU:0}],[{f:new X.a8x,uM:e2},{f:new X.a9e,uM:hZ},{f:new X.x5,uM:bz,tU:0},{f:new X.SB,uM:hY,tU:0}],[{f:new X.vt,uM:hJ},{f:new X.Qz,uM:bk,tU:0},{f:new X.gm,uM:h2}],[{f:new X.VI,uM:j5,tU:0},{f:new X.BR,uM:a2,tU:0},{f:new X.HP(!0),uM:k9,tU:0},{f:new X.b8,uM:hL,tU:0},{f:new X.azA,uM:e4,tU:0},{f:new X.M4,uM:ej,tU:0}],[{f:new X.PH,uM:j3,tU:0},{f:new X.Ar,uM:hw,tU:0},{f:new X.rt,uM:hH,tU:0}],[{f:new X.Z4,uM:e6,tU:0}],[{f:new X._F,uM:dS,tU:0},{f:new X.Mq,uM:gW,tU:0},{f:new X.uY(!0),uM:fw,tU:0}],[{f:new X._q,uM:gA,tU:0},{f:new X.uY,uM:fw,tU:0}],[{f:new X.UJ,uM:go,tU:0},{f:new X.aN,uM:gN,tU:0},{f:new X.jL,uM:ka,tU:0}],[{f:new X.r8,uM:fp,tU:0},{f:new X.N3,uM:jW,tU:0},{f:new X.XQ,uM:kG,tU:0}],[{f:new X.ca,uM:jd},{f:new X.CG,uM:jd}],[{f:new X.qj(0),uM:f_},{f:new X.vQ,uM:dy},{f:new X.qj(1),uM:f_},{f:new X.qj(2),uM:f_},{f:new X.qj(3),uM:f_},{f:new X.qj(4),uM:f_}],[{f:new X.i4,uM:hs},{f:new X.rM,uM:dk}],[{f:new X.Rect,uM:fs},{f:new X.Sl,uM:cg},{f:new X.AE,uM:ey},{f:new X.EX,uM:af},{f:new X.aM,uM:kK}],[{f:new X.Wo,uM:b1},{f:new X.VH,uM:fd}],[{f:new X.nF,uM:fi}]]:[[{f:new X.qV,uM:bT}],[{f:new X.rM,uM:dk}],[{f:new X.qj(0),uM:f_}],[{f:new X.vQ,uM:dy}],[{f:new X.ca,uM:jd},{f:new X.CG,uM:jd}],[{f:new X.AE,uM:ey}],[{f:new X.Rect,uM:fs},{f:new X.Sl,uM:cg},{f:new X.EX,uM:af},{f:new X.aM,uM:kK}],[{f:new X.amu,uM:b1}],[{f:new X.Wo,uM:b1},{f:new X.VH,uM:fd}],[{f:new X.nF,uM:fi}]],U="",i="";
if(i9==0&&!E.Tw())x[6].splice(2,1);var Q=i9==0?[fM.UE,fM.dm,fM.xv,fM.h9,fM.tt,fM.Wd,fM.Wv,fM.HK,fM.RO,fM.E,fM.Gh,null,fM.Kx,fM.ft,fM.dp,fM.H,fM.q3,fM.FI,fM.hy]:[fM.UE,fM.H,fM.dp,null,fM.ft,null,fM.dm,fM.FI,fM.hy],c={alY:[{f:X.QT,AY:!1,KR:[fM.atP,fM.r_]},{f:X.Oi,AY:!1,KR:[fM.r_]},{f:X.bb,AY:!0,KR:[fM.qP],zI:[X.ic]},{f:X.ic,AY:!0,KR:[fM.qP],zI:[X.bb]},{f:X.YW,AY:!0,KR:[fM.qP],zI:[X.T3,X.tD,X.cZ]},{f:X.T3,AY:!0,KR:[fM.qP],zI:[X.YW,X.J7,X.db,X.y4,X.Lw,X.NI]},{f:X.kU,AY:!0,KR:[fM.qP]}],eh:x,OC:[],keys:Q,ge:[{f:new X.abu,uM:hP},{f:new X.aoj,uM:i$},{f:new X.a05,uM:cm},{f:new X.vt(!0),uM:hJ},{f:new X.Aj,uM:aZ}],M9:[{f:new X.de},{f:new X.History},{f:new X.T8},{f:new X.so},{f:new X.vD},{f:new X.LC}],map:{},tR:null,cX:null,EQ:null},$=c.eh;
for(var F=0;F<$.length;F++){var z=$[F];if(e_=="---")continue;for(var j=0;j<z.length;j++)if(z[j].tU!=null&&z[j].tU!=i9){z.splice(j,1);
j--}if(z.length==0){$.splice(F,1);c.keys.splice(F,1);F--}}for(var F=0;F<c.eh.length;F++){var b=c.eh[F];
if(b=="---")continue;var e=c.keys[F];for(var j=0;j<b.length;j++){c.map[b[j].f.id]=b[j];b[j].na=F;b[j].auq=j;
var k=ah.get(b[j].f.name);i+="<li>"+b[j].f.id+": "+k+"</li>";U+="\t"+JSON.stringify(b[j].f.name)+", "+(e?"\""+e.Qw+"\"":"null")+", "+b[j].f.id+", // "+k+"\n"}c.OC[F]=0}for(var F=0;
F<c.ge.length;F++)c.map[c.ge[F].f.id]=c.ge[F];for(var F=0;F<c.M9.length;F++)c.map[c.M9[F].f.id]=c.M9[F];
return c};function gd(x){kw.call(this);if(x==null)return;this.ww=null;this.R0=null;this.n=E.p("div","sbar"+" "+x);
this.xr=new E.p("div","top");this.xr.innerHTML="> <";this.n.appendChild(this.xr);this.Kt=1;this.xr.addEventListener("click",this.ayz.bind(this),!1)}gd.prototype=new kw;
gd.prototype.ayz=function(x){if(this.ww!=null&&this.ww<500&&this.Kt==0)return;if(this.Kt==0)this.eY(!0);
else this.collapse(!0)};gd.prototype.amZ=function(x){this.Kt=x;this.xr.innerHTML=this.Kt==0?"< >":"> <"};
gd.prototype.awk=function(){var x=new jO(u.E.M,!0);x.data={d:u.H.B1};this.T(x)};gd.prototype.eY=function(x){this.amZ(1);
if(x)this.awk()};gd.prototype.collapse=function(x){this.amZ(0);if(x)this.awk()};gd.prototype.Dg=function(){return this.Kt==1};
function aB(x,Q){gd.call(this,"vcolumn");this.kC=x;this.a0g=Q;this.iN();this.Ca=E.p("div");this.Ca.setAttribute("style","cursor:default;");
this.am$=this.aDY.bind(this);this.aeu=this.axZ.bind(this);this.aeI=this.a5l.bind(this);E.KH(this.n,this.am$);
this.n.appendChild(this.Ca);this.Re=E.p("div");this.Ca.appendChild(this.Re);this.cD=-1;this.a4Y=E.p("div","float");
var c=this.PZ=E.p("canvas","gsicon"),$=Math.round(12*E.q_());c.width=c.height=$;var z=c.getContext("2d");
z.moveTo(2,2);z.lineTo($-2,$-2);z.moveTo(2,7);z.lineTo($-7,$-2);z.stroke();this.PZ.setAttribute("style","position:absolute; bottom:0;  left:0;  cursor:nesw-resize;");
E.J1(this.PZ);E.KH(this.PZ,this.am$);E.a7(c);this.ev=[];this.wX=[];this.a6$=null;this.oh=null;this.a4N=0}aB.prototype=new gd;
aB.prototype.aDY=function(x){var Q=x.target==this.PZ;if(!Q){if(x.target!=this.n)return;if(!this.Dg())return}else{var c=this.ev[this.cD].d1;
c.style.pointerEvents="none";var $=c.getBoundingClientRect();this.a6$=[$.width,$.height];this.wX[this.cD]=[$.width,$.height]}x.stopPropagation();
this.oh=E.GK(x,document.body);this.a4N=this.kC;E.d3(document,this.aeu);E.AU(document,this.aeI)};aB.prototype.axZ=function(x){var Q=E.GK(x,document.body);
if(this.Dg()){this.kC=this.a4N+this.oh.x-Q.x;this.iN()}else{var c=this.wX[this.cD],$=this.a6$;c[0]=$[0]+this.oh.x-Q.x;
c[1]=$[1]+Q.y-this.oh.y}var z=new jO(u.E.M,!0);z.data={d:u.H.B1};this.T(z)};aB.prototype.a5l=function(x){if(!this.Dg()){var Q=this.ev[this.cD].d1;
Q.style.pointerEvents="auto"}E.hY(document,this.aeu);E.Wr(document,this.aeI)};aB.prototype.a4V=function(x){x.k("showFloat",this.apc,this);
x.k("hideFloat",this.JU,this);this.ev.push(x);x.parent=this;this.Ca.appendChild(x.n)};aB.prototype.aiI=function(F){var x=this.ev[F];
x.removeEventListener("showFloat",this.apc,this);x.removeEventListener("hideFloat",this.JU,this);this.ev.splice(F,1);
x.parent=null;this.Ca.removeChild(x.n)};aB.prototype.acN=function(){return this.ev.length};aB.prototype.Ge=function(){for(var F=0;
F<this.ev.length;F++)this.ev[F].Ge()};aB.prototype.apc=function(x){this.Ge();var Q=this.a4Y;this.Re.appendChild(Q);
this.cD=this.ev.indexOf(x.currentTarget);var c=this.ev[this.cD].d1;E.Os(Q);Q.appendChild(c);Q.appendChild(this.PZ);
this.oN(this.ww,this.R0)};aB.prototype.JU=function(x){this.Ge();if(this.cD!=-1){this.Re.removeChild(this.a4Y);
this.cD=-1}};aB.prototype.iN=function(){function x(Q){return Math.round(Q*E.q_())/E.q_()}this.n.setAttribute("style","width: "+this.kC+"px; border-left-width:"+x(4)+"px; cursor:ew-resize;")};
aB.prototype.eY=function(x){this.iN();this.JU();for(var F=0;F<this.ev.length;F++)this.ev[F].eY();gd.prototype.eY.call(this,x)};
aB.prototype.collapse=function(x){this.n.removeAttribute("style");for(var F=0;F<this.ev.length;F++)this.ev[F].collapse();
gd.prototype.collapse.call(this,x)};aB.aq0=11;aB.prototype.oN=function(x,Q){this.ww=x;this.R0=Q;Q-=aB.aq0;
var c=this.ev.length;if(c==0)return;if(!this.Dg()){var $=Q<400?Q:400+(Q-400)*.5;for(var F=0;F<c;F++){var z=this.ev[F],j=this.wX[F];
z.oN(j?j[0]:this.kC,j?j[1]:$)}}else{var U=Q;for(var F=0;F<c;F++){var z=this.ev[F],i=z.ayM();if(F==c-1){i=U;
z.n.style.borderBottom="none"}z.oN(this.kC,i);U-=i+4}}};function kB(x){kw.call(this);this.n=E.p("div");
this.Ca=null;this.cM=0;this.zV=0;this.az8=x;this.ahy=this.Nn.bind(this);this.anI=this.G3.bind(this);
this.alm=this.zc.bind(this);this.NG=null;this.rS=null;this.xW=null;E.KH(this.n,this.ahy);var Q=this.n,$="<svg class=\"gsicon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">";
Q.addEventListener("touchmove",E.Ew,!1);this.abm=!0;this.Aw=[];var c=this.anS=E.p("div");c.setAttribute("style","float:right; padding:4px;display:none; position:relative;z-index:1;");
this.n.appendChild(c);var z=[[0,13,3],[0,13,4],[0,13,5],"Blog","API",$+"<path d=\"m21.325 9.308c-.758 0-1.425.319-1.916.816-1.805-1.268-4.239-2.084-6.936-2.171l1.401-6.406 4.461 1.016c0 1.108.89 2.013 1.982 2.013 1.113 0 2.008-.929 2.008-2.038s-.889-2.038-2.007-2.038c-.779 0-1.451.477-1.786 1.129l-4.927-1.108c-.248-.067-.491.113-.557.365l-1.538 7.062c-2.676.113-5.084.928-6.895 2.197-.491-.518-1.184-.837-1.942-.837-2.812 0-3.733 3.829-1.158 5.138-.091.405-.132.837-.132 1.268 0 4.301 4.775 7.786 10.638 7.786 5.888 0 10.663-3.485 10.663-7.786 0-.431-.045-.883-.156-1.289 2.523-1.314 1.594-5.115-1.203-5.117zm-15.724 5.41c0-1.129.89-2.038 2.008-2.038 1.092 0 1.983.903 1.983 2.038 0 1.109-.89 2.013-1.983 2.013-1.113.005-2.008-.904-2.008-2.013zm10.839 4.798c-1.841 1.868-7.036 1.868-8.878 0-.203-.18-.203-.498 0-.703.177-.18.491-.18.668 0 1.406 1.463 6.07 1.488 7.537 0 .177-.18.491-.18.668 0 .207.206.207.524.005.703zm-.041-2.781c-1.092 0-1.982-.903-1.982-2.011 0-1.129.89-2.038 1.982-2.038 1.113 0 2.008.903 2.008 2.038-.005 1.103-.895 2.011-2.008 2.011z\"/>",$+"<path d=\"M23.954 4.569c-.885.389-1.83.654-2.825.775 1.014-.611 1.794-1.574 2.163-2.723-.951.555-2.005.959-3.127 1.184-.896-.959-2.173-1.559-3.591-1.559-2.717 0-4.92 2.203-4.92 4.917 0 .39.045.765.127 1.124C7.691 8.094 4.066 6.13 1.64 3.161c-.427.722-.666 1.561-.666 2.475 0 1.71.87 3.213 2.188 4.096-.807-.026-1.566-.248-2.228-.616v.061c0 2.385 1.693 4.374 3.946 4.827-.413.111-.849.171-1.296.171-.314 0-.615-.03-.916-.086.631 1.953 2.445 3.377 4.604 3.417-1.68 1.319-3.809 2.105-6.102 2.105-.39 0-.779-.023-1.17-.067 2.189 1.394 4.768 2.209 7.557 2.209 9.054 0 13.999-7.496 13.999-13.986 0-.209 0-.42-.015-.63.961-.689 1.8-1.56 2.46-2.548l-.047-.02z\"/></svg>",$+"<path d=\"M23.9981 11.9991C23.9981 5.37216 18.626 0 11.9991 0C5.37216 0 0 5.37216 0 11.9991C0 17.9882 4.38789 22.9522 10.1242 23.8524V15.4676H7.07758V11.9991H10.1242V9.35553C10.1242 6.34826 11.9156 4.68714 14.6564 4.68714C15.9692 4.68714 17.3424 4.92149 17.3424 4.92149V7.87439H15.8294C14.3388 7.87439 13.8739 8.79933 13.8739 9.74824V11.9991H17.2018L16.6698 15.4676H13.8739V23.8524C19.6103 22.9522 23.9981 17.9882 23.9981 11.9991Z\"/></svg>"];
for(var F=0;F<z.length;F++){var j=new j7(z[F]);this.Aw.push(j);j.n.setAttribute("style","margin-left:"+(F<7?4:0)+"px;cursor:pointer;");
j.k("click",this.Di,this)}}kB.prototype=new kw;kB.prototype._=function(){var x=this.anS;E.Os(x);for(var F=0;
F<this.Aw.length;F++){var Q=this.Aw[F];if(F<5)Q._();x.appendChild(Q.n)}};kB.prototype.Di=function(x){var F=this.Aw.indexOf(x.currentTarget);
if(F==0){if(window.showCap)window.showCap();return}var Q=" issues learn blog api twitter facebook".split(" "),c=" //github.com/photopea/photopea/issues //www.photopea.com/learn //blog.photopea.com //www.photopea.com/api //www.reddit.com/r/photopea //www.twitter.com/photopeacom //www.facebook.com/photopea".split(" "),$=window.ga;
if($)$("send","event","Links",Q[F]);var z=new jO(u.E.M,!0);z.data={d:u.H.H_,link:c[F]};this.T(z)};kB.prototype.Nn=function(x){if(x.adr){x.preventDefault();
x.stopPropagation()}var Q=window;E.d3(Q,this.anI);E.AU(Q,this.alm);Q=this.Ca;this.NG=new bC(parseInt(Q.style.left),parseInt(Q.style.top));
this.rS=E.GK(x,this.n);this.xW=Q.getBoundingClientRect()};kB.prototype.G3=function(x){var Q=E.GK(x,this.n),c=this.NG.x+Q.x-this.rS.x,$=this.NG.y+Q.y-this.rS.y,z=this.cM-this.xW.width,j=this.zV-this.xW.height;
if(this.az8)this.Ca.style.left=Math.min(0,Math.max(z,c))+"px";else this.Ca.style.top=Math.min(0,Math.max(j,$))+"px";
if(c-10>0){this.rS.x=Q.x-10;this.NG.x=0}if(c+10<z){this.rS.x=Q.x+10;this.NG.x=z}};kB.prototype.zc=function(x){var Q=window;
E.hY(Q,this.anI);E.Wr(Q,this.alm)};kB.prototype.aoX=function(x){if(this.Ca){this.n.removeChild(this.Ca)}this.Ca=x;
this.n.appendChild(x);x.style.position="absolute";if(this.az8)x.style.left=0;else x.style.top=0};kB.prototype.oN=function(x,Q){this.cM=x;
this.zV=Q;this.n.setAttribute("style","position:relative; width: "+x+"px; height: "+Q+"px; overflow:hidden; white-space: nowrap; ");
var c=this.Ca.firstChild,$=this.anS,z=c?c.firstChild.getBoundingClientRect().width+80:1e9,j=170,U=this.abm&&x>z+j;
$[jk.hg][jk.avz]=U?"":jk.mO;var i=this.Aw;for(var F=0;F<i.length;F++){var b=F>4||x-z>500?"":jk.mO,e=i[F];
e.n.style.display=b}};kB.prototype.atQ=function(){this.Ca.style.left="0";this.Ca.style.top="0"};function kh(){kw.call(this);
this.n$=null;this.MT=kh.dp;this.aaV="";this.n=E.p("div","rightbar");this.gH=[new aB(300),new aB(268,!0)];
this.ev=[new hr,new hr,new hr,new hr,new hr,new hr,new hr];this.atO=[]}kh.prototype=new kw;kh.prototype._=function(){var x=this.MT;
for(var F=0;F<x.length;F++)x[F].G7._()};kh.dp=[{G7:new dI,Qu:3},{G7:new fc,Qu:1},{G7:new hW,Qu:4},{G7:new iM,Qu:2},{G7:new cj(!0),Qu:5},{G7:new dw(!0),Qu:5},{G7:new bA,Qu:0},{G7:new iK,Qu:5},{G7:new bM,Qu:3},{G7:new bQ,Qu:0},{G7:new bn,Qu:3},{G7:new cr,Qu:2},{G7:new kM,Qu:4},{G7:new kl,Qu:3},{G7:new iu,Qu:5},{G7:new cj(!1),Qu:5},{G7:new hE,Qu:2},{G7:new bS,Qu:3},{G7:new ky,Qu:1},{G7:new dx,Qu:0},{G7:new aC,Qu:5},{G7:new gB,Qu:6,nr:!0}];
if(E.Tw())kh.dp.push({G7:new bc,Qu:6,nr:!0});kh.dp.push({G7:new je,Qu:6,nr:!0},{G7:new a5,Qu:6,nr:!0});
(function(){var x=[{id:cC.Pn.asD,name:"Gallery",url:"plugins/gallery.html",icon:"===data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgBAMAAAB54XoeAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAB5QTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtyhvagAAAAp0Uk5TAP+mc4pfC+rILiKk3cQAAALjSURBVHic7dq/bxMxFAdwKy1HM16up4QtDCDYkv8gTIgtZWGNWMpIJKhgLAtriyrx71Lnh8/2e76c3/tOxW9olUb56Fvf3bPPOWNKlSpVqtSxPv6uIfXj1d77hOFs/bTeGc6r68UjuESCjTHPkF5dr801FrwxV1iwNS+x4MRs7a+3iNP5j5Vmxv5sEN7+fJnuwDkGHFlrB95hwLEDNxiwciDGM+Zpgw9v6vrXBxg4fr+/Lr6F54cYrNz1OtlAQK/Hf0eAI78bzPVgdRu0l40avAgblhdRCEYddKIFySS0VoJkErpRgmTO6P5nETiOPa+disBzCq5U4HMKflWB9xR8oQLfUfBSBTILA3eYReAtBWcqkHrd5ws4rOAHBX7aMCe2Ww2KwHsK6i49eHOAty94g4VPAfhJSjGNngUj7ko+0e/OYXoPMwrB+WDwcIIs4r9XQcSMxdJy/4kTEb2AJ0B3p08iChecy+NnLslboiWxtxWxIm9KFu1em6IRBbcVwcDTiHz1gUEfHXo/3QNGTYoe6FwwavQDI6bB6OryG4AMJD2v1YFMmx8UMQkyU+WgiCmQjGAU8Tx14FMgu9nkRUz0ySTIBvQipvpkEkzshrmIhxFmIvJgIqCL2NMneTC5XXeItIxenwKTAQ8RvT5JIrJgz35iGwRkInJgT0BacUQOzNrwjCMyYFZAEpEBM3dk21NgZsC4CVEwe8u47QeZPpgVkYCCPe2mD8weQVuLHlC06d6kQcEIRhEjUPitQJsCP8s8P2IIMvetuREDUHSIo4gBqPhepeVARcAuogdW4hG01VDwi8ZzETtQF9CtwjtQGfAYsQPVX501ISi+SLpaB6ByBG21AYioNRps0aA90FiwQYOPEcFggwbrBRps0GBdwAIW8AmBW6w3la8z+Zrhn7e5woIt/pkl4d1JqlbqpWFYs40xf5GgfdZtvMV50zvVLRSt1/ul8QPqccF4X7tUqVKl/uf6BxTPzN+MDvNvAAAAAElFTkSuQmCC"}];
for(var F=0;F<x.length;F++)kh.dp.push({G7:new aD(x[F],100+F),Qu:6,nr:!0})}());kh.prototype.atT=function(x){for(var F=0;
F<x.length;F++){var Q=x[F],c=new aD(Q,"plg_"+Q.name);this.MT.push({G7:c,Qu:6});this.atO.push(c.UH)}this._I()};
kh.prototype.Fy=function(x,Q){this.n$=x;var c=this.MT;for(var F=0;F<c.length;F++)c[F].G7.Fy(x,Q);if(Q==ke.NF||Q==ke.m6)this._I()};
kh.prototype.Za=function(x){var Q=this.MT;for(var F=0;F<Q.length;F++)Q[F].G7.Za(x)};kh.prototype.oN=function(x,Q){this.ww=x;
this.R0=Q;this._I();this.gH[0].oN(x,Q);this.gH[1].oN(x,Q)};kh.prototype._I=function(){var x=this.n$,Q=this.ww,c=this.R0;
if(x==null||Q==0)return;var $=x.o9.concat(this.atO),z=Q<500||Q<700&&Q<c,j=JSON.stringify($)+","+z;if(j!=this.aaV){this.aaV=j;
E.Os(this.n);var U=[];for(var F=0;F<this.gH.length;F++){var i=this.gH[F];U[F]=i.Dg();while(i.acN()!=0)i.aiI(0);
i.eY()}var b=[];for(var F=0;F<this.ev.length;F++){var e=this.ev[F];e.eY();while(e.af5()!=0)e.Ej(0);b.push(0)}for(var F=0;
F<$.length;F++){var k=this.ab6($[F].toString());if(k==null)continue;this.ev[k.Qu].Zy(k.G7);this.ev[k.Qu].Bs(0);
b[k.Qu]++}var K=[];for(var F=0;F<b.length;F++){if(b[F]==0)continue;var g=F<3||z?1:0,i=this.gH[g];i.parent=this;
i.a4V(this.ev[F]);K[g]=!0}for(var F=0;F<this.gH.length;F++)if(K[F])this.n.appendChild(this.gH[F].n);
this.gH[0].collapse();if(Q<700||this.n$.compact||!U[1]){this.gH[1].collapse()}var R=new jO(u.E.M,!0);
R.data={d:u.H.B1};this.T(R)}};kh.prototype.ab6=function(x){for(var F=0;F<this.MT.length;F++)if(this.MT[F].G7.UH==x)return this.MT[F]};
kh.prototype.aqf=function(x){var Q=this.ab6(x);this.ev[Q.Qu].Zy(Q.G7)};kh.prototype.BM=function(x,Q,c){var $=this.MT;
for(var F=0;F<$.length;F++)$[F].G7.BM(x,Q,c)};kh.prototype.Eu=function(x,Q,c,$,z){var j=this.MT;for(var F=0;
F<j.length;F++)j[F].G7.Eu(x,Q,c,$,z)};kh.prototype.CK=function(x,Q,c,$,z){var j=this.MT;for(var F=0;
F<j.length;F++)j[F].G7.CK(x,Q,c,$,z)};kh.prototype.km=function(x,Q,c,$,z){var j=this.MT;for(var F=0;
F<j.length;F++)j[F].G7.km(x,Q,c,$,z)};function ea(x,Q){gd.call(this,"toolbar");this.n.removeChild(this.xr);
this.zr=E.p("div","tools");this.n.appendChild(this.zr);this.LO=null;this.Oj=null;this.azs=Q;this.KX=null;
this.D9=null;this.aBT=-1;this.a7c={};this.aCu=x;this.s=null;this.cN=null;this.d4=null;this.MN=null;this.Q1=new an;
this.Q1.n.style.marginTop="5px";this.Q1.n.style.marginBottom="3px";this.Q1.parent=this;this.HI=new j7(E.Qk("lrs/mask"),!1,[6,6,1]);
this.HI.k("click",function(j){var U=new jO(u.E.v,!0);U.f=X.kJ;U.data={d:"qmask"};this.T(U)},this);var c=new cT(null,["Ctrl","Alt","Shift","No Touch"],!0,null,null,!0);
c.k(u.E.t,this.a5q,this);var $=E.p("span","rangecontFloat form padded");$.appendChild(c.n);$.setAttribute("style","position:absolute; width:119px; z-index:2;  padding-right:0px; ");
var z=this.n;this.anZ=[!1,!1,!1,!1];this.kz=new j7(E.Qk("kb"),!1,"Virtual Keys");this.kz.k("click",function(j){var U=this.kz.n.getBoundingClientRect();
$.style.top=U.top-110+"px";$.style.left=U.left+U.width+8+"px";if(E.rm($)){E.x3({n:$},z)}else{z.appendChild($);
E.KS({n:$})}},this)}ea.prototype=new gd;ea.prototype.a5q=function(x){var Q=x.target.h();this.kz.U(Q[0]||Q[1]||Q[2]||Q[3]);
var c=new jO(u.E.M,!0);for(var F=0;F<4;F++){if(Q[F]!=this.anZ[F]){c.data={d:u.H.aaQ,TZ:Q[F],awt:["ControlLeft","AltLeft","ShiftLeft","NoTouch"][F]};
this.T(c)}}this.anZ=Q.slice(0)};ea.prototype.abH=function(x,Q){this.KX=Q;this.D9=x;if(x==null||x.g.length==0||x.B[x.g[0]]==null)return;
var c=x.HI()!=null,$=x.Q.O,z=x.B[x.g[0]].kk,j=z==1||z==3||c||$[0]+$[1]+$[2]==1;this.Q1.azz(j);this.HI.U(c)};
ea.prototype.apI=function(x,Q){var c=x.length,$=[];for(var F=0;F<c;F++)$[F]=x[F].slice(0);x=$;var z=[1,2,4,5,7,8,7,9,11,12,14,15,14,16,10,11,1,3,17,18,7,6,13,14],j=Math.min(z.length/2,c-Q);
for(var F=0;F<j;F++){var U=z[2*F],i=z[2*F+1];x[U]=x[U].concat(x[i]);x[i]=null}for(var F=0;F<x.length;
F++)if(x[F]==null){x.splice(F,1);F--}return x};ea.prototype.aeb=function(x,Q){for(var F=0;F<Q.length;
F++)for(var c=0;c<Q[F].length;c++)if(Q[F][c].f.id==x)return F};ea.prototype.aBp=function(x){var Q=this.aCu;
this.cN=[];this.d4=[];this.MN=[];this.s=[];var c=Q.eh;if(x!=null&&this.azs)c=this.apI(c,x);var $=this.LO;
if($){var z=[];for(var F=0;F<c.length;F++){var j=[];for(var U=0;U<c[F].length;U++){var i=c[F][U];if($==null||$.indexOf(parseInt(i.f.id))!=-1)j.push(i)}if(j.length>0)z.push(j)}c=z}for(var F=0;
F<c.length;F++){var b=[],e=this.cN.length,k=null,K=-1;for(var U=0;U<c[F].length;U++){var i=c[F][U].f,g=this.aeb(i.id,Q.eh),R=Q.keys[g];
if(R==fM.FI&&U==1)R=fM.Pn;this.s.push(i);var T=new a1(i.name,R,i.Ga,this.cN.length,F,c[F].length>1);
this.cN.push(T);var D=this.a7c[i.id];if(D==null)D=0;if(D>K){K=D;k=T}T.k(u.E.t,this.CN,this);T.k("mover",this.Sy,this);
b.push({name:i.name,k5:i.Ga,KR:R?R.Qw:""})}this.d4.push(k);this.MN.push(b.length==1?null:[b,e])}};ea.prototype.oN=function(x,Q){var c=this.R0=Q,$=32;
if(1<E.q_()&&E.q_()<1.5)$=18+14*(1/E.q_());var z=39+23,j=Math.floor((c-z)/$);if(j!=this.aBT){this.aBT=j;
this.aBp(j);this.jM()}var U=this.d4.length*$+z,i=Math.min(1,c/U);if(.75<=i){this.zr.setAttribute("style","width:34px; transform-origin: top left; transform: scale("+i+","+i+");");
this.n.setAttribute("style","height:"+(Q-2)+"px;")}else{c-=4;this.zr.setAttribute("style","height: "+c+"px;  width:"+Math.ceil(U/c)*34+"px");
this.n.setAttribute("style","")}};ea.prototype._=function(){if(this.s==null)return;for(var F=0;F<this.cN.length;
F++)this.cN[F]._()};ea.prototype.CN=function(x){var Q=new jO(u.E.M,!0);Q.data={d:u.H.ax,f:this.s[x.id].id};
this.T(Q)};ea.prototype.apP=function(x){var Q=x.target.a9j+x.target.Vk()[0];this.cN[Q].zc(null,!0)};
ea.prototype.Sy=function(x){var Q=this.KX,c=new jO(u.E.M,!0);c.data={d:u.H.ih};this.T(c);var $=x.target,z=this.MN[$.na];
if(z==null)return;var j=new ev(z[0],null,!0);j.a9j=z[1];j.na=$.na;j.k("select",this.apP,this);j.parent=this;
j._();var U=$.n.getBoundingClientRect(),c=new jO(u.E.M,!0);c.data={d:u.H.A_,G7:j,x:U.left+U.width+8,y:U.top};
if(Q==null||!(Q.S(fM.r_)||Q.S(fM.qP)))this.T(c)};ea.prototype.jM=function(x){if(x==null)x=this.Oj;this.Oj=x;
if(this.s==null)return;this.a7c[x]=Date.now();var Q=-1;for(var F=0;F<this.s.length;F++)if(this.s[F].id==x)Q=F;
for(var F=0;F<this.cN.length;F++){var c=this.cN[F];c.a7L(Q==F)}if(Q==-1)return;this.d4[this.cN[Q].na]=this.cN[Q];
E.Os(this.zr);var $=this.d4;for(var F=0;F<$.length;F++){this.zr.appendChild($[F].n)}if(!this.azs)return;
this.zr.appendChild(this.Q1.n);if(this.R0>640)this.zr.appendChild(this.HI.n);this.zr.appendChild(this.kz.n)};
ea.prototype.Fy=function(x,Q){if(Q==ke.m6&&x.LO){this.LO=x.LO;this.aBp();this.jM()}this.Q1.avv(x.Gj,x.QI);
if(i9==1&&Q==ke.hV){this.Q1.aiM(x,this.D9)}};function a1(x,Q,c,$,z,j){kw.call(this);this.JW=0;this.o3=this.apG.bind(this);
this.na=z;this.Kg=$;this.Qi=x;this.Ut=Q;this.abS=j;this.Ga=c;this.n=E.p("button","");this.n.innerHTML=E.Qk(this.Ga);
if(this.abS){var U=E.p("img","gsicon");U.setAttribute("src",PIMG["tools/corner"]);U.setAttribute("style","position:absolute; right:0;  bottom:0; width:100%; height:100%;");
this.n.appendChild(U)}this.n.addEventListener("touchstart",E.Ew,!1);this._();E.KH(this.n,this.Nn.bind(this));
E.AU(this.n,this.zc.bind(this));this.n.addEventListener("contextmenu",this.o3,!1);this.n.addEventListener("contextmenu",a1.ce,!1)}a1.prototype=new kw;
a1.ce=function(x){x.stopPropagation();x.preventDefault();return!1};a1.prototype._=function(){var x=this.Ut?" ("+this.Ut.Qw+")":"";
this.n.setAttribute("title",ah.get(this.Qi)+x)};a1.prototype.Nn=function(x){a1.GH=this.Kg;this.JW=setTimeout(this.o3,160)};
a1.prototype.zc=function(x,Q){if(Q==null&&a1.GH!=this.Kg)return;clearTimeout(this.JW);var c=new jO(u.E.t,!1);
c.target=this;c.id=this.Kg;this.T(c)};a1.prototype.apG=function(x){var Q=new jO("mover",!1);Q.target=this;
Q.id=this.Kg;this.T(Q)};a1.prototype.a7L=function(x){this.n.className=x?"toolbtn active":"toolbtn"};
function hV(){kw.call(this);this.n=E.p("div","topbar");this.ep=E.p("span");this.ajs=E.p("span");this.a4b=0;
this.n.appendChild(this.ep);this.n.appendChild(this.ajs);this.Sf=null;this.fH=null;this.Kw=[];this.o9=[];
var x=this.Nn.bind(this);for(var F=0;F<hV.data.length;F++){var Q=E.p("button");this.Kw.push(Q);var c=hV.data[F];
Q.addEventListener("mouseover",x,!1);E.KH(Q,x)}this.yl=new j7([0,13,0],!1,null,!0);this.yl.k("click",this.l0,this);
this.CY=new j7("Donate",!1,null,!0);this.CY.k("click",this.l0,this);this.mP=new j7(E.Qk("tools/zoom",null,"autoscale"),!1,[12,86]);
this.mP.k("click",this.l0,this);this.Ed=new j7("<svg class=\"gsicon\" version=\"1.1\"  width=\"20\" height=\"20\" viewBox=\"8 8 20 20\"><path d=\"m 10,16 2,0 0,-4 4,0 0,-2 L 10,10 l 0,6 0,0 z\"></path><path d=\"m 20,10 0,2 4,0 0,4 2,0 L 26,10 l -6,0 0,0 z\"></path><path d=\"m 24,24 -4,0 0,2 L 26,26 l 0,-6 -2,0 0,4 0,0 z\"></path><path d=\"M 12,20 10,20 10,26 l 6,0 0,-2 -4,0 0,-4 0,0 z\"></path></svg>",!1,"Fullscreen");
this.Ed.k("click",this.l0,this)}hV.prototype=new kw;hV.prototype.ac3=function(){if(this.o9.length!=0)return;
for(var F=0;F<hV.data.length;F++){var x=hV.data[F],Q=new ev(x.items,x.yz);Q.parent=this;this.o9.push(Q)}this._()};
hV.prototype._=function(){this.yl._();this.mP._();this.Ed._();for(var F=0;F<this.Kw.length;F++)this.Kw[F].textContent=ah.get(hV.data[F].name);
this.aoA();for(var F=0;F<this.o9.length;F++)this.o9[F]._()};hV.prototype.l0=function(x){var Q=new jO(u.E.M,!0);
if(x.target==this.yl)Q.data={d:u.H.LL,AD:"account"};else if(x.target==this.CY)Q.data={d:u.H.LL,AD:"confirm",ka:function(){},aCG:!0,b:"<h2 style=\"margin-top:0;\">Donate $8 and remove ads for 30 days!</h2><p>Press \"Account\" at the top and get a 30-day Premium!</p></p>All our payments are one-time payments (there is no subscription).</p>"};
else if(x.target==this.mP)Q.data={d:u.H.xe};else Q.data={d:u.H.P2,qO:!0};this.T(Q)};hV.prototype.a8n=function(x,Q){this.Sf=x;
this.fH=Q};hV.prototype.Fy=function(x,Q){this.fH=x;if(Q==ke.m6){var c=x.a0z;E.Os(this.ep);for(var F=0;
F<this.Kw.length;F++){var $=hV.data[F];if(c==null||c[F]==1||c[F]instanceof Array)if($.tU==null||$.tU==i9)this.ep.appendChild(this.Kw[F]);
if(c!=null&&c[F]instanceof Array){this.ac3();this.o9[F].aAM(c[F])}}var z=this.ajs;E.Os(z);if(x.Lk){z.appendChild(this.yl.n);
z.appendChild(this.CY.n)}z.appendChild(this.mP.n);z.appendChild(this.Ed.n)}this.aoA()};hV.prototype.aoA=function(x,Q){var c=this.yl,$=12255232;
if(dQ.rf())$=dQ.OT()?43520:16755200;c.n.setAttribute("style","color:#ffffff; background-color:#"+d.vg($));
this.CY.n.style.display=dQ.OT()?"none":""};hV.prototype.Nn=function(x){this.ac3();var F=this.Kw.indexOf(x.currentTarget),Q=this.o9[F];
if(x.type=="mouseover"&&!E.rm(this.o9[this.a4b].n))return;if(E.rm(Q.n))return;x.adr=!0;this.a4b=F;for(var F=0;
F<hV.data.length;F++)this.o9[F].update(this.Sf,this.fH);var c=x.target.getBoundingClientRect(),$=new jO(u.E.M,!0);
$.data={d:u.H.A_,G7:Q,x:c.left,y:c.top+c.height+2,awK:!0};this.T($)};hV.akR=function(x){var Q=fM,c=Q.qP,$=Q.FT,z=Q.Al,j=function(e){return{w:e!=null}},U=function(e){return{w:e!=null&&e.u!=null}},i={name:[0,5],tU:0,items:[{name:[7,0],w:j,KR:[c,Q.H]},{name:[7,1],KR:[c,Q.MC],w:U},{name:[7,2],KR:[$,c,Q.Wd],w:U,P$:!0},{name:"Remove BG",w:function(e){return{w:E.Tw()&&e!=null&&e.g.length!=0&&!e.B[e.g[0]].rect._6()}}},{name:[7,8],w:j,Q2:!0},{name:[7,13],Q2:!0,w:function(e){return{w:e!=null&&e.g.length!=0&&!e.B[e.g[0]].rect._6()}},P$:!0},{name:[7,11],Q2:!0,w:function(e){return{w:e!=null&&e.g.length!=0&&!e.B[e.g[0]].rect._6()}}},{name:[7,3],w:j,P$:!0,sub:[{name:[7,9],Q2:!0,w:U},{name:[19,3,0],Q2:!0,w:U},{name:[7,4],Q2:!0,w:U},{name:[7,5],Q2:!0,w:U},{name:[7,6],Q2:!0,w:U,KR:"Shift+F6"}]},{name:"Grow",w:U},{name:"Similar",w:U,P$:!0},{name:[7,10],w:U,P$:!0},{name:[6,6,1],w:function(e){return{w:e!=null,H5:e!=null&&e.HI()!=null}},KR:[Q.po],P$:!0},{name:[[23,6],[17,2]]},{name:["VAR0 VAR1",[1,2],[17,2]],w:U}],yz:[{K:u.E.G2,C:X.U_.sd(!0)},{K:u.E.G2,C:X.U_.sd()},{K:u.E.G2,C:{q4:"inverse"}},{K:u.E.v,f:X.kJ,C:{d:"bgrm",b:1}},{K:u.E.M,C:{d:u.H.LL,AD:"crange"}},{K:u.E.M,C:{d:u.H.LL,AD:"magiccut"}},{K:u.E.M,C:{d:u.H.LL,AD:"redge"}},{sub:[{K:u.E.M,C:{d:u.H.LL,AD:"sel_border"}},{K:u.E.M,C:{d:u.H.LL,AD:"sel_smoothness"}},{K:u.E.M,C:{d:u.H.LL,AD:"sel_expand"}},{K:u.E.M,C:{d:u.H.LL,AD:"sel_contract"}},{K:u.E.M,C:{d:u.H.LL,AD:"sel_feather"}}]},{K:u.E.G2,C:{q4:"grow",dx:{classID:"null",null:{t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]}}}},{K:u.E.G2,C:{q4:"similar",dx:{classID:"null",null:{t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]}}}},{K:u.E.M,C:{d:u.H.ax,f:X.Um}},{K:u.E.v,f:X.kJ,C:{d:"qmask"}},{K:u.E.M,C:{d:u.H.LL,AD:"loadsel"}},{K:u.E.M,C:{d:u.H.LL,AD:"savesel"}}]};
if(x){var b=i.items.length-1;i.items.splice(b-2,0,{name:[6,49],KR:[c,Q.Wv],P$:!0});i.yz.splice(b-2,0,{K:u.E.G2,C:{q4:"copyToLayer"}});
i.items.splice(b-1,0,{name:[10,16],KR:[z,c,Q.ft]});i.yz.splice(b-1,0,{K:u.E.M,C:{d:u.H.ax,f:X.va}})}return i};
hV.k7=function(x,Q){if(x==null||x.g.length==0)return!1;var c=x.B[x.g[0]];return c.add.TySh!=null&&Q.Oj==X.gr};
hV.ad2=function(){var x=fM,Q=x.qP,c=x.FT,$=x.Al,z=function(j){return{w:j!=null}};return[[{name:[5,0],KR:[Q,x.S3],w:function(j,U){return{w:j!=null&&(j.kN()||hV.k7(j,U))}}},{name:[5,1],KR:[Q,x.tt],w:z},{name:[5,2],KR:[Q,x.UE],w:function(j,U){return{w:hV.k7()||E.jA()||U.sn!=null||U.XY!=null||U.aa7!=null}}},{name:[2,2],w:function(j,U){return{w:j!=null&&(j.u!=null||hV.k7(j,U))}},KR:"Delete",P$:!0}],[{K:u.E.M,C:{d:u.H.Xk}},{K:u.E.M,C:{d:u.H.mH}},{K:u.E.M,C:{d:u.H.Nt}},{K:u.E.G2,C:{q4:"delete"}}]]};
hV.data=function(){var x=fM,Q=x.qP,c=x.FT,$=x.Al,z=function(R){return{w:R!=null&&R.g.length!=0}},j=function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].add.SoLd!=null}},U=function(R){return{w:R!=null}},i=function(R){return{w:R!=null&&R.hS(!1)}},b=[],e=[],k="none maxx avrg medn minn rang stdv summ vari".split(" "),K=[[22,5,0],[24,17,2],[24,3,0],[24,7,3],[24,17,3],[12,12],"Standard Deviation","Summation","Variance"];
for(var F=0;F<k.length;F++){b.push({name:K[F],w:function(R,T){if(R==null||R.g.length!=1)return{w:!1};
var D=R.B[R.g[0]].add.SoLd;if(D==null)return{w:!1};return{w:!0,H5:D.Impr.v.classID==this.a9y}}.bind({a9y:k[F]})});
e.push({K:u.E.v,f:X.Mf,C:{d:eM.Z3,j7:k[F]}})}var g=hV.ad2(!0);return[{name:[0,0],items:[{name:[5,3],KR:[$,Q,x.sE],title:[11,7],Q2:!0},{name:[1,0],KR:[Q,x.Kx],Q2:!0},{name:[1,11],Q2:!0,w:U},{name:["VAR0 VAR1",[1,0],[0,14]],P$:!0,sub:[{name:"Storage",Q2:!0,KR:[$,Q,x.Kx]},{name:[1,5],Q2:!0},{name:[11,0],Q2:!0},{name:["PSD VAR0",[25,0]],Q2:!0}]},{name:[1,18],P$:!0,w:U,sub:[{name:"PNG",KR:"Imgur.com",w:function(R,T){return{w:R!=null&&T.Cg}}},{name:"JPG",KR:"Imgur.com",w:function(R,T){return{w:R!=null&&T.Cg}}},{name:"PSD",KR:"Photopea.com",w:function(R,T){return{w:R!=null&&T.Cg&&!R.lO}}}]},{name:"Save ...",KR:[Q,x.RO],w:function(R,T){var D=ah.get([1,2]),a=!0;
if(R){if(R.QJ)D+=" ("+ah.get([6,7,1])+")";if(R.uA)D+=" (Google Drive)";if(R.Hn)D+=" ("+Storage.list[R.Hn[0]][0]+")";
a="psd jpg png gif webp svg bmp".split(" ").indexOf(R.ml)!=-1}return{w:R!=null&&(R.Hn!=null||R.ph!=null&&a||R.QJ!=null||R._g!=null&&R._g.ux!=null||R.uA!=null||T.XG.save!=null),LT:D}}},{name:i9==0?[1,3]:"Save as AI",w:function(R,T){return{w:R!=null&&T.Cg}}},{name:["VAR0 VAR1",[1,2],[0,14]],w:U,sub:[{name:(i9==0?"PSD":"AI")+" to Storage",w:function(R,T){return{w:R!=null&&T.Cg}}},{name:["VAR0 PSD/PSB",[1,2]],Q2:!0,w:function(R,T){return{w:R!=null&&T.Cg}}}]},{name:[1,8],w:U,sub:function(){var R=ar.c8(0),T=[];
for(var F=0;F<R.length;F++)T.push({name:R[F],KR:"."+R[F].toLowerCase()});T.push({name:[0,14],sub:function(){var R=ar.c8(1),T=[];
for(var F=0;F<R.length;F++)T.push({name:R[F],KR:"."+R[F].toLowerCase()});return T}()});return T}()},{name:[1,4],Q2:!0,w:U,P$:!0},{name:[1,9],Q2:!0,w:U},{name:"Export Color Lookup",Q2:!0,w:U,P$:!0},{name:[1,14],Q2:!0,w:U,P$:!0},{name:[1,17],sub:[{name:"Batch",Q2:!0},{name:"PDF Presentation",Q2:!0},{name:"Convert Formats",Q2:!0},{name:"Generate Mockups",Q2:!0,w:U}]},{name:[1,10],Q2:!0}],yz:[{K:u.E.M,C:{d:u.H.LL,AD:"newproject"}},{K:u.E.M,C:{d:u.H.OD}},{K:u.E.M,C:{d:u.H.OD,amX:!0}},{sub:[{K:u.E.M,C:{d:u.H.LL,AD:"storwindow",AW:0}},{K:u.E.M,C:{d:u.H.LL,AD:"open_from_url"}},{K:u.E.M,C:{d:u.H.LL,AD:"camera"}},{K:u.E.M,C:{d:u.H.LL,AD:"res0"}}]},{sub:[{K:u.E.M,C:{d:u.H.gl,mN:"png"}},{K:u.E.M,C:{d:u.H.gl,mN:"jpg"}},{K:u.E.M,C:{d:u.H.gl,mN:"psd"}}]},{K:u.E.M,C:{d:u.H.E9}},{K:u.E.M,C:{d:u.H.js}},{sub:[{K:u.E.M,C:{d:u.H.LL,AD:"storwindow",AW:1}},{K:u.E.M,C:{d:u.H.LL,AD:"savepsb"}}]},{sub:function(){var R=ar.c8(0),T=[];
for(var F=0;F<R.length;F++)T.push({K:u.E.M,C:{d:u.H.LL,AD:"saveforweb",mN:F}});T.push({sub:function(){var D=ar.c8(0).length,R=ar.c8(1),T=[];
for(var F=0;F<R.length;F++)T.push({K:u.E.M,C:{d:u.H.LL,AD:"saveforweb",mN:D+F}});return T}()});return T}()},{K:u.E.M,C:{d:u.H.LL,AD:"saveforweb",mN:5,acz:!0}},{K:u.E.M,C:{d:u.H.LL,AD:"eassets"}},{K:u.E.M,C:{d:u.H.LL,AD:"exlut"}},{K:u.E.M,C:{d:u.H.LL,AD:"finfo"}},{sub:[{K:u.E.M,C:{d:u.H.LL,AD:"batch"}},{K:u.E.M,C:{d:u.H.LL,AD:"pdfpres"}},{K:u.E.M,C:{d:u.H.LL,AD:"cformat"}},{K:u.E.M,C:{d:u.H.LL,AD:"mockups"}}]},{K:u.E.M,C:{d:u.H.LL,AD:"script"}}]},{name:[0,1],items:[{name:[2,8],w:U},{name:[2,0],w:U,KR:[c,Q,x.hy]},{name:[2,1],w:U,KR:[Q,x.hy],P$:!0},{name:[2,11],KR:[c,Q,x.ff],P$:!0,Q2:!0,w:function(R,T){return{w:ew.au6(R)&&T.Oj!=X.va}}},g[0][0],g[0][1],{name:[5,7],KR:[c,Q,x.tt],w:function(R){return{w:R!=null&&R.kN()}}},g[0][2],g[0][3],{name:[2,3],w:i,Q2:!0,KR:[c,x.Gl]},{name:[14,9],w:i,Q2:!0,P$:!0},{name:[10,48],w:i},{name:[10,46],w:function(R){return{w:X.Aj.g3(R)}}},{name:[10,16],w:U,KR:[$,Q,x.ft]},{name:[2,4],w:U,sub:et.ary()},{name:[2,10,1],w:U},{name:[2,10,0],w:U,P$:!0},{name:[12,87],w:U,sub:[{name:[12,62],w:U},{name:[9,3],w:U},{name:[10,31],w:function(R){return{w:R!=null&&R.zo()[1].length!=0}}}]},{name:[1,15],Q2:!0},{name:[12,79],Q2:!0,KR:[Q,x.ui]},{name:[1,13],Q2:!0}],yz:[{K:u.E.v,f:X.RZ,C:{d:"h_undoredo"}},{K:u.E.v,f:X.RZ,C:{d:"h_stepfwd"}},{K:u.E.v,f:X.RZ,C:{d:"h_stepbck"}},{K:u.E.M,C:{d:u.H.LL,AD:"afw_fade"}},g[1][0],g[1][1],{K:u.E.M,C:{d:u.H.mH,Qo:!0}},g[1][2],g[1][3],{K:u.E.M,C:{d:u.H.LL,AD:"fill"}},{K:u.E.M,C:{d:u.H.LL,AD:"stroke"}},{K:u.E.M,C:{d:u.H.ax,f:X.Ks}},{K:u.E.v,f:X.iT,C:{d:"start",PU:"rigidTransform"}},{K:u.E.M,C:{d:u.H.ax,f:X.va}},{sub:et.aC2()},{K:u.E.G2,C:{q4:"align",dx:{classID:"null",null:{t:"obj ",v:[{t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Trgt"}}]},Usng:{t:"enum",v:{ADSt:"ADSContent"}},alignToCanvas:{t:"bool",v:!1},Aply:{t:"enum",v:{projection:"Auto"}},vignette:{t:"bool",v:!1},radialDistort:{t:"bool",v:!1}}}},{K:u.E.v,f:X.Mf,C:{d:eM.DP}},{sub:[{K:u.E.M,C:{d:u.H.hK,hF:0}},{K:u.E.M,C:{d:u.H.hK,hF:1}},{K:u.E.M,C:{d:u.H.hK,hF:2}}]},{K:u.E.M,C:{d:u.H.LL,AD:"pmanager"}},{K:u.E.M,C:{d:u.H.LL,AD:"preferences"}},{K:u.E.M,C:{d:u.H.LL,AD:"locstor"}}]},{name:[0,2],items:[{name:[12,36],w:U,P$:!0,sub:[{name:"RGB",w:function(R){if(R==null)return{w:!1};
return{H5:R.add.fcmy==null,w:!0}}},{name:"CMYK",w:function(R){if(R==null)return{w:!1};return{H5:R.add.fcmy!=null,w:!0}}}]},{name:[3],w:U,P$:!0,sub:function(){var R=[];
for(var T in k5.names){R.push({name:k5.names[T],Q2:jH[T]!=null,KR:k5.keys[T],P$:k5.apr.indexOf(T)!=-1});
if(T=="selc"){R.push({name:["VAR0/VAR1",[19,6,0],[19,6,2]],Q2:!0,P$:!0});R.push({name:[19,7,0],KR:[Q,c,x.q3],w:i});
R.push({name:[4,18],Q2:!0,w:i})}}return R}()},{name:[4,16,0],w:i},{name:[4,16,1],w:i},{name:[4,16,2],w:i,P$:!0},{name:[11,11,1],w:i,Q2:!0},{name:[11,11,0],w:i,Q2:!0,P$:!0},{name:[11,3],w:U,Q2:!0,KR:[$,Q,x.tt]},{name:[11,10],w:U,Q2:!0,KR:[$,Q,x.Wd]},{name:[2,4],w:U,sub:[{name:["VAR0 90\xB0 \u21BB",[2,5]]},{name:["VAR0 90\xB0 \u21BA",[2,5]]},{name:["VAR0 180\xB0",[2,5]]},{name:[[2,6],[22,4,2]]},{name:[[2,6],[22,4,3]]}]},{name:[11,12,1],w:function(R){return{w:R!=null&&R.u!=null}}},{name:[11,12,0],w:U,KR:[Q,x.N6],Q2:!0},{name:[11,12,2],w:U,P$:!0},{name:[12,53],w:U},{name:[2,12],w:i,Q2:!0,P$:!0},{name:[2,14],w:U,Q2:!0}],yz:[{sub:[{K:u.E.v,f:X.kU,C:{d:"fcmy",b:0}},{K:u.E.v,f:X.kU,C:{d:"fcmy",b:1}}]},{sub:function(){var R=[];
for(var T in k5.names){R.push({K:u.E.v,f:X.FQ,C:{d:"start",wU:T}});if(T=="selc"){R.push({K:u.E.v,f:X.iT,C:{d:"start",PU:"adaptCorrect"}});
R.push({K:u.E.G2,C:{q4:"desaturate"}});R.push({K:u.E.v,f:X.FQ,C:{d:"start",wU:"matc"}})}}return R}()},{K:u.E.G2,C:{q4:"levels",dx:{classID:"Lvls",Auto:{t:"bool",v:!0}}}},{K:u.E.G2,C:{q4:"levels",dx:{classID:"Lvls",AuCo:{t:"bool",v:!0}}}},{K:u.E.G2,C:{q4:"levels",dx:{classID:"Lvls",autoBlackWhite:{t:"bool",v:!0},autoNeutrals:{t:"bool",v:!0}}}},{K:u.E.M,C:{d:u.H.LL,AD:"rcolors"}},{K:u.E.M,C:{d:u.H.LL,AD:"vbitmap"}},{K:u.E.M,C:{d:u.H.LL,AD:"csize"}},{K:u.E.M,C:{d:u.H.LL,AD:"isize"}},{sub:[{K:u.E.G2,C:X.Y.Kz(!0,90)},{K:u.E.G2,C:X.Y.Kz(!0,-90)},{K:u.E.G2,C:X.Y.Kz(!0,-180)},{K:u.E.G2,C:X.Y.Kz(!1,"Hrzn")},{K:u.E.G2,C:X.Y.Kz(!1,"Vrtc")}]},{K:u.E.G2,C:{q4:"crop",dx:{__name:"Crop",classID:"Crop"}}},{K:u.E.M,C:{d:u.H.LL,AD:"trim"}},{K:u.E.G2,C:{q4:"revealAll",dx:{classID:"RvlA"}}},{K:u.E.G2,C:{q4:"duplicate",dx:{classID:"Dplc",null:ep.QP("Dcmn",!0)}}},{K:u.E.v,f:X.FQ,C:{d:"start",wU:"aply"}},{K:u.E.M,C:{d:u.H.LL,AD:"varsdats"}}]},{name:[0,3],items:[{name:[5,3],w:U,sub:[{name:[0,3],KR:[c,Q,x.sE]},{name:[0,4]},{name:[1,16,0],Q2:!0},{name:[1,16,3],Q2:!0,P$:!0},{name:[6,49,0],KR:[Q,x.Wv]},{name:[6,49,1],KR:[c,Q,x.Wv],w:function(R){return{w:R!=null&&R.u!=null&&R.hS(!1)}}}]},{name:[6,0],w:z,KR:[Q,x.Wv]},{name:[11,4],w:z},{name:[5,4],w:z,P$:!0},{name:[11,6],w:z,P$:!0,sub:kF._l(!0)},{name:[6,48,1],w:U,sub:[{name:[6,48,0,0]},{name:[6,48,0,1]},{name:[6,48,0,2]}]},{name:[6,1],w:U,P$:!0,sub:kF.aDO()},{name:[6,2],w:U,sub:[{name:[6,4],w:function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].Rz()==null}}},{name:[6,5,0],w:function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].Rz()==null}}},{name:[6,5,1],w:function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].Rz()==null&&R.u!=null}}},{name:[6,5,2],w:function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].Rz()==null&&R.u!=null}}},{name:[6,5,3],w:function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].Rz()==null}},P$:!0},{name:[5,4],w:function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].Rz()!=null}}},{name:[5,8],w:function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].Rz()!=null&&R.hS(!1,!0)}}},{name:["VAR0/VAR1",[5,5],[5,6]],w:function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].Rz()!=null}}}]},{name:[6,3],w:U,sub:[{name:[6,4],w:function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].add.vmsk==null}}},{name:[6,5,0],w:function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].add.vmsk==null}}},{name:[12,76,7],w:function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].add.vmsk==null}},P$:!0},{name:[5,4],w:function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].add.vmsk!=null}}},{name:["VAR0/VAR1",[5,5],[5,6]],w:function(R){return{w:R!=null&&R.g.length!=0&&R.B[R.g[0]].add.vmsk!=null}}}]},cr.a2a(!0),{name:[6,7,1],w:U,P$:!0,sub:[{name:[6,7,0],P$:!0},{name:"Open (Edit Contents)",w:j,Q2:!0},{name:"Replace Contents",w:j,Q2:!0},{name:"Export Contents",w:j,Q2:!0,P$:!0},{name:[6,36,4],w:j,sub:b},{name:"Turn into JPG",w:j}]},{name:[6,8],w:cr.alx},{name:[6,34],P$:!0,w:function(R){if(R==null||R.g.length==0)return{w:!1};
var T=R.B[R.g[0]];return{w:T.add.lmfx!=null&&!T.Uy()}}},{name:[6,9],w:U,P$:!0,KR:[Q,x.Gh]},{name:[6,55],w:U,sub:[{name:[6,56,0],KR:[c,Q,x.Ax]},{name:[6,56,1],KR:[Q,x.Ax]},{name:[6,56,2],KR:[Q,x.$D]},{name:[6,56,3],KR:[c,Q,x.$D]}]},{name:"Combine Shapes",w:U,P$:!0,sub:[{name:[18,1],k5:"set/union"},{name:[18,2],k5:"set/difference"},{name:[18,3],k5:"set/intersection"},{name:[18,4],k5:"set/xor"}]},{name:[6,58],w:U,P$:!0,sub:[{name:["Make Frames"]},{name:["Unmake Frames"]},{name:[18,5]}]},{name:[6,12,0],KR:[Q,x.E],w:function(R){var T=R==null?0:R.g.length;
return{w:T!=0&&(T!=1||R.g[0]!=0),LT:ah.get(T>1||T==1&&R.B[R.g[0]].Uy()?[6,12,0]:[6,10])}}},{name:[6,12,1],w:U},{name:[2,13],w:U}],yz:[{sub:[{K:u.E.v,f:X.Mf,C:{d:eM.Hx}},{K:u.E.v,f:X.Mf,C:{d:eM.jK}},{K:u.E.M,C:{d:u.H.LL,AD:"newartb",AW:0}},{K:u.E.M,C:{d:u.H.LL,AD:"newartb",AW:1}},{K:u.E.G2,C:{q4:"copyToLayer"}},{K:u.E.G2,C:{q4:"cutToLayer"}}]},{K:u.E.v,f:X.Mf,C:{d:eM.DN}},{K:u.E.M,C:{d:u.H.LL,AD:"duplinto"}},{K:u.E.v,f:X.Mf,C:{d:eM.bU}},{sub:kF.eq(!0)},{sub:[{K:u.E.v,f:X.J7,C:{d:"newfill",Iz:0}},{K:u.E.G2,C:X.Rp.YJ(1)},{K:u.E.G2,C:X.Rp.YJ(2)}]},{sub:kF.Hj()},{sub:[{K:u.E.v,f:X.Mf,C:{d:eM.zP,AW:"RvlA"}},{K:u.E.v,f:X.Mf,C:{d:eM.zP,AW:"HdAl"}},{K:u.E.v,f:X.Mf,C:{d:eM.zP,AW:"RvlS"}},{K:u.E.v,f:X.Mf,C:{d:eM.zP,AW:"HdSl"}},{K:u.E.v,f:X.Mf,C:{d:eM.zP,AW:"Trns"}},{K:u.E.v,f:X.Mf,C:{d:eM.zb}},{K:u.E.v,f:X.Mf,C:{d:eM.Bc}},{K:u.E.v,f:X.Mf,C:{d:eM.wr}}]},{sub:[{K:u.E.v,f:X.Mf,C:{d:eM.Vo,yk:!1}},{K:u.E.v,f:X.Mf,C:{d:eM.Vo,yk:!0}},{K:u.E.v,f:X.Mf,C:{d:eM.Vo,aCY:!0}},{K:u.E.v,f:X.Mf,C:{d:eM.T7}},{K:u.E.v,f:X.Mf,C:{d:eM.TK}}]},{K:u.E.v,f:X.Mf,C:{d:eM.DF}},{sub:[{K:u.E.G2,C:{q4:"newPlacedLayer"}},{K:u.E.G2,C:{q4:"placedLayerEditContents",dx:{classID:"placedLayerEditContents"}}},{K:u.E.G2,C:{q4:"placedLayerReplaceContents",dx:{classID:"placedLayerReplaceContents"}}},{K:u.E.G2,C:{q4:"placedLayerExportContents",dx:{classID:"placedLayerExportContents"}}},{sub:e},{K:u.E.v,f:X.Mf,C:{d:eM.a3L}}]},{K:u.E.G2,C:{q4:"rasterizeLayer",dx:{classID:"rasterizeLayer",null:ep.QP("Lyr",!0)}}},{K:u.E.G2,C:{q4:"rasterizeLayer",dx:{classID:"rasterizeLayer",null:ep.QP("Lyr",!0),What:{t:"enum",v:{rasterizeItem:"layerStyle"}}}}},{K:u.E.v,f:X.Mf,C:{d:eM.xt}},{sub:[{K:u.E.v,f:X.Mf,C:{d:eM.qz,Zq:0}},{K:u.E.v,f:X.Mf,C:{d:eM.qz,Zq:1}},{K:u.E.v,f:X.Mf,C:{d:eM.qz,Zq:2}},{K:u.E.v,f:X.Mf,C:{d:eM.qz,Zq:3}}]},{sub:[{K:u.E.v,f:X.Mf,C:{d:eM.TJ,NE:0}},{K:u.E.v,f:X.Mf,C:{d:eM.TJ,NE:1}},{K:u.E.v,f:X.Mf,C:{d:eM.TJ,NE:2}},{K:u.E.v,f:X.Mf,C:{d:eM.TJ,NE:3}}]},{sub:[{K:u.E.v,f:X.Mf,C:{d:eM.mn,Zq:"makeframes"}},{K:u.E.v,f:X.Mf,C:{d:eM.mn,Zq:"unmakeframes"}},{K:u.E.v,f:X.Mf,C:{d:eM.mn,Zq:"merge"}}]},{K:u.E.G2,C:{q4:"mergeLayersNew",dx:{__name:"Merge Layers",classID:"Mrg2"}}},{K:u.E.G2,C:{q4:"flattenImage"}},{K:u.E.v,f:X.iT,C:{d:"start",PU:"defr"}}]},hV.akR(!1),function(){var R={name:[0,6],tU:0,items:[{name:[24,18,4],KR:[$,Q,x.ff],w:U,P$:!0}],yz:[{K:u.E.v,f:X.iT,C:{d:"applylast"}}]};
for(var F=0;F<fK.Db.length;F++){var T=fK.Db[F];if(T.WB!=null){var D={name:fK.names[T.WB],Q2:!0,P$:T.P$,w:U};
if(T.WB=="VaPo")D.w=i;R.items.push(D);R.yz.push({K:u.E.v,f:X.iT,C:{d:"start",PU:T.WB}});continue}var a={name:T.J4,sub:[],w:U};
R.items.push(a);var _={sub:[]};R.yz.push(_);for(var I=0;I<T.sB.length;I++){var f={name:fK.names[T.sB[I]],Q2:fK.$H(T.sB[I])!=null};
a.sub.push(f);var y={K:u.E.v,f:X.iT,C:{d:"start",PU:T.sB[I]}};_.sub.push(y)}}return R}(),{name:[0,7],items:[{name:[8,0],w:U,KR:[Q,x.LJ]},{name:[8,1],w:U,KR:[Q,x.m8]},{name:[20,3],w:U,KR:[Q,x.O6]},{name:[20,2],w:U,KR:[Q,x.kl]},{name:[8,14],w:function(R,T){return{w:R!=null,H5:R!=null&&R.d6}},P$:!0},{name:[12,36],P$:!0,sub:[{name:"Fullscreen",w:function(R,T){return{H5:document.fullscreenElement!=null}},P$:!0},{name:"Standard",w:function(R,T){return{H5:T.y3==0}}},{name:"Menu Bar and Canvas",w:function(R,T){return{H5:T.y3==1}}}]},{name:[8,13],KR:[Q,x.FI],w:function(R,T){return{H5:T.Ub}}},{name:[8,12],P$:!0,sub:[{name:[17,2],w:function(R,T){return{w:T.Ub,H5:T.Zo.mR}}},{name:[8,9],w:function(R,T){return{w:T.Ub,H5:T.Zo.iL}}},{name:[8,2],w:function(R,T){return{w:T.Ub,H5:T.Zo.Bo}},KR:[Q,x.KQ]},{name:[8,4],w:function(R,T){return{w:T.Ub,H5:T.Zo.bI}},KR:[Q,x.hr]},{name:[8,8],w:function(R,T){return{w:T.Ub,H5:T.Zo.l$}}},{name:[8,11,0],w:function(R,T){return{w:T.Ub,H5:T.Zo.p9}}}]},{name:[8,3],w:function(R,T){return{H5:T.w6}},KR:[Q,x.Pn],P$:!0},{name:[8,5],w:function(R,T){return{H5:T.yC}}},{name:[8,6],P$:!0,sub:[{name:[8,2],w:function(R,T){return{H5:T.Cs[0]}}},{name:[8,4],w:function(R,T){return{H5:T.Cs[1]}}},{name:[9,1],w:function(R,T){return{H5:T.Cs[2]}}},{name:[8,11,0],w:function(R,T){return{H5:T.Cs[3]}}},{name:[8,7,0],w:function(R,T){return{H5:T.Cs[4]}}}]},{name:[11,15,2],w:function(R,T){return{w:R!=null,H5:R!=null&&R.l2}}},{name:[11,15,0],w:U},{name:[11,14],w:U,Q2:!0},{name:[11,15,1],w:function(R,T){return{w:R!=null&&R.g.length!=0}},P$:!0},{name:[8,11,2],w:function(R,T){return{w:R!=null&&R.p9.length!=0}}}],yz:[{K:u.E.v,f:X.QT,C:{d:"zoom",bH:!0}},{K:u.E.v,f:X.QT,C:{d:"zoom",bH:!1}},{K:u.E.v,f:X.QT,C:{d:"adapt",b:"fitscr"}},{K:u.E.v,f:X.QT,C:{d:"adapt",b:"pixel"}},{K:u.E.v,f:X.kU,C:{d:"pview"}},{sub:[{K:u.E.M,C:{d:u.H.P2,qO:!0}},{K:u.E.M,C:{d:u.H.P2,b:0}},{K:u.E.M,C:{d:u.H.P2,b:1}},{K:u.E.M,C:{d:u.H.P2,b:2}}]},{K:u.E.M,C:{d:u.H.hW,hF:ke.eH}},{sub:[{K:u.E.M,C:{d:u.H.hW,hF:ke.S0}},{K:u.E.M,C:{d:u.H.hW,hF:ke.TM}},{K:u.E.M,C:{d:u.H.hW,hF:ke.V4}},{K:u.E.M,C:{d:u.H.hW,hF:ke.F_}},{K:u.E.M,C:{d:u.H.hW,hF:ke.DR}},{K:u.E.M,C:{d:u.H.hW,hF:ke.m$}}]},{K:u.E.M,C:{d:u.H.hW,hF:ke.ZZ}},{K:u.E.M,C:{d:u.H.hW,hF:ke.a9z}},{sub:[{K:u.E.M,C:{d:u.H.hW,hF:ke.kq,Q6:0}},{K:u.E.M,C:{d:u.H.hW,hF:ke.kq,Q6:1}},{K:u.E.M,C:{d:u.H.hW,hF:ke.kq,Q6:2}},{K:u.E.M,C:{d:u.H.hW,hF:ke.kq,Q6:3}},{K:u.E.M,C:{d:u.H.hW,hF:ke.kq,Q6:4}}]},{K:u.E.v,f:X.kU,C:{d:"lockguides"}},{K:u.E.v,f:X.kU,C:{d:"gids",Gv:[[],[]]}},{K:u.E.M,C:{d:u.H.LL,AD:"addguides"}},{K:u.E.v,f:X.kU,C:{d:"gidsFromLayer"}},{K:u.E.v,f:X.bb,C:{d:"deleteAll"}}]},function(){var R={name:[0,8],items:[{name:[0,14],P$:!0,sub:[]},{name:"Plugins",P$:!0}],yz:[{sub:[]},{K:u.E.M,C:{d:u.H.LL,AD:"res1"}}]};
for(var F=0;F<kh.dp.length;F++){var T=kh.dp[F],D=function(){var a=T.G7.UH;return function(_,I){return{H5:I.o9.indexOf(parseInt(a))!=-1}}}();
(T.nr?R.items[0].sub:R.items).push({name:T.G7.name,w:D});(T.nr?R.yz[0].sub:R.yz).push({K:u.E.M,C:{d:u.H.cR,AD:T.G7.UH}})}return R}(),function(){var R={name:[0,14],items:[],yz:[]},T={name:[0,9],sub:[]};
R.items.push(T);var D={sub:[]};R.yz.push(D);var a=ah.auY();for(var F=0;F<a.length;F++){var _=a[F],I=_.code,f=ah.apZ(I);
T.sub.push({name:_.name,KR:I,w:function(y,Z){return{H5:this.KR==ah.yu()}}});D.sub.push({K:u.E.M,C:{d:u.H.hW,hF:ke.W$,lang:f}})}T.sub.push({name:[0,12]});
D.sub.push({K:u.E.M,C:{d:u.H.H_,link:"https://www.photopea.com/translate/"}});var T={name:[0,15],sub:[]};
R.items.push(T);var D={sub:[]};R.yz.push(D);for(var F=0;F<bN.ua.length;F++){T.sub.push({name:bN.ua[F].name,w:function(y,Z){return{H5:this.name==bN.ua[Z.b4].name}}});
D.sub.push({K:u.E.M,C:{d:u.H.hW,hF:ke.Ts,b4:F}})}R.items.push({name:[0,17,6],w:function(y,Z){return{w:Z.t0!=null}}});
R.yz.push({K:u.E.M,C:{d:u.H.Ic}});R.items.push({name:[11,13]});R.yz.push({K:u.E.M,C:{d:u.H.LL,AD:"shortcuts"}});
R.items.push({name:[0,16],w:function(y){return{H5:eV.Mx,w:eV.arj}},P$:!0});R.yz.push({K:u.E.M,C:{d:u.H.a0U}});
R.items.push({name:"",w:function(y,Z){return Z.Lk?{LT:"About Photopea",w:!0}:{LT:"",w:!1}}});R.yz.push({K:u.E.M,C:{d:u.H.LL,AD:"aboutpp"}});
return R}()]}();function b3(){kw.call(this);this.n=E.p("div","");this.cM=0;this.zV=0;this.n$=null;this.Qu=E.p("div","");
this.Qu.setAttribute("style","width:200em; height:100em; position:absolute;");this.r2=[];this.Gz=[];
this.xX={}}b3.prototype=new kw;b3.prototype.pp=function(x){var Q=Date.now(),c=[];if(x=="-"){c=[new dW,new jc,new dE("pdfpres"),new dE("cformat"),new dE("batch"),new dE("mockups"),new kO,new jI,new cI,new bJ,new hN,new aY,new ca,new j1,new ga,new e8,new fX,new eI,new fL,new kF,new ic("isize"),new ic("csize"),new ei,new fl,new gG,new ba,new f9,new da,new aG,new fk,new a9(!1),new a9(!0),new gS(0),new gS(1),new kz,new a_,new d5,new fR,new cV,new gk,new gV(0),new gV(1),new gV(2),new gV(3),new gV(4),new gV(5),new gV(6),new gV(7),new gV(8),new aU,new bw,new fV,new di,new eX,new gD,new kd,new jg,new gt(0),new gt(1),new fg("border",[7,9],"px"),new fg("smoothness",[19,3,0],"px"),new fg("expand",[7,4],"px"),new fg("contract",[7,5],"px"),new fg("feather",[7,6],"px"),new al(0,"namewindow",[12,48]),new al(2,"billto","Bill To"),new al(1,"cornerradius",[12,94,0],"px",!0,!0),new al(1,"scaleeffects",[6,30,1],"%",!0),new al(1,"doczoom","Zoom","%",!0),new al(1,"setFPS","Set FPS","fps,120",!1),new al(1,"simplifypath",[12,94,2],"%,100",!0,!0)];
if(i9==0){c.push(new hn)}}else c=[new ew(x.slice(4))];this.aqk(c);this.xX[x]=!0};b3.prototype.aqk=function(x){var Q=this.n$;
for(var F=0;F<x.length;F++){var c=x[F];c.parent=this;this.Gz.push(c);this.S7(c);c._();if(Q)c.Fy(Q,ke.m6);
c.k(u.E.ZY,this.us,this);E.x3(c)}};b3.prototype.oN=function(x,Q){this.cM=x;this.zV=Q;for(var F=0;F<this.Gz.length;
F++)this.S7(this.Gz[F])};b3.prototype._=function(){for(var F=0;F<this.Gz.length;F++)this.Gz[F]._()};
b3.prototype.sl=function(){return this.r2.length==0?null:this.r2[this.r2.length-1]};b3.prototype.sD=function(){for(var F=0;
F<this.r2.length;F++)if(this.r2[F].sD())return!0;return!1};b3.prototype.aiP=function(x,Q,c,$,z){var j=x.startsWith("afw_"),U=null;
if(!j&&!this.xX["-"])this.pp("-");if(j&&!this.xX[x])this.pp(x);if(typeof x=="object"){U=x;if(!U.al8(u.E.ZY,this.us))U.k(u.E.ZY,this.us,this);
U.parent=this}else for(var F=0;F<this.Gz.length;F++)if(this.Gz[F].id==x)U=this.Gz[F];if(this.sD()&&U.sD()){alert("Finish the current action first");
return}if(!U.OL(Q))return;if(this.r2.indexOf(U)!=-1){if(x=="colorpicker")U.BM(Q,c,$,z);return}var i=this.r2.length-1;
if(i>=0)E.ZW(this.r2[i].n,"wdisabled");this.n.appendChild(U.n);this.r2.push(U);this.S7(U);E.KS(U);U.BM(Q,c,$,z)};
b3.prototype.S7=function(x){var Q=this.cM,c=this.zV,$=x.$O(Q,c),z;if($!=null){z=$}else{$=new bC(0,0);
z=x.ay3();if(z==null){var j=this.r2.indexOf(x)+1;if(Q<450||c<450)z=new bC(0,0);else z=new bC(j*150,j*150)}}x.n.style.left=z.x+"px";
x.n.style.top=this.n.offsetTop+z.y+"px";x.oN(this.cM-$.x*2,this.zV-$.y*2-34)};b3.prototype.Fy=function(x,Q){this.n$=x;
for(var F=0;F<this.Gz.length;F++)this.Gz[F].Fy(x,Q)};b3.prototype.us=function(x){var Q=this.r2.pop();
E.x3(Q,this.n);var c=this.r2.length-1;if(c>=0)E.WP(this.r2[c].n,"wdisabled");if(this.Qu.parentNode==this.n)this.n.removeChild(this.Qu)};
window.onload=function(){document.body.appendChild(new dh().n)}}())